From b0cb0935aef4ced9c82d7972ed61f636e9036055 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 27 Dec 2016 00:44:55 +0000 Subject: Fix to get netboot activated also for renesas gen3 Change-Id: I9b512a907398de9c96dc46111c74bed4059f7b8e Signed-off-by: Romain Forlot --- meta-netboot/README | 22 ++++++++ meta-netboot/README.porter | 41 -------------- meta-netboot/README.renesas-gen3 | 64 ++++++++++++++++++++++ meta-netboot/README.renesas-porter | 41 ++++++++++++++ meta-netboot/conf/layer.conf | 3 + .../recipes-kernel/linux/linux-yocto_%.bbappend | 2 +- 6 files changed, 131 insertions(+), 42 deletions(-) delete mode 100644 meta-netboot/README.porter create mode 100644 meta-netboot/README.renesas-gen3 create mode 100644 meta-netboot/README.renesas-porter (limited to 'meta-netboot') diff --git a/meta-netboot/README b/meta-netboot/README index 130477751..c1bb6a164 100644 --- a/meta-netboot/README +++ b/meta-netboot/README @@ -62,3 +62,25 @@ saveenv # optional: saves env in flash run bootcmd # boots the board, executed automatically after power up ------------------------------------------------------------------ +About Renesas Gen3 board, u-boot is updated and environment is more like : + +------------------------------------------------------------------ +setenv bootargs_console 'console=ttySC0,115200 ignore_loglevel' +setenv bootargs_extra 'rw rootfstype=ext4 rootwait rootdelay=2' +setenv bootargs_root 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp' +setenv bootargs_video 'vmalloc=384M video=HDMI-A-1:1920x1080-32@60' +setenv serverip '' +setenv 'bootdaddr' '0x48000000' +setenv 'bootdfile' 'Image-r8a7795-h3ulcb.dtb' +setenv 'bootdload_net' 'tftp ${bootdaddr} h3ulcb/${bootdfile}' +setenv 'bootkaddr' '0x48080000' +setenv 'bootkfile' 'Image' +setenv 'bootkload_net' 'tftp ${bootkaddr} h3ulcb/${bootkfile}' +setenv 'bootiaddr' '0x5C3F9520' +setenv 'bootifile' 'initramfs-netboot-image-h3ulcb.ext4.gz' +setenv 'bootiload_net' 'tftp ${bootraddr} h3ulcb/${bootrfile}' +setenv 'load_net' 'run bootkload_net; run bootdload_net; run bootiload_net; setenv initrd_size ${filesize}' + +setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run load_net; booti ${bootkaddr} ${bootiaddr}:${initrd_size} ${bootdaddr}' +------------------------------------------------------------------ + diff --git a/meta-netboot/README.porter b/meta-netboot/README.porter deleted file mode 100644 index 7ab0803fb..000000000 --- a/meta-netboot/README.porter +++ /dev/null @@ -1,41 +0,0 @@ -Below are the environment variables that can be set in the u-boot console to boot the porter board in various configurations - -################## Common options ##################### -# these options are common to all configurations: - -setenv 'bootkfile' 'uImage+dtb' -setenv 'bootkaddr' '0x40007fc0' - -setenv 'bootifile' 'initramfs-netboot-image-porter.ext4.gz.u-boot' -setenv 'bootiaddr' '0x50000000' - -setenv 'bootargs_console' 'console=ttySC6,38400 ignore_loglevel' -setenv 'bootargs_video' 'vmalloc=384M video=HDMI-A-1:1280x960-32@60' -setenv 'bootargs_extra' 'rw rootfstype=ext4 rootwait rootdelay=2' - -################ Boot on MMC (SDcard) ################# - -setenv 'bootargs_root' 'root=/dev/mmcblk0p1' -setenv 'bootmmc' '1:1' -setenv 'bootkload_sd' 'ext4load mmc ${bootmmc} ${bootkaddr} boot/${bootkfile}' -setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; bootm ${bootkaddr}' - -################ Boot on MMC (SDcard) with initrd ###### - -setenv 'bootargs_root' 'root=/dev/ram0 ramdisk_size=16384' -setenv 'bootmmc' '1:1' -setenv 'bootkload_sd' 'ext4load mmc ${bootmmc} ${bootkaddr} boot/${bootkfile}' -setenv 'bootiload_sd' 'ext4load mmc ${bootmmc} ${bootiaddr} boot/${bootifile}' -setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; run bootiload_sd; bootm ${bootkaddr} ${bootiaddr}' - -################ Netboot through TFTP+NBD ################## -# replace addresses by appropriate addresses - -setenv 'ipaddr' '' -setenv 'serverip' '' - -setenv 'bootargs_root' 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp' -setenv 'bootkload_net' 'tftp ${bootkaddr} porter/${bootkfile}' -setenv 'bootiload_net' 'tftp ${bootiaddr} porter/${bootifile}' -setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run bootkload_net; run bootiload_net; bootm ${bootkaddr} ${bootiaddr}' - diff --git a/meta-netboot/README.renesas-gen3 b/meta-netboot/README.renesas-gen3 new file mode 100644 index 000000000..00c938bba --- /dev/null +++ b/meta-netboot/README.renesas-gen3 @@ -0,0 +1,64 @@ +Below are the environment variables that can be set in the u-boot console to boot the porter board in various configurations + +################## Gen3 options ##################### +# these options are common to Renesas Gen3 configurations, take care which board +# you are using (h3ulcb, m3ulcb, salvator...): + +setenv 'bootkfile' 'Image' +setenv 'bootkaddr' '0x48080000' + +# For h3ulcb +setenv 'bootdfile' 'Image-r8a7795-h3ulcb.dtb' +# For m3ulcb +setenv 'bootdfile' 'Image-r8a7796-m3ulcb.dtb' +setenv 'bootdaddr' '0x48000000' + +# For h3ulcb +setenv 'bootifile' 'initramfs-netboot-image-h3ulcb.ext4.gz' +# For m3ulcb +setenv 'bootifile' 'initramfs-netboot-image-m3ulcb.ext4.gz' + +setenv 'bootiaddr' '0x5C3F9520' + +setenv 'bootargs_console' 'console=ttySC0,115200 ignore_loglevel' +setenv 'bootargs_video' 'vmalloc=384M video=HDMI-A-1:1280x960-32@60' +setenv 'bootargs_extra' 'rw rootfstype=ext4 rootwait rootdelay=2' + +################ Boot on MMC (SDcard) ################# + +setenv 'bootargs_root' 'root=/dev/mmcblk1p1' +setenv 'bootmmc' '0:1' +setenv 'load_ker' 'ext4load mmc 0:1 ${bootkaddr} /boot/${bootkfile}' +setenv 'load_dtb' 'ext4load mmc 0:1 ${bootdaddr} /boot/${bootdfile}' +setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; booti ${bootkaddr} - ${bootdaddr}' + +################ Boot on MMC (SDcard) with initrd ###### + +setenv 'bootargs_root' 'root=/dev/ram0 ramdisk_size=16384' +setenv 'bootmmc' '1:1' +setenv 'bootkload_sd' 'ext4load mmc ${bootmmc} ${bootkaddr} boot/${bootkfile}' +setenv 'bootiload_sd' 'ext4load mmc ${bootmmc} ${bootiaddr} boot/${bootifile}' +setenv 'load_dtb' 'ext4load mmc 0:1 ${bootdaddr} /boot/${bootdfile}' +setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; run bootiload_sd; setenv initrd_size ${filesize}; booti ${bootkaddr} ${bootiaddr}:${initrd_size} ${bootdaddr}' + +################ Netboot through TFTP+NBD ################## +# replace addresses by appropriate addresses. Example about h3ulcb +# PLEASE ADJUST TO YOUR BOARD + +setenv 'ipaddr' '' +setenv 'serverip' '' + +setenv 'bootargs_root' 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp' +setenv 'bootdaddr' '0x48000000' +setenv 'bootdfile' 'Image-r8a7795-h3ulcb.dtb' +setenv 'bootdload_net' 'tftp ${bootdaddr} h3ulcb/${bootdfile}' +setenv 'bootkaddr' '0x48080000' +setenv 'bootkfile' 'Image' +setenv 'bootkload_net' 'tftp ${bootkaddr} h3ulcb/${bootkfile}' +setenv 'bootiaddr' '0x5C3F9520' +setenv 'bootifile' 'initramfs-netboot-image-h3ulcb.ext4.gz' +setenv 'bootiload_net' 'tftp ${bootraddr} h3ulcb/${bootrfile}' +setenv 'load_net' 'run bootkload_net; run bootdload_net; run bootiload_net; setenv initrd_size ${filesize}' + +setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run load_net; booti ${bootkaddr} ${bootiaddr}:${initrd_size} ${bootdaddr}' + diff --git a/meta-netboot/README.renesas-porter b/meta-netboot/README.renesas-porter new file mode 100644 index 000000000..7ab0803fb --- /dev/null +++ b/meta-netboot/README.renesas-porter @@ -0,0 +1,41 @@ +Below are the environment variables that can be set in the u-boot console to boot the porter board in various configurations + +################## Common options ##################### +# these options are common to all configurations: + +setenv 'bootkfile' 'uImage+dtb' +setenv 'bootkaddr' '0x40007fc0' + +setenv 'bootifile' 'initramfs-netboot-image-porter.ext4.gz.u-boot' +setenv 'bootiaddr' '0x50000000' + +setenv 'bootargs_console' 'console=ttySC6,38400 ignore_loglevel' +setenv 'bootargs_video' 'vmalloc=384M video=HDMI-A-1:1280x960-32@60' +setenv 'bootargs_extra' 'rw rootfstype=ext4 rootwait rootdelay=2' + +################ Boot on MMC (SDcard) ################# + +setenv 'bootargs_root' 'root=/dev/mmcblk0p1' +setenv 'bootmmc' '1:1' +setenv 'bootkload_sd' 'ext4load mmc ${bootmmc} ${bootkaddr} boot/${bootkfile}' +setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; bootm ${bootkaddr}' + +################ Boot on MMC (SDcard) with initrd ###### + +setenv 'bootargs_root' 'root=/dev/ram0 ramdisk_size=16384' +setenv 'bootmmc' '1:1' +setenv 'bootkload_sd' 'ext4load mmc ${bootmmc} ${bootkaddr} boot/${bootkfile}' +setenv 'bootiload_sd' 'ext4load mmc ${bootmmc} ${bootiaddr} boot/${bootifile}' +setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra}; run bootkload_sd; run bootiload_sd; bootm ${bootkaddr} ${bootiaddr}' + +################ Netboot through TFTP+NBD ################## +# replace addresses by appropriate addresses + +setenv 'ipaddr' '' +setenv 'serverip' '' + +setenv 'bootargs_root' 'root=/dev/ram0 ramdisk_size=16384 ip=dhcp' +setenv 'bootkload_net' 'tftp ${bootkaddr} porter/${bootkfile}' +setenv 'bootiload_net' 'tftp ${bootiaddr} porter/${bootifile}' +setenv 'bootcmd' 'setenv bootargs ${bootargs_console} ${bootargs_video} ${bootargs_root} ${bootargs_extra} nbd.server=${serverip}; run bootkload_net; run bootiload_net; bootm ${bootkaddr} ${bootiaddr}' + diff --git a/meta-netboot/conf/layer.conf b/meta-netboot/conf/layer.conf index 4077e6d66..324f1f1bb 100644 --- a/meta-netboot/conf/layer.conf +++ b/meta-netboot/conf/layer.conf @@ -1,3 +1,6 @@ +# Added for futur conditionnals tests +DISTRO_FEATURES_append = " netboot" + # We have a conf and classes directory, add to BBPATH BBPATH .= ":${LAYERDIR}" diff --git a/meta-netboot/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-netboot/recipes-kernel/linux/linux-yocto_%.bbappend index 88f244122..f20d57a22 100644 --- a/meta-netboot/recipes-kernel/linux/linux-yocto_%.bbappend +++ b/meta-netboot/recipes-kernel/linux/linux-yocto_%.bbappend @@ -1,6 +1,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" # Extra configuration options for NBD support and netboot over RAMFS -SRC_URI += "file://nbd.cfg \ +SRC_URI_append = " file://nbd.cfg \ file://ramdisk.cfg \ " -- cgit 1.2.3-korg