diff options
Diffstat (limited to 'bootstrap.d/41-uboot.sh')
-rw-r--r-- | bootstrap.d/41-uboot.sh | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/bootstrap.d/41-uboot.sh b/bootstrap.d/41-uboot.sh index 507be55..d3e4573 100644 --- a/bootstrap.d/41-uboot.sh +++ b/bootstrap.d/41-uboot.sh @@ -1,7 +1,8 @@ # -# Setup Uboot +# Build and Setup Uboot # +# Load utility functions . ./functions.sh # Install gcc/c++ build environment inside the chroot @@ -22,23 +23,9 @@ if [ "$ENABLE_UBOOT" = true ] ; then printf "\n# boot u-boot kernel\nkernel=u-boot.bin\n" >> $R/boot/firmware/config.txt # Set U-Boot command file - cat <<EOM >$R/boot/firmware/uboot.mkimage -# Tell Linux that it is booting on a Raspberry Pi2 -setenv machid 0x00000c42 - -# Set the kernel boot command line -setenv bootargs "earlyprintk ${CMDLINE}" - -# Save these changes to u-boot's environment -saveenv - -# Load the existing Linux kernel into RAM -fatload mmc 0:1 \${kernel_addr_r} kernel7.img - -# Boot the kernel we have just loaded -bootz \${kernel_addr_r} -EOM + install_readonly files/boot/uboot.mkimage $R/boot/firmware/uboot.mkimage + printf "# Set the kernel boot command line\nsetenv bootargs \"earlyprintk ${CMDLINE}\"\n\n$(cat $R/boot/firmware/uboot.mkimage)" > $R/boot/firmware/uboot.mkimage # Generate U-Boot image from command file - chroot_exec mkimage -A arm -O linux -T script -C none -a 0x00000000 -e 0x00000000 -n "RPi2 Boot Script" -d /boot/firmware/uboot.mkimage /boot/firmware/boot.scr + chroot_exec /tmp/u-boot/tools/mkimage -A arm -O linux -T script -C none -a 0x00000000 -e 0x00000000 -n RPi2 -d /boot/firmware/uboot.mkimage /boot/firmware/boot.scr fi |