Name change and boot-from-usb on Heads
This commit is contained in:
parent
d4b60d191d
commit
4e66c50835
|
@ -0,0 +1,39 @@
|
||||||
|
# Configuration for a librem13v4
|
||||||
|
CONFIG_LINUX_CONFIG=config/linux-librem13v2.config
|
||||||
|
CONFIG_COREBOOT_CONFIG=config/coreboot-librem13v4.config
|
||||||
|
|
||||||
|
export CONFIG_COREBOOT=y
|
||||||
|
CONFIG_CRYPTSETUP=y
|
||||||
|
CONFIG_FLASHROM=y
|
||||||
|
CONFIG_FLASHTOOLS=y
|
||||||
|
CONFIG_GPG2=y
|
||||||
|
CONFIG_KEXEC=y
|
||||||
|
CONFIG_UTIL_LINUX=y
|
||||||
|
CONFIG_LVM2=y
|
||||||
|
CONFIG_MBEDTLS=y
|
||||||
|
CONFIG_PCIUTILS=y
|
||||||
|
CONFIG_POPT=y
|
||||||
|
CONFIG_QRENCODE=y
|
||||||
|
CONFIG_TPMTOTP=y
|
||||||
|
|
||||||
|
#CONFIG_SLANG=y
|
||||||
|
#CONFIG_NEWT=y
|
||||||
|
CONFIG_CAIRO=y
|
||||||
|
CONFIG_FBWHIPTAIL=y
|
||||||
|
CONFIG_LIBREMKEY=y
|
||||||
|
|
||||||
|
CONFIG_LINUX_USB=y
|
||||||
|
|
||||||
|
export CONFIG_TPM=y
|
||||||
|
export CONFIG_BOOTSCRIPT=/bin/gui-init
|
||||||
|
export CONFIG_BOOT_REQ_HASH=n
|
||||||
|
export CONFIG_BOOT_REQ_ROLLBACK=n
|
||||||
|
export CONFIG_BOOT_KERNEL_ADD="intel_iommu=on"
|
||||||
|
export CONFIG_BOOT_KERNEL_REMOVE=""
|
||||||
|
export CONFIG_BOOT_USB=y
|
||||||
|
export CONFIG_BOOT_DEV="/dev/sda1"
|
||||||
|
export CONFIG_BOOT_GUI_MENU_NAME="Librem 13 v4 | AirgapOS Firmware Menu"
|
||||||
|
export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0"
|
||||||
|
export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0"
|
||||||
|
export CONFIG_FLASHROM_OPTIONS="-p internal"
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
|
@ -0,0 +1,40 @@
|
||||||
|
# Configuration for a librem15v4
|
||||||
|
|
||||||
|
# The L15v4 Linux config is the same as the L13v2 linux config
|
||||||
|
CONFIG_LINUX_CONFIG=config/linux-librem13v2.config
|
||||||
|
CONFIG_COREBOOT_CONFIG=config/coreboot-librem15v4.config
|
||||||
|
|
||||||
|
export CONFIG_COREBOOT=y
|
||||||
|
CONFIG_CRYPTSETUP=y
|
||||||
|
CONFIG_FLASHROM=y
|
||||||
|
CONFIG_FLASHTOOLS=y
|
||||||
|
CONFIG_GPG2=y
|
||||||
|
CONFIG_KEXEC=y
|
||||||
|
CONFIG_UTIL_LINUX=y
|
||||||
|
CONFIG_LVM2=y
|
||||||
|
CONFIG_MBEDTLS=y
|
||||||
|
CONFIG_PCIUTILS=y
|
||||||
|
CONFIG_POPT=y
|
||||||
|
CONFIG_QRENCODE=y
|
||||||
|
CONFIG_TPMTOTP=y
|
||||||
|
|
||||||
|
#CONFIG_SLANG=y
|
||||||
|
#CONFIG_NEWT=y
|
||||||
|
CONFIG_CAIRO=y
|
||||||
|
CONFIG_FBWHIPTAIL=y
|
||||||
|
CONFIG_LIBREMKEY=y
|
||||||
|
|
||||||
|
CONFIG_LINUX_USB=y
|
||||||
|
|
||||||
|
export CONFIG_TPM=y
|
||||||
|
export CONFIG_BOOTSCRIPT=/bin/gui-init
|
||||||
|
export CONFIG_BOOT_REQ_HASH=n
|
||||||
|
export CONFIG_BOOT_REQ_ROLLBACK=n
|
||||||
|
export CONFIG_BOOT_KERNEL_ADD="intel_iommu=on"
|
||||||
|
export CONFIG_BOOT_KERNEL_REMOVE=""
|
||||||
|
export CONFIG_BOOT_DEV="/dev/sda1"
|
||||||
|
export CONFIG_BOOT_GUI_MENU_NAME="Librem 15 v4 | AirgapOS Firmware Menu"
|
||||||
|
export CONFIG_WARNING_BG_COLOR="--background-gradient 0 0 0 150 125 0"
|
||||||
|
export CONFIG_ERROR_BG_COLOR="--background-gradient 0 0 0 150 0 0"
|
||||||
|
export CONFIG_FLASHROM_OPTIONS="-p internal"
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/initrd/init b/initrd/init
|
||||||
|
index bb39dec..975d041 100755
|
||||||
|
--- a/initrd/init
|
||||||
|
+++ b/initrd/init
|
||||||
|
@@ -48,6 +48,11 @@ if [ ! -e /dev/tpm0 ]; then
|
||||||
|
export CONFIG_TPM='n'
|
||||||
|
fi
|
||||||
|
|
||||||
|
+if [ "$CONFIG_BOOT_USB" = "y" ]; then
|
||||||
|
+ insmod /lib/modules/usb-storage.ko >/dev/null 2>&1 \
|
||||||
|
+ || echo "usb_storage: module load failed"
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
if [ "$CONFIG_COREBOOT" = "y" ]; then
|
||||||
|
/bin/cbfs-init
|
||||||
|
fi
|
||||||
|
|
|
@ -7,6 +7,7 @@ env_file=${HOME}/config/config.env
|
||||||
|
|
||||||
export BUILD_DIR="${HOME}/build"
|
export BUILD_DIR="${HOME}/build"
|
||||||
export BR2_EXTERNAL="${HOME}/config/buildroot"
|
export BR2_EXTERNAL="${HOME}/config/buildroot"
|
||||||
|
export HEADS_EXTERNAL="${HOME}/config/heads"
|
||||||
export RELEASE_DIR="${HOME}/release"
|
export RELEASE_DIR="${HOME}/release"
|
||||||
export BUILDROOT_REPO=git://git.busybox.net/buildroot
|
export BUILDROOT_REPO=git://git.busybox.net/buildroot
|
||||||
export HEADS_REPO=https://source.puri.sm/coreboot/purism-heads.git
|
export HEADS_REPO=https://source.puri.sm/coreboot/purism-heads.git
|
||||||
|
|
|
@ -6,9 +6,13 @@ build_dir="${BUILD_DIR?}"
|
||||||
buildroot_dir="${build_dir}/buildroot"
|
buildroot_dir="${build_dir}/buildroot"
|
||||||
buildroot_repo="${BUILDROOT_REPO?}"
|
buildroot_repo="${BUILDROOT_REPO?}"
|
||||||
buildroot_ref=${BUILDROOT_REF?}
|
buildroot_ref=${BUILDROOT_REF?}
|
||||||
|
buildroot_external=${BR2_EXTERNAL?}
|
||||||
heads_dir="${build_dir}/heads"
|
heads_dir="${build_dir}/heads"
|
||||||
heads_repo="${HEADS_REPO?}"
|
heads_repo="${HEADS_REPO?}"
|
||||||
heads_ref=${HEADS_REF?}
|
heads_ref=${HEADS_REF?}
|
||||||
|
heads_external=${HEADS_EXTERNAL?}
|
||||||
|
devices=${DEVICES?}
|
||||||
|
target=${TARGET?}
|
||||||
|
|
||||||
[[ -f ~/.gitconfig ]] || \
|
[[ -f ~/.gitconfig ]] || \
|
||||||
printf "[color]\nui=auto\n[user]\nemail=build@local\nname=Build User" \
|
printf "[color]\nui=auto\n[user]\nemail=build@local\nname=Build User" \
|
||||||
|
@ -18,18 +22,29 @@ mkdir -p "$build_dir"
|
||||||
|
|
||||||
[ "$(ls -A "${buildroot_dir}")" ] \
|
[ "$(ls -A "${buildroot_dir}")" ] \
|
||||||
|| git clone "$buildroot_repo" "$buildroot_dir"
|
|| git clone "$buildroot_repo" "$buildroot_dir"
|
||||||
|
git -C "$buildroot_dir" reset --hard
|
||||||
git -C "$buildroot_dir" checkout "$buildroot_ref"
|
git -C "$buildroot_dir" checkout "$buildroot_ref"
|
||||||
cd "$buildroot_dir"
|
(
|
||||||
git reset --hard
|
cd $buildroot_dir;
|
||||||
for patch in ${BR2_EXTERNAL}/patches/*; do
|
for patch in "${buildroot_external}"/patches/*; do
|
||||||
echo "Applying patch: ${patch}"
|
echo "Applying patch: ${patch}";
|
||||||
patch -p1 --no-backup-if-mismatch < "${patch}"
|
patch -p1 --no-backup-if-mismatch < "${patch}";
|
||||||
done
|
done;
|
||||||
make "airgap_${TARGET}_defconfig"
|
make "airgap_${target}_defconfig";
|
||||||
make source
|
make source;
|
||||||
|
)
|
||||||
|
|
||||||
[ "$(ls -A "${heads_dir}")" ] \
|
[ "$(ls -A "${heads_dir}")" ] \
|
||||||
|| git clone "$heads_repo" "$heads_dir"
|
|| git clone "$heads_repo" "$heads_dir"
|
||||||
|
git -C "$buildroot_dir" reset --hard
|
||||||
git -C "$heads_dir" checkout "$heads_ref"
|
git -C "$heads_dir" checkout "$heads_ref"
|
||||||
[[ "$DEVICES" =~ "librem" ]] \
|
(
|
||||||
|
cd "$heads_dir";
|
||||||
|
for patch in "${heads_external}"/patches/*; do
|
||||||
|
echo "Applying patch: ${patch}"
|
||||||
|
patch -p1 --no-backup-if-mismatch < "${patch}"
|
||||||
|
done
|
||||||
|
rsync -Pav "${heads_external}/boards/" "${heads_dir}/boards/"
|
||||||
|
[[ "$devices" =~ "librem" ]] \
|
||||||
&& (cd "$heads_dir/blobs/librem_kbl" && ./get_blobs.sh)
|
&& (cd "$heads_dir/blobs/librem_kbl" && ./get_blobs.sh)
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue