summaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2016-07-17 11:42:55 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2017-06-13 10:44:09 +0200
commitbf433685e7ec06333b1da6adb803f25b653c65d9 (patch)
tree1090d33079e9a3577585bd591bfd820b3543acfc /configs
parent93ade41ac6ad4612a305f5c8751fb375a4434812 (diff)
downloadDistroKit-bf433685e7ec06333b1da6adb803f25b653c65d9.tar.gz
DistroKit-bf433685e7ec06333b1da6adb803f25b653c65d9.tar.xz
multi_v7: fix barebox patches with whitespace issue
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Diffstat (limited to 'configs')
-rw-r--r--configs/platform-v7a/patches/barebox-2016.05.0/0001-bootstate-add-framework-for-redundant-boot-scenarios.patch28
-rw-r--r--configs/platform-v7a/patches/barebox-2016.05.0/0002-bootstate-Add-kernel-option-containing-the-system-th.patch34
-rw-r--r--configs/platform-v7a/patches/barebox-2016.05.0/0003-bootstate-separate-names-from-boot-targets.patch47
-rw-r--r--configs/platform-v7a/patches/barebox-2016.05.0/0004-bootstate-set-kernel-option-to-name-of-boot-target.patch74
-rw-r--r--configs/platform-v7a/patches/barebox-2016.05.0/0101-beaglebone-add-state-entrie-for-mmc0-and-mmc1.patch12
-rw-r--r--configs/platform-v7a/patches/barebox-2016.05.0/0201-rpi2-add-basic-boot-spec-devicetree-support.patch24
-rw-r--r--configs/platform-v7a/patches/barebox-2016.05.0/0301-Release-2016.05.0-customers-pengutronix-multi_v7-201.patch2
7 files changed, 111 insertions, 110 deletions
diff --git a/configs/platform-v7a/patches/barebox-2016.05.0/0001-bootstate-add-framework-for-redundant-boot-scenarios.patch b/configs/platform-v7a/patches/barebox-2016.05.0/0001-bootstate-add-framework-for-redundant-boot-scenarios.patch
index 08b17de..d665772 100644
--- a/configs/platform-v7a/patches/barebox-2016.05.0/0001-bootstate-add-framework-for-redundant-boot-scenarios.patch
+++ b/configs/platform-v7a/patches/barebox-2016.05.0/0001-bootstate-add-framework-for-redundant-boot-scenarios.patch
@@ -275,12 +275,12 @@ index 2595aa13fa62..e2bc8f76c2e3 100644
+++ b/arch/sandbox/dts/sandbox.dts
@@ -3,5 +3,88 @@
#include "skeleton.dtsi"
-
+
/ {
+ aliases {
+ state = &state;
+ };
-
+
+ state: state {
+ magic = <0x4d433230>;
+ compatible = "barebox,state";
@@ -367,9 +367,9 @@ index 875c5f4f01ed..603e887b15ec 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -2189,6 +2189,11 @@ config CMD_SPD_DECODE
- help
- decode spd eeprom
-
+ help
+ decode spd eeprom
+
+config CMD_BOOTCHOOSER
+ tristate
+ depends on BOOTSTATE
@@ -377,7 +377,7 @@ index 875c5f4f01ed..603e887b15ec 100644
+
# end Miscellaneous commands
endmenu
-
+
diff --git a/commands/Makefile b/commands/Makefile
index f1b482f04934..bb3b40809af5 100644
--- a/commands/Makefile
@@ -499,9 +499,9 @@ index 7c09e8c117f1..f17769661ee6 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -792,6 +792,14 @@ config STATE_CRYPTO
- See Documentation/devicetree/bindings/barebox/barebox,state.rst
- for more information.
-
+ See Documentation/devicetree/bindings/barebox/barebox,state.rst
+ for more information.
+
+config BOOTSTATE
+ bool "bootstate infrastructure"
+ depends on OF_BAREBOX_DRIVERS
@@ -511,8 +511,8 @@ index 7c09e8c117f1..f17769661ee6 100644
+ select BOOTSTATE_DRV
+
config RESET_SOURCE
- bool "detect Reset cause"
- depends on GLOBALVAR
+ bool "detect Reset cause"
+ depends on GLOBALVAR
diff --git a/common/Makefile b/common/Makefile
index d99ca7b7ac74..5505449874ad 100644
--- a/common/Makefile
@@ -1317,9 +1317,9 @@ index 7a5b14697efd..2459051e1db1 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -19,4 +19,9 @@ config STATE_DRV
- tristate "state driver"
- depends on STATE
-
+ tristate "state driver"
+ depends on STATE
+
+config BOOTSTATE_DRV
+ tristate "bootstate driver"
+ depends on BOOTSTATE
diff --git a/configs/platform-v7a/patches/barebox-2016.05.0/0002-bootstate-Add-kernel-option-containing-the-system-th.patch b/configs/platform-v7a/patches/barebox-2016.05.0/0002-bootstate-Add-kernel-option-containing-the-system-th.patch
index 719cd50..97d8336 100644
--- a/configs/platform-v7a/patches/barebox-2016.05.0/0002-bootstate-Add-kernel-option-containing-the-system-th.patch
+++ b/configs/platform-v7a/patches/barebox-2016.05.0/0002-bootstate-Add-kernel-option-containing-the-system-th.patch
@@ -16,28 +16,28 @@ index 3dc18813064d..b0cb0183068a 100644
--- a/common/bootstate.c
+++ b/common/bootstate.c
@@ -753,12 +753,16 @@ int bootstate_bootchooser(char *name, unsigned flags, unsigned timeout)
- }
-
- while (true) {
+ }
+
+ while (true) {
- char *cmd;
+ char *cmd, *system;
-
- ret = bootstate_get_target(bootstate, flags, &target);
- if (ret)
- return ret;
-
+
+ ret = bootstate_get_target(bootstate, flags, &target);
+ if (ret)
+ return ret;
+
+ system = asprintf("bootstate.active=%s", target);
+ globalvar_add_simple("linux.bootargs.bootchooser", system);
+ free(system);
+
- cmd = asprintf("boot %s", target);
- free(target);
- pr_info("%srunning: %s...\n",
+ cmd = asprintf("boot %s", target);
+ free(target);
+ pr_info("%srunning: %s...\n",
@@ -766,6 +770,7 @@ int bootstate_bootchooser(char *name, unsigned flags, unsigned timeout)
- if (!(flags & BOOTCHOOSER_FLAG_DRYRUN))
- ret = run_command(cmd);
- free(cmd);
+ if (!(flags & BOOTCHOOSER_FLAG_DRYRUN))
+ ret = run_command(cmd);
+ free(cmd);
+ globalvar_set_match("linux.bootargs.bootchooser", NULL);
-
- if (flags & BOOTCHOOSER_FLAG_RETRY_WITH_DEC) {
- flags |= BOOTCHOOSER_FLAG_ATTEMPTS_DEC;
+
+ if (flags & BOOTCHOOSER_FLAG_RETRY_WITH_DEC) {
+ flags |= BOOTCHOOSER_FLAG_ATTEMPTS_DEC;
diff --git a/configs/platform-v7a/patches/barebox-2016.05.0/0003-bootstate-separate-names-from-boot-targets.patch b/configs/platform-v7a/patches/barebox-2016.05.0/0003-bootstate-separate-names-from-boot-targets.patch
index 77f4949..50ea064 100644
--- a/configs/platform-v7a/patches/barebox-2016.05.0/0003-bootstate-separate-names-from-boot-targets.patch
+++ b/configs/platform-v7a/patches/barebox-2016.05.0/0003-bootstate-separate-names-from-boot-targets.patch
@@ -15,49 +15,50 @@ index b0cb0183068a..fde278262fa3 100644
--- a/common/bootstate.c
+++ b/common/bootstate.c
@@ -75,6 +75,7 @@ struct bootstate_target {
- /* spec */
- const char *name;
- unsigned int default_attempts;
+ /* spec */
+ const char *name;
+ unsigned int default_attempts;
+ const char *boot;
};
-
+
static void pr_target(struct bootstate *bootstate, struct bootstate_target *target)
@@ -205,7 +206,7 @@ static struct bootstate_target *bootstate_target_find(const struct bootstate *bo
- return ERR_PTR(-ENOENT);
+ return ERR_PTR(-ENOENT);
}
-
+
-static int bootstate_target_from_node(struct bootstate *bootstate, const struct device_node *node, bool create)
+static int bootstate_target_from_node(struct bootstate *bootstate, struct device_node *node, bool create)
{
- struct bootstate_target *target;
- char *name, *indexs;
+ struct bootstate_target *target;
+ char *name, *indexs;
@@ -217,10 +218,18 @@ static int bootstate_target_from_node(struct bootstate *bootstate, const struct
- *indexs++ = 0;
-
- if (create) {
+ *indexs++ = 0;
+
+ if (create) {
+ const char *boot;
+
- /* create*/
- target = xzalloc(sizeof(*target));
-
- target->name = xstrdup(name);
+ /* create*/
+ target = xzalloc(sizeof(*target));
+
+ target->name = xstrdup(name);
+
+ if (!of_property_read_string(node, "boot", &boot))
+ target->boot = xstrdup(boot);
+ else
+ target->boot = xstrdup(name);
+
- list_add_tail(&target->list, &bootstate->targets);
- list_add_tail(&target->list_unsorted,
- &bootstate->targets_unsorted);
+ list_add_tail(&target->list, &bootstate->targets);
+ list_add_tail(&target->list_unsorted,
+ &bootstate->targets_unsorted);
@@ -701,8 +710,9 @@ int bootstate_get_target(struct bootstate *bootstate, unsigned flags, char **tar
- }
-
- found = true;
+ }
+
+ found = true;
- *target_out = strdup(target->name);
- pr_debug("%s: selected target '%s'\n", __func__, target->name);
+ *target_out = strdup(target->boot);
+ pr_debug("%s: selected target '%s', boot '%s'\n",
+ __func__, target->name, target->boot);
- if (!v)
- goto out;
+ if (!v)
+ goto out;
+
diff --git a/configs/platform-v7a/patches/barebox-2016.05.0/0004-bootstate-set-kernel-option-to-name-of-boot-target.patch b/configs/platform-v7a/patches/barebox-2016.05.0/0004-bootstate-set-kernel-option-to-name-of-boot-target.patch
index 1db763c..4bce5b4 100644
--- a/configs/platform-v7a/patches/barebox-2016.05.0/0004-bootstate-set-kernel-option-to-name-of-boot-target.patch
+++ b/configs/platform-v7a/patches/barebox-2016.05.0/0004-bootstate-set-kernel-option-to-name-of-boot-target.patch
@@ -12,9 +12,9 @@ index fde278262fa3..2dcc47cfa257 100644
--- a/common/bootstate.c
+++ b/common/bootstate.c
@@ -631,20 +631,8 @@ void _pr_flags(struct bootstate *bootstate, unsigned flags)
- (verbose) ? _pr_flags(bootstate, flags) : 0; \
- })
-
+ (verbose) ? _pr_flags(bootstate, flags) : 0; \
+ })
+
-/*
- * bootstate_get_target - create a new state instance from a device_node
- *
@@ -32,29 +32,29 @@ index fde278262fa3..2dcc47cfa257 100644
+static struct bootstate_target *bootstate_target_get(struct bootstate *bootstate,
+ unsigned flags)
{
- struct bootstate_target *target;
- int ret;
+ struct bootstate_target *target;
+ int ret;
@@ -655,7 +643,7 @@ int bootstate_get_target(struct bootstate *bootstate, unsigned flags, char **tar
-
- ret = bootstate_load(bootstate);
- if (ret)
+
+ ret = bootstate_load(bootstate);
+ if (ret)
- return ret;
+ return ERR_PTR(ret);
-
- if (flags & BOOTCHOOSER_FLAG_ATTEMPTS_RESET) {
- list_for_each_entry(target, &bootstate->targets, list) {
+
+ if (flags & BOOTCHOOSER_FLAG_ATTEMPTS_RESET) {
+ list_for_each_entry(target, &bootstate->targets, list) {
@@ -710,7 +698,6 @@ int bootstate_get_target(struct bootstate *bootstate, unsigned flags, char **tar
- }
-
- found = true;
+ }
+
+ found = true;
- *target_out = strdup(target->boot);
- pr_debug("%s: selected target '%s', boot '%s'\n",
- __func__, target->name, target->boot);
- if (!v)
+ pr_debug("%s: selected target '%s', boot '%s'\n",
+ __func__, target->name, target->boot);
+ if (!v)
@@ -723,7 +710,33 @@ int bootstate_get_target(struct bootstate *bootstate, unsigned flags, char **tar
- bootstate_save(bootstate);
-
- if (!found)
+ bootstate_save(bootstate);
+
+ if (!found)
- return -ENOENT;
+ return ERR_PTR(-ENOENT);
+
@@ -83,37 +83,37 @@ index fde278262fa3..2dcc47cfa257 100644
+ return PTR_ERR(target);
+
+ *target_out = strdup(target->boot);
-
- return 0;
+
+ return 0;
}
@@ -732,7 +745,7 @@ int bootstate_bootchooser(char *name, unsigned flags, unsigned timeout)
{
- struct bootstate *bootstate;
- bool v = flags & BOOTCHOOSER_FLAG_VERBOSE;
+ struct bootstate *bootstate;
+ bool v = flags & BOOTCHOOSER_FLAG_VERBOSE;
- char *target;
+ struct bootstate_target *target;
- int ret;
-
- if (!name)
+ int ret;
+
+ if (!name)
@@ -765,16 +778,15 @@ int bootstate_bootchooser(char *name, unsigned flags, unsigned timeout)
- while (true) {
- char *cmd, *system;
-
+ while (true) {
+ char *cmd, *system;
+
- ret = bootstate_get_target(bootstate, flags, &target);
- if (ret)
- return ret;
+ target = bootstate_target_get(bootstate, flags);
+ if (IS_ERR(target))
+ return PTR_ERR(target);
-
+
- system = asprintf("bootstate.active=%s", target);
+ system = asprintf("bootstate.active=%s", target->name);
- globalvar_add_simple("linux.bootargs.bootchooser", system);
- free(system);
-
+ globalvar_add_simple("linux.bootargs.bootchooser", system);
+ free(system);
+
- cmd = asprintf("boot %s", target);
- free(target);
+ cmd = asprintf("boot %s", target->boot);
- pr_info("%srunning: %s...\n",
- flags & BOOTCHOOSER_FLAG_DRYRUN ? "not " : "", cmd);
- if (!(flags & BOOTCHOOSER_FLAG_DRYRUN))
+ pr_info("%srunning: %s...\n",
+ flags & BOOTCHOOSER_FLAG_DRYRUN ? "not " : "", cmd);
+ if (!(flags & BOOTCHOOSER_FLAG_DRYRUN))
diff --git a/configs/platform-v7a/patches/barebox-2016.05.0/0101-beaglebone-add-state-entrie-for-mmc0-and-mmc1.patch b/configs/platform-v7a/patches/barebox-2016.05.0/0101-beaglebone-add-state-entrie-for-mmc0-and-mmc1.patch
index 9761b58..a26a282 100644
--- a/configs/platform-v7a/patches/barebox-2016.05.0/0101-beaglebone-add-state-entrie-for-mmc0-and-mmc1.patch
+++ b/configs/platform-v7a/patches/barebox-2016.05.0/0101-beaglebone-add-state-entrie-for-mmc0-and-mmc1.patch
@@ -12,9 +12,9 @@ index ef97d906616c..d14c6ded6a55 100644
--- a/arch/arm/dts/am335x-bone-common.dtsi
+++ b/arch/arm/dts/am335x-bone-common.dtsi
@@ -11,6 +11,21 @@
- linux,stdout-path = &uart0;
- };
-
+ linux,stdout-path = &uart0;
+ };
+
+ bootstate: bootstate {
+ compatible = "barebox,bootstate";
+ backend-type = "nv";
@@ -30,6 +30,6 @@ index ef97d906616c..d14c6ded6a55 100644
+ };
+ };
+
- cpus {
- cpu@0 {
- cpu0-supply = <&dcdc2_reg>;
+ cpus {
+ cpu@0 {
+ cpu0-supply = <&dcdc2_reg>;
diff --git a/configs/platform-v7a/patches/barebox-2016.05.0/0201-rpi2-add-basic-boot-spec-devicetree-support.patch b/configs/platform-v7a/patches/barebox-2016.05.0/0201-rpi2-add-basic-boot-spec-devicetree-support.patch
index 40d67be..80a3e7e 100644
--- a/configs/platform-v7a/patches/barebox-2016.05.0/0201-rpi2-add-basic-boot-spec-devicetree-support.patch
+++ b/configs/platform-v7a/patches/barebox-2016.05.0/0201-rpi2-add-basic-boot-spec-devicetree-support.patch
@@ -21,7 +21,7 @@ index b83c1109ef39..960d8aac3933 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -9,6 +9,7 @@ obj- += dummy.o
-
+
pbl-dtb-$(CONFIG_MACH_AFI_GF) += am335x-afi-gf.dtb.o
pbl-dtb-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o am335x-bone-common.dtb.o
+pbl-dtb-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2-b.dtb.o
@@ -442,21 +442,21 @@ index 64f37813883a..f11221dd6685 100644
--- a/arch/arm/mach-bcm283x/core.c
+++ b/arch/arm/mach-bcm283x/core.c
@@ -42,15 +42,17 @@ static int bcm2835_clk_init(void)
-
- clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000);
- clk_register_clkdev(clk, NULL, "uart0-pl0110");
+
+ clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000);
+ clk_register_clkdev(clk, NULL, "uart0-pl0110");
+ clk_register_clkdev(clk, NULL, "3f201000.uart");
-
- clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000);
- clk_register_clkdev(clk, NULL, "bcm2835-cs");
+
+ clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000);
+ clk_register_clkdev(clk, NULL, "bcm2835-cs");
+ clk_register_clkdev(clk, NULL, "3f003000.timer");
-
- add_generic_device("bcm2835-cs", DEVICE_ID_SINGLE, NULL, BCM2835_ST_BASE, 0x1C, IORESOURCE_MEM, NULL);
-
- return 0;
+
+ add_generic_device("bcm2835-cs", DEVICE_ID_SINGLE, NULL, BCM2835_ST_BASE, 0x1C, IORESOURCE_MEM, NULL);
+
+ return 0;
}
-postcore_initcall(bcm2835_clk_init);
+pure_initcall(bcm2835_clk_init);
-
+
void bcm2835_register_uart(void)
{
diff --git a/configs/platform-v7a/patches/barebox-2016.05.0/0301-Release-2016.05.0-customers-pengutronix-multi_v7-201.patch b/configs/platform-v7a/patches/barebox-2016.05.0/0301-Release-2016.05.0-customers-pengutronix-multi_v7-201.patch
index 76e12c8..6526de9 100644
--- a/configs/platform-v7a/patches/barebox-2016.05.0/0301-Release-2016.05.0-customers-pengutronix-multi_v7-201.patch
+++ b/configs/platform-v7a/patches/barebox-2016.05.0/0301-Release-2016.05.0-customers-pengutronix-multi_v7-201.patch
@@ -18,5 +18,5 @@ index 93f1d17d99d2..b844aa674da5 100644
-EXTRAVERSION =
+EXTRAVERSION =-20160610-1
NAME = None
-
+
# *DOCUMENTATION*