From ca90fa515d72f59bd548e24639ef7e1566ed3da3 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 29 Apr 2020 12:43:10 +0200 Subject: [PATCH 01/16] Bump version 4.6 --- buildroot-external/meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot-external/meta b/buildroot-external/meta index 917d75fdf..cc734a7f4 100644 --- a/buildroot-external/meta +++ b/buildroot-external/meta @@ -1,5 +1,5 @@ VERSION_MAJOR=4 -VERSION_BUILD=5 +VERSION_BUILD=6 HASSOS_NAME="HassOS" HASSOS_ID="hassos" From 517abe0ea9fbb1766009b1645079b8b83156dc02 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 29 Apr 2020 14:49:32 +0200 Subject: [PATCH 02/16] Check keyring of ota update file (#645) --- buildroot-external/scripts/ota.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildroot-external/scripts/ota.sh b/buildroot-external/scripts/ota.sh index f53cfe632..3e95801ae 100755 --- a/buildroot-external/scripts/ota.sh +++ b/buildroot-external/scripts/ota.sh @@ -10,6 +10,7 @@ function create_ota_update() { local spl="${BINARIES_DIR}/spl.img" local key="/build/key.pem" local cert="/build/cert.pem" + local keyring="${TARGET_DIR}/etc/rauc/keyring.pem" # Skip if no dev key is arround if [ ! -f "${key}" ]; then @@ -51,5 +52,5 @@ function create_ota_update() { ) >> "${rauc_folder}/manifest.raucm" fi - rauc bundle -d --cert="${cert}" --key="${key}" "${rauc_folder}" "${ota_file}" + rauc bundle -d --cert="${cert}" --key="${key}" --keyring="${keyring}" "${rauc_folder}" "${ota_file}" } From f0b5be41fedef1c79cf7c8ad6efc0bec339fbea2 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 29 Apr 2020 22:09:47 +0200 Subject: [PATCH 03/16] Bugfix qemu agent 4.2.0 (#646) --- .../qemu-guest-agent/qemu-guest-agent.mk | 17 +++++++++-------- .../package/qemu-guest-agent/qemu-guest.service | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/buildroot-external/package/qemu-guest-agent/qemu-guest-agent.mk b/buildroot-external/package/qemu-guest-agent/qemu-guest-agent.mk index e9e2431e9..dd9631292 100644 --- a/buildroot-external/package/qemu-guest-agent/qemu-guest-agent.mk +++ b/buildroot-external/package/qemu-guest-agent/qemu-guest-agent.mk @@ -19,14 +19,15 @@ QEMU_GUEST_AGENT_DEPENDENCIES = host-pkgconf libglib2 zlib # not automatically pulled. :-( QEMU_GUEST_AGENT_LIBS = -lrt -lm -QEMU_GUEST_AGENT_VARS = LIBTOOL=$(HOST_DIR)/bin/libtool +QEMU_GUEST_AGENT_OPTS = -lrt -lm -QEMU_GUEST_AGENT_OPTS = --enable-guest-agent +QEMU_GUEST_AGENT_VARS = LIBTOOL=$(HOST_DIR)/bin/libtool # Override CPP, as it expects to be able to call it like it'd # call the compiler. define QEMU_GUEST_AGENT_CONFIGURE_CMDS - ( cd $(@D); \ + unset TARGET_DIR; \ + cd $(@D); \ LIBS='$(QEMU_GUEST_AGENT_LIBS)' \ $(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_ARGS) \ @@ -52,7 +53,6 @@ define QEMU_GUEST_AGENT_CONFIGURE_CMDS --disable-sdl \ --disable-system \ --disable-user \ - --disable-guest-agent \ --disable-nettle \ --disable-gcrypt \ --disable-curses \ @@ -86,17 +86,18 @@ define QEMU_GUEST_AGENT_CONFIGURE_CMDS --disable-blobs \ --disable-capstone \ --disable-tools \ + --disable-slirp \ --disable-tcg-interpreter \ - $(QEMU_GUEST_AGENT_OPTS) \ - ) + --enable-guest-agent endef define QEMU_GUEST_AGENT_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) + unset TARGET_DIR; \ + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) qemu-ga endef define QEMU_GUEST_AGENT_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(QEMU_GUEST_AGENT_MAKE_ENV) DESTDIR=$(TARGET_DIR) install + $(INSTALL) -m 755 $(@D)/qemu-ga $(TARGET_DIR)/usr/libexec/ endef define QEMU_GUEST_AGENT_INSTALL_INIT_SYSTEMD diff --git a/buildroot-external/package/qemu-guest-agent/qemu-guest.service b/buildroot-external/package/qemu-guest-agent/qemu-guest.service index 7888dcb4f..e6dd297c7 100644 --- a/buildroot-external/package/qemu-guest-agent/qemu-guest.service +++ b/buildroot-external/package/qemu-guest-agent/qemu-guest.service @@ -4,7 +4,7 @@ After=syslog.target network.target ConditionVirtualization=kvm [Service] -ExecStart=/usr/bin/qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 +ExecStart=/usr/libexec/qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 Restart=on-failure [Install] From 15a80bb405661851fbc9a84cec3f28314ee46dfd Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 30 Apr 2020 17:09:30 +0200 Subject: [PATCH 04/16] Odroid N2 - update boot firmware (#647) --- .../package/hardkernel-boot/hardkernel-boot.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildroot-external/package/hardkernel-boot/hardkernel-boot.mk b/buildroot-external/package/hardkernel-boot/hardkernel-boot.mk index 4e956e4fe..cacb6451a 100644 --- a/buildroot-external/package/hardkernel-boot/hardkernel-boot.mk +++ b/buildroot-external/package/hardkernel-boot/hardkernel-boot.mk @@ -46,9 +46,9 @@ HARDKERNEL_BOOT_VERSION = c989da31a5c1da3ab57d7c6dc5a3fdbcc1c3eed7 HARDKERNEL_BOOT_BINS += u-boot.g12b define HARDKERNEL_BOOT_BUILD_CMDS - curl -L -o $(@D)/fip/blx_fix.sh https://raw.githubusercontent.com/home-assistant/hassos-blobs/d271a9c4aedf740e4fa716c3cb7faee93257e968/odroid-n2/blx_fix_g12a.sh - curl -L -o $(@D)/fip/acs.bin https://raw.githubusercontent.com/home-assistant/hassos-blobs/d271a9c4aedf740e4fa716c3cb7faee93257e968/odroid-n2/acs.bin - curl -L -o $(@D)/fip/bl301.bin https://raw.githubusercontent.com/home-assistant/hassos-blobs/d271a9c4aedf740e4fa716c3cb7faee93257e968/odroid-n2/bl301.bin + curl -L -o $(@D)/fip/blx_fix.sh https://raw.githubusercontent.com/home-assistant/hassos-blobs/d88ec078470f236d694ba1f9e69a44759ddf41ea/odroid-n2/blx_fix_g12a.sh + curl -L -o $(@D)/fip/acs.bin https://raw.githubusercontent.com/home-assistant/hassos-blobs/d88ec078470f236d694ba1f9e69a44759ddf41ea/odroid-n2/acs.bin + curl -L -o $(@D)/fip/bl301.bin https://raw.githubusercontent.com/home-assistant/hassos-blobs/d88ec078470f236d694ba1f9e69a44759ddf41ea/odroid-n2/bl301.bin bash $(@D)/fip/blx_fix.sh \ $(@D)/fip/g12b/bl30.bin $(@D)/fip/zero_tmp $(@D)/fip/bl30_zero.bin \ From db184bf5d320b1bfd4afef65e654078df9a6dfbb Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 4 May 2020 15:11:43 +0200 Subject: [PATCH 05/16] Make machine-id persist (#649) * Make machine-id persist * update * Adjustments * cleanup * fix cleanups * small cleanup --- .../board/asus/tinker/uboot-boot.ush | 8 ++--- .../board/hardkernel/odroid-c2/uboot-boot.ush | 4 +-- .../board/hardkernel/odroid-n2/uboot-boot.ush | 4 +-- .../hardkernel/odroid-xu4/uboot-boot.ush | 4 +-- .../board/intel/nuc/hassos-hook.sh | 2 +- .../board/intel/ova/hassos-hook.sh | 2 +- .../board/raspberrypi/uboot-boot.ush | 4 +-- .../board/raspberrypi/uboot-boot64.ush | 4 +-- .../barebox-state-efi.dtb | Bin 1169 -> 1249 bytes .../barebox-state-efi.dts | 19 ++++++++--- .../bootloader/barebox/init/global_bootargs | 1 + .../{misc => bootloader}/mbr-part.rules | 0 .../{misc => bootloader}/mbr-spl.img | Bin .../{misc => bootloader}/mbr.img | Bin buildroot-external/ota/rauc-hook | 3 -- .../rootfs-overlay/etc/systemd/journald.conf | 2 -- .../hassos-persists-journald.service | 1 - .../hassos-persists.service | 1 + .../rootfs-overlay/etc/tmpfiles.d/data.conf | 4 +-- .../rootfs-overlay/etc/tmpfiles.d/nm.conf | 2 +- .../etc/tmpfiles.d/overlay.conf | 1 + .../system/hassos-persists-journald.service | 14 -------- .../systemd/system/hassos-persists.service | 13 ++++++++ .../lib/systemd/system/var-log-journal.mount | 6 ++-- .../usr/libexec/hassos-persists | 30 ++++++++++++++++++ .../usr/libexec/hassos-persists-journald | 19 ----------- buildroot-external/scripts/hdd-image.sh | 4 +-- buildroot-external/scripts/rauc.sh | 4 +-- scripts/update-dtb.sh | 2 +- 29 files changed, 87 insertions(+), 71 deletions(-) rename buildroot-external/{misc => bootloader}/barebox-state-efi.dtb (56%) rename buildroot-external/{misc => bootloader}/barebox-state-efi.dts (80%) rename buildroot-external/{misc => bootloader}/mbr-part.rules (100%) rename buildroot-external/{misc => bootloader}/mbr-spl.img (100%) rename buildroot-external/{misc => bootloader}/mbr.img (100%) delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists-journald.service create mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists.service create mode 100644 buildroot-external/rootfs-overlay/etc/tmpfiles.d/overlay.conf delete mode 100644 buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-persists-journald.service create mode 100644 buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-persists.service create mode 100755 buildroot-external/rootfs-overlay/usr/libexec/hassos-persists delete mode 100755 buildroot-external/rootfs-overlay/usr/libexec/hassos-persists-journald diff --git a/buildroot-external/board/asus/tinker/uboot-boot.ush b/buildroot-external/board/asus/tinker/uboot-boot.ush index e882f60ff..c693c0e74 100644 --- a/buildroot-external/board/asus/tinker/uboot-boot.ush +++ b/buildroot-external/board/asus/tinker/uboot-boot.ush @@ -8,7 +8,7 @@ setenv loadbootstate " \ setenv storebootstate " \ echo 'storing env...'; \ - env export -c -s 0x8000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT; \ + env export -c -s 0x8000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \ mmc write ${ramdisk_addr_r} ${mmc_env} 0x40;" run loadbootstate @@ -17,11 +17,11 @@ test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3 test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3 # HassOS bootargs -setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait" +setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory" # HassOS system A/B -setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro" -setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro" +setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait" +setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro rootwait" # Load extraargs fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline diff --git a/buildroot-external/board/hardkernel/odroid-c2/uboot-boot.ush b/buildroot-external/board/hardkernel/odroid-c2/uboot-boot.ush index 2a71bc289..d993c522e 100644 --- a/buildroot-external/board/hardkernel/odroid-c2/uboot-boot.ush +++ b/buildroot-external/board/hardkernel/odroid-c2/uboot-boot.ush @@ -10,7 +10,7 @@ setenv loadbootstate " \ setenv storebootstate " \ echo 'storing env...'; \ - env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT; \ + env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \ mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;" run loadbootstate @@ -27,7 +27,7 @@ if test "${m}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi setenv bootargs_odroidc2 "no_console_suspend hdmimode=${m} ${cmode} m_bpp=${m_bpp} vout=${vout} net.ifnames=0 elevator=noop disablehpd=${hpd} max_freq=${max_freq} maxcpus=${maxcpus} monitor_onoff=${monitor_onoff} disableuhs=${disableuhs} mmc_removable=${mmc_removable} usbmulticam=${usbmulticam}" # HassOS bootargs -setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor cgroup_enable=memory" +setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory" # HassOS system A/B setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait" diff --git a/buildroot-external/board/hardkernel/odroid-n2/uboot-boot.ush b/buildroot-external/board/hardkernel/odroid-n2/uboot-boot.ush index e5ddb09b5..c044733d7 100644 --- a/buildroot-external/board/hardkernel/odroid-n2/uboot-boot.ush +++ b/buildroot-external/board/hardkernel/odroid-n2/uboot-boot.ush @@ -10,7 +10,7 @@ setenv loadbootstate " \ setenv storebootstate " \ echo 'storing env...'; \ - env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT; \ + env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \ mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;" run loadbootstate @@ -29,7 +29,7 @@ if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; setenv bootargs_odroidn2 "clk_ignore_unused hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} ${cmode} voutmode=${voutmode} disablehpd=${disablehpd} overscan=${overscan}" # HassOS bootargs -setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor cgroup_enable=memory" +setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory" # HassOS system A/B setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait" diff --git a/buildroot-external/board/hardkernel/odroid-xu4/uboot-boot.ush b/buildroot-external/board/hardkernel/odroid-xu4/uboot-boot.ush index 03459ece1..79727b7ad 100644 --- a/buildroot-external/board/hardkernel/odroid-xu4/uboot-boot.ush +++ b/buildroot-external/board/hardkernel/odroid-xu4/uboot-boot.ush @@ -12,7 +12,7 @@ setenv loadbootstate " \ setenv storebootstate " \ echo 'storing env...'; \ - env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT; \ + env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \ mmc write ${ramdisk_addr_r} ${mmc_env} 0x20;" run loadbootstate @@ -33,7 +33,7 @@ if test "${external_watchdog}" = "true"; then setenv external_watchdog "external setenv bootargs_odroidxu4 "${videoconfig} ${hdmi_phy_control} ${hid_quirks} smsc95xx.macaddr=${macaddr} ${external_watchdog}" # HassOS bootargs -setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor cgroup_enable=memory" +setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory" # HassOS system A/B setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait" diff --git a/buildroot-external/board/intel/nuc/hassos-hook.sh b/buildroot-external/board/intel/nuc/hassos-hook.sh index e1a22cdbe..9042beacf 100755 --- a/buildroot-external/board/intel/nuc/hassos-hook.sh +++ b/buildroot-external/board/intel/nuc/hassos-hook.sh @@ -8,7 +8,7 @@ function hassos_pre_image() { mkdir -p "${BOOT_DATA}/EFI/barebox" cp "${BINARIES_DIR}/barebox.bin" "${BOOT_DATA}/EFI/BOOT/BOOTx64.EFI" - cp "${BR2_EXTERNAL_HASSOS_PATH}/misc/barebox-state-efi.dtb" "${BOOT_DATA}/EFI/barebox/state.dtb" + cp "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/barebox-state-efi.dtb" "${BOOT_DATA}/EFI/barebox/state.dtb" echo "console=tty1" > "${BOOT_DATA}/cmdline.txt" } diff --git a/buildroot-external/board/intel/ova/hassos-hook.sh b/buildroot-external/board/intel/ova/hassos-hook.sh index 532ad6130..07976f1ec 100755 --- a/buildroot-external/board/intel/ova/hassos-hook.sh +++ b/buildroot-external/board/intel/ova/hassos-hook.sh @@ -8,7 +8,7 @@ function hassos_pre_image() { mkdir -p "${BOOT_DATA}/EFI/barebox" cp "${BINARIES_DIR}/barebox.bin" "${BOOT_DATA}/EFI/BOOT/BOOTx64.EFI" - cp "${BR2_EXTERNAL_HASSOS_PATH}/misc/barebox-state-efi.dtb" "${BOOT_DATA}/EFI/barebox/state.dtb" + cp "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/barebox-state-efi.dtb" "${BOOT_DATA}/EFI/barebox/state.dtb" echo "console=tty1" > "${BOOT_DATA}/cmdline.txt" } diff --git a/buildroot-external/board/raspberrypi/uboot-boot.ush b/buildroot-external/board/raspberrypi/uboot-boot.ush index 5abdcd47e..750940d43 100644 --- a/buildroot-external/board/raspberrypi/uboot-boot.ush +++ b/buildroot-external/board/raspberrypi/uboot-boot.ush @@ -9,7 +9,7 @@ setenv loadbootstate " \ setenv storebootstate " \ echo 'storing env...'; \ - env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT; \ + env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \ ${devtype} write ${ramdisk_addr_r} ${dev_env} 0x20;" run loadbootstate @@ -18,7 +18,7 @@ test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3 test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3 # HassOS bootargs -setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait cgroup_enable=memory" +setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait systemd.machine_id=${MACHINE_ID} cgroup_enable=memory" # HassOS system A/B setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro" diff --git a/buildroot-external/board/raspberrypi/uboot-boot64.ush b/buildroot-external/board/raspberrypi/uboot-boot64.ush index 255229e80..2adacf3b8 100644 --- a/buildroot-external/board/raspberrypi/uboot-boot64.ush +++ b/buildroot-external/board/raspberrypi/uboot-boot64.ush @@ -9,7 +9,7 @@ setenv loadbootstate " \ setenv storebootstate " \ echo 'storing env...'; \ - env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT; \ + env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \ ${devtype} write ${ramdisk_addr_r} ${dev_env} 0x20;" run loadbootstate @@ -18,7 +18,7 @@ test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3 test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3 # HassOS bootargs -setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait cgroup_enable=memory" +setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait systemd.machine_id=${MACHINE_ID} cgroup_enable=memory" # HassOS system A/B setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro" diff --git a/buildroot-external/misc/barebox-state-efi.dtb b/buildroot-external/bootloader/barebox-state-efi.dtb similarity index 56% rename from buildroot-external/misc/barebox-state-efi.dtb rename to buildroot-external/bootloader/barebox-state-efi.dtb index 7fcc3137cc276b0b0f2515f1075ef5c6a8d450fb..58d2cf9ec85f2886f0ce3e127484d723e2d91ec8 100644 GIT binary patch delta 110 zcmbQp`H)lK0`I@K3=Av}85kHWfOO160Wl^Pm5my&nLHVD6O%JC^HSq8QydIUfC_+s q8HhQ6I0=YFfLH~HL1OGc>{MJ*l$n; #size-cells = <1>; - magic = <0xef98423f>; - compatible = "barebox,state"; - backend = <&backend_state>; - backend-type = "raw"; - backend-stridesize = <4048>; + + magic = <0xef98423f>; + compatible = "barebox,state"; + backend = <&backend_state>; + backend-type = "raw"; + backend-stridesize = <4048>; bootstate { #address-cells = <1>; @@ -32,6 +33,7 @@ default = <20>; }; }; + B { #address-cells = <1>; #size-cells = <1>; @@ -46,11 +48,18 @@ default = <10>; }; }; + last_chosen@10 { reg = <0x10 0x4>; type = "uint32"; }; }; + + machine_id@14 { + reg = <0x14 0x24>; + type = "string"; + default = ""; + }; }; partitions { diff --git a/buildroot-external/bootloader/barebox/init/global_bootargs b/buildroot-external/bootloader/barebox/init/global_bootargs index f2cf669cb..183814bb7 100644 --- a/buildroot-external/bootloader/barebox/init/global_bootargs +++ b/buildroot-external/bootloader/barebox/init/global_bootargs @@ -3,3 +3,4 @@ global linux.bootargs.zram="zram.enabled=1 zram.num_devices=3" global linux.bootargs.apparmor="apparmor=1 security=apparmor" global linux.bootargs.misc="rootwait" +global linux.bootargs.systemd="systemd.machine_id=${state.machine_id}" diff --git a/buildroot-external/misc/mbr-part.rules b/buildroot-external/bootloader/mbr-part.rules similarity index 100% rename from buildroot-external/misc/mbr-part.rules rename to buildroot-external/bootloader/mbr-part.rules diff --git a/buildroot-external/misc/mbr-spl.img b/buildroot-external/bootloader/mbr-spl.img similarity index 100% rename from buildroot-external/misc/mbr-spl.img rename to buildroot-external/bootloader/mbr-spl.img diff --git a/buildroot-external/misc/mbr.img b/buildroot-external/bootloader/mbr.img similarity index 100% rename from buildroot-external/misc/mbr.img rename to buildroot-external/bootloader/mbr.img diff --git a/buildroot-external/ota/rauc-hook b/buildroot-external/ota/rauc-hook index 73b2e0e3a..de24bf499 100755 --- a/buildroot-external/ota/rauc-hook +++ b/buildroot-external/ota/rauc-hook @@ -31,8 +31,5 @@ fi ## # Fixups -# Rename CLI Hass.io -sed -i "s/hassio:172.30.32.2/supervisor:172.30.32.2/g" /mnt/data/hassos.json - exit 0 diff --git a/buildroot-external/rootfs-overlay/etc/systemd/journald.conf b/buildroot-external/rootfs-overlay/etc/systemd/journald.conf index 76991c0c7..979f7e0fc 100644 --- a/buildroot-external/rootfs-overlay/etc/systemd/journald.conf +++ b/buildroot-external/rootfs-overlay/etc/systemd/journald.conf @@ -1,5 +1,3 @@ [Journal] Storage=auto Compress=yes -SystemMaxUse=12M -RuntimeMaxUse=10M diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists-journald.service b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists-journald.service deleted file mode 120000 index fdc4db7b8..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists-journald.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-persists-journald.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists.service b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists.service new file mode 120000 index 000000000..fae7b5b9c --- /dev/null +++ b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/hassos-persists.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/tmpfiles.d/data.conf b/buildroot-external/rootfs-overlay/etc/tmpfiles.d/data.conf index 1e8e1e876..4ae2fceef 100644 --- a/buildroot-external/rootfs-overlay/etc/tmpfiles.d/data.conf +++ b/buildroot-external/rootfs-overlay/etc/tmpfiles.d/data.conf @@ -1,2 +1,2 @@ -d /mnt/data/supervisor -d /mnt/data/cli +d /mnt/data/supervisor - root root - +R /mnt/data/cli - - - - diff --git a/buildroot-external/rootfs-overlay/etc/tmpfiles.d/nm.conf b/buildroot-external/rootfs-overlay/etc/tmpfiles.d/nm.conf index 08720f923..85031800c 100644 --- a/buildroot-external/rootfs-overlay/etc/tmpfiles.d/nm.conf +++ b/buildroot-external/rootfs-overlay/etc/tmpfiles.d/nm.conf @@ -1,3 +1,3 @@ # Cleanup lease files e /var/lib/NetworkManager/*.lease - - - 14d -f /run/resolv.conf - - - - +f /run/resolv.conf - root root - diff --git a/buildroot-external/rootfs-overlay/etc/tmpfiles.d/overlay.conf b/buildroot-external/rootfs-overlay/etc/tmpfiles.d/overlay.conf new file mode 100644 index 000000000..7620e927b --- /dev/null +++ b/buildroot-external/rootfs-overlay/etc/tmpfiles.d/overlay.conf @@ -0,0 +1 @@ +R /mnt/overlay/var/log/journal - - - - \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-persists-journald.service b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-persists-journald.service deleted file mode 100644 index 1a19fa6b0..000000000 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-persists-journald.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=HassOS persists journald -Requires=var-log-journal.mount -After=sysinit.target systemd-journald.service -RefuseManualStart=true -RefuseManualStop=true - -[Service] -Type=oneshot -ExecStart=/usr/libexec/hassos-persists-journald -RemainAfterExit=true - -[Install] -WantedBy=multi-user.target diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-persists.service b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-persists.service new file mode 100644 index 000000000..33d0cee1c --- /dev/null +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-persists.service @@ -0,0 +1,13 @@ +[Unit] +Description=HassOS persists data on bootstate +After=sysinit.target +RefuseManualStart=true +RefuseManualStop=true + +[Service] +Type=oneshot +ExecStart=/usr/libexec/hassos-persists +RemainAfterExit=true + +[Install] +WantedBy=multi-user.target diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/var-log-journal.mount b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/var-log-journal.mount index d665df131..83d87b76c 100644 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/var-log-journal.mount +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/var-log-journal.mount @@ -1,11 +1,11 @@ [Unit] Description=Systemd persistent logging -Requires=mnt-overlay.mount -After=mnt-overlay.mount +Requires=mnt-data.mount +After=mnt-data.mount Before=systemd-journal-flush.service [Mount] -What=/mnt/overlay/var/log/journal +What=/mnt/data/logs Where=/var/log/journal Type=None Options=bind diff --git a/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists b/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists new file mode 100755 index 000000000..3b71b09ba --- /dev/null +++ b/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists @@ -0,0 +1,30 @@ +#!/bin/sh +set -e + +MACHINE_ID=$(cat /etc/machine-id) + +### +# u-boot +if [ -e /usr/sbin/fw_setenv ]; then + + # machine-id + if [ "$(fw_printenv -n MACHINE_ID)" != "${MACHINE_ID}" ]; then + echo "[info] set machine-id to ${MACHINE_ID}" + fw_setenv MACHINE_ID "${MACHINE_ID}" + else + echo "[info] machine-id is okay" + fi + +### +# Barebox +else + + # machine-id + if [ "$(barebox-state -g state.machine_id -i /etc/barebox-state.dtb)" != "${MACHINE_ID}" ]; then + echo "[info] set machine-id to ${MACHINE_ID}" + barebox-state -s "state.machine_id=${MACHINE_ID}" -i /etc/barebox-state.dtb + else + echo "[info] machine-id is okay" + fi + +fi diff --git a/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists-journald b/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists-journald deleted file mode 100755 index c85c5812f..000000000 --- a/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists-journald +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -set -e - -MACHINE_ID=$(cat /etc/machine-id) - -# Loop all logs folder and move -for log_folder in /var/log/journal/*; do - # Not a log folder - if [ ! -d "${log_folder}" ]; then - continue - fi - - # Current log folder - if (echo "${log_folder}" | grep "${MACHINE_ID}"); then - continue - fi - - rm -rf "${log_folder}" -done diff --git a/buildroot-external/scripts/hdd-image.sh b/buildroot-external/scripts/hdd-image.sh index 626562604..7b3416276 100755 --- a/buildroot-external/scripts/hdd-image.sh +++ b/buildroot-external/scripts/hdd-image.sh @@ -269,7 +269,7 @@ function _fix_disk_hyprid() { local hdd_img="$(hassos_image_name img)" sgdisk -t 1:"E3C9E316-0B5C-4DB8-817D-F92DF00215AE" "${hdd_img}" - dd if="${BR2_EXTERNAL_HASSOS_PATH}/misc/mbr.img" of="${hdd_img}" conv=notrunc bs=512 count=1 + dd if="${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr.img" of="${hdd_img}" conv=notrunc bs=512 count=1 } @@ -278,7 +278,7 @@ function _fix_disk_spl_gpt() { local spl_img="$(path_spl_img)" sgdisk -t 1:"E3C9E316-0B5C-4DB8-817D-F92DF00215AE" "${hdd_img}" - dd if="${BR2_EXTERNAL_HASSOS_PATH}/misc/mbr-spl.img" of="${hdd_img}" conv=notrunc bs=512 count=1 + dd if="${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr-spl.img" of="${hdd_img}" conv=notrunc bs=512 count=1 dd if="${spl_img}" of="${hdd_img}" conv=notrunc bs=512 seek=2 skip=2 } diff --git a/buildroot-external/scripts/rauc.sh b/buildroot-external/scripts/rauc.sh index 197dbfede..0fadf6554 100755 --- a/buildroot-external/scripts/rauc.sh +++ b/buildroot-external/scripts/rauc.sh @@ -81,12 +81,12 @@ function install_bootloader_config() { # shellcheck disable=SC1117 echo -e "/dev/disk/by-partlabel/hassos-bootstate\t0x0000\t${BOOT_ENV_SIZE}" > "${TARGET_DIR}/etc/fw_env.config" else - cp -f "${BR2_EXTERNAL_HASSOS_PATH}/misc/barebox-state-efi.dtb" "${TARGET_DIR}/etc/barebox-state.dtb" + cp -f "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/barebox-state-efi.dtb" "${TARGET_DIR}/etc/barebox-state.dtb" fi # Fix MBR if [ "${BOOT_SYS}" == "mbr" ]; then mkdir -p "${TARGET_DIR}/usr/lib/udev/rules.d" - cp -f "${BR2_EXTERNAL_HASSOS_PATH}/misc/mbr-part.rules" "${TARGET_DIR}/usr/lib/udev/rules.d/" + cp -f "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr-part.rules" "${TARGET_DIR}/usr/lib/udev/rules.d/" fi } diff --git a/scripts/update-dtb.sh b/scripts/update-dtb.sh index b4eaeacbd..8e91e5cb8 100755 --- a/scripts/update-dtb.sh +++ b/scripts/update-dtb.sh @@ -1,5 +1,5 @@ #!/bin/sh ## OVA -dtc -@ -I dts -O dtb -o buildroot-external/misc/barebox-state-efi.dtb buildroot-external/misc/barebox-state-efi.dts +dtc -@ -I dts -O dtb -o buildroot-external/bootloader/barebox-state-efi.dtb buildroot-external/bootloader/barebox-state-efi.dts From ba9d1bac1e6146c39b4b8b6152e26a1cd73a07e7 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 5 May 2020 14:23:17 +0200 Subject: [PATCH 06/16] Use older Kernel for N2 (#652) * Use older Kernel for N2 * Update docs * Update kernel-amlogic.config --- Documentation/kernel.md | 2 +- buildroot-external/board/hardkernel/kernel-amlogic.config | 2 +- buildroot-external/configs/odroid_n2_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/kernel.md b/Documentation/kernel.md index a14140b76..d68f9dc64 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -13,6 +13,6 @@ Default Kernel tree: 5.4 | Raspberry Pi 4 | 5.4.35 | | Tinker Board | 5.4.35 | | Odroid-C2 | 5.4.35 | -| Odroid-N2 | 5.4.35 | +| Odroid-N2 | 5.4.32 | | Odroid-XU4 | 5.4.35 | | Intel NUC | 5.4.35 | diff --git a/buildroot-external/board/hardkernel/kernel-amlogic.config b/buildroot-external/board/hardkernel/kernel-amlogic.config index 507744dfa..1f224edcc 100644 --- a/buildroot-external/board/hardkernel/kernel-amlogic.config +++ b/buildroot-external/board/hardkernel/kernel-amlogic.config @@ -1320,7 +1320,7 @@ CONFIG_PCIE_DW_HOST=y # CONFIG_PCIE_DW_PLAT_HOST is not set CONFIG_PCI_HISI=y CONFIG_PCIE_KIRIN=y -CONFIG_PCI_MESON=m +# CONFIG_PCI_MESON is not set # CONFIG_PCIE_AL is not set # end of DesignWare PCI Core Support # end of PCI controller drivers diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index 0a37d51af..44cb16f09 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/f2eb401e73e9b54432cf4234722cb4fad1b334f2.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/40b58dcff55ee1046f6d69953b241ff27b92f749.tar.gz" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" From b3530d1ce1d9724ba1845a351c86dc28fec39439 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 00:00:28 +0200 Subject: [PATCH 07/16] Allow easy move data partition (#651) * Allow easy move data partition * Cleanup handling systemd * Improve handling * fix pipeline * pipeline * fix shell handling * fix scripts * Add bin folder * fix lint * Fix service handling * Fix loading * hide output * Fix handling --- azure-pipelines-ci.yml | 4 ++ ...k-meson-g12a-fix-gp0-and-hifi-ranges.patch | 39 +++++++++++ .../bluetooth-bcm43xx/bluetooth-bcm43xx.mk | 1 - .../bluetooth-rtl8723/bluetooth-rtl8723.mk | 1 - ...tworkManager-system\\x2dconnections.mount" | 1 - .../hassos-bind.target.wants/etc-docker.mount | 1 - .../etc-dropbear.mount | 1 - .../etc-hostname.mount | 1 - .../hassos-bind.target.wants/etc-hosts.mount | 1 - .../etc-modules\\x2dload.d.mount" | 1 - .../etc-systemd-timesyncd.conf.mount | 1 - .../etc-udev-rules.d.mount | 1 - .../hassos-user-rules-udev-trigger.service | 1 - .../root-.docker.mount | 1 - .../hassos-bind.target.wants/root-.ssh.mount | 1 - .../var-lib-NetworkManager.mount | 1 - .../var-lib-bluetooth.mount | 1 - .../var-lib-docker.mount | 1 - .../var-lib-systemd.mount | 1 - .../var-log-journal.mount | 1 - .../hassos-hardware.target.wants/.empty | 0 .../zram-swap.service | 1 - .../hassos-zram.target.wants/zram-tmp.service | 1 - .../hassos-zram.target.wants/zram-var.service | 1 - .../hassos-expand.service | 1 - .../hassos-overlay.service | 1 - .../local-fs.target.wants/mnt-boot.mount | 1 - .../local-fs.target.wants/mnt-data.mount | 1 - .../local-fs.target.wants/mnt-overlay.mount | 1 - .../busybox-acpid.service | 1 - .../hassos-apparmor.service | 1 - .../hassos-bind.target | 1 - .../hassos-config.service | 1 - .../hassos-hardware.target | 1 - .../hassos-persists.service | 1 - .../hassos-supervisor.service | 1 - .../hassos-zram.target | 1 - .../multi-user.target.wants/rauc.service | 1 - .../system/swap.target.wants/dev-zram0.swap | 1 - .../rootfs-overlay/usr/bin/datactl | 31 +++++++++ .../usr/lib/systemd/system/hassos-bind.target | 3 + .../lib/systemd/system/hassos-data.service | 17 +++++ .../lib/systemd/system/hassos-expand.service | 1 - .../lib/systemd/system/hassos-hardware.target | 3 + .../usr/lib/systemd/system/hassos-zram.target | 3 + .../rootfs-overlay/usr/libexec/hassos-data | 68 +++++++++++++++++++ .../rootfs-overlay/usr/libexec/hassos-expand | 13 +++- .../usr/libexec/hassos-persists | 8 +-- buildroot-external/scripts/post-build.sh | 3 + 49 files changed, 185 insertions(+), 44 deletions(-) create mode 100644 buildroot-external/board/hardkernel/patches/linux/0001-FROMLIST-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch delete mode 120000 "buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-NetworkManager-system\\x2dconnections.mount" delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-docker.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-dropbear.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-hostname.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-hosts.mount delete mode 120000 "buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-modules\\x2dload.d.mount" delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-systemd-timesyncd.conf.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-udev-rules.d.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/hassos-user-rules-udev-trigger.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/root-.docker.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/root-.ssh.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-NetworkManager.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-bluetooth.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-docker.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-systemd.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-log-journal.mount delete mode 100644 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-hardware.target.wants/.empty delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-swap.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-tmp.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-var.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/hassos-expand.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/hassos-overlay.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-boot.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-data.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-overlay.mount delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/busybox-acpid.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-apparmor.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-bind.target delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-config.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-hardware.target delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-supervisor.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-zram.target delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/rauc.service delete mode 120000 buildroot-external/rootfs-overlay/etc/systemd/system/swap.target.wants/dev-zram0.swap create mode 100755 buildroot-external/rootfs-overlay/usr/bin/datactl create mode 100644 buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-data.service create mode 100755 buildroot-external/rootfs-overlay/usr/libexec/hassos-data diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 6b9c1e0d1..a86b2b133 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -38,11 +38,15 @@ jobs: sudo docker pull koalaman/shellcheck:$(versionShellCheck) displayName: 'Install ShellCheck' - script: | + set -e + + # Check build script sudo docker run --rm -i \ -v $(pwd):/mnt:ro koalaman/shellcheck:$(versionShellCheck) \ scripts/*.sh \ buildroot-external/scripts/*.sh \ buildroot-external/board/**/*.sh \ + buildroot-external/rootfs-overlay/usr/bin/* \ buildroot-external/rootfs-overlay/usr/sbin/* \ buildroot-external/rootfs-overlay/usr/libexec/* \ buildroot-external/rootfs-overlay/usr/lib/rauc/* diff --git a/buildroot-external/board/hardkernel/patches/linux/0001-FROMLIST-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch b/buildroot-external/board/hardkernel/patches/linux/0001-FROMLIST-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch new file mode 100644 index 000000000..9ab235927 --- /dev/null +++ b/buildroot-external/board/hardkernel/patches/linux/0001-FROMLIST-clk-meson-g12a-fix-gp0-and-hifi-ranges.patch @@ -0,0 +1,39 @@ +From 81b290367d59103d1f041709c56a3de1c360e102 Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Mon, 13 May 2019 14:45:31 +0200 +Subject: [PATCH] FROMLIST: clk: meson: g12a: fix gp0 and hifi ranges + +While some SoC samples are able to lock with a PLL factor of 55, others +samples can't. ATM, a minimum of 60 appears to work on all the samples +I have tried. + +Even with 60, it sometimes takes a long time for the PLL to eventually +lock. The documentation says that the minimum rate of these PLLs DCO +should be 3GHz, a factor of 125. Let's use that to be on the safe side. + +With factor range changed, the PLL seems to lock quickly (enough) so far. +It is still unclear if the range was the only reason for the delay. + +Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller") +Signed-off-by: Jerome Brunet +Signed-off-by: Neil Armstrong +--- + drivers/clk/meson/g12a.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c +index b3af61cc6fb9..66cf791bfc8c 100644 +--- a/drivers/clk/meson/g12a.c ++++ b/drivers/clk/meson/g12a.c +@@ -1591,7 +1591,7 @@ static struct clk_regmap g12b_cpub_clk_trace = { + }; + + static const struct pll_mult_range g12a_gp0_pll_mult_range = { +- .min = 55, ++ .min = 125, + .max = 255, + }; + +-- +2.17.1 + diff --git a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.mk b/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.mk index df5437648..684bf8560 100644 --- a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.mk +++ b/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.mk @@ -24,7 +24,6 @@ define BLUETOOTH_BCM43XX_INSTALL_TARGET_CMDS $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants $(INSTALL) -m 0644 $(@D)/bluetooth-bcm43xx.service $(TARGET_DIR)/usr/lib/systemd/system/ $(INSTALL) -m 0644 $(@D)/bthelper@.service $(TARGET_DIR)/usr/lib/systemd/system/ - ln -fs /usr/lib/systemd/system/bluetooth-bcm43xx.service $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants/ $(INSTALL) -d $(TARGET_DIR)/usr/bin $(INSTALL) -m 0755 $(@D)/btuart $(TARGET_DIR)/usr/bin/ diff --git a/buildroot-external/package/bluetooth-rtl8723/bluetooth-rtl8723.mk b/buildroot-external/package/bluetooth-rtl8723/bluetooth-rtl8723.mk index 10fecae45..c3e3ebebf 100644 --- a/buildroot-external/package/bluetooth-rtl8723/bluetooth-rtl8723.mk +++ b/buildroot-external/package/bluetooth-rtl8723/bluetooth-rtl8723.mk @@ -21,7 +21,6 @@ define BLUETOOTH_RTL8723_INSTALL_TARGET_CMDS $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants $(INSTALL) -m 0755 $(@D)/bluetooth-rtl8723 $(TARGET_DIR)/usr/sbin/ $(INSTALL) -m 0644 $(@D)/bluetooth-rtl8723.service $(TARGET_DIR)/usr/lib/systemd/system/ - ln -fs /usr/lib/systemd/system/bluetooth-rtl8723.service $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants/ $(INSTALL) -d $(TARGET_DIR)/lib/firmware/rtlbt $(INSTALL) -m 0644 $(@D)/rtl8723b_* $(TARGET_DIR)/lib/firmware/rtlbt/ diff --git "a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-NetworkManager-system\\x2dconnections.mount" "b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-NetworkManager-system\\x2dconnections.mount" deleted file mode 120000 index 440f4a731..000000000 --- "a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-NetworkManager-system\\x2dconnections.mount" +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/etc-NetworkManager-system\x2dconnections.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-docker.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-docker.mount deleted file mode 120000 index 232985c3e..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-docker.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/etc-docker.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-dropbear.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-dropbear.mount deleted file mode 120000 index 4a225123b..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-dropbear.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/etc-dropbear.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-hostname.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-hostname.mount deleted file mode 120000 index 173cae388..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-hostname.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/etc-hostname.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-hosts.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-hosts.mount deleted file mode 120000 index d22d22eb3..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-hosts.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/etc-hosts.mount \ No newline at end of file diff --git "a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-modules\\x2dload.d.mount" "b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-modules\\x2dload.d.mount" deleted file mode 120000 index 11e4628b3..000000000 --- "a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-modules\\x2dload.d.mount" +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/etc-modules\x2dload.d.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-systemd-timesyncd.conf.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-systemd-timesyncd.conf.mount deleted file mode 120000 index 29053b7fc..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-systemd-timesyncd.conf.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/etc-systemd-timesyncd.conf.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-udev-rules.d.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-udev-rules.d.mount deleted file mode 120000 index c148f8000..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/etc-udev-rules.d.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/etc-udev-rules.d.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/hassos-user-rules-udev-trigger.service b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/hassos-user-rules-udev-trigger.service deleted file mode 120000 index b41d47acb..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/hassos-user-rules-udev-trigger.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-user-rules-udev-trigger.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/root-.docker.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/root-.docker.mount deleted file mode 120000 index 89b8e7c7e..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/root-.docker.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/root-.docker.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/root-.ssh.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/root-.ssh.mount deleted file mode 120000 index 84b3685f2..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/root-.ssh.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/root-.ssh.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-NetworkManager.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-NetworkManager.mount deleted file mode 120000 index eea387e8c..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-NetworkManager.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/var-lib-NetworkManager.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-bluetooth.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-bluetooth.mount deleted file mode 120000 index d16b3e1f6..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-bluetooth.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/var-lib-bluetooth.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-docker.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-docker.mount deleted file mode 120000 index 467de4f6f..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-docker.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/var-lib-docker.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-systemd.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-systemd.mount deleted file mode 120000 index 4a7127d20..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-lib-systemd.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/var-lib-systemd.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-log-journal.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-log-journal.mount deleted file mode 120000 index efc836fc0..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-bind.target.wants/var-log-journal.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/var-log-journal.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-hardware.target.wants/.empty b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-hardware.target.wants/.empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-swap.service b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-swap.service deleted file mode 120000 index e01102d0f..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-swap.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/zram-swap.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-tmp.service b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-tmp.service deleted file mode 120000 index fa475eac5..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-tmp.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/zram-tmp.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-var.service b/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-var.service deleted file mode 120000 index 9d0314340..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/hassos-zram.target.wants/zram-var.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/zram-var.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/hassos-expand.service b/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/hassos-expand.service deleted file mode 120000 index efdd01fe4..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/hassos-expand.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-expand.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/hassos-overlay.service b/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/hassos-overlay.service deleted file mode 120000 index 577ec4382..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/hassos-overlay.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-overlay.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-boot.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-boot.mount deleted file mode 120000 index 909c6e93d..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-boot.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/mnt-boot.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-data.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-data.mount deleted file mode 120000 index 62a16cffe..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-data.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/mnt-data.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-overlay.mount b/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-overlay.mount deleted file mode 120000 index f3df5f297..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/local-fs.target.wants/mnt-overlay.mount +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/mnt-overlay.mount \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/busybox-acpid.service b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/busybox-acpid.service deleted file mode 120000 index 58ebeea6d..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/busybox-acpid.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/busybox-acpid.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-apparmor.service b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-apparmor.service deleted file mode 120000 index 3caec078f..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-apparmor.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-apparmor.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-bind.target b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-bind.target deleted file mode 120000 index afb44860c..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-bind.target +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-bind.target \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-config.service b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-config.service deleted file mode 120000 index 24c0f09e3..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-config.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-config.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-hardware.target b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-hardware.target deleted file mode 120000 index e14d96357..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-hardware.target +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-hardware.target \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists.service b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists.service deleted file mode 120000 index fae7b5b9c..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-persists.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-persists.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-supervisor.service b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-supervisor.service deleted file mode 120000 index 17b423d69..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-supervisor.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-supervisor.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-zram.target b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-zram.target deleted file mode 120000 index decfca7a2..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/hassos-zram.target +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/hassos-zram.target \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/rauc.service b/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/rauc.service deleted file mode 120000 index c7ea83e7a..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/multi-user.target.wants/rauc.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/rauc.service \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/swap.target.wants/dev-zram0.swap b/buildroot-external/rootfs-overlay/etc/systemd/system/swap.target.wants/dev-zram0.swap deleted file mode 120000 index 80109b60f..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/swap.target.wants/dev-zram0.swap +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/dev-zram0.swap \ No newline at end of file diff --git a/buildroot-external/rootfs-overlay/usr/bin/datactl b/buildroot-external/rootfs-overlay/usr/bin/datactl new file mode 100755 index 000000000..adc024685 --- /dev/null +++ b/buildroot-external/rootfs-overlay/usr/bin/datactl @@ -0,0 +1,31 @@ +#!/bin/sh +# ============================================================================== +# HassOS data partition handling +# ============================================================================== +set -e + +OPTION_FILE=/mnt/overlay/data.opt +DATA_DEVICE_CHILD="$(findfs LABEL="hassos-data")" +DATA_DEVICE_ROOT="/dev/$(lsblk -no pkname "${DATA_DEVICE_CHILD}")" + +# Move command +if [ "${1}" = "move" ] && [ -e "${2}" ]; then + DEVICE="${2}" + + # Check device + if ! lsblk "${DEVICE}" | grep disk > /dev/null 2>&1; then + echo "[ERROR] Is not disk!" + exit 1 + elif [ "${DEVICE}" = "${DATA_DEVICE_ROOT}" ]; then + echo "[ERROR] Can't be the same disk!" + exit 1 + fi + + # Flag device + echo "WARNING: ${DEVICE} will be reset on next restart!" + echo "Press a key to move forward" + read -r + + echo "${DEVICE}" > ${OPTION_FILE} +fi + diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-bind.target b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-bind.target index 4d0e40302..7d030b79d 100644 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-bind.target +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-bind.target @@ -2,3 +2,6 @@ Description=HassOS overlay targets Documentation=man:systemd.target(5) Before=sysinit.target + +[Install] +WantedBy=multi-user.target diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-data.service b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-data.service new file mode 100644 index 000000000..2b1978ddf --- /dev/null +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-data.service @@ -0,0 +1,17 @@ +[Unit] +Description=HassOS data partition +DefaultDependencies=no +RefuseManualStart=true +RefuseManualStop=true +Requires=mnt-overlay.mount dev-disk-by\x2dlabel-hassos\x2ddata.device +Wants=hassos-expand.service +After=mnt-overlay.mount dev-disk-by\x2dlabel-hassos\x2ddata.device +Before=hassos-expand.service +ConditionPathExists=/mnt/overlay/data.opt + +[Service] +Type=oneshot +ExecStart=/usr/libexec/hassos-data + +[Install] +WantedBy=local-fs.target diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-expand.service b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-expand.service index afa6a1eff..a847f9f9a 100644 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-expand.service +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-expand.service @@ -10,7 +10,6 @@ After=dev-disk-by\x2dlabel-hassos\x2ddata.device [Service] Type=oneshot ExecStart=/usr/libexec/hassos-expand -RemainAfterExit=true [Install] WantedBy=local-fs.target diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-hardware.target b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-hardware.target index 44001027e..931db9009 100644 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-hardware.target +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-hardware.target @@ -1,3 +1,6 @@ [Unit] Description=HassOS hardware targets Documentation=man:systemd.target(5) + +[Install] +WantedBy=multi-user.target diff --git a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-zram.target b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-zram.target index f94232646..4279629ae 100644 --- a/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-zram.target +++ b/buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-zram.target @@ -1,3 +1,6 @@ [Unit] Description=HassOS zram targets Documentation=man:systemd.target(5) + +[Install] +WantedBy=multi-user.target diff --git a/buildroot-external/rootfs-overlay/usr/libexec/hassos-data b/buildroot-external/rootfs-overlay/usr/libexec/hassos-data new file mode 100755 index 000000000..20a0f9bb2 --- /dev/null +++ b/buildroot-external/rootfs-overlay/usr/libexec/hassos-data @@ -0,0 +1,68 @@ +#!/bin/sh +# shellcheck disable=SC2039 +# ============================================================================== +# HassOS data partition handler +# ============================================================================== +set -e + +OPTION_FILE=/mnt/overlay/data.opt + +# New data partition exits +if ! [ -e "${OPTION_FILE}" ]; then + echo "[INFO] No data option found" + exit 0 +else + NEW_DEVICE_ROOT="$(cat ${OPTION_FILE})" + rm ${OPTION_FILE} +fi + +# Get device information +OLD_DEVICE_CHILD="$(findfs LABEL="hassos-data")" +OLD_DEVICE_ROOT="/dev/$(lsblk -no pkname "${OLD_DEVICE_CHILD}")" +OLD_PART_NUM="${OLD_DEVICE_CHILD: -1}" + +# Create new partition +echo "[INFO] Create new hassos-data partition" +sgdisk -o "${NEW_DEVICE_ROOT}" +sgdisk \ + -n "0:0:0" \ + -c "0:hassos-data" \ + -t "0:0FC63DAF-8483-4772-8E79-3D69D8477DE4" \ + -u "0:a52a4597-fa3a-4851-aefd-2fbe9f849079" \ + "${NEW_DEVICE_ROOT}" +sgdisk -v "${NEW_DEVICE_ROOT}" +partx -u "${NEW_DEVICE_ROOT}" + +NEW_DEVICE_CHILD="$(fdisk -l "${NEW_DEVICE_ROOT}" | grep '^/dev' | cut -d' ' -f1 | head -n 1)" + +echo "[INFO] Move hassos-data from ${OLD_DEVICE_CHILD} to ${NEW_DEVICE_CHILD}" +if ! dd if="${OLD_DEVICE_CHILD}" of="${NEW_DEVICE_CHILD}" status=none; then + echo "[ERROR] Data copy fails!" + + # Reset new data partition + sgdisk -o "${NEW_DEVICE_ROOT}" + partx -u "${NEW_DEVICE_ROOT}" + exit 1 +fi + +echo "[INFO] Remove old hassos-data partition ${OLD_PART_NUM} / ${OLD_DEVICE_ROOT}" +if sfdisk -dq "${OLD_DEVICE_ROOT}" | grep -q 'label: gpt'; then + sgdisk -d "${OLD_PART_NUM}" "${OLD_DEVICE_ROOT}" + sgdisk -v "${OLD_DEVICE_ROOT}" + +else + sfdisk --delete "${OLD_PART_NUM}" "${OLD_DEVICE_ROOT}" --force + sfdisk -V "${OLD_DEVICE_ROOT}" +fi + +echo "[INFO] fix filesystem & layout" + +# Fix filesystem +e2fsck -y "${NEW_DEVICE_CHILD}" +resize2fs -f "${NEW_DEVICE_CHILD}" + +# Fix partition layout +partx -d "${OLD_DEVICE_CHILD}" +partx -u "${NEW_DEVICE_ROOT}" + +echo "[INFO] Finish hassos data movement" diff --git a/buildroot-external/rootfs-overlay/usr/libexec/hassos-expand b/buildroot-external/rootfs-overlay/usr/libexec/hassos-expand index 64554e18b..6cbe7d0c7 100755 --- a/buildroot-external/rootfs-overlay/usr/libexec/hassos-expand +++ b/buildroot-external/rootfs-overlay/usr/libexec/hassos-expand @@ -1,5 +1,8 @@ #!/bin/sh # shellcheck disable=SC2039 +# ============================================================================== +# HassOS partition expander +# ============================================================================== set -e DEVICE_CHILD="$(findfs LABEL="hassos-data")" @@ -13,11 +16,15 @@ if [ -z "${UNUSED}" ] || [ "${UNUSED}" -le "2048" ]; then exit 0 fi +echo "[INFO] Update hassos-data partition ${PART_NUM}" if sfdisk -dq "${DEVICE_ROOT}" | grep -q 'label: gpt'; then - # Resize & Reload partition - echo "[INFO] Update hassos-data partition ${PART_NUM}" sgdisk -e "${DEVICE_ROOT}" - sgdisk -d "${PART_NUM}" -n "${PART_NUM}:0:0" -c "${PART_NUM}:hassos-data" -t "${PART_NUM}:0FC63DAF-8483-4772-8E79-3D69D8477DE4" -u "${PART_NUM}:a52a4597-fa3a-4851-aefd-2fbe9f849079" "${DEVICE_ROOT}" + sgdisk -d "${PART_NUM}" \ + -n "${PART_NUM}:0:0" \ + -c "${PART_NUM}:hassos-data" \ + -t "${PART_NUM}:0FC63DAF-8483-4772-8E79-3D69D8477DE4" \ + -u "${PART_NUM}:a52a4597-fa3a-4851-aefd-2fbe9f849079" \ + "${DEVICE_ROOT}" sgdisk -v "${DEVICE_ROOT}" else echo ", +" | sfdisk -N "${PART_NUM}" "${DEVICE_ROOT}" --force diff --git a/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists b/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists index 3b71b09ba..305cdc95e 100755 --- a/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists +++ b/buildroot-external/rootfs-overlay/usr/libexec/hassos-persists @@ -9,10 +9,10 @@ if [ -e /usr/sbin/fw_setenv ]; then # machine-id if [ "$(fw_printenv -n MACHINE_ID)" != "${MACHINE_ID}" ]; then - echo "[info] set machine-id to ${MACHINE_ID}" + echo "[INFO] set machine-id to ${MACHINE_ID}" fw_setenv MACHINE_ID "${MACHINE_ID}" else - echo "[info] machine-id is okay" + echo "[INFO] machine-id is okay" fi ### @@ -21,10 +21,10 @@ else # machine-id if [ "$(barebox-state -g state.machine_id -i /etc/barebox-state.dtb)" != "${MACHINE_ID}" ]; then - echo "[info] set machine-id to ${MACHINE_ID}" + echo "[INFO] set machine-id to ${MACHINE_ID}" barebox-state -s "state.machine_id=${MACHINE_ID}" -i /etc/barebox-state.dtb else - echo "[info] machine-id is okay" + echo "[INFO] machine-id is okay" fi fi diff --git a/buildroot-external/scripts/post-build.sh b/buildroot-external/scripts/post-build.sh index 8b8c82490..029b41d24 100755 --- a/buildroot-external/scripts/post-build.sh +++ b/buildroot-external/scripts/post-build.sh @@ -45,3 +45,6 @@ install_hassos_cli write_rauc_config install_rauc_certs install_bootloader_config + +# Fix overlay presets +"${HOST_DIR}/bin/systemctl" --root="${TARGET_DIR}" preset-all From 770bcb62a0c0ad8034af26c2d34962c2dc60aa1c Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 08:26:44 +0000 Subject: [PATCH 08/16] Update docs --- Documentation/getting_started_development.md | 6 +-- Documentation/partition.md | 44 ++++++++++++++++++++ README.md | 4 +- 3 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 Documentation/partition.md diff --git a/Documentation/getting_started_development.md b/Documentation/getting_started_development.md index 62fa45de3..df22fcbdb 100644 --- a/Documentation/getting_started_development.md +++ b/Documentation/getting_started_development.md @@ -1,7 +1,7 @@ Getting started with Hassos development using Docker on GNU/Linux ================================================================= -First, install **docker** for your distribution - I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a docker container - which requires a "privileged" container to run, which can only be done as root). +First, install **docker-ce** for your distribution - I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a docker container - which requires a "privileged" container to run, which can only be done as root). Next, make sure the docker daemon is running: @@ -83,12 +83,10 @@ total 141M In order to be able to use this image file with the **qemu** hypervisor, you'll need to unpack it, and convert it to an image format that qemu can work with. Conveniently, the _hassos_ buildenv already provides all the tools we need for this conversion: ``` -root@fd292c061896:/build# gunzip release/hassos_ova-2.2.vmdk.gz -root@fd292c061896:/build# qemu-img convert -O qcow2 release/hassos_ova-2.2.vmdk release/hassos_ova-2.2.qcow2 +root@fd292c061896:/build# gunzip release/hassos_ova-2.2.qcow2.gz root@fd292c061896:/build# ls -lh release/ total 673M -rw-r--r-- 1 root root 337M Oct 10 20:25 hassos_ova-2.2.qcow2 --rw-r--r-- 1 root root 337M Oct 10 20:22 hassos_ova-2.2.vmdk ``` Now, exit the docker container's environment, and find the build artifacts in the `releases/` directory beneath your repository checkout dir. (The generated files will be owned by _root_; make sure to `chown` them to your user account, if needed.) diff --git a/Documentation/partition.md b/Documentation/partition.md new file mode 100644 index 000000000..3b06a7a29 --- /dev/null +++ b/Documentation/partition.md @@ -0,0 +1,44 @@ +# Partition + +The partition layout is a bit different on the first part. We prefere GPT every time where is possible. With SoCs they don't support GPT, we can use the hyprid GPT. More about this on [development](development.mnd) documentation. + +The system is designed to have less as possible writes on the system. Which means we have basicly just writes on the OTA update and pretty small (5-6 times per week) on the overlay part. The Data partition have real I/O which is possible to offload into a different drive. + +Basic it look like: + +``` +------------------------- +| Bootloader | +------------------------- +| Kernel A | +------------------------- +| System A | +| | +------------------------- +| Kernel B | +------------------------- +| System B | +| | +------------------------- +| Bootstate | +------------------------- +| Overlay | +| | +... + +------------------------- +| Data | +| | +------------------------- +``` + +Sometime the bootloader part can look different because there can be firmware or SPLs for boot the CPU on the SoC. + +## Data + +The data partation is the only partition with I/O. This partition can be offloaded to a different drive with the utility: +```sh +$ datactl move /dev/xxx +``` + +On next boot, the partition will be moved to the new drive. The drive need to be bigger as the old one and we own the full new drive. diff --git a/README.md b/README.md index 8bcfecaa6..f086b1b53 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ [![Build Status](https://dev.azure.com/home-assistant/Hass.io/_apis/build/status/hassos?branchName=dev)](https://dev.azure.com/home-assistant/Hass.io/_build/latest?definitionId=13&branchName=dev) -# HassOS +# Home Assistant Operating-System Hass.io OS based on [buildroot](https://buildroot.org/). It's a hypervisor for Docker and supports various kind of IoT hardware. It is also available as virtual appliance. The whole system is optimized for embedded system and security. You can update the system simple with OTA updates or offline updates. +This is a embedded Linux which work different as a normal Linux distribution. The system is designed to run which less as possible I/O and full optimized for what is needed to be. Not more and not less. If you don't have expirence with embedded systems, that will be the point to go out of this repository. All docs are for developer with embedded background. + ## Focus - Barebox as bootloader on EFI From 37639fc3ff8ca0c3097192a5723e9a1856121129 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 08:27:59 +0000 Subject: [PATCH 09/16] cleanup badge --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index f086b1b53..6496242bf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![Build Status](https://dev.azure.com/home-assistant/Hass.io/_apis/build/status/hassos?branchName=dev)](https://dev.azure.com/home-assistant/Hass.io/_build/latest?definitionId=13&branchName=dev) - # Home Assistant Operating-System Hass.io OS based on [buildroot](https://buildroot.org/). It's a hypervisor for Docker and supports various kind of IoT hardware. It is also available as virtual appliance. The whole system is optimized for embedded system and security. You can update the system simple with OTA updates or offline updates. From 3070b52a3e619191f71e0c0d394e413ca8ea5d85 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 08:29:26 +0000 Subject: [PATCH 10/16] fix spell --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6496242bf..29c20e5d2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Home Assistant Operating-System Hass.io OS based on [buildroot](https://buildroot.org/). It's a hypervisor for Docker and supports various kind of IoT hardware. It is also available as virtual appliance. The whole system is optimized for embedded system and security. You can update the system simple with OTA updates or offline updates. -This is a embedded Linux which work different as a normal Linux distribution. The system is designed to run which less as possible I/O and full optimized for what is needed to be. Not more and not less. If you don't have expirence with embedded systems, that will be the point to go out of this repository. All docs are for developer with embedded background. +This is a embedded Linux which work different as a normal Linux distribution. The system is designed to run with less as possible I/O and full optimized for what is needed to be. Not more and not less. If you don't have expirence with embedded systems, that will be the point to go out of this repository. All docs are for developer with embedded background. ## Focus From fcefb1e515001181f915f35e940cf6d4590cde1c Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 08:33:48 +0000 Subject: [PATCH 11/16] expand --- Documentation/partition.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/partition.md b/Documentation/partition.md index 3b06a7a29..e03524fcb 100644 --- a/Documentation/partition.md +++ b/Documentation/partition.md @@ -36,7 +36,9 @@ Sometime the bootloader part can look different because there can be firmware or ## Data -The data partation is the only partition with I/O. This partition can be offloaded to a different drive with the utility: +The data partation is the only partition with real I/O. It will be expanded automatic on boot time to the full size of the disk. + +This partition can be offloaded to a different drive with the utility: ```sh $ datactl move /dev/xxx ``` From fcfd951f2bc93a06b0a9c8db804eb1b6137c60f1 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 09:35:18 +0000 Subject: [PATCH 12/16] RaspberryPi: Update kernel 5.4.38 - c41ae7cf543c1d680b4ac1afae40ca5bb0a96661 --- Documentation/kernel.md | 10 +++++----- buildroot-external/configs/rpi0_w_defconfig | 2 +- buildroot-external/configs/rpi2_defconfig | 2 +- buildroot-external/configs/rpi3_64_defconfig | 2 +- buildroot-external/configs/rpi3_defconfig | 2 +- buildroot-external/configs/rpi4_64_defconfig | 2 +- buildroot-external/configs/rpi4_defconfig | 2 +- buildroot-external/configs/rpi_defconfig | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/kernel.md b/Documentation/kernel.md index d68f9dc64..2afc8dc97 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -6,11 +6,11 @@ Default Kernel tree: 5.4 | Board | Version | |-------|---------| | Open Virtual Applicance | 5.4.35 | -| Raspberry Pi | 5.4.35 | -| Raspberry Pi 0-W | 5.4.35 | -| Raspberry Pi 2 | 5.4.35 | -| Raspberry Pi 3 | 5.4.35 | -| Raspberry Pi 4 | 5.4.35 | +| Raspberry Pi | 5.4.38 | +| Raspberry Pi 0-W | 5.4.38 | +| Raspberry Pi 2 | 5.4.38 | +| Raspberry Pi 3 | 5.4.38 | +| Raspberry Pi 4 | 5.4.38 | | Tinker Board | 5.4.35 | | Odroid-C2 | 5.4.35 | | Odroid-N2 | 5.4.32 | diff --git a/buildroot-external/configs/rpi0_w_defconfig b/buildroot-external/configs/rpi0_w_defconfig index 398da18ea..0ee7435f5 100644 --- a/buildroot-external/configs/rpi0_w_defconfig +++ b/buildroot-external/configs/rpi0_w_defconfig @@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi0-w $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9a583229eff3263202522945a594a9115d49fcc6.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi2_defconfig b/buildroot-external/configs/rpi2_defconfig index e1071441f..06fdb6892 100644 --- a/buildroot-external/configs/rpi2_defconfig +++ b/buildroot-external/configs/rpi2_defconfig @@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi2 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9a583229eff3263202522945a594a9115d49fcc6.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi3_64_defconfig b/buildroot-external/configs/rpi3_64_defconfig index 815fed7f7..75993fe91 100644 --- a/buildroot-external/configs/rpi3_64_defconfig +++ b/buildroot-external/configs/rpi3_64_defconfig @@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9a583229eff3263202522945a594a9115d49fcc6.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi3_defconfig b/buildroot-external/configs/rpi3_defconfig index 906cb356a..a0a460c44 100644 --- a/buildroot-external/configs/rpi3_defconfig +++ b/buildroot-external/configs/rpi3_defconfig @@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9a583229eff3263202522945a594a9115d49fcc6.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi4_64_defconfig b/buildroot-external/configs/rpi4_64_defconfig index b127c4014..35dce4cc5 100644 --- a/buildroot-external/configs/rpi4_64_defconfig +++ b/buildroot-external/configs/rpi4_64_defconfig @@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9a583229eff3263202522945a594a9115d49fcc6.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi4_defconfig b/buildroot-external/configs/rpi4_defconfig index 6aa8fb691..d7b88a226 100644 --- a/buildroot-external/configs/rpi4_defconfig +++ b/buildroot-external/configs/rpi4_defconfig @@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9a583229eff3263202522945a594a9115d49fcc6.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi_defconfig b/buildroot-external/configs/rpi_defconfig index ad54fce11..3226e76ca 100644 --- a/buildroot-external/configs/rpi_defconfig +++ b/buildroot-external/configs/rpi_defconfig @@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9a583229eff3263202522945a594a9115d49fcc6.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y From b14d0223c2be85a51e2935158f22c16ed2f0c7bc Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 09:35:40 +0000 Subject: [PATCH 13/16] Linux: Update kernel 5.4.39 --- Documentation/kernel.md | 6 +++--- buildroot-external/configs/intel_nuc_defconfig | 2 +- buildroot-external/configs/ova_defconfig | 2 +- buildroot-external/configs/tinker_defconfig | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/kernel.md b/Documentation/kernel.md index 2afc8dc97..9a9aea70a 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -5,14 +5,14 @@ Default Kernel tree: 5.4 | Board | Version | |-------|---------| -| Open Virtual Applicance | 5.4.35 | +| Open Virtual Applicance | 5.4.39 | | Raspberry Pi | 5.4.38 | | Raspberry Pi 0-W | 5.4.38 | | Raspberry Pi 2 | 5.4.38 | | Raspberry Pi 3 | 5.4.38 | | Raspberry Pi 4 | 5.4.38 | -| Tinker Board | 5.4.35 | +| Tinker Board | 5.4.39 | | Odroid-C2 | 5.4.35 | | Odroid-N2 | 5.4.32 | | Odroid-XU4 | 5.4.35 | -| Intel NUC | 5.4.35 | +| Intel NUC | 5.4.39 | diff --git a/buildroot-external/configs/intel_nuc_defconfig b/buildroot-external/configs/intel_nuc_defconfig index 7e81137ee..93a63ac22 100644 --- a/buildroot-external/configs/intel_nuc_defconfig +++ b/buildroot-external/configs/intel_nuc_defconfig @@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.35" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.39" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/ova_defconfig b/buildroot-external/configs/ova_defconfig index 9862da18e..99aeb557a 100644 --- a/buildroot-external/configs/ova_defconfig +++ b/buildroot-external/configs/ova_defconfig @@ -23,7 +23,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.35" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.39" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/tinker_defconfig b/buildroot-external/configs/tinker_defconfig index a85295560..13dbe1f35 100644 --- a/buildroot-external/configs/tinker_defconfig +++ b/buildroot-external/configs/tinker_defconfig @@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.35" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.39" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" From be39da4855912ebf99ebf26e76283fab9f3aa805 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 09:41:24 +0000 Subject: [PATCH 14/16] RaspberryPi: Update firmware 7eff9f6774bb43bfd61e749a0b45ffddc98c2311 --- buildroot-patches/0002-rpi-firmware-Bump-firmware.patch | 4 ++-- buildroot/package/rpi-firmware/rpi-firmware.hash | 2 +- buildroot/package/rpi-firmware/rpi-firmware.mk | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buildroot-patches/0002-rpi-firmware-Bump-firmware.patch b/buildroot-patches/0002-rpi-firmware-Bump-firmware.patch index 0c9ef61ee..753c1c455 100644 --- a/buildroot-patches/0002-rpi-firmware-Bump-firmware.patch +++ b/buildroot-patches/0002-rpi-firmware-Bump-firmware.patch @@ -16,7 +16,7 @@ index 59ab1da0c6..e3ba1bf99c 100644 @@ -1,3 +1,3 @@ # Locally computed -sha256 31a84340be08be319570a9d1439f25c0e3513fed73065a56aa5dd61dd605d5d9 rpi-firmware-01ecfd2ba2b7cf3a2f4aa75ada895ee4a3e729f5.tar.gz -+sha256 6a6eab17411cdc3dc027c8a06519ad9ee7dda6fbc7f5377e47347c9ecc250dac rpi-firmware-2b731476edc463f2d6b3d751cb47c515b4b5853f.tar.gz ++sha256 77ad450dd7cabb58ca04a18fd704844df6e642374346cf006a07edca46615af1 rpi-firmware-7eff9f6774bb43bfd61e749a0b45ffddc98c2311.tar.gz sha256 c7283ff51f863d93a275c66e3b4cb08021a5dd4d8c1e7acc47d872fbe52d3d6b boot/LICENCE.broadcom diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk index 6fee60b08c..2177ca9859 100644 @@ -27,7 +27,7 @@ index 6fee60b08c..2177ca9859 100644 ################################################################################ -RPI_FIRMWARE_VERSION = 01ecfd2ba2b7cf3a2f4aa75ada895ee4a3e729f5 -+RPI_FIRMWARE_VERSION = 2b731476edc463f2d6b3d751cb47c515b4b5853f ++RPI_FIRMWARE_VERSION = 7eff9f6774bb43bfd61e749a0b45ffddc98c2311 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/buildroot/package/rpi-firmware/rpi-firmware.hash b/buildroot/package/rpi-firmware/rpi-firmware.hash index 29b388647..583d76920 100644 --- a/buildroot/package/rpi-firmware/rpi-firmware.hash +++ b/buildroot/package/rpi-firmware/rpi-firmware.hash @@ -1,3 +1,3 @@ # Locally computed -sha256 6a6eab17411cdc3dc027c8a06519ad9ee7dda6fbc7f5377e47347c9ecc250dac rpi-firmware-2b731476edc463f2d6b3d751cb47c515b4b5853f.tar.gz +sha256 77ad450dd7cabb58ca04a18fd704844df6e642374346cf006a07edca46615af1 rpi-firmware-7eff9f6774bb43bfd61e749a0b45ffddc98c2311.tar.gz sha256 c7283ff51f863d93a275c66e3b4cb08021a5dd4d8c1e7acc47d872fbe52d3d6b boot/LICENCE.broadcom diff --git a/buildroot/package/rpi-firmware/rpi-firmware.mk b/buildroot/package/rpi-firmware/rpi-firmware.mk index 0272c648a..0d8cb5e44 100644 --- a/buildroot/package/rpi-firmware/rpi-firmware.mk +++ b/buildroot/package/rpi-firmware/rpi-firmware.mk @@ -4,7 +4,7 @@ # ################################################################################ -RPI_FIRMWARE_VERSION = 2b731476edc463f2d6b3d751cb47c515b4b5853f +RPI_FIRMWARE_VERSION = 7eff9f6774bb43bfd61e749a0b45ffddc98c2311 RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION)) RPI_FIRMWARE_LICENSE = BSD-3-Clause RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom From 698f2bb7d41e26459ff09c1f2f722c94fb7c65b4 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 09:42:39 +0000 Subject: [PATCH 15/16] Move to staging --- buildroot-external/meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot-external/meta b/buildroot-external/meta index cc734a7f4..081b7803d 100644 --- a/buildroot-external/meta +++ b/buildroot-external/meta @@ -4,4 +4,4 @@ VERSION_BUILD=6 HASSOS_NAME="HassOS" HASSOS_ID="hassos" -DEPLOYMENT="development" +DEPLOYMENT="staging" From 96c622b36fc022753de503a4b63edfb34e892e84 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 6 May 2020 11:50:19 +0200 Subject: [PATCH 16/16] Update deployment.md --- Documentation/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/deployment.md b/Documentation/deployment.md index 693c3db21..ed5f0bab4 100644 --- a/Documentation/deployment.md +++ b/Documentation/deployment.md @@ -15,7 +15,7 @@ The development number they will be bump for the stable release version and the The branch `dev` ist the actual development branch and from there we never make a release. The `master` branch contains the development version and from there we build a beta release. -If we create a new staging/productive release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this release. +If we create a new productive release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this release. ## Upload release files