kernel update to 4.4.108 and 4.9.72

This commit is contained in:
coolsnowwolf 2017-12-28 14:12:19 +08:00
parent fdc5c1ce04
commit d1a4dbb0a5
23 changed files with 210 additions and 115 deletions

View File

@ -3,13 +3,13 @@
LINUX_RELEASE?=1
LINUX_VERSION-3.18 = .71
LINUX_VERSION-4.4 = .107
LINUX_VERSION-4.9 = .70
LINUX_VERSION-4.4 = .108
LINUX_VERSION-4.9 = .72
LINUX_VERSION-4.14 = .6
LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
LINUX_KERNEL_HASH-4.4.107 = d25dc23c8b05d34518ede68f03668cd344f805049a16bc4f189da90533881a17
LINUX_KERNEL_HASH-4.9.70 = baaf45f3826fa0d257a42005240cced402a12c99adf2a8d77402738304d5300a
LINUX_KERNEL_HASH-4.4.108 = 5a001198625ce9f7b0ef1e4b43e033aea859e1ef3509532412cce8f0375ba51a
LINUX_KERNEL_HASH-4.9.72 = 69f201f1eb9eade9a3cde26d3896a53df9fddf1e19f9fa7b36331b8b1976b83b
LINUX_KERNEL_HASH-4.14.6 = 0907678ba9ea146ddbdecd0a0b6363f56b896b5c61c9a15e809effb3ea346ccc
ifdef KERNEL_PATCHVER

View File

@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
--- a/drivers/net/phy/b53/b53_common.c
+++ b/drivers/net/phy/b53/b53_common.c
@@ -27,6 +27,7 @@
@@ -28,6 +28,7 @@
#include <linux/of.h>
#include <linux/of_net.h>
#include <linux/platform_data/b53.h>
@ -21,7 +21,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
#include "b53_regs.h"
#include "b53_priv.h"
@@ -1578,6 +1579,28 @@ static int b53_switch_init(struct b53_de
@@ -1579,6 +1580,28 @@ static int b53_switch_init(struct b53_de
return ret;
}

View File

@ -11,13 +11,15 @@ board_config_update
board=$(board_name)
case "$board" in
rpi-2-b |\
rpi-3-b |\
rpi-b |\
rpi-b-plus)
raspberrypi,model-b |\
raspberrypi,model-b-plus |\
raspberrypi,model-b-rev2 |\
raspberrypi,2-model-b |\
raspberrypi,3-model-b)
ucidef_set_interface_lan "eth0"
;;
rpi-zero-w)
raspberrypi,model-zero-w)
ucidef_set_interface_lan "wlan0"
;;
esac

View File

@ -7,14 +7,13 @@
set_state() {
case "$(board_name)" in
rpi-2-b |\
rpi-b-plus)
raspberrypi,2-model-b |\
raspberrypi,model-b-plus)
status_led="led1"
;;
rpi-b |\
rpi-cm |\
rpi-zero |\
rpi-zero-w)
raspberrypi,model-b |\
raspberrypi,model-zero |\
raspberrypi,model-zero-w)
status_led="led0"
;;
esac

View File

@ -1,43 +0,0 @@
#!/bin/sh
# Copyright (C) 2015-2016 OpenWrt.org
# Copyright (C) 2017 LEDE project
ifname=""
brcm2708_detect() {
local board_name model
model=$(cat /proc/device-tree/model)
case "$model" in
"Raspberry Pi 2 Model B Rev"*)
board_name="rpi-2-b"
;;
"Raspberry Pi 3 Model B Rev"*)
board_name="rpi-3-b"
;;
"Raspberry Pi Compute Module Rev"*)
board_name="rpi-cm"
;;
"Raspberry Pi Model B Plus Rev"* |\
"Raspberry Pi Model B+ Rev"*)
board_name="rpi-b-plus"
;;
"Raspberry Pi Model B Rev"*)
board_name="rpi-b"
;;
"Raspberry Pi Zero Rev"*)
board_name="rpi-zero"
;;
"Raspberry Pi Zero W Rev"*)
board_name="rpi-zero-w"
;;
*)
board_name="unknown"
;;
esac
[ -e "/tmp/sysinfo" ] || mkdir -p "/tmp/sysinfo"
echo "$board_name" > /tmp/sysinfo/board_name
echo "$model" > /tmp/sysinfo/model
}

View File

@ -1,10 +0,0 @@
#!/bin/sh
# Copyright (C) 2015 OpenWrt.org
do_brcm2708() {
. /lib/brcm2708.sh
brcm2708_detect
}
boot_hook_add preinit_main do_brcm2708

View File

@ -6,10 +6,11 @@ set_preinit_iface() {
. /lib/functions.sh
case "$(board_name)" in
rpi-2-b |\
rpi-3-b |\
rpi-b |\
rpi-b-plus)
raspberrypi,2-model-b |\
raspberrypi,3-model-b |\
raspberrypi,model-b |\
raspberrypi,model-b-plus |\
raspberrypi,model-b-rev2)
ifname=eth0
;;
esac

View File

@ -0,0 +1 @@
/boot/config.txt

View File

@ -1,32 +1,104 @@
get_magic_at() {
local file="$1"
local pos="$2"
get_image "$file" | dd bs=1 count=2 skip="$pos" 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"'
}
. /lib/functions.sh
REQUIRE_IMAGE_METADATA=1
# copied from x86's platform.sh
platform_check_image() {
local file="$1"
local magic
local diskdev partdev diff
magic=$(get_magic_at "$file" 510)
[ "$magic" != "55aa" ] && {
echo "Failed to verify MBR boot signature."
[ "$#" -gt 1 ] && return 1
export_bootdevice && export_partdevice diskdev -2 || {
echo "Unable to determine upgrade device"
return 1
}
get_partitions "/dev/$diskdev" bootdisk
#extract the boot sector from the image
get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b 2>/dev/null
get_partitions /tmp/image.bs image
#compare tables
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
if [ -n "$diff" ]; then
echo "Partition layout has changed. Full image will be written."
ask_bool 0 "Abort" && exit 1
return 0
fi
return 0;
}
platform_do_upgrade() {
local diskdev partdev diff
export_bootdevice && export_partdevice diskdev -2 || {
echo "Unable to determine upgrade device"
return 1
}
sync
get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync
sleep 1
if [ "$SAVE_PARTITIONS" = "1" ]; then
get_partitions "/dev/$diskdev" bootdisk
#extract the boot sector from the image
get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b
get_partitions /tmp/image.bs image
#compare tables
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
else
diff=1
fi
if [ -n "$diff" ]; then
get_image "$@" | dd of="/dev/$diskdev" bs=2M conv=fsync
# Separate removal and addtion is necessary; otherwise, partition 1
# will be missing if it overlaps with the old partition 2
partx -d - "/dev/$diskdev"
partx -a - "/dev/$diskdev"
return 0
fi
#iterate over each partition from the image and write it to the boot disk
while read part start size; do
# root is /dev/sd[a|b]2 and not /dev/sd[a|b] this causes some problem
# one of which is this offset, I'm not sure what's the best fix, so
# here's a WA.
let part=$((part - 2))
if export_partdevice partdev $part; then
echo "Writing image to /dev/$partdev..."
get_image "$@" | dd of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
else
echo "Unable to find partition $part device, skipped."
fi
done < /tmp/partmap.image
#copy partition uuid
echo "Writing new UUID to /dev/$diskdev..."
get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
}
platform_copy_config() {
mkdir -p /boot
[ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime /dev/mmcblk0p1 /boot
cp -af "$CONF_TAR" /boot/
sync
umount /boot
local partdev
# Same as above /dev/sd[a|b]2 is root, so /boot is -1
if export_partdevice partdev -1; then
mkdir -p /boot
[ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime "/dev/$partdev" /boot
cp -af "$CONF_TAR" /boot/
tar --directory / -xvf "$CONF_TAR" boot/config.txt
sync
unmount /boot
fi
}

View File

@ -50,13 +50,14 @@ define Device/Default
FILESYSTEMS := ext4
KERNEL := kernel-bin | kernel-img
KERNEL_IMG := kernel.img
IMAGES := sdcard.img
IMAGE/sdcard.img := boot-img | sdcard-img
IMAGES := sdcard.img.gz
IMAGE/sdcard.img.gz := boot-img | sdcard-img | gzip | append-metadata
endef
define Device/rpi
DEVICE_TITLE := Raspberry Pi B/B+/CM/Zero/ZeroW
DEVICE_DTS := bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm bcm2708-rpi-0-w
SUPPORTED_DEVICES := rpi-b rpi-b-plus rpi-cm rpi-zero rpi-zero-w raspberrypi,model-b raspberrypi,model-b-plus raspberrypi,compute-module-1 raspberrypi,model-b-rev2 raspberrypi,model-zero raspberrypi,model-zero-w
endef
ifeq ($(SUBTARGET),bcm2708)
TARGET_DEVICES += rpi
@ -65,6 +66,7 @@ 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
endef
ifeq ($(SUBTARGET),bcm2709)
TARGET_DEVICES += rpi-2
@ -74,6 +76,7 @@ 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
endef
ifeq ($(SUBTARGET),bcm2710)
TARGET_DEVICES += rpi-3

View File

@ -0,0 +1,70 @@
--- a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts
@@ -3,6 +3,7 @@
#include "bcm2708.dtsi"
/ {
+ compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
model = "Raspberry Pi Zero W";
};
--- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
@@ -8,6 +8,7 @@
#include "bcm283x-rpi-smsc9514.dtsi"
/ {
+ compatible = "raspberrypi,3-model-b", "brcm,bcm2837", "brcm,bcm2836";
model = "Raspberry Pi 3 Model B";
};
--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
@@ -4,6 +4,7 @@
#include "bcm283x-rpi-smsc9514.dtsi"
/ {
+ compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
model = "Raspberry Pi 2 Model B";
};
--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
@@ -4,6 +4,7 @@
#include "bcm283x-rpi-smsc9512.dtsi"
/ {
+ compatible = "raspberrypi,model-b", "brcm,bcm2835";
model = "Raspberry Pi Model B";
};
--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
@@ -4,6 +4,7 @@
#include "bcm283x-rpi-smsc9514.dtsi"
/ {
+ compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
model = "Raspberry Pi Model B+";
};
--- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts
@@ -3,6 +3,7 @@
#include "bcm2708-rpi-cm.dtsi"
/ {
+ compatible = "raspberrypi,compute-module-1", "brcm,bcm2835";
model = "Raspberry Pi Compute Module";
};
--- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
+++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
@@ -3,6 +3,7 @@
#include "bcm2710.dtsi"
/ {
+ compatible = "raspberrypi,compute-module-3", "brcm,bcm2837", "brcm,bcm2836";
model = "Raspberry Pi Compute Module 3";
};

View File

@ -1,6 +1,6 @@
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2014,7 +2014,8 @@ static void pcie_write_mrrs(struct pci_d
@@ -2015,7 +2015,8 @@ static void pcie_write_mrrs(struct pci_d
/* In the "safe" case, do not configure the MRRS. There appear to be
* issues with setting MRRS to 0 on a number of devices.
*/

View File

@ -841,7 +841,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/moxa/moxart_ether.c
+++ b/drivers/net/ethernet/moxa/moxart_ether.c
@@ -269,7 +269,7 @@ rx_next:
@@ -270,7 +270,7 @@ rx_next:
}
if (rx < budget) {

View File

@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2942,10 +2942,20 @@ static int xmit_one(struct sk_buff *skb,
@@ -2943,10 +2943,20 @@ static int xmit_one(struct sk_buff *skb,
if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
dev_queue_xmit_nit(skb, dev);

View File

@ -63,7 +63,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -143,7 +143,10 @@ static const struct file_operations proc
@@ -144,7 +144,10 @@ static const struct file_operations proc
void proc_tty_register_driver(struct tty_driver *driver)
{
struct proc_dir_entry *ent;
@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!driver->driver_name || driver->proc_entry ||
!driver->ops->proc_fops)
return;
@@ -160,6 +163,9 @@ void proc_tty_unregister_driver(struct t
@@ -161,6 +164,9 @@ void proc_tty_unregister_driver(struct t
{
struct proc_dir_entry *ent;
@ -85,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ent = driver->proc_entry;
if (!ent)
return;
@@ -174,6 +180,9 @@ void proc_tty_unregister_driver(struct t
@@ -175,6 +181,9 @@ void proc_tty_unregister_driver(struct t
*/
void __init proc_tty_init(void)
{

View File

@ -1,6 +1,6 @@
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1187,24 +1187,7 @@ void netlink_detachskb(struct sock *sk,
@@ -1228,24 +1228,7 @@ void netlink_detachskb(struct sock *sk,
static struct sk_buff *netlink_trim(struct sk_buff *skb, gfp_t allocation)
{

View File

@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
__u16 tc_index; /* traffic control index */
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4523,6 +4523,9 @@ static enum gro_result dev_gro_receive(s
@@ -4524,6 +4524,9 @@ static enum gro_result dev_gro_receive(s
enum gro_result ret;
int grow;
@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!(skb->dev->features & NETIF_F_GRO))
goto normal;
@@ -5811,6 +5814,48 @@ static void __netdev_adjacent_dev_unlink
@@ -5812,6 +5815,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info)
@@ -6009,6 +6054,8 @@ void netdev_upper_dev_unlink(struct net_
@@ -6010,6 +6055,8 @@ void netdev_upper_dev_unlink(struct net_
list_for_each_entry(i, &upper_dev->all_adj_list.upper, list)
__netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr);
@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
&changeupper_info.info);
}
@@ -6609,6 +6656,7 @@ int dev_set_mac_address(struct net_devic
@@ -6610,6 +6657,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;

View File

@ -417,7 +417,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
* These are the defined Ethernet Protocol ID's.
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6603,9 +6603,18 @@ int dev_set_mtu(struct net_device *dev,
@@ -6604,9 +6604,18 @@ int dev_set_mtu(struct net_device *dev,
if (new_mtu == dev->mtu)
return 0;

View File

@ -207,7 +207,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
* Note that the arbiter/ISA bridge appears to be buggy, specifically in
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -2392,6 +2392,7 @@ void arch_setup_dma_ops(struct device *d
@@ -2410,6 +2410,7 @@ void arch_setup_dma_ops(struct device *d
set_dma_ops(dev, dma_ops);
}

View File

@ -777,7 +777,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
};
struct tcrypt_result {
@@ -1329,6 +1329,10 @@ static int do_test(const char *alg, u32
@@ -1331,6 +1331,10 @@ static int do_test(const char *alg, u32
ret += tcrypt_test("hmac(sha3-512)");
break;
@ -788,7 +788,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
case 150:
ret += tcrypt_test("ansi_cprng");
break;
@@ -1390,6 +1394,9 @@ static int do_test(const char *alg, u32
@@ -1392,6 +1396,9 @@ static int do_test(const char *alg, u32
case 190:
ret += tcrypt_test("authenc(hmac(sha512),cbc(des3_ede))");
break;
@ -798,7 +798,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
case 200:
test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0,
speed_template_16_24_32);
@@ -1404,9 +1411,9 @@ static int do_test(const char *alg, u32
@@ -1406,9 +1413,9 @@ static int do_test(const char *alg, u32
test_cipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0,
speed_template_32_40_48);
test_cipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0,
@ -810,7 +810,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
test_cipher_speed("cts(cbc(aes))", ENCRYPT, sec, NULL, 0,
speed_template_16_24_32);
test_cipher_speed("cts(cbc(aes))", DECRYPT, sec, NULL, 0,
@@ -1837,9 +1844,9 @@ static int do_test(const char *alg, u32
@@ -1839,9 +1846,9 @@ static int do_test(const char *alg, u32
test_acipher_speed("lrw(aes)", DECRYPT, sec, NULL, 0,
speed_template_32_40_48);
test_acipher_speed("xts(aes)", ENCRYPT, sec, NULL, 0,

View File

@ -37,7 +37,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -1812,6 +1812,10 @@ static int rx_bottom(struct r8152 *tp, i
@@ -1816,6 +1816,10 @@ static int rx_bottom(struct r8152 *tp, i
unsigned int pkt_len;
struct sk_buff *skb;

View File

@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3550,6 +3550,58 @@ set_rps_cpu(struct net_device *dev, stru
@@ -3551,6 +3551,58 @@ set_rps_cpu(struct net_device *dev, stru
return rflow;
}
@ -69,7 +69,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
/*
* get_rps_cpu is called from netif_receive_skb and returns the target
* CPU from the RPS map of the receiving queue for a given skb.
@@ -3639,7 +3691,7 @@ static int get_rps_cpu(struct net_device
@@ -3640,7 +3692,7 @@ static int get_rps_cpu(struct net_device
try_rps:
if (map) {
@ -78,7 +78,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
if (cpu_online(tcpu)) {
cpu = tcpu;
goto done;
@@ -8430,6 +8482,9 @@ static int __init net_dev_init(void)
@@ -8431,6 +8483,9 @@ static int __init net_dev_init(void)
sd->backlog.weight = weight_p;
}

View File

@ -25,7 +25,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
bool "SGI IP22 (Indy/Indigo2)"
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -115,6 +115,11 @@ config PINCTRL_LPC18XX
@@ -116,6 +116,11 @@ config PINCTRL_LPC18XX
help
Pinctrl driver for NXP LPC18xx/43xx System Control Unit (SCU).