Raspberrypi cm3 zeus-test issues

Hi,

I’m trying to test update of raspberrypi cm3 module to zeus branch. I’m hitting following issues:

  1. u-boot -> do_configure task is in loop:
make -f /home/jenkins/mender/mender-raspberrypi/build/tmp/work/raspberrypi_cm3-poky-linux-gnueabi/u-boot/1_2020.01-r0/git/scripts/Makefile.build obj=scripts/kconfig oldconfig
scripts/kconfig/conf  --oldconfig Kconfig
.config:178:warning: symbol value '' invalid for ENV_OFFSET
*
* Restart config...
*
* 
* Environment
*
Environment is not stored (ENV_IS_NOWHERE) [N/y/?] n
Environment in EEPROM (ENV_IS_IN_EEPROM) [N/y/?] n
Environment is in a FAT filesystem (ENV_IS_IN_FAT) [N/y/?] n
Environment is in a EXT4 filesystem (ENV_IS_IN_EXT4) [N/y/?] n
Environment in flash memory (ENV_IS_IN_FLASH) [N/y/?] n
Environment in an MMC device (ENV_IS_IN_MMC) [Y/n/?] y
Environment in a NAND device (ENV_IS_IN_NAND) [N/y/?] n
Environment in a non-volatile RAM (ENV_IS_IN_NVRAM) [N/y/?] n
Environment is in OneNAND (ENV_IS_IN_ONENAND) [N/y/?] n
Environment is in remote memory space (ENV_IS_IN_REMOTE) [N/y/?] n
Enable redundant environment support (SYS_REDUNDAND_ENVIRONMENT) [N/y/?] n
Environment offset (ENV_OFFSET) [] (NEW)
Environment offset (ENV_OFFSET) [] (NEW)
Environment offset (ENV_OFFSET) [] (NEW)
Environment offset (ENV_OFFSET) [] (NEW)
Environment offset (ENV_OFFSET) [] (NEW)
Environment offset (ENV_OFFSET) [] (NEW)
Environment offset (ENV_OFFSET) [] (NEW)
Environment offset (ENV_OFFSET) [] (NEW)
  1. meta-mender-core layer are patches for u-boot-2020.01 but meta-raspberrypi use 2019.07version . When try to set this version as preferred patches cannot be applied (rpi related). I refreshed u-boot patch (will post PR when verify board booting).

Comments?

Thanks.

marek

I’m afraid I cannot help you here directly, but I know that @kacf have been working on porting the u-boot patching to zeus for us.

I’m sure he will drop by shortly :slight_smile:

Well I find out also that with zeus u-boot u-boot doesn’t work on cm3 at all ;). Thanks.

I was just working on RPi3 myself, and this problem was fixed in these two commits:

Still there are some issues remaning on zeus, but it’s getting closer.

@kacf but why in meta-mender is added u-boot 2020.01 as raspberrypi is using in zeus 2019.07?

When I compile for Raspberry Pi it looks like it uses 2020.01, even though 2019.07 is the one available in the meta-raspberrypi layer. I suppose it just chooses the latest one, which is the one from poky.

Can you confirm that the same thing happens to you? I would not expect the original error that you encountered unless 2020.01 is being used.

Yes if I don’t set preferred version to 2019.07 is use 2020.01. I’ll try your patches and let you know. Thanks.

Clearing up some confusion :slight_smile:

2019.07 is the one available in the meta-raspberrypi layer

meta-raspberrypi only has a bbappend to 2019.07 and the actual 2019.07 recipe is in poky.

I suppose it just chooses the latest one, which is the one from poky.

It chooses the one we have in meta-mender,

https://github.com/mendersoftware/meta-mender/blob/zeus-next/meta-mender-core/recipes-bsp/u-boot/u-boot_2020.01.bb

Poky on zeus provides U-Boot 2019.07.

I know we added 2020.01 U-Boot recipe to fix U-Boot → GRUB support (Beaglebone and others) and I thought the intention was to use this as the default bootloader for other platforms that rely on upstream U-Boot as well and I have deferred to comment on this earlier.

Raspberry Pi is a bit special, since it does not use the U-Boot → GRUB approach, but it is using upstream U-Boot. We could force the Raspberry Pi integration to use 2019.07, since it is a “manual integration” and not impacted by the breakage/fixes of U-Boot → GRUB.

But you have already updated the patches to 2020.01 for Raspberry Pi, so might as well stick to it?

1 Like

Good catch @mirzak, I had forgotten about that. I checked the dunfell branch of meta-raspberrypi, which uses U-Boot v2020.01, and it has no patches, so I assume they have all been applied to v2020.01 already.

So yes, I think we should just stick to v2020.01, at least if @MarekBelisko can confirm that this works for him.

1 Like

So we will have zeus-dunfell hybrid :wink:

1 Like

OK I’ve used patches from @kacf mentioned above and build 2020.01 and have this on console:

U-Boot 2020.01 (May 06 2020 - 20:09:45 +0000)

DRAM:  948 MiB
RPI Compute Module 3 (0xa020a0)

then it stuck so I need t investigate why it hangs. But anyway good progress :+1: on zeus branch.
Thanks.

I’m getting now other issue in zeus branch:

47 | # error CONFIG_ENV_OFFSET should not be defined explicitly (will be auto-configured).
      |   ^~~~~
u-boot/1_2020.01-r0/git/include/config_mender.h:50:3: error: #error CONFIG_ENV_OFFSET_REDUND should not be defined explicitly (wi
ll be auto-configured).

u-boot autoconfig is disabled and I have added MENDER_PARTITION_ALIGNMENT = "4194304"

When removed then getting other error:

ERROR: u-boot-1_2020.01-r0 do_configure: U-Boot configuration rpi_3_32b_config has setting:
CONFIG_ENV_OFFSET=0x400000
CONFIG_ENV_OFFSET_REDUND=0x800000
but Mender expects:
CONFIG_ENV_OFFSET=0x800000
Please fix U-Boot's configuration file.

I’m bit confused now ;). Any ideas? Thx.

Are you using the meta-mender-raspberrypi layer? I thought this was fixed in https://github.com/mendersoftware/meta-mender/commit/e60b35006a82fc5e108b5ef974e485250f6fe462.

Yes. Let me inspect it if I can spot anything. Thanks.

Hi there, also trying out upgrading to zeus on rpi4, and was having the same error in u-boot do_configure.
Got it working by manually specifying

MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_1 = “0x400000”
MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET_2 = “0x800000”

but I don’t know if that’s the proper way

There is a new tag zeus-v2020.06 out now. Can you try and see if that helps? I tried both Raspberry Pi 3 and 4, and both worked for me.

gave a try with meta-mender on zeus-v2020.06 and still getting the same errors without settings those variables explicitly:

ERROR: u-boot-fw-utils-mender-auto-provided-1.0-r0 do_configure: U-Boot configuration rpi_4_config has setting:
CONFIG_ENV_OFFSET=0x400000
CONFIG_ENV_OFFSET_REDUND=0x800000
but Mender expects:
CONFIG_ENV_OFFSET=0x800000
Please fix U-Boot’s configuration file.
ERROR: u-boot-fw-utils-mender-auto-provided-1.0-r0 do_configure: Execution of ‘/mnt/yocto/yocto-mender-raspberrypi/build/tmp/work/raspberrypi4_64-poky-linux/u-boot-fw-utils-mender-auto-provided/1.0-r0/temp/run.do_configure.48447’ failed with exit code 1:
CONFIG_ENV_SIZE=0x4000
CONFIG_ENV_SIZE=0x4000
CONFIG_ENV_OFFSET=0x400000
WARNING: exit code 1 from a shell command.

same configuration is working without problems on warrior branch.

Can you try with this patch applied? https://github.com/mendersoftware/meta-mender/pull/1009/files

That fixed it, thanks kacf!
guess it wasn’t picking up my MENDER_PARTITION_ALIGNMENT = "4194304"

Hi @MarekBelisko ,

I am also stuck at this screen.

U-Boot 2020.01 (May 06 2020 - 20:09:45 +0000)

DRAM:  948 MiB
RPI Compute Module 3 (0xa020a0)

Did you find a solution?
I am trying current zeus branch.