rpi: tizen-boot: rpi3: pass network arguments on flash mode 60/195660/5 accepted/tizen/unified/20190104.061233 submit/tizen/20190102.053705 submit/tizen/20190102.221308 submit/tizen/20190103.040758
authorDongwoo Lee <dwoo08.lee@samsung.com>
Wed, 12 Dec 2018 08:19:40 +0000 (17:19 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 28 Dec 2018 08:17:17 +0000 (08:17 +0000)
To setup network environment for flash manager, this patch makes
passing parameters such as 'ipaddr', 'netmask', and 'gateway' through
kernel bootcmd.Those parameters can be assigned by user-self before
using flash mode.

Change-Id: Ifda261598978b4cc985fe43e2e612fd58c49fdd1
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
board/raspberrypi/rpi/tizen-boot-rpi3.scr

index 475a165..b347cc4 100644 (file)
@@ -57,6 +57,14 @@ if test -e $bootdev $mmcbootdev:$mmcinformpart $rebootparamfile; then;
        fi
 fi
 
+if test "${bootmode}" = "flash"; then;
+       if test -n "${ipaddr}"; then;
+               ip_opt=\"ip=${ipaddr}::${gateway}:${netmask}\"
+       else
+               ip_opt=\"ip=dhcp\"
+       fi
+fi
+
 # boot from ram0 if there is sbin
 if test -e $bootdev $mmcrootdev:$ramdiskpart sbin/init; then;
 rootdev=ram0
@@ -82,7 +90,7 @@ fi
 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 smsc95xx.macaddr=${ethaddr} root=/dev/${rootdev} rw bootmode=${bootmode} bcm2709.boardrev=0xa02082 rootwait ${console} vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 ${opts}\"
+setenv bootargs \"8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2709.serial=0xed6687d3 bcm2709.uart_clock=48000000 smsc95xx.macaddr=${ethaddr} root=/dev/${rootdev} rw bootmode=${bootmode} bcm2709.boardrev=0xa02082 rootwait ${console} vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 ${opts} ${ip_opt}\"
 
 # Find the ramdisk offset and block count
 part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start