I am working on the kernel (relatively recent pull from the rep), which seem to also build the U-boot.
The device I have is FriendlyElec NanoPi neo. It has default U-boot and some operating system within the onboard eMMC.
I boot Openwrt from the SD-card, and can see eMMC with its boot0 and boot1 partitions as well as kernel and user data partitions, and use SD-card for data only in the future.
I want to convert the eMMC to the device running the images of the Openwrt build I performed. There're a plenty guides on how to do it for various platforms and operating systems, is there one for Openwrt?
In particular, the kernel update will have to be performed from the /tmp directory using sysupgrade.
To my understanding, the task must be simple, but very precise -
- write u-boot into the eMMC, not sure what one use - with SPL or without it, with DTB or without it (can it work without device tree??);
- write default or ensure space for the u-boot environment variables, if they are not the part of the compiled u-boot image.
- create partition for the kernel and its other files like DTBs, write those files in there. Or probably just write the .img file into specific location within the eMMC, I am not sure.
Additional issue I caught is proper configuration of fw_setenv and fw_printenv, which must be supplied from some location I am unable to find - which depend on configuration of the u-boot. That's why I would prefer to update everything at once on the eMMC to ensure 100% consistency.
Advice and help is very appreciated. Most probably I'd be able to figure out things myself at the end of the day (month, year ), but if you have insight you may save some of the time. Thanks in advance!