From f12a7498d9cdc48bf4fff7f57e226c9f98b0805a Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Fri, 4 Jan 2019 15:49:08 +1100 Subject: [PATCH 1/6] fwupdate: upgrade from local file first if exists --- board/common/overlay/sbin/fwupdate | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 0a07aac2ce..7e44a7f642 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -112,6 +112,26 @@ function do_download() { rm -f $FW_DIR/$FW_FILE_GZ $FW_DIR/$FW_FILE_XZ rm -f $FW_DIR/$FW_FILE_EXTR rm -f $FW_DIR/$BOOT_READY_FILE + rm -rf $FW_DIR/* + mkdir -p $FW_DIR + + # Look for local file first + if [ -f "$1" ]; then + version="custom" + FNAME=`basename $1` + FILEEXT=${FNAME##*.} + DST_FNAME="" + if [ "$FILEEXT" == "xz" ]; then + DST_FNAME="$FW_DIR/$FW_FILE_XZ" + elif [ "$FILEEXT" == "gz" ]; then + DST_FNAME="$FW_DIR/$FW_FILE_GZ" + fi + if [ -n "$DST_FNAME" ]; then + cp -f $1 $DST_FNAME + echo $version > $FW_DIR/$VER_FILE + return + fi + fi source $OS_CONF board=$(cat $SYS_BOARD_FILE) @@ -141,8 +161,6 @@ function do_download() { outfile=$FW_DIR/$FW_FILE_XZ fi - rm -rf $FW_DIR/* - mkdir -p $FW_DIR echo $version > $FW_DIR/$VER_FILE curl_opts="-S -f -L" From 353bfd21a54ba7872179360024fce92a735b888b Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Fri, 4 Jan 2019 16:42:29 +1100 Subject: [PATCH 2/6] fwupdate: fixed indentation --- board/common/overlay/sbin/fwupdate | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 7e44a7f642..c3a2f0dcde 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -115,22 +115,22 @@ function do_download() { rm -rf $FW_DIR/* mkdir -p $FW_DIR - # Look for local file first + # Look for local file first if [ -f "$1" ]; then version="custom" FNAME=`basename $1` FILEEXT=${FNAME##*.} - DST_FNAME="" + DST_FNAME="" if [ "$FILEEXT" == "xz" ]; then DST_FNAME="$FW_DIR/$FW_FILE_XZ" elif [ "$FILEEXT" == "gz" ]; then DST_FNAME="$FW_DIR/$FW_FILE_GZ" fi - if [ -n "$DST_FNAME" ]; then + if [ -n "$DST_FNAME" ]; then cp -f $1 $DST_FNAME - echo $version > $FW_DIR/$VER_FILE - return - fi + echo $version > $FW_DIR/$VER_FILE + return + fi fi source $OS_CONF From acca93a9e48a833321f7fc662aed68593af76c66 Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Fri, 4 Jan 2019 17:16:10 +1100 Subject: [PATCH 3/6] always copy /boot/wpa_supplicant.conf during startup --- board/common/overlay/etc/init.d/S35wifi | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/board/common/overlay/etc/init.d/S35wifi b/board/common/overlay/etc/init.d/S35wifi index 7ab6635531..60ec787932 100755 --- a/board/common/overlay/etc/init.d/S35wifi +++ b/board/common/overlay/etc/init.d/S35wifi @@ -22,10 +22,17 @@ fi source $watch_conf +if [[ -f $boot_conf ]]; then + cp -f $boot_conf $conf + grep -E "/boot .*ro[\s,]" /proc/mounts + RO=$? + test $RO == 0 && mount -o remount,rw /boot + rm -f $boot_conf + test $RO == 0 && mount -o remount,ro /boot +fi + if ! [[ -f $conf ]]; then - if [[ -f $boot_conf ]]; then - cp $boot_conf $conf - elif [[ -f $sys_conf ]]; then + if [[ -f $sys_conf ]]; then cp $sys_conf $conf fi fi From 6945f998a57bb62ed9e28c441ebb2252d9b02822 Mon Sep 17 00:00:00 2001 From: Joo Aun Saw Date: Tue, 8 Jan 2019 00:10:19 +1100 Subject: [PATCH 4/6] fwupdate: remove redundant rm commands --- board/common/overlay/sbin/fwupdate | 3 --- 1 file changed, 3 deletions(-) diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index c3a2f0dcde..51c8c531aa 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -109,9 +109,6 @@ function show_current() { function do_download() { echo "downloading..." - rm -f $FW_DIR/$FW_FILE_GZ $FW_DIR/$FW_FILE_XZ - rm -f $FW_DIR/$FW_FILE_EXTR - rm -f $FW_DIR/$BOOT_READY_FILE rm -rf $FW_DIR/* mkdir -p $FW_DIR From 40e95378c6ac2b1ac56a566a2d01ef402d8c7285 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Fri, 11 Jan 2019 11:06:48 +0200 Subject: [PATCH 5/6] fwupdate: show download file argument in usage --- board/common/overlay/sbin/fwupdate | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate index 4c37db228c..ea3bfeb0f6 100755 --- a/board/common/overlay/sbin/fwupdate +++ b/board/common/overlay/sbin/fwupdate @@ -4,14 +4,14 @@ #### usage #### function exit_usage() { - echo "Usage: fwupdate versions [-j] (lists available versions, optionally outputting json)" - echo " fwupdate current (shows the current version" - echo " fwupdate download (downloads a firmware version)" - echo " fwupdate extract (extracts the downloaded firmware archive)" - echo " fwupdate flashboot (flashes the boot partition from extracted image)" - echo " fwupdate flashreboot (prepares for reboot + root partititon flash)" - echo " fwupdate status (shows the current firmware updating status; see below)" - echo " fwupdate upgrade (performs all the operations necessary for upgrading)" + echo "Usage: fwupdate versions [-j] (lists available versions, optionally outputting json)" + echo " fwupdate current (shows the current version" + echo " fwupdate download (downloads a firmware version)" + echo " fwupdate extract (extracts the downloaded firmware archive)" + echo " fwupdate flashboot (flashes the boot partition from extracted image)" + echo " fwupdate flashreboot (prepares for reboot + root partititon flash)" + echo " fwupdate status (shows the current firmware updating status; see below)" + echo " fwupdate upgrade (performs all the operations necessary for upgrading)" echo "" echo "Statuses:" echo " idle" From 59e66f46e637f5c885f46c667bcc53ed14a19d46 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 13 Jan 2019 23:05:36 +0200 Subject: [PATCH 6/6] Raspberry Pi (all): update kernel, firmware & userland --- configs/raspberrypi2_defconfig | 2 +- configs/raspberrypi3_defconfig | 2 +- configs/raspberrypi_defconfig | 2 +- package/rpi-firmware/rpi-firmware.mk | 2 +- package/rpi-userland/rpi-userland.mk | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/raspberrypi2_defconfig b/configs/raspberrypi2_defconfig index 221a5e87a5..c2e877d827 100644 --- a/configs/raspberrypi2_defconfig +++ b/configs/raspberrypi2_defconfig @@ -12,7 +12,7 @@ BR2_ROOTFS_OVERLAY="board/common/overlay board/raspberrypi2/overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/4f30a5365296658d66ef8a9f878a25d229e2d5fa.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/36612d5d7a88672a3e7dd6cb458dbbbca0d75efe.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2709-rpi-2-b" diff --git a/configs/raspberrypi3_defconfig b/configs/raspberrypi3_defconfig index ace3079ad2..e0e86b6a01 100644 --- a/configs/raspberrypi3_defconfig +++ b/configs/raspberrypi3_defconfig @@ -12,7 +12,7 @@ BR2_ROOTFS_OVERLAY="board/common/overlay board/raspberrypi3/overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/4f30a5365296658d66ef8a9f878a25d229e2d5fa.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/36612d5d7a88672a3e7dd6cb458dbbbca0d75efe.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3" diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig index e4be298d26..f5fcbc8a18 100644 --- a/configs/raspberrypi_defconfig +++ b/configs/raspberrypi_defconfig @@ -19,7 +19,7 @@ BR2_ROOTFS_OVERLAY="board/common/overlay board/raspberrypi/overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/4f30a5365296658d66ef8a9f878a25d229e2d5fa.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/36612d5d7a88672a3e7dd6cb458dbbbca0d75efe.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-0-w bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm" diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk index 2ed983fbcb..2ebbc81b3d 100644 --- a/package/rpi-firmware/rpi-firmware.mk +++ b/package/rpi-firmware/rpi-firmware.mk @@ -4,7 +4,7 @@ # ################################################################################ -RPI_FIRMWARE_VERSION = 5b49caa17e91d0e64024380119ad739bb201c674 +RPI_FIRMWARE_VERSION = 12e0bf86e08d6067372bc0a45d7e8a10d3113210 RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION)) RPI_FIRMWARE_LICENSE = BSD-3-Clause RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk index 5cb2b72d6a..cc8a00322f 100644 --- a/package/rpi-userland/rpi-userland.mk +++ b/package/rpi-userland/rpi-userland.mk @@ -4,7 +4,7 @@ # ################################################################################ -RPI_USERLAND_VERSION = d574b51a60a075baefe863670466ee24e6c4256e +RPI_USERLAND_VERSION = 6da49bce07d8061165e7fa9036af5fd9ae060221 RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION)) RPI_USERLAND_LICENSE = BSD-3-Clause RPI_USERLAND_LICENSE_FILES = LICENCE