diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-24 06:32:26 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-06-11 17:16:24 +0300 |
commit | 01ddfab322ae50bedaa250630661ebed0c1a9101 (patch) | |
tree | b87010b45ba17d439101302b559e7edca09b0a6c /meta-phosphor/common/recipes-bsp/u-boot | |
parent | 9c8c98545becdb348a6d72f68071d15d1cacff8e (diff) | |
download | openbmc-01ddfab322ae50bedaa250630661ebed0c1a9101.tar.xz |
Use BB collections for Aspeed tree patches
Move the Aspeed u-boot tree patches to a directory where they can
be conditionally applied when the Aspeed layer is in the build
configuration.
This is a better way to achieve 273ec60e436 since it enables the Aspeed
BSP layer to name its u-boot/kernel recipes whatever it wants.
Remove stubbed do_configure from u-boot_%.bbappend. It is no longer
required since the bbappend is only activated when the aspeed layer
and associated u-boot recipes are in the layer configuration.
Tested: Built u-boot recipe for witherspoon and palmetto targets
Change-Id: I52dceb65598e0cf660ad035a8f14e9894325ca71
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/common/recipes-bsp/u-boot')
8 files changed, 0 insertions, 243 deletions
diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch b/meta-phosphor/common/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch deleted file mode 100644 index ee115e8e2..000000000 --- a/meta-phosphor/common/recipes-bsp/u-boot/files/0001-configs-ast-Add-redundnant-env.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8ef2f4dcd208e072ab491874c06722c3a8ec69e3 Mon Sep 17 00:00:00 2001 -From: "Edward A. James" <eajames@us.ibm.com> -Date: Thu, 13 Jul 2017 13:42:18 -0500 -Subject: [PATCH 1/4] configs/ast: Add redundnant env - -Configure ast chips to run redundant u-boot environments. - -Signed-off-by: Edward A. James <eajames@us.ibm.com> ---- - include/configs/ast-common.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h -index eff6d2b529..a0243083bd 100644 ---- a/include/configs/ast-common.h -+++ b/include/configs/ast-common.h -@@ -104,9 +104,12 @@ - #define CONFIG_SYS_MAX_FLASH_SECT (8192) /* max number of sectors on one chip */ - #define CONFIG_ENV_IS_IN_FLASH 1 - #define CONFIG_ENV_ADDR (AST_FMC_CS0_BASE + 0x60000) -+#define CONFIG_ENV_ADDR_REDUND (AST_FMC_CS0_BASE + 0x70000) - - #define CONFIG_ENV_OFFSET 0x60000 /* environment starts here */ --#define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment Sector */ -+#define CONFIG_ENV_OFFSET_REDUND 0x70000 -+#define CONFIG_ENV_SIZE 0x10000 /* Total Size of Environment Sector */ -+#define CONFIG_ENV_SIZE_REDUND 0x10000 - - #define CONFIG_BOOTCOMMAND "bootm 20080000" - #define CONFIG_ENV_OVERWRITE --- -2.14.3 - diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch b/meta-phosphor/common/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch deleted file mode 100644 index d04156712..000000000 --- a/meta-phosphor/common/recipes-bsp/u-boot/files/0002-config-ast-common-hack-bootopts.patch +++ /dev/null @@ -1,28 +0,0 @@ -From c678bbdad037604850613e775baacc52ed92c9c1 Mon Sep 17 00:00:00 2001 -From: Patrick Williams <patrick@stwcx.xyz> -Date: Fri, 21 Jul 2017 16:30:01 -0500 -Subject: [PATCH 2/4] config/ast-common: hack bootopts - -Signed-off-by: Patrick Williams <patrick@stwcx.xyz> ---- - include/configs/ast-common.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h -index a0243083bd..7ddba62298 100644 ---- a/include/configs/ast-common.h -+++ b/include/configs/ast-common.h -@@ -96,7 +96,10 @@ - #define CONFIG_CMD_MTDPARTS - #endif - -+#if 0 - #define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/ram rw" -+#endif -+#define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/mtdblock4 ro" - - #define CONFIG_AST_SPI_NOR /* AST SPI NOR Flash */ - #define CONFIG_FMC_CS 1 --- -2.14.3 - diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch b/meta-phosphor/common/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch deleted file mode 100644 index 2c8dee019..000000000 --- a/meta-phosphor/common/recipes-bsp/u-boot/files/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 0c77be343fc4781719dcc0748bc29a26ea83e0a3 Mon Sep 17 00:00:00 2001 -From: Adriana Kobylak <anoo@us.ibm.com> -Date: Wed, 9 Aug 2017 14:11:56 -0500 -Subject: [PATCH 3/4] config/ast-common: Add bootopts to support ubi and mtd - partitioning - -Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> ---- - include/configs/ast-common.h | 19 +++++++++++++++++-- - 1 file changed, 17 insertions(+), 2 deletions(-) - -diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h -index 7ddba62298..14191e4ab0 100644 ---- a/include/configs/ast-common.h -+++ b/include/configs/ast-common.h -@@ -84,6 +84,12 @@ - #define CONFIG_SYS_MAXARGS 16 - #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE - -+/* -+ * Dynamic MTD Partition support -+ */ -+#define MTDIDS_DEFAULT "nor0=bmc" -+#define MTDPARTS_DEFAULT "mtdparts=bmc:384k(u-boot),128k(u-boot-env),-(obmc-ubi)" -+ - /* - * Optional MTD and UBI support - */ -@@ -99,7 +105,7 @@ - #if 0 - #define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/ram rw" - #endif --#define CONFIG_BOOTARGS "console=ttyS4,115200n8 root=/dev/mtdblock4 ro" -+#define CONFIG_BOOTARGS "console=ttyS4,115200n8 ubi.mtd=obmc-ubi,0,0,0 ubi.mtd=alt-obmc-ubi,0,0,4 ro rootfstype=squashfs" - - #define CONFIG_AST_SPI_NOR /* AST SPI NOR Flash */ - #define CONFIG_FMC_CS 1 -@@ -108,18 +114,27 @@ - #define CONFIG_ENV_IS_IN_FLASH 1 - #define CONFIG_ENV_ADDR (AST_FMC_CS0_BASE + 0x60000) - #define CONFIG_ENV_ADDR_REDUND (AST_FMC_CS0_BASE + 0x70000) -+#define CONFIG_LOADADDR 80800000 - - #define CONFIG_ENV_OFFSET 0x60000 /* environment starts here */ - #define CONFIG_ENV_OFFSET_REDUND 0x70000 - #define CONFIG_ENV_SIZE 0x10000 /* Total Size of Environment Sector */ - #define CONFIG_ENV_SIZE_REDUND 0x10000 - --#define CONFIG_BOOTCOMMAND "bootm 20080000" -+#define CONFIG_BOOTCOMMAND "run set_bootargs; run obmc_bootcmd" - #define CONFIG_ENV_OVERWRITE - - #define ASPEED_ENV_SETTINGS \ -+ "ubiblock=0,1 \0" \ -+ "root=/dev/ubiblock0_1 \0" \ -+ "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" \ - "verify=yes\0" \ - "spi_dma=yes\0" \ -+ "mtdids=" MTDIDS_DEFAULT "\0" \ -+ "mtdparts=" MTDPARTS_DEFAULT "\0" \ - "" - - #endif /* __AST_COMMON_CONFIG_H */ --- -2.14.3 - diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch b/meta-phosphor/common/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch deleted file mode 100644 index 6bf9bb798..000000000 --- a/meta-phosphor/common/recipes-bsp/u-boot/files/0004-config-ast-common-Add-conditional-factory-reset-comm.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 878651bbaa8a7da203fafccb164ca7b32287b8f9 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 4/4] 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 14191e4ab0..aaa5155e00 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 0x600000 -+ - #define CONFIG_BOOTCOMMAND "run set_bootargs; run obmc_bootcmd" - #define CONFIG_ENV_OVERWRITE - -@@ -130,11 +132,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 */ --- -2.14.3 - diff --git a/meta-phosphor/common/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch b/meta-phosphor/common/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch deleted file mode 100644 index c54b73475..000000000 --- a/meta-phosphor/common/recipes-bsp/u-boot/files/0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 345b1ade63576f5a8a1c3a4a1b75aab41d84b714 Mon Sep 17 00:00:00 2001 -From: Andrew Jeffery <andrew@aj.id.au> -Date: Fri, 20 Apr 2018 13:29:58 +0930 -Subject: [PATCH] config/ast-common: Fall-back to secondary flash on failed - bootm - -Signed-off-by: Andrew Jeffery <andrew@aj.id.au> ---- - include/configs/ast-common.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/include/configs/ast-common.h b/include/configs/ast-common.h -index ad08016ec110..10ef6a1955b7 100644 ---- a/include/configs/ast-common.h -+++ b/include/configs/ast-common.h -@@ -127,12 +127,14 @@ - #define CONFIG_ENV_OVERWRITE - - #define ASPEED_ENV_SETTINGS \ -+ "wdt2bite=mw.l 0x1e785024 0xa 1; mw.b 0x1e78502c 0xb3 1 \0" \ -+ "bootalt=run wdt2bite \0" \ - "ubiblock=0,1 \0" \ - "root=/dev/ubiblock0_1 \0" \ - "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; run do_rwreset; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} \0" \ -+ "obmc_bootcmd=ubi part obmc-ubi; run do_rwreset; ubi read ${loadaddr} ${kernelname}; bootm ${loadaddr} || run bootalt \0" \ - "verify=yes\0" \ - "spi_dma=yes\0" \ - "mtdids=" MTDIDS_DEFAULT "\0" \ --- -2.14.1 - diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-aspeed.inc b/meta-phosphor/common/recipes-bsp/u-boot/u-boot-aspeed.inc deleted file mode 100644 index 5286c1b0a..000000000 --- a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-aspeed.inc +++ /dev/null @@ -1,23 +0,0 @@ -inherit image_version - -SRC_URI_append_aspeed = " file://0001-configs-ast-Add-redundnant-env.patch" - -SRC_URI_append_aspeed_df-obmc-ubi-fs = " \ - file://0002-config-ast-common-hack-bootopts.patch \ - file://0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch \ - file://0004-config-ast-common-Add-conditional-factory-reset-comm.patch \ - file://0005-config-ast-common-Fall-back-to-secondary-flash-on-fa.patch \ - " - -do_patch[depends] += "os-release:do_populate_sysroot" - -python do_patch_append_aspeed_df-obmc-ubi-fs () { - version_id=do_get_versionID(d) - d.setVar('VERSION_ID', version_id) - bb.build.exec_func("patch_kernelname", d) -} - -patch_kernelname () { - sed -ri "s/kernel-(0|[a-fA-F0-9]{8})/kernel-${VERSION_ID}/g" \ - ${S}/include/configs/ast-common.h &> /dev/null -} diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend b/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend deleted file mode 100644 index 6c6849436..000000000 --- a/meta-phosphor/common/recipes-bsp/u-boot/u-boot-fw-utils_%.bbappend +++ /dev/null @@ -1,3 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -require u-boot-aspeed.inc diff --git a/meta-phosphor/common/recipes-bsp/u-boot/u-boot_%.bbappend b/meta-phosphor/common/recipes-bsp/u-boot/u-boot_%.bbappend deleted file mode 100644 index f9a1e83fc..000000000 --- a/meta-phosphor/common/recipes-bsp/u-boot/u-boot_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -include u-boot-aspeed.inc - -python do_configure () { - pass -} |