From: Jaehoon Chung Date: Mon, 27 Mar 2017 09:36:16 +0000 (+0900) Subject: script: add the boot_script for rpi3 X-Git-Tag: submit/tizen/20170522.064308~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac57570eaa6dba2b70cf57679306b75bb123c1cd;p=platform%2Fkernel%2Fu-boot.git script: add the boot_script for rpi3 Add the boot_script for rpi3. It will load this boot script from ditro_bootcmd. Usage: $./tools/mkimage -A arm64 -T script -C none -n "Tizen RPI3 u-boot helper" -d ./board/raspberrypi/rpi/tizen-boot.scr ./boot.scr.uimg Change-Id: Ia468ee8ce4368c3776b8b9b48fb0d91c1d01db08 Signed-off-by: Jaehoon Chung --- diff --git a/board/raspberrypi/rpi/tizen-boot.scr b/board/raspberrypi/rpi/tizen-boot.scr new file mode 100644 index 0000000000..4475d583b4 --- /dev/null +++ b/board/raspberrypi/rpi/tizen-boot.scr @@ -0,0 +1,53 @@ +# U-boot script for tizen +boardname=rpi3 +mmcbootdev=0 +mmcbootpart=1 +mmcrootdev=0 +mmcrootpart=2 +mmcusrpart=5 + +dummy=0x24000000 +fotaname=fota + +ramdisksize=800000 + +# Normal ramdisk : partition 7 +# Ramdisk Recovery : Partition 8 +ramdiskdev=0 + +# Device that included the image. +bootdev=mmc + +if test -e $bootdev $mmcbootdev:$mmcusrpart $fotaname; then; +ramdiskpart=8 +bootmode=fota +else +ramdiskpart=7 +bootmode=normal +fi + +# Device for booting from ram0 +bootramdev=ram0 + +# Kernel image +kernel=Image +setenv fdtfile \"bcm2710-rpi-3-b.dtb\" +setenv boot_prefixes \"/\" + +# To use comdline for using serial console. /* Normal mode */ +setenv bootargs \"8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2709.serial=0xed6687d3 bcm2709.uart_clock=48000000 root=/dev/${bootramdev} rw bootmode=${bootmode} bcm2709.boardrev=0xa02082 rootwait earlyprintk console=ttyS0,115200n8 console=tty1 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000\" + +# Find the ramdisk offset and block count +part start $bootdev $ramdiskdev $ramdiskpart ramdisk_start +part size $bootdev $ramdiskdev $ramdiskpart ramdisk_size + +echo "Searching for kernel in"; for prefix in $boot_prefixes; do +if load $bootdev $mmcbootdev:$mmcbootpart $kernel_addr_r $kernel; then; + echo ${bootmode} "boot"; + load $bootdev $mmcbootdev:$mmcbootpart $fdt_addr_r $fdtfile; + load $bootdev $mmcbootdev:$mmcbootpart $kernel_addr_r $prefix$kernel; + echo "Loading Ramdisk from partition"${ramdiskpart}; + mmc read $ramdisk_addr_r $ramdisk_start $ramdisk_size; + booti $kernel_addr_r $ramdisk_addr_r:$ramdisksize $fdt_addr_r; +fi +done