Skip to content

Commit

Permalink
kernel update to 4.4.108 and 4.9.72
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Dec 28, 2017
1 parent fdc5c1c commit d1a4dbb
Show file tree
Hide file tree
Showing 23 changed files with 210 additions and 115 deletions.
8 changes: 4 additions & 4 deletions include/kernel-version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ Signed-off-by: Rafał Miłecki <[email protected]>

--- 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>
+#include <linux/of.h>

#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;
}

Expand Down
12 changes: 7 additions & 5 deletions target/linux/brcm2708/base-files/etc/board.d/02_network
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions target/linux/brcm2708/base-files/etc/diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 0 additions & 43 deletions target/linux/brcm2708/base-files/lib/brcm2708.sh

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/boot/config.txt
106 changes: 89 additions & 17 deletions target/linux/brcm2708/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
@@ -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

[ "$#" -gt 1 ] && return 1

magic=$(get_magic_at "$file" 510)
[ "$magic" != "55aa" ] && {
echo "Failed to verify MBR boot signature."
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
}
7 changes: 5 additions & 2 deletions target/linux/brcm2708/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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";
};

Original file line number Diff line number Diff line change
@@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ Signed-off-by: David S. Miller <[email protected]>

--- 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) {
Expand Down
Loading

0 comments on commit d1a4dbb

Please sign in to comment.