diff options
author | Howard Chiu <howard_chiu@aspeedtech.com> | 2022-04-26 04:32:42 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2022-05-02 03:17:55 +0300 |
commit | c1c2370ca17d8d10c50e00b024da411f63f3b952 (patch) | |
tree | 762363f9859b057f2f53c92f5493da7024f122a2 /meta-aspeed | |
parent | 03907ee1b9e938b9ce87f4d781c905c2a41592c2 (diff) | |
download | openbmc-c1c2370ca17d8d10c50e00b024da411f63f3b952.tar.xz |
meta-aspeed: Correct the offset to load kernel
OpenBMC places kernel at offset 512 if the flash size is 32MB,
but it was defined as 1024 in the present defconfig.
This patch corrects the offset if the flash size is set to 32MB.
Signed-off-by: Howard Chiu <howard_chiu@aspeedtech.com>
Change-Id: I05749eda519cc1660921e111a36be74cb121fa68
Diffstat (limited to 'meta-aspeed')
5 files changed, 12 insertions, 1 deletions
diff --git a/meta-aspeed/conf/machine/evb-ast2500.conf b/meta-aspeed/conf/machine/evb-ast2500.conf index 6946c52e5b..4de380f865 100644 --- a/meta-aspeed/conf/machine/evb-ast2500.conf +++ b/meta-aspeed/conf/machine/evb-ast2500.conf @@ -7,3 +7,5 @@ require conf/machine/include/ast2500.inc require conf/machine/include/obmc-evb-common.inc SERIAL_CONSOLES = "115200;ttyS4" + +FLASH_SIZE = "32768" diff --git a/meta-aspeed/recipes-bsp/u-boot/files/fw_env_flash_32M_nor.config b/meta-aspeed/recipes-bsp/u-boot/files/fw_env_flash_32M_nor.config new file mode 100644 index 0000000000..52d0882661 --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/files/fw_env_flash_32M_nor.config @@ -0,0 +1,2 @@ +# MTD device name Device offset Env. size Flash sector size Number of sectors +/dev/mtd/u-boot-env 0x0000 0x20000 0x1000 diff --git a/meta-aspeed/recipes-bsp/u-boot/files/u-boot_flash_32M.cfg b/meta-aspeed/recipes-bsp/u-boot/files/u-boot_flash_32M.cfg new file mode 100644 index 0000000000..49332ebbc7 --- /dev/null +++ b/meta-aspeed/recipes-bsp/u-boot/files/u-boot_flash_32M.cfg @@ -0,0 +1,3 @@ +CONFIG_BOOTCOMMAND="bootm 20080000" +CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x60000 diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb index 108f8489d2..e46dbb7d70 100644 --- a/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb +++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-aspeed-sdk_2019.04.bb @@ -8,7 +8,8 @@ require recipes-bsp/u-boot/u-boot.inc PROVIDES += "u-boot" DEPENDS += "bc-native dtc-native" -SRC_URI:append:uboot-flash-65536 = "file://u-boot_flash_64M.cfg" +SRC_URI:append:uboot-flash-32768 = " file://u-boot_flash_32M.cfg" +SRC_URI:append:uboot-flash-65536 = " file://u-boot_flash_64M.cfg" SRC_URI:append:df-phosphor-mmc = " file://u-boot-env-ast2600.txt" SRC_URI += " \ file://rsa_oem_dss_key.pem;sha256sum=64a379979200d39949d3e5b0038e3fdd5548600b2f7077a17e35422336075ad4 \ diff --git a/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb b/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb index 22976efc4f..1a7e8f5b7c 100644 --- a/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb +++ b/meta-aspeed/recipes-bsp/u-boot/u-boot-fw-utils-aspeed-sdk_2019.04.bb @@ -10,10 +10,13 @@ RPROVIDES:${PN} += "u-boot-fw-utils" SRC_URI += "file://fw_env_ast2600_nor.config" SRC_URI += "file://fw_env_ast2600_mmc.config" +SRC_URI += "file://fw_env_flash_32M_nor.config" SRC_URI += "file://fw_env_flash_64M_nor.config" +SRC_URI:append:uboot-flash-32768 = " file://u-boot_flash_32M.cfg" ENV_CONFIG_FILE = "fw_env_ast2600_nor.config" ENV_CONFIG_FILE:df-phosphor-mmc = "fw_env_ast2600_mmc.config" +ENV_CONFIG_FILE:uboot-flash-32768 = "fw_env_flash_32M_nor.config" ENV_CONFIG_FILE:uboot-flash-65536 = "fw_env_flash_64M_nor.config" INSANE_SKIP:${PN} = "already-stripped" |