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
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 0000000..52d0882
--- /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 0000000..49332eb
--- /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