mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 12:33:02 +02:00
- Adapt boot scripts to exepect the split FIT header/SquashFS image layout. - Make sure that we can boot from any kind of block device (most importantly virtio for GNS3). - Rename net -> dhcp as we might have more kinds of netboots in the future (http).
38 lines
892 B
Bash
38 lines
892 B
Bash
echo "${slot}: Preparing..."
|
|
setenv prepared
|
|
|
|
if test "${slot}" = "primary"; then
|
|
run ixprepblk
|
|
elif test "${slot}" = "secondary"; then
|
|
run ixprepblk
|
|
elif test "${slot}" = "dhcp"; then
|
|
run ixprepdhcp
|
|
fi
|
|
|
|
if test "${prepared}" = "ok"; then
|
|
echo "${slot}: Validating..."
|
|
if iminfo ${ramdisk_addr_r}; then
|
|
echo "${slot}: Booting..."
|
|
|
|
setenv bootargs_rauc "rauc.slot=${slot}"
|
|
|
|
blkmap create boot
|
|
blkmap get boot dev blkmapnum
|
|
blkmap map boot 0 ${sqblkcnt} mem ${sqaddr}
|
|
|
|
for conf in "${board}-syslinux.conf syslinux.conf"; do
|
|
if test -e blkmap ${blkmapnum} /boot/syslinux/${conf}; then
|
|
sysboot blkmap ${blkmapnum} any ${scriptaddr} /boot/syslinux/${conf}
|
|
fi
|
|
done
|
|
|
|
blkmap destroy boot
|
|
|
|
echo "${slot}: ERROR: Boot failed"
|
|
else
|
|
echo "${slot}: ERROR: Validation failed"
|
|
fi
|
|
else
|
|
echo "${slot}: ERROR: Unable to use slot"
|
|
fi
|