OE4T / meta-tegra

BSP layer for NVIDIA Jetson platforms, based on L4T
MIT License
384 stars 215 forks source link

tegra-flash-init: allow user to override script variables #1579

Closed loblik closed 3 weeks ago

loblik commented 3 weeks ago

On custom board the QSPI flash can be under different name (like mtd1). Allow user to specify a device name by creating an environment file in bbappend.

loblik commented 3 weeks ago

Not sure if this proper way to do this. I know there is .env.initrd-flash in flash packages, and arguments get loaded at runtime.

But is this really needed? It seems a bit complex. Is ramdisk supposed to be universal for all the targets? So I could just swap the .env.initrd-flash file and flash completely different board using the same image?

If this is the case, this change would change this approach of course.

madisongh commented 3 weeks ago

I'd rather see this as a build-time (bitbake) variable, or could even be derived from the OTABOOTDEV variable we already have in the machine config files. The initrd is built per-MACHINE, which describes a specific combination of module and carrier, so the SPI flash device name is very, very likely to be the same between flashing runs.

loblik commented 3 weeks ago

Ok. I've added a configure step, which produces env file based on OTABOOTDEV. Is this what you mean? I still have to test it though.