Closed loblik closed 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.
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.
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.
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.