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

Update OpenWrt base

We got most of our patches backported by upstream :)
parent 289b5992
No related branches found
No related tags found
No related merge requests found
Showing
with 5 additions and 34382 deletions
GLUON_FEEDS='openwrt gluon routing luci'
OPENWRT_REPO=git://git.openwrt.org/15.05/openwrt.git
OPENWRT_COMMIT=a03a846c49c067048cd225d476a7adf91ef8ff03
OPENWRT_COMMIT=8882c524d9b5e4c16ebfea10c0090f38b07c9da5
PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git
PACKAGES_OPENWRT_COMMIT=9622fe984bba3a4547f48bc507ebaba7637eb2b0
......
......@@ -3,10 +3,10 @@ Date: Tue, 9 Feb 2016 18:22:29 +0100
Subject: ath10k-firmware: add Candela Technologies firmware for QCA988X
diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
index 882294c..c6e6f2d 100644
index b03d644..7d4d449 100644
--- a/package/firmware/ath10k-firmware/Makefile
+++ b/package/firmware/ath10k-firmware/Makefile
@@ -46,6 +46,26 @@ define Download/ath10k-firmware-qca988x
@@ -44,6 +44,26 @@ define Download/ath10k-firmware-qca988x
endef
$(eval $(call Download,ath10k-firmware-qca988x))
......@@ -33,7 +33,7 @@ index 882294c..c6e6f2d 100644
define Package/ath10k-firmware-qca99x0
$(Package/ath10k-firmware-default)
TITLE:=ath10k firmware for QCA99x0 devices
@@ -81,6 +101,16 @@ define Package/ath10k-firmware-qca988x/install
@@ -79,6 +99,16 @@ define Package/ath10k-firmware-qca988x/install
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
endef
......@@ -50,7 +50,7 @@ index 882294c..c6e6f2d 100644
define Package/ath10k-firmware-qca6174/install
$(INSTALL_DIR) $(1)/lib/firmware/ath10k
$(CP) $(PKG_BUILD_DIR)/QCA6174 $(1)/lib/firmware/ath10k/
@@ -100,5 +130,6 @@ define Package/ath10k-firmware-qca99x0/install
@@ -98,5 +128,6 @@ define Package/ath10k-firmware-qca99x0/install
endef
$(eval $(call BuildPackage,ath10k-firmware-qca988x))
......
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Tue, 9 Feb 2016 13:49:01 +0100
Subject: build: add support for choosing a different url filename part than the output file
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Backport of r47591 and r48427
diff --git a/include/download.mk b/include/download.mk
index 937b5d3..e518cce 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -44,11 +44,11 @@ define DownloadMethod/unknown
endef
define DownloadMethod/default
- $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MD5SUM)" $(foreach url,$(URL),"$(url)")
+ $(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MD5SUM)" "$(URL_FILE)" $(foreach url,$(URL),"$(url)")
endef
define wrap_mirror
- $(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),@$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_MD5SUM)" || ( $(1) ),$(1))
+ $(if $(if $(MIRROR),$(filter-out x,$(MIRROR_MD5SUM))),@$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_MD5SUM)" "" || ( $(1) ),$(1))
endef
define DownloadMethod/cvs
@@ -157,6 +157,7 @@ Validate/darcs=VERSION SUBDIR
define Download/Defaults
URL:=
FILE:=
+ URL_FILE:=
PROTO:=
MD5SUM:=
SUBDIR:=
diff --git a/scripts/download.pl b/scripts/download.pl
index cd68a7b..111d03c 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -11,15 +11,19 @@ use warnings;
use File::Basename;
use File::Copy;
-@ARGV > 2 or die "Syntax: $0 <target dir> <filename> <md5sum> [<mirror> ...]\n";
+@ARGV > 2 or die "Syntax: $0 <target dir> <filename> <md5sum> <url filename> [<mirror> ...]\n";
+my $url_filename;
my $target = shift @ARGV;
my $filename = shift @ARGV;
my $md5sum = shift @ARGV;
+$url_filename = shift @ARGV unless $ARGV[0] =~ /:\/\//;
my $scriptdir = dirname($0);
my @mirrors;
my $ok;
+$url_filename or $url_filename = $filename;
+
sub localmirrors {
my @mlist;
open LM, "$scriptdir/localmirrors" and do {
@@ -106,7 +110,7 @@ sub download
return;
}
} else {
- open WGET, "wget -t5 --timeout=20 --no-check-certificate $options -O- '$mirror/$filename' |" or die "Cannot launch wget.\n";
+ open WGET, "wget -t5 --timeout=20 --no-check-certificate $options -O- '$mirror/$url_filename' |" or die "Cannot launch wget.\n";
open MD5SUM, "| $md5cmd > '$target/$filename.md5sum'" or die "Cannot launch md5sum.\n";
open OUTPUT, "> $target/$filename.dl" or die "Cannot create file $target/$filename.dl: $!\n";
my $buffer;
This diff is collapsed.
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 21 Jun 2015 22:50:48 +0200
Subject: ar71xx: add support for tp-link wr740n v5.0 (EU)
TP-Link ships wr740n v5.0 to Romania (so probably everywhere except
China) with 4 MB flash and 32 MB memory (confirmed by their local
support). This patch adds support for the v5.0 clone of v4, i just
tested it on my own v5.0 router and it works.
Signed-off-by: Daniel Petre <daniel.petre@posteo.net>
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 4336697..1fe88d5 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -501,6 +501,14 @@ define Device/tl-wr740n-v4
CONSOLE := ttyATH0,115200
endef
+define Device/tl-wr740n-v5
+ $(Device/tplink-4mlzma)
+ BOARDNAME := TL-WR741ND-v4
+ DEVICE_PROFILE := TLWR740
+ TPLINK_HWID := 0x07400005
+ CONSOLE := ttyATH0,115200
+endef
+
define Device/tl-wr741nd-v1
$(Device/tplink-4m)
BOARDNAME := TL-WR741ND
@@ -530,7 +538,7 @@ define Device/tl-wr743nd-v2
TPLINK_HWID := 0x07430002
CONSOLE := ttyATH0,115200
endef
-TARGET_DEVICES += tl-wr740n-v4 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2
+TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2
define Device/tl-wr841n-v8
$(Device/tplink-4mlzma)
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 21 Jun 2015 22:48:04 +0200
Subject: ar71xx: add support for TL-WR741ND v5
This device is identical to the TL-WR740N v5, it even uses the same HWID (which
wasn't the case for older TL-WR741ND revisions).
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 1fe88d5..78d35e1 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -531,6 +531,14 @@ define Device/tl-wr741nd-v4
CONSOLE := ttyATH0,115200
endef
+define Device/tl-wr741nd-v5
+ $(Device/tplink-4mlzma)
+ BOARDNAME := TL-WR741ND-v4
+ DEVICE_PROFILE := TLWR741
+ TPLINK_HWID := 0x07400005
+ CONSOLE := ttyATH0,115200
+endef
+
define Device/tl-wr743nd-v2
$(Device/tplink-4mlzma)
BOARDNAME := TL-WR741ND-v4
@@ -538,7 +546,7 @@ define Device/tl-wr743nd-v2
TPLINK_HWID := 0x07430002
CONSOLE := ttyATH0,115200
endef
-TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2
+TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2
define Device/tl-wr841n-v8
$(Device/tplink-4mlzma)
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 16 Jul 2015 22:01:02 +0200
Subject: sunxi: fix uboot install location
Install uboot files to KERNEL_BUILD_DIR instead of BIN_DIR to fix the
ImageBuilder. Similar fixes are necessary for many (all?) other uboot
targets.
Also remove the DTS copy command, BIN_DIR was unnecessarily cluttered with
DTS files unrelated to the chosen profile.
diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index 14ba922..9032600 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -6,6 +6,7 @@
#
include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=u-boot
PKG_VERSION:=2015.01
@@ -16,7 +17,7 @@ PKG_SOURCE_URL:= \
PKG_MD5SUM:=7f08dc9e98a71652bd6968888ed6ec95
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=Licenses/README
@@ -136,16 +137,16 @@ define Build/Compile
endef
define Package/uboot/install/default
- $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1)
$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin
$(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-spl.bin
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin
$(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin
$(CP) uEnv.txt \
- $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt
- mkimage -C none -A arm -T script -d $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-boot.scr
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt
+ mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \
+ $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr
endef
define Package/uboot/install/template
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index 6fcd61f..19ab935 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -11,28 +11,12 @@ include $(INCLUDE_DIR)/host.mk
FAT32_BLOCK_SIZE=1024
FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
-BOARDS:= \
- sun4i-a10-cubieboard \
- sun4i-a10-olinuxino-lime \
- sun4i-a10-pcduino \
- sun5i-a13-olinuxino \
- sun6i-a31-colombus \
- sun6i-a31-m9 \
- sun7i-a20-bananapi \
- sun7i-a20-bananapro \
- sun7i-a20-cubieboard2 \
- sun7i-a20-cubietruck \
- sun7i-a20-olinuxino-lime \
- sun7i-a20-olinuxino-micro \
- sun7i-a20-pcduino3 \
- sun7i-a20-lamobo-r1
-
define Image/BuildKernel
mkimage -A arm -O linux -T kernel -C none \
-a 0x40008000 -e 0x40008000 \
-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
-
+
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
$(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
@@ -42,27 +26,23 @@ define Image/BuildKernel
$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \
)
endif
-
- $(foreach board,$(BOARDS),
- $(CP) $(DTS_DIR)/$(board).dtb $(BIN_DIR)/
- )
endef
define Image/Build/SDCard
rm -f $(KDIR)/boot.img
mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS)
-
- mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr
- mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(2).dtb ::dtb
+
+ mcopy -i $(KDIR)/boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr
+ mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb
mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage
-
+
./gen_sunxi_sdcard_img.sh \
$(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \
$(KDIR)/boot.img \
$(KDIR)/root.$(1) \
$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
- $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-u-boot-with-spl.bin
+ $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin
endef
define Image/Build/Profile/A10-OLinuXino-Lime
@@ -124,7 +104,7 @@ endef
define Image/Build
$(call Image/Build/$(1),$(1))
$(call Image/Build/Profile/$(PROFILE),$(1))
-
+
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
endef
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 16 Jul 2015 22:13:59 +0200
Subject: sunxi: respect CONFIG_TARGET_IMAGES_GZIP
The ext4 images are huge uncompressed.
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index 19ab935..d3f4409 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -43,6 +43,10 @@ define Image/Build/SDCard
$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
$(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin
+
+ ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
+ gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img
+ endif
endef
define Image/Build/Profile/A10-OLinuXino-Lime
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 18 Jul 2015 17:13:23 +0200
Subject: odhcp6c: add option "sourcefilter" to disable source filter
Signed-off-by: Steven Barth <steven@midlink.org>
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
index 5bf43bd..75de54c 100644
--- a/package/network/ipv6/odhcp6c/Makefile
+++ b/package/network/ipv6/odhcp6c/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcp6c
-PKG_VERSION:=2015-07-13
+PKG_VERSION:=2015-07-18
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index b8cbddb..33f6d9b 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -76,7 +76,7 @@ setup_interface () {
done
for entry in $RA_ROUTES; do
- local duplicate=0
+ local duplicate=$NOSOURCEFILTER
local addr="${entry%%/*}"
entry="${entry#*/}"
local mask="${entry%%,*}"
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
index adcb100..4a453fd 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
@@ -28,14 +28,15 @@ proto_dhcpv6_init_config() {
proto_config_add_boolean delegate
proto_config_add_int "soltimeout"
proto_config_add_boolean fakeroutes
+ proto_config_add_boolean sourcefilter
}
proto_dhcpv6_setup() {
local config="$1"
local iface="$2"
- local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
- json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
+ local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
# Configure
@@ -76,6 +77,7 @@ proto_dhcpv6_setup() {
[ -n "$zone_464xlat" ] && proto_export "ZONE_464XLAT=$zone_464xlat"
[ -n "$zone" ] && proto_export "ZONE=$zone"
[ "$fakeroutes" != "0" ] && proto_export "FAKE_ROUTES=1"
+ [ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1"
proto_export "INTERFACE=$config"
proto_run_command "$config" odhcp6c \
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 6 Aug 2015 03:01:38 +0200
Subject: ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link TL-WR841N/ND v9, Compex WPJ531)
The initialization routines for these boards were relying on some (wrong)
defaults for the QCA953x ethernet. Make these defaults explicit to prevent
breaking them when the QCA953x defaults are fixed.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
index c28afc6..3e5c2a2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
@@ -109,12 +109,18 @@ static void __init tl_ap143_setup(void)
ath79_register_mdio(0, 0x0);
/* LAN */
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
+ ath79_eth1_data.duplex = DUPLEX_FULL;
+ ath79_switch_data.phy_poll_mask |= BIT(4);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
ath79_register_eth(1);
/* WAN */
ath79_switch_data.phy4_mii_en = 1;
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+ ath79_eth0_data.duplex = DUPLEX_FULL;
+ ath79_eth0_data.speed = SPEED_100;
+ ath79_eth0_data.phy_mask = BIT(4);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
ath79_register_eth(0);
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
index bc13d70..e665a2e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
@@ -105,12 +105,19 @@ static void __init common_setup(void)
ath79_register_mdio(0, 0x0);
/* LAN */
+ ath79_eth0_data.duplex = DUPLEX_FULL;
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+ ath79_eth0_data.speed = SPEED_100;
+ ath79_eth0_data.phy_mask = BIT(4);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
ath79_register_eth(0);
/* WAN */
ath79_switch_data.phy4_mii_en = 1;
+ ath79_eth1_data.duplex = DUPLEX_FULL;
ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+ ath79_eth1_data.speed = SPEED_100;
+ ath79_switch_data.phy_poll_mask |= BIT(4);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
ath79_register_eth(1);
This diff is collapsed.
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 7 Aug 2015 18:45:42 +0200
Subject: base-files: default_postinst: propagate the real postinst return code
Using the postinst script for sanity checks and expecting opkg to fail
if the postinst didn't return 0 was possible in Barrier Breaker, propagate
the real postinst return code through default_postinst to restore this
behaviour.
diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 8d045fa..2f78d67 100755
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -174,7 +174,8 @@ default_prerm() {
}
default_postinst() {
- local pkgname rusers
+ local pkgname rusers ret
+ ret=0
pkgname=$(basename ${1%.*})
rusers=$(grep "Require-User:" ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.control)
[ -n "$rusers" ] && {
@@ -215,7 +216,10 @@ default_postinst() {
done
}
- [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ] && ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg )
+ if [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ]; then
+ ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg )
+ ret=$?
+ fi
[ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null
[ "$PKG_UPGRADE" = "1" ] || for i in `cat ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.list | grep "^/etc/init.d/"`; do
@@ -225,7 +229,7 @@ default_postinst() {
$i start
}
done
- return 0
+ return $ret
}
include() {
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment