Closed fguerzoni closed 2 years ago
@fguerzoni Did you configure U-Boot to actually handle the boot partition selection (with scripting) based on the variables RAUC uses? And does it pass the booted slot as commandline parameter?
You can read more about this here:
https://rauc.readthedocs.io/en/latest/integration.html#id5
or have a look / use the example layer:
https://github.com/rauc/meta-rauc-community/tree/master/meta-rauc-raspberrypi
Regards, Enrico
Thank you very much for the quick reply. I forgot to mention the boot.txt from which the boot.scr is generated. I followed the example you reported with (slight) modifications: boot.txt When booting I can read from the console: Found valid RAUC slot A so I think the boot selection script is working
@fguerzoni When you run fw_printenv
on the target, does it print the variables set by your script and expected by RAUC? (BOOT_A_LEFT
, BOOT_ORDER
, etc.)
When it does not, are you sure that both the U-Boot and the system use the same location for reading/storing the U-Boot env?
That's the point!
fw_printenv on the target prints:
Cannot parse config file '/etc/fw_env.config': No such file or directory
while printenv on uboot returns:
BOOT_A_LEFT=1
BOOT_B_LEFT=3
BOOT_DEV=mmc 0:2
BOOT_ORDER=A B
arch=arm
baudrate=115200
board=rpi
board_name=4 Model B
board_rev=0x11
...
So I have to fix this. Thank you
Setting properly the /etc/fw_env.config file to:
/boot/uboot.env 0x0000 0x4000
makes the fw_printenv access the stored uboot environment.
Then the rauc status command runs fine:
# rauc status
=== System Info ===
Compatible: RaspberryPi4
Variant:
Booted from: rootfs.0 (A)
=== Bootloader ===
Activated: rootfs.0 (A)
=== Slot States ===
o [rootfs.1] (/dev/mmcblk0p3, ext4, inactive)
bootname: B
boot status: good
x [rootfs.0] (/dev/mmcblk0p2, ext4, booted)
bootname: A
boot status: good
Thanks for the support
Hi @fguerzoni , I am also working on integrating RAUC with Buildroot. I had few doubts regarding this. How did you modify the Kconfig to enable the flags as mentioned in RAUC documentation? Can you please let me know if there are any dependencies to be taken care of?
Hi @Sourabh1107, I think rauc-buildroot integration is very good because when you choose rauc in the Target Packages menu all its dependencies are automatically checked. There are many other tweaks that depend on what you really want to build. Anyway here's my current .config file where you can find for reference all the configs I set for buildroot, u-boot and the kernel. .config.txt Regards
Hello @fguerzoni Thanks for the quick response. Its good to know that the dependencies are automatically checked. I have also enables the similar setup for RAUC in .config file. But what about these settings for Kernel? [https://rauc.readthedocs.io/en/latest/integration.html#kernel-configuration]. I am bit confused on how to edit kernel config(Kconfig).
Actually it's quite easy: make linux-menuconfig and eventually make uboot-menuconfig because uboot must point to the same kernel version. please read the docs because this is described pretty well
Hi, this is a kind of help request to make Rauc-1.5.1 work with:
I managed to make the rpi4 gpu run uboot as the kernel and then let uboot start the real kernel with the following result:
Then I decided to add Rauc on the target, so I modified buildroot configs to have:
and
But I still cannot solve the following issue:
fw_printenv has been built and it's availble on the target:
Comparing against a working yocto+uboot+rauc build I noticed that I'm missing the /etc/fw_env.config file containing:
/boot/uboot.env 0x0000 0x4000
but adding it does not change/solve the issue.What I'm missing? Thanks and regards