Re: [OpenWrt-Devel] [PATCH] allow HOST* variables to be set from config.
> >>> I’ve also found some of the tools include some headers from linux or >>> glibc that you wouldn’t find on mac os, >>> like linux/types.h and elf.h.I’ve extracted a sufficient set of >>> these headers and I install them /usr/local >>> >>> ( https://github.com/smoofra/fake-glibc ) >> If something relies on having linux/types.h on the host, then this is a >> bug that should be reported and fixed. > > I agree! There’s a bunch of bugs like this. I’ll send in some reports for > them. > Ugh! I’ve been carrying these silly headers around and fixing bugs in them. I fixed one today! But I uninstalled them and the same stuff that was breaking before isn’t breaking. I guess various autoconf scripts were just probing for linux headers regardless of whether they were building for linux or not. So it appears whatever bug first prompted me to create that silly headers repo has since been fixed, and i’ve been carrying it around for no reason :/ smime.p7s Description: S/MIME cryptographic signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: add 4.1 support
On 20 July 2015 at 07:52, Felix Fietkau wrote: > On 2015-07-20 01:06, Roman Yeryomin wrote: > >>> Also, refresh the kernel config and pay close attention to >>> 'disappearing' config symbols. In this case, CONFIG_NET_DSA got disabled >>> (along with the marvell 88e6060 driver) because it now requires >>> SWITCHDEV support. >>> Refreshing the config also revealed some missing config symbols in the >>> generic kernel config. >> >> I did add some missing symbol but how do you reveal those which were >> unitentionally disabled like in this case? Is there any automagic? > There's no automagic, but if you run make kernel_oldconfig and diff > against the previous config, it's easy to spot deletions and look into them. Oh, right, thanks for the tip! Regards, Roman ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: Allow to use ath79_gpio_output_select on QCA955x
On Wednesday 08 July 2015 10:20:07 Felix Fietkau wrote: > On 2015-06-25 16:30, Sven Eckelmann wrote: > > Signed-off-by: Sven Eckelmann > I had to revert this one because it was breaking the build (patch did > not apply). Please fix and re-submit Thanks for the info. Looks like it collides with a patch which was merged before this one. I will submit a rebased version. Kind regards, Sven signature.asc Description: This is a digitally signed message part. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: Add support for The QCA AP147-010 reference board
On Tuesday 07 July 2015 13:41:40 John Crispin wrote: > Hi, > > please split this into 1 patch for each QCA953x fix > and then a final patch for the ap147 support Thanks for the feedback. Looks like the QCA953x fixes were merged in r46207. I will submit a version of the patch without the QCA953x fixes after I tested it with the current trunk. Kind regards, Sven signature.asc Description: This is a digitally signed message part. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] allow HOST* variables to be set from config.
On 2015-07-20 05:25, Lawrence D'Anna wrote: > These HOST* variables are used to configure all the build-time tools, but the > user has no ability to modify them without editing makefiles. > > This patch adds a new menu to menuconfig which allows the user to set the host > compilers and flags. > > Signed-off-by: Lawrence D'Anna Based on our discussion, I don't want to merge this patch. I think the user shouldn't have to manually set host compiler and flags in menuconfig. I'd prefer to fix stuff by adding missing host builds, or by including extra directories in HOST_CFLAGS/HOST_LDFLAGS automatically based on the detected host system. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] allow HOST* variables to be set from config.
> On Jul 20, 2015, at 1:57 AM, Felix Fietkau wrote: > > On 2015-07-20 05:25, Lawrence D'Anna wrote: >> These HOST* variables are used to configure all the build-time tools, but the >> user has no ability to modify them without editing makefiles. >> >> This patch adds a new menu to menuconfig which allows the user to set the >> host >> compilers and flags. >> >> Signed-off-by: Lawrence D'Anna > Based on our discussion, I don't want to merge this patch. I think the > user shouldn't have to manually set host compiler and flags in > menuconfig. I'd prefer to fix stuff by adding missing host builds, or by > including extra directories in HOST_CFLAGS/HOST_LDFLAGS automatically > based on the detected host system. > > - Felix So it should look for homebrew and add /usr/local/include and /usr/local/opt/openssl/include? smime.p7s Description: S/MIME cryptographic signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] allow HOST* variables to be set from config.
On 2015-07-20 10:59, Lawrence D'Anna wrote: > >> On Jul 20, 2015, at 1:57 AM, Felix Fietkau wrote: >> >> On 2015-07-20 05:25, Lawrence D'Anna wrote: >>> These HOST* variables are used to configure all the build-time tools, but >>> the >>> user has no ability to modify them without editing makefiles. >>> >>> This patch adds a new menu to menuconfig which allows the user to set the >>> host >>> compilers and flags. >>> >>> Signed-off-by: Lawrence D'Anna >> Based on our discussion, I don't want to merge this patch. I think the >> user shouldn't have to manually set host compiler and flags in >> menuconfig. I'd prefer to fix stuff by adding missing host builds, or by >> including extra directories in HOST_CFLAGS/HOST_LDFLAGS automatically >> based on the detected host system. >> >> - Felix > > So it should look for homebrew and add /usr/local/include and > /usr/local/opt/openssl/include? Yes, add those directories with an ifeq ($(HOST_OS),Darwin) - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCHv3] ar71xx: add support for Onion Omega
This patch adds support for the Onion Omega. https://onion.io/omega Signed-off-by: L. D. Pinney Acked-by: Boken Lin Tested-by: Jacky Huang --- v2 @ kernel 3.18 v3 bumps the kernel to 4.1 target/linux/ar71xx/base-files/etc/diag.sh| 3 +++ target/linux/ar71xx/base-files/etc/uci-defaults/02_network| 4 target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh| 1 + target/linux/ar71xx/config-4.1| 1 + target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c | 84 + target/linux/ar71xx/generic/profiles/onion.mk | 16 ++ target/linux/ar71xx/image/Makefile| 9 target/linux/ar71xx/patches-4.1/700-MIPS-ath79-openwrt-machines.patch | 24 +++-- tools/firmware-utils/src/mktplinkfw.c | 6 ++ 10 files changed, 145 insertions(+), 6 deletions(-) diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 12c31c4..97ba1d8 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -173,6 +173,9 @@ get_status_led() { om5p-an) status_led="om5p:blue:power" ;; + onion-omega) + status_led="onion:amber:system" + ;; pb44) status_led="pb44:amber:jump1" ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index e7dc538..c010d3f 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -277,6 +277,10 @@ mynet-n750) [ -n "$mac" ] && ucidef_set_interface_macaddr "wan" "$mac" ;; +onion-omega) + ucidef_set_interface_lan "wlan0" + ;; + dhp-1565-a1 |\ dir-835-a1 |\ wndr3700v4 | \ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 9edd0cd..91e1629 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -556,6 +556,9 @@ ar71xx_board_detect() { *"OM5P AN") name="om5p-an" ;; + *"Onion Omega") + name="onion-omega" + ;; *PB42) name="pb42" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 98e607c..f5d67ef 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -312,6 +312,7 @@ platform_check_image() { el-mini | \ gl-inet | \ mc-mac1200r | \ + onion-omega | \ oolite | \ smart-300 | \ tl-mr10u | \ diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1 index 23ba27d..2982196 100644 --- a/target/linux/ar71xx/config-4.1 +++ b/target/linux/ar71xx/config-4.1 @@ -90,6 +90,7 @@ CONFIG_ATH79_MACH_NBG460N=y CONFIG_ATH79_MACH_NBG6716=y CONFIG_ATH79_MACH_OM2P=y CONFIG_ATH79_MACH_OM5P=y +CONFIG_ATH79_MACH_ONION_OMEGA=y CONFIG_ATH79_MACH_PB42=y CONFIG_ATH79_MACH_PB44=y CONFIG_ATH79_MACH_PB92=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c new file mode 100644 index 000..c739840 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-onion-omega.c @@ -0,0 +1,84 @@ +/* + * Onion Omega board support + * + * Copyright (C) 2015 Boken Lin + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include + +#include + +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define OMEGA_GPIO_LED_SYSTEM 27 +#define OMEGA_GPIO_BTN_RESET 11 + +#define OMEGA_GPIO_USB_POWER 8 + +#define OMEGA_KEYS_POLL_INTERVAL 20 /* msecs */ +#define OMEGA_KEYS_DEBOUNCE_INTERVAL (3 * OMEGA_KEYS_POLL_INTERVAL) + +static const char *omega_part_probes[] = { + "tp-link", + NULL, +}; + +static struct flash_platform_data omega_flash_data = { + .part_probes= omega_part_probes, +}; + +static struct gpio_led omega_leds_gpio[] __initdata = { + { + .name = "onion:amber:system", + .gpio = OMEGA_GPIO_LED_SYSTEM, + .active_low = 1, + }, +}; + +static st
Re: [OpenWrt-Devel] [PATCH] ar71xx: fix kernel Oops in at803x_link_change_notify
On Monday 06 July 2015 13:26:21 Christian Lamparter wrote: > On Friday, July 03, 2015 12:29:32 PM Sven Eckelmann wrote: > > > Sven, I've seen you did quite a bit of work on the OM5P-AN > > > with the same F1E-PHY. I went through the code from Atheros' > > > original driver SDK v17 (which was part of the GPL source > > > for the mynet). Apart from tx delay handling, everything > > > else matches perfectly, so the tx/rx delay code should be > > > enabled by default for this chip on all platforms without > > > needing any platform data overwrites. > > > > Interesting, I don't have the SDK and I am only using OpenWrt. So I cannot > > say > > anything about the Atheros driver. But sounds like you are right. At least > > all > > recent devices I had in my hand required this change. > Oh, I figured you have access to some of Qualcomm Atheros' SDKs > and most importantly: some documentations from Qualcomm Atheros? > I hoped you could confirm or disconfirm based on the documents. No, we don't have access to them. The tarball from Marek is the thing we have. And it doesn't contain information from Atheros beside the stuff which is already in OpenWrt. > > I don't have the equipment to check the actual signals (as you said in an > > earlier mail) - only some people which complained very loud when their long > > cable setup didn't work. > Long cable... That's a good point, I think I never tested the AT8035 with > anything beyond a 5m / 16 feet cable. Especially problematic devices seem to be (active/passive) POE switches + long cables. Kind regards, Sven signature.asc Description: This is a digitally signed message part. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ar71xx: fix kernel Oops in at803x_link_change_notify
On 7/20/15, Sven Eckelmann wrote: > On Monday 06 July 2015 13:26:21 Christian Lamparter wrote: >> Oh, I figured you have access to some of Qualcomm Atheros' SDKs >> and most importantly: some documentations from Qualcomm Atheros? >> I hoped you could confirm or disconfirm based on the documents. > > No, we don't have access to them. The tarball from Marek is the thing we > have. And it doesn't contain information from Atheros beside the stuff > which is already in OpenWrt. Ok, I can leave it there. In the mean time: I'm looking at what Chris send me about the AT8035 in his QCA9557/8 platform. Apparently, it's the same chip it says AT8035-A on the chip (and it shares the same phyid 0x004dd072). However, the Atheros' SDK calls it AT8033 too. Thing is, this chip no longer needs any workarounds, but it might need some extra init code now. (Currently, it isn't working yet, but we'll try to get it to work.) Regards, Christian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] generic: add more missing linux 4.1 symbols
Signed-off-by: Daniel Golle --- target/linux/generic/config-4.1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/generic/config-4.1 b/target/linux/generic/config-4.1 index 2dd4071..f4a9b83 100644 --- a/target/linux/generic/config-4.1 +++ b/target/linux/generic/config-4.1 @@ -3012,6 +3012,7 @@ CONFIG_PROC_SYSCTL=y # CONFIG_PROVE_LOCKING is not set # CONFIG_PROVE_RCU is not set # CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_PROVE_RCU_REPEATEDLY is not set # CONFIG_PSB6970_PHY is not set # CONFIG_PSTORE is not set # CONFIG_PTP_1588_CLOCK is not set @@ -3059,6 +3060,7 @@ CONFIG_PROC_SYSCTL=y # CONFIG_RBTREE_TEST is not set # CONFIG_RCU_CPU_STALL_INFO is not set CONFIG_RCU_CPU_STALL_TIMEOUT=60 +# CONFIG_RCU_EXPEDITE_BOOT is not set CONFIG_RCU_FANOUT=32 # CONFIG_RCU_FANOUT_EXACT is not set CONFIG_RCU_FANOUT_LEAF=16 @@ -4112,6 +4114,7 @@ CONFIG_TMPFS_XATTR=y # CONFIG_TPS65010 is not set # CONFIG_TPS6507X is not set # CONFIG_TR is not set +# CONFIG_TRACE_ENUM_MAP_FILE is not set # CONFIG_TRACEPOINT_BENCHMARK is not set # CONFIG_TRACER_SNAPSHOT is not set # CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP is not set -- 2.4.6 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mac80211: Clarify ath9k & ath10k debug selection
Ath debug mode applies to ath10k as well as ath9k. Update Makefile help text to clarify. Signed-off-by: Kevin Darbyshire-Bryant --- package/kernel/mac80211/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index cc98fb7..8d7ee68 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -515,7 +515,7 @@ define KernelPackage/ath/config bool "Atheros wireless debugging" help Say Y, if you want to debug atheros wireless drivers. - Right now only ath9k makes use of this. + Only ath9k & ath10k make use of this. config PACKAGE_ATH_DFS bool "Enable DFS support" -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] bugfix: FORCE=1 doesn't work to override prereq checks
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What prereq can be forced that makes force even a worthwhile option? If it works anyway, why not just drop the prereq check? If it still won't work, what's the point in allowing a force? Cheers, Karl P Lawrence D'Anna wrote: > If the build prereq checks fail, you get the message > >Prerequisite check failed. Use FORCE=1 to override. > > But re-trying with "make menuconfig FORCE=1" gives you the same result. > > This patch fixes that. > > Signed-off-by: Lawrence D'Anna > --- > include/prereq.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/prereq.mk b/include/prereq.mk > index 33ac278..770dafd 100644 > --- a/include/prereq.mk > +++ b/include/prereq.mk > @@ -14,7 +14,7 @@ prereq: > cat $(TMP_DIR)/.prereq-error; \ > rm -f $(TMP_DIR)/.prereq-error; \ > echo; \ > - false; \ > + $(if $(FORCE),true,false); \ > fi > > .SILENT: prereq -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVrRUxAAoJEBmotQ/U1cr2oB0QAL71YhXlaq/USVumEfaTqsUI ei2rBms4cVf7edreOvMKUBLIZ6mPgITcRJqtvgxxwhhbTYYoliDPiiLZ7EX2WqV5 IrwLV5EEwe2RK64vYxyvXujSvNepDqTo7UhqB2mNMMy6fGuSJRWD9QfIlS8z9BuL rhZfPpGGI9SovJNUhtz96y7mxFR+L7Wk7hh/DG93q0t/CpaQRsRBsSEDCpBzkENF UN/X/hK8mGoXcC8GLdtWXujigDUL5CQaZCdBvpFhuboimHp/Q1RoSmtLcnkqc2xb rUKJoMFRhC9BaoJpDsrcgs5AP1g5OzbaSelNkDL57IBfd8lxX9Yk7hSd4o5vmUp/ M99V6qVt81SIB9DRuJzejutEtObbjNFmLX2WohQSaUSs5FzRZL1Vk2uVrslqZKR7 pFnDpAAubVQhFm2Oz+aNKeRMCXgccBFcyvDzSOvhyDq9Wh5U0FeS9uFooESVpvrA vdMvTJxWXQBkw2hdUoqfLedFAsyPpOb9eDFl3eiZ0FrOJCoaBl5iByKzWcxdjIWW CpIEKcaUE4JjpC8vTSVF0st+ER8me50+790B3avZjPZxmzRdy/p0UpnY0FgJOfM+ w/TB3YTVNmu8v4ssQD2xqcNBbQxp49nZYSob6yG1o6qhVJnbE1AxwBoaNAjDxOT9 I3Ds5dUQS4wD7AZh7WNh =S04b -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Upgrade from CC RC2 to RC3
Hi guys, Would s/rc2/rc3/ on the opkg.conf lead to a clean upgrade or is it better to reflash? Best regards, Maciej ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] ar71xx: Allow to use ath79_gpio_output_select on QCA955x
Signed-off-by: Sven Eckelmann --- v2: Rebased to fix conflict with r46207 ...79-add-gpio-func-register-for-QCA955x-SoC.patch | 60 ++ ...79-add-gpio-func-register-for-QCA955x-SoC.patch | 60 ++ 2 files changed, 120 insertions(+) create mode 100644 target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch create mode 100644 target/linux/ar71xx/patches-4.1/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch diff --git a/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch new file mode 100644 index 000..af828b0 --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch @@ -0,0 +1,60 @@ +--- a/arch/mips/ath79/gpio.c b/arch/mips/ath79/gpio.c +@@ -185,15 +185,27 @@ void __init ath79_gpio_output_select(uns + { + void __iomem *base = ath79_gpio_base; + unsigned long flags; +- unsigned int reg; ++ unsigned int reg, reg_base; ++ unsigned long gpio_count; + u32 t, s; + +- BUG_ON(!soc_is_ar934x() && !soc_is_qca953x()); ++ if (soc_is_ar934x()) { ++ gpio_count = AR934X_GPIO_COUNT; ++ reg_base = AR934X_GPIO_REG_OUT_FUNC0; ++ } else if (soc_is_qca953x()) { ++ reg_base = QCA953X_GPIO_COUNT; ++ reg_base = QCA953X_GPIO_REG_OUT_FUNC0; ++ } else if (soc_is_qca955x()) { ++ gpio_count = QCA955X_GPIO_COUNT; ++ reg_base = QCA955X_GPIO_REG_OUT_FUNC0; ++ } else { ++ BUG(); ++ } + +- if (gpio >= AR934X_GPIO_COUNT) ++ if (gpio >= gpio_count) + return; + +- reg = AR934X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4); ++ reg = reg_base + 4 * (gpio / 4); + s = 8 * (gpio % 4); + + spin_lock_irqsave(&ath79_gpio_lock, flags); +--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +@@ -868,6 +868,14 @@ + #define QCA953X_GPIO_OUT_MUX_LED_LINK444 + #define QCA953X_GPIO_OUT_MUX_LED_LINK545 + ++#define QCA955X_GPIO_REG_OUT_FUNC00x2c ++#define QCA955X_GPIO_REG_OUT_FUNC10x30 ++#define QCA955X_GPIO_REG_OUT_FUNC20x34 ++#define QCA955X_GPIO_REG_OUT_FUNC30x38 ++#define QCA955X_GPIO_REG_OUT_FUNC40x3c ++#define QCA955X_GPIO_REG_OUT_FUNC50x40 ++#define QCA955X_GPIO_REG_FUNC 0x6c ++ + #define QCA956X_GPIO_REG_OUT_FUNC00x2c + #define QCA956X_GPIO_REG_OUT_FUNC10x30 + #define QCA956X_GPIO_REG_OUT_FUNC20x34 +@@ -1007,6 +1015,8 @@ + #define AR934X_GPIO_OUT_EXT_LNA0 46 + #define AR934X_GPIO_OUT_EXT_LNA1 47 + ++#define QCA955X_GPIO_OUT_GPIO 0 ++ + /* + * MII_CTRL block + */ diff --git a/target/linux/ar71xx/patches-4.1/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch b/target/linux/ar71xx/patches-4.1/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch new file mode 100644 index 000..af828b0 --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/739-MIPS-ath79-add-gpio-func-register-for-QCA955x-SoC.patch @@ -0,0 +1,60 @@ +--- a/arch/mips/ath79/gpio.c b/arch/mips/ath79/gpio.c +@@ -185,15 +185,27 @@ void __init ath79_gpio_output_select(uns + { + void __iomem *base = ath79_gpio_base; + unsigned long flags; +- unsigned int reg; ++ unsigned int reg, reg_base; ++ unsigned long gpio_count; + u32 t, s; + +- BUG_ON(!soc_is_ar934x() && !soc_is_qca953x()); ++ if (soc_is_ar934x()) { ++ gpio_count = AR934X_GPIO_COUNT; ++ reg_base = AR934X_GPIO_REG_OUT_FUNC0; ++ } else if (soc_is_qca953x()) { ++ reg_base = QCA953X_GPIO_COUNT; ++ reg_base = QCA953X_GPIO_REG_OUT_FUNC0; ++ } else if (soc_is_qca955x()) { ++ gpio_count = QCA955X_GPIO_COUNT; ++ reg_base = QCA955X_GPIO_REG_OUT_FUNC0; ++ } else { ++ BUG(); ++ } + +- if (gpio >= AR934X_GPIO_COUNT) ++ if (gpio >= gpio_count) + return; + +- reg = AR934X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4); ++ reg = reg_base + 4 * (gpio / 4); + s = 8 * (gpio % 4); + + spin_lock_irqsave(&ath79_gpio_lock, flags); +--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +@@ -868,6 +868,14 @@ + #define QCA953X_GPIO_OUT_MUX_LED_LINK444 + #define QCA953X_GPIO_OUT_MUX_LED_LINK545 + ++#define QCA955X_GPIO_REG_OUT_FUNC00x2c ++#define QCA955X_GPIO_REG_OUT_FUNC10x30 ++#define QCA955X_GPIO_REG_OUT_FUNC20x34 ++#define QCA955X_GPIO_REG_OUT_FUNC30x38 ++#define QCA955X_GPIO_REG_OUT_FUNC40x3c ++#define QCA955X_GPIO_REG_OUT_FUNC50x40 ++#define QCA955X_GPIO_REG_FUNC 0x6c ++ + #define QCA956X_GPIO_REG_OUT_FU
[OpenWrt-Devel] [PATCH v2 1/2] ar71xx: Add support for PCIe on QCA953x
Signed-off-by: Sven Eckelmann --- I got the chance to test the AP147-010 but got no software/SDK or documentation. Still wanted to post my results because the device worked well enough for me. I am not sure if it originally comes with a PCIe card (I've used at QCA9880 based one for my tests). Most of the SoC relevant code is based on the QCA955x implementation. v2: - split into two patches - rebased to fix conflict with r46207 .../740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch | 44 ++ .../740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch | 44 ++ 2 files changed, 88 insertions(+) create mode 100644 target/linux/ar71xx/patches-3.18/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch create mode 100644 target/linux/ar71xx/patches-4.1/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch diff --git a/target/linux/ar71xx/patches-3.18/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.18/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch new file mode 100644 index 000..a57351e --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch @@ -0,0 +1,44 @@ +--- a/arch/mips/ath79/pci.c b/arch/mips/ath79/pci.c +@@ -53,6 +53,15 @@ static const struct ath79_pci_irq ar724x + } + }; + ++static const struct ath79_pci_irq qca953x_pci_irq_map[] __initconst = { ++ { ++ .bus= 0, ++ .slot = 0, ++ .pin= 1, ++ .irq= ATH79_PCI_IRQ(0), ++ }, ++}; ++ + static const struct ath79_pci_irq qca955x_pci_irq_map[] __initconst = { + { + .bus= 0, +@@ -98,6 +107,9 @@ int __init pcibios_map_irq(const struct + soc_is_ar9344()) { + ath79_pci_irq_map = ar724x_pci_irq_map; + ath79_pci_nr_irqs = ARRAY_SIZE(ar724x_pci_irq_map); ++ } else if (soc_is_qca953x()) { ++ ath79_pci_irq_map = qca953x_pci_irq_map; ++ ath79_pci_nr_irqs = ARRAY_SIZE(qca953x_pci_irq_map); + } else if (soc_is_qca955x()) { + ath79_pci_irq_map = qca955x_pci_irq_map; + ath79_pci_nr_irqs = ARRAY_SIZE(qca955x_pci_irq_map); +@@ -303,6 +315,15 @@ int __init ath79_register_pci(void) +AR724X_PCI_MEM_SIZE, +0, +ATH79_IP2_IRQ(0)); ++ } else if (soc_is_qca9533()) { ++ pdev = ath79_register_pci_ar724x(0, ++ QCA953X_PCI_CFG_BASE0, ++ QCA953X_PCI_CTRL_BASE0, ++ QCA953X_PCI_CRP_BASE0, ++ QCA953X_PCI_MEM_BASE0, ++ QCA953X_PCI_MEM_SIZE, ++ 0, ++ ATH79_IP2_IRQ(0)); + } else if (soc_is_qca9558()) { + pdev = ath79_register_pci_ar724x(0, +QCA955X_PCI_CFG_BASE0, diff --git a/target/linux/ar71xx/patches-4.1/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-4.1/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch new file mode 100644 index 000..a57351e --- /dev/null +++ b/target/linux/ar71xx/patches-4.1/740-MIPS-ath79-add-PCI-for-QCA953x-SoC.patch @@ -0,0 +1,44 @@ +--- a/arch/mips/ath79/pci.c b/arch/mips/ath79/pci.c +@@ -53,6 +53,15 @@ static const struct ath79_pci_irq ar724x + } + }; + ++static const struct ath79_pci_irq qca953x_pci_irq_map[] __initconst = { ++ { ++ .bus= 0, ++ .slot = 0, ++ .pin= 1, ++ .irq= ATH79_PCI_IRQ(0), ++ }, ++}; ++ + static const struct ath79_pci_irq qca955x_pci_irq_map[] __initconst = { + { + .bus= 0, +@@ -98,6 +107,9 @@ int __init pcibios_map_irq(const struct + soc_is_ar9344()) { + ath79_pci_irq_map = ar724x_pci_irq_map; + ath79_pci_nr_irqs = ARRAY_SIZE(ar724x_pci_irq_map); ++ } else if (soc_is_qca953x()) { ++ ath79_pci_irq_map = qca953x_pci_irq_map; ++ ath79_pci_nr_irqs = ARRAY_SIZE(qca953x_pci_irq_map); + } else if (soc_is_qca955x()) { + ath79_pci_irq_map = qca955x_pci_irq_map; + ath79_pci_nr_irqs = ARRAY_SIZE(qca955x_pci_irq_map); +@@ -303,6 +315,15 @@ int __init ath79_register_pci(void) +AR724X_PCI_MEM_SIZE, +0, +ATH79_IP2_IRQ(0)); ++ } else if (soc_is_qca9533()) { ++ pde
[OpenWrt-Devel] [PATCH v2 2/2] ar71xx: Add support for AP147-010 reference board
Signed-off-by: Sven Eckelmann --- I got the chance to test the AP147-010 but got no software/SDK or documentation. Still wanted to post my results because the device worked well enough for me. I am not sure if it originally comes with a PCIe card (I've used at QCA9880 based one for my tests). Most of the SoC relevant code is based on the QCA955x implementation. v2: - split into two patches - rebased to fix conflict with r46207 target/linux/ar71xx/base-files/etc/diag.sh | 3 + .../ar71xx/base-files/etc/uci-defaults/01_leds | 9 ++ .../ar71xx/base-files/etc/uci-defaults/02_network | 7 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../lib/preinit/05_set_preinit_iface_ar71xx| 1 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3.18| 1 + target/linux/ar71xx/config-4.1 | 1 + .../ar71xx/files/arch/mips/ath79/mach-ap147.c | 125 + target/linux/ar71xx/generic/profiles/atheros.mk| 10 ++ target/linux/ar71xx/image/Makefile | 3 + target/linux/ar71xx/mikrotik/config-default| 1 + target/linux/ar71xx/nand/config-default| 1 + .../813-MIPS-ath79-add-ap147-support.patch | 42 +++ .../813-MIPS-ath79-add-ap147-support.patch | 42 +++ 15 files changed, 250 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-ap147.c create mode 100644 target/linux/ar71xx/patches-3.18/813-MIPS-ath79-add-ap147-support.patch create mode 100644 target/linux/ar71xx/patches-4.1/813-MIPS-ath79-add-ap147-support.patch diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index d997098..3619169 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -23,6 +23,9 @@ get_status_led() { ap136-020) status_led="ap136:green:status" ;; + ap147-010) + status_led="ap147:green:status" + ;; ap135-020) status_led="ap135:green:status" ;; diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 2abc023..7508052 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -46,6 +46,15 @@ ap113) ucidef_set_led_usbdev "usb" "USB" "ap113:green:usb" "1-1" ;; +ap147-010) + ucidef_set_led_netdev "wan" "WAN" "ap147:green:wan" "eth1" + ucidef_set_led_switch "lan1" "LAN1" "ap147:green:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "ap147:green:lan2" "switch0" "0x08" + ucidef_set_led_switch "lan3" "LAN3" "ap147:green:lan3" "switch0" "0x04" + ucidef_set_led_switch "lan4" "LAN4" "ap147:green:lan4" "switch0" "0x02" + ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "ap147:green:wlan-2g" "phy0tpt" + ;; + bullet-m | \ nanostation-m | \ rocket-m | \ diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index e7dc538..53b3a7f 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -46,6 +46,13 @@ ap136-010) ucidef_add_switch_vlan "switch0" "2" "5 6" ;; +ap147-010) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ucidef_add_switch "switch0" "1" "1" + ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4" + ucidef_add_switch_vlan "switch0" "2" "5 6" + ;; + ap136-020 |\ ap135-020 |\ tl-wr1043nd-v2 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 26a1c27..54c2253 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -365,6 +365,9 @@ ar71xx_board_detect() { *"AP143 reference board") name="ap143" ;; + *"AP147-010 reference board") + name="ap147-010" + ;; *AP81) name="ap81" ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx index f11ea8c..d214e9b 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx +++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx @@ -12,6 +12,7 @@ set_preinit_iface() { alfa-nx |\ ap135-020 |\ ap136-020 |\ + ap147-010 |\ ap83 |\ archer-c5 |\ archer-c7 |\ diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 6853f94..fc1ca9b 100755 --- a/target
Re: [OpenWrt-Devel] [PATCH] bugfix: FORCE=1 doesn't work to override prereq checks
> > What prereq can be forced that makes force even a worthwhile option? If > it works anyway, why not just drop the prereq check? If it still won't > work, what's the point in allowing a force? > In my case it was because the prereq checks didn’t think I had openssl because they didn’t use HOST_CPPFLAGS. smime.p7s Description: S/MIME cryptographic signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Chaos Calmer 15.05-rc3
On Fri, 17 Jul 2015, Cristian Morales Vega wrote: On 17 July 2015 at 16:43, Jonas Gorski wrote: What I don't understand is why there is so much interest in replicating RC3. It makes sense to have a RC3 so there are binaries and more people test it. But if you are going to build it yourself, shouldn't you just use whatever is the latest commit in git://git.openwrt.org/15.05/openwrt.git? That already has the tags for the feeds (http://git.openwrt.org/?p=15.05/openwrt.git;a=blob_plain;f=feeds.conf.default;hb=HEAD). Why to build a RC3 with the bugs that have already been solved and will not be there in RC4/final? if someone is wanting to test specific changes, it's always best to only apply the one change you want to test. Compiling trunk brings in a lot more changes, some of which may introduce bugs (that should be squashed before RC4/Final, but can catch someone in the meantime) David Lang ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] brcm63xx: use new tool for generating redboot images
Simplify image/Makefile by using the new perl script for RedBoot. Signed-off-by: Álvaro Fernández Rojas --- v2: fix livebox (redboot) image generation. target/linux/brcm63xx/image/Makefile | 20 +--- target/linux/brcm63xx/image/redbootscript.template | 15 --- 2 files changed, 5 insertions(+), 30 deletions(-) delete mode 100644 target/linux/brcm63xx/image/redbootscript.template diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index 98d1452..b9f2c22 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -100,21 +100,11 @@ define Image/Build/RedBootDTB dd if=$(KDIR)/root.squashfs of="$(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs" bs=64k conv=sync echo -ne \\xDE\\xAD\\xC0\\xDE >> "$(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs" # Generate the scripted image - $(CP) ./redbootscript.template $(BIN_DIR)/redbootscript - let \ - kernellen="(stat -c%s $(BIN_DIR)/$(IMG_PREFIX)-$(2)-vmlinux.gz)" \ - rootfsdatalen="(stat -c %s $(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs)" \ - rootfsaddr="0xBE43 + kernellen" \ - rootfslen="0xBEBF - rootfsaddr" \ - offset2="0x1000 + kernellen"; \ - $(SED) "s,%loadaddr,$(strip $(LOADADDR)),g" \ - -e "s,%kernellen,(printf '%#x' kernellen),g" \ - -e "s,%offset2,(printf '%#x' offset2),g" \ - -e "s,%rootfsdatalen,(printf '%#x' rootfsdatalen),g" \ - -e "s,%rootfsaddr,(printf '%#x' rootfsaddr),g" \ - -e "s,%rootfslen,(printf '%#x' rootfslen),g" \ - "$(BIN_DIR)/redbootscript" - + $(TOPDIR)/scripts/redboot-script.pl \ + -k $(BIN_DIR)/$(IMG_PREFIX)-$(2)-vmlinux.gz \ + -r $(BIN_DIR)/$(IMG_PREFIX)-$(2)-root.squashfs \ + -a $(strip $(LOADADDR)) -f 0xbe43 -l 0x7c \ + -s 0x1000 -t 20 -o $(BIN_DIR)/redbootscript dd if="$(BIN_DIR)/redbootscript" of="$(BIN_DIR)/redbootscript.padded" bs=4096 conv=sync cat \ "$(BIN_DIR)/redbootscript.padded" \ diff --git a/target/linux/brcm63xx/image/redbootscript.template b/target/linux/brcm63xx/image/redbootscript.template deleted file mode 100644 index a007c84..000 --- a/target/linux/brcm63xx/image/redbootscript.template +++ /dev/null @@ -1,15 +0,0 @@ -fis init -f - -fconfig boot_script true -fconfig boot_script_data -fis load -b %loadaddr -d kernel -exec -c "noinitrd" %loadaddr - - -fconfig boot_script_timeout 20 - -fis create -o 0x1000 -f 0xBE43 -l %kernellen kernel - -fis create -o %offset2 -s %rootfsdatalen -f %rootfsaddr -l %rootfslen rootfs - -reset -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/3] scripts: add tool for generating redboot scripts
This tool avoids generating the redboot script directly from Makefile, which can get really complicated when adapting image/Makefile to the new IB system. Signed-off-by: Álvaro Fernández Rojas --- v2: fix livebox (redboot) image generation. scripts/redboot-script.pl | 111 ++ 1 file changed, 111 insertions(+) create mode 100755 scripts/redboot-script.pl diff --git a/scripts/redboot-script.pl b/scripts/redboot-script.pl new file mode 100755 index 000..123ebe3 --- /dev/null +++ b/scripts/redboot-script.pl @@ -0,0 +1,111 @@ +#!/usr/bin/perl +# +# Script for generating redboot configs, based on brcmImage.pl +# +# Copyright (C) 2015 Álvaro Fernández Rojas +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# + +use strict; +use Getopt::Std; +use File::stat; + +my $version = "0.1"; +my %arg = ( + o => 'redboot.script', + s => 0x1000, + f => 0xbe43, + a => 0x8001, + l => 0x7c, + t => 20, +); +my $prog = $0; +$prog =~ s/^.*\///; +getopts("r:k:o:s:f:a:l:t:vh", \%arg); + +die "usage: $prog ~opts~ + + -r : input rootfs file + -k : input kernel file + -o : output image file, default $arg{o} + -s : redboot script size, default ".sprintf('%d', parse_num($arg{s}))." + -f : flash base, default ".sprintf('0x%x', parse_num($arg{f}))." + -a : Kernel load address, default ".sprintf('0x%x', parse_num($arg{a}))." + -l : linux partition size, default ".sprintf('0x%x', parse_num($arg{l}))." + -t : redboot script timeout, default ".sprintf('%d', parse_num($arg{t}))." + -v : be more verbose + -h : help, version $version + +EXAMPLES: +$prog -k kern -r rootfs +" if $arg{h} || !$arg{k} || !$arg{r}; + +sub parse_num +{ + my $num = @_[0]; + if (index(lc($num), lc("0x")) == 0) { + return hex($num); + } else { + return $num + 0; + } +} + +sub gen_script +{ + my $kernel_off = parse_num($arg{s}); + my $kernel_addr = parse_num($arg{f}); + my $kernel_len = stat($arg{k})->size; + + my $rootfs_off = $kernel_off + $kernel_len; + my $rootfs_addr = $kernel_addr + $kernel_len; + my $rootfs_len = parse_num($arg{l}) - $kernel_len; + my $rootfs_size = stat($arg{r})->size; + + my $load_addr = parse_num($arg{a}); + + my $timeout = parse_num($arg{t}); + + if ($arg{v}) { + printf "kernel_off: 0x%x(%u)\n", $kernel_off, $kernel_off; + printf "kernel_addr: 0x%x(%u)\n", $kernel_addr, $kernel_addr; + printf "kernel_len: 0x%x(%u)\n", $kernel_len, $kernel_len; + + printf "rootfs_off: 0x%x(%u)\n", $rootfs_off, $rootfs_off; + printf "rootfs_addr: 0x%x(%u)\n", $rootfs_addr, $rootfs_addr; + printf "rootfs_len: 0x%x(%u)\n", $rootfs_len, $rootfs_len; + printf "rootfs_size: 0x%x(%u)\n", $rootfs_size, $rootfs_size; + } + + open(FO, ">$arg{o}"); + printf FO "fis init -f\n"; + printf FO "\n"; + printf FO "fconfig boot_script true\n"; + printf FO "fconfig boot_script_data\n"; + printf FO "fis load -b 0x%x -d kernel\n", $load_addr; + printf FO "exec -c \"noinitrd\" 0x%x\n", $load_addr; + printf FO "\n"; + printf FO "fconfig boot_script_timeout %d\n", $timeout; + printf FO "\n"; + printf FO "fis create -o 0x%x -f 0x%x -l 0x%x kernel\n", $kernel_off, $kernel_addr, $kernel_len; + printf FO "\n"; + printf FO "fis create -o 0x%x -s 0x%x -f 0x%x -l 0x%x rootfs\n", $rootfs_off, $rootfs_size, $rootfs_addr, $rootfs_len; + printf FO "\n"; + printf FO "reset\n"; + close FO; +} + +# MAIN +gen_script(); -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/3] brcm63xx: switch to new image building system
Switches BCM63xx to the new IB system. Images are generated per device definitions. There are no changes in the produced images except for some name changes, caused by the new IB system. Signed-off-by: Álvaro Fernández Rojas --- v2: improvements suggested by Jonas - Fix livebox (redboot) image generation. - Use more descriptive comments. - Keep removed comments at the appropriate places. - Use camel case for definition names. - Drop the "add_" prefix from the device macros. - Avoid creating duplicated ramdisks for devices with multiple images. Reverting to one ramdisk per dtb is too hackish with the new IB system. - Add Device/Default description (automatically called by the new IB system). target/linux/brcm63xx/image/Makefile | 757 +++ 1 file changed, 497 insertions(+), 260 deletions(-) diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index b9f2c22..9efec87 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2006-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -26,6 +26,73 @@ RELOCATE_MAKEOPTS= \ CROSS_COMPILE=$(TARGET_CROSS) \ LZMA_TEXT_START=$(LOADER_ENTRY) +define Build/Compile + rm -rf $(KDIR)/relocate + $(CP) ../../generic/image/relocate $(KDIR) + $(MAKE) -C $(KDIR)/relocate $(RELOCATE_MAKEOPTS) +endef + +### Kernel scripts ### +define Build/append-dtb + $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb) + cat $@.dtb >> $@ +endef + +define Build/gzip + gzip -9 -c $@ > $@.gz + mv $@.gz $@ +endef + +define Build/hcs-initramfs + $(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_bytes=$(HCS_MAGIC_BYTES) \ + --rev_maj=$(HCS_REV_MAJ) --rev_min=$(HCS_REV_MIN) --input_file=$@ \ + --output_file=$@.hcs --ldaddress=$(LOADADDR) + mv $@.hcs $@ +endef + +define Build/loader-lzma + rm -rf $@.src + $(MAKE) -C lzma-loader \ + $(LOADER_MAKEOPTS) \ + PKG_BUILD_DIR="$@.src" \ + TARGET_DIR="$(dir $@)" \ + LOADER_DATA="$@" \ + LOADER_NAME="$(notdir $@)" \ + compile loader.$(1) + mv "$@.$(1)" "$@" + rm -rf $@.src +endef + +define Build/lzma + # CFE is a LZMA nazi! It took me hours to find out the parameters! + # Also I think lzma has a bug cause it generates different output depending on + # if you use stdin / stdout or not. Use files instead of stdio here, cause + # otherwise CFE will complain and not boot the image. + $(STAGING_DIR_HOST)/bin/lzma e $@ -d22 -fb64 -a1 $@.lzma + mv $@.lzma $@ +endef + +define Build/lzma-cfe + # Strip out the length, CFE doesn't like this + dd if=$@ of=$@.lzma.cfe bs=5 count=1 + dd if=$@ of=$@.lzma.cfe ibs=13 obs=5 skip=1 seek=1 conv=notrunc + mv $@.lzma.cfe $@ +endef + +define Build/relocate-kernel + # CFE only allows ~4 MiB for the uncompressed kernels, but uncompressed + # kernel might get larger than that, so let CFE unpack and load at a + # higher address and make the kernel relocate itself to the expected + # location. + ( \ + dd if=$(KDIR)/relocate/loader.bin bs=32 conv=sync && \ + perl -e '@s = stat("$@"); print pack("N", @s[7])' && \ + cat $@ \ + ) > $@.relocate + mv $@.relocate $@ +endef + +### Image scripts ### define rootfspad/jffs2-128k --align-rootfs endef @@ -39,379 +106,549 @@ define Image/LimitName16 $(shell expr substr "$(1)" 1 16) endef -TARGET_DTBS:= -TARGET_IMAGES:= - -TARGET_Default_DTBS:= -TARGET_Default_IMAGES:= +define Image/FileSystemStrip +$(subst root.,,$(notdir $(1))) +endef -define Image/Build/CFEDTB - # Generate the tagged image - $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(3).lzma.cfe -f $(KDIR)/root.$(1) \ - --output $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1)-cfe.bin \ - --boardid $(4) --chipid $(5) --entry $(LOADER_ENTRY) \ - --load-addr $(LOADER_ENTRY) --info1 "-$(call Image/LimitName16,$(2))" \ - $(call rootfspad/$(1)) \ - --info2 $(1) $(6) +define Build/cfe-bin + $(STAGING_DIR_HOST)/bin/imagetag -i $(word 1,$^) -f $(word 2,$^) \ + --output $@ --boardid $(CFE_BOARD_ID) --chipid $(CFE_CHIP_ID) \ + --entry $(LOADER_ENTRY) --load-addr $(LOADER_ENTRY) \ + --info1 "$(call Image/LimitName16,$(DEVICE_NAME))" \ + --info2 "$(call Image/FileSystemStrip,$(word 2,$^))" \ + $(call rootfspad/$(call Image/FileSystemStrip,$(word 2,$^))) \ + $(CFE_EXTRAS) $(1) endef -define Image/Build/OLDCFEDTB - # Generate the tagged image
[OpenWrt-Devel] nexx wt3020 broken
Hey guys, i am wondering why are the nexx wt3020 images being built for CC if they are broken? https://downloads.openwrt.org/chaos_calmer/15.05-rc3/ramips/mt7620/ Also can the maintainer of the nexx wt3020 patchset take a look at the issue and solve the device bricking? Thanks! ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Upgrade from CC RC2 to RC3
On 2015-07-20 18:49, Maciej Soltysiak wrote: > Hi guys, > > Would s/rc2/rc3/ on the opkg.conf lead to a clean upgrade or is it > better to reflash? Upgrading via opkg doesn't work. You need to reflash. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH procd] jail: fix jail root folder permissions
We need a+x rights on the path to the root of the jails so we can use users other than root (like nobody) This partly fixes jailed dnsmasq Signed-off-by: Etienne CHAMPETIER --- jail/jail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jail/jail.c b/jail/jail.c index a6de133..2bba292 100644 --- a/jail/jail.c +++ b/jail/jail.c @@ -143,7 +143,7 @@ static int build_jail(const char *path) mkdir(path, 0755); - if (mount("tmpfs", path, "tmpfs", MS_NOATIME, "mode=0744")) { + if (mount("tmpfs", path, "tmpfs", MS_NOATIME, "mode=0755")) { ERROR("tmpfs mount failed %s\n", strerror(errno)); return -1; } -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] base-files: fix /tmp/.jail permissions
We need a+x rights on the path to the root of the jails so we can use users other than root (like nobody) This partly fixes jailed dnsmasq Signed-off-by: Etienne CHAMPETIER --- package/base-files/files/etc/init.d/boot | 1 - 1 file changed, 1 deletion(-) diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 6950130..a53be74 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -29,7 +29,6 @@ boot() { mkdir -p /tmp/.uci chmod 0700 /tmp/.uci mkdir -p /tmp/.jail - chmod 0700 /tmp/.jail touch /var/log/wtmp touch /var/log/lastlog touch /tmp/resolv.conf.auto -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] dnsmasq: add some missing files to the jail
found with strace, not sure we got all of them though Signed-off-by: Etienne CHAMPETIER --- package/network/services/dnsmasq/files/dnsmasq.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index b0a5fbc..676c4b7 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -556,7 +556,7 @@ start_service() { procd_set_param respawn procd_add_jail dnsmasq ubus log - procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE /etc/passwd /dev/urandom /etc/dnsmasq.conf /tmp/dnsmasq.d /tmp/resolv.conf.auto /etc/hosts /etc/ethers + procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom /etc/dnsmasq.conf /tmp/dnsmasq.d /tmp/resolv.conf.auto /etc/hosts /etc/ethers procd_add_jail_mount_rw /var/run/dnsmasq/ /tmp/dhcp.leases $TIMESTAMPFILE procd_close_instance -- 2.4.3 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Request before RC4/final
Folks- I would REALLY like to see ticket 19085 (https://dev.openwrt.org/ticket/19085) fixed before we finalize CC. It is a showstopper for a piece of popular hardware I use frequently. I haven't seen any progress reports on it in a couple of weeks, the coding itself is well out of my depth, so I am just hoping that someone is addressing it (or can soon). Thanks, Bill ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Upgrade from CC RC2 to RC3
On 20/07/2015 22:38, Felix Fietkau wrote: > On 2015-07-20 18:49, Maciej Soltysiak wrote: >> Hi guys, >> >> Would s/rc2/rc3/ on the opkg.conf lead to a clean upgrade or is it >> better to reflash? > Upgrading via opkg doesn't work. You need to reflash. > > - Felix > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > what felix meant to say is that after a sysupgrade you need to restore opkg.conf from /rom or apply the regex you posted John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Request before RC4/final
On 21/07/2015 01:59, Bill wrote: > Folks- > > I would REALLY like to see ticket 19085 > (https://dev.openwrt.org/ticket/19085) fixed before we finalize CC. It > is a showstopper for a piece of popular hardware I use frequently. > > I haven't seen any progress reports on it in a couple of weeks, the > coding itself is well out of my depth, so I am just hoping that someone > is addressing it (or can soon). > > Thanks, > > Bill Hi Bill, sure thing, please send a properly formatted patch to this mailinglist with the fix. John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] nexx wt3020 broken
On 20/07/2015 22:19, Daniel Petre wrote: > Hey guys, > i am wondering why are the nexx wt3020 images being built for CC if they are > broken? > > https://downloads.openwrt.org/chaos_calmer/15.05-rc3/ramips/mt7620/ > > Also can the maintainer of the nexx wt3020 patchset take a look at the issue > and solve the device bricking? > ok, send him an email please and ask him to provide a fixup patch. John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] nexx wt3020 broken
On 21/07/2015 07:24, John Crispin wrote: > > > On 20/07/2015 22:19, Daniel Petre wrote: >> Hey guys, >> i am wondering why are the nexx wt3020 images being built for CC if they are >> broken? >> >> https://downloads.openwrt.org/chaos_calmer/15.05-rc3/ramips/mt7620/ >> >> Also can the maintainer of the nexx wt3020 patchset take a look at the issue >> and solve the device bricking? >> > > ok, send him an email please and ask him to provide a fixup patch. > > John https://lists.openwrt.org/pipermail/openwrt-devel/2014-October/028815.html this is the original submission so you probably want to ping roger John > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] gcc: add a darwin-compatibility patch for ansidecl.h
Sorry! disregard this patch please. The problem I was seeing had nothing to do with Xcode. It was because Homebrew’s binutils had installed its own ansidecl.h which was being used instead of the ansidecl.h that came with the gcc sources. > On Jul 19, 2015, at 6:52 PM, Lawrence D'Anna wrote: > > ansidecl.h is using _ANSIDECL_H as it's guard #ifdef. But names that start > with > underscore are reserved, and the latest version of Xcode seems to be > exercising > its prerogative to define _ANSIDECL_H. > > Signed-off-by: Lawrence D'Anna > --- > toolchain/gcc/patches/4.8-linaro/999-ansidecl-h.patch | 13 + > 1 file changed, 13 insertions(+) > create mode 100644 toolchain/gcc/patches/4.8-linaro/999-ansidecl-h.patch > > diff --git a/toolchain/gcc/patches/4.8-linaro/999-ansidecl-h.patch > b/toolchain/gcc/patches/4.8-linaro/999-ansidecl-h.patch > new file mode 100644 > index 000..d7267b3 > --- /dev/null > +++ b/toolchain/gcc/patches/4.8-linaro/999-ansidecl-h.patch > @@ -0,0 +1,13 @@ > +--- a/include/ansidecl.h > b/include/ansidecl.h > +@@ -112,8 +112,8 @@ Foundation, Inc., 51 Franklin Street - F > +CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, > +AND, DOTS, NOARGS. Don't use them. */ > + > +-#ifndef _ANSIDECL_H > +-#define _ANSIDECL_H 1 > ++#ifndef ANSIDECL_H > ++#define ANSIDECL_H 1 > + > + #ifdef __cplusplus > + extern "C" { > -- > 2.3.8 (Apple Git-58) > smime.p7s Description: S/MIME cryptographic signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel