diff mbox series

[master,3/4,v2] meta-ti-bsp: wic: Add a new GRUB config for TI platforms

Message ID 20250919093831.20609-4-m-shah@ti.com
State Superseded
Delegated to: Ryan Eatmon
Headers show
Series Add recipes to build initramfs image | expand

Commit Message

Moteen Shah Sept. 19, 2025, 9:38 a.m. UTC
Add a new grub config for TI specific platforms. While,
only supporting to boot linux from filesystem on MMCSD, it
will support booting linux and initrd image from eMMC, OSPI,
UFS later down the line. Hence, make a new config altogether
for easier development.

Signed-off-by: Moteen Shah <m-shah@ti.com>
---
 meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
 meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 meta-ti-bsp/wic/ti-grub.cfg

Comments

Ryan Eatmon Sept. 23, 2025, 9:15 p.m. UTC | #1
On 9/19/2025 4:38 AM, Moteen Shah wrote:
> Add a new grub config for TI specific platforms. While,
> only supporting to boot linux from filesystem on MMCSD, it
> will support booting linux and initrd image from eMMC, OSPI,
> UFS later down the line. Hence, make a new config altogether
> for easier development.
> 
> Signed-off-by: Moteen Shah <m-shah@ti.com>
> ---
>   meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
>   meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
>   2 files changed, 10 insertions(+), 1 deletion(-)
>   create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
> 
> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
> index ae38daa7..11912606 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 ${TI_WKS_BOOTLOADER_APPEND}"
> +bootloader --configfile="ti-grub.cfg"

Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for 
am64 to specify the serial console.  This likely needs to be better 
tested before we just make blanket changes like that.


>   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
> diff --git a/meta-ti-bsp/wic/ti-grub.cfg b/meta-ti-bsp/wic/ti-grub.cfg
> new file mode 100644
> index 00000000..b32b378f
> --- /dev/null
> +++ b/meta-ti-bsp/wic/ti-grub.cfg
> @@ -0,0 +1,9 @@
> +# Set timeout and default options
> +set timeout=3
> +set default=0
> +
> +# Main boot entry
> +menuentry "Boot Linux" {
> +    linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4
> +    initrd /initrd.cpio.xz

Change the name to ti-core-initramfs.cpio.xz to match the other changes 
from patch #2.

> +}
Andrew Davis Sept. 25, 2025, 5:23 p.m. UTC | #2
On 9/23/25 4:15 PM, Ryan Eatmon via lists.yoctoproject.org wrote:
> 
> 
> On 9/19/2025 4:38 AM, Moteen Shah wrote:
>> Add a new grub config for TI specific platforms. While,
>> only supporting to boot linux from filesystem on MMCSD, it
>> will support booting linux and initrd image from eMMC, OSPI,
>> UFS later down the line. Hence, make a new config altogether
>> for easier development.
>>
>> Signed-off-by: Moteen Shah <m-shah@ti.com>
>> ---
>>   meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
>>   meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
>>   2 files changed, 10 insertions(+), 1 deletion(-)
>>   create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
>>
>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
>> index ae38daa7..11912606 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 ${TI_WKS_BOOTLOADER_APPEND}"
>> +bootloader --configfile="ti-grub.cfg"
> 
> Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for am64 to specify the serial console.  This likely needs to be better tested before we just make blanket changes like that.
> 

Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in on the kernel
command line or you will not get kernel output. This is something we can pass to all
K3 boards (although not strictly needed for other boards, it is safe/correct to do
for them all). Non-K3 boards will want "console=ttyS0,115200n8" (note theS0). So
having this selectable per-SoC/family is still useful.

Andrew

> 
>>   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
>> diff --git a/meta-ti-bsp/wic/ti-grub.cfg b/meta-ti-bsp/wic/ti-grub.cfg
>> new file mode 100644
>> index 00000000..b32b378f
>> --- /dev/null
>> +++ b/meta-ti-bsp/wic/ti-grub.cfg
>> @@ -0,0 +1,9 @@
>> +# Set timeout and default options
>> +set timeout=3
>> +set default=0
>> +
>> +# Main boot entry
>> +menuentry "Boot Linux" {
>> +    linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4
>> +    initrd /initrd.cpio.xz
> 
> Change the name to ti-core-initramfs.cpio.xz to match the other changes from patch #2.
> 
>> +}
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#19057): https://lists.yoctoproject.org/g/meta-ti/message/19057
> Mute This Topic: https://lists.yoctoproject.org/mt/115325157/3619733
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [afd@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Raghavendra, Vignesh Sept. 29, 2025, 4:06 a.m. UTC | #3
On 25/09/25 22:53, Andrew Davis wrote:
> On 9/23/25 4:15 PM, Ryan Eatmon via lists.yoctoproject.org wrote:
>>
>>
>> On 9/19/2025 4:38 AM, Moteen Shah wrote:
>>> Add a new grub config for TI specific platforms. While,
>>> only supporting to boot linux from filesystem on MMCSD, it
>>> will support booting linux and initrd image from eMMC, OSPI,
>>> UFS later down the line. Hence, make a new config altogether
>>> for easier development.
>>>
>>> Signed-off-by: Moteen Shah <m-shah@ti.com>
>>> ---
>>>   meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
>>>   meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
>>>   2 files changed, 10 insertions(+), 1 deletion(-)
>>>   create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
>>>
>>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/
>>> wic/sdimage-2part-efi.wks.in
>>> index ae38daa7..11912606 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
>>> ${TI_WKS_BOOTLOADER_APPEND}"
>>> +bootloader --configfile="ti-grub.cfg"
>>
>> Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for
>> am64 to specify the serial console.  This likely needs to be better
>> tested before we just make blanket changes like that.
>>
> 
> Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in
> on the kernel
> command line or you will not get kernel output. This is something we can
> pass to all
> K3 boards (although not strictly needed for other boards, it is safe/
> correct to do
> for them all). 

> Non-K3 boards will want "console=ttyS0,115200n8" (note
> theS0). So
> having this selectable per-SoC/family is still useful.

AM62L would use  "console=ttyS0,115200n8" as well.


> 
> Andrew

[...]
Moteen Shah Sept. 29, 2025, 5:22 a.m. UTC | #4
Hey Ryan,

Thanks for the review.

On 24/09/25 02:45, Ryan Eatmon wrote:
>
>
> On 9/19/2025 4:38 AM, Moteen Shah wrote:
>> Add a new grub config for TI specific platforms. While,
>> only supporting to boot linux from filesystem on MMCSD, it
>> will support booting linux and initrd image from eMMC, OSPI,
>> UFS later down the line. Hence, make a new config altogether
>> for easier development.
>>
>> Signed-off-by: Moteen Shah <m-shah@ti.com>
>> ---
>>   meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
>>   meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
>>   2 files changed, 10 insertions(+), 1 deletion(-)
>>   create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
>>
>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in 
>> b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
>> index ae38daa7..11912606 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 
>> ${TI_WKS_BOOTLOADER_APPEND}"
>> +bootloader --configfile="ti-grub.cfg"
>
> Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for 
> am64 to specify the serial console.  This likely needs to be better 
> tested before we just make blanket changes like that.

I will include all that was originally there viz. 
${TI_WKS_BOOTLOADER_APPEND} in the grub.cfg, will that suffice?

>
>
>>   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
>> diff --git a/meta-ti-bsp/wic/ti-grub.cfg b/meta-ti-bsp/wic/ti-grub.cfg
>> new file mode 100644
>> index 00000000..b32b378f
>> --- /dev/null
>> +++ b/meta-ti-bsp/wic/ti-grub.cfg
>> @@ -0,0 +1,9 @@
>> +# Set timeout and default options
>> +set timeout=3
>> +set default=0
>> +
>> +# Main boot entry
>> +menuentry "Boot Linux" {
>> +    linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4
>> +    initrd /initrd.cpio.xz
>
> Change the name to ti-core-initramfs.cpio.xz to match the other 
> changes from patch #2.

Noted.

Regards,
Moteen

>
>
>> +}
>
Moteen Shah Sept. 29, 2025, 5:46 a.m. UTC | #5
Hey Vignesh and Andrew,

On 29/09/25 09:36, Vignesh Raghavendra wrote:
>
> On 25/09/25 22:53, Andrew Davis wrote:
>> On 9/23/25 4:15 PM, Ryan Eatmon via lists.yoctoproject.org wrote:
>>>
>>> On 9/19/2025 4:38 AM, Moteen Shah wrote:
>>>> Add a new grub config for TI specific platforms. While,
>>>> only supporting to boot linux from filesystem on MMCSD, it
>>>> will support booting linux and initrd image from eMMC, OSPI,
>>>> UFS later down the line. Hence, make a new config altogether
>>>> for easier development.
>>>>
>>>> Signed-off-by: Moteen Shah <m-shah@ti.com>
>>>> ---
>>>>    meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
>>>>    meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
>>>>    2 files changed, 10 insertions(+), 1 deletion(-)
>>>>    create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
>>>>
>>>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/
>>>> wic/sdimage-2part-efi.wks.in
>>>> index ae38daa7..11912606 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
>>>> ${TI_WKS_BOOTLOADER_APPEND}"
>>>> +bootloader --configfile="ti-grub.cfg"
>>> Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for
>>> am64 to specify the serial console.  This likely needs to be better
>>> tested before we just make blanket changes like that.
>>>
>> Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in
>> on the kernel
>> command line or you will not get kernel output. This is something we can
>> pass to all
>> K3 boards (although not strictly needed for other boards, it is safe/
>> correct to do
>> for them all).
>> Non-K3 boards will want "console=ttyS0,115200n8" (note
>> theS0). So
>> having this selectable per-SoC/family is still useful.
> AM62L would use  "console=ttyS0,115200n8" as well.

Don't we set console= property from the platform.env files in uboot?

Regards,
Moteen

>
>
>> Andrew
> [...]
>
Andrew Davis Sept. 29, 2025, 2:33 p.m. UTC | #6
On 9/29/25 12:46 AM, Moteen Shah wrote:
> Hey Vignesh and Andrew,
> 
> On 29/09/25 09:36, Vignesh Raghavendra wrote:
>>
>> On 25/09/25 22:53, Andrew Davis wrote:
>>> On 9/23/25 4:15 PM, Ryan Eatmon via lists.yoctoproject.org wrote:
>>>>
>>>> On 9/19/2025 4:38 AM, Moteen Shah wrote:
>>>>> Add a new grub config for TI specific platforms. While,
>>>>> only supporting to boot linux from filesystem on MMCSD, it
>>>>> will support booting linux and initrd image from eMMC, OSPI,
>>>>> UFS later down the line. Hence, make a new config altogether
>>>>> for easier development.
>>>>>
>>>>> Signed-off-by: Moteen Shah <m-shah@ti.com>
>>>>> ---
>>>>>    meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
>>>>>    meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
>>>>>    2 files changed, 10 insertions(+), 1 deletion(-)
>>>>>    create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
>>>>>
>>>>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/
>>>>> wic/sdimage-2part-efi.wks.in
>>>>> index ae38daa7..11912606 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
>>>>> ${TI_WKS_BOOTLOADER_APPEND}"
>>>>> +bootloader --configfile="ti-grub.cfg"
>>>> Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for
>>>> am64 to specify the serial console.  This likely needs to be better
>>>> tested before we just make blanket changes like that.
>>>>
>>> Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in
>>> on the kernel
>>> command line or you will not get kernel output. This is something we can
>>> pass to all
>>> K3 boards (although not strictly needed for other boards, it is safe/
>>> correct to do
>>> for them all).
>>> Non-K3 boards will want "console=ttyS0,115200n8" (note
>>> theS0). So
>>> having this selectable per-SoC/family is still useful.
>> AM62L would use  "console=ttyS0,115200n8" as well.
> 
> Don't we set console= property from the platform.env files in uboot?
> 

Yes, but that is passed to the kernel when using the normal boot flow,
for EFI boot the kernel command line is set here in the EFI config.

Andrew

> Regards,
> Moteen
> 
>>
>>
>>> Andrew
>> [...]
>>
Ryan Eatmon Sept. 29, 2025, 3:22 p.m. UTC | #7
On 9/29/2025 12:22 AM, Moteen Shah wrote:
> Hey Ryan,
> 
> Thanks for the review.
> 
> On 24/09/25 02:45, Ryan Eatmon wrote:
>>
>>
>> On 9/19/2025 4:38 AM, Moteen Shah wrote:
>>> Add a new grub config for TI specific platforms. While,
>>> only supporting to boot linux from filesystem on MMCSD, it
>>> will support booting linux and initrd image from eMMC, OSPI,
>>> UFS later down the line. Hence, make a new config altogether
>>> for easier development.
>>>
>>> Signed-off-by: Moteen Shah <m-shah@ti.com>
>>> ---
>>>   meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
>>>   meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
>>>   2 files changed, 10 insertions(+), 1 deletion(-)
>>>   create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
>>>
>>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/ 
>>> wic/sdimage-2part-efi.wks.in
>>> index ae38daa7..11912606 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 
>>> ${TI_WKS_BOOTLOADER_APPEND}"
>>> +bootloader --configfile="ti-grub.cfg"
>>
>> Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for 
>> am64 to specify the serial console.  This likely needs to be better 
>> tested before we just make blanket changes like that.
> 
> I will include all that was originally there viz. 
> ${TI_WKS_BOOTLOADER_APPEND} in the grub.cfg, will that suffice?

I doubt it.  Because the grub.cfg file will be installed and that 
variable will not be set anywhere.  But I could be wrong.  You would 
need to test it to be sure.


>>
>>
>>>   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
>>> diff --git a/meta-ti-bsp/wic/ti-grub.cfg b/meta-ti-bsp/wic/ti-grub.cfg
>>> new file mode 100644
>>> index 00000000..b32b378f
>>> --- /dev/null
>>> +++ b/meta-ti-bsp/wic/ti-grub.cfg
>>> @@ -0,0 +1,9 @@
>>> +# Set timeout and default options
>>> +set timeout=3
>>> +set default=0
>>> +
>>> +# Main boot entry
>>> +menuentry "Boot Linux" {
>>> +    linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4
>>> +    initrd /initrd.cpio.xz
>>
>> Change the name to ti-core-initramfs.cpio.xz to match the other 
>> changes from patch #2.
> 
> Noted.
> 
> Regards,
> Moteen
> 
>>
>>
>>> +}
>>
Moteen Shah Sept. 30, 2025, 8:25 a.m. UTC | #8
Hey Andrew,

On 29/09/25 20:03, Andrew Davis wrote:
> On 9/29/25 12:46 AM, Moteen Shah wrote:
>> Hey Vignesh and Andrew,
>>
>> On 29/09/25 09:36, Vignesh Raghavendra wrote:
>>>
>>> On 25/09/25 22:53, Andrew Davis wrote:
>>>> On 9/23/25 4:15 PM, Ryan Eatmon via lists.yoctoproject.org wrote:
>>>>>
>>>>> On 9/19/2025 4:38 AM, Moteen Shah wrote:
>>>>>> Add a new grub config for TI specific platforms. While,
>>>>>> only supporting to boot linux from filesystem on MMCSD, it
>>>>>> will support booting linux and initrd image from eMMC, OSPI,
>>>>>> UFS later down the line. Hence, make a new config altogether
>>>>>> for easier development.
>>>>>>
>>>>>> Signed-off-by: Moteen Shah <m-shah@ti.com>
>>>>>> ---
>>>>>>    meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
>>>>>>    meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
>>>>>>    2 files changed, 10 insertions(+), 1 deletion(-)
>>>>>>    create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
>>>>>>
>>>>>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/
>>>>>> wic/sdimage-2part-efi.wks.in
>>>>>> index ae38daa7..11912606 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
>>>>>> ${TI_WKS_BOOTLOADER_APPEND}"
>>>>>> +bootloader --configfile="ti-grub.cfg"
>>>>> Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for
>>>>> am64 to specify the serial console.  This likely needs to be better
>>>>> tested before we just make blanket changes like that.
>>>>>
>>>> Just a side note on this, AM64 needs "console=ttyS2,115200n8" 
>>>> passed in
>>>> on the kernel
>>>> command line or you will not get kernel output. This is something 
>>>> we can
>>>> pass to all
>>>> K3 boards (although not strictly needed for other boards, it is safe/
>>>> correct to do
>>>> for them all).
>>>> Non-K3 boards will want "console=ttyS0,115200n8" (note
>>>> theS0). So
>>>> having this selectable per-SoC/family is still useful.
>>> AM62L would use  "console=ttyS0,115200n8" as well.
>>
>> Don't we set console= property from the platform.env files in uboot?
>>
>
> Yes, but that is passed to the kernel when using the normal boot flow,
> for EFI boot the kernel command line is set here in the EFI config.
>
> Andrew

Currently, in my testing I am not passing any console= property in 
grub.cfg, but the prints still go to the right UART.
I think here, we are directly picking up from the stdout-path defined in 
the u-boot's device-tree. I will test on AM62l as well for the v3.

Regards,
Moteen

>
>> Regards,
>> Moteen
>>
>>>
>>>
>>>> Andrew
>>> [...]
>>>
>
Andrew Davis Sept. 30, 2025, 11:43 a.m. UTC | #9
On 9/30/25 3:25 AM, Moteen Shah wrote:
> Hey Andrew,
> 
> On 29/09/25 20:03, Andrew Davis wrote:
>> On 9/29/25 12:46 AM, Moteen Shah wrote:
>>> Hey Vignesh and Andrew,
>>>
>>> On 29/09/25 09:36, Vignesh Raghavendra wrote:
>>>>
>>>> On 25/09/25 22:53, Andrew Davis wrote:
>>>>> On 9/23/25 4:15 PM, Ryan Eatmon via lists.yoctoproject.org wrote:
>>>>>>
>>>>>> On 9/19/2025 4:38 AM, Moteen Shah wrote:
>>>>>>> Add a new grub config for TI specific platforms. While,
>>>>>>> only supporting to boot linux from filesystem on MMCSD, it
>>>>>>> will support booting linux and initrd image from eMMC, OSPI,
>>>>>>> UFS later down the line. Hence, make a new config altogether
>>>>>>> for easier development.
>>>>>>>
>>>>>>> Signed-off-by: Moteen Shah <m-shah@ti.com>
>>>>>>> ---
>>>>>>>    meta-ti-bsp/wic/sdimage-2part-efi.wks.in | 2 +-
>>>>>>>    meta-ti-bsp/wic/ti-grub.cfg              | 9 +++++++++
>>>>>>>    2 files changed, 10 insertions(+), 1 deletion(-)
>>>>>>>    create mode 100644 meta-ti-bsp/wic/ti-grub.cfg
>>>>>>>
>>>>>>> diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/
>>>>>>> wic/sdimage-2part-efi.wks.in
>>>>>>> index ae38daa7..11912606 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
>>>>>>> ${TI_WKS_BOOTLOADER_APPEND}"
>>>>>>> +bootloader --configfile="ti-grub.cfg"
>>>>>> Your change dropped the ${TI_WKS_BOOTLOADER_APPEND} which is used for
>>>>>> am64 to specify the serial console.  This likely needs to be better
>>>>>> tested before we just make blanket changes like that.
>>>>>>
>>>>> Just a side note on this, AM64 needs "console=ttyS2,115200n8" passed in
>>>>> on the kernel
>>>>> command line or you will not get kernel output. This is something we can
>>>>> pass to all
>>>>> K3 boards (although not strictly needed for other boards, it is safe/
>>>>> correct to do
>>>>> for them all).
>>>>> Non-K3 boards will want "console=ttyS0,115200n8" (note
>>>>> theS0). So
>>>>> having this selectable per-SoC/family is still useful.
>>>> AM62L would use  "console=ttyS0,115200n8" as well.
>>>
>>> Don't we set console= property from the platform.env files in uboot?
>>>
>>
>> Yes, but that is passed to the kernel when using the normal boot flow,
>> for EFI boot the kernel command line is set here in the EFI config.
>>
>> Andrew
> 
> Currently, in my testing I am not passing any console= property in grub.cfg, but the prints still go to the right UART.
> I think here, we are directly picking up from the stdout-path defined in the u-boot's device-tree. I will test on AM62l as well for the v3.

Try AM64x

Andrew

> 
> Regards,
> Moteen
> 
>>
>>> Regards,
>>> Moteen
>>>
>>>>
>>>>
>>>>> Andrew
>>>> [...]
>>>>
>>
diff mbox series

Patch

diff --git a/meta-ti-bsp/wic/sdimage-2part-efi.wks.in b/meta-ti-bsp/wic/sdimage-2part-efi.wks.in
index ae38daa7..11912606 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 ${TI_WKS_BOOTLOADER_APPEND}"
+bootloader --configfile="ti-grub.cfg"
 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
diff --git a/meta-ti-bsp/wic/ti-grub.cfg b/meta-ti-bsp/wic/ti-grub.cfg
new file mode 100644
index 00000000..b32b378f
--- /dev/null
+++ b/meta-ti-bsp/wic/ti-grub.cfg
@@ -0,0 +1,9 @@ 
+# Set timeout and default options
+set timeout=3
+set default=0
+
+# Main boot entry
+menuentry "Boot Linux" {
+    linux /Image root=/dev/disk/by-label/root rootwait rootfstype=ext4
+    initrd /initrd.cpio.xz
+}