diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-17 10:42:23 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-17 10:42:23 +0000 |
commit | 4224b52c3acc7203e7c2535d6806f30432dae5e3 (patch) | |
tree | 7a847d3e84dfc3608555587c3b9958474fc17d72 /target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch | |
parent | cad399c87b7739c4b8eeb4119706860818f7d84f (diff) | |
download | upstream-4224b52c3acc7203e7c2535d6806f30432dae5e3.tar.gz upstream-4224b52c3acc7203e7c2535d6806f30432dae5e3.tar.bz2 upstream-4224b52c3acc7203e7c2535d6806f30432dae5e3.zip |
brcm2708: add linux 4.4 support
- random-bcm2708 and spi-bcm2708 have been removed.
- sound-soc-bcm2708-i2s has been upstreamed as sound-soc-bcm2835-i2s.
Let's keep linux 4.1 for a while, since linux 4.4 appears to have some issues
with multicast traffic on RPi ethernet:
https://gist.github.com/Noltari/5b1cfdecce5ed4bc08fd
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
SVN-Revision: 48266
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch b/target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch new file mode 100644 index 0000000000..c909369ab9 --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0051-fdt-Add-support-for-the-CONFIG_CMDLINE_EXTEND-option.patch @@ -0,0 +1,58 @@ +From 3f46d3627061688e50e24d5bfbc0adb5deb89b97 Mon Sep 17 00:00:00 2001 +From: Phil Elwell <phil@raspberrypi.org> +Date: Fri, 5 Dec 2014 17:26:26 +0000 +Subject: [PATCH 051/127] fdt: Add support for the CONFIG_CMDLINE_EXTEND option + +--- + drivers/of/fdt.c | 29 ++++++++++++++++++++++++----- + 1 file changed, 24 insertions(+), 5 deletions(-) + +--- a/drivers/of/fdt.c ++++ b/drivers/of/fdt.c +@@ -954,22 +954,38 @@ int __init early_init_dt_scan_chosen(uns + + /* Retrieve command line */ + p = of_get_flat_dt_prop(node, "bootargs", &l); +- if (p != NULL && l > 0) +- strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); +- p = of_get_flat_dt_prop(node, "bootargs-append", &l); +- if (p != NULL && l > 0) +- strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE)); + + /* + * CONFIG_CMDLINE is meant to be a default in case nothing else + * managed to set the command line, unless CONFIG_CMDLINE_FORCE + * is set in which case we override whatever was found earlier. ++ * ++ * However, it can be useful to be able to treat the default as ++ * a starting point to be extended using CONFIG_CMDLINE_EXTEND. + */ ++ ((char *)data)[0] = '\0'; ++ + #ifdef CONFIG_CMDLINE +-#ifndef CONFIG_CMDLINE_FORCE +- if (!((char *)data)[0]) ++ strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); ++ ++ if (p != NULL && l > 0) { ++#if defined(CONFIG_CMDLINE_EXTEND) ++ int len = strlen(data); ++ if (len > 0) { ++ strlcat(data, " ", COMMAND_LINE_SIZE); ++ len++; ++ } ++ strlcpy((char *)data + len, p, min((int)l, COMMAND_LINE_SIZE - len)); ++#elif defined(CONFIG_CMDLINE_FORCE) ++ pr_warning("Ignoring bootargs property (using the default kernel command line)\n"); ++#else ++ /* Neither extend nor force - just override */ ++ strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); + #endif +- strlcpy(data, CONFIG_CMDLINE, COMMAND_LINE_SIZE); ++ } ++#else /* CONFIG_CMDLINE */ ++ if (p != NULL && l > 0) ++ strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE)); + #endif /* CONFIG_CMDLINE */ + + pr_debug("Command line is: %s\n", (char*)data); |