From: Dongwoo Lee Date: Wed, 12 Dec 2018 08:19:40 +0000 (+0900) Subject: rpi: tizen-boot: rpi3: pass network arguments on flash mode X-Git-Tag: accepted/tizen/unified/20221108.163909~292 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1bdac990b86b9509881e1e02dec7af25ccd3931;p=platform%2Fkernel%2Fu-boot.git rpi: tizen-boot: rpi3: pass network arguments on flash mode 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 --- diff --git a/board/raspberrypi/rpi/tizen-boot-rpi3.scr b/board/raspberrypi/rpi/tizen-boot-rpi3.scr index 475a165..b347cc4 100644 --- a/board/raspberrypi/rpi/tizen-boot-rpi3.scr +++ b/board/raspberrypi/rpi/tizen-boot-rpi3.scr @@ -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