Commit 5fba7292 authored by Angus Ainslie's avatar Angus Ainslie

build-image: move the fdt_file configuration to the conf/baord file

This moves the fdt_file configuration variable to the board file
with all of the other configuration variable
parent b92fdd63
......@@ -96,6 +96,7 @@ sudo pureos_board="${pureos_board}" \
http_proxy="${http_apt_proxy:-${http_proxy:-}}" \
https_proxy="${https_apt_proxy:-${https_proxy:-}}" \
qemu="${qemu}" \
fdt_file="${fdt_file}" \
vmdebootstrap \
--enable-dhcp \
--verbose --image "${bootimg}" --log "tmp/${bootimg}.log" --size 3900M \
......@@ -114,6 +115,6 @@ echo "gitrev: $(git log --format=format:%H -1)" >> files/meta.yml
if [ "${pureos_board}" == "imx8" ]; then
loop=$(setup_loop "${bootimg}")
dd if=files/"${uboot_bin}" of="${loop}" bs=1024 seek=33
sudo dd if=files/"${uboot_bin}" of="${loop}" bs=1024 seek=33
sudo losetup -d "${loop}"
fi
......@@ -6,6 +6,7 @@ case ${pureos_board} in
kernel_version=4.15.0-g837bff1_4.15.0-g837bff1-1
kernel_arch=armhf
board_type=nitrogen6
fdt_file=imx6qp-nitrogen6_max_purism.dtb
# Prefer a local qemu-arm-static until
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=887892
# if fixed
......@@ -31,6 +32,7 @@ case ${pureos_board} in
kernel_arch=arm64
kernel_version=4.9.51-07589-gdfe3af5_4.9.51-07589-gdfe3af5-2
board_type=unknown
fdt_file=fsl-imx8mq-evk-m4.dtb
qemu=/usr/bin/qemu-aarch64-static
kernel_deb=linux-image-${kernel_version}_${kernel_arch}.deb
uboot_bin=u-boot-imx8.imx
......
......@@ -28,22 +28,6 @@ mirror=deb.debian.org
echo "Configuring ${distro} in ${basedir} for board ${pureos_board}"
case ${pureos_board} in
imx6)
fdt_file=imx6qp-nitrogen6_max_purism.dtb
;;
imx8)
fdt_file=fsl-imx8mq-evk-m4.dtb
;;
qemu-x86_64)
;;
*)
echo "unrecognized board type ${pureos_board}"
exit 1
;;
esac
# bindmount qemu into the rootfs so we can chroot into it if needed
function setup_qemu()
{
......@@ -67,8 +51,7 @@ function setup_kernel()
;;
imx8)
fdt_source="${basedir}"/usr/lib/linux-image-*/freescale/"${fdt_file}"
cp "${basedir}/boot/${link}" "${basedir}/boot/Image.gz"
gunzip "${basedir}/boot/Image.gz"
ln -s "$(basename "${basedir}"/boot/vmlinux-*)" "${basedir}/boot/Image"
;;
esac
cp ${fdt_source} "${basedir}/boot/dtbs/"
......
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