All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv3] conf: Add extlinux.conf support on some 32bit platforms
@ 2021-06-28 18:06 Tom Rini
  2021-06-28 20:08 ` [meta-ti] " Denys Dmytriyenko
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2021-06-28 18:06 UTC (permalink / raw
  To: meta-ti

To make use of the "generic distro boot" support in U-Boot, an
extlinux.conf file needs to be generated and reside in the extlinux
directory.  The extlinux.conf file will be parsed by U-Boot and the
"append" line will be evaluated and expanded and used entirely as the
bootargs passed to the kernel.  Our generated extlinux.conf states
that the kernel image and device trees live one level up (so the root
directory) from it, so populate that location with our kernel and device
trees.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
Changes in v3:
- Merge in a number of other SoCs.
Changes in v2:
- Elaborate on how this feature works in the commit message.
---
 conf/machine/include/omap-a15.inc | 11 ++++++++++-
 conf/machine/include/ti33x.inc    | 11 ++++++++++-
 conf/machine/include/ti43x.inc    | 11 ++++++++++-
 3 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/conf/machine/include/omap-a15.inc b/conf/machine/include/omap-a15.inc
index e491d2b501f1..c95b0cccaa42 100644
--- a/conf/machine/include/omap-a15.inc
+++ b/conf/machine/include/omap-a15.inc
@@ -19,6 +19,15 @@ UBOOT_ARCH = "arm"
 UBOOT_ENTRYPOINT = "0x80008000"
 UBOOT_LOADADDRESS = "0x80008000"
 
+# Generate an extlinux.conf file
+UBOOT_EXTLINUX = "1"
+UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}"
+UBOOT_EXTLINUX_BOOT_FILES = " \
+    extlinux.conf;extlinux/extlinux.conf \
+    ${KERNEL_IMAGETYPE} \
+    ${KERNEL_DEVICETREE} \
+"
+
 SPL_BINARY = "MLO"
 UBOOT_SUFFIX = "img"
 
@@ -40,5 +49,5 @@ MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa etherne
 
 IMAGE_FSTYPES += "tar.xz wic.xz"
 WKS_FILE ?= "sdimage-2part.wks"
-IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX}"
+IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} ${UBOOT_EXTLINUX_BOOT_FILES}"
 do_image_wic[depends] += "u-boot:do_deploy"
diff --git a/conf/machine/include/ti33x.inc b/conf/machine/include/ti33x.inc
index 6dfda754e9dd..35e057d57497 100644
--- a/conf/machine/include/ti33x.inc
+++ b/conf/machine/include/ti33x.inc
@@ -43,6 +43,15 @@ UBOOT_MACHINE = "am335x_evm_config"
 UBOOT_ENTRYPOINT = "0x80008000"
 UBOOT_LOADADDRESS = "0x80008000"
 
+# Generate an extlinux.conf file
+UBOOT_EXTLINUX = "1"
+UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}"
+UBOOT_EXTLINUX_BOOT_FILES = " \
+    extlinux.conf;extlinux/extlinux.conf \
+    ${KERNEL_IMAGETYPE} \
+    ${KERNEL_DEVICETREE} \
+"
+
 SPL_BINARY = "MLO"
 UBOOT_SUFFIX = "img"
 
@@ -61,5 +70,5 @@ TI_PDK_LIMIT_BOARDS = "evmAM335x icev2AM335x iceAMIC110 bbbAM335x skAM335x"
 
 IMAGE_FSTYPES += "tar.xz wic.xz"
 WKS_FILE ?= "sdimage-2part.wks"
-IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX}"
+IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} ${UBOOT_EXTLINUX_BOOT_FILES}"
 do_image_wic[depends] += "virtual/bootloader:do_deploy"
diff --git a/conf/machine/include/ti43x.inc b/conf/machine/include/ti43x.inc
index b1a27f93a2a4..75b745b37839 100644
--- a/conf/machine/include/ti43x.inc
+++ b/conf/machine/include/ti43x.inc
@@ -40,6 +40,15 @@ UBOOT_MACHINE = "am43xx_evm_config"
 UBOOT_ENTRYPOINT = "0x80008000"
 UBOOT_LOADADDRESS = "0x80008000"
 
+# Generate an extlinux.conf file
+UBOOT_EXTLINUX = "1"
+UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}"
+UBOOT_EXTLINUX_BOOT_FILES = " \
+    extlinux.conf;extlinux/extlinux.conf \
+    ${KERNEL_IMAGETYPE} \
+    ${KERNEL_DEVICETREE} \
+"
+
 SPL_BINARY = "MLO"
 UBOOT_SUFFIX = "img"
 
@@ -58,5 +67,5 @@ TI_PDK_LIMIT_BOARDS = "evmAM437x idkAM437x skAM437x"
 
 IMAGE_FSTYPES += "tar.xz wic.xz"
 WKS_FILE ?= "sdimage-2part.wks"
-IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX}"
+IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} ${UBOOT_EXTLINUX_BOOT_FILES}"
 do_image_wic[depends] += "u-boot:do_deploy"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [meta-ti] [PATCHv3] conf: Add extlinux.conf support on some 32bit platforms
  2021-06-28 18:06 [PATCHv3] conf: Add extlinux.conf support on some 32bit platforms Tom Rini
@ 2021-06-28 20:08 ` Denys Dmytriyenko
  0 siblings, 0 replies; 2+ messages in thread
From: Denys Dmytriyenko @ 2021-06-28 20:08 UTC (permalink / raw
  To: Tom Rini; +Cc: meta-ti

On Mon, Jun 28, 2021 at 02:06:24PM -0400, Tom Rini wrote:
> To make use of the "generic distro boot" support in U-Boot, an
> extlinux.conf file needs to be generated and reside in the extlinux
> directory.  The extlinux.conf file will be parsed by U-Boot and the
> "append" line will be evaluated and expanded and used entirely as the
> bootargs passed to the kernel.  Our generated extlinux.conf states
> that the kernel image and device trees live one level up (so the root
> directory) from it, so populate that location with our kernel and device
> trees.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Reviewed-by: Denys Dmytriyenko <denys@konsulko.com>


> ---
> Changes in v3:
> - Merge in a number of other SoCs.
> Changes in v2:
> - Elaborate on how this feature works in the commit message.
> ---
>  conf/machine/include/omap-a15.inc | 11 ++++++++++-
>  conf/machine/include/ti33x.inc    | 11 ++++++++++-
>  conf/machine/include/ti43x.inc    | 11 ++++++++++-
>  3 files changed, 30 insertions(+), 3 deletions(-)
> 
> diff --git a/conf/machine/include/omap-a15.inc b/conf/machine/include/omap-a15.inc
> index e491d2b501f1..c95b0cccaa42 100644
> --- a/conf/machine/include/omap-a15.inc
> +++ b/conf/machine/include/omap-a15.inc
> @@ -19,6 +19,15 @@ UBOOT_ARCH = "arm"
>  UBOOT_ENTRYPOINT = "0x80008000"
>  UBOOT_LOADADDRESS = "0x80008000"
>  
> +# Generate an extlinux.conf file
> +UBOOT_EXTLINUX = "1"
> +UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}"
> +UBOOT_EXTLINUX_BOOT_FILES = " \
> +    extlinux.conf;extlinux/extlinux.conf \
> +    ${KERNEL_IMAGETYPE} \
> +    ${KERNEL_DEVICETREE} \
> +"
> +
>  SPL_BINARY = "MLO"
>  UBOOT_SUFFIX = "img"
>  
> @@ -40,5 +49,5 @@ MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa etherne
>  
>  IMAGE_FSTYPES += "tar.xz wic.xz"
>  WKS_FILE ?= "sdimage-2part.wks"
> -IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX}"
> +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} ${UBOOT_EXTLINUX_BOOT_FILES}"
>  do_image_wic[depends] += "u-boot:do_deploy"
> diff --git a/conf/machine/include/ti33x.inc b/conf/machine/include/ti33x.inc
> index 6dfda754e9dd..35e057d57497 100644
> --- a/conf/machine/include/ti33x.inc
> +++ b/conf/machine/include/ti33x.inc
> @@ -43,6 +43,15 @@ UBOOT_MACHINE = "am335x_evm_config"
>  UBOOT_ENTRYPOINT = "0x80008000"
>  UBOOT_LOADADDRESS = "0x80008000"
>  
> +# Generate an extlinux.conf file
> +UBOOT_EXTLINUX = "1"
> +UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}"
> +UBOOT_EXTLINUX_BOOT_FILES = " \
> +    extlinux.conf;extlinux/extlinux.conf \
> +    ${KERNEL_IMAGETYPE} \
> +    ${KERNEL_DEVICETREE} \
> +"
> +
>  SPL_BINARY = "MLO"
>  UBOOT_SUFFIX = "img"
>  
> @@ -61,5 +70,5 @@ TI_PDK_LIMIT_BOARDS = "evmAM335x icev2AM335x iceAMIC110 bbbAM335x skAM335x"
>  
>  IMAGE_FSTYPES += "tar.xz wic.xz"
>  WKS_FILE ?= "sdimage-2part.wks"
> -IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX}"
> +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} ${UBOOT_EXTLINUX_BOOT_FILES}"
>  do_image_wic[depends] += "virtual/bootloader:do_deploy"
> diff --git a/conf/machine/include/ti43x.inc b/conf/machine/include/ti43x.inc
> index b1a27f93a2a4..75b745b37839 100644
> --- a/conf/machine/include/ti43x.inc
> +++ b/conf/machine/include/ti43x.inc
> @@ -40,6 +40,15 @@ UBOOT_MACHINE = "am43xx_evm_config"
>  UBOOT_ENTRYPOINT = "0x80008000"
>  UBOOT_LOADADDRESS = "0x80008000"
>  
> +# Generate an extlinux.conf file
> +UBOOT_EXTLINUX = "1"
> +UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}"
> +UBOOT_EXTLINUX_BOOT_FILES = " \
> +    extlinux.conf;extlinux/extlinux.conf \
> +    ${KERNEL_IMAGETYPE} \
> +    ${KERNEL_DEVICETREE} \
> +"
> +
>  SPL_BINARY = "MLO"
>  UBOOT_SUFFIX = "img"
>  
> @@ -58,5 +67,5 @@ TI_PDK_LIMIT_BOARDS = "evmAM437x idkAM437x skAM437x"
>  
>  IMAGE_FSTYPES += "tar.xz wic.xz"
>  WKS_FILE ?= "sdimage-2part.wks"
> -IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX}"
> +IMAGE_BOOT_FILES ?= "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} ${UBOOT_EXTLINUX_BOOT_FILES}"
>  do_image_wic[depends] += "u-boot:do_deploy"
> -- 
> 2.17.1
> 

> 
> 
> 


-- 
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-28 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-28 18:06 [PATCHv3] conf: Add extlinux.conf support on some 32bit platforms Tom Rini
2021-06-28 20:08 ` [meta-ti] " Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.