TexasInstruments / ti-bdebstrap

Build custom bootstrap images using bdebstrap
Other
9 stars 10 forks source link

Suggests needed on how to add bootargs variables and dts updates #51

Closed MMetelko closed 2 months ago

MMetelko commented 3 months ago

In a fork of this code that I am using to create shareable images (.wics.xz), I would like to add a couple of variables to the bootargs for our system (such as security=apparmor) and turn on specific GPIO pin functionality (i.e. GPIO0_40). I noticed there is a hook in the scripts/build_bsp.sh to allow patches to be placed in ti-u-boot by placing a patch in patches/ti-u-boot. I see that arch/arm/dts/k3-am642-evm.dts under the ti-u-boot repo contains the bootargs variable. Is this where you place the additional variables so that it is passed to the linux boot? If not, what is the best way to do this? I tried this and the added variables were not in the /proc/cmdline.

I have also experimented with using a uEnv.txt file that adds variables to the bootargs variable. When I jump into U-Boot mode and run envboot, I can see the added variables (so the uEnv.txt is readable and the values appear in printenv bootargs). But when I complete the boot, I still do not see the variables reflected in the linux system (looking at /proc/cmdline). So, I am still missing a step here.

There is also a arch/arm/dts/k3-am642-evm.dts b/arch/arm/dts/k3-am642-sk.dts file that contains the bootargs variable. When is this used versus the -evm version? I am using SK-AM64B boards. In my experimentation, I also updated this file to add the desired bootargs.

I am also adding changes to enable the GPIO0_40 pin in the dts files, so I am glad to see the patch capability.

Suggestions on what I might be missing is appreciated.

MMetelko commented 2 months ago

This issue was solved from a TI E2E support forum post: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1345561/sk-am64b-sk-am64b-hs-fs-how-to-use-uenv-txt-for-optional-boot-arguments/5173120#5173120.