Commit 3b37036d authored by Guido Gunther's avatar Guido Gunther
Browse files

root.sh: Simplify setup-kernel

All boards use a kernel deb now (either fetched during image
build or a packaged one)
parent 0d214175
Pipeline #64713 passed with stage
in 8 seconds
......@@ -133,7 +133,6 @@ build_type=plain
NULL=
# Device tree file name. Only set this if you're not using
# flash-kernel and want manual uboot script configuration.
fdt_file=
uboot_type=
# The URL to download the (unpackged) uboot binaries from
uboot_url=${UBOOT_URL:-}
......
......@@ -14,7 +14,6 @@
# Optional
: "${build_tarball:-}"
: "${fdt_file:-}"
: "${kernel_deb:-}"
: "${patched:-}"
: "${qemu:-}"
......@@ -112,36 +111,10 @@ function cleanup_cryptroot()
function setup_kernel()
{
local link
local fdt_source
fdt_source=""
mkdir -p tmp/
mkdir -p "${basedir}/boot/dtbs"
case "${pureos_board}" in
imx6)
# TODO: use flash-kernel
fdt_source="${basedir}/usr/lib/linux-image-*/${fdt_file}"
link=$(basename "${basedir}"/boot/vmlinuz-*)
rm -f "${basedir}/boot/zImage"
ln -s "${link}" "${basedir}/boot/zImage"
cp data/update-zImage-link "${basedir}/etc/kernel/postinst.d/"
cp "${basedir}/boot/zImage" "tmp/"
;;
ec-som|imx8)
fdt_source="${basedir}/usr/lib/linux-image-*/freescale/${fdt_file}"
cp "${basedir}/boot/${link}" "${basedir}/boot/Image.gz"
gunzip "${basedir}/boot/Image.gz"
;;
*)
if [ -n "${kernel_deb}" ]; then
# Reconfigure kernel package to trigger kernel hooks
chroot "${basedir}" dpkg-reconfigure "$(basename "${kernel_deb%%_*}")"
fi
;;
esac
[ -z "${fdt_source}" ] || cp "${fdt_source}" "${basedir}/boot/dtbs/"
if [ -n "${kernel_deb}" ]; then
# Reconfigure kernel package to trigger kernel hooks
chroot "${basedir}" dpkg-reconfigure "$(basename "${kernel_deb%%_*}")"
fi
}
......
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