Commit c324d00a authored by Guido Gunther's avatar Guido Gunther

Pass in the kernel package late

This allows us to modify it with versions fetched during build
that we don't know upfront.
parent 2923d6bc
......@@ -81,6 +81,7 @@ want_qcow2=
apt_sources=
debootstrap_dist=
kernel_deb=
custom_package_opt=
while getopts ":hb:d:T:B" opt; do
case ${opt} in
......@@ -138,10 +139,13 @@ if [ "${build_type}" == "latest" ]; then
fi
kernel_deb="$deb"
done
[ -n "${kernel_deb}" ] || { echo "No kernel found."; exit 1; }
custom_package_opt=(--custom-package "${kernel_deb}")
else
kernel_url=https://storage.puri.sm/librem5/binaries/${build_type}/latest/files/
if [ -n "${kernel_deb}" ] && [ ! -f "files/${kernel_deb}" ]; then
wget -Pfiles/ "${kernel_url}/${kernel_deb}"
custom_package_opt=(--custom-package "files/${kernel_deb}")
fi
if [ -n "${uboot_bin}" ] && [ ! -f "files/uboot-${uboot_type}/${uboot_bin}" ]; then
......@@ -157,6 +161,7 @@ echo "Using kernel ${kernel_deb}"
escaped_apt_sources=$(echo "${apt_sources}" | sed 's/$/|/g')
set -x
# shellcheck disable=SC2086
sudo pureos_board="${pureos_board}" \
distro="${distro}" \
packages="${packages}" \
......@@ -177,6 +182,7 @@ sudo pureos_board="${pureos_board}" \
--root-password='root' --hostname='pureos' --user=purism/123456 --sudo \
--customize "${cwd}/root.sh" \
--owner "$(whoami)" \
"${custom_package_opt[@]}" \
"${vmdebootstrap_opts[@]}" \
${NULL}
set +x
......
......@@ -21,7 +21,6 @@ case ${pureos_board} in
--bootsize 200M
--boottype ext2
--bootoffset 1M
--custom-package "files/${kernel_deb}"
--no-kernel
--no-update-initramfs
--arch="${arch}"
......@@ -43,7 +42,6 @@ case ${pureos_board} in
--bootsize 200M
--boottype ext2
--bootoffset 5M
--custom-package "files/${kernel_deb}"
--no-kernel
--no-update-initramfs
--arch="${arch}"
......@@ -63,7 +61,6 @@ case ${pureos_board} in
--bootsize 200M
--boottype ext2
--bootoffset 5MiB
--custom-package "files/${kernel_deb}"
--no-kernel
--no-update-initramfs
--arch="${arch}"
......@@ -85,7 +82,6 @@ case ${pureos_board} in
--bootsize 200M
--boottype ext2
--bootoffset 5MiB
--custom-package "files/${kernel_deb}"
--no-kernel
--arch="${arch}"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment