Solutions to fix the problem which u-boot failed to load the kernel on ast2500 EVB

Howard Chiu howard_chiu at aspeedtech.com
Wed Apr 20 11:33:17 AEST 2022


Hi OpenBMC team,



I had identified the root cause of the problem reported by dekriea on discord [1].

We have a 32MB NOR flash on ast2500 EVB, which means the kernel image will be placed at offset 512 KB by default, but u-boot is trying to load kernel image from the offset 1024 KB due to the incorrect setting in evb-ast2500_defconfig.

The evb-ast2500_defconfig was ported from Aspeed SDK, so the partition layout is different from OpenBMC 32MB flash layout which is defined in image-type-phosphor.bbclass[2] and openbmc-flash-layout.dtsi[3].



So we have three solutions for this issue:

1. Revise the CONFIG_BOOTCOMMAND and CONFIG_ENV_OFFSET/SIZE in evb-ast2500_defconfig of u-boot v2019.04.

2. Add .cfg to override CONFIG_BOOTCOMMAND and CONFIG_ENV_OFFSET/SIZE in machine evb-ast2500.

For example: https://github.com/blackcatevil/openbmc/commit/5eecaf84d91c2523767da239aa5dbbf42af13bfc.patch

3. Add an ast2500_openbmc_defconfig for evb-ast2500 machine which is similar to ast2600[4].



Which solution is the community preferred?



Reference:

[1] https://discord.com/channels/775381525260664832/922871693008068638/960822924867145728

[2] https://github.com/openbmc/openbmc/blob/master/meta-phosphor/classes/image_types_phosphor.bbclass#L40-L52

[3] https://github.com/openbmc/linux/blob/dev-5.15/arch/arm/boot/dts/openbmc-flash-layout.dtsi

[4] https://lists.ozlabs.org/pipermail/openbmc/2022-February/029334.html



B.R.

Howard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20220420/f8c2fbd4/attachment.htm>


More information about the openbmc mailing list