From 6a2b568d63de0ffebe055c7d7d79517e415b3f22 Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Tue, 30 Mar 2021 14:01:51 +0000 Subject: [PATCH] [FIX] point_of_sale: Fix wifi firmware for IoT With the new OS RaspiOS the firmware for the wifi card are unstable. We need to keep a specific version of firmware-brcm80211 to keep a stable and usable wifi connection. So we fallback on a previous version of Buster and hold the version of the package firmware-brcm80211 before the upgrade when we build the box. closes odoo/odoo#69022 Id: 2499855 X-original-commit: 04c58aa229781ad165492765414483ae8e8d6693 Signed-off-by: Quentin Lejeune (qle) --- .../posbox/overwrite_before_init/etc/init_posbox_image.sh | 2 ++ addons/point_of_sale/tools/posbox/posbox_create_image.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh index 9f580af436d..c11bf0cf6dc 100755 --- a/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh +++ b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh @@ -20,6 +20,8 @@ echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc locale-gen source ~/.bashrc +# upgrade firmware-brcm80211 broke access point on rpi4 +apt-mark hold firmware-brcm80211 apt-get update && apt-get -y upgrade # Do not be too fast to upgrade to more recent firmware and kernel than 4.38 # Firmware 4.44 seems to prevent the LED mechanism from working diff --git a/addons/point_of_sale/tools/posbox/posbox_create_image.sh b/addons/point_of_sale/tools/posbox/posbox_create_image.sh index e46d0027779..6187252cec7 100755 --- a/addons/point_of_sale/tools/posbox/posbox_create_image.sh +++ b/addons/point_of_sale/tools/posbox/posbox_create_image.sh @@ -33,11 +33,11 @@ VERSION_IOTBOX=21.03 REPO=https://github.com/odoo/odoo.git if ! file_exists *raspios*.img ; then - wget 'http://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-01-12/2021-01-11-raspios-buster-armhf-lite.zip' -O raspios.img.zip + wget 'http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2020-02-07/2020-02-05-raspbian-buster-lite.zip' -O raspios.img.zip unzip raspios.img.zip fi -RASPIOS=$(echo *raspios*.img) +RASPIOS=$(echo *raspbian*.img) rsync -avh --progress "${RASPIOS}" iotbox.img CLONE_DIR="${OVERWRITE_FILES_BEFORE_INIT_DIR}/home/pi/odoo"