summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-bsp/u-boot/files
diff options
context:
space:
mode:
authorEdward A. James <eajames@us.ibm.com>2017-11-09 16:03:14 -0600
committerAndrew Geissler <geissonator@yahoo.com>2017-11-28 13:49:42 +0000
commitc03b9c4a5d5f8e089297d8d4c13540d6b2c9421f (patch)
tree9ac113538f9b8edf3b576540c0415994c37c0aad /meta-phosphor/common/recipes-bsp/u-boot/files
parent8053d428ff7f353463c25447de450056d441d5bd (diff)
downloadtalos-openbmc-c03b9c4a5d5f8e089297d8d4c13540d6b2c9421f.tar.gz
talos-openbmc-c03b9c4a5d5f8e089297d8d4c13540d6b2c9421f.zip
init: Add init script to setup /etc mount before starting systemd
Systemd requires /etc mounted and ready at init time. Previously, we were mounting /etc as an overlay from the persistant filesystem after systemd started. This caused a variety of issues with systemd and associated applications (journal, etc). This change also adds factory reset functionality. Resolves openbmc/openbmc#2542 Change-Id: Ib8a38e99df39f833026fe4475670a7ec2b9c8d4d Signed-off-by: Edward A. James <eajames@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common/recipes-bsp/u-boot/files')
-rw-r--r--meta-phosphor/common/recipes-bsp/u-boot/files/0001-config-ast-common-Add-conditional-factory-reset-comm.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0001-config-ast-common-Add-conditional-factory-reset-comm.patch b/meta-phosphor/common/recipes-bsp/u-boot/files/0001-config-ast-common-Add-conditional-factory-reset-comm.patch
new file mode 100644
index 000000000..7cef7aa2e
--- /dev/null
+++ b/meta-phosphor/common/recipes-bsp/u-boot/files/0001-config-ast-common-Add-conditional-factory-reset-comm.patch
@@ -0,0 +1,46 @@
+From 90cdc1aa6079d0f2d5894807cbfee4e8125e2b5b Mon Sep 17 00:00:00 2001
+From: "Edward A. James" <eajames@us.ibm.com>
+Date: Thu, 9 Nov 2017 11:39:10 -0600
+Subject: [PATCH] config/ast-common: Add conditional factory reset command
+
+Factory reset (removing persistant rwfs) has to occur before we've
+mounted the rwfs. However, the variable to determine whether or not to
+do the reset is stored in the u-boot env. This is tricky to access
+before rwfs is mounted except in u-boot. So, check it before every boot.
+
+Signed-off-by: Edward A. James <eajames@us.ibm.com>
+---
+ include/configs/ast-common.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h
+index 8150265..41d196a 100644
+--- a/include/configs/ast-common.h
++++ b/include/configs/ast-common.h
+@@ -121,6 +121,8 @@
+ #define CONFIG_ENV_SIZE 0x10000 /* Total Size of Environment Sector */
+ #define CONFIG_ENV_SIZE_REDUND 0x10000
+
++#define CONFIG_RWFS_SIZE 0x400000
++
+ #if 0
+ #define CONFIG_BOOTCOMMAND \
+ "fdt addr 20080000; " \
+@@ -137,11 +139,13 @@
+ "kernelname=kernel-0 \0" \
+ "loadaddr=" __stringify(CONFIG_LOADADDR) "\0" \
+ "set_bootargs=setenv bootargs " CONFIG_BOOTARGS " ubi.block=\${ubiblock} root=\${root} \0" \
+- "obmc_bootcmd=ubi part obmc-ubi; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \
++ "obmc_bootcmd=ubi part obmc-ubi; run do_rwreset; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \
+ "verify=yes\0" \
+ "spi_dma=yes\0" \
+ "mtdids=" MTDIDS_DEFAULT "\0" \
+ "mtdparts=" MTDPARTS_DEFAULT "\0" \
++ "rwfs_size=" __stringify(CONFIG_RWFS_SIZE) "\0" \
++ "do_rwreset=if test \"\${rwreset}\" = \"true\"; then ubi remove rwfs; ubi create rwfs \${rwfs_size}; fi \0" \
+ ""
+
+ #endif /* __AST_COMMON_CONFIG_H */
+--
+1.8.3.1
+
OpenPOWER on IntegriCloud