summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-bsp/meta-aspeed
diff options
context:
space:
mode:
authorMilton D. Miller II <miltonm@us.ibm.com>2016-01-27 20:18:16 -0600
committerMilton D. Miller II <miltonm@us.ibm.com>2016-01-28 15:46:41 -0600
commit8084d744423576c7466ed773f5d73cb4a7b0d841 (patch)
treecba4f8f829bb04ba87cdd5dbcff0589025050a8c /meta-openbmc-bsp/meta-aspeed
parent6964081624ad44c462a94f20a19c57c93cb583e8 (diff)
downloadtalos-openbmc-8084d744423576c7466ed773f5d73cb4a7b0d841.tar.gz
talos-openbmc-8084d744423576c7466ed773f5d73cb4a7b0d841.zip
Hack to make fw_setenv work
The fw_setenv is not working with the kernel mtd driver. It works on a plain flat file, and flashcp which is used in /update works. Find the u-boot-env mtd, link it in run and copy the contents to a plain file in /run during init. In shutdown, check for the link, the file having data, no current image update for the u-boot-env, and that the content differs from the mtd via the link. If all are true create a symlink to the file and trigger the update. Along wtih changing the fw_env.config this causes the fw_setenv and fw_printenv utilities to set and update this cached file which will be synced during a normal bmc reboot. This will allow us to set the ethaddr variable which already requires a reboot to activate. Note: the links are directly in /run because the fw_{set,print}env utilities limit the env file name to 16 characters. Signed-off-by: Milton Miller <miltonmm@us.ibm.com>
Diffstat (limited to 'meta-openbmc-bsp/meta-aspeed')
-rw-r--r--meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config
index fe09890c9..978e4d6e5 100644
--- a/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config
+++ b/meta-openbmc-bsp/meta-aspeed/meta-ast2400/recipes-bsp/u-boot/files/fw_env.config
@@ -12,7 +12,8 @@
# MTD SPI-dataflash example
# MTD device name Device offset Env. size Flash sector size Number of sectors
-/dev/mtd2 0x00000 0x20000
+#/dev/mtd2 0x00000 0x20000
+/run/fw_env 0x00000 0x20000
#/dev/mtd5 0x4200 0x4200
#/dev/mtd6 0x4200 0x4200
OpenPOWER on IntegriCloud