├── .dockerignore ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ └── config.yml ├── actions │ └── bump-rpi-imager-version │ │ └── action.yml ├── dependabot.yml ├── label-actions.yml ├── release-drafter.yml └── workflows │ ├── artifacts-index.yaml │ ├── build.yaml │ ├── lock.yml │ ├── matrix.json │ ├── release-drafter.yml │ ├── stale.yml │ └── test.yaml ├── .gitignore ├── .gitmodules ├── .hadolint.yaml ├── .os-artifacts └── index.html ├── Dockerfile ├── Documentation ├── README.md ├── bluetooth.md ├── boards │ ├── README.md │ ├── asus │ │ └── README.md │ ├── generic-aarch64 │ │ └── README.md │ ├── generic-x86-64 │ │ └── README.md │ ├── hardkernel │ │ ├── README.md │ │ ├── odroid-c2.md │ │ ├── odroid-c4.md │ │ ├── odroid-m1.md │ │ ├── odroid-m1s.md │ │ ├── odroid-n2.md │ │ └── odroid-xu4.md │ ├── ova │ │ └── README.md │ └── raspberrypi │ │ └── README.md ├── configuration.md ├── kernel.md ├── network.md └── usb-disk.png ├── LICENSE ├── Makefile ├── README.md ├── buildroot-external ├── Config.in ├── board │ ├── arm-uefi │ │ └── generic-aarch64 │ │ │ ├── cmdline.txt │ │ │ ├── grub.cfg │ │ │ ├── hassos-hook.sh │ │ │ ├── kernel.config │ │ │ ├── meta │ │ │ └── patches │ │ │ └── linux │ │ │ ├── 0001-r8169-add-support-for-RTL8125D.patch │ │ │ ├── 0002-net-phy-realtek-merge-the-drivers-for-internal-NBase.patch │ │ │ └── 0003-net-phy-realtek-add-RTL8125D-internal-PHY.patch │ ├── asus │ │ ├── hassos-hook.sh │ │ └── tinker │ │ │ ├── boot-env.txt │ │ │ ├── cmdline.txt │ │ │ ├── image-spl-spl.cfg │ │ │ ├── kernel.config │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── patches │ │ │ ├── README.md │ │ │ ├── linux │ │ │ │ ├── 0001-Revert-ARM-dts-rockchip-use-DMA-channels-for-UARTs-f.patch │ │ │ │ ├── 0002-ARM-DTS-rk3288-tinker-Defining-the-SPI-interface.patch │ │ │ │ ├── 0003-ARM-dts-rockchip-enable-I2C1-4-on-rk3288-tinker.patch │ │ │ │ ├── 0004-RK3288-DTSI-rk3288.dtsi-Add-missing-SPI2-pinctrl.patch │ │ │ │ ├── 0005-ARM-DTSI-rk3288-tinker-Improving-the-CPU-max-voltage.patch │ │ │ │ ├── 0006-drivers-mmc-dw-mci-rockchip-Handle-ASUS-Tinkerboard-.patch │ │ │ │ ├── 0007-ARM-dts-rockchip-Add-Bluetooth-to-rk3288-tinker.patch │ │ │ │ └── 0008-usb-audio-add-ASUS-TinkerBoard-s-ALC4040.patch │ │ │ └── uboot │ │ │ │ └── 0001-pmic-enable-LDO2-vcc33_mipi-at-bootup.patch │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ ├── hardkernel │ │ ├── kernel-amlogic.config │ │ ├── odroid-c2 │ │ │ ├── boot-env.txt │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── image-spl-spl.cfg │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ │ ├── odroid-c4 │ │ │ ├── boot-env.txt │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── image-spl-spl.cfg │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ │ ├── odroid-m1 │ │ │ ├── boot-env.txt │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── image-spl-spl.cfg │ │ │ ├── kernel.config │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ │ ├── odroid-m1s │ │ │ ├── boot-env.txt │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── image-spl-spl.cfg │ │ │ ├── kernel.config │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── patches │ │ │ │ └── linux │ │ │ │ │ └── 0001-arm64-dts-rockchip-Enable-Rockchip-TRNG-on-ODROID-M1.patch │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ │ ├── odroid-n2 │ │ │ ├── boot-env.txt │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── image-spl-spl.cfg │ │ │ ├── kernel.config │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ │ ├── odroid-xu4 │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── image-spl-spl.cfg │ │ │ ├── kernel.config │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── patches │ │ │ │ └── linux │ │ │ │ │ └── 0001-ODROID-XU4-regulator-s2mps11-add-ethernet-power-rese.patch │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ │ ├── patches-meson │ │ │ └── uboot │ │ │ │ └── 0001-HACK-mmc-meson-gx-limit-f_max-to-24-MHz-on-the-first.patch │ │ └── patches │ │ │ └── linux │ │ │ ├── 0001-arm64-dts-meson-g12b-add-power-button-support.patch │ │ │ ├── 0002-arm64-dts-meson-g12b-add-GPIO-fan-support.patch │ │ │ ├── 0003-arm64-dts-meson-g12b-odroid-n2-add-fan-as-cooling-de.patch │ │ │ ├── 0004-arm64-dts-meson-add-uart_A-node.patch │ │ │ ├── 0005-arm64-dts-meson-add-i2c2-node-to-ODROID-N2-N2.patch │ │ │ ├── 0006-ODROID-C4-arm64-dts-add-uart_A-node.patch │ │ │ ├── 0007-ODROID-C4-arm64-dts-add-i2c2-i2c3-node.patch │ │ │ ├── 0008-arm64-dts-amlogic-add-uartA-uartC-to-ODROID-C2.patch │ │ │ └── 0009-arm64-dts-amlogic-meson-gx-add-missing-pins-for-I2C-.patch │ ├── khadas │ │ ├── kernel-vim.config │ │ └── vim3 │ │ │ ├── boot-env.txt │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── image-spl-spl.cfg │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ ├── nabucasa │ │ └── green │ │ │ ├── boot-env.txt │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── image-spl-spl.cfg │ │ │ ├── kernel.config │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── patches │ │ │ ├── linux │ │ │ │ ├── 0001-arm64-dts-rockchip-Add-NabuCasa-Green-board.patch │ │ │ │ ├── 0002-drivers-mfd-rk808-set-PWRON_LP_OFF_TIME-12s.patch │ │ │ │ ├── 0003-arch-arm64-dts-green-Remove-spiflash-partitions.patch │ │ │ │ ├── 0004-Input-rk805-pwrkey-reverse-polarity-of-pwrkey.patch │ │ │ │ ├── 0005-green-emmc-use-HS200-mode.patch │ │ │ │ └── 0006-arch-arm64-dts-green-Improve-LED-representation.patch │ │ │ └── uboot │ │ │ │ ├── 0001-arch-arm-dts-Add-NabuCasa-Green-board.patch │ │ │ │ ├── 0002-configs-green-Support-USB-boot.patch │ │ │ │ ├── 0003-arch-arm-dts-rk3566-green-boot-order.patch │ │ │ │ ├── 0004-arch-arm-dts-green-spi-nor-uboot.patch │ │ │ │ ├── 0005-board-green-add-Green-board-to-read-board-specific-E.patch │ │ │ │ ├── 0006-green-spl-loader-uboot-order-sd-emmc-spi_nor.patch │ │ │ │ ├── 0007-green-Fix-SPI-Flash-alias.patch │ │ │ │ ├── 0008-arch-arm-dts-green-drop-SPI-NOR-flash-partitions.patch │ │ │ │ ├── 0009-green-Do-not-use-eMMC-DDR52-mode-enable-HS200.patch │ │ │ │ ├── 0010-arch-arm64-dts-green-Improve-LED-representation.patch │ │ │ │ └── 0011-configs-green-fix-bss-and-stack-address-and-disable-.patch │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ ├── panther │ │ └── x2 │ │ │ ├── boot-env.txt │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── image-spl-spl.cfg │ │ │ ├── kernel.config │ │ │ ├── meta │ │ │ ├── partition-spl-spl.cfg │ │ │ ├── patches │ │ │ ├── linux │ │ │ │ └── add-board-panther-x2.patch │ │ │ └── uboot │ │ │ │ ├── 0001-add-panther-x2-uboot.patch │ │ │ │ ├── 0002-update-uboot.patch │ │ │ │ └── 0003-panther-Do-not-use-eMMC-DDR52-mode-enable-HS200.patch │ │ │ ├── uboot-boot.ush │ │ │ └── uboot.config │ ├── pc │ │ ├── generic-x86-64 │ │ │ ├── cmdline.txt │ │ │ ├── erofs-compress-hints.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── kernel.config │ │ │ └── meta │ │ ├── grub.cfg │ │ ├── ova │ │ │ ├── cmdline.txt │ │ │ ├── hassos-hook.sh │ │ │ ├── home-assistant.ovf │ │ │ ├── kernel.config │ │ │ ├── meta │ │ │ └── rootfs-overlay │ │ │ │ └── etc │ │ │ │ └── systemd │ │ │ │ └── logind.conf │ │ └── patches │ │ │ └── linux │ │ │ ├── 0001-r8169-add-support-for-RTL8125D.patch │ │ │ ├── 0002-net-phy-realtek-merge-the-drivers-for-internal-NBase.patch │ │ │ └── 0003-net-phy-realtek-add-RTL8125D-internal-PHY.patch │ └── raspberrypi │ │ ├── cmdline.txt │ │ ├── config.txt │ │ ├── hassos-hook.sh │ │ ├── kernel-armv7.config │ │ ├── kernel.config │ │ ├── patches │ │ ├── linux │ │ │ ├── 0001-ARM-dts-bcm283x-add-compatible-picked-up-by-U-Boot.patch │ │ │ ├── 0002-USB-storage-Increase-maximum-length-of-the-quirks-st.patch │ │ │ ├── 0003-dts-bcm2712-rpi-Disable-CQE-for-CM5-eMMC-to-work-aro.patch │ │ │ ├── 0004-ipv6-annotate-data-races-around-cnf.forwarding.patch │ │ │ ├── 0005-misc-rp1-pio-Error-out-on-incompatible-firmware.patch │ │ │ ├── 0006-firmware-rp1-Linger-on-firmware-failure.patch │ │ │ ├── 0007-mailbox-rp1-Don-t-claim-channels-in-of_xlate.patch │ │ │ └── 0008-misc-rp1-pio-Demote-fw-probe-error-to-warning.patch │ │ └── uboot │ │ │ ├── 0001-rpi-add-NVMe-to-boot-order.patch │ │ │ ├── 0002-Revert-nvme-Correct-the-prps-per-page-calculation-me.patch │ │ │ ├── 0003-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch │ │ │ ├── 0004-nvme-improve-readability-of-nvme_setup_prps.patch │ │ │ ├── 0005-nvme-Use-pointer-for-CPU-addressed-buffers.patch │ │ │ ├── 0006-nvme-translate-virtual-addresses-into-the-bus-s-addr.patch │ │ │ ├── 0007-Revert-pci-Check-region-ranges-are-addressable.patch │ │ │ ├── 0008-reset-reset-brcmstb-Add-Broadcom-STB-reset-controlle.patch │ │ │ ├── 0009-reset-reset-brcmstb-rescal-Add-Broadcom-RESCAL-reset.patch │ │ │ ├── 0010-pci-pcie-brcmstb-Add-basic-support-for-BCM2712-PCIe.patch │ │ │ ├── 0011-ARM-bcm2835-add-BCM2712-config-option.patch │ │ │ └── 0012-pci-pcie-brcmstb-HACK-add-DT-property-for-skipping-d.patch │ │ ├── rootfs-overlay │ │ ├── etc │ │ │ └── sysctl.d │ │ │ │ └── 98-rpi.conf │ │ └── usr │ │ │ └── lib │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 99-com.rules │ │ ├── rpi2 │ │ └── meta │ │ ├── rpi3-64 │ │ └── meta │ │ ├── rpi3 │ │ └── meta │ │ ├── rpi4-64 │ │ ├── meta │ │ └── uboot.config │ │ ├── rpi4 │ │ ├── meta │ │ └── uboot.config │ │ ├── rpi5-64 │ │ ├── cmdline.txt │ │ ├── config.txt │ │ ├── hassos-hook.sh │ │ ├── meta │ │ └── rootfs-overlay │ │ │ └── usr │ │ │ └── lib │ │ │ └── rauc │ │ │ ├── cmdline.sh │ │ │ └── rpi-tryboot.sh │ │ ├── uboot-boot.ush │ │ ├── uboot-boot64.ush │ │ ├── uboot.config │ │ └── yellow │ │ ├── cmdline.txt │ │ ├── config.txt │ │ ├── meta │ │ ├── patches │ │ ├── linux │ │ │ ├── 0001-ARM-dts-bcm2711-Add-device-tree-for-Home-Assistant-Y.patch │ │ │ ├── 0002-ARM-dts-bcm2711-yellow-Mux-UART4-for-SiLabs-radio-mo.patch │ │ │ ├── 0003-ARM-dts-bcm2711-yellow-Mux-debug-UART5.patch │ │ │ ├── 0004-ARM-dts-bcm2711-yellow-Enable-I2C6-by-default.patch │ │ │ ├── 0005-ARM-dts-bcm2711-yellow-add-I2S-audio-codec.patch │ │ │ ├── 0006-ARM-dts-bcm2711-yellow-enable-GPIO-keys.patch │ │ │ ├── 0007-ARM-dts-bcm2711-yellow-add-user-LED.patch │ │ │ ├── 0008-ARM-dts-bcm2711-yellow-add-NXP-PCF85063A-RTC.patch │ │ │ ├── 0009-ARM-dts-bcm2711-yellow-enable-USB-host-mode-by-defau.patch │ │ │ ├── 0010-ARM-dts-bcm2711-yellow-use-generic-activity-trigger-.patch │ │ │ ├── 0011-ARM-dts-bcm2711-yellow-use-USB-OTG-mode-by-default.patch │ │ │ ├── 0012-ARM-dts-bcm2711-yellow-Add-LED-overrides.patch │ │ │ ├── 0013-ARM-dts-bcm2711-yellow-use-serial-alias-to-enumerate.patch │ │ │ ├── 0014-ARM-dts-bcm2711-yellow-Use-mini-UART-for-Bluetooth-b.patch │ │ │ ├── 0015-ARM-dts-bcm2711-yellow-Fix-leds-node-referencing-aft.patch │ │ │ ├── 0016-ARM-dts-bcm2712-Add-device-tree-for-CM5-on-HA-Yellow.patch │ │ │ ├── 0017-ARM-dts-bcm2712-yellow-Sync-sdio1-and-sd_io_1v8_reg-.patch │ │ │ ├── 0018-ARM-dts-bcm2712-yellow-Disable-SD-SDIO-modes-on-eMMC.patch │ │ │ ├── 0019-ARM-dts-bcm2712-yellow-Disable-CQE-on-eMMC-interface.patch │ │ │ └── 0020-ARM-dts-bcm2712-yellow-Disable-rpi_rtc.patch │ │ └── uboot │ │ │ ├── 0001-drivers-bcm283x-don-t-explicitly-disable-init.patch │ │ │ └── 0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch │ │ ├── rootfs-overlay │ │ └── usr │ │ │ └── lib │ │ │ └── udev │ │ │ └── rules.d │ │ │ └── 99-com.rules │ │ ├── uboot-boot64.ush │ │ └── uboot.config ├── bootloader │ ├── mbr-part.rules │ ├── mbr-spl.img │ ├── mbr.img │ └── uboot.config ├── busybox.config ├── configs │ ├── generic_aarch64_defconfig │ ├── generic_x86_64_defconfig │ ├── green_defconfig │ ├── khadas_vim3_defconfig │ ├── odroid_c2_defconfig │ ├── odroid_c4_defconfig │ ├── odroid_m1_defconfig │ ├── odroid_m1s_defconfig │ ├── odroid_n2_defconfig │ ├── odroid_xu4_defconfig │ ├── ova_defconfig │ ├── panther_x2_defconfig │ ├── rpi2_defconfig │ ├── rpi3_64_defconfig │ ├── rpi3_defconfig │ ├── rpi4_64_defconfig │ ├── rpi4_defconfig │ ├── rpi5_64_defconfig │ ├── tinker_defconfig │ └── yellow_defconfig ├── external.desc ├── external.mk ├── genimage │ ├── genimage.cfg │ ├── hdimage-gpt.cfg │ ├── hdimage-hybrid.cfg │ ├── hdimage-mbr.cfg │ ├── image-raucb-nospl.cfg │ ├── image-raucb-spl.cfg │ ├── image-spl-nospl.cfg │ ├── images-boot.cfg │ ├── images-os.cfg │ ├── partition-gptboot-gpt.cfg │ ├── partition-gptboot-hybrid.cfg │ ├── partition-spl-nospl.cfg │ ├── partitions-os-gpt.cfg │ ├── partitions-os-hybrid.cfg │ └── partitions-os-mbr.cfg ├── kernel │ ├── v6.12.y │ │ ├── device-support-pci.config │ │ ├── device-support-wireless-pci.config │ │ ├── device-support-wireless.config │ │ ├── device-support.config │ │ ├── docker.config │ │ ├── hassos.config │ │ └── kernel-arm64-rockchip.config │ └── v6.6.y │ │ ├── device-support-pci.config │ │ ├── device-support-wireless.config │ │ ├── device-support.config │ │ ├── docker.config │ │ └── hassos.config ├── meta ├── ota │ ├── dev-ca.pem │ ├── manifest.raucm.gtpl │ ├── provisioning-ca.pem │ ├── rauc-hook │ ├── rel-ca.pem │ └── system.conf.gtpl ├── package │ ├── bluetooth-rtl8723 │ │ ├── Config.in │ │ └── bluetooth-rtl8723.mk │ ├── eq3_char_loop │ │ ├── 0001-Makefile.patch │ │ ├── 0002-version1_2.patch │ │ ├── 0003-Fix-eq3_char_loop-driver-build-on-Linux-6.4.patch │ │ ├── 0004-Fix-eq3_char_loop-driver-build-on-Linux-6.12.patch │ │ ├── Config.in │ │ ├── eq3_char_loop.hash │ │ └── eq3_char_loop.mk │ ├── firmware_ap6236 │ │ ├── Config.in │ │ └── firmware_ap6236.mk │ ├── gasket │ │ ├── 0001-linux-6.x.patch │ │ ├── Config.in │ │ └── gasket.mk │ ├── generic_raw_uart │ │ ├── 0001-kernel-Makefile.patch │ │ ├── Config.in │ │ ├── generic_raw_uart.hash │ │ └── generic_raw_uart.mk │ ├── hailo-pci │ │ ├── Config.in │ │ ├── hailo-pci.hash │ │ └── hailo-pci.mk │ ├── hailo8-firmware │ │ ├── Config.in │ │ ├── hailo8-firmware.hash │ │ └── hailo8-firmware.mk │ ├── hardkernel-boot │ │ ├── Config.in │ │ └── hardkernel-boot.mk │ ├── hassio │ │ ├── Config.in │ │ ├── create-data-partition.sh │ │ ├── dind-import-containers.sh │ │ ├── fetch-container-image.sh │ │ └── hassio.mk │ ├── khadas-boot │ │ ├── Config.in │ │ └── khadas-boot.mk │ ├── lxd-guest-agent │ │ ├── Config.in │ │ ├── lxd-agent-setup │ │ ├── lxd-agent.service │ │ └── lxd-guest-agent.mk │ ├── os-agent │ │ ├── Config.in │ │ └── os-agent.mk │ ├── pi-bluetooth │ │ ├── 0001-Fix-Bluetooth-hci0-Frame-reassembly-failed-84.patch │ │ ├── 0002-Test-if-WiFi-Bluetooth-module-is-fitted-on-Compute-M.patch │ │ ├── Config.in │ │ ├── bthelper@.service │ │ ├── hcidisable.service │ │ ├── hciuart.service │ │ └── pi-bluetooth.mk │ ├── qemu-guest-agent │ │ ├── Config.in │ │ ├── qemu-guest-agent.hash │ │ ├── qemu-guest-agent.mk │ │ └── qemu-guest.service │ ├── rockchip-blobs │ │ ├── Config.in │ │ └── rockchip-blobs.mk │ ├── rpi-eeprom │ │ ├── Config.in │ │ └── rpi-eeprom.mk │ ├── rpi-rf-mod │ │ ├── 82-rpi-rf-mod-leds.rules │ │ ├── Config.in │ │ ├── rpi-rf-mod.hash │ │ └── rpi-rf-mod.mk │ ├── rtl88x2bu │ │ ├── 0001-allow-arm-i386-external-control.patch │ │ ├── Config.in │ │ └── rtl88x2bu.mk │ ├── tempio │ │ ├── Config.in.host │ │ └── tempio.mk │ ├── udisks2 │ │ ├── 0001-Allow-to-explicitly-disable-libsystemd-login.patch │ │ ├── 0002-Isolate-authorization-specific-functions-into-new-co.patch │ │ ├── 0003-Make-polkit-dependency-optional.patch │ │ ├── Config.in │ │ ├── udisks2.hash │ │ └── udisks2.mk │ └── xe-guest-utilities │ │ ├── Config.in │ │ ├── proc-xen.mount │ │ ├── tmpfile.conf │ │ ├── xe-daemon.service │ │ └── xe-guest-utilities.mk ├── patches │ ├── genimage │ │ ├── 0001-image-hd-add-forced-primary-flag-for-higher-MBR-layo.patch │ │ └── 0002-image-hd-do-not-use-first-partition-offset-for-GPT-s.patch │ ├── grub2 │ │ ├── 0001-loadenv-add-file_env-to-load-var-from-file.patch │ │ └── 0002-loader-efi-linux-use-legacy-loader-for-broken-Intel-.patch │ ├── linux │ │ ├── 0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch │ │ └── 0002-drm-amd-Handle-being-compiled-without-SI-or-CIK-supp.patch │ ├── network-manager │ │ └── 0001-ndisc-support-multiple-gateways-for-a-single-network.patch │ ├── systemd │ │ ├── 0001-time-wait-sync-log-errors-trying-to-watch-run-system.patch │ │ ├── 0002-hostnamed-allow-hostname-change-on-read-only-etc.patch │ │ ├── 0003-systemd-timesyncd-delay-start-after-network-online.t.patch │ │ └── 0004-detect-virt-detect-hyperv-enlightened-qemu-as-qemu-n.patch │ ├── uboot-tools │ │ └── 0001-fw_printenv-use-run-as-default-location-for-lock-fil.patch │ └── uboot │ │ └── 0001-CMD-read-string-from-fileinto-env.patch ├── rootfs-overlay │ ├── etc │ │ ├── NetworkManager │ │ │ └── NetworkManager.conf │ │ ├── bluetooth │ │ │ └── main.conf │ │ ├── containerd │ │ │ └── config.toml │ │ ├── dbus-1 │ │ │ └── system.d │ │ │ │ └── pulseaudio-system.conf │ │ ├── default │ │ │ └── .empty │ │ ├── docker │ │ │ ├── .empty │ │ │ └── daemon.json │ │ ├── dropbear │ │ │ └── .empty │ │ ├── fstab │ │ ├── input-event-daemon.conf │ │ ├── modprobe.d │ │ │ └── .empty │ │ ├── modules-load.d │ │ │ └── .empty │ │ ├── motd │ │ ├── resolv.conf │ │ ├── sysctl.d │ │ │ └── .empty │ │ ├── systemd │ │ │ ├── coredump.conf │ │ │ ├── journald.conf │ │ │ ├── logind.conf │ │ │ ├── resolved.conf │ │ │ └── timesyncd.conf │ │ └── tmpfiles.d │ │ │ ├── data.conf │ │ │ ├── nm.conf │ │ │ └── overlay.conf │ ├── mnt │ │ ├── boot │ │ │ └── .empty │ │ ├── config │ │ │ └── .empty │ │ ├── data │ │ │ └── .empty │ │ └── overlay │ │ │ └── .empty │ ├── root │ │ ├── .docker │ │ │ └── .empty │ │ └── .ssh │ │ │ ├── .empty │ │ │ └── authorized_keys │ └── usr │ │ ├── bin │ │ └── ha │ │ ├── lib │ │ ├── NetworkManager │ │ │ └── dispatcher.d │ │ │ │ └── 10-ntp │ │ ├── firmware │ │ │ └── updates │ │ ├── modprobe.d │ │ │ └── alsa-base.conf │ │ ├── sysctl.d │ │ │ ├── 10-printk.conf │ │ │ ├── 15-swappiness.conf │ │ │ ├── 20-network.conf │ │ │ ├── 30-cp15barrier.conf │ │ │ ├── 60-otbr-ancillary-buffer.conf │ │ │ └── 60-otbr-ip-forward.conf │ │ ├── systemd │ │ │ ├── dnssd │ │ │ │ └── workstation.dnssd │ │ │ ├── system-preset │ │ │ │ └── 70-haos.preset │ │ │ ├── system.conf.d │ │ │ │ └── watchdog.conf │ │ │ └── system │ │ │ │ ├── NetworkManager.service.d │ │ │ │ └── hassos.conf │ │ │ │ ├── dbus-broker.service.d │ │ │ │ └── haos.conf │ │ │ │ ├── dbus.service.d │ │ │ │ └── haos.conf │ │ │ │ ├── dbus.socket.d │ │ │ │ └── haos.conf │ │ │ │ ├── docker.service.d │ │ │ │ ├── failure.conf │ │ │ │ ├── hassos.conf │ │ │ │ └── resource.conf │ │ │ │ ├── dropbear.service.d │ │ │ │ └── hassos.conf │ │ │ │ ├── etc-NetworkManager-system\x2dconnections.mount │ │ │ │ ├── etc-default.mount │ │ │ │ ├── etc-dropbear.mount │ │ │ │ ├── etc-hostname.mount │ │ │ │ ├── etc-hosts.mount │ │ │ │ ├── etc-modprobe.d.mount │ │ │ │ ├── etc-modules\x2dload.d.mount │ │ │ │ ├── etc-sysctl.d.mount │ │ │ │ ├── etc-systemd-timesyncd.conf.mount │ │ │ │ ├── etc-udev-rules.d.mount │ │ │ │ ├── etc-usb_modeswitch.d.mount │ │ │ │ ├── ha-cli@.service │ │ │ │ ├── ha-cli@.service.d │ │ │ │ └── haos.conf │ │ │ │ ├── haos-agent.service.d │ │ │ │ └── haos.conf │ │ │ │ ├── haos-bt-cache.service │ │ │ │ ├── haos-bt-cache.timer │ │ │ │ ├── haos-data-disk-detach.service │ │ │ │ ├── haos-mglru.service │ │ │ │ ├── haos-swapfile.service │ │ │ │ ├── haos-wipe.service │ │ │ │ ├── hassos-apparmor.service │ │ │ │ ├── hassos-bind.target │ │ │ │ ├── hassos-config.service │ │ │ │ ├── hassos-data.service │ │ │ │ ├── hassos-expand.service │ │ │ │ ├── hassos-hardware.target │ │ │ │ ├── hassos-overlay.service │ │ │ │ ├── hassos-persists.service │ │ │ │ ├── hassos-supervisor.service │ │ │ │ ├── hassos-user-rules-udev-trigger.service │ │ │ │ ├── hassos-zram.target │ │ │ │ ├── mnt-boot.mount │ │ │ │ ├── mnt-config.mount │ │ │ │ ├── mnt-data-swapfile.swap │ │ │ │ ├── mnt-data.mount │ │ │ │ ├── mnt-overlay.mount │ │ │ │ ├── qemu-guest.service.d │ │ │ │ └── haos.conf │ │ │ │ ├── raucdb-migrate.service │ │ │ │ ├── raucdb-update.service │ │ │ │ ├── root-.docker.mount │ │ │ │ ├── root-.ssh.mount │ │ │ │ ├── rpcbind.service.d │ │ │ │ └── haos.conf │ │ │ │ ├── run-docker-.mount.d │ │ │ │ └── 10-reduce-verbosity.conf │ │ │ │ ├── serial-getty@.service.d │ │ │ │ └── hassos.conf │ │ │ │ ├── systemd-growfs@.service │ │ │ │ ├── systemd-journal-gatewayd.socket │ │ │ │ ├── systemd-modules-load.service.d │ │ │ │ └── hassos.conf │ │ │ │ ├── systemd-time-wait-sync.service.d │ │ │ │ ├── network-online.conf │ │ │ │ └── timeout.conf │ │ │ │ ├── systemd-timesyncd.service.d │ │ │ │ ├── hassos.conf │ │ │ │ └── ro.conf │ │ │ │ ├── tmp.mount.d │ │ │ │ └── zram.conf │ │ │ │ ├── udisks2.service.d │ │ │ │ └── haos.conf │ │ │ │ ├── udisks2.socket.d │ │ │ │ └── haos.conf │ │ │ │ ├── var-lib-NetworkManager.mount │ │ │ │ ├── var-lib-bluetooth.mount │ │ │ │ ├── var-lib-docker.mount │ │ │ │ ├── var-lib-systemd.mount │ │ │ │ ├── var-log-journal.mount │ │ │ │ ├── var.mount │ │ │ │ ├── zram-tmp.service │ │ │ │ └── zram-var.service │ │ └── udev │ │ │ └── rules.d │ │ │ └── 80-hotplug-cpu.rules │ │ ├── libexec │ │ ├── docker-disk-check │ │ ├── docker-failure │ │ ├── haos-data-disk-detach │ │ ├── haos-freeze-hook │ │ ├── haos-swapfile │ │ ├── haos-wipe │ │ ├── hassos-apparmor │ │ ├── hassos-data │ │ ├── hassos-expand │ │ ├── hassos-overlay │ │ ├── hassos-persists │ │ ├── hassos-zram │ │ └── raucdb-update │ │ └── sbin │ │ ├── hassos-cli │ │ ├── hassos-config │ │ └── hassos-supervisor └── scripts │ ├── check-dotconfig.py │ ├── generate-signing-key.sh │ ├── hdd-image.sh │ ├── kconfiglib.py │ ├── name.sh │ ├── post-build.sh │ ├── post-image.sh │ ├── rauc.sh │ └── rootfs-layer.sh ├── scripts ├── check-kernel-patches.sh ├── enter.sh ├── entry.sh ├── update-dtb.sh ├── update-firmware-rpi.sh ├── update-kernel-rpi.sh └── update-kernel-upstream.sh └── tests ├── .gitignore ├── conftest.py ├── pytest.ini ├── qemu-strategy.yaml ├── qemu_shell_strategy.py ├── requirements.txt ├── run_tests.sh ├── smoke_test ├── test_basic.py └── test_offline.py └── supervisor_test └── test_supervisor.py /.dockerignore: -------------------------------------------------------------------------------- 1 | # Ignore everything except what we really need 2 | * 3 | !scripts/ 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Report incorrect or missing information on our documentation 4 | url: https://github.com/home-assistant/home-assistant.io/issues 5 | about: Our documentation has its own issue tracker. Please report issues with the website there. 6 | 7 | - name: Report incorrect or missing information on our developer documentation 8 | url: https://github.com/home-assistant/developers.home-assistant/issues 9 | about: Our developer documentation has its own issue tracker. Please report issues with the website there. 10 | 11 | - name: Request a feature for the Operating System 12 | url: https://community.home-assistant.io/c/feature-requests 13 | about: Request an new feature for the Operating System. 14 | 15 | - name: I have a question or need support 16 | url: https://www.home-assistant.io/help 17 | about: We use GitHub for tracking bugs, check our website for resources on getting help. 18 | 19 | - name: I'm unsure where to go? 20 | url: https://www.home-assistant.io/join-chat 21 | about: If you are unsure where to go, then joining our chat is recommended; Just ask! 22 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name-template: Home Assistant OS $RESOLVED_VERSION 2 | tag-template: $RESOLVED_VERSION 3 | version-template: "$MAJOR.$MINOR" 4 | categories: 5 | - title: 'Home Assistant Operating System' 6 | label: 'os' 7 | - title: 'Raspberry Pi' 8 | label: 'board/raspberrypi' 9 | - title: 'Home Assistant Yellow' 10 | label: 'board/yellow' 11 | - title: 'Home Assistant Green' 12 | label: 'board/green' 13 | - title: 'Open Virtual Appliance' 14 | label: 'board/ova' 15 | - title: 'Generic x86-64' 16 | label: 'board/generic-x86-64' 17 | - title: 'Hardkernel ODROID' 18 | label: 'board/odroid' 19 | - title: 'ASUS Tinker' 20 | label: 'board/tinker' 21 | - title: 'Khadas VIM Series' 22 | label: 'board/khadas' 23 | - title: 'Generic aarch64' 24 | label: 'board/generic-aarch64' 25 | - title: 'Documentation' 26 | label: 'documentation' 27 | - title: 'Build System' 28 | label: 'build' 29 | - title: 'Dependencies' 30 | label: 'dependencies' 31 | filter-by-commitish: true 32 | template: | 33 | ## Changes 34 | 35 | $CHANGES 36 | version-resolver: 37 | major: 38 | labels: 39 | - 'major' 40 | default: minor 41 | -------------------------------------------------------------------------------- /.github/workflows/lock.yml: -------------------------------------------------------------------------------- 1 | name: Lock 2 | 3 | on: 4 | schedule: 5 | - cron: "45 5 * * *" 6 | 7 | permissions: 8 | discussions: write 9 | issues: write 10 | pull-requests: write 11 | 12 | jobs: 13 | lock: 14 | if: github.repository_owner == 'home-assistant' 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: dessant/lock-threads@v5.0.1 18 | with: 19 | github-token: ${{ github.token }} 20 | issue-inactive-days: "30" 21 | exclude-issue-created-before: "2025-01-01T00:00:00Z" 22 | issue-lock-reason: "" 23 | pr-inactive-days: "7" 24 | exclude-pr-created-before: "2025-01-01T00:00:00Z" 25 | pr-lock-reason: "" 26 | -------------------------------------------------------------------------------- /.github/workflows/matrix.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "panther-x2", 4 | "defconfig": "panther_x2", 5 | "architecture": "aarch64", 6 | "label": "board/panther-x2" 7 | } 8 | ] 9 | -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | 3 | on: 4 | push: 5 | branches: 6 | - dev 7 | - rel-* 8 | 9 | jobs: 10 | update_release_draft: 11 | permissions: 12 | contents: write # for release-drafter/release-drafter to create a github release 13 | pull-requests: read # for release-drafter/release-drafter to read PR content and labels 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: release-drafter/release-drafter@v6 17 | env: 18 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS generated files 2 | .DS_Store 3 | 4 | # Build output dirs 5 | /release 6 | output*/ 7 | 8 | # Certificates 9 | *.pem 10 | 11 | # vscode generated files 12 | .vscode* 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "buildroot"] 2 | path = buildroot 3 | url = https://github.com/home-assistant/buildroot.git 4 | branch = 2024.02.x-haos 5 | -------------------------------------------------------------------------------- /.hadolint.yaml: -------------------------------------------------------------------------------- 1 | ignored: 2 | - DL3008 3 | -------------------------------------------------------------------------------- /Documentation/README.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | ## Contents 4 | 5 | - [Configuration](./configuration.md) - how users can configure HAOS 6 | - [Network](./network.md) - approach to networking 7 | - [Bluetooth](./bluetooth.md) - approach to bluetooth 8 | - [Kernel](./kernel.md) - kernel versions 9 | - [Boards](./boards/README.md) - board specific documentation 10 | -------------------------------------------------------------------------------- /Documentation/bluetooth.md: -------------------------------------------------------------------------------- 1 | # Bluetooth 2 | 3 | We support `bluetoothctl` on the host. Later we want to support Bluetooth through the UI. 4 | All pairs and settings are persistent over reboots and updates. 5 | 6 | If you want to setup Bluetooth on the host, use the `bluetoothctl` utility. 7 | 8 | ## Scan devices 9 | 10 | ``` 11 | [bluetooth]# scan on 12 | ``` 13 | -------------------------------------------------------------------------------- /Documentation/boards/generic-aarch64/README.md: -------------------------------------------------------------------------------- 1 | # Generic aarch64 2 | 3 | ## Supported Hardware 4 | 5 | This board configuration aims to support most aarch64 systems with UEFI boot 6 | Hardware it has been tested with is listed below. 7 | 8 | ## Tested Hardware 9 | 10 | | Device | Release Date | Support | Config | 11 | |-----------------------|--------------|---------|-------------| 12 | | QEMU | QEMU | yes | [generic_aarch64](../../../buildroot-external/configs/generic_aarch64_defconfig) | 13 | 14 | 15 | ## Requirements 16 | 17 | - aarch64 support 18 | - UEFI boot 19 | 20 | ## Wifi 21 | 22 | WiFi is untested. 23 | 24 | ## Bluetooth 25 | 26 | Bluetooth is untested. 27 | 28 | ## Installation 29 | 30 | Make sure secure boot is disabled in the UEFI BIOS settings. 31 | 32 | Currently there is no shiny installation method. Checklist: 33 | - Boot PC to live environment using PXE or USB 34 | - Copy or download the Home Assistant OS image into your live environment 35 | - unxz the image and dd to the local hard disk 36 | - Reboot 37 | -------------------------------------------------------------------------------- /Documentation/boards/hardkernel/odroid-c2.md: -------------------------------------------------------------------------------- 1 | # ODROID-C2 2 | 3 | ## eMMC 4 | 5 | eMMC support is provided transparently. Just flash the image to the eMMC board as you would an SD card. 6 | 7 | ## Console 8 | 9 | By default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the AML0 console if you don't plan on using the serial adapter. 10 | eg. `console=ttyAML0,115200n8 console=tty0` 11 | 12 | ## USB 13 | 14 | A long-standing kernel bug currently results in some odd behavior. To use the USB, a device must be plugged into one of the USB ports at hard boot. If all devices are removed from the USB ports, the USB will cease to function until a reboot. 15 | 16 | ### OTG 17 | 18 | The OTG USB is untested. 19 | 20 | ## GPIO 21 | 22 | Refer to [the odroid wiki](https://wiki.odroid.com/odroid-c2/hardware/expansion_connectors). 23 | -------------------------------------------------------------------------------- /Documentation/boards/hardkernel/odroid-c4.md: -------------------------------------------------------------------------------- 1 | # ODROID-C4 2 | 3 | ## Experimental 4 | 5 | ODROID-C4 support is based heavily on the Odroid-C2 and N2 configurations. Given the similarity of the SoCs, as well as the comparable level of support in the Linux kernel, the C4 should hopefully present few surprises. However, Home Assistant support should be regarded as experimental. 6 | 7 | Please also refer to the documentation pages for the [ODROID-C2](./odroid-c2.md) and [Odroid-N2](./odroid-n2.md), as some of that information may apply to the C4 as well. 8 | 9 | Common C4 issues that have been specifically tested and appear to be working: 10 | - boot from SD 11 | - boot from eMMC 12 | - MAC address obtained from eFuse 13 | 14 | ## GPIO 15 | 16 | Refer to [the odroid wiki](https://wiki.odroid.com/odroid-c4/hardware/expansion_connectors). 17 | -------------------------------------------------------------------------------- /Documentation/boards/hardkernel/odroid-n2.md: -------------------------------------------------------------------------------- 1 | # ODROID-N2 2 | 3 | ## eMMC 4 | 5 | eMMC support is provided transparently. Just flash the image to the eMMC board as you would an SD card. 6 | 7 | ## Console 8 | 9 | By default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the AML0 console if you don't plan on using the serial adapter. 10 | eg. `console=ttyAML0,115200n8 console=tty0` 11 | 12 | ## GPIO 13 | 14 | Refer to [the odroid wiki](https://wiki.odroid.com/odroid-n2/hardware/expansion_connectors). 15 | At this point not all functionality is supported by the upstream kernel used 16 | by Home Assistant OS. 17 | 18 | The GPIO on pin 11 is used as a low active power button input. 19 | -------------------------------------------------------------------------------- /Documentation/boards/ova/README.md: -------------------------------------------------------------------------------- 1 | # Virtual Machine 2 | 3 | ## Supported Hypervisors 4 | 5 | | Hypervisor | Vendor | Support | Config | 6 | |---------------------|-----------|-----------------|--------------------| 7 | | HyperV | Microsoft | yes, via VMDK | [ova](../../../buildroot-external/configs/ova_defconfig) | 8 | | VirtualBox | Oracle | yes, via VMDK | [ova](../../../buildroot-external/configs/ova_defconfig) | 9 | | VMware | VMware | yes, via VMDK | [ova](../../../buildroot-external/configs/ova_defconfig) | 10 | 11 | Currently we only publish a VMDK virtual disk due to issues with our previous OVA distribution. We are investigating our options to bring back the OVA distribution, however, the VMDK works for the hypervisors listed above. 12 | 13 | ## Requirements 14 | 15 | Using this VMDK in a virtual machine requires the following: 16 | 17 | - Operating system: Other 4.x or later Linux (64-bit) 18 | - Enabled support for UEFI boot 19 | - SATA disk controller 20 | - Minimal of 1GB RAM 21 | - At least 2x vCPU 22 | - An assigned network 23 | -------------------------------------------------------------------------------- /Documentation/kernel.md: -------------------------------------------------------------------------------- 1 | 2 | # Kernel Version 3 | 4 | | Board | Version | 5 | |-------|---------| 6 | | Open Virtual Appliance | 6.12.23 | 7 | | Raspberry Pi | 6.6.74 | 8 | | Raspberry Pi 0-W | 6.6.74 | 9 | | Raspberry Pi 2 | 6.6.74 | 10 | | Raspberry Pi 3 | 6.6.74 | 11 | | Raspberry Pi 4 | 6.6.74 | 12 | | Raspberry Pi 5 | 6.6.74 | 13 | | Home Assistant Yellow | 6.6.74 | 14 | | Home Assistant Green | 6.12.23 | 15 | | Tinker Board | 6.12.23 | 16 | | ODROID-C2 | 6.12.23 | 17 | | ODROID-C4 | 6.12.23 | 18 | | ODROID-M1 | 6.12.23 | 19 | | ODROID-M1S | 6.12.23 | 20 | | ODROID-N2 | 6.12.23 | 21 | | ODROID-XU4 | 6.12.23 | 22 | | Generic aarch64 | 6.12.23 | 23 | | Generic x86-64 | 6.12.23 | 24 | | Khadas VIM3 | 6.12.23 | 25 | -------------------------------------------------------------------------------- /Documentation/usb-disk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/Documentation/usb-disk.png -------------------------------------------------------------------------------- /buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=ttyS0 console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/arm-uefi/generic-aarch64/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | local EFIPART_DATA="${BINARIES_DIR}/efi-part" 7 | 8 | mkdir -p "${BOOT_DATA}/EFI/BOOT" 9 | 10 | cp "${BOARD_DIR}/grub.cfg" "${EFIPART_DATA}/EFI/BOOT/grub.cfg" 11 | cp "${BOARD_DIR}/cmdline.txt" "${EFIPART_DATA}/cmdline.txt" 12 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" create 13 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set ORDER="A B" 14 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set A_OK=1 15 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set A_TRY=0 16 | 17 | cp -r "${EFIPART_DATA}/"* "${BOOT_DATA}/" 18 | } 19 | 20 | 21 | function hassos_post_image() { 22 | convert_disk_image_virtual vmdk 23 | convert_disk_image_virtual qcow2 24 | 25 | convert_disk_image_zip vmdk 26 | convert_disk_image_xz qcow2 27 | 28 | convert_disk_image_xz 29 | } 30 | -------------------------------------------------------------------------------- /buildroot-external/board/arm-uefi/generic-aarch64/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=generic-aarch64 2 | BOARD_NAME="Generic aarch64" 3 | CHASSIS=embedded 4 | BOOTLOADER=grub 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=gpt 7 | BOOT_SIZE=32M 8 | BOOT_SPL=false 9 | DISK_SIZE=6G 10 | SUPERVISOR_MACHINE=qemuarm-64 11 | SUPERVISOR_ARCH=aarch64 12 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp -t "${BOOT_DATA}" \ 8 | "${BINARIES_DIR}/boot.scr" \ 9 | "${BINARIES_DIR}/rk3288-tinker.dtb" \ 10 | "${BINARIES_DIR}/rk3288-tinker-s.dtb" 11 | 12 | mkdir -p "${BOOT_DATA}/overlays" 13 | cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" 14 | cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" 15 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 16 | } 17 | 18 | 19 | function hassos_post_image() { 20 | convert_disk_image_xz 21 | } 22 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/boot-env.txt: -------------------------------------------------------------------------------- 1 | # Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB 2 | #overlays=rpi-rf-mod 3 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | hdimage { 5 | partition-table-type = "none" 6 | fill = "yes" 7 | } 8 | 9 | partition uboot { 10 | offset = 32k 11 | image = "u-boot-rockchip.bin" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=tinker 2 | BOARD_NAME="Asus TinkerBoard" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=zImage 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=24M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=8M 10 | BOOT_ENV_SIZE=0x8000 11 | SUPERVISOR_MACHINE=tinker 12 | SUPERVISOR_ARCH=armv7 13 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(0; 17k)"} 7 | } 8 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/patches/README.md: -------------------------------------------------------------------------------- 1 | ## Kernel 2 | https://github.com/armbian/build/tree/master/patch/kernel/rockchip-next 3 | 4 | ## u-boot 5 | https://github.com/armbian/build/tree/master/patch/u-boot/u-boot-rockchip/board_tinkerboard 6 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/patches/linux/0003-ARM-dts-rockchip-enable-I2C1-4-on-rk3288-tinker.patch: -------------------------------------------------------------------------------- 1 | From 1a15fc7f6a241895a31b00c1f324d358d408a610 Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Fri, 4 Sep 2020 21:57:55 +0200 4 | Subject: [PATCH] ARM: dts: rockchip: enable I2C1/4 on rk3288-tinker 5 | 6 | Enable I2C devices which are accessible via 40-pin header. 7 | 8 | Signed-off-by: Stefan Agner 9 | --- 10 | arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 8 ++++++++ 11 | 1 file changed, 8 insertions(+) 12 | 13 | diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi 14 | index 30430d2e64b93..395afc2b2283c 100644 15 | --- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi 16 | +++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi 17 | @@ -342,10 +342,18 @@ regulator-state-mem { 18 | }; 19 | }; 20 | 21 | +&i2c1 { 22 | + status = "okay"; 23 | +}; 24 | + 25 | &i2c2 { 26 | status = "okay"; 27 | }; 28 | 29 | +&i2c4 { 30 | + status = "okay"; 31 | +}; 32 | + 33 | &i2c5 { 34 | status = "okay"; 35 | }; 36 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/patches/linux/0004-RK3288-DTSI-rk3288.dtsi-Add-missing-SPI2-pinctrl.patch: -------------------------------------------------------------------------------- 1 | From d6c44c231fc4518ad69bb7870a193bb10c563f2a Mon Sep 17 00:00:00 2001 2 | From: Myy Miouyouyou 3 | Date: Thu, 19 Oct 2017 21:24:47 +0200 4 | Subject: [PATCH] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl 5 | 6 | The spi2_cs1 pin reference is missing in the spi2 first pin control 7 | definition. 8 | 9 | This patch is taken from the patches provided by the ARMbian team. 10 | 11 | Signed-off-by: Myy Miouyouyou 12 | --- 13 | arch/arm/boot/dts/rockchip/rk3288.dtsi | 2 +- 14 | 1 file changed, 1 insertion(+), 1 deletion(-) 15 | 16 | diff --git a/arch/arm/boot/dts/rockchip/rk3288.dtsi b/arch/arm/boot/dts/rockchip/rk3288.dtsi 17 | index becf3abd8367f..e78fa883b9841 100644 18 | --- a/arch/arm/boot/dts/rockchip/rk3288.dtsi 19 | +++ b/arch/arm/boot/dts/rockchip/rk3288.dtsi 20 | @@ -320,7 +320,7 @@ spi2: spi@ff130000 { 21 | dma-names = "tx", "rx"; 22 | interrupts = ; 23 | pinctrl-names = "default"; 24 | - pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>; 25 | + pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0 &spi2_cs1>; 26 | reg = <0x0 0xff130000 0x0 0x1000>; 27 | #address-cells = <1>; 28 | #size-cells = <0>; 29 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/patches/linux/0005-ARM-DTSI-rk3288-tinker-Improving-the-CPU-max-voltage.patch: -------------------------------------------------------------------------------- 1 | From dfb0232e9fae1267d04247aaf171739038c1659e Mon Sep 17 00:00:00 2001 2 | From: "Miouyouyou (Myy)" 3 | Date: Mon, 5 Nov 2018 20:16:05 +0100 4 | Subject: [PATCH] ARM: DTSI: rk3288-tinker: Improving the CPU max voltage 5 | 6 | Taken from the various patches provided by @TonyMac32 . 7 | 8 | Signed-off-by: Miouyouyou (Myy) 9 | --- 10 | arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi | 2 +- 11 | 1 file changed, 1 insertion(+), 1 deletion(-) 12 | 13 | diff --git a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi 14 | index 395afc2b2283c..c7e79e5947206 100644 15 | --- a/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi 16 | +++ b/arch/arm/boot/dts/rockchip/rk3288-tinker.dtsi 17 | @@ -184,7 +184,7 @@ vdd_cpu: DCDC_REG1 { 18 | regulator-always-on; 19 | regulator-boot-on; 20 | regulator-min-microvolt = <750000>; 21 | - regulator-max-microvolt = <1400000>; 22 | + regulator-max-microvolt = <1450000>; 23 | regulator-name = "vdd_arm"; 24 | regulator-ramp-delay = <6000>; 25 | regulator-state-mem { 26 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/patches/linux/0008-usb-audio-add-ASUS-TinkerBoard-s-ALC4040.patch: -------------------------------------------------------------------------------- 1 | From eb29ab60a69353f355b3af58b06fff1a89d17992 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= 3 | Date: Wed, 10 Jan 2024 16:29:59 +0100 4 | Subject: [PATCH] usb-audio: add ASUS TinkerBoard's ALC4040 5 | 6 | Converted to git-series patch from the original plain git diff file 7 | buildroot-external/board/asus/tinker/patches/linux/3001_Tinkerboard-4.19-audio.patch 8 | 9 | Co-authored-by: Pascal Vizeli 10 | --- 11 | sound/usb/card.c | 8 ++++++++ 12 | 1 file changed, 8 insertions(+) 13 | 14 | diff --git a/sound/usb/card.c b/sound/usb/card.c 15 | index 9c411b82a218d..672136e25c81d 100644 16 | --- a/sound/usb/card.c 17 | +++ b/sound/usb/card.c 18 | @@ -533,6 +533,14 @@ static void usb_audio_make_shortname(struct usb_device *dev, 19 | } 20 | 21 | strim(card->shortname); 22 | + 23 | + /* Tinker Board ALC4040 CODEC */ 24 | + 25 | + if(USB_ID_VENDOR(chip->usb_id) == 0x0bda && 26 | + USB_ID_PRODUCT(chip->usb_id) == 0x481a) { 27 | + strlcat(card->shortname, " OnBoard", sizeof(card->shortname)); 28 | + } 29 | + 30 | } 31 | 32 | static void usb_audio_make_longname(struct usb_device *dev, 33 | -------------------------------------------------------------------------------- /buildroot-external/board/asus/tinker/uboot.config: -------------------------------------------------------------------------------- 1 | # CONFIG_USB_STORAGE is not set 2 | # CONFIG_DOS_PARTITION is not set 3 | CONFIG_OF_LIBFDT_OVERLAY=y 4 | CONFIG_SPL_PAD_TO=0x3f8000 5 | CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000 6 | # CONFIG_ENV_IS_IN_MMC is not set 7 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c2/boot-env.txt: -------------------------------------------------------------------------------- 1 | # Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB 2 | #overlays=rpi-rf-mod 3 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c2/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=ttyAML0,115200n8 console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c2/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" 8 | cp "${BINARIES_DIR}/meson-gxbb-odroidc2.dtb" "${BOOT_DATA}/meson-gxbb-odroidc2.dtb" 9 | 10 | mkdir -p "${BOOT_DATA}/overlays" 11 | cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" 12 | cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" 13 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 14 | } 15 | 16 | 17 | function hassos_post_image() { 18 | convert_disk_image_xz 19 | } 20 | 21 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c2/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | hdimage { 5 | partition-table-type = "none" 6 | fill = "yes" 7 | } 8 | 9 | partition bl1 { 10 | in-partition-table = "no" 11 | image = "bl1.bin.hardkernel" 12 | offset = 0 13 | } 14 | 15 | partition u-boot { 16 | in-partition-table = "no" 17 | image = "u-boot.gxbb" 18 | offset = 97s 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c2/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=odroid-c2 2 | BOARD_NAME="Hardkernel ODROID-C2" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=mbr 7 | BOOT_SIZE=24M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=8M 10 | BOOT_ENV_SIZE=0x2000 11 | SUPERVISOR_MACHINE=odroid-c2 12 | SUPERVISOR_ARCH=aarch64 13 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c2/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(440; 512)"} 7 | } 8 | 9 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c2/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_DOS_PARTITION=y 2 | # CONFIG_EFI_PARTITION is not set 3 | # CONFIG_USB_STORAGE is not set 4 | CONFIG_DISPLAY_BOARDINFO=y 5 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c4/boot-env.txt: -------------------------------------------------------------------------------- 1 | # Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB 2 | #overlays=rpi-rf-mod 3 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c4/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=ttyAML0,115200n8 console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c4/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" 8 | cp "${BINARIES_DIR}/meson-sm1-odroid-c4.dtb" "${BOOT_DATA}/meson-sm1-odroid-c4.dtb" 9 | 10 | mkdir -p "${BOOT_DATA}/overlays" 11 | cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" 12 | cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" 13 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 14 | } 15 | 16 | 17 | function hassos_post_image() { 18 | convert_disk_image_xz 19 | } 20 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c4/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | hdimage { 5 | partition-table-type = "none" 6 | fill = "yes" 7 | } 8 | 9 | partition uboot { 10 | offset = 512 11 | image = "u-boot.sm1" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c4/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=odroid-c4 2 | BOARD_NAME="Hardkernel ODROID-C4" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=mbr 7 | BOOT_SIZE=24M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=8M 10 | BOOT_ENV_SIZE=0x2000 11 | SUPERVISOR_MACHINE=odroid-c4 12 | SUPERVISOR_ARCH=aarch64 13 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c4/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(0; 512)"} 7 | } 8 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-c4/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_DOS_PARTITION=y 2 | # CONFIG_EFI_PARTITION is not set 3 | # CONFIG_USB_STORAGE is not set 4 | CONFIG_DISPLAY_BOARDINFO=y 5 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1/boot-env.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/board/hardkernel/odroid-m1/boot-env.txt -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" 8 | cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" 9 | 10 | cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" 11 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 12 | } 13 | 14 | 15 | function hassos_post_image() { 16 | convert_disk_image_xz 17 | } 18 | 19 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | hdimage { 5 | partition-table-type = "none" 6 | fill = "yes" 7 | } 8 | 9 | partition uboot { 10 | offset = 32k 11 | image = "u-boot-rockchip.bin" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1/kernel.config: -------------------------------------------------------------------------------- 1 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 2 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 3 | 4 | CONFIG_THERMAL_GOV_BANG_BANG=y 5 | CONFIG_SENSORS_GPIO_FAN=y 6 | 7 | CONFIG_KEYBOARD_GPIO=y 8 | CONFIG_KEYBOARD_GPIO_POLLED=y 9 | 10 | CONFIG_MMC_SDHCI_OF_DWCMSHC=y 11 | 12 | # CONFIG_DW_WATCHDOG is not set 13 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=odroid-m1 2 | BOARD_NAME="Hardkernel ODROID-M1" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=16M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=16M 10 | BOOT_ENV_SIZE=0x8000 11 | SUPERVISOR_MACHINE=odroid-m1 12 | SUPERVISOR_ARCH=aarch64 13 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(0; 17k)", "(8M; 16M)"} 7 | } 8 | 9 | partition uboot { 10 | size = 8M 11 | offset = 8M 12 | # FIXME: hdd-image intended to use the following, but the next one 13 | # is in the img because of the _fix_disk_spl_gpt function 14 | # partition-type-uuid = "21686148-6449-6e6f-744e-656564454649" 15 | partition-type-uuid = "e3c9e316-0b5c-4db8-817d-f92df00215ae" 16 | # no image here - already contains data from spl.img 17 | } 18 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1/uboot.config: -------------------------------------------------------------------------------- 1 | # CONFIG_DWC_ETH_QOS is not set 2 | # CONFIG_DWC_ETH_QOS_ROCKCHIP is not set 3 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1s/boot-env.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/board/hardkernel/odroid-m1s/boot-env.txt -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1s/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" 8 | cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" 9 | 10 | cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" 11 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 12 | } 13 | 14 | 15 | function hassos_post_image() { 16 | convert_disk_image_xz 17 | } 18 | 19 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1s/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | hdimage { 5 | partition-table-type = "none" 6 | fill = "yes" 7 | } 8 | 9 | partition uboot { 10 | offset = 32k 11 | image = "u-boot-rockchip.bin" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1s/kernel.config: -------------------------------------------------------------------------------- 1 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 2 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 3 | 4 | CONFIG_THERMAL_GOV_BANG_BANG=y 5 | CONFIG_SENSORS_GPIO_FAN=y 6 | 7 | CONFIG_KEYBOARD_GPIO=y 8 | CONFIG_KEYBOARD_GPIO_POLLED=y 9 | 10 | CONFIG_MMC_SDHCI_OF_DWCMSHC=y 11 | 12 | # CONFIG_DW_WATCHDOG is not set 13 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1s/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=odroid-m1s 2 | BOARD_NAME="Hardkernel ODROID-M1S" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=16M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=16M 10 | BOOT_ENV_SIZE=0x8000 11 | SUPERVISOR_MACHINE=odroid-m1 12 | SUPERVISOR_ARCH=aarch64 13 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1s/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(0; 17k)", "(8M; 16M)"} 7 | } 8 | 9 | partition uboot { 10 | size = 8M 11 | offset = 8M 12 | # FIXME: hdd-image intended to use the following, but the next one 13 | # is in the img because of the _fix_disk_spl_gpt function 14 | # partition-type-uuid = "21686148-6449-6e6f-744e-656564454649" 15 | partition-type-uuid = "e3c9e316-0b5c-4db8-817d-f92df00215ae" 16 | # no image here - already contains data from spl.img 17 | } 18 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1s/patches/linux/0001-arm64-dts-rockchip-Enable-Rockchip-TRNG-on-ODROID-M1.patch: -------------------------------------------------------------------------------- 1 | From 60b24f8c30181ef60964ce186c2a6d05b85f3be1 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= 3 | Date: Fri, 31 Jan 2025 16:13:48 +0100 4 | Subject: [PATCH] arm64: dts: rockchip: Enable Rockchip TRNG on ODROID-M1S 5 | MIME-Version: 1.0 6 | Content-Type: text/plain; charset=UTF-8 7 | Content-Transfer-Encoding: 8bit 8 | 9 | HAOS with 6.6 kernel had the RNG disbled because of a downstream patch. Now the 10 | rk356x.dtsi has it's enabled only in rk3568.dtsi. We want it enabled also for 11 | RK3566 on ODROID-M1S. 12 | 13 | Signed-off-by: Jan Čermák 14 | --- 15 | arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts | 4 ++++ 16 | 1 file changed, 4 insertions(+) 17 | 18 | diff --git a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts 19 | index 33bc5249d729b..a0d912b5ce4aa 100644 20 | --- a/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts 21 | +++ b/arch/arm64/boot/dts/rockchip/rk3566-odroid-m1s.dts 22 | @@ -551,6 +551,10 @@ &pmu_io_domains { 23 | status = "okay"; 24 | }; 25 | 26 | +&rng { 27 | + status = "okay"; 28 | +}; 29 | + 30 | &saradc { 31 | vref-supply = <&vcca_1v8>; 32 | status = "okay"; 33 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-m1s/uboot.config: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-n2/boot-env.txt: -------------------------------------------------------------------------------- 1 | # Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB 2 | #overlays=rpi-rf-mod 3 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-n2/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=ttyAML0,115200n8 console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-n2/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" 8 | cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" 9 | 10 | mkdir -p "${BOOT_DATA}/overlays" 11 | cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" 12 | cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" 13 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 14 | } 15 | 16 | 17 | function hassos_post_image() { 18 | convert_disk_image_xz 19 | } 20 | 21 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-n2/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | hdimage { 5 | partition-table-type = "none" 6 | fill = "yes" 7 | } 8 | 9 | partition uboot { 10 | offset = 512 11 | image = "u-boot.g12b" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-n2/kernel.config: -------------------------------------------------------------------------------- 1 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 2 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 3 | 4 | CONFIG_THERMAL_GOV_BANG_BANG=y 5 | CONFIG_SENSORS_GPIO_FAN=y 6 | 7 | CONFIG_KEYBOARD_GPIO=y 8 | CONFIG_KEYBOARD_GPIO_POLLED=y 9 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-n2/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=odroid-n2 2 | BOARD_NAME="Hardkernel ODROID-N2" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=mbr 7 | BOOT_SIZE=24M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=8M 10 | BOOT_ENV_SIZE=0x2000 11 | SUPERVISOR_MACHINE=odroid-n2 12 | SUPERVISOR_ARCH=aarch64 13 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-n2/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(0; 512)"} 7 | } 8 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-n2/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_DOS_PARTITION=y 2 | # CONFIG_EFI_PARTITION is not set 3 | # CONFIG_USB_STORAGE is not set 4 | CONFIG_DISPLAY_BOARDINFO=y 5 | CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y 6 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=ttySAC2,115200 console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-xu4/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" 8 | cp "${BINARIES_DIR}/exynos5422-odroidxu4.dtb" "${BOOT_DATA}/exynos5422-odroidxu4.dtb" 9 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 10 | } 11 | 12 | 13 | function hassos_post_image() { 14 | convert_disk_image_xz 15 | } 16 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-xu4/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | hdimage { 5 | partition-table-type = "none" 6 | fill = "yes" 7 | } 8 | 9 | partition 0 { 10 | size = 512 11 | fill = "yes" 12 | } 13 | 14 | partition bl1 { 15 | image = "bl1.bin.hardkernel" 16 | holes = {"(15360; 15616)"} # last 256 bytes are overwritten by bl2 17 | } 18 | 19 | partition bl2 { 20 | offset = 31s 21 | image = "bl2.bin.hardkernel.720k_uboot" 22 | } 23 | 24 | partition uboot { 25 | offset = 63s 26 | image = "u-boot.bin" 27 | } 28 | 29 | partition tzsw { 30 | offset = 1503s 31 | image = "tzsw.bin.hardkernel" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-xu4/kernel.config: -------------------------------------------------------------------------------- 1 | CONFIG_KERNEL_LZ4=y 2 | # CONFIG_KERNEL_GZIP is not set 3 | 4 | # CONFIG_S3C2410_WATCHDOG is not set 5 | 6 | # CONFIG_PROVE_LOCKING is not set 7 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-xu4/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=odroid-xu4 2 | BOARD_NAME="Hardkernel ODROID-XU4" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=zImage 6 | PARTITION_TABLE_TYPE=mbr 7 | BOOT_SIZE=24M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=8M 10 | BOOT_ENV_SIZE=0x4000 11 | SUPERVISOR_MACHINE=odroid-xu 12 | SUPERVISOR_ARCH=armv7 13 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-xu4/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(440; 512)"} 7 | } 8 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/odroid-xu4/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_DOS_PARTITION=y 2 | # CONFIG_EFI_PARTITION is not set 3 | # CONFIG_USB_STORAGE is not set 4 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/patches/linux/0001-arm64-dts-meson-g12b-add-power-button-support.patch: -------------------------------------------------------------------------------- 1 | From 8286ad3b1e761138e3c574160a5e1a2d6ed06084 Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Mon, 11 Jan 2021 11:20:48 +0100 4 | Subject: [PATCH] arm64: dts: meson: g12b: add power button support 5 | 6 | Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The 7 | GPIO is low active, e.g. when connecting with pin 9 (GND) a power 8 | button press is triggered. 9 | 10 | Signed-off-by: Stefan Agner 11 | --- 12 | arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi | 11 +++++++++++ 13 | 1 file changed, 11 insertions(+) 14 | 15 | diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi 16 | index 09d959aefb184..6be653ac77fac 100644 17 | --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi 18 | +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi 19 | @@ -38,6 +38,17 @@ fan: gpio-fan { 20 | #cooling-cells = <2>; 21 | }; 22 | 23 | + gpio-keys-polled { 24 | + compatible = "gpio-keys-polled"; 25 | + poll-interval = <100>; 26 | + 27 | + power-button { 28 | + label = "power"; 29 | + linux,code = ; 30 | + gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>; 31 | + }; 32 | + }; 33 | + 34 | leds { 35 | compatible = "gpio-leds"; 36 | 37 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/patches/linux/0002-arm64-dts-meson-g12b-add-GPIO-fan-support.patch: -------------------------------------------------------------------------------- 1 | From 6835f658a2c21d38730c1280587cf3768a82ad60 Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Mon, 11 Jan 2021 11:38:54 +0100 4 | Subject: [PATCH] arm64: dts: meson: g12b: add GPIO fan support 5 | 6 | Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the 7 | pad used to control the fan does not support real PWM, hence the RPM 8 | cannot be modulated. 9 | 10 | Signed-off-by: Stefan Agner 11 | --- 12 | arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi | 11 +++++++++++ 13 | 1 file changed, 11 insertions(+) 14 | 15 | diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi 16 | index 6be653ac77fac..10dd23a3b44bc 100644 17 | --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi 18 | +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi 19 | @@ -49,6 +49,17 @@ power-button { 20 | }; 21 | }; 22 | 23 | + /* 24 | + * 5V 80x80x10.8mm cooling fan from Hardkernel shop. 25 | + */ 26 | + fan0: gpio-fan { 27 | + #cooling-cells = <2>; 28 | + compatible = "gpio-fan"; 29 | + gpio-fan,speed-map = <0 0 1600 1>; 30 | + gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>; 31 | + status = "okay"; 32 | + }; 33 | + 34 | leds { 35 | compatible = "gpio-leds"; 36 | 37 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/patches/linux/0004-arm64-dts-meson-add-uart_A-node.patch: -------------------------------------------------------------------------------- 1 | From 742764eb039d8d96aa43afeb62a89b122073bb98 Mon Sep 17 00:00:00 2001 2 | From: Hyeonki Hong 3 | Date: Fri, 27 Mar 2020 17:05:22 +0900 4 | Subject: [PATCH] arm64: dts: meson: add uart_A node 5 | 6 | The UART_A is available through J3 pin 8/10 and documented to be 7 | available as UART by default. 8 | 9 | Signed-off-by: Stefan Agner 10 | --- 11 | arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi | 7 +++++++ 12 | 1 file changed, 7 insertions(+) 13 | 14 | diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi 15 | index 13624c6522abc..6a1330b40cf4d 100644 16 | --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi 17 | +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid.dtsi 18 | @@ -12,6 +12,7 @@ 19 | / { 20 | aliases { 21 | serial0 = &uart_AO; 22 | + serial1 = &uart_A; 23 | ethernet0 = ðmac; 24 | rtc1 = &vrtc; 25 | }; 26 | @@ -496,6 +497,12 @@ &uart_AO { 27 | pinctrl-names = "default"; 28 | }; 29 | 30 | +&uart_A { 31 | + status = "okay"; 32 | + pinctrl-0 = <&uart_a_pins>; 33 | + pinctrl-names = "default"; 34 | +}; 35 | + 36 | &usb { 37 | status = "okay"; 38 | }; 39 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/patches/linux/0005-arm64-dts-meson-add-i2c2-node-to-ODROID-N2-N2.patch: -------------------------------------------------------------------------------- 1 | From bb0da00e7b89510fb66c7a8a1acf16d9f58a45fe Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Thu, 29 Apr 2021 21:32:43 +0200 4 | Subject: [PATCH] arm64: dts: meson: add i2c2 node to ODROID N2/N2+ 5 | 6 | The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which 7 | are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second 8 | I2C instance. Enable i2c2 and use the appropriate pinmux. 9 | 10 | Signed-off-by: Stefan Agner 11 | --- 12 | arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 6 ++++++ 13 | 1 file changed, 6 insertions(+) 14 | 15 | diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi 16 | index 3bca8023638d4..45f6dada0edee 100644 17 | --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi 18 | +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi 19 | @@ -264,6 +264,12 @@ &gpio { 20 | "PIN_36"; /* GPIOX_19 */ 21 | }; 22 | 23 | +&i2c2 { 24 | + status = "okay"; 25 | + pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>; 26 | + pinctrl-names = "default"; 27 | +}; 28 | + 29 | &i2c3 { 30 | status = "okay"; 31 | pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; 32 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/patches/linux/0006-ODROID-C4-arm64-dts-add-uart_A-node.patch: -------------------------------------------------------------------------------- 1 | From 37b8576e97c3a130160bd5908220c67b2258a443 Mon Sep 17 00:00:00 2001 2 | From: Hyeonki Hong 3 | Date: Tue, 1 Mar 2022 21:51:50 +0100 4 | Subject: [PATCH] ODROID-C4: arm64/dts: add uart_A node 5 | 6 | --- 7 | arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi | 9 ++++++++- 8 | 1 file changed, 8 insertions(+), 1 deletion(-) 9 | 10 | diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi 11 | index 7b0e9817a615d..a41fc1cfdeead 100644 12 | --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi 13 | +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi 14 | @@ -10,8 +10,9 @@ 15 | 16 | / { 17 | aliases { 18 | - serial0 = &uart_AO; 19 | ethernet0 = ðmac; 20 | + serial0 = &uart_AO; 21 | + serial1 = &uart_A; 22 | }; 23 | 24 | chosen { 25 | @@ -453,6 +454,12 @@ &tohdmitx { 26 | status = "okay"; 27 | }; 28 | 29 | +&uart_A { 30 | + status = "okay"; 31 | + pinctrl-names = "default"; 32 | + pinctrl-0 = <&uart_a_pins>; 33 | +}; 34 | + 35 | &uart_AO { 36 | status = "okay"; 37 | pinctrl-0 = <&uart_ao_a_pins>; 38 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/patches/linux/0008-arm64-dts-amlogic-add-uartA-uartC-to-ODROID-C2.patch: -------------------------------------------------------------------------------- 1 | From 94625c724799c8082ab0f195e1799f88b352203d Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Wed, 15 Feb 2023 20:15:07 +0100 4 | Subject: [PATCH] arm64: dts: amlogic: add uartA/uartC to ODROID-C2 5 | 6 | Signed-off-by: Stefan Agner 7 | --- 8 | .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 14 ++++++++++++++ 9 | 1 file changed, 14 insertions(+) 10 | 11 | diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts 12 | index 959bd8d77a82e..557ad0cf8f975 100644 13 | --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts 14 | +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts 15 | @@ -17,6 +17,8 @@ / { 16 | 17 | aliases { 18 | serial0 = &uart_AO; 19 | + serial1 = &uart_A; 20 | + serial2 = &uart_C; 21 | ethernet0 = ðmac; 22 | }; 23 | 24 | @@ -387,6 +389,18 @@ &uart_AO { 25 | pinctrl-names = "default"; 26 | }; 27 | 28 | +&uart_A { 29 | + status = "disabled"; 30 | + pinctrl-0 = <&uart_a_pins>; 31 | + pinctrl-names = "default"; 32 | +}; 33 | + 34 | +&uart_C { 35 | + status = "disabled"; 36 | + pinctrl-0 = <&uart_c_pins>; 37 | + pinctrl-names = "default"; 38 | +}; 39 | + 40 | &usb0_phy { 41 | status = "disabled"; 42 | phy-supply = <&usb_otg_pwr>; 43 | -------------------------------------------------------------------------------- /buildroot-external/board/hardkernel/patches/linux/0009-arm64-dts-amlogic-meson-gx-add-missing-pins-for-I2C-.patch: -------------------------------------------------------------------------------- 1 | From 2ee967384a0062b0de6a4259a9d9c839e11b1120 Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Wed, 15 Feb 2023 20:16:29 +0100 4 | Subject: [PATCH] arm64: dts: amlogic: meson-gx: add missing pins for I2C A/B 5 | 6 | Signed-off-by: Stefan Agner 7 | --- 8 | arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 4 ++++ 9 | 1 file changed, 4 insertions(+) 10 | 11 | diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi 12 | index ed00e67e6923a..460a21a4f551a 100644 13 | --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi 14 | +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi 15 | @@ -339,6 +339,8 @@ &hwrng { 16 | 17 | &i2c_A { 18 | clocks = <&clkc CLKID_I2C>; 19 | + pinctrl-names = "default"; 20 | + pinctrl-0 = <&i2c_a_pins>; 21 | }; 22 | 23 | &i2c_AO { 24 | @@ -347,6 +349,8 @@ &i2c_AO { 25 | 26 | &i2c_B { 27 | clocks = <&clkc CLKID_I2C>; 28 | + pinctrl-names = "default"; 29 | + pinctrl-0 = <&i2c_b_pins>; 30 | }; 31 | 32 | &i2c_C { 33 | -------------------------------------------------------------------------------- /buildroot-external/board/khadas/vim3/boot-env.txt: -------------------------------------------------------------------------------- 1 | # Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB 2 | #overlays=rpi-rf-mod 3 | -------------------------------------------------------------------------------- /buildroot-external/board/khadas/vim3/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=ttyAML0,115200n8 console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/khadas/vim3/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" 8 | cp "${BINARIES_DIR}/meson-g12b-s922x-khadas-vim3.dtb" "${BOOT_DATA}/meson-g12b-s922x-khadas-vim3.dtb" 9 | 10 | cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" 11 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 12 | } 13 | 14 | 15 | function hassos_post_image() { 16 | convert_disk_image_xz 17 | } 18 | 19 | -------------------------------------------------------------------------------- /buildroot-external/board/khadas/vim3/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | # FIXME: May not be necessary, but keeping it for now for binary-identical output 5 | exec-post = "dd if=/dev/zero of=${BINARIES_DIR}/spl.img seek=444 count=68 bs=1 conv=notrunc" 6 | 7 | hdimage { 8 | partition-table-type = "none" 9 | fill = "yes" 10 | } 11 | 12 | partition uboot { 13 | offset = 0 14 | image = "u-boot.gxl" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /buildroot-external/board/khadas/vim3/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=khadas-vim3 2 | BOARD_NAME="Khadas VIM3" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=mbr 7 | BOOT_SIZE=24M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=8M 10 | BOOT_ENV_SIZE=0x2000 11 | SUPERVISOR_MACHINE=khadas-vim3 12 | SUPERVISOR_ARCH=aarch64 13 | -------------------------------------------------------------------------------- /buildroot-external/board/khadas/vim3/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(440; 512)"} 7 | } 8 | -------------------------------------------------------------------------------- /buildroot-external/board/khadas/vim3/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_DOS_PARTITION=y 2 | # CONFIG_EFI_PARTITION is not set 3 | # CONFIG_USB_STORAGE is not set 4 | CONFIG_DISPLAY_BOARDINFO=y 5 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/boot-env.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/board/nabucasa/green/boot-env.txt -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=ttyS2,1500000n8 console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" 8 | cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" 9 | 10 | cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" 11 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 12 | } 13 | 14 | 15 | function hassos_post_image() { 16 | convert_disk_image_xz 17 | } 18 | 19 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | hdimage { 5 | partition-table-type = "none" 6 | fill = "yes" 7 | } 8 | 9 | partition uboot { 10 | offset = 32k 11 | image = "u-boot-rockchip.bin" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/kernel.config: -------------------------------------------------------------------------------- 1 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 2 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 3 | 4 | CONFIG_THERMAL_GOV_BANG_BANG=y 5 | CONFIG_SENSORS_GPIO_FAN=y 6 | 7 | CONFIG_KEYBOARD_GPIO=y 8 | CONFIG_KEYBOARD_GPIO_POLLED=y 9 | 10 | CONFIG_MMC_SDHCI_OF_DWCMSHC=y 11 | 12 | # CONFIG_RTC_DRV_RK808 is not set 13 | 14 | # CONFIG_DW_WATCHDOG is not set 15 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=green 2 | BOARD_NAME="Home Assistant Green" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=16M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=16M 10 | BOOT_ENV_SIZE=0x8000 11 | SUPERVISOR_MACHINE=green 12 | SUPERVISOR_ARCH=aarch64 13 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(0; 17k)"} 7 | } 8 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/patches/linux/0004-Input-rk805-pwrkey-reverse-polarity-of-pwrkey.patch: -------------------------------------------------------------------------------- 1 | From c3f803f835db301e586127b061bd473fb61ec13a Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Wed, 19 Jul 2023 10:08:06 +0200 4 | Subject: [PATCH] Input: rk805-pwrkey: reverse polarity of pwrkey 5 | 6 | The power key is low active. Reverse logic to avoid involuntary long 7 | press being reported to user space. 8 | 9 | Signed-off-by: Stefan Agner 10 | --- 11 | drivers/input/misc/rk805-pwrkey.c | 4 ++-- 12 | 1 file changed, 2 insertions(+), 2 deletions(-) 13 | 14 | diff --git a/drivers/input/misc/rk805-pwrkey.c b/drivers/input/misc/rk805-pwrkey.c 15 | index 76873aa005b41..139419033c84a 100644 16 | --- a/drivers/input/misc/rk805-pwrkey.c 17 | +++ b/drivers/input/misc/rk805-pwrkey.c 18 | @@ -19,7 +19,7 @@ static irqreturn_t pwrkey_fall_irq(int irq, void *_pwr) 19 | { 20 | struct input_dev *pwr = _pwr; 21 | 22 | - input_report_key(pwr, KEY_POWER, 1); 23 | + input_report_key(pwr, KEY_POWER, 0); 24 | input_sync(pwr); 25 | 26 | return IRQ_HANDLED; 27 | @@ -29,7 +29,7 @@ static irqreturn_t pwrkey_rise_irq(int irq, void *_pwr) 28 | { 29 | struct input_dev *pwr = _pwr; 30 | 31 | - input_report_key(pwr, KEY_POWER, 0); 32 | + input_report_key(pwr, KEY_POWER, 1); 33 | input_sync(pwr); 34 | 35 | return IRQ_HANDLED; 36 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/patches/linux/0005-green-emmc-use-HS200-mode.patch: -------------------------------------------------------------------------------- 1 | From 3d75827d0318c792d4d7a68d7d7076deee3e7ad3 Mon Sep 17 00:00:00 2001 2 | From: zhangcy 3 | Date: Mon, 14 Aug 2023 01:27:34 +0000 4 | Subject: [PATCH] green: emmc use HS200 mode 5 | 6 | --- 7 | arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts 11 | index 6336fe758819f..61083a9885a78 100644 12 | --- a/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts 13 | +++ b/arch/arm64/boot/dts/rockchip/rk3566-ha-green.dts 14 | @@ -536,6 +536,7 @@ &saradc { 15 | 16 | &sdhci { 17 | bus-width = <8>; 18 | + mmc-hs200-1_8v; 19 | max-frequency = <200000000>; 20 | non-removable; 21 | pinctrl-names = "default"; 22 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/patches/uboot/0006-green-spl-loader-uboot-order-sd-emmc-spi_nor.patch: -------------------------------------------------------------------------------- 1 | From 6ae9e30259812a3cbc8d4990a5acfe459053a225 Mon Sep 17 00:00:00 2001 2 | From: syan 3 | Date: Mon, 31 Jul 2023 09:39:55 +0000 4 | Subject: [PATCH] green: spl loader uboot order: sd-emmc-spi_nor 5 | 6 | --- 7 | arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 2 +- 8 | 1 file changed, 1 insertion(+), 1 deletion(-) 9 | 10 | diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi 11 | index fa98078fce2..48d7b615137 100644 12 | --- a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi 13 | +++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi 14 | @@ -9,7 +9,7 @@ 15 | / { 16 | chosen { 17 | stdout-path = &uart2; 18 | - u-boot,spl-boot-order = &spiflash, &sdmmc0, &sdhci; 19 | + u-boot,spl-boot-order = &sdmmc0, &sdhci, &spiflash; 20 | }; 21 | }; 22 | 23 | -------------------------------------------------------------------------------- /buildroot-external/board/nabucasa/green/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_LED=y 2 | CONFIG_LED_GPIO=y 3 | CONFIG_CMD_LED=y 4 | -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/boot-env.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/board/panther/x2/boot-env.txt -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=ttyS2,1500000n8 console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" 8 | cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" 9 | 10 | cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" 11 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 12 | } 13 | 14 | 15 | function hassos_post_image() { 16 | convert_disk_image_xz 17 | } 18 | 19 | -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/image-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | image spl.img { 2 | size = ${BOOT_SPL_SIZE} 3 | 4 | hdimage { 5 | partition-table-type = "none" 6 | fill = "yes" 7 | } 8 | 9 | partition uboot { 10 | offset = 32k 11 | image = "u-boot-rockchip.bin" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/kernel.config: -------------------------------------------------------------------------------- 1 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set 2 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 3 | 4 | CONFIG_THERMAL_GOV_BANG_BANG=y 5 | CONFIG_SENSORS_GPIO_FAN=n 6 | 7 | CONFIG_KEYBOARD_GPIO=y 8 | CONFIG_KEYBOARD_GPIO_POLLED=y 9 | 10 | CONFIG_MMC_SDHCI_OF_DWCMSHC=y 11 | 12 | # CONFIG_RTC_DRV_RK808 is not set 13 | 14 | # CONFIG_DW_WATCHDOG is not set 15 | -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=panther-x2 2 | BOARD_NAME="Home Assistant Panther X2" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=16M 8 | BOOT_SPL=true 9 | BOOT_SPL_SIZE=16M 10 | BOOT_ENV_SIZE=0x8000 11 | SUPERVISOR_MACHINE=green 12 | SUPERVISOR_ARCH=aarch64 13 | -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/partition-spl-spl.cfg: -------------------------------------------------------------------------------- 1 | partition spl { 2 | size = ${BOOT_SPL_SIZE} 3 | image = "spl.img" 4 | in-partition-table = "no" 5 | offset = 0 6 | holes = {"(0; 17k)"} 7 | } 8 | -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/patches/uboot/0002-update-uboot.patch: -------------------------------------------------------------------------------- 1 | diff --git a/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi b/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi 2 | --- a/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi 3 | +++ b/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi 4 | @@ -9,7 +9,7 @@ 5 | / { 6 | chosen { 7 | stdout-path = &uart2; 8 | - u-boot,spl-boot-order = &sdmmc0, &sdhci, &spiflash; 9 | + u-boot,spl-boot-order = &sdmmc0, &sdhci; 10 | }; 11 | }; 12 | 13 | @@ -78,20 +78,7 @@ 14 | }; 15 | 16 | &sfc { 17 | - bootph-all; 18 | - u-boot,spl-sfc-no-dma; 19 | - #address-cells = <1>; 20 | - #size-cells = <0>; 21 | - status = "okay"; 22 | - 23 | - spiflash: flash@0 { 24 | - bootph-all; 25 | - compatible = "jedec,spi-nor"; 26 | - reg = <0>; 27 | - spi-max-frequency = <24000000>; 28 | - spi-rx-bus-width = <1>; 29 | - spi-tx-bus-width = <1>; 30 | - }; 31 | + status = "disabled"; 32 | }; 33 | 34 | &sdmmc2 { 35 | -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/patches/uboot/0003-panther-Do-not-use-eMMC-DDR52-mode-enable-HS200.patch: -------------------------------------------------------------------------------- 1 | diff --git a/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi b/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi 2 | --- a/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi 3 | +++ b/arch/arm/dts/rk3566-panther-x2-u-boot.dtsi 4 | @@ -71,10 +71,7 @@ 5 | 6 | &sdhci { 7 | cap-mmc-highspeed; 8 | - mmc-ddr-1_8v; 9 | mmc-hs200-1_8v; 10 | - mmc-hs400-1_8v; 11 | - mmc-hs400-enhanced-strobe; 12 | }; 13 | 14 | &sfc { 15 | -------------------------------------------------------------------------------- /buildroot-external/board/panther/x2/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_LED=y 2 | CONFIG_LED_GPIO=y 3 | CONFIG_CMD_LED=y 4 | -------------------------------------------------------------------------------- /buildroot-external/board/pc/generic-x86-64/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/pc/generic-x86-64/erofs-compress-hints.txt: -------------------------------------------------------------------------------- 1 | # assumed -zlz4hc,12:lzma,9 for optimal compression 2 | 16384 1 usr/lib/firmware/ 3 | 16384 1 usr/lib/modules/ 4 | -------------------------------------------------------------------------------- /buildroot-external/board/pc/generic-x86-64/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | local EFIPART_DATA="${BINARIES_DIR}/efi-part" 7 | 8 | mkdir -p "${BOOT_DATA}/EFI/BOOT" 9 | 10 | cp "${BOARD_DIR}/../grub.cfg" "${EFIPART_DATA}/EFI/BOOT/grub.cfg" 11 | cp "${BOARD_DIR}/cmdline.txt" "${EFIPART_DATA}/cmdline.txt" 12 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" create 13 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set ORDER="A B" 14 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set A_OK=1 15 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set A_TRY=0 16 | 17 | cp -r "${EFIPART_DATA}/"* "${BOOT_DATA}/" 18 | } 19 | 20 | 21 | function hassos_post_image() { 22 | convert_disk_image_xz 23 | } 24 | 25 | -------------------------------------------------------------------------------- /buildroot-external/board/pc/generic-x86-64/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=generic-x86-64 2 | BOARD_NAME="Generic x86-64" 3 | CHASSIS=embedded 4 | BOOTLOADER=grub 5 | KERNEL_FILE=bzImage 6 | PARTITION_TABLE_TYPE=gpt 7 | BOOT_SIZE=32M 8 | BOOT_SPL=false 9 | DISK_SIZE=6G 10 | SUPERVISOR_MACHINE=generic-x86-64 11 | SUPERVISOR_ARCH=amd64 12 | -------------------------------------------------------------------------------- /buildroot-external/board/pc/ova/cmdline.txt: -------------------------------------------------------------------------------- 1 | console=ttyS0 console=tty0 2 | -------------------------------------------------------------------------------- /buildroot-external/board/pc/ova/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | local EFIPART_DATA="${BINARIES_DIR}/efi-part" 7 | 8 | mkdir -p "${BOOT_DATA}/EFI/BOOT" 9 | 10 | cp "${BOARD_DIR}/../grub.cfg" "${EFIPART_DATA}/EFI/BOOT/grub.cfg" 11 | cp "${BOARD_DIR}/cmdline.txt" "${EFIPART_DATA}/cmdline.txt" 12 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" create 13 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set ORDER="A B" 14 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set A_OK=1 15 | grub-editenv "${EFIPART_DATA}/EFI/BOOT/grubenv" set A_TRY=0 16 | 17 | cp -r "${EFIPART_DATA}/"* "${BOOT_DATA}/" 18 | } 19 | 20 | 21 | function hassos_post_image() { 22 | local hdd_img="$(hassos_image_name img)" 23 | 24 | # Virtual Disk images 25 | convert_disk_image_virtual vmdk 26 | convert_disk_image_virtual vhdx 27 | convert_disk_image_virtual vdi 28 | convert_disk_image_virtual qcow2 29 | 30 | convert_disk_image_zip vmdk 31 | convert_disk_image_zip vhdx 32 | convert_disk_image_zip vdi 33 | convert_disk_image_xz qcow2 34 | 35 | # OVA 36 | convert_disk_image_ova 37 | 38 | # Cleanup 39 | rm -f "${hdd_img}" 40 | } 41 | -------------------------------------------------------------------------------- /buildroot-external/board/pc/ova/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=ova 2 | BOARD_NAME="Open Virtual Appliance" 3 | CHASSIS=vm 4 | BOOTLOADER=grub 5 | KERNEL_FILE=bzImage 6 | PARTITION_TABLE_TYPE=gpt 7 | BOOT_SIZE=32M 8 | BOOT_SPL=false 9 | DISK_SIZE=32G 10 | SUPERVISOR_MACHINE=qemux86-64 11 | SUPERVISOR_ARCH=amd64 12 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/cmdline.txt: -------------------------------------------------------------------------------- 1 | dwc_otg.lpm_enable=0 console=tty0 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u,152d:a583:u,152d:a578:u 2 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/kernel-armv7.config: -------------------------------------------------------------------------------- 1 | # Config options specific only to 32bit (armv7) builds 2 | 3 | CONFIG_KERNEL_LZ4=y 4 | # CONFIG_KERNEL_GZIP is not set 5 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/kernel.config: -------------------------------------------------------------------------------- 1 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set 2 | # CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZO is not set 3 | # CONFIG_ZSWAP_ZPOOL_DEFAULT_ZBUD is not set 4 | 5 | CONFIG_LOCALVERSION="-haos-raspi" 6 | 7 | CONFIG_LEDS_TRIGGERS=y 8 | CONFIG_LEDS_TRIGGER_DISK=y 9 | CONFIG_LEDS_TRIGGER_ACTIVITY=y 10 | 11 | # do not use RPi in-tree driver, use one from BR package instead 12 | # CONFIG_MEDIA_PCI_HAILO is not set 13 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/patches/uboot/0001-rpi-add-NVMe-to-boot-order.patch: -------------------------------------------------------------------------------- 1 | From 1e59538810162eca0e902e024dde599c15f36cde Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Tue, 29 Dec 2020 23:34:52 +0100 4 | Subject: [PATCH] rpi: add NVMe to boot order 5 | 6 | The Compute Module 4 I/O Board can support a NVMe. Add NVMe to the boot 7 | order. 8 | 9 | Signed-off-by: Stefan Agner 10 | --- 11 | board/raspberrypi/rpi/rpi.env | 2 +- 12 | 1 file changed, 1 insertion(+), 1 deletion(-) 13 | 14 | diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env 15 | index 30228285edd..89f6c5a8392 100644 16 | --- a/board/raspberrypi/rpi/rpi.env 17 | +++ b/board/raspberrypi/rpi/rpi.env 18 | @@ -74,4 +74,4 @@ pxefile_addr_r=0x02500000 19 | fdt_addr_r=0x02600000 20 | ramdisk_addr_r=0x02700000 21 | 22 | -boot_targets=mmc usb pxe dhcp 23 | +boot_targets=mmc nvme usb pxe dhcp 24 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/patches/uboot/0003-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch: -------------------------------------------------------------------------------- 1 | From 725fef2ebd8a23f68c2574ca799593596d1ef6fd Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Thu, 7 Oct 2021 12:02:39 +0200 4 | Subject: [PATCH] usb: xhci-brcm: Make driver compatible with downstream device 5 | tree 6 | 7 | The downstream device tree uses just "generic-xhci" as compatible 8 | string. Use this string to make U-Boot work with the downstream Kernel. 9 | 10 | Signed-off-by: Stefan Agner 11 | --- 12 | drivers/usb/host/xhci-brcm.c | 2 +- 13 | 1 file changed, 1 insertion(+), 1 deletion(-) 14 | 15 | diff --git a/drivers/usb/host/xhci-brcm.c b/drivers/usb/host/xhci-brcm.c 16 | index 2ffad148dea..2a063ccc9eb 100644 17 | --- a/drivers/usb/host/xhci-brcm.c 18 | +++ b/drivers/usb/host/xhci-brcm.c 19 | @@ -81,7 +81,7 @@ static int xhci_brcm_deregister(struct udevice *dev) 20 | } 21 | 22 | static const struct udevice_id xhci_brcm_ids[] = { 23 | - { .compatible = "brcm,generic-xhci" }, 24 | + { .compatible = "generic-xhci" }, 25 | { } 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rootfs-overlay/etc/sysctl.d/98-rpi.conf: -------------------------------------------------------------------------------- 1 | vm.min_free_kbytes = 16384 2 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rootfs-overlay/usr/lib/udev/rules.d/99-com.rules: -------------------------------------------------------------------------------- 1 | 2 | KERNEL=="ttyAMA0", PROGRAM="/bin/sh -c '\ 3 | ALIASES=/proc/device-tree/aliases; \ 4 | if cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \ 5 | echo 0;\ 6 | elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \ 7 | echo 1; \ 8 | else \ 9 | exit 1; \ 10 | fi\ 11 | '", SYMLINK+="serial%c" 12 | 13 | KERNEL=="ttyAMA1", PROGRAM="/bin/sh -c '\ 14 | ALIASES=/proc/device-tree/aliases; \ 15 | if [ -e /dev/ttyAMA0 ]; then \ 16 | exit 1; \ 17 | elif cmp -s $$ALIASES/uart0 $$ALIASES/serial0; then \ 18 | echo 0;\ 19 | elif cmp -s $$ALIASES/uart0 $$ALIASES/serial1; then \ 20 | echo 1; \ 21 | else \ 22 | exit 1; \ 23 | fi\ 24 | '", SYMLINK+="serial%c" 25 | 26 | KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\ 27 | ALIASES=/proc/device-tree/aliases; \ 28 | if cmp -s $$ALIASES/uart1 $$ALIASES/serial0; then \ 29 | echo 0; \ 30 | elif cmp -s $$ALIASES/uart1 $$ALIASES/serial1; then \ 31 | echo 1; \ 32 | else \ 33 | exit 1; \ 34 | fi \ 35 | '", SYMLINK+="serial%c" 36 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi2/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=rpi2 2 | BOARD_NAME="RaspberryPi 2" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=zImage 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=32M 8 | BOOT_SPL=false 9 | BOOT_ENV_SIZE=0x4000 10 | SUPERVISOR_MACHINE=raspberrypi2 11 | SUPERVISOR_ARCH=armv7 12 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi3-64/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=rpi3-64 2 | BOARD_NAME="RaspberryPi 3 64bit" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=32M 8 | BOOT_SPL=false 9 | BOOT_ENV_SIZE=0x4000 10 | SUPERVISOR_MACHINE=raspberrypi3-64 11 | SUPERVISOR_ARCH=aarch64 12 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi3/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=rpi3 2 | BOARD_NAME="RaspberryPi 3" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=zImage 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=32M 8 | BOOT_SPL=false 9 | BOOT_ENV_SIZE=0x4000 10 | SUPERVISOR_MACHINE=raspberrypi3 11 | SUPERVISOR_ARCH=armv7 12 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi4-64/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=rpi4-64 2 | BOARD_NAME="RaspberryPi 4 64bit" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=32M 8 | BOOT_SPL=false 9 | BOOT_ENV_SIZE=0x4000 10 | SUPERVISOR_MACHINE=raspberrypi4-64 11 | SUPERVISOR_ARCH=aarch64 12 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi4-64/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_CMD_NVME=y 2 | CONFIG_NVME=y 3 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi4/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=rpi4 2 | BOARD_NAME="RaspberryPi 4" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=zImage 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=32M 8 | BOOT_SPL=false 9 | BOOT_ENV_SIZE=0x4000 10 | SUPERVISOR_MACHINE=raspberrypi4 11 | SUPERVISOR_ARCH=armv7 12 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi4/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_NVME_PCI=y 2 | CONFIG_CMD_NVME=y 3 | CONFIG_NVME=y 4 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt: -------------------------------------------------------------------------------- 1 | zram.enabled=1 zram.num_devices=3 rootwait cgroup_enable=memory fsck.repair=yes console=tty0 root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd ro rauc.slot=A 2 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi5-64/hassos-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC2155 3 | 4 | function hassos_pre_image() { 5 | local BOOT_DATA="$(path_boot_dir)" 6 | 7 | mkdir -p "${BOOT_DATA}/slot-A/" 8 | cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/slot-A/" 9 | gzip --stdout "${BINARIES_DIR}"/Image > "${BOOT_DATA}/slot-A/kernel_2712.img" 10 | cp -r "${BINARIES_DIR}/overlays/" "${BOOT_DATA}/slot-A/" 11 | cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/slot-A/overlays/" 2>/dev/null || true 12 | # README needs to be present, otherwise os_prefix is not 13 | # prepended implicitly to the overlays' path, see: 14 | # https://www.raspberrypi.com/documentation/computers/config_txt.html#overlay_prefix 15 | touch "${BOOT_DATA}/slot-A/overlays/README" 2>/dev/null || true 16 | cp "${BOARD_DIR}/config.txt" "${BOOT_DATA}/config.txt" 17 | cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" 18 | } 19 | 20 | 21 | function hassos_post_image() { 22 | convert_disk_image_xz 23 | } 24 | 25 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi5-64/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=rpi5-64 2 | BOARD_NAME="RaspberryPi 5 64bit" 3 | CHASSIS=embedded 4 | BOOTLOADER=tryboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=gpt 7 | BOOT_SIZE=64M 8 | BOOT_SPL=false 9 | BOOT_ENV_SIZE=0x4000 10 | SUPERVISOR_MACHINE=raspberrypi5-64 11 | SUPERVISOR_ARCH=aarch64 12 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/rpi5-64/rootfs-overlay/usr/lib/rauc/cmdline.sh: -------------------------------------------------------------------------------- 1 | # shellcheck shell=sh 2 | # Shell script functions to manipulate kernel cmdline 3 | 4 | # Function to get the value of a key from a command line string 5 | get_value() { 6 | key="$1" 7 | cmdline_string="$2" 8 | 9 | # Split the command line string by whitespace and then by '=' using xargs 10 | echo "$cmdline_string" | xargs -n1 | grep "^$key=" | cut -d= -f2- 11 | } 12 | 13 | # Function to set or update the value of a key in a command line string 14 | set_value() { 15 | key="$1" 16 | new_value="$2" 17 | cmdline_string="$3" 18 | 19 | # Use sed to replace the value of the key if it exists, or add a new key-value pair 20 | if echo "$cmdline_string" | grep -q "$key="; then 21 | echo "$cmdline_string" | sed "s/$key=[^ ]*/$key=$new_value/" 22 | else 23 | echo "$cmdline_string $key=$new_value" 24 | fi 25 | } 26 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_CMD_NVME=y 2 | 3 | # CONFIG_DOS_PARTITION is not set 4 | CONFIG_USB_STORAGE=y 5 | CONFIG_USB_FUNCTION_MASS_STORAGE=y 6 | CONFIG_USB_EHCI_HCD=y 7 | CONFIG_USB_EHCI_GENERIC=y 8 | CONFIG_USB_OHCI_HCD=y 9 | 10 | CONFIG_USB_XHCI_BRCM=y 11 | 12 | CONFIG_NVME=y 13 | CONFIG_NVME_PCI=y 14 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/cmdline.txt: -------------------------------------------------------------------------------- 1 | dwc_otg.lpm_enable=0 console=tty0 console=ttyAMA2,115200n8 2 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/config.txt: -------------------------------------------------------------------------------- 1 | # For more options and information see 2 | # http://rpf.io/configtxt 3 | # Some settings may impact device functionality. See link above for details 4 | 5 | # HAOS - don't change it! 6 | disable_splash=1 7 | kernel=u-boot.bin 8 | arm_64bit=1 9 | 10 | # Enable primary UART by default 11 | enable_uart=1 12 | 13 | # No HDMI on Yellow, but we can't set to 16 since we need the full firmware 14 | # for codecs 15 | gpu_mem=32 16 | 17 | # Uncomment some or all of these to enable the optional hardware interfaces 18 | #dtparam=i2c_arm=on 19 | #dtparam=i2s=on 20 | #dtparam=spi=on 21 | 22 | # Uncomment this to enable the lirc-rpi module 23 | #dtoverlay=lirc-rpi 24 | 25 | # Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB 26 | #dtparam=i2c_arm=on 27 | #dtoverlay=rpi-rf-mod 28 | 29 | # Additional overlays and parameters are documented /boot/overlays/README 30 | 31 | [cm4] 32 | device_tree=bcm2711-rpi-cm4-ha-yellow.dtb 33 | 34 | [cm5] 35 | device_tree=bcm2712-rpi-cm5-ha-yellow.dtb 36 | 37 | [all] 38 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/meta: -------------------------------------------------------------------------------- 1 | BOARD_ID=yellow 2 | BOARD_NAME="Yellow" 3 | CHASSIS=embedded 4 | BOOTLOADER=uboot 5 | KERNEL_FILE=Image 6 | PARTITION_TABLE_TYPE=hybrid 7 | BOOT_SIZE=32M 8 | BOOT_SPL=false 9 | BOOT_ENV_SIZE=0x4000 10 | SUPERVISOR_MACHINE=yellow 11 | SUPERVISOR_ARCH=aarch64 12 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/patches/linux/0004-ARM-dts-bcm2711-yellow-Enable-I2C6-by-default.patch: -------------------------------------------------------------------------------- 1 | From 68b50046140a36790b004005b6305820de80520b Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Thu, 4 Mar 2021 14:48:48 +0100 4 | Subject: [PATCH] ARM: dts: bcm2711: yellow: Enable I2C6 by default 5 | 6 | The main I2C bus used on Yellow is I2C6. Enable it by default. 7 | 8 | Signed-off-by: Stefan Agner 9 | --- 10 | arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts | 6 ++++++ 11 | 1 file changed, 6 insertions(+) 12 | 13 | diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 14 | index cc7e7b28ffc76..72f437f4e81a1 100644 15 | --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 16 | +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 17 | @@ -510,6 +510,12 @@ &i2c1 { 18 | clock-frequency = <100000>; 19 | }; 20 | 21 | +&i2c6 { 22 | + pinctrl-names = "default"; 23 | + pinctrl-0 = <&i2c6_pins>; 24 | + status = "okay"; 25 | +}; 26 | + 27 | &i2s { 28 | pinctrl-names = "default"; 29 | pinctrl-0 = <&i2s_pins>; 30 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/patches/linux/0008-ARM-dts-bcm2711-yellow-add-NXP-PCF85063A-RTC.patch: -------------------------------------------------------------------------------- 1 | From 1ac9e238e1e9ec9c7cfc8dc84304a6949fe1d958 Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Fri, 12 Nov 2021 17:33:32 +0100 4 | Subject: [PATCH] ARM: dts: bcm2711: yellow: add NXP PCF85063A RTC 5 | 6 | Signed-off-by: Stefan Agner 7 | --- 8 | arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts | 5 +++++ 9 | 1 file changed, 5 insertions(+) 10 | 11 | diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 12 | index 6cdf595cdc2c3..e867da211c9fc 100644 13 | --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 14 | +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 15 | @@ -554,6 +554,11 @@ card_codec: pcm5121@4c { 16 | CPVDD-supply = <&vdd_3v3_reg>; 17 | status = "okay"; 18 | }; 19 | + 20 | + pcf85063a: rtc@51 { 21 | + compatible = "nxp,pcf85063a"; 22 | + reg = <0x51>; 23 | + }; 24 | }; 25 | 26 | &i2s { 27 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/patches/linux/0009-ARM-dts-bcm2711-yellow-enable-USB-host-mode-by-defau.patch: -------------------------------------------------------------------------------- 1 | From 124e2b8e4b7ebda8acc488704fe11c5bf5e44bd1 Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Fri, 7 Jan 2022 17:10:00 +0100 4 | Subject: [PATCH] ARM: dts: bcm2711: yellow: enable USB host mode by default 5 | 6 | The DWC2 controller is disable by default. Enable it since Home 7 | Assistant Yellow has a USB hub and USB ports connected to it. 8 | 9 | Signed-off-by: Stefan Agner 10 | --- 11 | arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts | 9 +++++++++ 12 | 1 file changed, 9 insertions(+) 13 | 14 | diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 15 | index e867da211c9fc..3866192a6f477 100644 16 | --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 17 | +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 18 | @@ -578,6 +578,15 @@ &sdhost { 19 | status = "disabled"; 20 | }; 21 | 22 | +&usb { 23 | + compatible = "brcm,bcm2835-usb"; 24 | + dr_mode = "host"; 25 | + g-np-tx-fifo-size = <32>; 26 | + g-rx-fifo-size = <558>; 27 | + g-tx-fifo-size = <512 512 512 512 512 256 256>; 28 | + status = "okay"; 29 | +}; 30 | + 31 | &phy1 { 32 | led-modes = <0x00 0x08>; /* link/activity link */ 33 | }; 34 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/patches/linux/0010-ARM-dts-bcm2711-yellow-use-generic-activity-trigger-.patch: -------------------------------------------------------------------------------- 1 | From 68f9deead3ac327dadd096e004d24a6166f57158 Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Wed, 27 Apr 2022 20:36:19 +0200 4 | Subject: [PATCH] ARM: dts: bcm2711: yellow: use generic activity trigger for 5 | green LED 6 | 7 | Use the generic trigger "activity" for the green LED so that any 8 | system activity is shown. 9 | 10 | Signed-off-by: Stefan Agner 11 | --- 12 | arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts | 2 +- 13 | 1 file changed, 1 insertion(+), 1 deletion(-) 14 | 15 | diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 16 | index 3866192a6f477..11da9ec9b828a 100644 17 | --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 18 | +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 19 | @@ -602,7 +602,7 @@ &leds { 20 | act_led: led-act { 21 | label = "led0"; 22 | default-state = "off"; 23 | - linux,default-trigger = "mmc0"; 24 | + linux,default-trigger = "activity"; 25 | gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/patches/linux/0011-ARM-dts-bcm2711-yellow-use-USB-OTG-mode-by-default.patch: -------------------------------------------------------------------------------- 1 | From 06b9732139c9dfa46beb4cc56992f2104a528b54 Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Tue, 26 Jul 2022 15:53:59 +0200 4 | Subject: [PATCH] ARM: dts: bcm2711: yellow: use USB OTG mode by default 5 | 6 | OTG seems to work fine, and allows to use the USB-C port as a USB 7 | peripheral (e.g. in U-Boot via UMS command). 8 | 9 | Signed-off-by: Stefan Agner 10 | --- 11 | arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts | 2 +- 12 | 1 file changed, 1 insertion(+), 1 deletion(-) 13 | 14 | diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 15 | index 11da9ec9b828a..fa2b96e31a4f0 100644 16 | --- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 17 | +++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-cm4-ha-yellow.dts 18 | @@ -580,7 +580,7 @@ &sdhost { 19 | 20 | &usb { 21 | compatible = "brcm,bcm2835-usb"; 22 | - dr_mode = "host"; 23 | + dr_mode = "otg"; 24 | g-np-tx-fifo-size = <32>; 25 | g-rx-fifo-size = <558>; 26 | g-tx-fifo-size = <512 512 512 512 512 256 256>; 27 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/patches/linux/0020-ARM-dts-bcm2712-yellow-Disable-rpi_rtc.patch: -------------------------------------------------------------------------------- 1 | From fc558b6a7174e2b5c37936dd8c13ca29e9273472 Mon Sep 17 00:00:00 2001 2 | From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= 3 | Date: Mon, 2 Dec 2024 17:22:04 +0100 4 | Subject: [PATCH] ARM: dts: bcm2712: yellow: Disable rpi_rtc 5 | MIME-Version: 1.0 6 | Content-Type: text/plain; charset=UTF-8 7 | Content-Transfer-Encoding: 8bit 8 | 9 | Yellow has its own I2C RTC and there is no way to power the new peripheral on 10 | CM5. 11 | 12 | Signed-off-by: Jan Čermák 13 | --- 14 | arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts | 5 +++++ 15 | 1 file changed, 5 insertions(+) 16 | 17 | diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts 18 | index 469d0fdc971a8..ebdeef5f89881 100644 19 | --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts 20 | +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-cm5-ha-yellow.dts 21 | @@ -927,6 +927,11 @@ &i2c1 { 22 | clock-frequency = <100000>; 23 | }; 24 | 25 | +/* No way to power CM5's VBAT pin on Yellow, disable its RTC. */ 26 | +&rpi_rtc { 27 | + status = "disabled"; 28 | +}; 29 | + 30 | /* Board-level I2C (RTC and I2S audio) */ 31 | &rp1_i2c3 { 32 | pinctrl-names = "default"; 33 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/rootfs-overlay/usr/lib/udev/rules.d/99-com.rules: -------------------------------------------------------------------------------- 1 | 2 | KERNEL=="ttyAMA0", SYMLINK+="serial0" 3 | 4 | KERNEL=="ttyS0", SYMLINK+="serial1" 5 | -------------------------------------------------------------------------------- /buildroot-external/board/raspberrypi/yellow/uboot.config: -------------------------------------------------------------------------------- 1 | CONFIG_TARGET_RPI_4=y 2 | CONFIG_BCM2712=y 3 | 4 | CONFIG_MMC_SDHCI_BCMSTB=y 5 | 6 | CONFIG_DM_USB_GADGET=y 7 | 8 | CONFIG_USB_GADGET=y 9 | CONFIG_USB_GADGET_MANUFACTURER="FSL" 10 | CONFIG_USB_GADGET_VENDOR_NUM=0x0525 11 | CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 12 | CONFIG_USB_GADGET_DWC2_OTG=y 13 | CONFIG_USB_GADGET_DOWNLOAD=y 14 | 15 | CONFIG_CMD_USB_MASS_STORAGE=y 16 | 17 | CONFIG_LED=y 18 | CONFIG_LED_GPIO=y 19 | CONFIG_CMD_LED=y 20 | 21 | # CONFIG_EFI_LOADER is not set 22 | # CONFIG_TOOLS_MKEFICAPSULE is not set 23 | -------------------------------------------------------------------------------- /buildroot-external/bootloader/mbr-part.rules: -------------------------------------------------------------------------------- 1 | ENV{ID_PART_ENTRY_UUID}=="48617373-01", SYMLINK+="disk/by-partlabel/hassos-boot" 2 | ENV{ID_PART_ENTRY_UUID}=="48617373-05", SYMLINK+="disk/by-partlabel/hassos-kernel0" 3 | ENV{ID_PART_ENTRY_UUID}=="48617373-06", SYMLINK+="disk/by-partlabel/hassos-system0" 4 | ENV{ID_PART_ENTRY_UUID}=="48617373-07", SYMLINK+="disk/by-partlabel/hassos-kernel1" 5 | ENV{ID_PART_ENTRY_UUID}=="48617373-08", SYMLINK+="disk/by-partlabel/hassos-system1" 6 | ENV{ID_PART_ENTRY_UUID}=="48617373-09", SYMLINK+="disk/by-partlabel/hassos-bootstate" 7 | -------------------------------------------------------------------------------- /buildroot-external/bootloader/mbr-spl.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/bootloader/mbr-spl.img -------------------------------------------------------------------------------- /buildroot-external/bootloader/mbr.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/bootloader/mbr.img -------------------------------------------------------------------------------- /buildroot-external/bootloader/uboot.config: -------------------------------------------------------------------------------- 1 | # CONFIG_LOCALVERSION_AUTO is not set 2 | CONFIG_DISTRO_DEFAULTS=y 3 | # CONFIG_EXPERT is not set 4 | # CONFIG_DISPLAY_CPUINFO is not set 5 | # CONFIG_DISPLAY_BOARDINFO is not set 6 | CONFIG_BOOTDELAY=-2 7 | CONFIG_SYS_PROMPT="HAOS> " 8 | # CONFIG_ISO_PARTITION is not set 9 | CONFIG_EFI_PARTITION=y 10 | CONFIG_FS_EXT4=y 11 | CONFIG_FS_FAT=y 12 | CONFIG_FS_SQUASHFS=y 13 | # CONFIG_ENV_IS_IN_FAT is not set 14 | # CONFIG_ENV_IS_IN_EXT4 is not set 15 | CONFIG_ENV_IS_NOWHERE=y 16 | # CONFIG_EFI_LOADER is not set 17 | CONFIG_CMD_SETEXPR=y 18 | CONFIG_CMD_FILEENV=y 19 | CONFIG_CMD_SQUASHFS=y 20 | CONFIG_LZO=y 21 | # CONFIG_DFU is not set 22 | # CONFIG_CMD_DFU is not set 23 | # CONFIG_TOOLS_MKEFICAPSULE is not set 24 | -------------------------------------------------------------------------------- /buildroot-external/external.desc: -------------------------------------------------------------------------------- 1 | name: HASSOS 2 | desc: HassOS Buildroot tree 3 | -------------------------------------------------------------------------------- /buildroot-external/external.mk: -------------------------------------------------------------------------------- 1 | include $(sort $(wildcard $(BR2_EXTERNAL_HASSOS_PATH)/package/*/*.mk)) 2 | 3 | .PHONY: linux-check-dotconfig 4 | linux-check-dotconfig: linux-check-configuration-done 5 | CC=$(TARGET_CC) LD=$(TARGET_LD) srctree=$(LINUX_SRCDIR) \ 6 | ARCH=$(if $(BR2_x86_64),x86,$(if $(BR2_aarch64),arm64,$(ARCH))) \ 7 | SRCARCH=$(if $(BR2_x86_64),x86,$(if $(BR2_aarch64),arm64,$(ARCH))) \ 8 | $(BR2_EXTERNAL_HASSOS_PATH)/scripts/check-dotconfig.py \ 9 | $(BR2_CHECK_DOTCONFIG_OPTS) \ 10 | --src-kconfig $(LINUX_SRCDIR)Kconfig \ 11 | --actual-config $(LINUX_SRCDIR).config \ 12 | $(shell echo $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES)) 13 | -------------------------------------------------------------------------------- /buildroot-external/genimage/genimage.cfg: -------------------------------------------------------------------------------- 1 | include("images-os.cfg") 2 | 3 | image "${IMAGE_NAME}.img" { 4 | size = "${DISK_SIZE:-2G}" 5 | 6 | include("hdimage-${PARTITION_TABLE_TYPE}.cfg") 7 | 8 | include("partition-spl-${BOOT_SPL_TYPE}.cfg") 9 | 10 | include("partitions-os-${PARTITION_TABLE_TYPE}.cfg") 11 | } 12 | 13 | image "${IMAGE_NAME}.raucb" { 14 | include("image-raucb-${BOOT_SPL_TYPE}.cfg") 15 | } 16 | -------------------------------------------------------------------------------- /buildroot-external/genimage/hdimage-gpt.cfg: -------------------------------------------------------------------------------- 1 | hdimage { 2 | partition-table-type = "gpt" 3 | align = 1M 4 | } 5 | -------------------------------------------------------------------------------- /buildroot-external/genimage/hdimage-hybrid.cfg: -------------------------------------------------------------------------------- 1 | hdimage { 2 | partition-table-type = "hybrid" 3 | align = 1M 4 | } 5 | -------------------------------------------------------------------------------- /buildroot-external/genimage/hdimage-mbr.cfg: -------------------------------------------------------------------------------- 1 | hdimage { 2 | partition-table-type = "mbr" 3 | align = 1M 4 | disk-signature = 0x48617373 5 | extended-partition = 2 6 | } 7 | -------------------------------------------------------------------------------- /buildroot-external/genimage/image-raucb-nospl.cfg: -------------------------------------------------------------------------------- 1 | rauc { 2 | key = "/build/key.pem" 3 | cert = "/build/cert.pem" 4 | keyring = "${TARGET_DIR}/etc/rauc/keyring.pem" 5 | manifest = "${RAUC_MANIFEST:-PLEASE_SPECIFY_RAUC_MANIFEST}" 6 | file hook { image = "${BR2_EXTERNAL_HASSOS_PATH}/ota/rauc-hook" } 7 | file boot.vfat { image = "boot.vfat" } 8 | file kernel.img { image = "kernel.img" } 9 | file rootfs.img { image = ${SYSTEM_IMAGE} } 10 | } 11 | -------------------------------------------------------------------------------- /buildroot-external/genimage/image-raucb-spl.cfg: -------------------------------------------------------------------------------- 1 | rauc { 2 | key = "/build/key.pem" 3 | cert = "/build/cert.pem" 4 | keyring = "${TARGET_DIR}/etc/rauc/keyring.pem" 5 | manifest = "${RAUC_MANIFEST:-PLEASE_SPECIFY_RAUC_MANIFEST}" 6 | file hook { image = "${BR2_EXTERNAL_HASSOS_PATH}/ota/rauc-hook" } 7 | file spl.img { image = "spl.img" } 8 | file boot.vfat { image = "boot.vfat" } 9 | file kernel.img { image = "kernel.img" } 10 | file rootfs.img { image = ${SYSTEM_IMAGE} } 11 | } 12 | -------------------------------------------------------------------------------- /buildroot-external/genimage/image-spl-nospl.cfg: -------------------------------------------------------------------------------- 1 | # intentionally empty 2 | -------------------------------------------------------------------------------- /buildroot-external/genimage/images-boot.cfg: -------------------------------------------------------------------------------- 1 | image boot.vfat { 2 | size = ${BOOT_SIZE:-PLEASE_SPECIFY_BOOT_SIZE} 3 | 4 | vfat { 5 | label = "hassos-boot" 6 | } 7 | } 8 | 9 | include("image-spl-${BOOT_SPL_TYPE}.cfg") 10 | -------------------------------------------------------------------------------- /buildroot-external/genimage/images-os.cfg: -------------------------------------------------------------------------------- 1 | image kernel.img { 2 | size = ${KERNEL_SIZE} 3 | srcpath = "${BINARIES_DIR:-PLEASE_SPECIFY_BINARIES_DIR}/${KERNEL_FILE:-PLEASE_SPECIFY_KERNEL_FILE}" 4 | 5 | squashfs { 6 | compression = "lzo" 7 | block-size = 131072 8 | } 9 | } 10 | 11 | image overlay.ext4 { 12 | size = ${OVERLAY_SIZE} 13 | empty = "yes" 14 | 15 | ext4 { 16 | use-mke2fs = "yes" 17 | label = "hassos-overlay" 18 | extraargs = "-I 256 -E lazy_itable_init=0,lazy_journal_init=0" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /buildroot-external/genimage/partition-gptboot-gpt.cfg: -------------------------------------------------------------------------------- 1 | partition hassos-boot { 2 | size = ${BOOT_SIZE} 3 | partition-type-uuid = "esp" 4 | partition-uuid = "b3dd0952-733c-4c88-8cba-cab9b8b4377f" 5 | image = "boot.vfat" 6 | } 7 | -------------------------------------------------------------------------------- /buildroot-external/genimage/partition-gptboot-hybrid.cfg: -------------------------------------------------------------------------------- 1 | partition hassos-boot { 2 | size = ${BOOT_SIZE} 3 | partition-type = 0xc 4 | # partition-type-uuid = "e3c9e316-0b5c-4db8-817d-f92df00215ae" # Microsoft reserved partition 5 | partition-type-uuid = "esp" 6 | partition-uuid = "b3dd0952-733c-4c88-8cba-cab9b8b4377f" 7 | image = "boot.vfat" 8 | } 9 | -------------------------------------------------------------------------------- /buildroot-external/genimage/partition-spl-nospl.cfg: -------------------------------------------------------------------------------- 1 | # intentionally empty 2 | -------------------------------------------------------------------------------- /buildroot-external/genimage/partitions-os-gpt.cfg: -------------------------------------------------------------------------------- 1 | include("partition-gptboot-${PARTITION_TABLE_TYPE}.cfg") 2 | 3 | partition hassos-kernel0 { 4 | partition-type-uuid = "linux" 5 | partition-uuid = "26700fc6-b0bc-4ccf-9837-ea1a4cba3e65" 6 | size = ${KERNEL_SIZE} 7 | image = "kernel.img" 8 | } 9 | 10 | partition hassos-system0 { 11 | partition-type-uuid = "linux" 12 | partition-uuid = "8d3d53e3-6d49-4c38-8349-aff6859e82fd" 13 | size = ${SYSTEM_SIZE} 14 | image = ${SYSTEM_IMAGE} 15 | } 16 | 17 | partition hassos-kernel1 { 18 | partition-type-uuid = "linux" 19 | partition-uuid = "fc02a4f0-5350-406f-93a2-56cbed636b5f" 20 | size = ${KERNEL_SIZE} 21 | } 22 | 23 | partition hassos-system1 { 24 | partition-type-uuid = "linux" 25 | partition-uuid = "a3ec664e-32ce-4665-95ea-7ae90ce9aa20" 26 | size = ${SYSTEM_SIZE} 27 | } 28 | 29 | partition hassos-bootstate { 30 | partition-type-uuid = "linux" 31 | partition-uuid = "33236519-7f32-4dff-8002-3390b62c309d" 32 | size = ${BOOTSTATE_SIZE} 33 | } 34 | 35 | partition hassos-overlay { 36 | partition-type-uuid = "linux" 37 | partition-uuid = "f1326040-5236-40eb-b683-aaa100a9afcf" 38 | size = ${OVERLAY_SIZE} 39 | image = "overlay.ext4" 40 | } 41 | 42 | partition hassos-data { 43 | partition-type-uuid = "linux" 44 | partition-uuid = "a52a4597-fa3a-4851-aefd-2fbe9f849079" 45 | size = ${DATA_SIZE} 46 | image = ${DATA_IMAGE} 47 | } 48 | -------------------------------------------------------------------------------- /buildroot-external/genimage/partitions-os-hybrid.cfg: -------------------------------------------------------------------------------- 1 | partitions-os-gpt.cfg -------------------------------------------------------------------------------- /buildroot-external/genimage/partitions-os-mbr.cfg: -------------------------------------------------------------------------------- 1 | partition hassos-boot { 2 | size = ${BOOT_SIZE} 3 | partition-type = 0xc 4 | bootable = "yes" 5 | image = "boot.vfat" 6 | } 7 | 8 | partition hassos-kernel0 { 9 | partition-type = 0x83 10 | size = ${KERNEL_SIZE} 11 | image = "kernel.img" 12 | } 13 | 14 | partition hassos-system0 { 15 | partition-type = 0x83 16 | size = ${SYSTEM_SIZE} 17 | image = ${SYSTEM_IMAGE} 18 | } 19 | 20 | partition hassos-kernel1 { 21 | partition-type = 0x83 22 | size = ${KERNEL_SIZE} 23 | } 24 | 25 | partition hassos-system1 { 26 | partition-type = 0x83 27 | size = ${SYSTEM_SIZE} 28 | } 29 | 30 | partition hassos-bootstate { 31 | partition-type = 0x83 32 | size = ${BOOTSTATE_SIZE} 33 | } 34 | 35 | partition hassos-overlay { 36 | partition-type = 0x83 37 | size = ${OVERLAY_SIZE} 38 | image = "overlay.ext4" 39 | forced-primary = "yes" 40 | } 41 | 42 | partition hassos-data { 43 | partition-type = 0x83 44 | size = ${DATA_SIZE} 45 | image = ${DATA_IMAGE} 46 | forced-primary = "yes" 47 | } 48 | -------------------------------------------------------------------------------- /buildroot-external/kernel/v6.12.y/device-support-pci.config: -------------------------------------------------------------------------------- 1 | CONFIG_IGB=y 2 | CONFIG_I40E=m 3 | CONFIG_IGC=m 4 | 5 | CONFIG_NET_VENDOR_AQUANTIA=y 6 | CONFIG_AQTION=m 7 | 8 | CONFIG_NET_VENDOR_ATHEROS=y 9 | CONFIG_ATL2=m 10 | CONFIG_ATL1=m 11 | CONFIG_ATL1C=m 12 | CONFIG_ATL1E=m 13 | CONFIG_ALX=m 14 | 15 | CONFIG_NET_VENDOR_BROADCOM=y 16 | CONFIG_B44=m 17 | CONFIG_BCMGENET=m 18 | CONFIG_BNX2=m 19 | CONFIG_TIGON3=m 20 | CONFIG_BNX2X=m 21 | CONFIG_BNXT=m 22 | 23 | CONFIG_BROADCOM_PHY=m 24 | 25 | CONFIG_NET_VENDOR_STMICRO=y 26 | CONFIG_STMMAC_ETH=m 27 | CONFIG_STMMAC_PCI=m 28 | 29 | # Mellanox ConnectX-3 NIC support 30 | CONFIG_MLX4_EN=m 31 | # CONFIG_MLX4_DEBUG is not set 32 | CONFIG_MLX4_CORE_GEN2=y 33 | 34 | CONFIG_MEDIA_PCI_SUPPORT=y 35 | 36 | # PCI sound drivers 37 | CONFIG_SND_PCI=y 38 | CONFIG_SND_HDA_GENERIC=m 39 | CONFIG_SND_HDA_INTEL=m 40 | CONFIG_SND_HDA_CODEC_REALTEK=m 41 | CONFIG_SND_HDA_CODEC_ANALOG=m 42 | CONFIG_SND_HDA_CODEC_VIA=m 43 | CONFIG_SND_HDA_CODEC_HDMI=m 44 | 45 | # NVMe SSD support 46 | CONFIG_NVME_CORE=y 47 | CONFIG_BLK_DEV_NVME=y 48 | -------------------------------------------------------------------------------- /buildroot-external/kernel/v6.12.y/device-support-wireless-pci.config: -------------------------------------------------------------------------------- 1 | # This fragment contains configuration options for WiFi drivers that are 2 | # using PCI or PCIe bus. The device-support-wireless.config fragment must 3 | # be included for this one to work as well as it contains common options. 4 | 5 | # Atheros drivers 6 | CONFIG_ATH5K=m 7 | CONFIG_ATH5K_PCI=y 8 | CONFIG_ATH10K_PCI=m 9 | CONFIG_ATH11K=m 10 | CONFIG_ATH11K_PCI=m 11 | CONFIG_ATH12K=m 12 | 13 | # Broadcom drivers 14 | CONFIG_BRCMFMAC_PCIE=y 15 | 16 | # Intel drivers 17 | CONFIG_IWLEGACY=m 18 | CONFIG_IWL3945=m 19 | CONFIG_IWL4965=m 20 | CONFIG_IWLWIFI=m 21 | CONFIG_IWLDVM=m 22 | CONFIG_IWLMVM=m 23 | 24 | # Marvell drivers 25 | CONFIG_MWIFIEX_PCIE=m 26 | CONFIG_MWL8K=m 27 | 28 | # Mediatek drivers 29 | CONFIG_MT7603E=m 30 | CONFIG_MT7615E=m 31 | CONFIG_MT7915E=m 32 | CONFIG_MT7921E=m 33 | CONFIG_MT7996E=m 34 | 35 | # Ralink drivers 36 | CONFIG_RT2800PCI=m 37 | 38 | # Realtek drivers 39 | CONFIG_RTL8192CE=m 40 | CONFIG_RTL8192SE=m 41 | CONFIG_RTL8192DE=m 42 | CONFIG_RTL8723AE=m 43 | CONFIG_RTL8723BE=m 44 | CONFIG_RTL8188EE=m 45 | CONFIG_RTL8192EE=m 46 | CONFIG_RTL8821AE=m 47 | CONFIG_RTW88_8822BE=m 48 | CONFIG_RTW88_8822CE=m 49 | CONFIG_RTW88_8723DE=m 50 | CONFIG_RTW88_8821CE=m 51 | 52 | CONFIG_RTW89_8851BE=m 53 | CONFIG_RTW89_8852AE=m 54 | CONFIG_RTW89_8852BE=m 55 | CONFIG_RTW89_8852CE=m 56 | -------------------------------------------------------------------------------- /buildroot-external/kernel/v6.6.y/device-support-pci.config: -------------------------------------------------------------------------------- 1 | CONFIG_IGB=y 2 | CONFIG_IGC=m 3 | 4 | CONFIG_NET_VENDOR_AQUANTIA=y 5 | CONFIG_AQTION=m 6 | 7 | CONFIG_NET_VENDOR_ATHEROS=y 8 | CONFIG_ATL2=m 9 | CONFIG_ATL1=m 10 | CONFIG_ATL1C=m 11 | CONFIG_ATL1E=m 12 | CONFIG_ALX=m 13 | 14 | CONFIG_NET_VENDOR_BROADCOM=y 15 | CONFIG_B44=m 16 | CONFIG_BCMGENET=m 17 | CONFIG_BNX2=m 18 | CONFIG_TIGON3=m 19 | CONFIG_BNX2X=m 20 | CONFIG_BNXT=m 21 | 22 | CONFIG_BROADCOM_PHY=m 23 | 24 | CONFIG_NET_VENDOR_STMICRO=y 25 | CONFIG_STMMAC_ETH=m 26 | CONFIG_STMMAC_PCI=m 27 | 28 | # Mellanox ConnectX-3 NIC support 29 | CONFIG_MLX4_EN=m 30 | # CONFIG_MLX4_DEBUG is not set 31 | CONFIG_MLX4_CORE_GEN2=y 32 | 33 | CONFIG_MEDIA_PCI_SUPPORT=y 34 | 35 | # PCI sound drivers 36 | CONFIG_SND_PCI=y 37 | CONFIG_SND_HDA_GENERIC=m 38 | CONFIG_SND_HDA_INTEL=m 39 | CONFIG_SND_HDA_CODEC_REALTEK=m 40 | CONFIG_SND_HDA_CODEC_ANALOG=m 41 | CONFIG_SND_HDA_CODEC_VIA=m 42 | CONFIG_SND_HDA_CODEC_HDMI=m 43 | 44 | # NVMe SSD support 45 | CONFIG_NVME_CORE=y 46 | CONFIG_BLK_DEV_NVME=y 47 | -------------------------------------------------------------------------------- /buildroot-external/meta: -------------------------------------------------------------------------------- 1 | VERSION_MAJOR="15" 2 | VERSION_MINOR="2" 3 | VERSION_SUFFIX="" 4 | 5 | HASSOS_NAME="Home Assistant OS" 6 | HASSOS_ID="haos" 7 | 8 | DEPLOYMENT="production" 9 | -------------------------------------------------------------------------------- /buildroot-external/ota/manifest.raucm.gtpl: -------------------------------------------------------------------------------- 1 | [update] 2 | compatible={{ env "ota_compatible" }} 3 | version={{ env "ota_version" }} 4 | 5 | [bundle] 6 | format=verity 7 | 8 | [hooks] 9 | filename=hook 10 | hooks=install-check; 11 | 12 | [image.boot] 13 | filename=boot.vfat 14 | hooks=install; 15 | 16 | [image.kernel] 17 | filename=kernel.img 18 | {{- if eq (env "BOOTLOADER") "tryboot" }} 19 | hooks=post-install; 20 | {{- end }} 21 | 22 | [image.rootfs] 23 | filename=rootfs.img 24 | 25 | {{- if eq (env "BOOT_SPL") "true" }} 26 | [image.spl] 27 | filename=spl.img 28 | hooks=install 29 | {{- end }} 30 | -------------------------------------------------------------------------------- /buildroot-external/ota/system.conf.gtpl: -------------------------------------------------------------------------------- 1 | [system] 2 | compatible={{ env "ota_compatible" }} 3 | mountprefix=/run/rauc 4 | statusfile=/mnt/boot/rauc.db 5 | {{- if eq (env "BOOTLOADER") "tryboot" }} 6 | bootloader=custom 7 | {{- else }} 8 | bootloader={{ env "BOOTLOADER" }} 9 | {{- end }} 10 | {{- if eq (env "BOOTLOADER") "grub" }} 11 | grubenv=/mnt/boot/EFI/BOOT/grubenv 12 | {{- end }} 13 | 14 | {{- if eq (env "BOOTLOADER") "tryboot" }} 15 | [handlers] 16 | bootloader-custom-backend=/usr/lib/rauc/rpi-tryboot.sh 17 | 18 | {{- end }} 19 | [keyring] 20 | path=/etc/rauc/keyring.pem 21 | 22 | [slot.boot.0] 23 | device=/dev/disk/by-partlabel/hassos-boot 24 | type=vfat 25 | allow-mounted=true 26 | {{- if eq (env "BOOT_SPL") "true" }} 27 | [slot.spl.0] 28 | device=/dev/disk/by-partlabel/hassos-boot 29 | type=raw 30 | {{- end }} 31 | 32 | [slot.kernel.0] 33 | device=/dev/disk/by-partlabel/hassos-kernel0 34 | type=raw 35 | bootname=A 36 | 37 | [slot.rootfs.0] 38 | device=/dev/disk/by-partlabel/hassos-system0 39 | type=raw 40 | parent=kernel.0 41 | 42 | [slot.kernel.1] 43 | device=/dev/disk/by-partlabel/hassos-kernel1 44 | type=raw 45 | bootname=B 46 | 47 | [slot.rootfs.1] 48 | device=/dev/disk/by-partlabel/hassos-system1 49 | type=raw 50 | parent=kernel.1 51 | -------------------------------------------------------------------------------- /buildroot-external/package/bluetooth-rtl8723/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_BLUETOOTH_RTL8723 2 | bool "bluetooth rtl8723" 3 | depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT 4 | help 5 | Install bluetooth for rtl8723. 6 | -------------------------------------------------------------------------------- /buildroot-external/package/bluetooth-rtl8723/bluetooth-rtl8723.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Bluetooth RTL8723 4 | # 5 | ################################################################################ 6 | 7 | BLUETOOTH_RTL8723_VERSION = 1.1.0 8 | BLUETOOTH_RTL8723_LICENSE = Apache License 2.0 9 | BLUETOOTH_RTL8723_LICENSE_FILES = $(BR2_EXTERNAL_HASSOS_PATH)/../LICENSE 10 | BLUETOOTH_RTL8723_SITE = $(BR2_EXTERNAL_HASSOS_PATH)/package/bluetooth-rtl8723 11 | BLUETOOTH_RTL8723_SITE_METHOD = local 12 | 13 | define BLUETOOTH_RTL8723_BUILD_CMDS 14 | curl -L -o $(@D)/rtl8723bs_config.bin https://raw.githubusercontent.com/home-assistant/hassos-blobs/e0c8b7aebb626694cf5c017a9e03068aee2bc604/rtl_bt/rtl8723b_config.bin 15 | endef 16 | 17 | define BLUETOOTH_RTL8723_INSTALL_TARGET_CMDS 18 | $(INSTALL) -d $(TARGET_DIR)/lib/firmware/rtlbt 19 | $(INSTALL) -m 0644 $(@D)/rtl8723bs_config.bin $(TARGET_DIR)/lib/firmware/rtl_bt/ 20 | endef 21 | 22 | $(eval $(generic-package)) 23 | -------------------------------------------------------------------------------- /buildroot-external/package/eq3_char_loop/0001-Makefile.patch: -------------------------------------------------------------------------------- 1 | KernelDrivers/Makefile: add Makefile to get compiled as Linux kernel module 2 | 3 | Signed-off-by: Jens Maus 4 | 5 | --- ./KernelDrivers/Makefile.orig 2021-04-02 17:01:07.029932165 +0200 6 | +++ ./KernelDrivers/Makefile 2020-06-04 14:36:10.188174788 +0200 7 | @@ -0,0 +1 @@ 8 | +obj-m += eq3_char_loop.o 9 | -------------------------------------------------------------------------------- /buildroot-external/package/eq3_char_loop/0004-Fix-eq3_char_loop-driver-build-on-Linux-6.12.patch: -------------------------------------------------------------------------------- 1 | Upstream: Not applicable 2 | 3 | Signed-off-by: Alexander Reinert 4 | 5 | --- a/KernelDrivers/eq3_char_loop.c 6 | +++ b/KernelDrivers/eq3_char_loop.c 7 | @@ -917,7 +917,11 @@ static int eq3loop_open(struct inode *inode, struct file *filp) 8 | 9 | static struct file_operations eq3loop_fops = { 10 | .owner = THIS_MODULE, 11 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)) 12 | + .llseek = noop_llseek, 13 | +#else 14 | .llseek = no_llseek, 15 | +#endif 16 | .read = eq3loop_read, 17 | .write = eq3loop_write, 18 | .open = eq3loop_open, 19 | -------------------------------------------------------------------------------- /buildroot-external/package/eq3_char_loop/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_EQ3_CHAR_LOOP 2 | bool "Support for eq3 char loop kernel module" 3 | -------------------------------------------------------------------------------- /buildroot-external/package/eq3_char_loop/eq3_char_loop.hash: -------------------------------------------------------------------------------- 1 | # Locally computed 2 | sha256 e600b8a501a17600d01bd7a4646508f94f3cd3b9df03661babd9f1801e579b36 LicenseDE.txt 3 | sha256 2cc35060f1667a71184fd191e72bd96793f0a9709f14262adb7279ace38ba960 eq3_char_loop-e60183fc5b8375d9eea185c716f716c07657fa00.tar.gz 4 | -------------------------------------------------------------------------------- /buildroot-external/package/eq3_char_loop/eq3_char_loop.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # eQ-3 char loopback kernel module for HomeMatic/homematicIP 4 | # dual stack implementations for the RPI-RF-MOD/HM-MOD-RPI-PCB 5 | # 6 | # Copyright (c) 2015 by eQ-3 Entwicklung GmbH 7 | # https://github.com/eq-3/occu/tree/master/KernelDrivers 8 | # 9 | ################################################################################ 10 | 11 | EQ3_CHAR_LOOP_VERSION = e60183fc5b8375d9eea185c716f716c07657fa00 12 | EQ3_CHAR_LOOP_SITE = $(call github,eq-3,occu,$(EQ3_CHAR_LOOP_VERSION)) 13 | EQ3_CHAR_LOOP_LICENSE = LGPL-2.1+ (kernel drivers) 14 | EQ3_CHAR_LOOP_LICENSE_FILES = LicenseDE.txt 15 | EQ3_CHAR_LOOP_MODULE_SUBDIRS = KernelDrivers 16 | 17 | $(eval $(kernel-module)) 18 | $(eval $(generic-package)) 19 | -------------------------------------------------------------------------------- /buildroot-external/package/firmware_ap6236/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_FIRMWARE_AP6236 2 | bool "Firmware for AMPAK AP6236" 3 | help 4 | At least some AP6236 seem to be BCM43436B0, not BCM43430. 5 | Use this firmware package for those 6 | -------------------------------------------------------------------------------- /buildroot-external/package/gasket/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_GASKET 2 | tristate "Coral Gasket Driver" 3 | depends on BR2_LINUX_KERNEL 4 | ---help--- 5 | Driver for Gasket (Google ASIC Software, Kernel Extensions, and Tools) 6 | is a top level driver for lightweight communication with Google ASICs. 7 | Apex refers to the EdgeTPU v1. 8 | -------------------------------------------------------------------------------- /buildroot-external/package/gasket/gasket.mk: -------------------------------------------------------------------------------- 1 | GASKET_VERSION = 5815ee3908a46a415aac616ac7b9aedcb98a504c 2 | GASKET_SITE = $(call github,google,gasket-driver,$(GASKET_VERSION)) 3 | GASKET_LICENSE = GPL-2.0 4 | GASKET_LICENSE_FILES = LICENSE 5 | GASKET_MODULE_SUBDIRS = src 6 | 7 | #GASKET_MODULE_MAKE_OPTS = \ 8 | # CONFIG_RTL8822BU=m \ 9 | # KVER=$(LINUX_VERSION_PROBED) \ 10 | # KBASE=$(LINUX_DIR) \ 11 | # CROSS_COMPILE=$(TARGET_CROSS) 12 | 13 | #ifeq (arm, $(filter arm, $(KERNEL_ARCH))) 14 | #GASKET_MODULE_MAKE_OPTS += CONFIG_PLATFORM_ARM_RPI=y 15 | #else 16 | #GASKET_MODULE_MAKE_OPTS += CONFIG_PLATFORM_I386_PC=y 17 | #endif 18 | 19 | $(eval $(kernel-module)) 20 | $(eval $(generic-package)) 21 | -------------------------------------------------------------------------------- /buildroot-external/package/generic_raw_uart/0001-kernel-Makefile.patch: -------------------------------------------------------------------------------- 1 | kernel/Makefile: modification to get compile as buildroot package 2 | 3 | Upstream: Not applicable 4 | 5 | Signed-off-by: Jens Maus 6 | 7 | --- ./kernel/Makefile.orig 2020-12-14 13:09:44.406823210 +0100 8 | +++ ./kernel/Makefile 2021-01-14 11:37:37.524474444 +0100 9 | @@ -1,17 +1,26 @@ 10 | -obj-m += eq3_char_loop.o 11 | -obj-m += plat_eq3ccu2.o 12 | +#obj-m += eq3_char_loop.o 13 | +#obj-m += plat_eq3ccu2.o 14 | obj-m += generic_raw_uart.o 15 | +ifeq ($(CONFIG_ARCH_BCM2835),y) 16 | obj-m += pl011_raw_uart.o 17 | +endif 18 | +ifeq ($(CONFIG_ARCH_ROCKCHIP),y) 19 | obj-m += dw_apb_raw_uart.o 20 | +endif 21 | +ifeq ($(CONFIG_ARCH_MESON),y) 22 | obj-m += meson_raw_uart.o 23 | -obj-m += fake_hmrf.o 24 | +endif 25 | +#obj-m += fake_hmrf.o 26 | obj-m += rpi_rf_mod_led.o 27 | obj-m += dummy_rx8130.o 28 | -obj-m += led_trigger_timer.o 29 | +#obj-m += led_trigger_timer.o 30 | obj-m += hb_rf_usb.o 31 | obj-m += hb_rf_usb_2.o 32 | obj-m += hb_rf_eth.o 33 | -obj-m += rtc-rx8130.o 34 | +#obj-m += rtc-rx8130.o 35 | + 36 | +# disable 37 | +ifeq (0,1) 38 | 39 | ifeq ($(KERNELRELEASE),) 40 | KERNELRELEASE := $(shell uname -r) 41 | @@ -32,3 +41,4 @@ 42 | clean: 43 | $(MAKE) -C $(KERNEL_DIR) M=$(PWD) clean 44 | 45 | +endif 46 | -------------------------------------------------------------------------------- /buildroot-external/package/generic_raw_uart/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_GENERIC_RAW_UART 2 | bool "Support for Generic RAW UART kernel module" 3 | help 4 | Adds support for generic-raw-uart kernel module 5 | 6 | Alexander Reinert 7 | https://github.com/alexreinert/piVCCU/tree/master/kernel 8 | -------------------------------------------------------------------------------- /buildroot-external/package/generic_raw_uart/generic_raw_uart.hash: -------------------------------------------------------------------------------- 1 | # Locally computed 2 | sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE 3 | sha256 1a99e87c48e95c173ce6f43b8783ac359022886265bb2ed86f67c6d05cf12658 generic_raw_uart-b80aacfb75e9689d14d4e2c94380728816c6313e.tar.gz 4 | -------------------------------------------------------------------------------- /buildroot-external/package/generic_raw_uart/generic_raw_uart.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Generic raw uart kernel module for low-latency uart 4 | # communication with a RPI-RF-MOD/HM-MOD-RPI-PCB/HmIP-RFUSB 5 | # 6 | # Copyright (c) 2021-2023 Alexander Reinert 7 | # https://github.com/alexreinert/piVCCU/tree/master/kernel 8 | # 9 | # Uses parts of bcm2835_raw_uart.c 10 | # Copyright (c) 2015 eQ-3 Entwicklung GmbH 11 | # https://github.com/eq-3/occu/tree/master/KernelDrivers 12 | # https://github.com/jens-maus/RaspberryMatic/tree/master/buildroot-external/package/bcm2835_raw_uart 13 | # 14 | ################################################################################ 15 | 16 | GENERIC_RAW_UART_VERSION = b80aacfb75e9689d14d4e2c94380728816c6313e 17 | GENERIC_RAW_UART_SITE = $(call github,alexreinert,piVCCU,$(GENERIC_RAW_UART_VERSION)) 18 | GENERIC_RAW_UART_LICENSE = GPL2 19 | GENERIC_RAW_UART_LICENSE_FILES = LICENSE 20 | GENERIC_RAW_UART_MODULE_SUBDIRS = kernel 21 | 22 | $(eval $(kernel-module)) 23 | $(eval $(generic-package)) 24 | -------------------------------------------------------------------------------- /buildroot-external/package/hailo-pci/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_HAILO_PCI 2 | bool "Hailo PCIe Driver" 3 | depends on BR2_LINUX_KERNEL 4 | help 5 | Kernel driver for interacting with Hailo devices over PCIe. 6 | Used e.g. for Hailo-8(L) PCIe device found e.g. on Raspberry 7 | Pi AI Kit and Raspberry Pi AI HAT+. 8 | -------------------------------------------------------------------------------- /buildroot-external/package/hailo-pci/hailo-pci.hash: -------------------------------------------------------------------------------- 1 | # Locally computed 2 | sha256 f9c375a1be4a41f7b70301dd83c91cb89e41567478859b77eef375a52d782505 LICENSE 3 | sha256 517683771d4d0c5e23a77d00167c46e633d322c4939adc39babbced97a658a5a hailo-pci-v4.20.1.tar.gz 4 | -------------------------------------------------------------------------------- /buildroot-external/package/hailo-pci/hailo-pci.mk: -------------------------------------------------------------------------------- 1 | HAILO_PCI_VERSION = v4.20.1 2 | HAILO_PCI_SITE = $(call github,hailo-ai,hailort-drivers,$(HAILO_PCI_VERSION)) 3 | HAILO_PCI_LICENSE = GPL-2.0 4 | HAILO_PCI_LICENSE_FILES = LICENSE 5 | HAILO_PCI_MODULE_SUBDIRS = linux/pcie 6 | 7 | $(eval $(kernel-module)) 8 | $(eval $(generic-package)) 9 | -------------------------------------------------------------------------------- /buildroot-external/package/hailo8-firmware/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_HAILO8_FIRMWARE 2 | bool "Hailo-8 Firmware" 3 | help 4 | Firmware for Hailo-8 PCIe device found e.g. on Raspberry Pi 5 | AI Kit and Raspberry Pi AI HAT+. Required for hailo_pci kernel 6 | module. 7 | -------------------------------------------------------------------------------- /buildroot-external/package/hailo8-firmware/hailo8-firmware.hash: -------------------------------------------------------------------------------- 1 | sha256 32e26fffa11f3909a07340ca3f4714e5f20ce734f497a893b129ef978cde2593 hailo8_fw.4.20.1.bin 2 | -------------------------------------------------------------------------------- /buildroot-external/package/hailo8-firmware/hailo8-firmware.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Hailo-8 Firmware 4 | # 5 | ################################################################################ 6 | 7 | HAILO8_FIRMWARE_VERSION = 4.20.1 8 | HAILO8_FIRMWARE_LICENSE = PROPRIETARY 9 | HAILO8_FIRMWARE_SOURCE= hailo8_fw.$(HAILO8_FIRMWARE_VERSION).bin 10 | HAILO8_FIRMWARE_SITE="https://hailo-hailort.s3.eu-west-2.amazonaws.com/Hailo8/$(HAILO8_FIRMWARE_VERSION)/FW" 11 | 12 | define HAILO8_FIRMWARE_EXTRACT_CMDS 13 | cp $(HAILO8_FIRMWARE_DL_DIR)/$(HAILO8_FIRMWARE_SOURCE) $(@D) 14 | endef 15 | 16 | define HAILO8_FIRMWARE_BUILD_CMDS 17 | cp $(@D)/$(HAILO8_FIRMWARE_SOURCE) $(@D)/hailo8_fw.bin 18 | endef 19 | 20 | define HAILO8_FIRMWARE_INSTALL_TARGET_CMDS 21 | $(INSTALL) -d $(TARGET_DIR)/lib/firmware/hailo 22 | $(INSTALL) -m 0644 $(@D)/hailo8_fw.bin $(TARGET_DIR)/lib/firmware/hailo/ 23 | endef 24 | 25 | $(eval $(generic-package)) 26 | -------------------------------------------------------------------------------- /buildroot-external/package/hardkernel-boot/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_HARDKERNEL_BOOT 2 | bool "Hardkernel Secure Boot Loader" 3 | depends on BR2_TARGET_UBOOT 4 | help 5 | Augment uboot for secure loading on hardkernel targets. 6 | 7 | if BR2_PACKAGE_HARDKERNEL_BOOT 8 | choice 9 | prompt "Target" 10 | default BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C2 11 | 12 | config BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C2 13 | bool "ODROID-C2" 14 | help 15 | For the ODROID-C2 16 | 17 | config BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C4 18 | bool "ODROID-C4" 19 | help 20 | For the ODROID-C4 21 | 22 | config BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_XU4 23 | bool "ODROID-XU4" 24 | help 25 | For the ODROID-XU4 26 | 27 | config BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_N2 28 | bool "ODROID-N2" 29 | help 30 | For the ODROID-N2 31 | 32 | endchoice 33 | 34 | config BR2_PACKAGE_HARDKERNEL_BOOT_FIX_MAC 35 | bool "Hardkernel fix mac" 36 | help 37 | Install script to fix the mac address. 38 | 39 | endif 40 | -------------------------------------------------------------------------------- /buildroot-external/package/hassio/Config.in: -------------------------------------------------------------------------------- 1 | menuconfig BR2_PACKAGE_HASSIO 2 | bool "Supervisor App" 3 | help 4 | This is the Application layer they build the 5 | data partition with configurations. 6 | 7 | https://github.com/home-assistant/supervisor 8 | 9 | if BR2_PACKAGE_HASSIO 10 | 11 | config BR2_PACKAGE_HASSIO_ARCH 12 | string "Supervisor Arch" 13 | help 14 | Supervisor architecture which should be pull. 15 | 16 | config BR2_PACKAGE_HASSIO_MACHINE 17 | string "Supervisor Machine" 18 | help 19 | Machine to pull containers for (used for landing page). 20 | 21 | choice 22 | prompt "Default Channel" 23 | default BR2_PACKAGE_HASSIO_CHANNEL_STABLE 24 | help 25 | Channel to use by default. 26 | 27 | config BR2_PACKAGE_HASSIO_CHANNEL_STABLE 28 | bool "Stable" 29 | help 30 | Stable channel. 31 | 32 | config BR2_PACKAGE_HASSIO_CHANNEL_BETA 33 | bool "Beta" 34 | help 35 | Beta channel. 36 | 37 | config BR2_PACKAGE_HASSIO_CHANNEL_DEV 38 | bool "Dev" 39 | help 40 | Dev channel. 41 | 42 | endchoice 43 | 44 | endif 45 | -------------------------------------------------------------------------------- /buildroot-external/package/hassio/create-data-partition.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | build_dir=$1 5 | dst_dir=$2 6 | channel=$3 7 | 8 | data_img="${dst_dir}/data.ext4" 9 | 10 | # Make image 11 | rm -f "${data_img}" 12 | truncate --size="1280M" "${data_img}" 13 | mkfs.ext4 -L "hassos-data" -E lazy_itable_init=0,lazy_journal_init=0 "${data_img}" 14 | 15 | # Mount / init file structs 16 | mkdir -p "${build_dir}/data/" 17 | sudo mount -o loop,discard "${data_img}" "${build_dir}/data/" 18 | 19 | # Use official Docker in Docker images 20 | # Ideally we use the same version as Buildroot is using in case the 21 | # overlayfs2 storage format changes 22 | container=$(docker run --privileged -e DOCKER_TLS_CERTDIR="" \ 23 | -v "${build_dir}/data/":/data \ 24 | -v "${build_dir}/data/docker/":/var/lib/docker \ 25 | -v "${build_dir}":/build \ 26 | -d docker:28.0-dind --storage-driver overlay2) 27 | 28 | docker exec "${container}" sh /build/dind-import-containers.sh "${channel}" 29 | 30 | docker stop "${container}" 31 | 32 | # Unmount data image 33 | sudo umount "${build_dir}/data/" 34 | -------------------------------------------------------------------------------- /buildroot-external/package/hassio/dind-import-containers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | channel=$1 5 | 6 | APPARMOR_URL="https://version.home-assistant.io/apparmor.txt" 7 | 8 | # Make sure we can talk to the Docker daemon 9 | echo "Waiting for Docker daemon..." 10 | while ! docker version 2> /dev/null > /dev/null; do 11 | sleep 1 12 | done 13 | 14 | # Install Supervisor, plug-ins and landing page 15 | echo "Loading container images..." 16 | 17 | # Make sure to order images by size (largest first) 18 | # It seems docker load requires space during operation 19 | # shellcheck disable=SC2045 20 | for image in $(ls -S /build/images/*.tar); do 21 | docker load --input "${image}" 22 | done 23 | 24 | # Tag the Supervisor how the OS expects it to be tagged 25 | supervisor=$(docker images --filter "label=io.hass.type=supervisor" --quiet) 26 | arch=$(docker inspect --format '{{ index .Config.Labels "io.hass.arch" }}' "${supervisor}") 27 | docker tag "${supervisor}" "ghcr.io/home-assistant/${arch}-hassio-supervisor:latest" 28 | 29 | # Setup AppArmor 30 | mkdir -p "/data/supervisor/apparmor" 31 | wget -O "/data/supervisor/apparmor/hassio-supervisor" "${APPARMOR_URL}" 32 | 33 | echo "{ \"channel\": \"${channel}\" }" > /data/supervisor/updater.json 34 | -------------------------------------------------------------------------------- /buildroot-external/package/khadas-boot/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_KHADAS_BOOT 2 | bool "Khadas Amlogic Secure Boot Loader" 3 | depends on BR2_TARGET_UBOOT 4 | help 5 | Add secure boot loader to U-Boot for Khadas Amlogic targets. 6 | 7 | if BR2_PACKAGE_KHADAS_BOOT 8 | choice 9 | prompt "Target" 10 | default BR2_PACKAGE_KHADAS_BOOT_VIM3 11 | 12 | config BR2_PACKAGE_KHADAS_BOOT_VIM3 13 | bool "VIM3" 14 | help 15 | Build boot loader for Khadas VIM3 16 | 17 | endchoice 18 | 19 | endif 20 | -------------------------------------------------------------------------------- /buildroot-external/package/lxd-guest-agent/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_LXD_GUEST_AGENT 2 | bool "LXD Guest Agent" 3 | depends on BR2_USE_MMU # libglib2 4 | depends on BR2_USE_WCHAR # libglib2 5 | depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 6 | select BR2_PACKAGE_LIBGLIB2 7 | select BR2_PACKAGE_ZLIB 8 | help 9 | LXD guest agent for LXD based virtualisations 10 | -------------------------------------------------------------------------------- /buildroot-external/package/lxd-guest-agent/lxd-agent-setup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | PREFIX="/run/lxd_agent" 4 | 5 | # Functions. 6 | mount_virtiofs() { 7 | mount -t virtiofs config "${PREFIX}/.mnt" >/dev/null 2>&1 8 | } 9 | 10 | mount_9p() { 11 | /sbin/modprobe 9pnet_virtio >/dev/null 2>&1 || true 12 | /bin/mount -t 9p config "${PREFIX}/.mnt" -o access=0,trans=virtio >/dev/null 2>&1 13 | } 14 | 15 | fail() { 16 | umount -l "${PREFIX}" >/dev/null 2>&1 || true 17 | rmdir "${PREFIX}" >/dev/null 2>&1 || true 18 | echo "${1}" 19 | exit 1 20 | } 21 | 22 | # Setup the mount target. 23 | umount -l "${PREFIX}" >/dev/null 2>&1 || true 24 | mkdir -p "${PREFIX}" 25 | mount -t tmpfs tmpfs "${PREFIX}" -o mode=0700,size=50M 26 | mkdir -p "${PREFIX}/.mnt" 27 | 28 | # Try virtiofs first. 29 | mount_virtiofs || mount_9p || fail "Couldn't mount virtiofs or 9p, failing." 30 | 31 | # Copy the data. 32 | cp -Ra "${PREFIX}/.mnt/"* "${PREFIX}" 33 | 34 | # Unmount the temporary mount. 35 | umount "${PREFIX}/.mnt" 36 | rmdir "${PREFIX}/.mnt" 37 | 38 | # Fix up permissions. 39 | chown -R root:root "${PREFIX}" 40 | -------------------------------------------------------------------------------- /buildroot-external/package/lxd-guest-agent/lxd-agent.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=LXD - agent 3 | After=syslog.target network.target 4 | ConditionPathExists=/dev/virtio-ports/org.linuxcontainers.lxd 5 | 6 | [Service] 7 | Type=notify 8 | WorkingDirectory=-/run/lxd_agent 9 | ExecStartPre=/usr/lib/systemd/lxd-agent-setup 10 | ExecStart=/run/lxd_agent/lxd-agent 11 | Restart=on-failure 12 | RestartSec=5s 13 | StartLimitInterval=60 14 | StartLimitBurst=10 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /buildroot-external/package/lxd-guest-agent/lxd-guest-agent.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # lxd-guest-agent 4 | # 5 | ################################################################################ 6 | 7 | LXD_GUEST_AGENT_DEPENDENCIES = host-pkgconf 8 | 9 | define LXD_GUEST_AGENT_INSTALL_INIT_SYSTEMD 10 | $(INSTALL) -D -m 644 $(LXD_GUEST_AGENT_PKGDIR)/lxd-agent.service \ 11 | $(TARGET_DIR)/usr/lib/systemd/system/lxd-agent.service 12 | $(INSTALL) -D -m 755 $(LXD_GUEST_AGENT_PKGDIR)/lxd-agent-setup \ 13 | $(TARGET_DIR)/usr/lib/systemd/lxd-agent-setup 14 | $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants 15 | ln -fs /usr/lib/systemd/system/lxd-agent.service \ 16 | $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lxd-agent.service 17 | endef 18 | 19 | $(eval $(generic-package)) 20 | -------------------------------------------------------------------------------- /buildroot-external/package/os-agent/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_OS_AGENT 2 | bool "Home Assistant OS Agent" 3 | help 4 | Install the Home Assistant OS Agent 5 | 6 | if BR2_PACKAGE_OS_AGENT 7 | 8 | config BR2_PACKAGE_OS_AGENT_BOARD 9 | string "OS-Agent board" 10 | help 11 | OS Agent board feature which should be pull. 12 | 13 | endif 14 | -------------------------------------------------------------------------------- /buildroot-external/package/os-agent/os-agent.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Home Assistant OS Agent 4 | # 5 | ################################################################################ 6 | 7 | OS_AGENT_VERSION = 1.7.2 8 | OS_AGENT_SITE = $(call github,home-assistant,os-agent,$(OS_AGENT_VERSION)) 9 | OS_AGENT_LICENSE = Apache License 2.0 10 | OS_AGENT_LICENSE_FILES = LICENSE 11 | OS_AGENT_GOMOD = github.com/home-assistant/os-agent 12 | OS_AGENT_LDFLAGS = -X main.version=$(OS_AGENT_VERSION) -X main.board=$(BR2_PACKAGE_OS_AGENT_BOARD) 13 | 14 | define OS_AGENT_INSTALL_INIT_SYSTEMD 15 | $(INSTALL) -D -m 0644 $(@D)/contrib/io.hass.conf \ 16 | $(TARGET_DIR)/etc/dbus-1/system.d/io.hass.conf 17 | $(INSTALL) -D -m 0644 $(@D)/contrib/haos-agent.service \ 18 | $(TARGET_DIR)/usr/lib/systemd/system/haos-agent.service 19 | endef 20 | 21 | define OS_AGENT_GO_VENDORING 22 | (cd $(@D); \ 23 | $(OS_AGENT_DL_ENV) $(GO_BIN) env) 24 | endef 25 | 26 | OS_AGENT_POST_PATCH_HOOKS += OS_AGENT_GO_VENDORING 27 | 28 | $(eval $(golang-package)) 29 | -------------------------------------------------------------------------------- /buildroot-external/package/pi-bluetooth/0001-Fix-Bluetooth-hci0-Frame-reassembly-failed-84.patch: -------------------------------------------------------------------------------- 1 | From b74ac4e14e4fcbb76b4cea86573cf602f2b28f8b Mon Sep 17 00:00:00 2001 2 | Message-Id: 3 | From: Luca Giovenzana 4 | Date: Thu, 14 Apr 2022 14:55:56 +0200 5 | Subject: [PATCH] Fix Bluetooth: hci0: Frame reassembly failed (-84) 6 | 7 | Lower UART baudrate to fix Frame reassembly failed (-84) issues. 8 | https://github.com/raspberrypi/firmware/issues/1150 9 | 10 | Signed-off-by: Luca Giovenzana 11 | --- 12 | usr/bin/btuart | 2 +- 13 | 1 file changed, 1 insertion(+), 1 deletion(-) 14 | 15 | diff --git a/usr/bin/btuart b/usr/bin/btuart 16 | index 493fd86..cb99a4f 100755 17 | --- a/usr/bin/btuart 18 | +++ b/usr/bin/btuart 19 | @@ -25,7 +25,7 @@ if [ "$uart0" = "$serial1" ] ; then 20 | if [ "$uart0_pins" = "16" ] ; then 21 | $HCIATTACH /dev/serial1 bcm43xx 3000000 flow - $BDADDR 22 | else 23 | - $HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR 24 | + $HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR 25 | fi 26 | else 27 | $HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR 28 | -- 29 | 2.35.1 30 | 31 | -------------------------------------------------------------------------------- /buildroot-external/package/pi-bluetooth/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_PI_BLUETOOTH 2 | bool "Bluetooth scripts for Raspberry Pi" 3 | depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT 4 | depends on BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI_BT 5 | select BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED 6 | help 7 | Install Bluetooth scripts for Raspberry Pi 8 | -------------------------------------------------------------------------------- /buildroot-external/package/pi-bluetooth/bthelper@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Raspberry Pi bluetooth helper 3 | Requires=hciuart.service bluetooth.service 4 | After=hciuart.service 5 | Before=bluetooth.service 6 | 7 | [Service] 8 | Type=oneshot 9 | ExecCondition=/bin/sh -c '[ "$(cat /proc/device-tree/$(cat /proc/device-tree/aliases/bluetooth)/status)" != "okay" ]' 10 | ExecStart=/usr/bin/bthelper %I 11 | RemainAfterExit=yes 12 | -------------------------------------------------------------------------------- /buildroot-external/package/pi-bluetooth/hcidisable.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Remove HCI kernel driver if WiFi/Bluetooth module is not present 3 | ConditionPathExists=!/sys/bus/sdio/devices/mmc1:0001:1 4 | 5 | [Service] 6 | Type=forking 7 | ExecStart=/usr/sbin/modprobe -r hci_uart 8 | 9 | [Install] 10 | WantedBy=hassos-hardware.target 11 | -------------------------------------------------------------------------------- /buildroot-external/package/pi-bluetooth/hciuart.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Configure Bluetooth Modems connected by UART 3 | ConditionFileNotEmpty=/proc/device-tree/soc/gpio@7e200000/bt_pins/brcm,pins 4 | After=dev-serial1.device 5 | 6 | [Service] 7 | Type=forking 8 | ExecCondition=/bin/sh -c '[ "$(cat /proc/device-tree/$(cat /proc/device-tree/aliases/bluetooth)/status)" != "okay" ]' 9 | ExecStart=/usr/bin/btuart 10 | 11 | [Install] 12 | WantedBy=hassos-hardware.target 13 | -------------------------------------------------------------------------------- /buildroot-external/package/qemu-guest-agent/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_QEMU_GUEST_AGENT 2 | bool "QEMU Guest Agent" 3 | depends on BR2_USE_MMU # libglib2 4 | depends on BR2_USE_WCHAR # libglib2 5 | depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 6 | select BR2_PACKAGE_LIBGLIB2 7 | select BR2_PACKAGE_ZLIB 8 | help 9 | QEMU guest agent for qemu based virtualisations 10 | -------------------------------------------------------------------------------- /buildroot-external/package/qemu-guest-agent/qemu-guest-agent.hash: -------------------------------------------------------------------------------- 1 | # Locally computed 2 | sha256 6f04ae8364d0079a192b14635f4b1da294ce18724c034c39a6a41d1b09df6100 COPYING 3 | sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LIB 4 | sha256 91d3024d51e441c235dcb1b0c87cb3aab302283166e8d3d5f8282aa06c346be1 qemu-8.0.5.tar.xz 5 | -------------------------------------------------------------------------------- /buildroot-external/package/qemu-guest-agent/qemu-guest.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=QEMU Guest Agent 3 | ConditionVirtualization=|kvm 4 | ConditionVirtualization=|qemu 5 | ConditionPathExists=!/dev/virtio-ports/org.linuxcontainers.lxd 6 | BindTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device 7 | After=dev-virtio\x2dports-org.qemu.guest_agent.0.device 8 | 9 | [Service] 10 | ExecStart=/usr/libexec/qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 11 | Restart=on-failure 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | -------------------------------------------------------------------------------- /buildroot-external/package/rockchip-blobs/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_ROCKCHIP_BLOBS 2 | bool "Rockchip loader binaries" 3 | help 4 | Rockchip loader binaries (required by U-Boot) 5 | 6 | if BR2_PACKAGE_ROCKCHIP_BLOBS 7 | 8 | config BR2_PACKAGE_ROCKCHIP_BLOBS_VERSION 9 | string "Git hash version of rkbin" 10 | 11 | config BR2_PACKAGE_ROCKCHIP_BLOBS_ATF 12 | string "ARM Trusted Firmware file" 13 | help 14 | ARM Trusted Firmware file 15 | 16 | config BR2_PACKAGE_ROCKCHIP_BLOBS_TPL 17 | string "Rockchip TPL file" 18 | help 19 | Rockchip TPL file 20 | 21 | endif 22 | -------------------------------------------------------------------------------- /buildroot-external/package/rockchip-blobs/rockchip-blobs.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Rockchip loader binaries 4 | # 5 | ################################################################################ 6 | 7 | ROCKCHIP_BLOBS_VERSION = $(call qstrip,$(BR2_PACKAGE_ROCKCHIP_BLOBS_VERSION)) 8 | ROCKCHIP_BLOBS_SOURCE = $(ROCKCHIP_BLOBS_VERSION).tar.gz 9 | ROCKCHIP_BLOBS_SITE = https://github.com/rockchip-linux/rkbin/archive 10 | ROCKCHIP_BLOBS_LICENSE = PROPRIETARY 11 | ROCKCHIP_BLOBS_INSTALL_IMAGES = YES 12 | 13 | define ROCKCHIP_BLOBS_INSTALL_IMAGES_CMDS 14 | $(INSTALL) -D -m 0644 $(@D)/$(BR2_PACKAGE_ROCKCHIP_BLOBS_ATF) $(BINARIES_DIR)/bl31.elf 15 | $(INSTALL) -D -m 0644 $(@D)/$(BR2_PACKAGE_ROCKCHIP_BLOBS_TPL) $(BINARIES_DIR)/ram_init.bin 16 | endef 17 | 18 | $(eval $(generic-package)) 19 | -------------------------------------------------------------------------------- /buildroot-external/package/rpi-eeprom/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_RPI_EEPROM 2 | bool "rpi-eeprom" 3 | help 4 | EEPROM bootloader firmware for Raspberry Pi 4 5 | 6 | https://github.com/raspberrypi/rpi-eeprom 7 | -------------------------------------------------------------------------------- /buildroot-external/package/rpi-eeprom/rpi-eeprom.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # rpi-eeprom 4 | # 5 | ################################################################################ 6 | 7 | RPI_EEPROM_VERSION = 16bb29427f96dc8276a7102c0526154a1084bffd 8 | RPI_EEPROM_SITE = $(call github,raspberrypi,rpi-eeprom,$(RPI_EEPROM_VERSION)) 9 | RPI_EEPROM_LICENSE = BSD-3-Clause 10 | RPI_EEPROM_LICENSE_FILES = LICENSE 11 | RPI_EEPROM_INSTALL_IMAGES = YES 12 | RPI_EEPROM_FIRMWARE_PATH = firmware/beta/pieeprom-2020-10-28.bin 13 | 14 | define RPI_EEPROM_BUILD_CMDS 15 | $(@D)/rpi-eeprom-config $(@D)/$(RPI_EEPROM_FIRMWARE_PATH) --out $(@D)/default.conf 16 | (cat $(@D)/default.conf | grep -v ^$$; echo HDMI_DELAY=0) > $(@D)/boot.conf 17 | $(@D)/rpi-eeprom-config $(@D)/$(RPI_EEPROM_FIRMWARE_PATH) --config $(@D)/boot.conf --out $(@D)/pieeprom.upd 18 | sha256sum $(@D)/pieeprom.upd | awk '{ print $$1 }' > $(@D)/pieeprom.sig 19 | echo "ts: $$(date -u +%s)" >> $(@D)/pieeprom.sig 20 | endef 21 | 22 | define RPI_EEPROM_INSTALL_IMAGES_CMDS 23 | $(INSTALL) -D -m 0644 $(@D)/pieeprom.sig $(BINARIES_DIR)/rpi-eeprom/pieeprom.sig 24 | $(INSTALL) -D -m 0644 $(@D)/pieeprom.upd $(BINARIES_DIR)/rpi-eeprom/pieeprom.upd 25 | endef 26 | 27 | $(eval $(generic-package)) 28 | -------------------------------------------------------------------------------- /buildroot-external/package/rpi-rf-mod/82-rpi-rf-mod-leds.rules: -------------------------------------------------------------------------------- 1 | # make sure all rpi-rf-mod led nodes in /sys are generated with permissions so that addons 2 | # can access it (e.g. raspberrymatic) 3 | SUBSYSTEM=="leds", ACTION=="add", KERNEL=="rpi_rf_mod:*", RUN+="/bin/chmod -R g=u,o=u /sys%p" 4 | SUBSYSTEM=="leds", ACTION=="change", KERNEL=="rpi_rf_mod:*", ENV{TRIGGER}!="none", RUN+="/bin/chmod -R g=u,o=u /sys%p" 5 | -------------------------------------------------------------------------------- /buildroot-external/package/rpi-rf-mod/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_RPI_RF_MOD 2 | bool "Support for RPI-RF-MOD/HM-MOD-RPI-PCB GPIO HAT" 3 | select BR2_PACKAGE_EQ3_CHAR_LOOP 4 | select BR2_PACKAGE_GENERIC_RAW_UART 5 | 6 | if BR2_PACKAGE_RPI_RF_MOD 7 | 8 | config BR2_PACKAGE_RPI_RF_MOD_DTS 9 | bool "Compile Device Tree Overlay" 10 | 11 | if BR2_PACKAGE_RPI_RF_MOD_DTS 12 | 13 | choice 14 | prompt "For Target" 15 | default BR2_PACKAGE_RPI_RF_MOD_DTS_RPI 16 | 17 | config BR2_PACKAGE_RPI_RF_MOD_DTS_RPI 18 | bool "RaspberryPi" 19 | help 20 | For the RaspberryPi 21 | 22 | config BR2_PACKAGE_RPI_RF_MOD_DTS_TINKER 23 | bool "ASUS Tinkerboard" 24 | help 25 | For the ASUS Tinkerboard 26 | 27 | config BR2_PACKAGE_RPI_RF_MOD_DTS_ODROID_C4 28 | bool "ODROID-C4" 29 | help 30 | For the ODROID-C4 31 | 32 | config BR2_PACKAGE_RPI_RF_MOD_DTS_ODROID_N2 33 | bool "ODROID-N2" 34 | help 35 | For the ODROID-N2 36 | 37 | config BR2_PACKAGE_RPI_RF_MOD_DTS_ODROID_C2 38 | bool "ODROID-C2" 39 | help 40 | For the ODROID-C2 41 | 42 | config BR2_PACKAGE_RPI_RF_MOD_DTS_YELLOW 43 | bool "HomeAssistant Yellow" 44 | help 45 | For the HomeAssistant Yellow 46 | 47 | endchoice 48 | 49 | endif 50 | 51 | endif 52 | -------------------------------------------------------------------------------- /buildroot-external/package/rpi-rf-mod/rpi-rf-mod.hash: -------------------------------------------------------------------------------- 1 | sha256 b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1 LICENSE 2 | sha256 035bb930c317a6944dbee14db60dea68d65e15fe5f51253e3080f9f016b89fd7 rpi-rf-mod-0ee62f7a87d26e990fb0e03b00befb505a7e44fd.tar.gz 3 | -------------------------------------------------------------------------------- /buildroot-external/package/rtl88x2bu/0001-allow-arm-i386-external-control.patch: -------------------------------------------------------------------------------- 1 | From fff9ae3ba3b4ff4a6428118bdb48ed5a8f4f2820 Mon Sep 17 00:00:00 2001 2 | From: Kevin Yang 3 | Date: Mon, 7 Feb 2022 07:40:14 +0000 4 | Subject: [PATCH] allow arm/i386 external control 5 | 6 | Signed-off-by: Kevin Yang 7 | --- 8 | Makefile | 4 ++-- 9 | 1 file changed, 2 insertions(+), 2 deletions(-) 10 | 11 | diff --git a/Makefile b/Makefile 12 | index 22bd0e0..72321a4 100755 13 | --- a/Makefile 14 | +++ b/Makefile 15 | @@ -118,7 +118,7 @@ CONFIG_RTW_SDIO_PM_KEEP_POWER = y 16 | ###################### MP HW TX MODE FOR VHT ####################### 17 | CONFIG_MP_VHT_HW_TX_MODE = n 18 | ###################### Platform Related ####################### 19 | -CONFIG_PLATFORM_I386_PC = y 20 | +CONFIG_PLATFORM_I386_PC ?= n 21 | CONFIG_PLATFORM_ANDROID_X86 = n 22 | CONFIG_PLATFORM_ANDROID_INTEL_X86 = n 23 | CONFIG_PLATFORM_JB_X86 = n 24 | @@ -133,7 +133,7 @@ CONFIG_PLATFORM_RTK_DMP = n 25 | CONFIG_PLATFORM_MIPS_PLM = n 26 | CONFIG_PLATFORM_MSTAR389 = n 27 | CONFIG_PLATFORM_MT53XX = n 28 | -CONFIG_PLATFORM_ARM_RPI = n 29 | +CONFIG_PLATFORM_ARM_RPI ?= n 30 | CONFIG_PLATFORM_ARM_MX51_241H = n 31 | CONFIG_PLATFORM_FS_MX61 = n 32 | CONFIG_PLATFORM_ACTIONS_ATJ227X = n 33 | -- 34 | 2.25.1 35 | 36 | -------------------------------------------------------------------------------- /buildroot-external/package/rtl88x2bu/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_RTL88X2BU 2 | tristate "Realtek 88x2 USB WiFi" 3 | depends on BR2_LINUX_KERNEL 4 | ---help--- 5 | Driver for RTL88X2BU USB WiFi adapters (no firmware needed). 6 | -------------------------------------------------------------------------------- /buildroot-external/package/rtl88x2bu/rtl88x2bu.mk: -------------------------------------------------------------------------------- 1 | RTL88X2BU_VERSION = 45ca59c3dd14d287853142fe761b403330dbb32d 2 | RTL88X2BU_SITE = $(call github,cilynx,rtl88x2bu,$(RTL88X2BU_VERSION)) 3 | RTL88X2BU_LICENSE = GPL-2.0 4 | RTL88X2BU_LICENSE_FILES = LICENSE 5 | 6 | RTL88X2BU_MODULE_MAKE_OPTS = \ 7 | CONFIG_RTL8822BU=m \ 8 | KVER=$(LINUX_VERSION_PROBED) \ 9 | KBASE=$(LINUX_DIR) \ 10 | CROSS_COMPILE=$(TARGET_CROSS) 11 | 12 | ifeq (arm, $(filter arm, $(KERNEL_ARCH))) 13 | RTL88X2BU_MODULE_MAKE_OPTS += CONFIG_PLATFORM_ARM_RPI=y 14 | else 15 | RTL88X2BU_MODULE_MAKE_OPTS += CONFIG_PLATFORM_I386_PC=y 16 | endif 17 | 18 | $(eval $(kernel-module)) 19 | $(eval $(generic-package)) 20 | -------------------------------------------------------------------------------- /buildroot-external/package/tempio/Config.in.host: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_HOST_TEMPIO 2 | bool "Home Assistant tempio" 3 | depends on BR2_PACKAGE_HOST_GO_HOST_ARCH_SUPPORTS 4 | help 5 | Install Home Assistant template helper. 6 | -------------------------------------------------------------------------------- /buildroot-external/package/tempio/tempio.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Home Assistant tempio 4 | # 5 | ################################################################################ 6 | 7 | TEMPIO_VERSION = 2021.09.0 8 | TEMPIO_SITE = $(call github,home-assistant,tempio,$(TEMPIO_VERSION)) 9 | TEMPIO_LICENSE = Apache License 2.0 10 | TEMPIO_LICENSE_FILES = LICENSE 11 | TEMPIO_GOMOD = github.com/home-assistant/tempio 12 | TEMPIO_LDFLAGS = -X main.version=$(TEMPIO_VERSION) 13 | 14 | define TEMPIO_GO_VENDORING 15 | (cd $(@D); \ 16 | $(HOST_DIR)/bin/go mod vendor) 17 | endef 18 | 19 | TEMPIO_POST_PATCH_HOOKS += TEMPIO_GO_VENDORING 20 | 21 | $(eval $(golang-package)) 22 | $(eval $(host-golang-package)) 23 | -------------------------------------------------------------------------------- /buildroot-external/package/udisks2/udisks2.hash: -------------------------------------------------------------------------------- 1 | # Locally calculated 2 | sha256 b75734ccf602540dedb4068bec206adcb508a4c003725e117ae8f994d92d8ece udisks-2.10.1.tar.bz2 3 | sha256 98046e932dc6c739001e79d7079a3bd958fc55475dcd917d27f884c0c93525cc COPYING 4 | -------------------------------------------------------------------------------- /buildroot-external/package/udisks2/udisks2.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # udisks2 4 | # 5 | ################################################################################ 6 | 7 | UDISKS2_VERSION = 2.10.1 8 | UDISKS2_SITE = https://github.com/storaged-project/udisks/releases/download/udisks-$(UDISKS2_VERSION) 9 | UDISKS2_SOURCE = udisks-$(UDISKS2_VERSION).tar.bz2 10 | UDISKS2_LICENSE = GPL-2.0+ 11 | UDISKS2_LICENSE_FILES = COPYING 12 | # For 0002-Make-polkit-dependency-optional.patch 13 | # Running autoreconf when GObject Introspection is not selected 14 | # requires 0003-Avoid-autoreconf-error-if-introspection-macros-are-n.patch 15 | UDISKS2_AUTORECONF = YES 16 | 17 | UDISKS2_DEPENDENCIES = \ 18 | host-pkgconf \ 19 | dbus \ 20 | dbus-glib \ 21 | libatasmart \ 22 | libblockdev \ 23 | libgudev \ 24 | lvm2 \ 25 | parted \ 26 | udev 27 | 28 | UDISKS2_CONF_OPTS = --disable-polkit --disable-man --disable-libsystemd-login 29 | 30 | ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) 31 | UDISKS2_CONF_OPTS += --enable-introspection 32 | UDISKS2_DEPENDENCIES += gobject-introspection 33 | else 34 | UDISKS2_CONF_OPTS += --disable-introspection 35 | endif 36 | 37 | ifeq ($(BR2_PACKAGE_UDISKS2_LVM2),y) 38 | UDISKS2_CONF_OPTS += --enable-lvm2 39 | endif 40 | 41 | $(eval $(autotools-package)) 42 | -------------------------------------------------------------------------------- /buildroot-external/package/xe-guest-utilities/Config.in: -------------------------------------------------------------------------------- 1 | config BR2_PACKAGE_XE_GUEST_UTILITIES 2 | bool "Xen guest utilities" 3 | depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS 4 | depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS 5 | depends on BR2_TOOLCHAIN_HAS_THREADS 6 | help 7 | Xen guest utilities for UNIX-like operating systems. 8 | -------------------------------------------------------------------------------- /buildroot-external/package/xe-guest-utilities/proc-xen.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Mount /proc/xen files 3 | ConditionPathExists=/proc/xen 4 | RefuseManualStop=true 5 | 6 | [Mount] 7 | What=xenfs 8 | Where=/proc/xen 9 | Type=xenfs 10 | -------------------------------------------------------------------------------- /buildroot-external/package/xe-guest-utilities/tmpfile.conf: -------------------------------------------------------------------------------- 1 | d /run/xenstored 0755 - - - 2 | -------------------------------------------------------------------------------- /buildroot-external/package/xe-guest-utilities/xe-daemon.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Xen guest utility daemon 3 | Requires=proc-xen.mount 4 | ConditionVirtualization=xen 5 | 6 | [Service] 7 | PIDFile=/run/xe-daemon.pid 8 | ExecStartPre=/usr/sbin/xe-linux-distribution /var/cache/xe-linux-distribution 9 | ExecStart=/usr/sbin/xe-daemon -p /run/xe-daemon.pid 10 | ExecStop=/usr/bin/pkill -TERM -F /run/xe-daemon.pid 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /buildroot-external/patches/network-manager/0001-ndisc-support-multiple-gateways-for-a-single-network.patch: -------------------------------------------------------------------------------- 1 | From 00592cc1e5f0a04b06a4aac33fd62d84650c9c3f Mon Sep 17 00:00:00 2001 2 | From: Stefan Agner 3 | Date: Mon, 27 Mar 2023 17:48:34 +0200 4 | Subject: [PATCH] ndisc: support multiple gateways for a single network 5 | MIME-Version: 1.0 6 | Content-Type: text/plain; charset=UTF-8 7 | Content-Transfer-Encoding: 8bit 8 | 9 | --- 10 | [Jan: updated for NM 1.44] 11 | Signed-off-by: Jan Čermák 12 | --- 13 | src/core/ndisc/nm-ndisc.c | 1 + 14 | 1 file changed, 1 insertion(+) 15 | 16 | diff --git a/src/core/ndisc/nm-ndisc.c b/src/core/ndisc/nm-ndisc.c 17 | index 20dd21212d..e00bdac872 100644 18 | --- a/src/core/ndisc/nm-ndisc.c 19 | +++ b/src/core/ndisc/nm-ndisc.c 20 | @@ -705,6 +705,7 @@ nm_ndisc_add_route(NMNDisc *ndisc, const NMNDiscRoute *new_item, gint64 now_msec 21 | * comparison is aborted, and both routes are added. 22 | */ 23 | if (IN6_ARE_ADDR_EQUAL(&item->network, &new_item->network) && item->plen == new_item->plen 24 | + && IN6_ARE_ADDR_EQUAL(&item->gateway, &new_item->gateway) 25 | && item->on_link == new_item->on_link) { 26 | if (new_item->expiry_msec <= now_msec) { 27 | g_array_remove_index(rdata->routes, i); 28 | -------------------------------------------------------------------------------- /buildroot-external/patches/systemd/0001-time-wait-sync-log-errors-trying-to-watch-run-system.patch: -------------------------------------------------------------------------------- 1 | From 2214c1f039143caaf4ed99eb0f3fc4551b322148 Mon Sep 17 00:00:00 2001 2 | Message-Id: <2214c1f039143caaf4ed99eb0f3fc4551b322148.1635377266.git.stefan@agner.ch> 3 | From: Aman Gupta Karmani 4 | Date: Mon, 12 Oct 2020 13:39:26 -0700 5 | Subject: [PATCH 1/2] time-wait-sync: log errors trying to watch 6 | /run/systemd/timesync 7 | 8 | --- 9 | src/timesync/wait-sync.c | 2 +- 10 | 1 file changed, 1 insertion(+), 1 deletion(-) 11 | 12 | diff --git a/src/timesync/wait-sync.c b/src/timesync/wait-sync.c 13 | index 2a9b113ff4..62fa13c509 100644 14 | --- a/src/timesync/wait-sync.c 15 | +++ b/src/timesync/wait-sync.c 16 | @@ -44,7 +44,7 @@ static void clock_state_release(ClockState *sp) { 17 | static int clock_state_update(ClockState *sp, sd_event *event); 18 | 19 | static int update_notify_run_systemd_timesync(ClockState *sp) { 20 | - sp->run_systemd_timesync_wd = inotify_add_watch(sp->inotify_fd, "/run/systemd/timesync", IN_CREATE|IN_DELETE_SELF); 21 | + sp->run_systemd_timesync_wd = inotify_add_watch_and_warn(sp->inotify_fd, "/run/systemd/timesync", IN_CREATE|IN_DELETE_SELF); 22 | return sp->run_systemd_timesync_wd; 23 | } 24 | 25 | -- 26 | 2.33.1 27 | 28 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/NetworkManager/NetworkManager.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | dns=default 3 | plugins=keyfile 4 | autoconnect-retries-default=0 5 | rc-manager=file 6 | 7 | [keyfile] 8 | unmanaged-devices=type:bridge;type:tun;driver:veth 9 | 10 | [logging] 11 | backend=journal 12 | 13 | [connection] 14 | connection.mdns=2 15 | connection.llmnr=2 16 | 17 | [connectivity] 18 | uri=http://checkonline.home-assistant.io/online.txt 19 | interval=600 20 | 21 | [device] 22 | wifi.scan-rand-mac-address=no 23 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/bluetooth/main.conf: -------------------------------------------------------------------------------- 1 | [General] 2 | Experimental=true 3 | 4 | [Policy] 5 | AutoEnable=true 6 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/containerd/config.toml: -------------------------------------------------------------------------------- 1 | version = 2 2 | 3 | root = "/mnt/data/docker/containerd/daemon" 4 | 5 | disabled_plugins = [ 6 | "io.containerd.internal.v1.opt", 7 | "io.containerd.tracing.processor.v1.otlp", 8 | "io.containerd.internal.v1.tracing" 9 | ] 10 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/dbus-1/system.d/pulseaudio-system.conf: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/default/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/etc/default/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/docker/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/etc/docker/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/docker/daemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "storage-driver": "overlay2", 3 | "log-driver": "journald", 4 | "experimental": true, 5 | "ip6tables": true, 6 | "log-opts": { 7 | "tag": "{{.Name}}" 8 | }, 9 | "data-root": "/mnt/data/docker", 10 | "deprecated-key-path": "/mnt/overlay/etc/docker/key.json", 11 | "bip": "172.30.232.1/23" 12 | } 13 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/dropbear/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/etc/dropbear/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/fstab: -------------------------------------------------------------------------------- 1 | # UNCONFIGURED FSTAB FOR BASE SYSTEM 2 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/input-event-daemon.conf: -------------------------------------------------------------------------------- 1 | # 2 | # /etc/input-event-daemon.conf 3 | # 4 | 5 | [Global] 6 | listen = /dev/input/by-path/platform-gpio-keys-event 7 | 8 | [Keys] 9 | BTN_1 = /usr/bin/systemctl start hassos-config.service 10 | 11 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/modprobe.d/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/etc/modprobe.d/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/modules-load.d/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/etc/modules-load.d/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/motd: -------------------------------------------------------------------------------- 1 | Welcome to Home Assistant OS. 2 | 3 | Use `ha` to access the Home Assistant CLI. 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/resolv.conf: -------------------------------------------------------------------------------- 1 | /run/resolv.conf -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/sysctl.d/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/etc/sysctl.d/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/systemd/coredump.conf: -------------------------------------------------------------------------------- 1 | [Coredump] 2 | Storage=none 3 | ProcessSizeMax=0 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/systemd/journald.conf: -------------------------------------------------------------------------------- 1 | [Journal] 2 | Storage=auto 3 | Compress=yes 4 | SystemMaxUse=500M 5 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/systemd/resolved.conf: -------------------------------------------------------------------------------- 1 | # This file is part of systemd. 2 | # 3 | # systemd is free software; you can redistribute it and/or modify it 4 | # under the terms of the GNU Lesser General Public License as published by 5 | # the Free Software Foundation; either version 2.1 of the License, or 6 | # (at your option) any later version. 7 | # 8 | # Entries in this file show the compile time defaults. 9 | # You can change settings by editing this file. 10 | # Defaults can be restored by simply deleting this file. 11 | # 12 | # See resolved.conf(5) for details 13 | 14 | [Resolve] 15 | #DNS= 16 | #FallbackDNS=1.1.1.1 8.8.8.8 1.0.0.1 8.8.4.4 2606:4700:4700::1111 2001:4860:4860::8888 2606:4700:4700::1001 2001:4860:4860::8844 17 | #Domains= 18 | DNSSEC=no 19 | DNSOverTLS=no 20 | #MulticastDNS=yes 21 | #LLMNR=yes 22 | #Cache=yes 23 | DNSStubListener=no 24 | #ReadEtcHosts=yes 25 | #ResolveUnicastSingleLabel=no 26 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/systemd/timesyncd.conf: -------------------------------------------------------------------------------- 1 | [Time] 2 | NTP=cn.ntp.org.cn 3 | NTP=time1.cloud.tencent.com 4 | FallbackNTP=ntp.ntsc.ac.cn 5 | # Speed-up boot as first attempt is done before network is up 6 | ConnectionRetrySec=10 7 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/tmpfiles.d/data.conf: -------------------------------------------------------------------------------- 1 | d /mnt/data/supervisor - root root - 2 | R /mnt/data/cli - - - - 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/tmpfiles.d/nm.conf: -------------------------------------------------------------------------------- 1 | # Cleanup lease files 2 | e /var/lib/NetworkManager/*.lease - - - 14d 3 | f /run/resolv.conf - root root - 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/etc/tmpfiles.d/overlay.conf: -------------------------------------------------------------------------------- 1 | R /mnt/overlay/var/log/journal - - - - -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/mnt/boot/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/mnt/boot/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/mnt/config/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/mnt/config/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/mnt/data/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/mnt/data/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/mnt/overlay/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jianyun8023/operating-system/c12efd6981b00e4f4c6c1ef24c943847e72d41cc/buildroot-external/rootfs-overlay/mnt/overlay/.empty -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/root/.docker/.empty: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/root/.ssh/.empty: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/root/.ssh/authorized_keys: -------------------------------------------------------------------------------- 1 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDTfoxkXKBmwLN23qzaCjDChdkn1+N+yh5nsUrYi5l4Y 2 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/bin/ha: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ============================================================================== 3 | # HA utility 4 | # ============================================================================== 5 | 6 | if [ -t 1 ]; then 7 | # stdout (fd 1) must be terminal, otherwise `-t` causes error 8 | docker exec -it hassio_cli ha "$@" 9 | else 10 | docker exec -i hassio_cli ha "$@" 11 | fi 12 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/NetworkManager/dispatcher.d/10-ntp: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | TIMESYNCD_CONF=/run/systemd/timesyncd.conf.d/10-ntp.conf 5 | 6 | timesyncd_dhcp_ntp_remove() { 7 | if [ -e $TIMESYNCD_CONF ]; then 8 | rm -f $TIMESYNCD_CONF 9 | systemctl restart systemd-timesyncd.service 10 | fi 11 | } 12 | 13 | timesyncd_dhcp_ntp_add() { 14 | mkdir -p "$(dirname $TIMESYNCD_CONF)" 15 | 16 | echo '[Time]' > ${TIMESYNCD_CONF} 17 | echo "NTP=${DHCP4_NTP_SERVERS}" >> ${TIMESYNCD_CONF} 18 | 19 | systemctl restart systemd-timesyncd.service 20 | } 21 | 22 | # shellcheck disable=SC2034 23 | INTERFACE=${1} 24 | ACTION=${2} 25 | 26 | case ${ACTION} in 27 | up|down|dhcp4-change) 28 | if [ -n "${DHCP4_NTP_SERVERS}" ] 29 | then 30 | timesyncd_dhcp_ntp_add 31 | RETURN_CODE=$? 32 | else 33 | timesyncd_dhcp_ntp_remove 34 | RETURN_CODE=$? 35 | fi 36 | ;; 37 | *) 38 | RETURN_CODE=0 39 | ;; 40 | esac 41 | 42 | return $RETURN_CODE 43 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/firmware/updates: -------------------------------------------------------------------------------- 1 | /mnt/data/supervisor/firmware -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/modprobe.d/alsa-base.conf: -------------------------------------------------------------------------------- 1 | ############################# 2 | # ALSA drivers load options 3 | # Based from LibreELEC 4 | ############################# 5 | 6 | # Prevent abnormal drivers from grabbing index 0 7 | options snd-bt87x index=-2 8 | options cx88-alsa index=-2 9 | options saa7134-alsa index=-2 10 | options snd-atiixp-modem index=-2 11 | options snd-intel8x0m index=-2 12 | options snd-via82xx-modem index=-2 13 | options snd-usb-audio index=-2 14 | options snd-usb-usx2y index=-2 15 | options snd-usb-caiaq index=-2 16 | options snd-cmipci mpu_port=0x330 fm_port=0x388 17 | 18 | # HDA intel 19 | options snd-hda-intel model=auto 20 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/sysctl.d/10-printk.conf: -------------------------------------------------------------------------------- 1 | # Only show kernel errors 2 | kernel.printk = 4 4 1 7 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/sysctl.d/15-swappiness.conf: -------------------------------------------------------------------------------- 1 | # Decrease swapping to a minimum 2 | vm.swappiness=1 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/sysctl.d/20-network.conf: -------------------------------------------------------------------------------- 1 | # Since multicast is rather popular and we have many integrations running, 2 | # more than the default of 20 memberships might be required. 3 | net.ipv4.igmp_max_memberships = 1024 4 | 5 | # Increase maximum receive and send buffer size 6 | net.core.rmem_max = 4194304 7 | net.core.wmem_max = 4194304 8 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/sysctl.d/30-cp15barrier.conf: -------------------------------------------------------------------------------- 1 | # disable "deprecated CP15 Barrier instruction" warnings 2 | # https://www.kernel.org/doc/Documentation/arm64/legacy_instructions.txt 3 | -abi.cp15_barrier = 2 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/sysctl.d/60-otbr-ancillary-buffer.conf: -------------------------------------------------------------------------------- 1 | # Increase ancillary buffer size to allow for a larger number of multicast groups 2 | # Required for NdProxyManager::JoinSolicitedNodeMulticastGroup 3 | net.core.optmem_max=65536 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/sysctl.d/60-otbr-ip-forward.conf: -------------------------------------------------------------------------------- 1 | net.ipv6.conf.all.forwarding = 1 2 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/dnssd/workstation.dnssd: -------------------------------------------------------------------------------- 1 | [Service] 2 | Name=%H [%m] 3 | Type=_workstation._tcp 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system-preset/70-haos.preset: -------------------------------------------------------------------------------- 1 | disable apparmor.service 2 | 3 | enable systemd-time-wait-sync.service 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system.conf.d/watchdog.conf: -------------------------------------------------------------------------------- 1 | [Manager] 2 | RuntimeWatchdogSec=default 3 | WatchdogDevice=/dev/watchdog 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/NetworkManager.service.d/hassos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | RequiresMountsFor=/etc/hostname /etc/hosts /etc/NetworkManager/system-connections 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/dbus-broker.service.d/haos.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | PrivateTmp=false 3 | PrivateDevices=false 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/dbus.service.d/haos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | DefaultDependencies=no 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/dbus.socket.d/haos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | DefaultDependencies=no 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/docker.service.d/failure.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | FailureAction=reboot 3 | 4 | [Service] 5 | ExecStartPre=/usr/libexec/docker-disk-check 6 | ExecStopPost=/usr/libexec/docker-failure 7 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/docker.service.d/hassos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | RequiresMountsFor=/etc/docker /mnt/data /var/lib/docker 3 | 4 | [Service] 5 | OOMScoreAdjust=-400 6 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/docker.service.d/resource.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | TasksMax=infinity -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/dropbear.service.d/hassos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | RequiresMountsFor=/etc/dropbear 3 | ConditionFileNotEmpty=/root/.ssh/authorized_keys 4 | 5 | [Service] 6 | Type=forking 7 | PIDFile=/run/dropbear.pid 8 | ExecStartPre= 9 | ExecStart= 10 | ExecStart=-/usr/sbin/dropbear -R -E -p 22222 -s 11 | KillMode=mixed 12 | OOMPolicy=continue 13 | 14 | [Install] 15 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-NetworkManager-system\x2dconnections.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NetworkManager persistent system connections 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount hassos-overlay.service 5 | Before=NetworkManager.service hassos-config.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/NetworkManager/system-connections 9 | Where=/etc/NetworkManager/system-connections 10 | Type=None 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-default.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Persistent /etc/default directory 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | 6 | [Mount] 7 | What=/mnt/overlay/etc/default 8 | Where=/etc/default 9 | Type=None 10 | Options=bind 11 | 12 | [Install] 13 | WantedBy=hassos-bind.target 14 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-dropbear.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Dropbear persistent keys 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | Before=dropbear.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/dropbear 9 | Where=/etc/dropbear 10 | Type=none 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-hostname.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Hostname persistent configuration 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount hassos-overlay.service 5 | Before=network.target 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/hostname 9 | Where=/etc/hostname 10 | Type=none 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-hosts.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Hosts persistent configuration 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount hassos-overlay.service 5 | Before=network.target 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/hosts 9 | Where=/etc/hosts 10 | Type=none 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-modprobe.d.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Kernel persistent modprobe.d 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | Before=systemd-modules-load.service hassos-config.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/modprobe.d 9 | Where=/etc/modprobe.d 10 | Type=None 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-modules\x2dload.d.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Kernel persistent modules-load.d 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | Before=systemd-modules-load.service hassos-config.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/modules-load.d 9 | Where=/etc/modules-load.d 10 | Type=None 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-sysctl.d.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Kernel persistent sysctl.d 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | Before=systemd-sysctl.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/sysctl.d 9 | Where=/etc/sysctl.d 10 | Type=None 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-systemd-timesyncd.conf.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Timesyncd persistent configuration 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount hassos-overlay.service 5 | Before=systemd-timesyncd.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/systemd/timesyncd.conf 9 | Where=/etc/systemd/timesyncd.conf 10 | Type=none 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-udev-rules.d.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Udev persistent rules.d 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | Before=hassos-config.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/udev/rules.d 9 | Where=/etc/udev/rules.d 10 | Type=None 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/etc-usb_modeswitch.d.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=USB modeswitch persistent directory 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | Before=hassos-config.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/etc/usb_modeswitch.d 9 | Where=/etc/usb_modeswitch.d 10 | Type=None 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/ha-cli@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Home Assistant CLI 3 | Wants=hassos-supervisor.service 4 | After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target hassos-supervisor.service 5 | Conflicts=getty@%i.service 6 | 7 | # If additional gettys are spawned during boot then we should make 8 | # sure that this is synchronized before getty.target, even though 9 | # getty.target didn't actually pull it in. 10 | Before=getty.target 11 | 12 | # IgnoreOnIsolate causes issues with sulogin, if someone isolates 13 | # rescue.target or starts rescue.service from multi-user.target or 14 | # graphical.target. 15 | Conflicts=rescue.service 16 | Before=rescue.service 17 | 18 | [Service] 19 | # the VT is cleared by TTYVTDisallocate 20 | # The '-o' option value tells agetty to replace 'login' arguments with an 21 | # option to preserve environment (-p), followed by '--' for safety, and then 22 | # the entered username. 23 | ExecStart=/usr/sbin/hassos-cli 24 | Type=idle 25 | Restart=always 26 | RestartSec=0 27 | UtmpIdentifier=%I 28 | TTYPath=/dev/%I 29 | TTYReset=yes 30 | TTYVHangup=yes 31 | TTYVTDisallocate=yes 32 | IgnoreSIGPIPE=no 33 | SendSIGHUP=yes 34 | StandardInput=tty-force 35 | StandardOutput=inherit 36 | StandardError=inherit 37 | 38 | [Install] 39 | WantedBy=multi-user.target 40 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/ha-cli@.service.d/haos.conf: -------------------------------------------------------------------------------- 1 | [Install] 2 | DefaultInstance=tty1 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/haos-agent.service.d/haos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | After=mnt-boot.mount 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/haos-bt-cache.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Remove Bluetooth cache entries older than one week 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/bin/sh -c 'find /var/lib/bluetooth/*/cache -mindepth 1 -type f -atime +7 -delete' 7 | PrivateDevices=yes 8 | PrivateNetwork=yes 9 | PrivateUsers=no 10 | ProtectKernelTunables=yes 11 | ProtectKernelModules=yes 12 | ProtectControlGroups=yes 13 | MemoryDenyWriteExecute=yes 14 | SystemCallFilter=@default @file-system @basic-io @system-service 15 | 16 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/haos-bt-cache.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Remove Bluetooth cache entries 3 | ConditionPathExistsGlob=/var/lib/bluetooth/*/cache 4 | 5 | [Timer] 6 | OnCalendar=weekly 7 | AccuracySec=1h 8 | Persistent=true 9 | RandomizedDelaySec=6000 10 | 11 | [Install] 12 | WantedBy=timers.target 13 | 14 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/haos-data-disk-detach.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HAOS data disk detach 3 | DefaultDependencies=no 4 | Before=mnt-data.mount 5 | RefuseManualStart=true 6 | RefuseManualStop=true 7 | Requires=dev-disk-by\x2dlabel-hassos\x2ddata.device 8 | After=dev-disk-by\x2dlabel-hassos\x2ddata.device systemd-fsck@dev-disk-by\x2dlabel-hassos\x2ddata.service 9 | ConditionFirstBoot=yes 10 | 11 | [Service] 12 | Type=oneshot 13 | ExecStart=/usr/libexec/haos-data-disk-detach 14 | 15 | [Install] 16 | WantedBy=local-fs.target 17 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/haos-mglru.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Configure multigenerational LRU 3 | ConditionPathExists=/sys/kernel/mm/lru_gen/enabled 4 | 5 | [Service] 6 | Type=oneshot 7 | 8 | ExecStart=/bin/sh -c "echo 1 > /sys/kernel/mm/lru_gen/min_ttl_ms" 9 | 10 | [Install] 11 | WantedBy=basic.target 12 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/haos-swapfile.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HAOS swap 3 | DefaultDependencies=no 4 | Requires=etc-default.mount mnt-data.mount 5 | After=etc-default.mount mnt-data.mount systemd-growfs@mnt-data.service 6 | Before=mnt-data-swapfile.swap 7 | 8 | [Service] 9 | Type=oneshot 10 | ExecStart=/usr/libexec/haos-swapfile 11 | 12 | [Install] 13 | WantedBy=swap.target 14 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/haos-wipe.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Home Assistant OS Device Wipe Service 3 | DefaultDependencies=no 4 | RefuseManualStart=true 5 | RefuseManualStop=true 6 | Wants=mnt-boot.mount 7 | After=mnt-boot.mount 8 | Before=mnt-data.mount mnt-overlay.mount 9 | ConditionKernelCommandLine=haos.wipe=1 10 | 11 | [Service] 12 | Type=oneshot 13 | RemainAfterExit=yes 14 | ExecStart=/usr/libexec/haos-wipe 15 | 16 | [Install] 17 | WantedBy=sysinit.target 18 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-apparmor.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS AppArmor 3 | Wants=network-online.target time-sync.target 4 | After=network-online.target time-sync.target 5 | Before=docker.service 6 | RequiresMountsFor=/mnt/data 7 | 8 | [Service] 9 | Type=oneshot 10 | RemainAfterExit=true 11 | ExecStart=/usr/libexec/hassos-apparmor 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-bind.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS overlay targets 3 | Documentation=man:systemd.target(5) 4 | Before=sysinit.target 5 | 6 | [Install] 7 | WantedBy=multi-user.target 8 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-config.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS Configuration Manager 3 | After=hassos-bind.target network.target 4 | 5 | [Service] 6 | Type=oneshot 7 | ExecStart=/usr/sbin/hassos-config 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-data.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Home Assistant OS data partition migration 3 | DefaultDependencies=no 4 | RefuseManualStart=true 5 | RefuseManualStop=true 6 | Requires=mnt-overlay.mount dev-disk-by\x2dlabel-hassos\x2ddata.device 7 | Wants=hassos-expand.service 8 | After=mnt-overlay.mount dev-disk-by\x2dlabel-hassos\x2ddata.device systemd-fsck@dev-disk-by\x2dlabel-hassos\x2ddata.service dev-disk-by\x2dpartlabel-hassos\x2ddata\x2dexternal.device 9 | Before=hassos-expand.service 10 | ConditionPathExists=/mnt/overlay/move-data 11 | 12 | [Service] 13 | Type=oneshot 14 | ExecStartPre=-/usr/bin/rm -f /mnt/overlay/move-data 15 | ExecStart=/usr/libexec/hassos-data 16 | 17 | [Install] 18 | WantedBy=local-fs.target 19 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-expand.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS data resizing 3 | DefaultDependencies=no 4 | Before=mnt-data.mount 5 | RefuseManualStart=true 6 | RefuseManualStop=true 7 | Requires=dev-disk-by\x2dlabel-hassos\x2ddata.device 8 | After=dev-disk-by\x2dlabel-hassos\x2ddata.device systemd-fsck@dev-disk-by\x2dlabel-hassos\x2ddata.service 9 | 10 | [Service] 11 | Type=oneshot 12 | ExecStart=/usr/libexec/hassos-expand 13 | 14 | [Install] 15 | WantedBy=local-fs.target 16 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-hardware.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS hardware targets 3 | Documentation=man:systemd.target(5) 4 | 5 | [Install] 6 | WantedBy=multi-user.target 7 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-overlay.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS overlay setup 3 | DefaultDependencies=no 4 | RefuseManualStart=true 5 | RefuseManualStop=true 6 | Before=hassos-bind.target 7 | After=mnt-overlay.mount 8 | 9 | [Service] 10 | Type=oneshot 11 | ExecStart=/usr/libexec/hassos-overlay 12 | RemainAfterExit=true 13 | 14 | [Install] 15 | WantedBy=local-fs.target 16 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-persists.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS persists data on bootstate 3 | After=sysinit.target 4 | RefuseManualStart=true 5 | RefuseManualStop=true 6 | 7 | [Service] 8 | Type=oneshot 9 | ExecStart=/usr/libexec/hassos-persists 10 | RemainAfterExit=true 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-supervisor.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS supervisor 3 | Requires=docker.service rauc.service dbus.socket 4 | Wants=network-online.target hassos-apparmor.service time-sync.target systemd-journal-gatewayd.socket 5 | After=docker.service rauc.service dbus.socket network-online.target hassos-apparmor.service time-sync.target systemd-journal-gatewayd.socket 6 | RequiresMountsFor=/mnt/data /mnt/boot /mnt/overlay 7 | StartLimitIntervalSec=30m 8 | StartLimitBurst=3 9 | ConditionPathExists=/run/dbus/system_bus_socket 10 | ConditionPathExists=/run/docker.sock 11 | 12 | [Service] 13 | Type=simple 14 | Restart=always 15 | RestartSec=5s 16 | ExecStartPre=-/usr/bin/docker stop hassio_supervisor 17 | ExecStart=/usr/sbin/hassos-supervisor 18 | ExecStop=-/usr/bin/docker stop hassio_supervisor 19 | 20 | [Install] 21 | WantedBy=multi-user.target 22 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-user-rules-udev-trigger.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Retrigger udev rules after user rules mounted 3 | DefaultDependencies=no 4 | Wants=systemd-udevd.service etc-udev-rules.d.mount 5 | After=systemd-udev-trigger.service etc-udev-rules.d.mount 6 | Before=hassos-bind.target 7 | ConditionPathIsReadWrite=/sys 8 | 9 | [Service] 10 | Type=oneshot 11 | RemainAfterExit=yes 12 | ExecStart=/usr/bin/udevadm control --reload-rules 13 | ExecStart=/usr/bin/udevadm trigger --type=subsystems --action=add 14 | ExecStart=/usr/bin/udevadm trigger --type=devices --action=add 15 | 16 | [Install] 17 | WantedBy=hassos-bind.target 18 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/hassos-zram.target: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS zram targets 3 | Documentation=man:systemd.target(5) 4 | 5 | [Install] 6 | WantedBy=multi-user.target 7 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/mnt-boot.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS boot partition 3 | DefaultDependencies=no 4 | Before=umount.target local-fs.target 5 | After=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2dboot.service 6 | Wants=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2dboot.service 7 | Conflicts=umount.target 8 | 9 | [Mount] 10 | What=/dev/disk/by-label/hassos-boot 11 | Where=/mnt/boot 12 | Type=auto 13 | Options=sync 14 | 15 | [Install] 16 | WantedBy=local-fs.target 17 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/mnt-config.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS config partition 3 | 4 | [Mount] 5 | What=/dev/disk/by-label/CONFIG 6 | Where=/mnt/config 7 | Type=auto 8 | Options=ro 9 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/mnt-data-swapfile.swap: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HAOS swap file 3 | ConditionFileNotEmpty=/mnt/data/swapfile 4 | 5 | [Swap] 6 | What=/mnt/data/swapfile 7 | 8 | [Install] 9 | WantedBy=swap.target 10 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/mnt-data.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS data partition 3 | Wants=hassos-expand.service 4 | DefaultDependencies=no 5 | After=hassos-expand.service 6 | Before=umount.target local-fs.target 7 | Conflicts=umount.target 8 | After=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2ddata.service 9 | Wants=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2ddata.service systemd-growfs@mnt-data.service 10 | 11 | [Mount] 12 | What=/dev/disk/by-label/hassos-data 13 | Where=/mnt/data 14 | Type=ext4 15 | Options=commit=30 16 | 17 | [Install] 18 | WantedBy=local-fs.target 19 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/mnt-overlay.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS overlay partition 3 | DefaultDependencies=no 4 | Before=umount.target local-fs.target 5 | Conflicts=umount.target 6 | After=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2doverlay.service 7 | Wants=systemd-fsck@dev-disk-by\x2dlabel-hassos\x2doverlay.service 8 | 9 | [Mount] 10 | What=/dev/disk/by-label/hassos-overlay 11 | Where=/mnt/overlay 12 | Type=ext4 13 | 14 | [Install] 15 | WantedBy=local-fs.target 16 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/qemu-guest.service.d/haos.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | ExecStart= 3 | ExecStart=/usr/libexec/qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 --fsfreeze-hook=/usr/libexec/haos-freeze-hook 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/raucdb-migrate.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Migrate rauc.db to boot partition 3 | Before=rauc.service 4 | RequiresMountsFor=/mnt/boot /mnt/data 5 | ConditionPathExists=/mnt/boot/migrate-raucdb 6 | 7 | [Service] 8 | Type=oneshot 9 | ExecStart=/bin/cp /mnt/data/rauc.db /mnt/boot/ 10 | ExecStartPost=/bin/rm /mnt/boot/migrate-raucdb 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/raucdb-update.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Ensure rauc.db contains version information 3 | After=rauc.service 4 | Before=hassos-supervisor.service 5 | RequiresMountsFor=/mnt/boot /mnt/data 6 | 7 | [Service] 8 | Type=oneshot 9 | ExecStart=/usr/libexec/raucdb-update 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/root-.docker.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker persistent user 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | Before=docker.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/root/.docker 9 | Where=/root/.docker 10 | Type=None 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/root-.ssh.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Dropbear persistent user 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | Before=dropbear.service hassos-config.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/root/.ssh 9 | Where=/root/.ssh 10 | Type=None 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/rpcbind.service.d/haos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | DefaultDependencies=yes 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/run-docker-.mount.d/10-reduce-verbosity.conf: -------------------------------------------------------------------------------- 1 | [Mount] 2 | LogLevelMax=notice 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/serial-getty@.service.d/hassos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Wants=hassos-supervisor.service 3 | After=hassos-supervisor.service 4 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/systemd-growfs@.service: -------------------------------------------------------------------------------- 1 | # 2 | # Extracted from fstab-generator 3 | # 4 | 5 | [Unit] 6 | Description=Grow File System on %f 7 | Documentation=man:systemd-growfs@.service(8) 8 | DefaultDependencies=no 9 | BindsTo=%i.mount 10 | Conflicts=shutdown.target 11 | After=%i.mount 12 | Before=shutdown.target local-fs.target 13 | 14 | [Service] 15 | Type=oneshot 16 | RemainAfterExit=yes 17 | ExecStart=/usr/lib/systemd/systemd-growfs %f 18 | TimeoutSec=0 19 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/systemd-journal-gatewayd.socket: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: LGPL-2.1-or-later 2 | # 3 | # This file is part of systemd. 4 | # 5 | # systemd is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU Lesser General Public License as published by 7 | # the Free Software Foundation; either version 2.1 of the License, or 8 | # (at your option) any later version. 9 | 10 | [Unit] 11 | Description=Journal Gateway Service Socket 12 | Documentation=man:systemd-journal-gatewayd(8) 13 | 14 | [Socket] 15 | ListenStream=/run/systemd-journal-gatewayd.sock 16 | 17 | [Install] 18 | WantedBy=sockets.target 19 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/systemd-modules-load.service.d/hassos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | RequiresMountsFor=/etc/modules-load.d /etc/modprobe.d 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/systemd-time-wait-sync.service.d/network-online.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | After=network-online.target 3 | Wants=network-online.target 4 | 5 | [Install] 6 | WantedBy= 7 | WantedBy=time-sync.target 8 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/systemd-time-wait-sync.service.d/timeout.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | TimeoutStartSec=15s 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/systemd-timesyncd.service.d/hassos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | RequiresMountsFor=/var/lib/systemd 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/systemd-timesyncd.service.d/ro.conf: -------------------------------------------------------------------------------- 1 | [Service] 2 | DynamicUser=no 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/tmp.mount.d/zram.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Requires=zram-tmp.service 3 | After=zram-tmp.service 4 | 5 | [Mount] 6 | What= 7 | What=/dev/zram2 8 | Type= 9 | Type=ext4 10 | Options= 11 | Options=nobarrier,strictatime,nosuid,nodev 12 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/udisks2.service.d/haos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | DefaultDependencies=no 3 | Requires=dbus.socket systemd-journald.socket 4 | After=dbus.socket systemd-journald.socket 5 | 6 | [Service] 7 | Environment="DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket" 8 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/udisks2.socket.d/haos.conf: -------------------------------------------------------------------------------- 1 | [Unit] 2 | DefaultDependencies=no 3 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/var-lib-NetworkManager.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=NetworkManager persistent data 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount hassos-overlay.service 5 | Before=NetworkManager.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/var/lib/NetworkManager 9 | Where=/var/lib/NetworkManager 10 | Type=none 11 | Options=bind 12 | LazyUnmount=yes 13 | 14 | [Install] 15 | WantedBy=hassos-bind.target 16 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/var-lib-bluetooth.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Bluetooth persistent state 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | Before=bluetooth.service 6 | 7 | [Mount] 8 | What=/mnt/overlay/var/lib/bluetooth 9 | Where=/var/lib/bluetooth 10 | Type=None 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/var-lib-docker.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Docker persistent data 3 | Requires=mnt-data.mount 4 | After=mnt-data.mount 5 | Before=docker.service 6 | 7 | [Mount] 8 | What=/mnt/data/docker 9 | Where=/var/lib/docker 10 | Type=none 11 | Options=bind 12 | 13 | [Install] 14 | WantedBy=hassos-bind.target 15 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/var-lib-systemd.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Systemd persistent state 3 | Requires=mnt-overlay.mount 4 | After=mnt-overlay.mount 5 | 6 | [Mount] 7 | What=/mnt/overlay/var/lib/systemd 8 | Where=/var/lib/systemd 9 | Type=None 10 | Options=bind 11 | 12 | [Install] 13 | WantedBy=hassos-bind.target 14 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/var-log-journal.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Systemd persistent logging 3 | Requires=mnt-data.mount 4 | After=mnt-data.mount 5 | Before=systemd-journal-flush.service 6 | 7 | [Mount] 8 | What=/mnt/data/logs 9 | Where=/var/log/journal 10 | Type=None 11 | Options=bind 12 | LazyUnmount=yes 13 | 14 | [Install] 15 | WantedBy=hassos-bind.target 16 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/var.mount: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS ZRAM var 3 | DefaultDependencies=no 4 | Requires=zram-var.service 5 | After=zram-var.service 6 | Before=umount.target 7 | Conflicts=umount.target 8 | 9 | [Mount] 10 | What=/dev/zram1 11 | Where=/var 12 | Type=ext4 13 | Options=nobarrier 14 | 15 | [Install] 16 | WantedBy=local-fs.target 17 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/zram-tmp.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS ZRAM tmp 3 | DefaultDependencies=no 4 | Before=tmp.mount 5 | RefuseManualStart=true 6 | RefuseManualStop=true 7 | 8 | [Service] 9 | Type=oneshot 10 | ExecStart=/usr/libexec/hassos-zram -t fs -m tmp -s 16M 11 | RemainAfterExit=true 12 | StandardOutput=null 13 | 14 | [Install] 15 | WantedBy=hassos-zram.target 16 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/systemd/system/zram-var.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HassOS ZRAM var 3 | DefaultDependencies=no 4 | Before=var.mount 5 | RefuseManualStart=true 6 | RefuseManualStop=true 7 | 8 | [Service] 9 | Type=oneshot 10 | ExecStart=/usr/libexec/hassos-zram -t fs -m var -s 32M 11 | RemainAfterExit=true 12 | StandardOutput=null 13 | 14 | [Install] 15 | WantedBy=hassos-zram.target 16 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/lib/udev/rules.d/80-hotplug-cpu.rules: -------------------------------------------------------------------------------- 1 | SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1" 2 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/libexec/docker-disk-check: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Check if less than 128MiB is available on /mnt/data (4k block size). 4 | if [ "$(stat -f /mnt/data -c '%f')" -lt 32768 ]; then 5 | echo "The system is very low on disk space!" 6 | echo "This can cause Docker to fail to start, causing a boot loop." 7 | echo "Asking systemd-journald to free up some space." 8 | # systemd-journald defaults to 10% of disk size. So this should free up 9 | # space for any system which has been running for a while (presumably it 10 | # has when there is no space) and has a disk size larger than ~2.5GiB. 11 | journalctl --vacuum-size=256M 12 | fi 13 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/libexec/docker-failure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$SERVICE_RESULT" = "exit-code" ] && [ "$EXIT_STATUS" = "1" ]; then 4 | echo "Docker exited with exit status 1, this might be caused by corrupted key.json." 5 | size=$(stat -c %s "/mnt/overlay/etc/docker/key.json") 6 | echo "key.json: ${size} bytes" 7 | if ! jq -e < "/mnt/overlay/etc/docker/key.json" > /dev/null || [ "${size}" -eq 0 ]; then 8 | echo "key.json appears to be corrupted, it is not parsable. Removing it." 9 | rm -f "/mnt/overlay/etc/docker/key.json" 10 | fi 11 | fi 12 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/libexec/haos-freeze-hook: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | action="$1" 5 | 6 | if [ "${action}" = "freeze" ]; then 7 | echo "File system freeze requested, freezing Home Assistant" 8 | ha backups freeze 9 | elif [ "${action}" = "thaw" ]; then 10 | echo "File system thaw requested, thawing Home Assistant" 11 | ha backups thaw 12 | else 13 | echo "Unknown action ${action}" 14 | fi 15 | 16 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/libexec/haos-wipe: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | PARTITION_OVERLAY="/dev/disk/by-label/hassos-overlay" 5 | PARTITION_DATA="/dev/disk/by-label/hassos-data" 6 | 7 | if [ ! -b "$PARTITION_OVERLAY" ]; then 8 | echo "[ERROR] Overlay partition not found" 9 | exit 1 10 | elif findmnt "$PARTITION_OVERLAY" > /dev/null; then 11 | echo "[ERROR] Unable to wipe overlay partition while it is already mounted" 12 | exit 1 13 | fi 14 | 15 | if [ ! -b "$PARTITION_DATA" ]; then 16 | echo "[ERROR] Data partition not found" 17 | exit 1 18 | elif findmnt "$PARTITION_DATA" > /dev/null; then 19 | echo "[ERROR] Unable to wipe data partition while it is already mounted" 20 | exit 1 21 | fi 22 | 23 | echo "[INFO] Wiping data partition" 24 | mkfs.ext4 -L "hassos-data" -E lazy_itable_init=0,lazy_journal_init=0 "$PARTITION_DATA" 25 | 26 | echo "[INFO] Wiping overlay partition" 27 | mkfs.ext4 -L "hassos-overlay" -I 256 -E lazy_itable_init=0,lazy_journal_init=0 "$PARTITION_OVERLAY" 28 | 29 | echo "[INFO] Removing wipe flag from cmdline.txt" 30 | /usr/bin/sed -i 's/\s*haos.wipe=1//g' /mnt/boot/cmdline.txt 31 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/libexec/hassos-apparmor: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | APPARMOR_URL="https://version.home-assistant.io/apparmor.txt" 5 | PROFILES_DIR="/mnt/data/supervisor/apparmor" 6 | CACHE_DIR="${PROFILES_DIR}/cache" 7 | 8 | # Check folder structure 9 | if [ ! -d "${PROFILES_DIR}" ]; then 10 | echo "[INFO]: AppArmor profile missing, downloading..." 11 | mkdir -p "${PROFILES_DIR}" 12 | systemctl start network-online.target 13 | curl -sL -o "${PROFILES_DIR}"/hassio-supervisor "${APPARMOR_URL}" 14 | fi 15 | mkdir -p "${CACHE_DIR}" 16 | 17 | # Load exists profiles 18 | for profile in "${PROFILES_DIR}"/*; do 19 | if [ ! -f "${profile}" ]; then 20 | continue 21 | fi 22 | 23 | # Load Profile 24 | if ! apparmor_parser -r -W -L "${CACHE_DIR}" "${profile}"; then 25 | echo "[Error]: Can't load profile ${profile}" 26 | fi 27 | done 28 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/libexec/hassos-overlay: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir -p /mnt/overlay/etc/ 4 | 5 | # Network 6 | mkdir -p /mnt/overlay/etc/NetworkManager/system-connections 7 | 8 | if [ ! -f /mnt/overlay/etc/hostname ]; then 9 | cp -fp /etc/hostname /mnt/overlay/etc/hostname 10 | fi 11 | 12 | if [ ! -f /mnt/overlay/etc/hosts ]; then 13 | cp -fp /etc/hosts /mnt/overlay/etc/hosts 14 | fi 15 | 16 | # TimeSync 17 | if [ ! -f /mnt/overlay/etc/systemd/timesyncd.conf ]; then 18 | mkdir -p /mnt/overlay/etc/systemd 19 | cp -fp /etc/systemd/timesyncd.conf /mnt/overlay/etc/systemd/timesyncd.conf 20 | fi 21 | -------------------------------------------------------------------------------- /buildroot-external/rootfs-overlay/usr/libexec/raucdb-update: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # shellcheck disable=SC1091 3 | 4 | set -e 5 | 6 | # Remove rauc.db from old location before migration in HAOS 15. 7 | if [ -f /mnt/data/rauc.db ]; then 8 | rm -f /mnt/data/rauc.db 9 | fi 10 | 11 | if grep -q 'slot\.boot\.0' /mnt/boot/rauc.db; then 12 | echo "[INFO] rauc.db already contains slot information" 13 | exit 0 14 | fi 15 | 16 | echo "[INFO] Generating rauc.db from os-release data" 17 | 18 | eval "$(rauc status --output-format=shell)" 19 | 20 | if [ -z "${RAUC_SYSTEM_BOOTED_BOOTNAME}" ]; then 21 | echo "[ERROR] RAUC_SYSTEM_BOOTED_BOOTNAME is empty" 22 | exit 1 23 | fi 24 | 25 | CURRENT_SLOT_ID=$(test "${RAUC_SYSTEM_BOOTED_BOOTNAME}" = "A" && echo 0 || echo 1) 26 | 27 | . /etc/os-release 28 | 29 | cat >> /mnt/boot/rauc.db < " 7 | exit 1 8 | fi 9 | 10 | cert=$1 11 | key=$2 12 | 13 | openssl req -x509 -newkey rsa:4096 -keyout "${key}" \ 14 | -out "${cert}" -days 3650 -nodes \ 15 | -subj "/O=HassOS/CN=HassOS Self-signed Development Certificate" 16 | -------------------------------------------------------------------------------- /buildroot-external/scripts/name.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function hassos_image_name() { 4 | echo "${BINARIES_DIR}/${HASSOS_ID}_${BOARD_ID}-$(hassos_version).${1}" 5 | } 6 | 7 | function hassos_image_basename() { 8 | echo "${BINARIES_DIR}/${HASSOS_ID}_${BOARD_ID}-$(hassos_version)" 9 | } 10 | 11 | function hassos_rauc_compatible() { 12 | echo "${HASSOS_ID}-${BOARD_ID}" 13 | } 14 | 15 | function hassos_version() { 16 | if [ -z "${VERSION_SUFFIX}" ]; then 17 | echo "${VERSION_MAJOR}.${VERSION_MINOR}" 18 | else 19 | echo "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_SUFFIX}" 20 | fi 21 | } 22 | 23 | function path_boot_dir() { 24 | echo "${BINARIES_DIR}/boot" 25 | } 26 | 27 | function path_data_img() { 28 | echo "${BINARIES_DIR}/data.ext4" 29 | } 30 | 31 | function path_rootfs_img() { 32 | echo "${BINARIES_DIR}/rootfs.erofs" 33 | } 34 | -------------------------------------------------------------------------------- /buildroot-external/scripts/post-image.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # shellcheck disable=SC1090,SC1091 3 | set -e 4 | 5 | SCRIPT_DIR=${BR2_EXTERNAL_HASSOS_PATH}/scripts 6 | BOARD_DIR=${2} 7 | HOOK_FILE=${3} 8 | 9 | . "${BR2_EXTERNAL_HASSOS_PATH}/meta" 10 | . "${BOARD_DIR}/meta" 11 | 12 | . "${SCRIPT_DIR}/hdd-image.sh" 13 | . "${SCRIPT_DIR}/rootfs-layer.sh" 14 | . "${SCRIPT_DIR}/name.sh" 15 | . "${SCRIPT_DIR}/rauc.sh" 16 | . "${HOOK_FILE}" 17 | 18 | # Cleanup 19 | rm -rf "$(path_boot_dir)" 20 | mkdir -p "$(path_boot_dir)" 21 | 22 | # Hook pre image build stuff 23 | hassos_pre_image 24 | 25 | # Disk & OTA 26 | create_disk_image 27 | 28 | # Hook post image build stuff 29 | hassos_post_image 30 | -------------------------------------------------------------------------------- /scripts/check-kernel-patches.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | kernel_patches_with_version=$(find buildroot-external -type d -regextype sed -regex ".*/linux/[0-9\.]*") 4 | 5 | if [ -n "$kernel_patches_with_version" ]; then 6 | echo "" 7 | echo "WARNING: Kernel patch directories with kernel version found! Check if updates are needed." 8 | fi 9 | -------------------------------------------------------------------------------- /scripts/enter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | BUILDER_UID="$(id -u)" 5 | BUILDER_GID="$(id -g)" 6 | CACHE_DIR="${CACHE_DIR:-$HOME/hassos-cache}" 7 | ARGS="$*" 8 | COMMAND="${ARGS:-bash}" 9 | 10 | sudo mkdir -p "${CACHE_DIR}" 11 | sudo chown -R "${BUILDER_UID}:${BUILDER_GID}" "${CACHE_DIR}" 12 | sudo docker build -t hassos:local . 13 | 14 | if [ ! -f buildroot/Makefile ]; then 15 | # Initialize git submodule 16 | git submodule update --init 17 | fi 18 | 19 | # Make sure loop devices are present before starting the container 20 | sudo losetup -f > /dev/null 21 | 22 | # shellcheck disable=SC2086 23 | sudo docker run -it --rm --privileged \ 24 | -v "$(pwd):/build" -v "${CACHE_DIR}:/cache" \ 25 | -e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \ 26 | hassos:local ${COMMAND} 27 | -------------------------------------------------------------------------------- /scripts/entry.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | USER="root" 5 | 6 | # Run dockerd 7 | dockerd -s vfs &> /dev/null & 8 | 9 | 10 | # Setup local group, if not existing 11 | if [ "${BUILDER_GID:-0}" -ne 0 ] && ! getent group "${BUILDER_GID:-0}"; then 12 | groupadd -g "${BUILDER_GID}" builder 13 | fi 14 | 15 | # Setup local user 16 | if [ "${BUILDER_UID:-0}" -ne 0 ]; then 17 | useradd -m -u "${BUILDER_UID}" -g "${BUILDER_GID}" -G docker,sudo builder 18 | echo "builder ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers 19 | # Make sure cache is accessible by builder 20 | chown "${BUILDER_UID}:${BUILDER_GID}" /cache 21 | # Make sure output is accessible by builder (if anonymous volume is used) 22 | chown "${BUILDER_UID}:${BUILDER_GID}" /build/output || true 23 | USER="builder" 24 | fi 25 | 26 | if CMD="$(command -v "$1")"; then 27 | shift 28 | sudo -H -u ${USER} "$CMD" "$@" 29 | else 30 | echo "Command not found: $1" 31 | exit 1 32 | fi 33 | -------------------------------------------------------------------------------- /scripts/update-dtb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ## OVA 4 | dtc -@ -I dts -O dtb -o buildroot-external/bootloader/barebox-state-efi.dtb buildroot-external/bootloader/barebox-state-efi.dts 5 | 6 | -------------------------------------------------------------------------------- /scripts/update-firmware-rpi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -z "$1" ]; then 5 | echo "Need a commit ID!" 6 | exit 1 7 | fi 8 | echo "Use firmware: https://github.com/raspberrypi/firmware/archive/$1.tar.gz" 9 | 10 | if [ -z "$2" ] || ! [ -f "$2" ]; then 11 | echo "Need buildroot patch file!" 12 | exit 1 13 | fi 14 | 15 | patch -Rf -d buildroot -p 1 < "$2" 16 | 17 | rm -rf /tmp/rpi-firmware.tar.gz 18 | curl -Lo /tmp/rpi-firmware.tar.gz "https://github.com/raspberrypi/firmware/archive/$1.tar.gz" 19 | checksum="$(sha256sum /tmp/rpi-firmware.tar.gz | cut -d' ' -f 1)" 20 | rm -rf /tmp/rpi-firmware.tar.gz 21 | 22 | 23 | sed -i "s/+RPI_FIRMWARE_VERSION = [a-f0-9]*/+RPI_FIRMWARE_VERSION = $1/g" "$2" 24 | sed -i "s/+sha256\s*[a-f0-9]*\s*rpi-firmware-[a-f0-9]*.tar.gz/+sha256 $checksum rpi-firmware-$1.tar.gz/g" "$2" 25 | 26 | patch -d buildroot -p 1 < "$2" 27 | git commit -m "RaspberryPi: Update firmware $1" "$2" buildroot/package/rpi-firmware 28 | -------------------------------------------------------------------------------- /scripts/update-kernel-rpi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ -z "$1" ]; then 5 | echo "Need a commit ID!" 6 | exit 1 7 | fi 8 | 9 | if [ -z "$2" ]; then 10 | echo "Need a kernel version!" 11 | exit 1 12 | fi 13 | 14 | defconfigs=(buildroot-external/configs/{rpi*,yellow}_defconfig) 15 | sed -i "s|BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION=\"https://github.com/raspberrypi/linux/.*\"|BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION=\"https://github.com/raspberrypi/linux/archive/$1.tar.gz\"|g" "${defconfigs[@]}" 16 | sed -i "s/| \(Raspberry Pi.*\|Home Assistant Yellow\) | .* |/| \1 | $2 |/g" Documentation/kernel.md 17 | git commit -m "RaspberryPi: Update kernel to $2 - $1" "${defconfigs[@]}" Documentation/kernel.md 18 | 19 | ./scripts/check-kernel-patches.sh 20 | 21 | echo 22 | echo "WARNING: bumping RPi kernel usually requires bump of rpi-firmware" 23 | echo "package to version from the corresponding branch in raspberrypi/firmware" 24 | echo "repository (which is usually the stable branch), namely because the DT" 25 | echo "overlays are copied from this repository" 26 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | # QEMU images 2 | *.qcow2 3 | 4 | # Generated logs 5 | /junit_reports 6 | /lg_logs 7 | 8 | # Byte-compiled / optimized / DLL files 9 | __pycache__/ 10 | *.py[cod] 11 | *$py.class 12 | 13 | # Virtualenv 14 | venv 15 | -------------------------------------------------------------------------------- /tests/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | timeout_method = signal 3 | -------------------------------------------------------------------------------- /tests/qemu-strategy.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | main: 3 | resources: [] 4 | 5 | drivers: 6 | - QEMUDriver: 7 | qemu_bin: qemu-x86_64 8 | machine: pc 9 | cpu: qemu64 10 | memory: 1G 11 | extra_args: "-snapshot -accel kvm" 12 | nic: user,model=virtio-net-pci 13 | disk: disk-image 14 | bios: bios 15 | - CustomTimeoutShellDriver: 16 | login_prompt: 'homeassistant login: ' 17 | username: 'root' 18 | prompt: '# ' 19 | login_timeout: 300 20 | command_timeout: 300 21 | - QEMUShellStrategy: {} 22 | 23 | tools: 24 | qemu-x86_64: /usr/bin/qemu-system-x86_64 25 | 26 | images: 27 | disk-image: ./haos.qcow2 28 | bios: /usr/share/ovmf/OVMF.fd 29 | 30 | 31 | imports: 32 | - qemu_shell_strategy.py 33 | -------------------------------------------------------------------------------- /tests/requirements.txt: -------------------------------------------------------------------------------- 1 | labgrid==24.0.1 2 | pytest-dependency==0.6.0 3 | pytest-timeout==2.3.1 4 | -------------------------------------------------------------------------------- /tests/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | cd "$(dirname "$0")" 6 | 7 | if [ -z "$GITHUB_ACTIONS" ] && [ -z "$VIRTUAL_ENV" ]; then 8 | # Environment should be set up in separate GHA steps - which can also 9 | # handle caching of the dependecies, etc. 10 | python3 -m venv venv 11 | # shellcheck disable=SC1091 12 | source venv/bin/activate 13 | pip3 install -r requirements.txt 14 | fi 15 | 16 | pytest --lg-env qemu-strategy.yaml --lg-log=lg_logs --junitxml=junit_reports/tests.xml "$@" 17 | --------------------------------------------------------------------------------