working on librem13v4 hardware

This commit is contained in:
Lance Vick 2020-07-07 14:13:18 -07:00
parent d9cbf08931
commit 30b3465989
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
14 changed files with 12818 additions and 60 deletions

View File

@ -1,6 +1,6 @@
NAME := airgap
IMAGE := local/$(NAME):latest
TARGET := qemu
TARGET := librem13v4
docker = docker
executables = $(docker)
@ -22,9 +22,11 @@ image:
.PHONY: build
build:
$(contain) build
mkdir -p release/$(TARGET)/fw release/$(TARGET)/os
cp -R build/buildroot/output/images/bzImage release/$(TARGET)/os/
cp -R build/heads/build/$(TARGET)-coreboot/* release/$(TARGET)/fw/
mkdir -p release/$(TARGET)
cp -R \
build/buildroot/output/images/rootfs.iso9660 \
release/$(TARGET)/airgap.iso
cp -R build/heads/build/$(TARGET)/coreboot.rom release/$(TARGET)/
.PHONY: fetch
fetch:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
#!/bin/sh
set -u
set -e
echo "post-build.sh was run"

View File

@ -0,0 +1,6 @@
#!/bin/sh
set -u
set -e
echo "post-image.sh was run"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
#!/bin/sh
[ -e /proc/ksyms -o -e /proc/modules ] || exit 0
case "${1}" in
start)
[ -f /etc/modules ] || exit 0
while read module args; do
printf 'Loading module %s: ' "${module}"
modprobe ${module} ${args} >/dev/null
if [ $? -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
done < /etc/sysconfig/modules
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac

View File

@ -1,41 +0,0 @@
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -o remount,rw /
::sysinit:/bin/mkdir -p /dev/pts /dev/shm
::sysinit:/bin/mount -a
::sysinit:/sbin/swapon -a
null::sysinit:/bin/ln -sf /proc/self/fd /dev/fd
null::sysinit:/bin/ln -sf /proc/self/fd/0 /dev/stdin
null::sysinit:/bin/ln -sf /proc/self/fd/1 /dev/stdout
null::sysinit:/bin/ln -sf /proc/self/fd/2 /dev/stderr
::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Put a getty on the serial port
#console::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL
console::respawn:/bin/sh
tty1::respawn:/sbin/getty -L tty1 0 vt100 # QEMU graphical window
# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r

View File

@ -0,0 +1 @@
i915

View File

@ -1,2 +1,2 @@
BUILDROOT_REF=95fdb33f71f8a2d6a6e86fa3c6eb2968b6440b88
HEADS_REF=fab603153bd744ba3d1b4617a10c405c88f854bf
HEADS_REF=648a75b32128bf839dd201b8331b42c0c33da39a

View File

@ -181,9 +181,9 @@ i965-va-driver:amd64=2.3.0+dfsg1-1
ibverbs-providers:amd64=22.1-1
icoutils=0.32.3-2.1
icu-devtools=63.1-6+deb10u1
imagemagick=8:6.9.10.23+dfsg-2.1
imagemagick-6-common=8:6.9.10.23+dfsg-2.1
imagemagick-6.q16=8:6.9.10.23+dfsg-2.1
imagemagick=8:6.9.10.23+dfsg-2.1+deb10u1
imagemagick-6-common=8:6.9.10.23+dfsg-2.1+deb10u1
imagemagick-6.q16=8:6.9.10.23+dfsg-2.1+deb10u1
init-system-helpers=1.56+nmu1
initramfs-tools=0.133+deb10u1
initramfs-tools-core=0.133+deb10u1
@ -527,9 +527,9 @@ liblzma5:amd64=5.2.4-1
liblzo2-2:amd64=2.10-0.1
libmagic-mgc=1:5.35-4+deb10u1
libmagic1:amd64=1:5.35-4+deb10u1
libmagickcore-6.q16-6:amd64=8:6.9.10.23+dfsg-2.1
libmagickcore-6.q16-6-extra:amd64=8:6.9.10.23+dfsg-2.1
libmagickwand-6.q16-6:amd64=8:6.9.10.23+dfsg-2.1
libmagickcore-6.q16-6:amd64=8:6.9.10.23+dfsg-2.1+deb10u1
libmagickcore-6.q16-6-extra:amd64=8:6.9.10.23+dfsg-2.1+deb10u1
libmagickwand-6.q16-6:amd64=8:6.9.10.23+dfsg-2.1+deb10u1
libmailtools-perl=2.18-1
libmailutils5:amd64=1:3.5-3
libmariadb3:amd64=1:10.3.22-0+deb10u1
@ -714,6 +714,7 @@ libsratom-0-0:amd64=0.6.0~dfsg0-1
libss2:amd64=1.44.5-1+deb10u3
libssh-gcrypt-4:amd64=0.8.7-1+deb10u1
libssh2-1:amd64=1.8.0-2.1
libssl-dev:amd64=1.1.1d-0+deb10u3
libssl1.1:amd64=1.1.1d-0+deb10u3
libstdc++-8-dev:amd64=8.3.0-6
libstdc++6:amd64=8.3.0-6

View File

@ -7,6 +7,6 @@ build_dir="${BUILD_DIR?}"
buildroot_dir="${build_dir}/buildroot"
heads_dir="${build_dir}/heads"
(cd "${heads_dir}"; make )
(cd "${heads_dir}"; make BOARD="$TARGET")
(cd "${buildroot_dir}"; make )

View File

@ -9,4 +9,4 @@ export BUILD_DIR="${HOME}/build"
export BR2_EXTERNAL="${HOME}/config/buildroot"
export RELEASE_DIR="${HOME}/release"
export BUILDROOT_REPO=git://git.busybox.net/buildroot
export HEADS_REPO=https://github.com/osresearch/heads
export HEADS_REPO=https://source.puri.sm/coreboot/purism-heads.git

View File

@ -16,13 +16,15 @@ heads_ref=${HEADS_REF?}
mkdir -p "$build_dir"
[ "$(ls -A $build_dir)" ] && exit 0
git clone "$buildroot_repo" "$buildroot_dir"
[ "$(ls -A "${buildroot_dir}")" ] \
|| git clone "$buildroot_repo" "$buildroot_dir"
git -C "$buildroot_dir" checkout "$buildroot_ref"
cd "$buildroot_dir"
make "airgap_${TARGET}_defconfig"
make source
git clone "$heads_repo" "$heads_dir"
[ "$(ls -A "${heads_dir}")" ] \
|| git clone "$heads_repo" "$heads_dir"
git -C "$heads_dir" checkout "$heads_ref"
[ "$TARGET" == "librem13v4" ] \
&& (cd "$heads_dir/blobs/librem_kbl" && ./get_blobs.sh)

View File

@ -6,5 +6,4 @@ set -e
qemu-system-i386 \
-M pc \
-nographic \
-append "console=ttyS0" \
-kernel "$HOME/release/bzImage"
-cdrom "${HOME}/release/${TARGET}/airgap.iso"