[LEDE-DEV] Fritzbox 4040 notes
Hopefully this will save someone some time. The serial port is next to the MXIC chip. It needs a TTL to USB converter. Counting from the pin near the MXIC chip, as seen from the top, my addapter needed to be connected as follows: pin 0: Disconnected pin 1: green lead (TX or RX, dunno which) pin 2: white lead (TX or RX, dunno which) pin 3: black (ground) When updating the u-boot, I cloned the repo: g...@github.com:chunkeey/FritzBox-4040-UBOOT.git The upload-tof4040.sh seems to want the fritzbox booted into it's boot loader (not all the way into its OS). And, the -4 option to ping and ftp doesn't work on Fedora 22. Even once I removed the -4 options, the script does not work. The upload script fails, but this below worked on an Ubuntu based system: greearb@odroid-b64:~/git/FritzBox-4040-UBOOT/fritz$ ftp -n 192.168.178.1 Connected to 192.168.178.1. 220 ADAM2 FTP Server ready ftp> quote USER adam2 331 Password required for adam2 ftp> quote PASS adam2 230 User adam2 successfully logged in ftp> quote MEDIA FLSH 200 Media set to MEDIA_FLASH ftp> binary 200 Type set to BINARY ftp> passive Passive mode on. ftp> quote PASV 227 Entering Passive Mode (192,168,178,1,12,0) ftp> put uboot-fritz4040.bin mtd1 local: uboot-fritz4040.bin remote: mtd1 227 Entering Passive Mode (192,168,178,1,12,0) 150 Opening BINARY data connection 226 Transfer complete 524288 bytes sent in 1.96 secs (260.9572 kB/s) ftp> quit 221 Thank you for using the FTP service on ADAM2 Reboot the fritzbox at this point, wait a bit, and the boot loader will launch tftpd and wait for you to send it a file. Compile your OpenWRT image...select the Fritzbox in menuconfig after using this as your initial .config: https://downloads.lede-project.org/snapshots/targets/ipq40xx/generic/config.seed make -j8 # wait a while Copy the .itb image to your tftp server directory and then load it from uboot on the fritzbox: You probably need to run: setenv serverip [your-tftp-server-ip] # Tell the fritzbox to boot over tftp: (FRITZ4040) # tftpboot openwrt-ipq40xx-avm_fritzbox-4040-initramfs-fit-uImage.itb eth0 PHY0 Down Speed :10 Half duplex eth0 PHY1 Down Speed :10 Half duplex eth0 PHY2 Down Speed :10 Half duplex eth0 PHY3 up Speed :1000 Full duplex eth0 PHY4 Down Speed :10 Half duplex Using eth0 device TFTP from server 192.168.1.234; our IP address is 192.168.1.1 Filename 'openwrt-ipq40xx-avm_fritzbox-4040-initramfs-fit-uImage.itb'. Load address: 0x8500 Loading: Got ARP REPLY, set eth addr (80:ee:73:36:fd:10) # # # # ### done Bytes transferred = 4555248 (4581f0 hex) NetBootFileXferSize= 004581f0 (FRITZ4040) # bootm 0x8500 ## Booting kernel from FIT Image at 8500 ... Log into OpenWRT on the Fritzbox, and copy over the sysupgrade image: scp greearb@192.168.1.234:git/lede-acrh13-ct/bin/targets/ipq40xx /generic/openwrt-ipq40xx-avm_fritzbox-4040-squashfs-sysupgrade.bin /tmp/ And run it: sysupgrade /tmp/openwrt-ipq40xx-avm_fritzbox-4040-squashfs-sysupgrade.bin After this, it seems the system boots into uboot which then waits for TFTP transfer. If I ctrl-C that, and then type 'bootm', it seems to boot. I assume this should work automatically, but not sure how to make that happen yet. Maybe I just need to wait a long time? Thanks, Ben -- Ben GreearCandela Technologies Inc http://www.candelatech.com ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] Add support for raspberry pi 3 b+
From: Christo NedevSigned-off-by: Christo Nedev --- target/linux/brcm2708/Makefile | 1 + target/linux/brcm2708/base-files/etc/board.d/02_network | 3 ++- .../base-files/lib/preinit/05_set_preinit_iface_brcm2708 | 1 + target/linux/brcm2708/bcm2709/config-4.9 | 1 + target/linux/brcm2708/bcm2710/config-4.9 | 1 + target/linux/brcm2708/image/Makefile | 12 ++-- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile index 244513dfc6..528422eec2 100644 --- a/target/linux/brcm2708/Makefile +++ b/target/linux/brcm2708/Makefile @@ -25,6 +25,7 @@ include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += \ brcm2708-gpu-fw \ kmod-usb-hid \ + kmod-usb-net kmod-usb-net-rndis kmod-usb-net-cdc-ether \ kmod-sound-core kmod-sound-arm-bcm2835 \ kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \ brcmfmac-firmware-43430-sdio kmod-brcmfmac wpad-mini diff --git a/target/linux/brcm2708/base-files/etc/board.d/02_network b/target/linux/brcm2708/base-files/etc/board.d/02_network index a9c947b65a..de3ded31f6 100755 --- a/target/linux/brcm2708/base-files/etc/board.d/02_network +++ b/target/linux/brcm2708/base-files/etc/board.d/02_network @@ -15,7 +15,8 @@ raspberrypi,model-b |\ raspberrypi,model-b-plus |\ raspberrypi,model-b-rev2 |\ raspberrypi,2-model-b |\ -raspberrypi,3-model-b) +raspberrypi,3-model-b) |\ +raspberrypi,3-model-b-plus ucidef_set_interface_lan "eth0" ;; diff --git a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708 b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708 index 76eb5905e8..3a5c198fc6 100644 --- a/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708 +++ b/target/linux/brcm2708/base-files/lib/preinit/05_set_preinit_iface_brcm2708 @@ -8,6 +8,7 @@ set_preinit_iface() { case "$(board_name)" in raspberrypi,2-model-b |\ raspberrypi,3-model-b |\ + raspberrypi,3-model-b-plus |\ raspberrypi,model-b |\ raspberrypi,model-b-plus |\ raspberrypi,model-b-rev2) diff --git a/target/linux/brcm2708/bcm2709/config-4.9 b/target/linux/brcm2708/bcm2709/config-4.9 index 71884a5fa1..38b97823bd 100644 --- a/target/linux/brcm2708/bcm2709/config-4.9 +++ b/target/linux/brcm2708/bcm2709/config-4.9 @@ -400,6 +400,7 @@ CONFIG_USB_DWCOTG=y # CONFIG_USB_EHCI_HCD is not set CONFIG_USB_NET_DRIVERS=y CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_LAN78XX=y CONFIG_USB_STORAGE=y CONFIG_USB_SUPPORT=y CONFIG_USB_UAS=y diff --git a/target/linux/brcm2708/bcm2710/config-4.9 b/target/linux/brcm2708/bcm2710/config-4.9 index d402f4b573..b7439ed47e 100644 --- a/target/linux/brcm2708/bcm2710/config-4.9 +++ b/target/linux/brcm2708/bcm2710/config-4.9 @@ -418,6 +418,7 @@ CONFIG_USB_DWCOTG=y # CONFIG_USB_EHCI_HCD is not set CONFIG_USB_NET_DRIVERS=y CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_LAN78XX=y CONFIG_USB_STORAGE=y CONFIG_USB_SUPPORT=y CONFIG_USB_UAS=y diff --git a/target/linux/brcm2708/image/Makefile b/target/linux/brcm2708/image/Makefile index 9ea9a07a9d..691212de9f 100644 --- a/target/linux/brcm2708/image/Makefile +++ b/target/linux/brcm2708/image/Makefile @@ -64,9 +64,9 @@ ifeq ($(SUBTARGET),bcm2708) endif define Device/rpi-2 - DEVICE_TITLE := Raspberry Pi 2B/3B/3CM - DEVICE_DTS := bcm2709-rpi-2-b bcm2710-rpi-3-b bcm2710-rpi-cm3 - SUPPORTED_DEVICES := rpi-2-b rpi-3-b rpi-cm raspberrypi,2-model-b raspberrypi,3-model-b raspberrypi,compute-module-3 + DEVICE_TITLE := Raspberry Pi 2B/3B/3B+/3CM + DEVICE_DTS := bcm2709-rpi-2-b bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3 + SUPPORTED_DEVICES := rpi-2-b rpi-3-b rpi-3-b-plus rpi-cm raspberrypi,2-model-b raspberrypi,3-model-b raspberrypi,3-model-b-plus raspberrypi,compute-module-3 endef ifeq ($(SUBTARGET),bcm2709) TARGET_DEVICES += rpi-2 @@ -74,9 +74,9 @@ endif define Device/rpi-3 KERNEL_IMG := kernel8.img - DEVICE_TITLE := Raspberry Pi 3B (64 bit) - DEVICE_DTS := broadcom/bcm2710-rpi-3-b - SUPPORTED_DEVICES := rpi-3-b raspberrypi,3-model-b + DEVICE_TITLE := Raspberry Pi 3B/3B+ + DEVICE_DTS := broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus + SUPPORTED_DEVICES := rpi-3-b rpi-3-b-plus raspberrypi,3-model-b raspberrypi,3-model-b-plus endef ifeq ($(SUBTARGET),bcm2710) TARGET_DEVICES += rpi-3 -- 2.11.0 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] Add support for bcm2708 raspberry pi 3 b+
From: Christo NedevSigned-off-by: Christo Nedev --- .../950-1002-bcm2708-raspberry-pi-3-b-plus.patch | 297 + 1 file changed, 297 insertions(+) create mode 100644 target/linux/brcm2708/patches-4.9/950-1002-bcm2708-raspberry-pi-3-b-plus.patch diff --git a/target/linux/brcm2708/patches-4.9/950-1002-bcm2708-raspberry-pi-3-b-plus.patch b/target/linux/brcm2708/patches-4.9/950-1002-bcm2708-raspberry-pi-3-b-plus.patch new file mode 100644 index 00..83f5b9fd78 --- /dev/null +++ b/target/linux/brcm2708/patches-4.9/950-1002-bcm2708-raspberry-pi-3-b-plus.patch @@ -0,0 +1,297 @@ +--- a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +@@ -7,6 +7,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ + bcm2708-rpi-0-w.dtb \ + bcm2709-rpi-2-b.dtb \ + bcm2710-rpi-3-b.dtb \ ++ bcm2710-rpi-3-b-plus.dtb \ + bcm2710-rpi-cm3.dtb + + dtb-$(CONFIG_ARCH_ALPINE) += \ +--- /dev/null b/arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts +@@ -0,0 +1,219 @@ ++/dts-v1/; ++ ++#include "bcm2710.dtsi" ++#include "bcm283x-rpi-lan7515.dtsi" ++ ++/ { ++ model = "Raspberry Pi 3 Model B+"; ++}; ++ ++ { ++ sdhost_pins: sdhost_pins { ++ brcm,pins = <48 49 50 51 52 53>; ++ brcm,function = <4>; /* alt0 */ ++ }; ++ ++ spi0_pins: spi0_pins { ++ brcm,pins = <9 10 11>; ++ brcm,function = <4>; /* alt0 */ ++ }; ++ ++ spi0_cs_pins: spi0_cs_pins { ++ brcm,pins = <8 7>; ++ brcm,function = <1>; /* output */ ++ }; ++ ++ i2c0_pins: i2c0 { ++ brcm,pins = <0 1>; ++ brcm,function = <4>; ++ }; ++ ++ i2c1_pins: i2c1 { ++ brcm,pins = <2 3>; ++ brcm,function = <4>; ++ }; ++ ++ i2s_pins: i2s { ++ brcm,pins = <18 19 20 21>; ++ brcm,function = <4>; /* alt0 */ ++ }; ++ ++ sdio_pins: sdio_pins { ++ brcm,pins = <34 35 36 37 38 39>; ++ brcm,function = <7>; // alt3 = SD1 ++ brcm,pull = <0 2 2 2 2 2>; ++ }; ++ ++ bt_pins: bt_pins { ++ brcm,pins = <43>; ++ brcm,function = <4>; /* alt0:GPCLK2 */ ++ brcm,pull = <0>; ++ }; ++ ++ uart0_pins: uart0_pins { ++ brcm,pins = <32 33>; ++ brcm,function = <7>; /* alt3=UART0 */ ++ brcm,pull = <0 2>; ++ }; ++ ++ uart1_pins: uart1_pins { ++ brcm,pins; ++ brcm,function; ++ brcm,pull; ++ }; ++ ++ audio_pins: audio_pins { ++ brcm,pins = <40 41>; ++ brcm,function = <4>; ++ }; ++}; ++ ++ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <_pins>; ++ bus-width = <4>; ++ status = "okay"; ++}; ++ ++ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <_pins>; ++ non-removable; ++ bus-width = <4>; ++ status = "okay"; ++ brcm,overclock-50 = <0>; ++}; ++ ++ { ++ expgpio: expgpio { ++ compatible = "brcm,bcm2835-expgpio"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ firmware = <>; ++ status = "okay"; ++ }; ++}; ++ ++ { ++ status = "okay"; ++}; ++ ++ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <_pins _pins>; ++ status = "okay"; ++}; ++ ++ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <_pins>; ++ status = "okay"; ++}; ++ ++ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <_pins _cs_pins>; ++ cs-gpios = < 8 1>, < 7 1>; ++ ++ spidev0: spidev@0{ ++ compatible = "spidev"; ++ reg = <0>; /* CE0 */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ spi-max-frequency = <12500>; ++ }; ++ ++ spidev1: spidev@1{ ++ compatible = "spidev"; ++ reg = <1>; /* CE1 */ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ spi-max-frequency = <12500>; ++ }; ++}; ++ ++ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <_pins>; ++ clock-frequency = <10>; ++}; ++ ++ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <_pins>; ++ clock-frequency = <10>; ++}; ++ ++ { ++ clock-frequency = <10>; ++}; ++ ++ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <_pins>; ++}; ++ ++ { ++ act_led: act { ++ label = "led0"; ++ linux,default-trigger = "mmc0"; ++ gpios = < 29 0>; ++ }; ++ ++ pwr_led: pwr { ++ label = "led1"; ++ linux,default-trigger = "default-on"; ++ gpios = < 2 GPIO_ACTIVE_LOW>; ++ }; ++}; ++ ++ { ++ hpd-gpios = < 4 GPIO_ACTIVE_LOW>; ++}; ++ ++ { ++ pinctrl-names = "default"; ++ pinctrl-0 = <_pins>; ++}; ++ ++/ { ++ chosen { ++
Re: [LEDE-DEV] [PATCH 1/2] firmware-utils: mkdapimg2: Fix potential buffer overflow
On 04/23/2018 01:22 AM, Rosen Penev wrote: > If GCC is built with stack smashing protection enabled (SSP), it errors when > compiling lzma-loader. > > Switching to strncpy seems to be an easy way to fix this. It's probably > better to use snprintf or strlcpy but the latter is not available for glibc > systems. I also saw this problem, because my version number got too long and it just failed because the first byte of the signature contained now the terminating NULL byte of the version. Does anybody know if the version number, signature and so on has to be NULL terminated or not? I created this patch some days ago to not run into this problem any more: https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=commitdiff;h=b69a5d5ee4c7611a45693eec481f259520eb6422 > Output of crash below: > > *** buffer overflow detected ***: > /home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg2 terminated > === Backtrace: = > /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f6318ea77e5] > /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f6318f4915c] > /lib/x86_64-linux-gnu/libc.so.6(+0x117160)[0x7f6318f47160] > /home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg2[0x400ab7] > /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f6318e50830] > /home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg2[0x400e69] > === Memory map: > 0040-00402000 r-xp 00:00 223275 > /home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg200601000-00602000 > r--p 1000 00:00 223275 > /home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg200602000-00603000 > rw-p 2000 00:00 223275 > /home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg2018c2000-018e3000 > rw-p 00:00 0 [heap] > 7f6318c1-7f6318c26000 r-xp 00:00 122040 > /lib/x86_64-linux-gnu/libgcc_s.so.1 > 7f6318c26000-7f6318e25000 ---p 00016000 00:00 122040 > /lib/x86_64-linux-gnu/libgcc_s.so.1 > 7f6318e25000-7f6318e26000 rw-p 00015000 00:00 122040 > /lib/x86_64-linux-gnu/libgcc_s.so.1 > 7f6318e3-7f6318ff r-xp 00:00 123971 > /lib/x86_64-linux-gnu/libc-2.23.so > 7f6318ff-7f6318ff9000 ---p 001c 00:00 123971 > /lib/x86_64-linux-gnu/libc-2.23.so > 7f6318ff9000-7f63191f ---p 001c9000 00:00 123971 > /lib/x86_64-linux-gnu/libc-2.23.so > 7f63191f-7f63191f4000 r--p 001c 00:00 123971 > /lib/x86_64-linux-gnu/libc-2.23.so > 7f63191f4000-7f63191f6000 rw-p 001c4000 00:00 123971 > /lib/x86_64-linux-gnu/libc-2.23.so > 7f63191f6000-7f63191fa000 rw-p 00:00 0 > 7f631920-7f6319226000 r-xp 00:00 123969 > /lib/x86_64-linux-gnu/ld-2.23.so > 7f6319425000-7f6319426000 r--p 00025000 00:00 123969 > /lib/x86_64-linux-gnu/ld-2.23.so > 7f6319426000-7f6319427000 rw-p 00026000 00:00 123969 > /lib/x86_64-linux-gnu/ld-2.23.so > 7f6319427000-7f6319428000 rw-p 00:00 0 > 7f631946-7f6319461000 rw-p 00:00 0 > 7f631947-7f6319471000 rw-p 00:00 0 > 7f631948-7f6319481000 rw-p 00:00 0 > 7f631949-7f6319491000 rw-p 00:00 0 > 7fffca52e000-7fffcad2e000 rw-p 00:00 0 [stack] > 7fffcb121000-7fffcb122000 r-xp 00:00 0 [vdso] > make -r world: build failed. Please re-run make with -j1 V=s to see what's > going on > > Signed-off-by: Rosen Penev> --- > tools/firmware-utils/src/mkdapimg2.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tools/firmware-utils/src/mkdapimg2.c > b/tools/firmware-utils/src/mkdapimg2.c > index aef003c..59c9f00 100644 > --- a/tools/firmware-utils/src/mkdapimg2.c > +++ b/tools/firmware-utils/src/mkdapimg2.c > @@ -119,7 +119,7 @@ main(int ac, char *av[]) > progname, MAX_SIGN_LEN); > exit(1); > } > - strcpy(signature, optarg); > + strncpy(signature, optarg, MAX_SIGN_LEN); > break; > case 'v': > if (strlen(optarg) > MAX_FW_VER_LEN + 1) { > @@ -127,7 +127,7 @@ main(int ac, char *av[]) > progname, MAX_FW_VER_LEN); > exit(1); > } > - strcpy(version, optarg); > + strncpy(version, optarg, MAX_FW_VER_LEN); > break; > case 'r': > if (strlen(optarg) > MAX_REG_LEN + 1) { > @@ -135,7 +135,7 @@ main(int ac, char *av[]) > progname, MAX_REG_LEN); > exit(1); > } > - strcpy(region, optarg); > +
Re: [LEDE-DEV] [PATCH v2 4/5] mtd-utils: update to 2.0.2
On 04/20/2018 01:01 AM, Syrone Wong wrote: > Hi, > > Thanks for the update. > I would prefer the git way, it's easier to include upstream commits. I normally prefer tars compared to git when we reference a specific version. They are easier to mirror, but we also have our own method now to generate nice tars from git trees. If you want to go to a different version without a tar you can switch back to git at any time. Hauke > Best Regards, > Syrone Wong > > > On Fri, Apr 20, 2018 at 6:12 AM, Hauke Mehrtenswrote: >> From: Syrone Wong >> >> 010-fix-rpmatch.patch is upstream, removed from our patchset >> The file structure is changed, modify patch accordingly >> use CONFIGURE_ARGS to disable tests, xattr and lzo >> >> Compile and run tested on mvebu and x86_64 >> >> Signed-off-by: Syrone Wong >> --- >> >> changes since v1: >> * Update to version 2.0.2 >> * use ftp to download the tar >> >> package/utils/mtd-utils/Makefile | 22 >> .../utils/mtd-utils/patches/010-fix-rpmatch.patch | 19 --- >> .../utils/mtd-utils/patches/100-fix_includes.patch | 2 +- >> .../utils/mtd-utils/patches/130-lzma_jffs2.patch | 66 >> -- >> 4 files changed, 47 insertions(+), 62 deletions(-) >> delete mode 100644 package/utils/mtd-utils/patches/010-fix-rpmatch.patch >> >> diff --git a/package/utils/mtd-utils/Makefile >> b/package/utils/mtd-utils/Makefile >> index 1e3c281156..2ce7d671fe 100644 >> --- a/package/utils/mtd-utils/Makefile >> +++ b/package/utils/mtd-utils/Makefile >> @@ -8,15 +8,15 @@ >> include $(TOPDIR)/rules.mk >> >> PKG_NAME:=mtd-utils >> -PKG_VERSION:=1.5.2 >> +PKG_VERSION:=2.0.2 >> PKG_RELEASE:=1 >> >> -PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git >> -PKG_SOURCE_PROTO:=git >> -PKG_SOURCE_VERSION:=aea36417067dade75192bafa03af70b6eb2677b1 >> -PKG_MIRROR_HASH:=e11b342b85a36b2e438a8412ec52f87621d3046aec1a93039f8c72de9990b2a7 >> +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 >> +PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/ >> +PKG_HASH:=fb3de61be8e932abb424e8ea3c30298f553d5f970ad158a737bb303bbf9660b8 >> >> PKG_INSTALL:=1 >> +PKG_FIXUP:=autoreconf >> >> PKG_FLAGS:=nonshared >> >> @@ -54,12 +54,12 @@ define Package/nand-utils/description >>Utilities for NAND devices. >> endef >> >> -MAKE_FLAGS += \ >> - DESTDIR="$(PKG_INSTALL_DIR)" \ >> - BUILDDIR="$(PKG_BUILD_DIR)" \ >> - LDLIBS+="$(LIBGCC_S)" \ >> - WITHOUT_XATTR=1 \ >> - WITHOUT_LZO=1 >> +MAKE_FLAGS += LDLIBS+="$(LIBGCC_S)" >> + >> +CONFIGURE_ARGS += \ >> + --disable-tests \ >> + --without-xattr \ >> + --without-lzo >> >> define Package/ubi-utils/install >> $(INSTALL_DIR) $(1)/usr/sbin >> diff --git a/package/utils/mtd-utils/patches/010-fix-rpmatch.patch >> b/package/utils/mtd-utils/patches/010-fix-rpmatch.patch >> deleted file mode 100644 >> index 8374a26e9b..00 >> --- a/package/utils/mtd-utils/patches/010-fix-rpmatch.patch >> +++ /dev/null >> @@ -1,19 +0,0 @@ >> a/include/common.h >> -+++ b/include/common.h >> -@@ -152,10 +152,12 @@ static inline bool prompt(const char *ms >> - } >> - >> - if (strcmp("\n", line) != 0) { >> -- switch (rpmatch(line)) { >> -- case 0: ret = false; break; >> -- case 1: ret = true; break; >> -- case -1: >> -+ switch (line[0]) { >> -+ case 'N': >> -+ case 'n': ret = false; break; >> -+ case 'Y': >> -+ case 'y': ret = true; break; >> -+ default: >> - puts("unknown response; please try again"); >> - continue; >> - } >> diff --git a/package/utils/mtd-utils/patches/100-fix_includes.patch >> b/package/utils/mtd-utils/patches/100-fix_includes.patch >> index 7dad28b472..cc75052c5e 100644 >> --- a/package/utils/mtd-utils/patches/100-fix_includes.patch >> +++ b/package/utils/mtd-utils/patches/100-fix_includes.patch >> @@ -5,6 +5,6 @@ >> #include >> #include >> +#include >> + #include "libfec.h" >> >> /* >> - * stuff used for testing purposes only >> diff --git a/package/utils/mtd-utils/patches/130-lzma_jffs2.patch >> b/package/utils/mtd-utils/patches/130-lzma_jffs2.patch >> index c6454fed57..d9cbfeebec 100644 >> --- a/package/utils/mtd-utils/patches/130-lzma_jffs2.patch >> +++ b/package/utils/mtd-utils/patches/130-lzma_jffs2.patch >> @@ -1,25 +1,29 @@ >> a/Makefile >> -+++ b/Makefile >> -@@ -3,7 +3,7 @@ >> +--- a/jffsX-utils/Makemodule.am >> b/jffsX-utils/Makemodule.am >> +@@ -4,11 +4,19 @@ mkfs_jffs2_SOURCES = \ >> + jffsX-utils/compr_zlib.c \ >> + jffsX-utils/compr.h \ >> + jffsX-utils/rbtree.c \ >> +- jffsX-utils/compr_lzo.c \ >> ++ jffsX-utils/compr_lzma.c
Re: [LEDE-DEV] [PATCH 1/2] x86: add amd microcode entries to grub config
W dniu 24.04.2018 o 22:00, Stijn Segers pisze: [snip] >>> >>> I'm not sure what's going wrong here, I'm on a clean master tree but your >>> first patch does not apply: >>> >>> $ git am 1.patch >>> Applying: x86: add amd microcode entries to grub config >>> error: patch failed: >>> target/linux/x86/base-files/lib/preinit/02_load_x86_ucode:1 >>> error: target/linux/x86/base-files/lib/preinit/02_load_x86_ucode: patch >>> does not apply >>> error: patch failed: target/linux/x86/image/grub-iso.cfg:10 >>> error: target/linux/x86/image/grub-iso.cfg: patch does not apply >>> error: patch failed: target/linux/x86/image/grub.cfg:10 >>> error: target/linux/x86/image/grub.cfg: patch does not apply >>> Patch failed at 0001 x86: add amd microcode entries to grub config >>> $ ./scripts/getver.sh >>> r6755-d089a5d773 >>> >> >> Hi. >> >> I did wrongly spell myself out instead of "This series needs to be applied >> on top of 'intel-microcode: load as early as possible' series." it should >> be: "This series needs to be applied after 'intel-microcode: load as early >> as possible' series.". Sorry about it. > > Nope - turns out I was too quick, my apologies :-(. I merely looked at your > first mail that actually had a patch for AMD and not at the one preceding it > (which stated I needed to apply the Intel series first). Applied cleanly. How > do I check whether it's functional? I grepped dmesg for AMD or ucode, but > nothing shows. Logread doesn't work at all (but I reckon that's unrelated). You should grep -i for "microcode", it should say something like: "microcode updated early ..." probably on first line in kernel log. Strange thing is that logread doesn't work, but I don't know what's causing this. > > Dmesg does say full retpoline support has been enabled, but unless I'm > mistaken that was a compiler feature, not something that could be solved with > microcode alone> > Cheers > > Stijn > > > >> >>> Second does apply cleanly. >>> >>> Cheers >>> >>> Stijn >>> [snip] -- TMN ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 1/2] x86: add amd microcode entries to grub config
Op di, 24 apr 2018 om 9:14 , schreef Tomasz Maciej Nowak: W dniu 24.04.2018 o 21:03, Stijn Segers pisze: Hi Tomasz, Op di, 24 apr 2018 om 2:56 , schreef Tomasz Maciej Nowak : Create initrd enries for x86 images, that'll load amd microcode as early as possible. Also remove the preinit script responsible for late load of microcode. Signed-off-by: Tomasz Maciej Nowak --- .../x86/base-files/lib/preinit/02_load_x86_ucode | 12 target/linux/x86/image/grub-iso.cfg | 3 +++ target/linux/x86/image/grub.cfg | 3 +++ 3 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 target/linux/x86/base-files/lib/preinit/02_load_x86_ucode I'm not sure what's going wrong here, I'm on a clean master tree but your first patch does not apply: $ git am 1.patch Applying: x86: add amd microcode entries to grub config error: patch failed: target/linux/x86/base-files/lib/preinit/02_load_x86_ucode:1 error: target/linux/x86/base-files/lib/preinit/02_load_x86_ucode: patch does not apply error: patch failed: target/linux/x86/image/grub-iso.cfg:10 error: target/linux/x86/image/grub-iso.cfg: patch does not apply error: patch failed: target/linux/x86/image/grub.cfg:10 error: target/linux/x86/image/grub.cfg: patch does not apply Patch failed at 0001 x86: add amd microcode entries to grub config $ ./scripts/getver.sh r6755-d089a5d773 Hi. I did wrongly spell myself out instead of "This series needs to be applied on top of 'intel-microcode: load as early as possible' series." it should be: "This series needs to be applied after 'intel-microcode: load as early as possible' series.". Sorry about it. Nope - turns out I was too quick, my apologies :-(. I merely looked at your first mail that actually had a patch for AMD and not at the one preceding it (which stated I needed to apply the Intel series first). Applied cleanly. How do I check whether it's functional? I grepped dmesg for AMD or ucode, but nothing shows. Logread doesn't work at all (but I reckon that's unrelated). Dmesg does say full retpoline support has been enabled, but unless I'm mistaken that was a compiler feature, not something that could be solved with microcode alone? Cheers Stijn Second does apply cleanly. Cheers Stijn diff --git a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode deleted file mode 100644 index d3a23e24b2..00 --- a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Copyright (C) 2018 OpenWrt.org - -do_load_x86_ucode() { -if grep -q AuthenticAMD /proc/cpuinfo; then -if [ -e "/sys/devices/system/cpu/microcode/reload" ]; then -echo 1 > /sys/devices/system/cpu/microcode/reload -fi -fi -} - -boot_hook_add preinit_main do_load_x86_ucode diff --git a/target/linux/x86/image/grub-iso.cfg b/target/linux/x86/image/grub-iso.cfg index 30b587bd1c..5a2d67b7b3 100644 --- a/target/linux/x86/image/grub-iso.cfg +++ b/target/linux/x86/image/grub-iso.cfg @@ -10,4 +10,7 @@ menuentry "OpenWrt" { if [ -e /boot/intel-ucode.img ]; then initrd /boot/intel-ucode.img fi +if [ -e /boot/amd-ucode.img ]; then +initrd /boot/amd-ucode.img +fi } diff --git a/target/linux/x86/image/grub.cfg b/target/linux/x86/image/grub.cfg index dde24b95ce..caf38ec2c4 100644 --- a/target/linux/x86/image/grub.cfg +++ b/target/linux/x86/image/grub.cfg @@ -10,6 +10,9 @@ menuentry "OpenWrt" { if [ -e /boot/intel-ucode.img ]; then initrd /boot/intel-ucode.img fi +if [ -e /boot/amd-ucode.img ]; then +initrd /boot/amd-ucode.img +fi } menuentry "OpenWrt (failsafe)" { linux /boot/vmlinuz failsafe=true @CMDLINE@ noinitrd -- 2.17.0 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev -- TMN ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] kernel: bump 4.14 to 4.14.36
Compile-tested on: ramips/mt7621, x86/64. Run-tested on: ramips/mt7621, x86/64. Op di, 24 apr 2018 om 4:59 , schreef Koen Vandeputte: Refreshed all patches. Compile-tested on: cns3xxx, imx6 Runtime-tested on: cns3xxx, imx6 Fixes for CVEs: CVE-2018-1108 CVE-2018-1092 CVE-2018-1094 CVE-2018-1095 Signed-off-by: Koen Vandeputte Tested-by: Stijn Segers --- Note: Requires the patch from Kevin D-B (kernel: bump 4.9 to 4.9.96) first to avoid conflicts in kernel-version.h include/kernel-version.mk | 4 ++-- target/linux/cns3xxx/patches-4.14/075-spi_support.patch| 2 +- ...-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch | 4 ++-- .../400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch| 2 +- .../patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch | 2 +- target/linux/mediatek/patches-4.14/0064-dts.patch | 10 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 9191bddc7d00..8d0a62347cbf 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -5,12 +5,12 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .71 LINUX_VERSION-4.4 = .121 LINUX_VERSION-4.9 = .96 -LINUX_VERSION-4.14 = .34 +LINUX_VERSION-4.14 = .36 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729 LINUX_KERNEL_HASH-4.9.96 = 826f596eb5197f8b17304649c2990dd7b766f5c79076cae79f4261c40cea877f -LINUX_KERNEL_HASH-4.14.34 = 782b6c4c85275c382c820e1934d3e6003ef468f43cfc5e7c22bc07c331a12bb9 +LINUX_KERNEL_HASH-4.14.36 = cae24404d7b5812a331cbbc430b3ab75ca0f76eb16803528cbffbc42e768bc43 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))) diff --git a/target/linux/cns3xxx/patches-4.14/075-spi_support.patch b/target/linux/cns3xxx/patches-4.14/075-spi_support.patch index 8a51eb396b47..e38dbdb75e10 100644 --- a/target/linux/cns3xxx/patches-4.14/075-spi_support.patch +++ b/target/linux/cns3xxx/patches-4.14/075-spi_support.patch @@ -39,7 +39,7 @@ /** --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1021,6 +1021,9 @@ static int spi_transfer_one_message(stru +@@ -1027,6 +1027,9 @@ static int spi_transfer_one_message(stru list_for_each_entry(xfer, >transfers, transfer_list) { trace_spi_transfer_start(msg, xfer); diff --git a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch index 180d1407d24f..2a09caf44254 100644 --- a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch +++ b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch @@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1157,6 +1157,49 @@ static struct mtd_info * __init open_mtd +@@ -1168,6 +1168,49 @@ static struct mtd_info * __init open_mtd return mtd; } @@ -58,7 +58,7 @@ Signed-off-by: Daniel Golle static int __init ubi_init(void) { int err, i, k; -@@ -1240,6 +1283,12 @@ static int __init ubi_init(void) +@@ -1251,6 +1294,12 @@ static int __init ubi_init(void) } } diff --git a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch index 86cb454619da..8a9da2c08813 100644 --- a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch +++ b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch @@ -17,7 +17,7 @@ Signed-off-by: Christian Lamparter --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1170,6 +1170,9 @@ static void __init ubi_auto_attach(void) +@@ -1181,6 +1181,9 @@ static void __init ubi_auto_attach(void) mtd = open_mtd_device("ubi"); if (IS_ERR(mtd)) mtd = open_mtd_device("data"); diff --git a/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch b/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch index a0fdc14f782c..a443adfe6486 100644 --- a/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch +++ b/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch @@ -16,7 +16,7 @@ Acked-by: Philipp Zabel ---
[LEDE-DEV] [PATCH] Add-support-for-raspberry-pi-3-b-plus
From: christo-nedevSigned-off-by: christo-nedev --- .../brcm2708/patches-4.9/950-1002-Add-support-for-raspberry-pi-3-b-plus | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 target/linux/brcm2708/patches-4.9/950-1002-Add-support-for-raspberry-pi-3-b-plus diff --git a/target/linux/brcm2708/patches-4.9/950-1002-Add-support-for-raspberry-pi-3-b-plus b/target/linux/brcm2708/patches-4.9/950-1002-Add-support-for-raspberry-pi-3-b-plus new file mode 100644 index 00..e69de29bb2 -- 2.11.0 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] kernel: bump 4.9 to 4.9.96
Tested-by: Arjen de KorteTarget: ar71xx (Netgear WNDR4300) ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 1/2] x86: add amd microcode entries to grub config
W dniu 24.04.2018 o 21:03, Stijn Segers pisze: > Hi Tomasz, > > Op di, 24 apr 2018 om 2:56 , schreef Tomasz Maciej Nowak: >> Create initrd enries for x86 images, that'll load amd microcode as early >> as possible. Also remove the preinit script responsible for late load of >> microcode. >> >> Signed-off-by: Tomasz Maciej Nowak >> --- >> .../x86/base-files/lib/preinit/02_load_x86_ucode | 12 >> target/linux/x86/image/grub-iso.cfg | 3 +++ >> target/linux/x86/image/grub.cfg | 3 +++ >> 3 files changed, 6 insertions(+), 12 deletions(-) >> delete mode 100644 target/linux/x86/base-files/lib/preinit/02_load_x86_ucode > > I'm not sure what's going wrong here, I'm on a clean master tree but your > first patch does not apply: > > $ git am 1.patch > Applying: x86: add amd microcode entries to grub config > error: patch failed: > target/linux/x86/base-files/lib/preinit/02_load_x86_ucode:1 > error: target/linux/x86/base-files/lib/preinit/02_load_x86_ucode: patch does > not apply > error: patch failed: target/linux/x86/image/grub-iso.cfg:10 > error: target/linux/x86/image/grub-iso.cfg: patch does not apply > error: patch failed: target/linux/x86/image/grub.cfg:10 > error: target/linux/x86/image/grub.cfg: patch does not apply > Patch failed at 0001 x86: add amd microcode entries to grub config > $ ./scripts/getver.sh > r6755-d089a5d773 > Hi. I did wrongly spell myself out instead of "This series needs to be applied on top of 'intel-microcode: load as early as possible' series." it should be: "This series needs to be applied after 'intel-microcode: load as early as possible' series.". Sorry about it. > Second does apply cleanly. > > Cheers > > Stijn > > >> >> diff --git a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode >> b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode >> deleted file mode 100644 >> index d3a23e24b2..00 >> --- a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode >> +++ /dev/null >> @@ -1,12 +0,0 @@ >> -#!/bin/sh >> -# Copyright (C) 2018 OpenWrt.org >> - >> -do_load_x86_ucode() { >> - if grep -q AuthenticAMD /proc/cpuinfo; then >> - if [ -e "/sys/devices/system/cpu/microcode/reload" ]; then >> - echo 1 > /sys/devices/system/cpu/microcode/reload >> - fi >> - fi >> -} >> - >> -boot_hook_add preinit_main do_load_x86_ucode >> diff --git a/target/linux/x86/image/grub-iso.cfg >> b/target/linux/x86/image/grub-iso.cfg >> index 30b587bd1c..5a2d67b7b3 100644 >> --- a/target/linux/x86/image/grub-iso.cfg >> +++ b/target/linux/x86/image/grub-iso.cfg >> @@ -10,4 +10,7 @@ menuentry "OpenWrt" { >> if [ -e /boot/intel-ucode.img ]; then >> initrd /boot/intel-ucode.img >> fi >> + if [ -e /boot/amd-ucode.img ]; then >> + initrd /boot/amd-ucode.img >> + fi >> } >> diff --git a/target/linux/x86/image/grub.cfg >> b/target/linux/x86/image/grub.cfg >> index dde24b95ce..caf38ec2c4 100644 >> --- a/target/linux/x86/image/grub.cfg >> +++ b/target/linux/x86/image/grub.cfg >> @@ -10,6 +10,9 @@ menuentry "OpenWrt" { >> if [ -e /boot/intel-ucode.img ]; then >> initrd /boot/intel-ucode.img >> fi >> + if [ -e /boot/amd-ucode.img ]; then >> + initrd /boot/amd-ucode.img >> + fi >> } >> menuentry "OpenWrt (failsafe)" { >> linux /boot/vmlinuz failsafe=true @CMDLINE@ noinitrd >> -- >> 2.17.0 >> >> >> ___ >> Lede-dev mailing list >> Lede-dev@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/lede-dev > -- TMN ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 1/2] x86: add amd microcode entries to grub config
Hi Tomasz, Op di, 24 apr 2018 om 2:56 , schreef Tomasz Maciej Nowak: Create initrd enries for x86 images, that'll load amd microcode as early as possible. Also remove the preinit script responsible for late load of microcode. Signed-off-by: Tomasz Maciej Nowak --- .../x86/base-files/lib/preinit/02_load_x86_ucode | 12 target/linux/x86/image/grub-iso.cfg | 3 +++ target/linux/x86/image/grub.cfg | 3 +++ 3 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 target/linux/x86/base-files/lib/preinit/02_load_x86_ucode I'm not sure what's going wrong here, I'm on a clean master tree but your first patch does not apply: $ git am 1.patch Applying: x86: add amd microcode entries to grub config error: patch failed: target/linux/x86/base-files/lib/preinit/02_load_x86_ucode:1 error: target/linux/x86/base-files/lib/preinit/02_load_x86_ucode: patch does not apply error: patch failed: target/linux/x86/image/grub-iso.cfg:10 error: target/linux/x86/image/grub-iso.cfg: patch does not apply error: patch failed: target/linux/x86/image/grub.cfg:10 error: target/linux/x86/image/grub.cfg: patch does not apply Patch failed at 0001 x86: add amd microcode entries to grub config $ ./scripts/getver.sh r6755-d089a5d773 Second does apply cleanly. Cheers Stijn diff --git a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode deleted file mode 100644 index d3a23e24b2..00 --- a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Copyright (C) 2018 OpenWrt.org - -do_load_x86_ucode() { - if grep -q AuthenticAMD /proc/cpuinfo; then - if [ -e "/sys/devices/system/cpu/microcode/reload" ]; then - echo 1 > /sys/devices/system/cpu/microcode/reload - fi - fi -} - -boot_hook_add preinit_main do_load_x86_ucode diff --git a/target/linux/x86/image/grub-iso.cfg b/target/linux/x86/image/grub-iso.cfg index 30b587bd1c..5a2d67b7b3 100644 --- a/target/linux/x86/image/grub-iso.cfg +++ b/target/linux/x86/image/grub-iso.cfg @@ -10,4 +10,7 @@ menuentry "OpenWrt" { if [ -e /boot/intel-ucode.img ]; then initrd /boot/intel-ucode.img fi + if [ -e /boot/amd-ucode.img ]; then + initrd /boot/amd-ucode.img + fi } diff --git a/target/linux/x86/image/grub.cfg b/target/linux/x86/image/grub.cfg index dde24b95ce..caf38ec2c4 100644 --- a/target/linux/x86/image/grub.cfg +++ b/target/linux/x86/image/grub.cfg @@ -10,6 +10,9 @@ menuentry "OpenWrt" { if [ -e /boot/intel-ucode.img ]; then initrd /boot/intel-ucode.img fi + if [ -e /boot/amd-ucode.img ]; then + initrd /boot/amd-ucode.img + fi } menuentry "OpenWrt (failsafe)" { linux /boot/vmlinuz failsafe=true @CMDLINE@ noinitrd -- 2.17.0 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] kernel: bump 4.14 to 4.14.36
Refreshed all patches. Compile-tested on: cns3xxx, imx6 Runtime-tested on: cns3xxx, imx6 Fixes for CVEs: CVE-2018-1108 CVE-2018-1092 CVE-2018-1094 CVE-2018-1095 Signed-off-by: Koen Vandeputte--- Note: Requires the patch from Kevin D-B (kernel: bump 4.9 to 4.9.96) first to avoid conflicts in kernel-version.h include/kernel-version.mk | 4 ++-- target/linux/cns3xxx/patches-4.14/075-spi_support.patch| 2 +- ...-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch | 4 ++-- .../400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch| 2 +- .../patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch | 2 +- target/linux/mediatek/patches-4.14/0064-dts.patch | 10 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 9191bddc7d00..8d0a62347cbf 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -5,12 +5,12 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .71 LINUX_VERSION-4.4 = .121 LINUX_VERSION-4.9 = .96 -LINUX_VERSION-4.14 = .34 +LINUX_VERSION-4.14 = .36 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729 LINUX_KERNEL_HASH-4.9.96 = 826f596eb5197f8b17304649c2990dd7b766f5c79076cae79f4261c40cea877f -LINUX_KERNEL_HASH-4.14.34 = 782b6c4c85275c382c820e1934d3e6003ef468f43cfc5e7c22bc07c331a12bb9 +LINUX_KERNEL_HASH-4.14.36 = cae24404d7b5812a331cbbc430b3ab75ca0f76eb16803528cbffbc42e768bc43 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))) diff --git a/target/linux/cns3xxx/patches-4.14/075-spi_support.patch b/target/linux/cns3xxx/patches-4.14/075-spi_support.patch index 8a51eb396b47..e38dbdb75e10 100644 --- a/target/linux/cns3xxx/patches-4.14/075-spi_support.patch +++ b/target/linux/cns3xxx/patches-4.14/075-spi_support.patch @@ -39,7 +39,7 @@ /** --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c -@@ -1021,6 +1021,9 @@ static int spi_transfer_one_message(stru +@@ -1027,6 +1027,9 @@ static int spi_transfer_one_message(stru list_for_each_entry(xfer, >transfers, transfer_list) { trace_spi_transfer_start(msg, xfer); diff --git a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch index 180d1407d24f..2a09caf44254 100644 --- a/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch +++ b/target/linux/generic/pending-4.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch @@ -8,7 +8,7 @@ Signed-off-by: Daniel Golle --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1157,6 +1157,49 @@ static struct mtd_info * __init open_mtd +@@ -1168,6 +1168,49 @@ static struct mtd_info * __init open_mtd return mtd; } @@ -58,7 +58,7 @@ Signed-off-by: Daniel Golle static int __init ubi_init(void) { int err, i, k; -@@ -1240,6 +1283,12 @@ static int __init ubi_init(void) +@@ -1251,6 +1294,12 @@ static int __init ubi_init(void) } } diff --git a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch index 86cb454619da..8a9da2c08813 100644 --- a/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch +++ b/target/linux/ipq40xx/patches-4.14/400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch @@ -17,7 +17,7 @@ Signed-off-by: Christian Lamparter --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c -@@ -1170,6 +1170,9 @@ static void __init ubi_auto_attach(void) +@@ -1181,6 +1181,9 @@ static void __init ubi_auto_attach(void) mtd = open_mtd_device("ubi"); if (IS_ERR(mtd)) mtd = open_mtd_device("data"); diff --git a/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch b/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch index a0fdc14f782c..a443adfe6486 100644 --- a/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch +++ b/target/linux/mediatek/patches-4.14/0006-reset-mediatek-mt2701-reset-driver.patch @@ -16,7 +16,7 @@ Acked-by: Philipp Zabel --- a/drivers/clk/mediatek/clk-mt2701.c +++ b/drivers/clk/mediatek/clk-mt2701.c -@@ -771,6 +771,8 @@ static void mtk_infrasys_init_early(stru +@@ -772,6 +772,8 @@ static void mtk_infrasys_init_early(stru if (r)
Re: [LEDE-DEV] [PATCH] kernel: bump 4.9 to 4.9.96
Tested-by: Koen VandeputteTarget: ar71xx (Ubnt Rocket M5) ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH 2/2] amd64-microcode: create early load microcode image
Create initrd image with packed microcode. This'll allow to load it at early boot stage. Signed-off-by: Tomasz Maciej Nowak--- package/firmware/amd64-microcode/Makefile | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/package/firmware/amd64-microcode/Makefile b/package/firmware/amd64-microcode/Makefile index e88b02950f..5eecf24351 100644 --- a/package/firmware/amd64-microcode/Makefile +++ b/package/firmware/amd64-microcode/Makefile @@ -35,11 +35,17 @@ define Build/Prepare endef define Build/Compile + mkdir -p $(PKG_BUILD_DIR)/kernel/x86/microcode/ + cat $(PKG_BUILD_DIR)/microcode_amd*.bin \ + > $(PKG_BUILD_DIR)/kernel/x86/microcode/AuthenticAMD.bin + (cd $(PKG_BUILD_DIR); \ + echo "kernel/x86/microcode/AuthenticAMD.bin" \ + | cpio -o -H newc --reproducible > amd-ucode.cpio) endef define Package/amd64-microcode/install - $(INSTALL_DIR) $(1)/lib/firmware/amd-ucode - $(INSTALL_DATA) $(PKG_BUILD_DIR)/*.bin $(1)/lib/firmware/amd-ucode + $(INSTALL_DIR) $(1)/boot + $(INSTALL_DATA) $(PKG_BUILD_DIR)/amd-ucode.cpio $(1)/boot/amd-ucode.img endef $(eval $(call BuildPackage,amd64-microcode)) -- 2.17.0 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH v2 5/6] x86: add intel microcode entries
Hi Stijn. Go ahead and test it. Had to convert Makefile to use cpio instead of $(LINUX_DIR)/usr/gen_init_cpio, because gen_init_cpio is built after packages. The packaging of microcode follows loosely what's in Documentation/x86/microcode.txt of kernel tree. This series needs to be applied on top of 'intel-microcode: load as early as possible' series. Tomasz Maciej Nowak (2): x86: add amd microcode entries to grub config amd64-microcode: create early load microcode image package/firmware/amd64-microcode/Makefile| 10 -- .../x86/base-files/lib/preinit/02_load_x86_ucode | 12 target/linux/x86/image/grub-iso.cfg | 3 +++ target/linux/x86/image/grub.cfg | 3 +++ 4 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 target/linux/x86/base-files/lib/preinit/02_load_x86_ucode -- 2.17.0 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH 1/2] x86: add amd microcode entries to grub config
Create initrd enries for x86 images, that'll load amd microcode as early as possible. Also remove the preinit script responsible for late load of microcode. Signed-off-by: Tomasz Maciej Nowak--- .../x86/base-files/lib/preinit/02_load_x86_ucode | 12 target/linux/x86/image/grub-iso.cfg | 3 +++ target/linux/x86/image/grub.cfg | 3 +++ 3 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 target/linux/x86/base-files/lib/preinit/02_load_x86_ucode diff --git a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode deleted file mode 100644 index d3a23e24b2..00 --- a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Copyright (C) 2018 OpenWrt.org - -do_load_x86_ucode() { - if grep -q AuthenticAMD /proc/cpuinfo; then - if [ -e "/sys/devices/system/cpu/microcode/reload" ]; then - echo 1 > /sys/devices/system/cpu/microcode/reload - fi - fi -} - -boot_hook_add preinit_main do_load_x86_ucode diff --git a/target/linux/x86/image/grub-iso.cfg b/target/linux/x86/image/grub-iso.cfg index 30b587bd1c..5a2d67b7b3 100644 --- a/target/linux/x86/image/grub-iso.cfg +++ b/target/linux/x86/image/grub-iso.cfg @@ -10,4 +10,7 @@ menuentry "OpenWrt" { if [ -e /boot/intel-ucode.img ]; then initrd /boot/intel-ucode.img fi + if [ -e /boot/amd-ucode.img ]; then + initrd /boot/amd-ucode.img + fi } diff --git a/target/linux/x86/image/grub.cfg b/target/linux/x86/image/grub.cfg index dde24b95ce..caf38ec2c4 100644 --- a/target/linux/x86/image/grub.cfg +++ b/target/linux/x86/image/grub.cfg @@ -10,6 +10,9 @@ menuentry "OpenWrt" { if [ -e /boot/intel-ucode.img ]; then initrd /boot/intel-ucode.img fi + if [ -e /boot/amd-ucode.img ]; then + initrd /boot/amd-ucode.img + fi } menuentry "OpenWrt (failsafe)" { linux /boot/vmlinuz failsafe=true @CMDLINE@ noinitrd -- 2.17.0 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] kernel: bump 4.9 to 4.9.96
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- Refresh patches, following required reworking: ar71xx/patches-4.9/930-chipidea-pullup.patch layerscape/patches-4.9/302-dts-support-layercape.patch sunxi/patches-4.9/0052-stmmac-form-4-12.patch Fixes for CVEs: CVE-2018-1108 CVE-2018-1092 Tested on: ar71xx Archer C7 v2 Signed-off-by: Kevin Darbyshire-Bryant--- include/kernel-version.mk | 4 +- .../patches-4.9/432-spi-rb4xx-spi-driver.patch | 2 +- .../patches-4.9/433-spi-rb4xx-cpld-driver.patch| 2 +- .../patches-4.9/435-spi-vsc7385_driver.patch | 2 +- .../patches-4.9/910-unaligned_access_hacks.patch | 4 +- .../ar71xx/patches-4.9/930-chipidea-pullup.patch | 6 +- target/linux/ath25/patches-4.9/130-watchdog.patch | 2 +- ...-detect-JEDEC-incompatible-w25q128-using-.patch | 2 +- ...-Mark-GPIO-clocks-enabled-at-boot-as-crit.patch | 2 +- ...-the-clocks-early-during-the-boot-process.patch | 4 +- ...oid-suspending-if-we-re-in-gadget-mode-18.patch | 2 +- ...port-rate-change-propagation-on-bcm2835-c.patch | 6 +- ...ow-rate-change-propagation-to-PLLH_AUX-on.patch | 2 +- ...-maybe-uninitialized-warning-in-bcm2835_c.patch | 2 +- ...-Don-t-rate-change-PLLs-on-behalf-of-DSI-.patch | 28 +-- ...m2835-Register-the-DSI0-DSI1-pixel-clocks.patch | 14 +- ...-Add-leaf-clock-measurement-support-disab.patch | 26 +-- ...2835-Mark-used-PLLs-and-dividers-CRITICAL.patch | 2 +- ...186-clk-bcm2835-Add-claim-clocks-property.patch | 14 +- .../brcm47xx/patches-4.9/831-old_gpio_wdt.patch| 2 +- .../050-usb-dwc2-Remove-unnecessary-kfree.patch| 2 +- .../090-net-generalize-napi_complete_done.patch| 4 +- .../linux/generic/hack-4.9/204-module_strip.patch | 4 +- .../linux/generic/hack-4.9/902-debloat_proc.patch | 2 +- ...x-wrong-comment-related-to-link-detection.patch | 4 +- ...tach-mtd-device-named-ubi-or-data-on-boot.patch | 4 +- .../666-Add-support-for-MAP-E-FMRs-mesh-mode.patch | 30 +-- ...jecting-with-source-address-failed-policy.patch | 18 +- ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch | 10 +- .../generic/pending-4.9/701-phy_extension.patch| 2 +- .../pending-4.9/890-uart_optional_sysrq.patch | 2 +- .../generic/pending-4.9/920-mangle_bootargs.patch | 4 +- ...eric-Mangle-bootloader-s-kernel-arguments.patch | 4 +- .../patches-4.9/0026-NET-multi-phy-support.patch | 6 +- ...ssc-add-support-for-Lantiq-SSC-SPI-contro.patch | 2 +- .../202-core-linux-support-layerscape.patch| 2 +- .../patches-4.9/301-arch-support-layerscape.patch | 2 +- .../patches-4.9/302-dts-support-layercape.patch| 8 +- .../401-mtd-spi-nor-support-layerscape.patch | 14 +- .../patches-4.9/703-phy-support-layerscape.patch | 18 +- .../803-cpufreq-support-layerscape.patch | 6 +- .../patches-4.9/812-mmc-layerscape-support.patch | 12 +- .../patches-4.9/813-qe-support-layerscape.patch| 2 +- .../sunxi/patches-4.9/0050-stmmac-form-4-10.patch | 140 ++-- .../sunxi/patches-4.9/0051-stmmac-form-4-11.patch | 56 ++--- .../sunxi/patches-4.9/0052-stmmac-form-4-12.patch | 242 + 46 files changed, 337 insertions(+), 391 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 3e9ddaa81e..9191bddc7d 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -4,12 +4,12 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .71 LINUX_VERSION-4.4 = .121 -LINUX_VERSION-4.9 = .91 +LINUX_VERSION-4.9 = .96 LINUX_VERSION-4.14 = .34 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729 -LINUX_KERNEL_HASH-4.9.91 = 60caa752ec9fa1c426f6a2f37db3f268d0961b67a723b6443949112167b39832 +LINUX_KERNEL_HASH-4.9.96 = 826f596eb5197f8b17304649c2990dd7b766f5c79076cae79f4261c40cea877f LINUX_KERNEL_HASH-4.14.34 = 782b6c4c85275c382c820e1934d3e6003ef468f43cfc5e7c22bc07c331a12bb9 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1 diff --git a/target/linux/ar71xx/patches-4.9/432-spi-rb4xx-spi-driver.patch b/target/linux/ar71xx/patches-4.9/432-spi-rb4xx-spi-driver.patch index 5428d3d1c2..e896d0bdf4 100644 --- a/target/linux/ar71xx/patches-4.9/432-spi-rb4xx-spi-driver.patch +++ b/target/linux/ar71xx/patches-4.9/432-spi-rb4xx-spi-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -534,6 +534,12 @@ config SPI_QUP +@@ -533,6 +533,12 @@ config SPI_QUP This driver can also be built as a module. If so, the module will be called spi_qup. diff --git
[LEDE-DEV] [PATCH] iptables: link extension libraries with -lm
This fixes an iptables link error when kernel config include CONFIG_NETFILTER_XT_MATCH_STATISTIC=y related to the missing -lm argument on the linker command line. Error is caused by the odd looking linker argument ${$*_LIBADD} which get expanded to an empty string. Signed-off-by: Alin Nastac--- package/network/utils/iptables/patches/600-shared-libext.patch | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/network/utils/iptables/patches/600-shared-libext.patch b/package/network/utils/iptables/patches/600-shared-libext.patch index a906d40..17e7fbe 100644 --- a/package/network/utils/iptables/patches/600-shared-libext.patch +++ b/package/network/utils/iptables/patches/600-shared-libext.patch @@ -28,27 +28,27 @@ -libext.a: initext.o ${libext_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext.so: initext.o ${libext_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; -libext_ebt.a: initextb.o ${libext_ebt_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext_ebt.so: initextb.o ${libext_ebt_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; -libext_arpt.a: initexta.o ${libext_arpt_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext_arpt.so: initexta.o ${libext_arpt_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; -libext4.a: initext4.o ${libext4_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext4.so: initext4.o ${libext4_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; -libext6.a: initext6.o ${libext6_objs} - ${AM_VERBOSE_AR} ${AR} crs $@ $^; +libiptext6.so: initext6.o ${libext6_objs} -+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD}; ++ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${xt_statistic_LIBADD} ${xt_connlabel_LIBADD}; initext_func := $(addprefix xt_,${pfx_build_static}) initextb_func := $(addprefix ebt_,${pfb_build_static}) -- 2.7.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev