Commit 91a6cc96 authored by Angus Ainslie's avatar Angus Ainslie

build-image: add u-boot and kernel for iMX8

Add the custom u-boot and kernel for iMX8. Also the kernel must
be uncompressed for u-boot booti to work.
parent 76c9e43a
......@@ -33,7 +33,7 @@ case ${pureos_board} in
fdt_file=imx6qp-nitrogen6_max_purism.dtb
;;
imx8)
echo "board type ${pureos_board} not configured yet"
fdt_file=fsl-imx8mq-evk-m4.dtb
;;
qemu-x86_64)
;;
......@@ -61,7 +61,17 @@ function setup_kernel()
cp data/update-zImage-link "${basedir}/etc/kernel/postinst.d/"
mkdir -p "${basedir}/boot/dtbs"
cp "${basedir}"/usr/lib/linux-image-*/${fdt_file} "${basedir}/boot/dtbs/"
case "${pureos_board}" in
imx6)
fdt_source="${basedir}"/usr/lib/linux-image-*/"${fdt_file}"
;;
imx8)
fdt_source="${basedir}"/usr/lib/linux-image-*/freescale/"${fdt_file}"
cp "${basedir}/boot/${link}" "${basedir}/boot/Image.gz"
gunzip "${basedir}/boot/Image.gz"
;;
esac
cp ${fdt_source} "${basedir}/boot/dtbs/"
# Make sure we have the kernel available for tests
mkdir -p tmp/
cp "${basedir}/boot/zImage" "tmp/"
......@@ -72,7 +82,9 @@ function setup_uboot()
{
sed -e "s/##DTBNAME##/${fdt_file}/" "data/boot-${pureos_board}.txt.in" > "${basedir}/boot/boot.txt"
mkimage -A arm -T script -O linux -d "${basedir}/boot/boot.txt" "${basedir}/boot/boot.scr"
ln -fs boot.scr "${basedir}/boot/6x_bootscript"
if [ "${pureos_board}" == "imx6" ]; then
ln -fs boot.scr "${basedir}/boot/6x_bootscript"
fi
[ ! -d "files/uboot-${pureos_board}" ] || cp -a "files/uboot-${pureos_board}/"* "${basedir}/boot/"
}
......@@ -260,11 +272,18 @@ setup_gui
setup_journal
setup_sshd
setup_touchscreen
# Skip setup until we have hardware, not needed for qemu
if [ "${pureos_board}" == "imx6" ]; then
setup_kernel
setup_uboot
fi
case "${pureos_board}" in
imx6|imx8)
setup_kernel
setup_uboot
;;
?)
echo "No kernel or u-boot setup for ${pureos_board}"
;;
esac
create_stamp
if [ -x files/local.sh ]; then
......
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