Skip to contentSkip to conversation

CONFIG_MIPS_BOOT_CMDLINE_LEGACY usage ?

U-Boot Stefan Roese 2 participants 5 messages Aug 15, 2018

lore
Share & tools
lore
#0 lore raw

Hi Daniel,

I'm wondering about the CONFIG_MIPS_BOOT_CMDLINE_LEGACY Kconfig option in MIPS. Why is this one called "legacy" and what should be used instead to pass the U-Boot bootargs to the Linux kernel?

Thanks,
Stefan

#1 lore raw

Hi Stefan,

Quoted 8 lines · Stefan Roese

Hi Daniel,

I'm wondering about the CONFIG_MIPS_BOOT_CMDLINE_LEGACY Kconfig option in MIPS. Why is this one called "legacy" and what should be used instead to pass the U-Boot bootargs to the Linux kernel?

Thanks,
Stefan

This interface was initially added to U-Boot with MIPS support and is copied from the MIPS Yamon bootloader. Dependent on the platform and the used bootloader there are more different boot interfaces.

The modern way to boot a kernel on MIPS would be to add a DTB to the kernel FIT image and let U-Boot pass it over to the kernel (CONFIG_MIPS_BOOT_FDT). All bootargs would then be added automatically to the /chosen/bootargs node. This interface is conformant with the MIPS UHI boot protocol. The kernel supports this in a generic way. The PROM code of a platform only needs to evaluate the fw_passed_dtb variable for a DTB address. In your case the Ralink platform supports this.

But you still have the flexibility to use a DTB built-in or appended to the kernel and pass the bootargs in the traditional way. The kernel has various config options to select the source of bootargs.

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180815/960dba93/attachment.sig>
#2 lore raw

Hi Daniel,

Quoted 22 lines · Daniel Schwierzeck
Quoted 8 lines · Stefan Roese

Hi Daniel,

I'm wondering about the CONFIG_MIPS_BOOT_CMDLINE_LEGACY Kconfig option in MIPS. Why is this one called "legacy" and what should be used instead to pass the U-Boot bootargs to the Linux kernel?

Thanks,
Stefan

This interface was initially added to U-Boot with MIPS support and is copied from the MIPS Yamon bootloader. Dependent on the platform and the used bootloader there are more different boot interfaces.

The modern way to boot a kernel on MIPS would be to add a DTB to the kernel FIT image and let U-Boot pass it over to the kernel (CONFIG_MIPS_BOOT_FDT). All bootargs would then be added automatically to the /chosen/bootargs node. This interface is conformant with the MIPS UHI boot protocol. The kernel supports this in a generic way. The PROM code of a platform only needs to evaluate the fw_passed_dtb variable for a DTB address. In your case the Ralink platform supports this.

Quoted 3 lines

But you still have the flexibility to use a DTB built-in or appended to the kernel and pass the bootargs in the traditional way. The kernel has various config options to select the source of bootargs.

I see. Thanks for the detailed answer. We'll move over to passing via DT once this is ready in Linux. Until then, we will use this legacy interface.

Thanks,
Stefan

#3 lore raw
Quoted 25 lines · Stefan Roese

Hi Daniel,

Quoted 22 lines · Daniel Schwierzeck
Quoted 8 lines · Stefan Roese

Hi Daniel,

I'm wondering about the CONFIG_MIPS_BOOT_CMDLINE_LEGACY Kconfig option in MIPS. Why is this one called "legacy" and what should be used instead to pass the U-Boot bootargs to the Linux kernel?

Thanks,
Stefan

This interface was initially added to U-Boot with MIPS support and is copied from the MIPS Yamon bootloader. Dependent on the platform and the used bootloader there are more different boot interfaces.

The modern way to boot a kernel on MIPS would be to add a DTB to the kernel FIT image and let U-Boot pass it over to the kernel (CONFIG_MIPS_BOOT_FDT). All bootargs would then be added automatically to the /chosen/bootargs node. This interface is conformant with the MIPS UHI boot protocol. The kernel supports this in a generic way. The PROM code of a platform only needs to evaluate the fw_passed_dtb variable for a DTB address. In your case the Ralink platform supports this.

Quoted 8 lines
Quoted 3 lines

But you still have the flexibility to use a DTB built-in or appended to the kernel and pass the bootargs in the traditional way. The kernel has various config options to select the source of bootargs.

I see. Thanks for the detailed answer. We'll move over to passing via DT once this is ready in Linux. Until then, we will use this legacy interface.

DT handover is already supported for Ralink/mMediatek platform, see [1]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/ralink/of.c#n78

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180815/e1296609/attachment.sig>
#4 lore raw
Quoted 32 lines · Daniel Schwierzeck
Quoted 29 lines · Stefan Roese

Hi Daniel,

Quoted 25 lines · Daniel Schwierzeck
Quoted 8 lines · Stefan Roese

Hi Daniel,

I'm wondering about the CONFIG_MIPS_BOOT_CMDLINE_LEGACY Kconfig option in MIPS. Why is this one called "legacy" and what should be used instead to pass the U-Boot bootargs to the Linux kernel?

Thanks,
Stefan

This interface was initially added to U-Boot with MIPS support and is copied from the MIPS Yamon bootloader. Dependent on the platform and the used bootloader there are more different boot interfaces.

The modern way to boot a kernel on MIPS would be to add a DTB to the kernel FIT image and let U-Boot pass it over to the kernel (CONFIG_MIPS_BOOT_FDT). All bootargs would then be added automatically to the /chosen/bootargs node. This interface is conformant with the MIPS UHI boot protocol. The kernel supports this in a generic way. The PROM code of a platform only needs to evaluate the fw_passed_dtb variable for a DTB address. In your case the Ralink platform supports this.

But you still have the flexibility to use a DTB built-in or appended to the kernel and pass the bootargs in the traditional way. The kernel has various config options to select the source of bootargs.

Quoted 8 lines
Quoted 4 lines

I see. Thanks for the detailed answer. We'll move over to passing via DT once this is ready in Linux. Until then, we will use this legacy interface.

DT handover is already supported for Ralink/mMediatek platform, see [1]

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/ralink/of.c#n78

Right, thanks. I was more referring to the fact, that the current Linux target we are using is not using an separate DT blob. Its no big deal to add this though and we will do this soon.

Thanks,
Stefan