Commit 78c3e196 authored by Angus Ainslie (Purism)'s avatar Angus Ainslie (Purism)

root.sh : build a u-boot script to boot the eMMC and the SD

By default use the SD boot script
parent be26f191
......@@ -11,7 +11,7 @@ dtbname=##DTBNAME##
console=ttymxc0
dtype=mmc
rfspart=2
rfspart=##RFSPART##
disk=1
root=/dev/mmcblk${disk}p${rfspart}
......
......@@ -67,10 +67,16 @@ function setup_kernel()
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"
sed -e "s/##DTBNAME##/${fdt_file}/" "data/boot-${pureos_board}.txt.in" > "${basedir}/boot/boot_emmc.txt"
sed -e "s/##RFSPART##/0/" -i "${basedir}/boot/boot_emmc.txt"
mkimage -A arm -T script -O linux -d "${basedir}/boot/boot_emmc.txt" "${basedir}/boot/boot_emmc.scr"
sed -e "s/##DTBNAME##/${fdt_file}/" "data/boot-${pureos_board}.txt.in" > "${basedir}/boot/boot_sd.txt"
sed -e "s/##RFSPART##/1/" -i "${basedir}/boot/boot_sd.txt"
mkimage -A arm -T script -O linux -d "${basedir}/boot/boot_sd.txt" "${basedir}/boot/boot_sd.scr"
if [ "${pureos_board}" == "imx6" ]; then
ln -fs boot.scr "${basedir}/boot/6x_bootscript"
else
ln -fs boot.scr "${basedir}/boot/boot_sd.scr"
fi
[ ! -d "files/uboot-${pureos_board}" ] || cp -a "files/uboot-${pureos_board}/"* "${basedir}/boot/"
......
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