From ac40e97670f5648e460d0bdd85766e31f3271d78 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 12 Jun 2018 23:23:33 +0200 Subject: [PATCH 1/7] Update hassio-supervisor --- buildroot-external/apparmor/hassio-supervisor | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildroot-external/apparmor/hassio-supervisor b/buildroot-external/apparmor/hassio-supervisor index 267c3f5f126..f4c735db605 100644 --- a/buildroot-external/apparmor/hassio-supervisor +++ b/buildroot-external/apparmor/hassio-supervisor @@ -50,6 +50,8 @@ profile hassio-supervisor flags=(attach_disconnected,mediate_deleted) { /usr/bin/gdbus mr, /lib/* mr, + /** r, + /{,var/}run/dbus/system_bus_socket rw, } From 5055236725a806a09c2eb23eb3de71e20f5f1d58 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 13 Jun 2018 17:04:33 +0200 Subject: [PATCH 2/7] Bump version --- buildroot-external/info | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot-external/info b/buildroot-external/info index dc9962bfd3a..95747de1a1d 100644 --- a/buildroot-external/info +++ b/buildroot-external/info @@ -1,5 +1,5 @@ VERSION_MAJOR=0 -VERSION_BUILD=5 +VERSION_BUILD=6 HASSOS_NAME="HassOS" HASSOS_ID="hassos" From 6a057182356caef458196490adbb7d192872f706 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 13 Jun 2018 19:12:57 +0000 Subject: [PATCH 3/7] Fix expander on SD cards Signed-off-by: Pascal Vizeli --- buildroot-external/rootfs-overlay/usr/sbin/hassos-expand | 1 + 1 file changed, 1 insertion(+) diff --git a/buildroot-external/rootfs-overlay/usr/sbin/hassos-expand b/buildroot-external/rootfs-overlay/usr/sbin/hassos-expand index 8ace0e93027..68f229f0e96 100755 --- a/buildroot-external/rootfs-overlay/usr/sbin/hassos-expand +++ b/buildroot-external/rootfs-overlay/usr/sbin/hassos-expand @@ -12,6 +12,7 @@ fi # Resize & Reload partition echo "[INFO] Update hassos-data partition" +sgdisk -e ${DEVICE_ROOT} sgdisk -d 8 -n 8:0:0 -c 8:"hassos-data" -t 8:"0FC63DAF-8483-4772-8E79-3D69D8477DE4" -u 8:"a52a4597-fa3a-4851-aefd-2fbe9f849079" ${DEVICE_ROOT} sgdisk -v ${DEVICE_ROOT} partx -u ${DEVICE_ROOT} From eae36599094a476a5223b47ba630eee5dd8a7301 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 13 Jun 2018 19:28:05 +0000 Subject: [PATCH 4/7] Add Builder script Signed-off-by: Pascal Vizeli --- scripts/build-all.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/build-all.sh diff --git a/scripts/build-all.sh b/scripts/build-all.sh new file mode 100644 index 00000000000..bdb89d936a1 --- /dev/null +++ b/scripts/build-all.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e + +mkdir -p /build/RL + +all_platforms=(ova rpi rpi0_w rpi2 rpi3 rpi3_64) +for platform in "${all_platforms[@]}"; do + make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \ + ${platform}_defconfig + make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \ + make + make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \ + clean + + cp -f /build/buildroot/output/images/hassos_* /build/RL/ +done From fc4de4f02aec429db2accc4e4d0766be7dbdfa14 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 14 Jun 2018 00:13:35 +0000 Subject: [PATCH 5/7] Fix 64bit Signed-off-by: Pascal Vizeli --- buildroot-external/board/raspberrypi/post-image.sh | 12 ++++-------- .../board/raspberrypi/rpi/uboot.config | 1 + .../board/raspberrypi/rpi0-w/uboot.config | 1 + .../board/raspberrypi/rpi2/uboot.config | 2 ++ .../board/raspberrypi/rpi3-64/uboot.config | 1 + .../board/raspberrypi/rpi3/uboot.config | 1 + buildroot-external/board/raspberrypi/uboot.config | 1 - 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/buildroot-external/board/raspberrypi/post-image.sh b/buildroot-external/board/raspberrypi/post-image.sh index 6eb2497ae6f..409481fdcf8 100755 --- a/buildroot-external/board/raspberrypi/post-image.sh +++ b/buildroot-external/board/raspberrypi/post-image.sh @@ -12,13 +12,6 @@ BOOT_DATA=${BINARIES_DIR}/boot # Filename IMAGE_FILE=${BINARIES_DIR}/${HASSOS_ID}_${BOARD_ID}-${VERSION_MAJOR}.${VERSION_BUILD}.img -# Eval kernel name -if [ "$BOARD_ID" == "rpi3-64" ]; then - KERNEL_NAME="Image" -else - KERNEL_NAME="zImage" -fi - # Init boot data rm -rf ${BOOT_DATA} mkdir -p ${BOOT_DATA} @@ -43,8 +36,11 @@ cp -r ${BINARIES_DIR}/rpi-firmware/overlays ${BOOT_DATA}/ echo "dwc_otg.lpm_enable=0 console=tty1" > ${BOOT_DATA}/cmdline.txt # Enable 64bit support -if [ "$BOARD_ID" == "rpi3-64" ]; then +if [ "${BOARD_ID}" == "rpi3-64" ]; then echo "arm_64bit=1" >> ${BOOT_DATA}/config.txt + KERNEL_NAME="Image" +else + KERNEL_NAME="zImage" fi # Create other layers diff --git a/buildroot-external/board/raspberrypi/rpi/uboot.config b/buildroot-external/board/raspberrypi/rpi/uboot.config index e356b99f4e0..b2a22b5e140 100644 --- a/buildroot-external/board/raspberrypi/rpi/uboot.config +++ b/buildroot-external/board/raspberrypi/rpi/uboot.config @@ -1,2 +1,3 @@ CONFIG_TARGET_RPI=y CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b" +CONFIG_SYS_TEXT_BASE=0x00008000 diff --git a/buildroot-external/board/raspberrypi/rpi0-w/uboot.config b/buildroot-external/board/raspberrypi/rpi0-w/uboot.config index 03d63bb2e35..0b4f393726c 100644 --- a/buildroot-external/board/raspberrypi/rpi0-w/uboot.config +++ b/buildroot-external/board/raspberrypi/rpi0-w/uboot.config @@ -1,2 +1,3 @@ CONFIG_TARGET_RPI_0_W=y CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w" +CONFIG_SYS_TEXT_BASE=0x00008000 diff --git a/buildroot-external/board/raspberrypi/rpi2/uboot.config b/buildroot-external/board/raspberrypi/rpi2/uboot.config index 3dfc6349176..4b9c35d0712 100644 --- a/buildroot-external/board/raspberrypi/rpi2/uboot.config +++ b/buildroot-external/board/raspberrypi/rpi2/uboot.config @@ -1,2 +1,4 @@ CONFIG_TARGET_RPI_2=y CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b" +CONFIG_SYS_TEXT_BASE=0x00008000 +CONFIG_SYS_TEXT_BASE=0x00008000 diff --git a/buildroot-external/board/raspberrypi/rpi3-64/uboot.config b/buildroot-external/board/raspberrypi/rpi3-64/uboot.config index 146b73e268a..550b90c6708 100644 --- a/buildroot-external/board/raspberrypi/rpi3-64/uboot.config +++ b/buildroot-external/board/raspberrypi/rpi3-64/uboot.config @@ -1,5 +1,6 @@ CONFIG_TARGET_RPI_3=y CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_TEXT_BASE=0x00080000 CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" CONFIG_PHYLIB=y CONFIG_USB_ETHER_LAN78XX=y diff --git a/buildroot-external/board/raspberrypi/rpi3/uboot.config b/buildroot-external/board/raspberrypi/rpi3/uboot.config index 33ccec60d2c..1290a4ba900 100644 --- a/buildroot-external/board/raspberrypi/rpi3/uboot.config +++ b/buildroot-external/board/raspberrypi/rpi3/uboot.config @@ -1,5 +1,6 @@ CONFIG_TARGET_RPI_3_32B=y CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_SYS_TEXT_BASE=0x00008000 CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" CONFIG_PHYLIB=y CONFIG_USB_ETHER_LAN78XX=y diff --git a/buildroot-external/board/raspberrypi/uboot.config b/buildroot-external/board/raspberrypi/uboot.config index c89061bf251..f9c0cf01ca1 100644 --- a/buildroot-external/board/raspberrypi/uboot.config +++ b/buildroot-external/board/raspberrypi/uboot.config @@ -1,6 +1,5 @@ CONFIG_ARM=y CONFIG_ARCH_BCM283X=y -CONFIG_SYS_TEXT_BASE=0x00008000 CONFIG_OF_BOARD_SETUP=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y From 95f82aa75d17e1b356cae32cc0542aac5ef35ab5 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 14 Jun 2018 05:15:10 +0000 Subject: [PATCH 6/7] Fix build script Signed-off-by: Pascal Vizeli --- scripts/build-all.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 scripts/build-all.sh diff --git a/scripts/build-all.sh b/scripts/build-all.sh old mode 100644 new mode 100755 index bdb89d936a1..80a12a70436 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -7,8 +7,7 @@ all_platforms=(ova rpi rpi0_w rpi2 rpi3 rpi3_64) for platform in "${all_platforms[@]}"; do make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \ ${platform}_defconfig - make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \ - make + make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \ clean From d5ff3596b1c51c126d6469e0c6e6badde2a30385 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 14 Jun 2018 13:10:32 +0000 Subject: [PATCH 7/7] Fix build script v2 Signed-off-by: Pascal Vizeli --- scripts/build-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-all.sh b/scripts/build-all.sh index 80a12a70436..f8c84efcef8 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -8,8 +8,8 @@ for platform in "${all_platforms[@]}"; do make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \ ${platform}_defconfig make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external + cp -f /build/buildroot/output/images/hassos_* /build/RL/ + make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external \ clean - - cp -f /build/buildroot/output/images/hassos_* /build/RL/ done