Skip to content
Snippets Groups Projects
Commit ab10be9f authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

We're on Chaos Calmer now

parent 63165e80
No related branches found
No related tags found
No related merge requests found
Showing
with 26 additions and 35617 deletions
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 10 Mar 2015 13:17:06 +0100
Subject: ath10k: update firmware to the latest version
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index b96e782..629692d 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -129,7 +129,7 @@ endef
$(eval $(call Download,linux-firmware))
PKG_ATH10K_LINUX_FIRMWARE_NAME:=ath10k-firmware
-PKG_ATH10K_LINUX_FIRMWARE_VERSION:=38eeda3ae6f90fde5546bdd48ee4ff3090f238c0
+PKG_ATH10K_LINUX_FIRMWARE_VERSION:=232b419e71dab27b52b96e80ea7649ed67bdac77
PKG_ATH10K_LINUX_FIRMWARE_SOURCE:=$(PKG_ATH10K_LINUX_FIRMWARE_NAME)-$(PKG_ATH10K_LINUX_FIRMWARE_VERSION).tar.bz2
PKG_ATH10K_LINUX_FIRMWARE_PROTO:=git
PKG_ATH10K_LINUX_FIRMWARE_SOURCE_URL:=https://github.com/kvalo/ath10k-firmware.git
@@ -1821,18 +1821,17 @@ endef
define KernelPackage/ath10k/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
-ifeq ($(CONFIG_ATH10K_STA_FW),y)
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/ath10k/QCA988X/hw2.0/board.bin \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/
+ifeq ($(CONFIG_ATH10K_STA_FW),y)
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/main/firmware-2.bin_999.999.0.636 \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
else
$(INSTALL_DATA) \
- $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/ath10k/QCA988X/hw2.0/board.bin \
- $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/ath10k/QCA988X/hw2.0/firmware-2.bin \
- $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
+ $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.2/firmware-3.bin_10.2-00082-4-2 \
+ $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-3.bin
endif
endef
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 10 Mar 2015 13:17:23 +0100
Subject: at71xx: TP-LINK Archer: add 5GHz led entry
Add 5GHz led entry after r44033.
Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
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 a74b8f4..36fe028 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -326,6 +326,7 @@ tl-wdr4900-v2)
ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "2-1"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:blue:wlan2g" "phy0tpt"
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "tp-link:blue:wlan5g" "phy1tpt"
;;
tl-wr741nd)
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 10 Mar 2015 14:06:01 +0100
Subject: ar71xx: fix switched WLAN LEDs on TP-LINK Archer C5/C7
ath10k is loaded before ath9k, so the 5GHz adapter becomes phy0.
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 36fe028..315a9fd 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -320,8 +320,6 @@ tl-wdr4300)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:blue:wlan2g" "phy0tpt"
;;
-archer-c5|\
-archer-c7|\
tl-wdr4900-v2)
ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "2-1"
@@ -329,6 +327,14 @@ tl-wdr4900-v2)
ucidef_set_led_wlan "wlan5g" "WLAN5G" "tp-link:blue:wlan5g" "phy1tpt"
;;
+archer-c5|\
+archer-c7)
+ ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1"
+ ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "2-1"
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:blue:wlan2g" "phy1tpt"
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "tp-link:blue:wlan5g" "phy0tpt"
+ ;;
+
tl-wr741nd)
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x02"
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 11 Mar 2015 18:30:54 +0100
Subject: uClibc: fix syscall() for syscalls with 6 arguments on PowerPC
Patch from the uClibc master.
Fixes the package fastd on PowerPC.
diff --git a/toolchain/uClibc/patches-0.9.33.2/470-powerpc_syscall6.patch b/toolchain/uClibc/patches-0.9.33.2/470-powerpc_syscall6.patch
new file mode 100644
index 0000000..9511dcc
--- /dev/null
+++ b/toolchain/uClibc/patches-0.9.33.2/470-powerpc_syscall6.patch
@@ -0,0 +1,10 @@
+--- a/libc/sysdeps/linux/powerpc/syscall.S
++++ b/libc/sysdeps/linux/powerpc/syscall.S
+@@ -30,6 +30,7 @@ syscall:
+ mr 5,6
+ mr 6,7
+ mr 7,8
++ mr 8,9
+ sc
+ bnslr;
+
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 12 Mar 2015 16:57:32 +0100
Subject: ar71xx: Add build profile for the gl-inet 6416A and 6408A
Patch to add the buildprofile for the GL-Init-6408A-v1 and the GL-Inet-6416A-v1
Both devices are identical, only difference is one comes with 8MB flash and
the other with 16MB flash
Official website: http://www.gl-inet.com/w/?page_id=241&lang=en
Comprehensive list of specs: https://revspace.nl/GL-Inet
Signed-off-by: Martijn Zilverschoon <martijn@friedzombie.com>
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 8505ac4..fc59c33 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1216,7 +1216,8 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,ARCHERC7V1,archer-c7-v1,ARCHER-C7
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,ARCHERC7V2,archer-c7-v2,ARCHER-C7,ttyS0,115200,0xc7000002,1,16Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,ELM150,el-m150,EL-M150,ttyATH0,115200,0x01500101,1,8Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,ELMINI,el-mini,EL-MINI,ttyATH0,115200,0x01530001,1,8Mlzma))
-$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,GLINET,gl-inet-v1,GL-INET,ttyATH0,115200,0x08000001,1,8Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,GLINET6408A,gl-inet-6408A-v1,GL-INET,ttyATH0,115200,0x08000001,1,8Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,GLINET6416A,gl-inet-6416A-v1,GL-INET,ttyATH0,115200,0x08000001,1,16Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR10U,tl-mr10u-v1,TL-MR10U,ttyATH0,115200,0x00100101,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV1,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV2,tl-mr11u-v2,TL-MR11U,ttyATH0,115200,0x00110102,1,4Mlzma))
@@ -1304,6 +1305,7 @@ $(eval $(call MultiProfile,AP136,AP136_010 AP136_020))
$(eval $(call MultiProfile,ARCHERC7, ARCHERC5 ARCHERC7V1 ARCHERC7V2))
$(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT EWDORIN16M))
$(eval $(call MultiProfile,OPENMESH,OM2P OM5P MR600))
+$(eval $(call MultiProfile,GLINET,GLINET6408A GLINET6416A))
$(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
$(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
$(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 13 Mar 2015 11:59:58 +0100
Subject: ar71xx: detect GL.iNet model
There are two versions of the GL.iNet, the 6408A and the 6416A. The only
difference is the flash size.
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 61a7936..a698ce5 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -262,6 +262,19 @@ tplink_pharos_board_detect() {
[ -n "$model" ] && AR71XX_MODEL="$model v$2"
}
+gl_inet_board_detect() {
+ local size="$(mtd_get_part_size 'firmware')"
+
+ case "$size" in
+ 8192000)
+ AR71XX_MODEL='GL-iNet 6408A v1'
+ ;;
+ 16580608)
+ AR71XX_MODEL='GL-iNet 6416A v1'
+ ;;
+ esac
+}
+
ar71xx_board_detect() {
local machine
local name
@@ -380,6 +393,7 @@ ar71xx_board_detect() {
;;
*"GL-CONNECT INET v1")
name="gl-inet"
+ gl_inet_board_detect
;;
*"EnGenius ESR1750")
name="esr1750"
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 15 Mar 2015 18:06:49 +0100
Subject: firmware-utils: allow passing a specific MBR signature to ptgen
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
diff --git a/tools/firmware-utils/src/ptgen.c b/tools/firmware-utils/src/ptgen.c
index 0247fd0..6379ed7 100644
--- a/tools/firmware-utils/src/ptgen.c
+++ b/tools/firmware-utils/src/ptgen.c
@@ -28,6 +28,7 @@
#include <stdio.h>
#include <ctype.h>
#include <fcntl.h>
+#include <stdint.h>
#if __BYTE_ORDER == __BIG_ENDIAN
#define cpu_to_le16(x) bswap_16(x)
@@ -124,7 +125,7 @@ static inline unsigned long round_to_kb(long sect) {
}
/* check the partition sizes and write the partition table */
-static int gen_ptable(int nr)
+static int gen_ptable(uint32_t signature, int nr)
{
struct pte pte[4];
unsigned long sect = 0;
@@ -159,6 +160,12 @@ static int gen_ptable(int nr)
return -1;
}
+ lseek(fd, 440, SEEK_SET);
+ if (write(fd, &signature, sizeof(signature)) != sizeof(signature)) {
+ fprintf(stderr, "write failed.\n");
+ goto fail;
+ }
+
lseek(fd, 446, SEEK_SET);
if (write(fd, pte, sizeof(struct pte) * 4) != sizeof(struct pte) * 4) {
fprintf(stderr, "write failed.\n");
@@ -187,8 +194,9 @@ int main (int argc, char **argv)
char type = 0x83;
int ch;
int part = 0;
+ uint32_t signature = 0x5452574F; /* 'OWRT' */
- while ((ch = getopt(argc, argv, "h:s:p:a:t:o:vl:")) != -1) {
+ while ((ch = getopt(argc, argv, "h:s:p:a:t:o:vl:S:")) != -1) {
switch (ch) {
case 'o':
filename = optarg;
@@ -221,6 +229,9 @@ int main (int argc, char **argv)
case 'l':
kb_align = (int) strtoul(optarg, NULL, 0) * 2;
break;
+ case 'S':
+ signature = strtoul(optarg, NULL, 0);
+ break;
case '?':
default:
usage(argv[0]);
@@ -229,6 +240,6 @@ int main (int argc, char **argv)
argc -= optind;
if (argc || (heads <= 0) || (sectors <= 0) || !filename)
usage(argv[0]);
-
- return gen_ptable(part);
+
+ return gen_ptable(signature, part);
}
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 23 Mar 2015 21:11:41 +0100
Subject: x86: use PARTUUID instead explicitly specifying the device by default
This changes the x86 image generation to match x86_64, using the PARTUUID for
the rootfs instead of explicitly configuring the device.
It unbreaks KVM with VirtIO, which uses /dev/vda2 instead of /dev/sda2.
Tested in QEMU/KVM with VirtIO, VirtualBox and VMware.
diff --git a/config/Config-images.in b/config/Config-images.in
index 39e51e4..f44ec73 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -267,8 +267,6 @@ menu "Target Images"
config TARGET_ROOTFS_PARTNAME
string "Root partition on target device"
depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
- default "/dev/xvda2" if TARGET_x86_xen_domu
- default "/dev/sda2" if ! TARGET_x86_xen_domu
help
The root partition on the final device. If you don't know,
you probably want the default (/dev/sda2).
diff --git a/target/linux/x86/base-files/lib/preinit/79_move_config b/target/linux/x86/base-files/lib/preinit/79_move_config
index 0bffbab..1d4873d 100644
--- a/target/linux/x86/base-files/lib/preinit/79_move_config
+++ b/target/linux/x86/base-files/lib/preinit/79_move_config
@@ -1,21 +1,14 @@
#!/bin/sh
-# Copyright (C) 2012 OpenWrt.org
+# Copyright (C) 2012-2015 OpenWrt.org
move_config() {
- local rootfsdev
- local rootfstype
-
- rootfstype="$(awk 'BEGIN { RS=" "; FS="="; } ($1 == "rootfstype") { print $2 }' < /proc/cmdline)"
- case "$rootfstype" in
- squashfs|jffs2)
- rootfsdev="$(awk 'BEGIN { RS=" "; FS="="; } ($1 == "block2mtd.block2mtd") { print substr($2,1,index($2, ",")-1) }' < /proc/cmdline)";;
- ext4)
- rootfsdev="$(awk 'BEGIN { RS=" "; FS="="; } ($1 == "root") { print $2 }' < /proc/cmdline)";;
- esac
+ . /lib/upgrade/platform.sh
- mount -t ext4 -o rw,noatime "${rootfsdev%[0-9]}1" /mnt
- mv -f /mnt/sysupgrade.tgz /
- umount /mnt
+ if platform_export_bootpart; then
+ mount -t ext4 -o rw,noatime "$BOOTPART" /mnt
+ mv -f /mnt/sysupgrade.tgz /
+ umount /mnt
+ fi
}
boot_hook_add preinit_mount_root move_config
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh
index a2dd20a..73ab5ef 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -1,16 +1,38 @@
-x86_get_rootfs() {
- local rootfsdev
- local rootfstype
-
- rootfstype="$(awk 'BEGIN { RS=" "; FS="="; } ($1 == "rootfstype") { print $2 }' < /proc/cmdline)"
- case "$rootfstype" in
- squashfs|jffs2)
- rootfsdev="$(awk 'BEGIN { RS=" "; FS="="; } ($1 == "block2mtd.block2mtd") { print substr($2,1,index($2, ",")-1) }' < /proc/cmdline)";;
- ext4)
- rootfsdev="$(awk 'BEGIN { RS=" "; FS="="; } ($1 == "root") { print $2 }' < /proc/cmdline)";;
- esac
-
- echo "$rootfstype:$rootfsdev"
+platform_export_bootpart() {
+ local cmdline uuid disk
+
+ if read cmdline < /proc/cmdline; then
+ case "$cmdline" in
+ *block2mtd=*)
+ disk="${cmdline##*block2mtd=}"
+ disk="${disk%%,*}"
+ ;;
+ *root=*)
+ disk="${cmdline##*root=}"
+ disk="${disk%% *}"
+ ;;
+ esac
+
+ case "$disk" in
+ PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02)
+ uuid="${disk#PARTUUID=}"
+ uuid="${uuid%-02}"
+ for disk in /dev/[hsv]d[a-z]; do
+ set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
+ if [ "$4$3$2$1" = "$uuid" ]; then
+ export BOOTPART="${disk}1"
+ return 0
+ fi
+ done
+ ;;
+ /dev/*)
+ export BOOTPART="${disk%[0-9]}1"
+ return 0
+ ;;
+ esac
+ fi
+
+ return 1
}
platform_check_image() {
@@ -26,19 +48,19 @@ platform_check_image() {
}
platform_copy_config() {
- local rootfs="$(x86_get_rootfs)"
- local rootfsdev="${rootfs##*:}"
-
- mount -t ext4 -o rw,noatime "${rootfsdev%[0-9]}1" /mnt
- cp -af "$CONF_TAR" /mnt/
- umount /mnt
+ if [ -b "$BOOTPART" ]; then
+ mount -t ext4 -o rw,noatime "$BOOTPART" /mnt
+ cp -af "$CONF_TAR" /mnt/
+ umount /mnt
+ fi
}
platform_do_upgrade() {
- local rootfs="$(x86_get_rootfs)"
- local rootfsdev="${rootfs##*:}"
+ platform_export_bootpart
- sync
- [ -b ${rootfsdev%[0-9]} ] && get_image "$@" | dd of=${rootfsdev%[0-9]} bs=4096 conv=fsync
- sleep 1
+ if [ -b "${BOOTPART%[0-9]}" ]; then
+ sync
+ get_image "$@" | dd of="${BOOTPART%[0-9]}" bs=4096 conv=fsync
+ sleep 1
+ fi
}
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index 5983718..1f91b9f 100644
--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -40,7 +40,9 @@ ifneq ($(GRUB_TERMINALS),)
GRUB_TERMINAL_CONFIG := terminal_input $(GRUB_TERMINALS); terminal_output $(GRUB_TERMINALS)
endif
+SIGNATURE:=$(shell dd if=/dev/urandom bs=4 count=1 2>/dev/null | hexdump -v -e '"%08x"')
ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
+ROOTPART:=$(if $(ROOTPART),$(ROOTPART),PARTUUID=$(SIGNATURE)-02)
GRUB_TIMEOUT:=$(call qstrip,$(CONFIG_GRUB_TIMEOUT))
@@ -82,7 +84,7 @@ ifneq ($(CONFIG_GRUB_IMAGES),)
-e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1)) $(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE))#g' \
-e 's#@TIMEOUT@#$(GRUB_TIMEOUT)#g' \
./grub.cfg > $(KDIR)/root.grub/boot/grub/grub.cfg
- PADDING="$(CONFIG_TARGET_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_generic.sh \
+ PADDING="$(CONFIG_TARGET_IMAGES_PAD)" SIGNATURE="$(SIGNATURE)" PATH="$(TARGET_PATH)" ./gen_image_generic.sh \
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
$(CONFIG_TARGET_KERNEL_PARTSIZE) $(KDIR)/root.grub \
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1) \
diff --git a/target/linux/x86/image/gen_image_generic.sh b/target/linux/x86/image/gen_image_generic.sh
index 9d11efb..3fb31f6 100755
--- a/target/linux/x86/image/gen_image_generic.sh
+++ b/target/linux/x86/image/gen_image_generic.sh
@@ -20,7 +20,7 @@ sect=63
cyl=$(( ($KERNELSIZE + $ROOTFSSIZE) * 1024 * 1024 / ($head * $sect * 512)))
# create partition table
-set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN}`
+set `ptgen -o "$OUTPUT" -h $head -s $sect -p ${KERNELSIZE}m -p ${ROOTFSSIZE}m ${ALIGN:+-l $ALIGN} ${SIGNATURE:+-S 0x$SIGNATURE}`
KERNELOFFSET="$(($1 / 512))"
KERNELSIZE="$(($2 / 512))"
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 29 Mar 2015 13:23:26 +0200
Subject: ar71xx: fix model string detection on NETGEAR WNDR3700/3800/WNDRMAC
There were a few issues with the existing code to detect the model string:
* Always using the string starting with byte 56 would cut off the W of WNDR when
the ID starts with 29763654+16+64 instead of 29763654+16+128
* The string contained garbage after the zero byte instead of cutting it off
after the zero (which wasn't always visible using busybox tools, but could
confuse other scripts)
Tested on a WNDR3700v1 and a WNDR3700v2 using the new 29763654+16+64 ID in the
ART. Furthermore, tested against ART dumps of a WNDR3700v2 using the old
$'\xff...' value and a WNDR3800.
The [ -z "$model" ] check was dropped as there is no way to actually hit this
unless no ART partition is found at all.
The awk command was carefully crafted to work both with gawk and the (horribly
broken) busybox awk.
Fixes #18992.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a698ce5..1838cb4 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -37,16 +37,26 @@ wndr3700_board_detect() {
machine="NETGEAR WNDR3700"
;;
"33373031")
- local model
- model=$(ar71xx_get_mtd_offset_size_format art 56 10 %c)
- if [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' ]; then
- machine="NETGEAR WNDR3700v2"
- elif [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xffN' ]; then
- machine="NETGEAR WNDRMAC"
- else
+ # Use awk to remove everything after the first zero byte
+ model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')"
+ case $model in
+ $'\xff'*)
+ if [ "${model:24:1}" = 'N' ]; then
+ machine="NETGEAR WNDRMAC"
+ else
+ machine="NETGEAR WNDR3700v2"
+ fi
+ ;;
+ '29763654+16+64'*)
+ machine="NETGEAR ${model:14}"
+ ;;
+ '29763654+16+128'*)
+ machine="NETGEAR ${model:15}"
+ ;;
+ *)
+ # Unknown ID
machine="NETGEAR $model"
- fi
- ;;
+ esac
esac
AR71XX_BOARD_NAME="$name"
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 15 Mar 2015 21:03:25 +0100
Subject: ar71xx: fix TP-LINK TL-WDR3600/4300 RFKILL switch positions
While the switch positions aren't explicitly labeled as on and off, we've heard
complaints about them being wrong. This patch changes the handling to match the
stock firmware.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c
index 99ae80d..3afc714 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c
@@ -103,6 +103,7 @@ static struct gpio_keys_button wdr4300_gpio_keys[] __initdata = {
.code = KEY_RFKILL,
.debounce_interval = WDR4300_KEYS_DEBOUNCE_INTERVAL,
.gpio = WDR4300_GPIO_BTN_RFKILL,
+ .active_low = 1,
},
};
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 16 Mar 2015 13:23:34 +0100
Subject: buildroot: make it easier to build all kmods
Split out kmods from ALL to make it easier to create local builds that
are compatible kmod-wise with releases.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
diff --git a/config/Config-build.in b/config/Config-build.in
index 371ae76..8b0ebbf 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -6,8 +6,12 @@
menu "Global build settings"
+ config ALL_KMODS
+ bool "Select all kernel module packages by default"
+ default ALL
+
config ALL
- bool "Select all packages by default"
+ bool "Select all userspace packages by default"
default n
comment "General build options"
diff --git a/include/version.mk b/include/version.mk
index 2fd605f..f6c0fe2 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -50,7 +50,7 @@ $(lastword $(subst :, ,$(1)))
endef
VERSION_TAINT_SPECS := \
- -ALL:no-all \
+ -ALL_KMODS:no-all \
-IPV6:no-ipv6 \
+USE_EGLIBC:eglibc \
+USE_MKLIBS:mklibs \
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 79f930c..4eecb0c 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -574,7 +574,11 @@ sub print_package_config_category($) {
print "\t\t".($pkg->{tristate} ? 'tristate' : 'bool')." $title\n";
print "\t\tdefault y if DEFAULT_".$pkg->{name}."\n";
unless ($pkg->{hidden}) {
- $pkg->{default} ||= "m if ALL";
+ if ($pkg->{name} =~ /^kmod-/) {
+ $pkg->{default} ||= "m if ALL_KMODS";
+ } else {
+ $pkg->{default} ||= "m if ALL";
+ }
}
if ($pkg->{default}) {
foreach my $default (split /\s*,\s*/, $pkg->{default}) {
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 18 Mar 2015 20:07:22 +0100
Subject: build: define STAMP_CONFIGURED recursively
Defining STAMP_CONFIGURED statically caused it not to reflect changes to
PKG_CONFIG_DEPENDS made after including package.mk, like the additional options
added by feeds.mk for all packages.
Furthermore, as STAMP_CONFIGURED_WILDCARD was already defined recursively, the
patsubst in its definition would never match, and in consequence, the stamps
were never removed. This caused packages not to be rebuilt when they should have
been.
diff --git a/include/package.mk b/include/package.mk
index 53ca6de..402fb1a 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -60,7 +60,7 @@ ifneq ($(PREV_STAMP_PREPARED),)
else
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))$(call confvar,$(PKG_PREPARED_DEPENDS)))
endif
-STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
+STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
STAMP_CONFIGURED_WILDCARD=$(patsubst %_$(call confvar,$(PKG_CONFIG_DEPENDS)),%_*,$(STAMP_CONFIGURED))
STAMP_BUILT:=$(PKG_BUILD_DIR)/.built
STAMP_INSTALLED:=$(STAGING_DIR)/stamp/.$(PKG_NAME)_installed
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 30 Apr 2015 02:10:54 +0200
Subject: mpc85xx: gianfar: add add mtd-mac-address support
diff --git a/target/linux/mpc85xx/patches-3.10/101-NET-add-of_get_mac_address_mtd.patch b/target/linux/mpc85xx/patches-3.10/101-NET-add-of_get_mac_address_mtd.patch
new file mode 100644
index 0000000..cd88d2b
--- /dev/null
+++ b/target/linux/mpc85xx/patches-3.10/101-NET-add-of_get_mac_address_mtd.patch
@@ -0,0 +1,76 @@
+From 92f38460229a8816404408f036f0a374f1013d0e Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Sun, 27 Jul 2014 09:40:01 +0100
+Subject: NET: add of_get_mac_address_mtd()
+
+Many embedded devices have information such as mac addresses stored inside mtd
+devices. This patch allows us to add a property inside a node describing a
+network interface. The new property points at a mtd partition with an offset
+where the mac address can be found.
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+---
+ drivers/of/of_net.c | 37 +++++++++++++++++++++++++++++++++++++
+ include/linux/of_net.h | 1 +
+ 2 files changed, 38 insertions(+)
+
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -10,6 +10,7 @@
+ #include <linux/of_net.h>
+ #include <linux/phy.h>
+ #include <linux/export.h>
++#include <linux/mtd/mtd.h>
+
+ /**
+ * It maps 'enum phy_interface_t' found in include/linux/phy.h
+@@ -92,3 +93,39 @@ const void *of_get_mac_address(struct de
+ return NULL;
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
++
++int of_get_mac_address_mtd(struct device_node *np, void *mac)
++{
++ struct device_node *mtd_np = NULL;
++ size_t retlen;
++ int size, ret;
++ struct mtd_info *mtd;
++ const char *part;
++ const __be32 *list;
++ phandle phandle;
++
++ list = of_get_property(np, "mtd-mac-address", &size);
++ if (!list || (size != (2 * sizeof(*list))))
++ return -ENOENT;
++
++ phandle = be32_to_cpup(list++);
++ if (phandle)
++ mtd_np = of_find_node_by_phandle(phandle);
++
++ if (!mtd_np)
++ return -ENOENT;
++
++ part = of_get_property(mtd_np, "label", NULL);
++ if (!part)
++ part = mtd_np->name;
++
++ mtd = get_mtd_device_nm(part);
++ if (IS_ERR(mtd))
++ return PTR_ERR(mtd);
++
++ ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, (u_char *) mac);
++ put_mtd_device(mtd);
++
++ return ret;
++}
++EXPORT_SYMBOL_GPL(of_get_mac_address_mtd);
+--- a/include/linux/of_net.h
++++ b/include/linux/of_net.h
+@@ -11,6 +11,7 @@
+ #include <linux/of.h>
+ extern const int of_get_phy_mode(struct device_node *np);
+ extern const void *of_get_mac_address(struct device_node *np);
++extern int of_get_mac_address_mtd(struct device_node *np, void *mac);
+ #else
+ static inline const int of_get_phy_mode(struct device_node *np)
+ {
diff --git a/target/linux/mpc85xx/patches-3.10/201-net-gianfar-use-mtd-mac-address.patch b/target/linux/mpc85xx/patches-3.10/201-net-gianfar-use-mtd-mac-address.patch
new file mode 100644
index 0000000..1de4418
--- /dev/null
+++ b/target/linux/mpc85xx/patches-3.10/201-net-gianfar-use-mtd-mac-address.patch
@@ -0,0 +1,19 @@
+--- a/drivers/net/ethernet/freescale/gianfar.c
++++ b/drivers/net/ethernet/freescale/gianfar.c
+@@ -741,10 +741,13 @@ static int gfar_of_init(struct platform_
+ if (stash_len || stash_idx)
+ priv->device_flags |= FSL_GIANFAR_DEV_HAS_BUF_STASHING;
+
+- mac_addr = of_get_mac_address(np);
++ err = of_get_mac_address_mtd(np, dev->dev_addr);
++ if (err) {
++ mac_addr = of_get_mac_address(np);
+
+- if (mac_addr)
+- memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
++ if (mac_addr)
++ memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
++ }
+
+ if (model && !strcasecmp(model, "TSEC"))
+ priv->device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT |
diff --git a/target/linux/mpc85xx/patches-3.10/220-fix_gianfar_reported_number_of_sent_bytes_to_BQL.patch b/target/linux/mpc85xx/patches-3.10/220-fix_gianfar_reported_number_of_sent_bytes_to_BQL.patch
index d0380ff..0d510bc 100644
--- a/target/linux/mpc85xx/patches-3.10/220-fix_gianfar_reported_number_of_sent_bytes_to_BQL.patch
+++ b/target/linux/mpc85xx/patches-3.10/220-fix_gianfar_reported_number_of_sent_bytes_to_BQL.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
-@@ -2064,7 +2064,7 @@ static int gfar_start_xmit(struct sk_buf
+@@ -2067,7 +2067,7 @@ static int gfar_start_xmit(struct sk_buf
int i, rq = 0, do_tstamp = 0;
u32 bufaddr;
unsigned long flags;
@@ -9,7 +9,7 @@
/* TOE=1 frames larger than 2500 bytes may see excess delays
* before start of transmission.
-@@ -2130,7 +2130,10 @@ static int gfar_start_xmit(struct sk_buf
+@@ -2133,7 +2133,10 @@ static int gfar_start_xmit(struct sk_buf
}
/* Update transmit stats */
@@ -21,7 +21,7 @@
tx_queue->stats.tx_packets++;
txbdp = txbdp_start = tx_queue->cur_tx;
-@@ -2150,12 +2153,13 @@ static int gfar_start_xmit(struct sk_buf
+@@ -2153,12 +2156,13 @@ static int gfar_start_xmit(struct sk_buf
} else {
/* Place the fragment addresses and lengths into the TxBDs */
for (i = 0; i < nr_frags; i++) {
@@ -37,7 +37,7 @@
BD_LFLAG(TXBD_READY);
/* Handle the last BD specially */
-@@ -2165,7 +2169,7 @@ static int gfar_start_xmit(struct sk_buf
+@@ -2168,7 +2172,7 @@ static int gfar_start_xmit(struct sk_buf
bufaddr = skb_frag_dma_map(priv->dev,
&skb_shinfo(skb)->frags[i],
0,
@@ -46,7 +46,7 @@
DMA_TO_DEVICE);
/* set the TxBD length and buffer pointer */
-@@ -2231,7 +2235,7 @@ static int gfar_start_xmit(struct sk_buf
+@@ -2234,7 +2238,7 @@ static int gfar_start_xmit(struct sk_buf
lstatus |= BD_LFLAG(TXBD_CRC | TXBD_READY) | skb_headlen(skb);
}
@@ -55,7 +55,7 @@
/* We can work in parallel with gfar_clean_tx_ring(), except
* when modifying num_txbdfree. Note that we didn't grab the lock
-@@ -2551,7 +2555,7 @@ static void gfar_clean_tx_ring(struct gf
+@@ -2554,7 +2558,7 @@ static void gfar_clean_tx_ring(struct gf
bdp = next_txbd(bdp, base, tx_ring_size);
}
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 30 Apr 2015 02:12:18 +0200
Subject: mpc85xx: replace WDR4900 uci-defaults ethernet MAC address hack with DTS entry
This also changes the MAC address to one of the adresses actually used by the
stock firmware on one of the ethernet interfaces.
diff --git a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network
index e4e3566..525a552 100755
--- a/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/mpc85xx/base-files/etc/uci-defaults/02_network
@@ -20,8 +20,6 @@ tl-wdr4900-v1)
ucidef_add_switch "switch0" "1" "1"
ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
ucidef_add_switch_vlan "switch0" "2" "0t 1"
- ucidef_set_interface_macaddr lan "$(mtd_get_mac_binary config 338)"
- ucidef_set_interface_macaddr wan "$(mtd_get_mac_binary config 344)"
;;
*)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index 49e516c..7e48e23 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -63,7 +63,7 @@
label = "rootfs";
};
- config@fe0000 {
+ config: config@fe0000 {
reg = <0x00fe0000 0x00010000>;
label = "config";
read-only;
@@ -118,6 +118,7 @@
enet0: ethernet@b0000 {
phy-handle = <&phy0>;
phy-connection-type = "rgmii-id";
+ mtd-mac-address = <&config 0x14c>;
};
enet1: ethernet@b1000 {
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Mon, 4 May 2015 20:38:37 +0200
Subject: iwinfo: update NanoStation (Loco) txpower offsets
diff --git a/package/network/utils/iwinfo/src/hardware.txt b/package/network/utils/iwinfo/src/hardware.txt
index 153ffeb..b8dfc51 100644
--- a/package/network/utils/iwinfo/src/hardware.txt
+++ b/package/network/utils/iwinfo/src/hardware.txt
@@ -42,8 +42,9 @@
0x168c 0x0027 0x0777 0x4082 7 0 "Ubiquiti" "SR71"
0x168c 0x0029 0x0777 0x4005 7 0 "Ubiquiti" "SR71-15"
0x168c 0x002a 0x0777 0xe302 12 0 "Ubiquiti" "PicoStation M2" /* ToDo: confirm offset */
-0x168c 0x002a 0x0777 0xe012 12 0 "Ubiquiti" "NanoStation M2" /* ToDo: confirm offset */
-0x168c 0x002a 0x0777 0xe005 5 0 "Ubiquiti" "NanoStation M5" /* ToDo: confirm offset */
+0x168c 0x002a 0x0777 0xe012 11 0 "Ubiquiti" "NanoStation M2"
+0x168c 0x002e 0x0777 0xe0a2 8 0 "Ubiquiti" "NanoStation Loco M2"
+0x168c 0x002a 0x0777 0xe005 16 0 "Ubiquiti" "NanoStation M5"
0x168c 0x002a 0x0777 0xe202 12 0 "Ubiquiti" "Bullet M2"
0x168c 0x002a 0x0777 0xe805 5 0 "Ubiquiti" "Bullet M5"
0x168c 0x002a 0x0777 0xe345 0 0 "Ubiquiti" "WispStation M5" /* ToDo: confirm offset */
...@@ -2,10 +2,10 @@ From: Nils Schneider <nils@nilsschneider.net> ...@@ -2,10 +2,10 @@ From: Nils Schneider <nils@nilsschneider.net>
Date: Sat, 9 Aug 2014 09:33:21 +0200 Date: Sat, 9 Aug 2014 09:33:21 +0200
Subject: fvalue.html: add label that can be styled Subject: fvalue.html: add label that can be styled
diff --git a/modules/base/luasrc/view/cbi/fvalue.htm b/modules/base/luasrc/view/cbi/fvalue.htm diff --git a/modules/luci-base/luasrc/view/cbi/fvalue.htm b/modules/luci-base/luasrc/view/cbi/fvalue.htm
index a1e0808..a324ab2 100644 index a1e0808..a324ab2 100644
--- a/modules/base/luasrc/view/cbi/fvalue.htm --- a/modules/luci-base/luasrc/view/cbi/fvalue.htm
+++ b/modules/base/luasrc/view/cbi/fvalue.htm +++ b/modules/luci-base/luasrc/view/cbi/fvalue.htm
@@ -6,4 +6,5 @@ @@ -6,4 +6,5 @@
attr("id", cbid) .. attr("name", cbid) .. attr("value", self.enabled or 1) .. attr("id", cbid) .. attr("name", cbid) .. attr("value", self.enabled or 1) ..
ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked") ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked")
......
...@@ -2,11 +2,11 @@ From: Matthias Schiffer <mschiffer@universe-factory.net> ...@@ -2,11 +2,11 @@ From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 19 Mar 2015 18:44:52 +0100 Date: Thu, 19 Mar 2015 18:44:52 +0100
Subject: modules/base: dispatcher: set default language if none provided by the browser matches Subject: modules/base: dispatcher: set default language if none provided by the browser matches
diff --git a/modules/base/luasrc/dispatcher.lua b/modules/base/luasrc/dispatcher.lua diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua
index f7e16e7..479ac54 100644 index 8b8d1fa..27f9a15 100644
--- a/modules/base/luasrc/dispatcher.lua --- a/modules/luci-base/luasrc/dispatcher.lua
+++ b/modules/base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua
@@ -211,6 +211,7 @@ function dispatch(request) @@ -182,6 +182,7 @@ function dispatch(request)
assert(conf.main, assert(conf.main,
"/etc/config/luci seems to be corrupt, unable to find section 'main'") "/etc/config/luci seems to be corrupt, unable to find section 'main'")
...@@ -14,7 +14,7 @@ index f7e16e7..479ac54 100644 ...@@ -14,7 +14,7 @@ index f7e16e7..479ac54 100644
local lang = conf.main.lang or "auto" local lang = conf.main.lang or "auto"
if lang == "auto" then if lang == "auto" then
local aclang = http.getenv("HTTP_ACCEPT_LANGUAGE") or "" local aclang = http.getenv("HTTP_ACCEPT_LANGUAGE") or ""
@@ -222,7 +223,10 @@ function dispatch(request) @@ -193,7 +194,10 @@ function dispatch(request)
end end
end end
end end
......
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 21 May 2015 02:34:01 +0200
Subject: luci-base: depend on libubus-lua
diff --git a/modules/luci-base/Makefile b/modules/luci-base/Makefile
index 80bbda1..55c21eb 100644
--- a/modules/luci-base/Makefile
+++ b/modules/luci-base/Makefile
@@ -12,7 +12,7 @@ LUCI_TYPE:=mod
LUCI_BASENAME:=base
LUCI_TITLE:=LuCI core libraries
-LUCI_DEPENDS:=+lua +libuci-lua +luci-lib-nixio +luci-lib-ip +rpcd
+LUCI_DEPENDS:=+lua +libuci-lua +libubus-lua +luci-lib-nixio +luci-lib-ip +rpcd
PKG_SOURCE:=LuaSrcDiet-0.12.1.tar.bz2
PKG_SOURCE_URL:=https://luasrcdiet.googlecode.com/files
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment