diff mbox series

[meta-ti,master/scarthgap] wic: sdimage-2part-efi: Add variable for adding bootloader options

Message ID 20250213165338.11294-1-reatmon@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [meta-ti,master/scarthgap] wic: sdimage-2part-efi: Add variable for adding bootloader options | expand

Commit Message

Ryan Eatmon Feb. 13, 2025, 4:53 p.m. UTC
We have a need for some platforms to add kernel options to the bootloader
during wic creation time.  Create a new variable and add that to the
sdimage-2part-efi.wks.in file so that a machine can override it if
needed.

Add an override for am64 to point the kernel at console=ttyS2.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 meta-ti-bsp/conf/machine/include/am64xx.inc | 2 ++
 meta-ti-bsp/conf/machine/include/k3.inc     | 2 ++
 meta-ti-bsp/wic/sdimage-2part-efi.wks.in    | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

Comments

Denys Dmytriyenko Feb. 14, 2025, 11:14 p.m. UTC | #1
On Thu, Feb 13, 2025 at 10:53:38AM -0600, Ryan Eatmon via lists.yoctoproject.org wrote:
> We have a need for some platforms to add kernel options to the bootloader
> during wic creation time.  Create a new variable and add that to the
> sdimage-2part-efi.wks.in file so that a machine can override it if
> needed.
> 
> Add an override for am64 to point the kernel at console=ttyS2.
> 
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> ---
>  meta-ti-bsp/conf/machine/include/am64xx.inc | 2 ++
>  meta-ti-bsp/conf/machine/include/k3.inc     | 2 ++
>  meta-ti-bsp/wic/sdimage-2part-efi.wks.in    | 2 +-
>  3 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-ti-bsp/conf/machine/include/am64xx.inc b/meta-ti-bsp/conf/machine/include/am64xx.inc
> index 49e996c8..56b56afe 100644
> --- a/meta-ti-bsp/conf/machine/include/am64xx.inc
> +++ b/meta-ti-bsp/conf/machine/include/am64xx.inc
> @@ -34,3 +34,5 @@ TFA_BOARD = "lite"
>  OPTEEMACHINE = "k3-am64x"
>  
>  MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "prueth-fw pruhsr-fw prusw-fw"
> +
> +TI_WKS_BOOTLOADER_APPEND="console=ttyS2,115200n8"

BTW, no whitespace around the assignment operators will be giving a QA warning 
some time soon... OE-Core has been cleaned up recently:
https://git.openembedded.org/openembedded-core/commit/?id=30ea609d3357fb3de911f2f6a5e6856c151b976a


> diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc
> index dd3cbeca..faf820a0 100644
> --- a/meta-ti-bsp/conf/machine/include/k3.inc
> +++ b/meta-ti-bsp/conf/machine/include/k3.inc
> @@ -55,6 +55,8 @@ MACHINE_FEATURES += "efi"
>  
>  WKS_FILE ?= "${@bb.utils.contains("MACHINE_FEATURES", "efi", "sdimage-2part-efi.wks.in", "sdimage-2part.wks", d)}"
>  
> +TI_WKS_BOOTLOADER_APPEND ?= ""
> +
>  do_image_wic[depends] += "virtual/bootloader:do_deploy"
>  
>  SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS2"
> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
> index ca042be1..ae38daa7 100644
> --- a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
> +++ b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
> @@ -3,6 +3,6 @@
>  # supports EFI.  Boot files are located in the first vfat partition with extra
>  # reserved space.  We cannot use a GPT here.
>  
> -bootloader --timeout=3 --append="rootfstype=ext4"
> +bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}"
>  part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M
>  part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
> -- 
> 2.17.1
Ryan Eatmon Feb. 17, 2025, 3:17 p.m. UTC | #2
On 2/14/2025 5:14 PM, Denys Dmytriyenko wrote:
> On Thu, Feb 13, 2025 at 10:53:38AM -0600, Ryan Eatmon via lists.yoctoproject.org wrote:
>> We have a need for some platforms to add kernel options to the bootloader
>> during wic creation time.  Create a new variable and add that to the
>> sdimage-2part-efi.wks.in file so that a machine can override it if
>> needed.
>>
>> Add an override for am64 to point the kernel at console=ttyS2.
>>
>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>> ---
>>   meta-ti-bsp/conf/machine/include/am64xx.inc | 2 ++
>>   meta-ti-bsp/conf/machine/include/k3.inc     | 2 ++
>>   meta-ti-bsp/wic/sdimage-2part-efi.wks.in    | 2 +-
>>   3 files changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta-ti-bsp/conf/machine/include/am64xx.inc b/meta-ti-bsp/conf/machine/include/am64xx.inc
>> index 49e996c8..56b56afe 100644
>> --- a/meta-ti-bsp/conf/machine/include/am64xx.inc
>> +++ b/meta-ti-bsp/conf/machine/include/am64xx.inc
>> @@ -34,3 +34,5 @@ TFA_BOARD = "lite"
>>   OPTEEMACHINE = "k3-am64x"
>>   
>>   MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "prueth-fw pruhsr-fw prusw-fw"
>> +
>> +TI_WKS_BOOTLOADER_APPEND="console=ttyS2,115200n8"
> 
> BTW, no whitespace around the assignment operators will be giving a QA warning
> some time soon... OE-Core has been cleaned up recently:
> https://git.openembedded.org/openembedded-core/commit/?id=30ea609d3357fb3de911f2f6a5e6856c151b976a

I figure I'll do a mass clean up of all of our files by script.


> 
>> diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc
>> index dd3cbeca..faf820a0 100644
>> --- a/meta-ti-bsp/conf/machine/include/k3.inc
>> +++ b/meta-ti-bsp/conf/machine/include/k3.inc
>> @@ -55,6 +55,8 @@ MACHINE_FEATURES += "efi"
>>   
>>   WKS_FILE ?= "${@bb.utils.contains("MACHINE_FEATURES", "efi", "sdimage-2part-efi.wks.in", "sdimage-2part.wks", d)}"
>>   
>> +TI_WKS_BOOTLOADER_APPEND ?= ""
>> +
>>   do_image_wic[depends] += "virtual/bootloader:do_deploy"
>>   
>>   SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS2"
>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
>> index ca042be1..ae38daa7 100644
>> --- a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
>> +++ b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
>> @@ -3,6 +3,6 @@
>>   # supports EFI.  Boot files are located in the first vfat partition with extra
>>   # reserved space.  We cannot use a GPT here.
>>   
>> -bootloader --timeout=3 --append="rootfstype=ext4"
>> +bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}"
>>   part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M
>>   part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
>> -- 
>> 2.17.1
diff mbox series

Patch

diff --git a/meta-ti-bsp/conf/machine/include/am64xx.inc b/meta-ti-bsp/conf/machine/include/am64xx.inc
index 49e996c8..56b56afe 100644
--- a/meta-ti-bsp/conf/machine/include/am64xx.inc
+++ b/meta-ti-bsp/conf/machine/include/am64xx.inc
@@ -34,3 +34,5 @@  TFA_BOARD = "lite"
 OPTEEMACHINE = "k3-am64x"
 
 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "prueth-fw pruhsr-fw prusw-fw"
+
+TI_WKS_BOOTLOADER_APPEND="console=ttyS2,115200n8"
diff --git a/meta-ti-bsp/conf/machine/include/k3.inc b/meta-ti-bsp/conf/machine/include/k3.inc
index dd3cbeca..faf820a0 100644
--- a/meta-ti-bsp/conf/machine/include/k3.inc
+++ b/meta-ti-bsp/conf/machine/include/k3.inc
@@ -55,6 +55,8 @@  MACHINE_FEATURES += "efi"
 
 WKS_FILE ?= "${@bb.utils.contains("MACHINE_FEATURES", "efi", "sdimage-2part-efi.wks.in", "sdimage-2part.wks", d)}"
 
+TI_WKS_BOOTLOADER_APPEND ?= ""
+
 do_image_wic[depends] += "virtual/bootloader:do_deploy"
 
 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS2"
diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
index ca042be1..ae38daa7 100644
--- a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
+++ b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
@@ -3,6 +3,6 @@ 
 # supports EFI.  Boot files are located in the first vfat partition with extra
 # reserved space.  We cannot use a GPT here.
 
-bootloader --timeout=3 --append="rootfstype=ext4"
+bootloader --timeout=3 --append="rootfstype=ext4 ${TI_WKS_BOOTLOADER_APPEND}"
 part --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --fstype=vfat --label boot --active --align 1024 --use-uuid --fixed-size 128M
 part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid