aboutsummaryrefslogtreecommitdiffstats
path: root/meta-netboot
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2017-11-07 18:44:34 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-11-30 16:49:57 +0000
commit95d4322ec6caa354b64586743cd7e3e6370c267f (patch)
tree4bf2cbe21fd857c8fd469c74d256ad95478435da /meta-netboot
parent274e29bb98464ed03dc13eede48bec71aa5dca89 (diff)
meta-netboot: enhance reference uboot config for R-Car Gen3
The provided config now allows to switch from netboot to sdcard boot at runtime by changing a uboot variable. Change-Id: I778f46f65ca007dbdd5ae070e946c04b7277ddeb Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/12213 Reviewed-by: Thomas Rini <trini@konsulko.com> Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-netboot')
-rw-r--r--meta-netboot/README.renesas-gen364
1 files changed, 42 insertions, 22 deletions
diff --git a/meta-netboot/README.renesas-gen3 b/meta-netboot/README.renesas-gen3
index 225051af2..496141eef 100644
--- a/meta-netboot/README.renesas-gen3
+++ b/meta-netboot/README.renesas-gen3
@@ -8,17 +8,43 @@ Adjust board type with the following identifiers:
################## Common options #####################
# these options are common to all configurations:
+##### board info
+
# choose board
setenv board m3ulcb
+setenv soc r8a7796
# or
setenv board h3ulcb
+setenv soc r8a7795
+
+##### boot mode
+# choose bootmode:
+# netboot
+setenv bootmode net
+# or sdcard
+setenv bootmode sd
+# or sdcard with initrd
+setenv bootmode sdi
+
+##### sdcard options
+# which sdcard slot to use
+setenv bootmmc '0:1'
+
+##### netboot options
+# replace <IP> and <NUM> by appropriate addresses
+setenv ipaddr '<board_IP>'
+setenv serverip '<server_IP>'
+setenv ethact ravb
+setenv ethaddr DE:AD:C0:FF:EE:<NUM>
+
+################## Internal variables #####################
# kernel file
setenv set_bootkfile 'setenv bootkfile Image'
setenv bootkaddr 0x48080000
# dtb file
-setenv set_bootdfile 'setenv bootdfile Image-r8a7796-${board}.dtb'
+setenv set_bootdfile 'setenv bootdfile Image-${soc}-${board}.dtb'
setenv bootdaddr 0x48000000
# initrd
@@ -31,40 +57,34 @@ setenv bootargs_console 'console=ttySC0,115200 ignore_loglevel'
setenv bootargs_video 'vmalloc=384M video=HDMI-A-1:1920x1080-32@60'
setenv bootargs_extra 'rw rootfstype=ext4 rootwait rootdelay=2'
+# final boot command
+setenv bootcmd 'run bootcmd_${bootmode}'
+
################ Boot on MMC (SDcard) #################
-setenv bootargs_root 'root=/dev/mmcblk1p1'
-setenv bootmmc '0:1'
setenv bootkload_sd 'ext4load mmc ${bootmmc} ${bootkaddr} boot/${bootkfile}'
+setenv bootiload_sd 'ext4load mmc ${bootmmc} ${bootiaddr} boot/${bootifile}'
setenv bootdload_sd 'ext4load mmc ${bootmmc} ${bootdaddr} boot/${bootdfile}'
-setenv bootload_sd 'run set_bootkfile; run bootkload_sd; run set_bootdfile; run bootdload_sd'
-setenv bootcmd 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra}; run bootload_sd; booti ${bootkaddr} - ${bootdaddr}'
-################ Boot on MMC (SDcard) with initrd ######
-
-setenv bootargs_root 'root=/dev/ram0 ramdisk_size=16384'
-setenv bootmmc '0:1'
-setenv bootkload_sd 'ext4load mmc ${bootmmc} ${bootkaddr} boot/${bootkfile}'
-setenv bootdload_sd 'ext4load mmc ${bootmmc} ${bootdaddr} boot/${bootdfile}'
-setenv bootiload_sd 'ext4load mmc ${bootmmc} ${bootiaddr} boot/${bootifile}'
-setenv bootload_sd 'run set_bootkfile; run bootkload_sd; run set_bootdfile; run bootdload_sd; run set_bootifile; run bootiload_sd'
+# without initrd
+setenv bootargs_root_sd 'root=/dev/mmcblk1p1'
+setenv bootload_sd 'run set_bootkfile; run bootkload_sd; run set_bootdfile; run bootdload_sd'
+setenv bootcmd_sd 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root_sd} ${bootargs_extra}; run bootload_sd; booti ${bootkaddr} - ${bootdaddr}'
-setenv bootcmd 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra}; run bootload_sd; booti ${bootkaddr} ${bootiaddr}:${bootisize} ${bootdaddr}'
+# with initrd
+setenv bootargs_root_sdi 'root=/dev/ram0 ramdisk_size=16384'
+setenv bootload_sdi 'run set_bootkfile; run bootkload_sd; run set_bootdfile; run bootdload_sd; run set_bootifile; run bootiload_sd'
+setenv bootcmd_sdi 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root_sdi} ${bootargs_extra}; run bootload_sdi; booti ${bootkaddr} ${bootiaddr}:${bootisize} ${bootdaddr}'
################ Netboot through TFTP+NBD ##################
-# replace <IP> addresses by appropriate addresses
-setenv ipaddr '<board_IP>'
-setenv serverip '<server_IP>'
-setenv ethact ravb
-setenv ethaddr DE:AD:C0:FF:EE:01
-
-setenv bootargs_root 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp'
setenv bootkload_net 'tftp ${bootkaddr} ${board}/${bootkfile}'
setenv bootdload_net 'tftp ${bootdaddr} ${board}/${bootdfile}'
setenv bootiload_net 'tftp ${bootiaddr} ${board}/${bootifile}'
+
+setenv bootargs_root_net 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp'
setenv bootload_net 'run set_bootkfile; run bootkload_net; run set_bootdfile; run bootdload_net; run set_bootifile; run bootiload_net'
-setenv bootcmd 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run bootload_net; booti ${bootkaddr} ${bootiaddr}:${bootisize} ${bootdaddr}'
+setenv bootcmd_net 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root_net} ${bootargs_extra} nbd.server=${serverip}; run bootload_net; booti ${bootkaddr} ${bootiaddr}:${bootisize} ${bootdaddr}'