diff options
author | Jan Wagner <mail@jwagner.eu> | 2016-03-12 16:07:25 +0100 |
---|---|---|
committer | Jan Wagner <mail@jwagner.eu> | 2016-03-12 16:07:25 +0100 |
commit | 4aa8ac6985680eb12ba5c82422ecc50e2bb55447 (patch) | |
tree | a85e15805b773c5218ccb0a279490c98eec41e81 /bootstrap.d/41-uboot.sh | |
parent | 80185bd93dd9eecb1b41ef8ac9a186aff19ab33e (diff) | |
download | rpi2-gen-image-4aa8ac6985680eb12ba5c82422ecc50e2bb55447.tar.gz rpi2-gen-image-4aa8ac6985680eb12ba5c82422ecc50e2bb55447.tar.bz2 rpi2-gen-image-4aa8ac6985680eb12ba5c82422ecc50e2bb55447.zip |
spliting more files, fix-uboot, fix-fbturbo, fix-locale
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 |