JeffyCN / meta-rockchip

Yocto BSP layer for the Rockchip SOC boards
Other
114 stars 87 forks source link

Mender support #61

Closed nandra closed 11 months ago

nandra commented 1 year ago

Hello,

it's just question not bug. Does anybody tried to integrate meta-mender layer with this layer? https://github.com/mendersoftware/meta-mender

As rockchip partitions are predefined integration of mender seems to be little challenging as it require u-boot changes with evn + redundant env on some predefined offsets. Would be possible to fit it somehow with required partitions setup? Thanks.

JeffyCN commented 1 year ago

don't know much about that, it looks like you want an original u-boot instead of the RK BSP u-boot?

if so, try to delete meta-rockchip/recipes-bsp/u-boot, and add patches to make the original u-boot work. after that, the rk style update.img and partition table file(parameter.txt) would not be generated.

nandra commented 1 year ago

can I somehow combine SPL + u-boot to put it in first partition? Or GPT partition table layout is mandatory for all RK devices pls? Thanks.

JeffyCN commented 1 year ago

don't know much about it, since the upstream u-boot has already supported rockchip platform, maybe ask in u-boot's maillist?

from what i know, the only rockchip special thing would be: the bootrom(hard-coded in the chip) would try to load the spl(miniloader) from a fixed offset of the storage(34 section i think) into sram and jump into it, the spl needs to be packed in rockchip special format and has size limit(check u-boot's tools/rk*.c for more details).

nandra commented 1 year ago

It would be possible maybe to patch 2017.09 original u-boot. Only thing is that mender require u-boot env on some offset (also redundant env with size 128kB) so idea would be to put env to raw partition before boot partition. Do you think it can work? Thanks.

JeffyCN commented 1 year ago

you can try to modify the wks.in to add your new partition, just don't move the idblock partition

medemi68 commented 10 months ago

@nandra If you're willing to use RAUC instead, I am currently working on a guide for this repo that allows you to set it up. RAUC is a lot more flexible in it's implementation and doesn't require modifying the bootloader code. You'll also find that a lot of the things in u-boot-rockchip "just work" as opposed to the regular u-boot.

It may be possible to modify my guide for RAUC (that I am currently working on) to work with Mender but afaik Mender is a bit more stringent with certain things and will require you to modify the bootloader code.