Skip to content
Snippets Groups Projects

v2: unify the image creation into a single script sharing the same rootfs

Merged Johannes Schauer Marin Rodrigues requested to merge unite-them into main
1 file
+ 7
6
Compare changes
  • Side-by-side
  • Inline
+ 7
6
@@ -4,6 +4,8 @@ set -eu
export LC_ALL=C.UTF-8
PLATFORMS=a311d imx8mq
#usage() {
# echo "usage: $0 imx8mq|a311d" >&2
#}
@@ -65,11 +67,10 @@ export TMPDIR="$(pwd)"
BOOTSIZE=488
ROOTSIZE=4096
for PLATFORM in imx8mq a311d; do
for PLATFORM in $PLATFORMS; do
case "$PLATFORM" in
imx8mq) PROJECT="reform-boundary-uboot"; TAG="2023-07-04"; SHA1="41d2ba5fcc65f26224f7d1afed650e86662cea27";;
#a311d) PROJECT="reform-a311d-uboot"; TAG="FIXME"; SHA1="FIXME";;
a311d) PROJECT="reform-boundary-uboot"; TAG="2023-07-04"; SHA1="41d2ba5fcc65f26224f7d1afed650e86662cea27";;
a311d) PROJECT="reform-a311d-uboot"; TAG="2023-09-12"; SHA1="a165eb898f456c82d6b7686c4025f8e2f3ad771d";;
esac
/usr/lib/apt/apt-helper download-file \
"https://source.mnt.re/reform/$PROJECT/-/jobs/artifacts/$TAG/raw/flash.bin?job=build" \
@@ -105,7 +106,7 @@ set -- "$@" --setup-hook='{ echo "Package: *"; echo "Pin: release n=reform, l=re
# Another way to avoid this list here would be to add code to
# /usr/share/flash-kernel/ubootenv.d/00reform2_ubootenv which does the
# platform detection and then adds the options to ${bootargs}.
set -- "$@" --essential-hook='{ echo LINUX_KERNEL_CMDLINE=\"console=ttymxc0,115200 console=tty1\"; echo LINUX_KERNEL_CMDLINE_DEFAULTS=\"ro no_console_suspend cma=512M pci=nomsi\"; } > "$1"/etc/default/flash-kernel'
set -- "$@" --essential-hook='{ echo LINUX_KERNEL_CMDLINE=\"console=ttymxc0,115200 console=ttyAML0,115200 console=tty1\"; echo LINUX_KERNEL_CMDLINE_DEFAULTS=\"ro no_console_suspend cma=512M pci=nomsi,pice_bus_perf libata.force=noncq nvme_core.default_ps_max_latency_us=0\"; } > "$1"/etc/default/flash-kernel'
# even when above has been taken care of, we still want to overwrite
# /etc/default/flash-kernel because by default it will contain
# LINUX_KERNEL_CMDLINE="quiet" and we don't want that
@@ -152,7 +153,7 @@ mmtarfilter --path-exclude='/boot/*' < target-userland.tar \
# system ---------------------------------------------------------
for PLATFORM in imx8mq a311d; do
for PLATFORM in $PLATFORMS; do
# invoke mmdebstrap again to produce a platform specific /boot
case "$PLATFORM" in
imx8mq) MACHINE="MNT Reform 2";;
@@ -189,7 +190,7 @@ for PLATFORM in imx8mq a311d; do
dd if=./flash-$PLATFORM.bin of="$IMGNAME" conv=notrunc bs=1k seek=33
done
for PLATFORM in imx8mq a311d; do
for PLATFORM in $PLATFORMS; do
IMGNAME=reform-system-$PLATFORM.img
echo Reform System Image for $PLATFORM created: "$IMGNAME", MD5 checksum:
md5sum "$IMGNAME"
Loading