Compare commits

...

128 Commits
6.2 ... 7.3

Author SHA1 Message Date
Stefan Agner
7bb4d86809 Bump version to 7.3 2022-02-02 18:02:44 +01:00
Stefan Agner
058fcf5b1a Add Broadcom BNX2/BNX2X firmware (#1732) (#1735)
* buildroot e2ac9b528a...8bbb32c16a (1):
  > package/linux-firmware: Add Broadcom BNX2 firmware

* Add Broadcom BNX2/BNX2X firmware (#1732)

Signed-off-by: Stefan Agner <stefan@agner.ch>
2022-02-02 17:44:34 +01:00
Stefan Agner
1cb597675f Linux: Update kernel 5.10.96 (#1736) 2022-02-02 17:44:27 +01:00
Stefan Agner
6e616833a4 Bump raspberry pi kernel firmware to 1.20220120 (#1731)
* Bump buildroot

* buildroot 3cedcad616...e2ac9b528a (1):
  > package/rpi-firmware: bump version to 1.20220120

* RaspberryPi: Update kernel 5.10.92 - 1.20220120
2022-02-02 17:44:19 +01:00
Jens Maus
d6e1bb2db4 Integrate dual HomeMatic+HomeMatic IP support for HmIP-RFUSB (#1683)
* updated generic_raw_uart to latest version which comes with dualcopro
support for the HmIP-RFUSB usb rf-sticks by eQ3/ELV.

* remove 99-hmip-rfusb.rules to keep a HmIP-RFUSB device free from being
occupied by the cp210x driver but use the new generic_raw_uart support
instead allowing for advanced dualcopro support for HomeMatic/BidCos-RF
and homematicIP support in parallel.
2022-02-02 17:44:07 +01:00
Stefan Agner
94266e652c Bump version to 7.2 2022-01-17 14:09:49 +01:00
Stefan Agner
4616806dbf Add Intel SoC sound drivers (#1690) (#1715) 2022-01-17 14:09:21 +01:00
Stefan Agner
10a4710248 Fix reboot on ODROID-N2 (again) (#1722)
To make HDMI CEC work, we have to compile MESON_DRM as a module
(see #1717). However, this essentially reverts #1347, which fixed the
reboot problem by compiling the driver into the kernel.

Hence we need to reintroduce the earlier fix from #1345, which reverts
the offending commit causing the reboot problem.
2022-01-17 14:09:12 +01:00
Stefan Agner
fc507a61ab Fix HDMI CEC on ODROID-N2(+) (#1717)
Build HDMI graphics driver as a module which seems to fix HDMI CEC on
ODROID-N2(+).
2022-01-17 14:09:12 +01:00
Stefan Agner
0719bd1c4d Disable DW-HDMI CEC driver to avoid non-working CEC device file (#1216) (#1714)
The DW HDMI CEC implementation is not used in Amlogic SoC. Disable the
driver to avoid it claiming /dev/cec0 and getting used by user space
tools.

See also: https://lore.kernel.org/all/20210416092737.1971876-3-narmstrong@baylibre.com/T/
2022-01-17 14:08:29 +01:00
Stefan Agner
faedfa8571 Remove reference to non-existing patch directory to fix ODROID-C2 build (#1718) 2022-01-17 14:08:13 +01:00
Stefan Agner
60d1a5bb31 Linux: Update kernel 5.10.91 (#1713) 2022-01-17 14:07:27 +01:00
Stefan Agner
93b4997989 Check if Busybox supports oflag (#1692) (#1694)
* Check if Busybox supports oflag

It seems that Busybox' dd shipped with OS release 5 and earlier does not
support oflag. Check if the flag is supported before making use of it.

* Exit if a command in the update scripts returns an error

This makes sure that the update isn't marked as successful in case there
is an error in the update script.
2022-01-04 14:40:53 +01:00
Stefan Agner
372d604f7c Bump version to 7.1 2021-12-29 16:51:06 +01:00
Stefan Agner
bf274e7634 Bump buildroot (#1700)
* buildroot 4c6c8fb767...3cedcad616 (1):
  > Merge tag '2021.08.3' into 2021.08.x-haos
2021-12-29 16:50:30 +01:00
Stefan Agner
4529d91e86 ODROID XU4: Update U-Boot on eMMC boot partition (#1699)
* ODROID XU4: Update U-Boot on eMMC boot partition

Update the U-Boot on the eMMC boot partition if present. Only write the
first megabyte as the eMMC boot partition might be smaller than the SPL
image and only the first megabyte is occupied by FW/BL1/BL2/TZSW (see
https://wiki.odroid.com/odroid-xu4/software/partition_table#tab__odroid-xu341).
2021-12-29 15:40:56 +01:00
Stefan Agner
0d52944262 Update Raspberry Pi kernel and firmware to oldstable_20211201/71bd3109/Linux 5.10.63 (#1119) (#1696)
* Bump buildroot

* buildroot 907739ed48...4c6c8fb767 (1):
  > package/rpi-firmware: bump version to 71bd3109

* RaspberryPi: Update kernel 5.10.63 - oldstable_20211201

* Add Raspberry Pi Zero 2 W device tree
2021-12-29 15:40:45 +01:00
Stefan Agner
7b54b565c5 Use LSI Logic SCSI controller (#1695)
* Use LSI Logic SCSI controller in vmdk descriptor as well

For some reason, the vmdk disk format's descriptor contains the
controller type as well. By default, qemu-img sets it to "ide", which
seems not optimal especially for VMware's ESXi. Set adapter type to
commonly supported "lsilogic".

* Move ova image generation to hdd-image.sh
2021-12-29 15:37:10 +01:00
Stefan Agner
2a255728e3 Linux: Update kernel 5.10.88 (#1693) 2021-12-29 15:36:39 +01:00
Stefan Agner
70f1a57a62 Adjust ova to support VMware ESXi (#826) (#1674)
* Use OpenSSL to generate OVA manifest file (#826)

It seems that sha256sum adds a space after the hash algorithm which
causes "Invalid OVF checksum algorithm" on certain VMware virtualization
products.

Using OpenSSL avoids the space and makes the manifest file compatible
wiht VMware products.

* Use Buildroot provided OpenSSL binary

* Use SCSI controller by default
2021-12-29 15:35:32 +01:00
Stefan Agner
33ce44a8c2 Avoid race condition when fetching containers during build (#1671)
* Avoid race condition when fetching containers during build

So far only a single builder was active for each architecture. This
toghether with the naming scheme to include architecture/machine name
made sure that an image could only be fetched or used by a single
builder.

However, since most systems are now aarch64, multiple runners are now
active for a single architecture. This makes it necessary to lock
fetching/coping of container images to avoid race conditions.
2021-12-29 15:34:34 +01:00
Stefan Agner
783307cf63 Add patch for iwlwifi to fix beacon timeout (#1655) (#1670)
Allow to configure missed beacons using the iwlwifi.beacon_timeout
kernel parameter.
2021-12-29 15:34:16 +01:00
Stefan Agner
3ffdc0fbf4 rtl8812au: use buildroot provided aircrack-ng driver (#1660) (#1669)
Use rtl8812au driver provided by buildroot. This uses a newer verison of
the v5.6.4.2 branch which works with newer kernel and seems to be the
recommended branch.

Note: It seems that our buildroot package currently fails to properly
deploy the 88XXau.ko kernel module. Instead of fixing our version, just
move to the buildroot version.
2021-12-29 15:33:11 +01:00
geftactics
783df55c0d Update download URL for package intel-e1000e (#1668) 2021-12-29 15:32:25 +01:00
Stefan Agner
a6e0e02033 Set deployment type to production 2021-12-03 16:57:11 +01:00
Stefan Agner
caee84c471 Linux: Update kernel 5.10.83 2021-12-03 16:45:14 +01:00
Alexander Reinert
d78743309a Updated to latest generic_raw_uart package (#1653) 2021-12-03 16:10:23 +01:00
Stefan Agner
b84e6da15f Enable Broadcom and Atheros Ethernet drivers (#1650) (#1651) 2021-12-03 16:10:20 +01:00
Stefan Agner
2b34503524 Update Raspberry Pi kernel and firmware to 1.20211029/Linux 5.10.63 (#1645)
* Bump buildroot

* buildroot a46737692c...907739ed48 (1):
  > package/rpi-firmware: bump version to 1.20211029

* RaspberryPi: Update kernel 5.10.63 - 1.20211029
2021-11-11 12:10:21 +01:00
Stefan Agner
b1f6c3a87a Bump buildroot to 2021.08.2 (#1643)
* buildroot 5b5dff3136...a46737692c (1):
  > Merge tag '2021.08.2' into 2021.08.x-haos
2021-11-10 22:53:43 +01:00
Stefan Agner
d065287acd Linux: Update kernel 5.10.78 (#1642) 2021-11-10 22:08:33 +01:00
Stefan Agner
cb8b2e3f5f Drop Raspberry Pi 1/Zero W support (#1638)
These boards support the rather ancient ARMv6 architecture only. We
officially stopped supporting them already two releases ago, its time to
say goodbye.
2021-11-10 14:50:37 +01:00
Stefan Agner
1638097485 Use GitHub issue form (#1637)
* Use GitHub issue form

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-11-09 14:28:16 +01:00
Stefan Agner
b1c59f4f6e Add label action workflow (#1631)
* Add label action workflow
2021-11-05 10:17:41 +01:00
Stefan Agner
5fd943c936 Expose systemd-journal-gatewayd to Supervisor (#1627)
* Add systemd-journal-remote to the image

This allows to access journald's log from within Supervisor and expose
more system logs to users.

* Allow to access systemd-journal-gatewayd from Supervisor

Create a systemd-journal-gatewayd.socket service using a Unix socket and
bind mount it into the Supervisor container. This allows to query
systemd-journald from Supervisor directly.
2021-11-04 15:38:35 +01:00
Stefan Agner
e63aa1a5f4 Update Linux kernel patches for Home Assistant Amber (#1626)
Support the user LED available on the latest revision of the PCB. Also
rebase the patchset ontop of the Raspberry Pi kernel 1.20210928.
2021-11-03 00:54:15 +01:00
Stefan Agner
06a1c21b82 Support Realtek 8152/8153/8156 USB Ethernet adapter (#1604) (#1625)
* Bump buildroot

* buildroot 73991f0fee...5b5dff3136 (1):
  > package/linux-firmware: Add RTL8152/8153/8156 firmware

* Enable Realtek 8152/8153/8156 USB Ethernet adapter support

Enable kernel driver and install firmware for Realtek USB Ethernet
adapter. While at it, also enable some other common USB Ethernet
adapters which don't require firmwares.
2021-11-02 23:53:48 +01:00
Pascal Vizeli
8c1ff000f0 Simplify AppArmor with new OS-Agent SU (#1622) 2021-11-01 15:24:28 +01:00
Stefan Agner
8058392043 Compile Btrfs support as a module (#1623)
We don't use Btrfs as root file system, so there is no need to have it
compiled in by default.
2021-11-01 14:33:42 +01:00
Stefan Agner
6a8b69f793 Update Raspberry Pi kernel and firmware to 1.20211007/Linux 5.10.63 (#1618)
* RaspberryPi: Update kernel 5.10.63 - 1.20211007

* Bump buildroot

* buildroot 5ffdf6ccc5...73991f0fee (1):
  > package/rpi-firmware: bump version to 1.20211007
2021-10-28 10:50:24 +02:00
Stefan Agner
fe4468d789 Reintroduce systemd patches to fix hostname configuration (#1617)
Even though upstream changed the way hostname gets set, it still
requires changes to make it work on a bind mounted /etc/hostname file.
2021-10-28 01:39:16 +02:00
annuges
323cba6777 Add support for Btrfs (#1612)
Add support for Btrfs file system to the kernel to allow host OS and Add-ons to mount external disks formatted with it.
2021-10-28 01:35:37 +02:00
Stefan Agner
ff07728fa3 Remove git submodules before git checkout (#1611)
If a git submodule is converted to a regular git directory (e.g. when
moving from dev -> rel-6 branch), the directory is not properly cleaned
by the checkout action.

Remove the git submodule .git files which makes sure that git properly
reinitialize subdirectories, even if they have been a submodule before.

See also: https://github.com/actions/checkout/issues/624
2021-10-27 11:02:24 +02:00
Stefan Agner
e83e6f4712 Add Amber as new machine (#1569)
* Add Amber machine

Introduce a new machine for Amber. Store it under Raspberry Pi boards
since Amber is based on the Raspberry Pi Compute Module 4. This way we
can reuse existing scripts.

* Add kernel patches for Amber

Add kernel patches which add a custom device tree for Amber.

* Add device wipe support via GPIO button

Allow to wipe the device by pressing and holding the red button.

* Enable serial console by default

Enable serial console on the on-board USB-to-UART adapter as well as on
the GPIO header.

* Use 64-bit mode by default

Support only 64-bit for Amber, it is mature enough.
2021-10-22 11:25:50 +02:00
Stefan Agner
c7ec9468c0 Remove developer documentation (#1580)
Remove developer documentation in favor of the developer docs website.
2021-10-21 16:57:01 +02:00
Stefan Agner
b72acfa648 Synchronize Raspberry Pi config.txt with Raspberry Pi OS (#1601)
It seems that Raspberry Pi OS by default applies an overlay for
Raspberry Pi 4. Apply this change to the HAOS config.txt as well.
2021-10-19 01:43:59 +02:00
Stefan Agner
74fe7d4cb8 Make AppArmor independent of Supervisor service (#1592)
Currently the hassos-apparmor.service wants the
hassos-supervisor.service and vice-versa. This is unnecessary and leads
to activation of hassos-supervisor.service when reload/restart
hassos-apparmor.service (Supervisor is doing that on startup).

Make hassos-apparmor.service independent and add dependency as well as
ordering from hassos-supervisor.service side.
2021-10-15 01:36:02 +02:00
Stefan Agner
ce566167f2 Improve OS logging (#1590)
* Avoid duplicate log entries

So far the hassos-supervisor.service starts the hassos-supervisor script
which in turn attaches to the Supervisor container. This causes stdout
and stderr to be forwarded to the service unit, which in turn logs it in
the journal.

However, Docker too logs all stdout/stderr to the journal through the
systemd-journald log driver.

Do not attach to the Supervisor container to avoid logging the
Supervisor twice.

Note that this no longer forwards signals to the container. However, the
hassos-supervisor.service uses the ExecStop= setting to make sure the
container gets gracefully stopped.

* Use image and container name as syslog identifier

By default Docker users the container id as syslog identifier. This
leads to log messages which cannot easily be attributed to a particular
container (since the container id is a random hex string).

Use the image and container name as syslog identifier.

Note that the Docker journald log driver still stores the container id
as a separate field (CONTAINER_ID), in case the particular instance need
to be tracked.
2021-10-13 16:12:05 +02:00
Stefan Agner
b211c653c7 Fix y2038 file system warnings (#1589)
* Bump buildroot

* buildroot 3c5f87185d...5ffdf6ccc5 (1):
  > package/e2fsprogs: Create y2038 capable file systems by default

* Use inode size of 256 bytes for overlayfs

By default older versions of mkfs.ext4 create file systems with inode
size of 128 bytes. This does not allow for 64-bit timestamps, which
leads to y2038 compatibility warnings. Use 256 bytes inodes.
2021-10-13 16:07:13 +02:00
Stefan Agner
53dcfd3134 Fix fallout from Buildroot 2021.08.1 update (#1588)
* Remove dt-utils patches applied upstream

All patches are now applied upstream. With 2021.03.0 release no more
downstream patches are required.

* Bump buildroot to fix linux-firmware build issues

* buildroot f10577b836...3c5f87185d (3):
  > package/linux-firmware: add rtl8761b/rtl8761bu firmware
  > package/linux-firmware: bump version to 20210919
  > Revert "package/linux-firmware: add rtl8761b/rtl8761bu firmware"
2021-10-12 11:49:58 +02:00
Stefan Agner
eed6302ad8 Bump buildroot to 2021.08.1 (#1587)
* Bump to Buildroot 2021.08.1

Move to Buildroot 2021.08.1 using the 2021.08.x-haos branch. Some
patches on the previous branch 2021.02.x-haos have been applied upstream
meanwhile. Others required rather trivial rebasing.

This latest Buildroot release brings new versions of the following
components:
 - glibc 2.33
 - systemd 249.3
 - Networkmanager 1.32.2
 - BlueZ 5.60
 - Docker 20.10.8

The patch "Fix dhcp client" seems not to be necessary anymore. The
directory /var/lib/dhcp seems not in use when NetworkManager invokes
dhclient. It seems the leases which are typically stored in that
directory are managed inside NetworkManager.

* buildroot 2021.08.1..2021.08.x-haos (6)
  > package/rpi-firmware: bump version to 1.20210805
  > package/rpi-wifi-firmware: bump version to 883b726
  > package/linux-firmware: add rtl8761b/rtl8761bu firmware
  > package/docker-proxy: bump version to 64b7a4574d14
  > package/rpi-firmware: Allow to deploy multiple firmware files
  > network-manager: wpa_supplicant

* Bump Raspberry Pi Bluetooth helper scripts

With the update to Buildroot 2021.08.1, the bthelper fails with an error
org.bluez.Error.Busy when trying to power off the device. Presumably this
is a race condition which surfaced due to a change in Bluez 5.60:
348feb005a

Oct 11 14:32:21 homeassistant systemd[1]: Reached target Bluetooth Support.
...
Oct 11 14:32:21 homeassistant bluetoothd[412]: Bluetooth management interface 1.18 initialized
Oct 11 14:32:21 homeassistant systemd[1]: Started Raspberry Pi bluetooth helper.
Oct 11 14:32:21 homeassistant bthelper[417]: Raspberry Pi BDADDR already set
Oct 11 14:32:21 homeassistant bthelper[426]: [58B blob data]
Oct 11 14:32:21 homeassistant bthelper[426]: [59B blob data]
Oct 11 14:32:21 homeassistant bthelper[426]: Failed to set power off: org.bluez.Error.Busy
Oct 11 14:32:21 homeassistant systemd[1]: bthelper@hci0.service: Main process exited, code=exited, status=1/FAILURE
Oct 11 14:32:21 homeassistant systemd[1]: bthelper@hci0.service: Failed with result 'exit-code'.

The latest version of the pi-bluetooth package introduced a sleep before
powering off the device, however, presumably for a different reason:
ae2efdeee8 (diff-609c8a23261988c47afd40be9b012feb1d167de8761c1301e44e1864635c19e3)

Anyways, this latest version seems to also fix the above mentioned race
condition.
2021-10-12 01:08:04 +02:00
Stefan Agner
e0e270df1a Wait for Docker daemon (#1586)
Sometimes the first command after starting the Docker daemon container
fails, presumably because the container did not start yet. Wait until
the Docker daemon is ready.
2021-10-11 16:06:36 +02:00
TJ Horner
f012f09d4f Change barebox boot configs to support USB booting (#1575) 2021-10-07 21:43:49 +02:00
Stefan Agner
e819f05927 Fix Compute Module 4 USB driver (#1281) (#1577)
The BCM2711 has two USB 2.0 IPs: A Broadcom XHCI USB 2.0 controller and
a Synopsys DWC2 USB 2.0 Host/Device controller. When USB boot is used
the former is active. Make sure the driver has the correct device tree
compatible.
2021-10-07 14:02:04 +02:00
Stefan Agner
e916d9f93c Move patch to fix U-Boot 2021.10 build (#1576)
We only have a single U-Boot version currently, so there is no value in
storing the patch file in a version specific directory. This makes sure
U-Boot 2021.10 final release also has fileenv support.
2021-10-07 14:01:55 +02:00
Stefan Agner
d8dfa88fb8 Replace Stale Bot with Stale GitHub Action (#1573) 2021-10-06 12:18:38 +02:00
Stefan Agner
565c473a75 Raspberry Pi U-Boot fixes (#1572)
* Add NVMe and XHCI USB driver fix for Raspberry Pi

Add patch which fixes NVMe read reliability and allows to compile the
XHCI USB driver (for Compute Module 4).

* Enable Broadcom XHCI driver for Compute Module 4

The BCM2711 has two USB 2.0 IPs: A Broadcom XHCI USB 2.0 controller and
a Synopsys DWC2 USB 2.0 Host/Device controller. When USB boot is used
the former is active. Make sure U-Boot has the driver built-in for that
IP.
2021-10-05 19:16:16 +02:00
Stefan Agner
a19870947a Bump U-Boot to stable release 2021.10 (#1571) 2021-10-05 19:15:59 +02:00
Stefan Agner
bdc319d3df Use file for cmdline.txt (#1568)
* Remove duplicate config.txt copy statement

* Use static cmdline.txt file

Instead of dynamically creating cmdline.txt use a static version of it.
This aligns with other boot loader/firmware configuration files and makes
it easier to customize the file per board.
2021-10-04 14:38:52 +02:00
Stefan Agner
8d69f395c2 Support board specific RPi firmware configuration (#1567)
Support optional board specific default RPi firmware configuration file
(config.txt). Also rename from boot-env.txt to config.txt since this
file is not read by the U-Boot boot loader but the Raspberry Pi specific
boot firmware.
2021-10-04 11:51:31 +02:00
Stefan Agner
8049dfb30c Bump buildroot (#1565)
* buildroot f0b9df907a...291b4156c7 (2):
  > Merge tag '2021.02.5' into 2021.02.x-haos
  > package/rpi-firmware: bump version to 1.20210831
2021-10-04 10:31:02 +02:00
Stefan Agner
a4edece719 Linux: Update kernel 5.10.70 (#1564) 2021-10-04 10:06:37 +02:00
Stefan Agner
762f098c14 Use skopeo and DIND to download container images (#1561)
* Use skopeo to download container images

Separate container download from image build. This will allow to share
the downloaded images between multiple builds.

We won't store the Supervisor container with the version tag, just with
the latest tag. This allows to simplify the procedure a bit. It seems
there is no downside to this approach.

* Use official Docker in Docker images to build data partition

Instead of building our own Debian based image let's use the official
Docker in Docker image. This avoids building an image for the hassio
data partition and speeds up build as well.

This calls mount commands using sudo to mount the data partition as part
of the buildroot build now. This is not much different from before as
mount has been called as root inside the container, essentially equates
to the same "isolation" level.

* Use image digest as part of the file name

The landing page has no version information in the tag. To avoid
potentially source caching issues, use the digest as part of the file
name.
2021-10-04 10:06:26 +02:00
Stefan Agner
693507aaca Bump build container to Debian bullseye (#1560) 2021-09-30 09:47:20 +02:00
Stefan Agner
b7bbb63a26 Support development builds in pull-requests (#1464)
Use the "run-dev-build" label to trigger a development build. This will
only generate a build for the machines the PR has been tagged with.
2021-09-29 22:04:30 +02:00
Stefan Agner
631c0c5d53 Make sure Intel BT gets built as a module (#1558)
CONFIG_BT_HCIBTUSB selects CONFIG_BT_INTEL. That causes CONFIG_BT_INTEL
to be built-in instead of being built as a kernel module.

When the driver is built-in, loading firmware fails during early boot
with the following error message:
[ 1.058941] bluetooth hci0: Direct firmware load for intel/ibt-17-16-1.sfi failed with error -2

Make sure the driver is built as a module which should fix firmware
loading.
2021-09-29 10:13:16 +02:00
Stefan Agner
55568f597f Bump OS Agent to 1.2.1 (#1559)
This should make the D-Bus method ReloadDevice working and show the
current data disk correctly.
2021-09-29 09:58:15 +02:00
Stefan Agner
7592143322 Add NVMe boot support for RPi Compute Module 4 (#1557)
* Add U-Boot patches for NVMe boot support

Add NVMe to boot order. Fix NVMe support on 64-bit Raspberry Pi devices.
This is useful for Raspberry Pi Compute Module 4 IO Board where a native
NVMe can be plugged in.

* Enable NVMe support for Raspberry Pi 4

Our machine configuration rpi4 and rpi4_64 work on the Compute Module IO
Board. In this configuration a NVMe SSD can be used. Therefor, enable
support for NVMe in the Raspberry Pi 4 configurations.

Note: Regular Raspberry Pi devices will not notice a difference as the
"nvme scan" command will return very quickly and not find a NVMe on the
PCIe bus.

* Use built-in NVMe support in Kernel for NVMe boot support
2021-09-28 10:51:43 +02:00
Stefan Agner
008fb3fb74 Bump to U-Boot 2021.10-rc5 (#1556)
The bump to U-Boot 2021.10-rc5 also makes quite some patches obsolete
since they are already part of U-Boot.

This also removes a patch which disables framebuffer support on
Raspberry Pi: Framebuffer support seems to work fine in todays
U-Boot/Linux combination. It can help debug boot problems on Raspberry
Pi devices. Without the patch framebuffer support will be enabled by
default.
2021-09-28 10:02:52 +02:00
Pascal Vizeli
a7c237f93d Update OS-Agent 1.2.0 & adjust datadisk support (#1554)
* Update OS-Agent & adjust datadisk support

* Update Documentation/partition.md

Co-authored-by: Stefan Agner <stefan@agner.ch>
2021-09-28 09:54:04 +02:00
Stefan Agner
3d42d3690b Add USB stall handling for U-Boot (#1011, #1544) (#1553)
Some USB devices cause the USB stack to get stuck with a stall error.
This adds a patch which recovers from this situation.

This avoids an U-Boot crash when Arduino Mega R3 devices are connected,
which cause an USB stall when trying to read the product string.
2021-09-27 14:44:36 +02:00
Christian Knittl-Frank
1e7cd66165 Fix datactl for NVMe devices (#1550)
Add "p" in partition names ending with digit.

See https://community.home-assistant.io/t/datactl-help/276117 and https://unix.stackexchange.com/a/500910/334933
2021-09-21 00:24:08 +02:00
Stefan Agner
7d187405de Fix hybrid spelling (#1548)
Fix misspelled word "hybrid" for hybrid GPT/MBR partition tables.
2021-09-20 13:44:45 +02:00
Stefan Agner
66d5957310 Wait until Internet is available before starting AppArmor (#1547)
This makes sure that internet connectivity is available to replace the
AppArmor configuration in case the device has been wiped.
2021-09-20 13:44:09 +02:00
Stefan Agner
7ca4e90885 Fix buffer overflow when initialize USB keyboard in U-Boot (#1538) (#1541)
When a USB keyboard is connected to Raspberry Pi 32-bit versions of
U-Boot crashed in certain situations just before booting Linux. This
seems to be cause by a buffer overflow when removing the USB keyboard
before hand-over to Linux.
2021-09-07 21:56:37 +02:00
Stefan Agner
7d5ebfcd31 Linux: Update kernel 5.10.62 (#1536) 2021-09-06 14:05:14 +02:00
Stefan Agner
5af4942607 Add USB DS9490R 1-wire master support (#1513) (#1527)
* Add USB DS9490R 1-wire master support (#1513)

* Add 1-Wire support via GPIO as well
2021-09-04 14:47:02 +02:00
Jens Maus
97dffedbcd Add a buildroot utils/check-package linter check to pr-checks.yml (#1523)
Add buildroot utils/check-package check to the pr-checks.yml workflow.
It checks for common errors/mistakes when creating own buildroot
packages. Also fixed all warnings this utility output for our existing packages.
2021-09-04 10:46:55 +02:00
Stefan Agner
b6b8e3b1dc Fix U-Boot USB initialization failure (#1203, #1490) (#1529)
Add a patch to fix a U-Boot issue causing troubles when enumerating USB
devices (required when booting from USB devices).
2021-09-03 16:33:47 +02:00
Stefan Agner
33280dc4cd Linux: Update kernel 5.10.61 for ODROID-N2 (#1512) (#1528)
* Linux: Update kernel 5.10.61 for ODROID-N2 (#1512)

Update the kernel to 5.10.61 for ODROID-N2 and fix the update script
to update kernel for ODROID-N2 next time too.

* Move ODROID kernel patches to non-kernel version specific directory
2021-09-03 13:44:42 +02:00
Stefan Agner
0d31ddfa43 Add Mediatek MT7601U support (#1526) 2021-09-03 01:18:26 +02:00
Stefan Agner
6bc5c3e5d0 Increase minimal free memory for Raspberry Pis (#1525)
The minimal memory reserved parameter vm.min_free_kbytes should be
between 1-3% according to RedHat.

However, the kernel by default reserves around 3MB (e.g. only 3285 on a
32-bit Raspberry Pi 4 2GB installation). This seems to be too low for
network intensive applications such as ours: Under memory pressure
"page allocation failure" on various orders have been observed.

Raspberry Pi OS uses a fixed value of 16MB. Follow this setting for now.

Note: We cannot set this globally for Home Assistant: x86-64 machines
can have quite a bit more memory, which also requires increased
min_free_kbytes parameter. ODROID-N2 on the other hand uses transparent
huge pages: If enabled, the kernel requires higher min_free_kbytes
values, and sets those also by default (e.g. on ODROID-N2+ with 4GB
memory its set to 22528 by default).
2021-09-03 00:28:33 +02:00
Jens Maus
9582183458 Update eq3_char_loop and rpi-rf-mod package to latest (#1517)
Update eq3_char_loop and rpi-rf-mod package to latest versions. Add proper hash files accordingly.
2021-09-02 09:54:38 +02:00
Jens Maus
57d7059dae updated generic_raw_uart to latest 1.20 version. (#1516) 2021-09-02 09:51:13 +02:00
Stefan Agner
50749052ae Linux: Update kernel 5.10.61 (#1512) 2021-08-26 19:35:25 +02:00
Stefan Agner
222cfff8b8 Bump buildroot (#1511)
* buildroot c92d04a431...f0b9df907a (1):
  > Merge tag '2021.02.4' into 2021.02.x-haos
2021-08-26 19:16:30 +02:00
Stefan Agner
a504869cbb Add Intel WiFi firmwares (#1505) (#1506)
Add all available Intel WiFi firmwares.
2021-08-26 17:54:03 +02:00
Rob VDM
5bb42ff43c Add support for Keyspan USB-Serial adapters (#1509) 2021-08-19 12:00:28 +02:00
Stefan Agner
cbce0f2a2e Add Khadas VIM3 to GitHub Actions (#1498)
* Add Khadas VIM3 to GitHub Actions/Issue Template
2021-08-06 14:45:51 +02:00
Stefan Agner
6c3bcb708f Enable HDMI CEC drivers for ODROID-N2 (#1216) (#1497) 2021-08-06 14:35:41 +02:00
Stefan Agner
ac407a6679 Add Khadas VIM3 (#1473)
* Add Khadas VIM3

Add Khadas VIM3 board support.

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2021-08-06 14:14:09 +02:00
Stefan Agner
f47b371f23 Fix Ralink RT73 package selection (#1496) 2021-08-06 11:01:43 +02:00
marengaz
ecfb744fe7 Typo (#1495) 2021-08-05 18:32:15 +02:00
Stefan Agner
511169b31b Bump buildroot (#1486)
* buildroot c8de13c113...c92d04a431 (1):
  > package/rpi-firmware: bump version to 1.20210527
2021-07-28 19:13:37 +02:00
Stefan Agner
df167910e1 Add Bluetooth firmware file for Raspberry Pi 400 (#1469) (#1484) 2021-07-28 18:04:50 +02:00
Stefan Agner
965198e8a1 Bump buildroot (#1482)
* buildroot f358c8ba53...c8de13c113 (1):
  > package/rpi-wifi-firmware: bump version to 883b726
2021-07-28 18:02:58 +02:00
Stefan Agner
c8f6c6c2b0 Add firmware for Realtek 87xx/88xx Bluetooth devices (#1427) (#1480) 2021-07-27 23:56:23 +02:00
Stefan Agner
99319542b9 Enable support for Ralink rt27xx/rt28xx/rt30xx and rt73 devices (#1443) (#1479)
This includes device support for RT2870 or RT5572 among many others.
2021-07-27 23:48:33 +02:00
Stefan Agner
2c9ce139d4 Remove duplicated patch file (#1477)
The patch file is already present in the board specific patch directory.
2021-07-27 23:48:25 +02:00
Stefan Agner
720390862a board: hardkernel: Fix random crash on Linux kernel 5.10 and newer (#1476)
Don't fail adding reserved memory when a memory region already has been
reserved (e.g. via  memreserve). This avoids conflicting no-map setting
and makes sure memory is properly reserved.
2021-07-26 17:29:19 +02:00
Stefan Agner
be3afe8b68 Update to Linux 5.10.53 (#1475)
* Linux: Update kernel 5.10.53

Move back to the LTS kernel 5.10.

* Remove ODROID-N2 specific kernel update script
2021-07-26 17:25:01 +02:00
Stefan Agner
bdc9909117 Improve Xen support (#1459)
* Enable some useful kernel configurations

* Add xe-guest-utilities for better Xen support

Add guest utilities and make sure the Xen guest daemon gets started
when running under Xen virtualization.
2021-07-17 02:20:57 +02:00
Stefan Agner
54fa9899eb Avoid using tar when uploading dev builds (#1462)
* Avoid using tar when uploading dev builds

The GitHub action to upload the images to the os-builds server uses
tar before uploading. This creates unnecessary copies and takes a while.
Switch to a GitHub action which uploads the images using rsync instead.
2021-07-14 13:30:29 +02:00
Stefan Agner
c58a568f64 Remove original images when creating zip (#1461)
Other compression methods remove the original image file at compression.
Add the -m (move) command to zip to do the same when compressing with
zip. This saves some space in the builds image/release directory.
2021-07-14 09:51:39 +02:00
Stefan Agner
ad8ee5610d RaspberryPi: Update kernel 5.10.17 - raspberrypi-kernel_1.20210527-1 (#1456) 2021-07-12 16:07:04 +02:00
Stefan Agner
1ef4d43d4e Use sparse file for pre-composed data partition (#1454) 2021-07-12 16:06:53 +02:00
Stefan Agner
d40fa3beea Ignore build output directory (#1453)
Avoid Docker sending the complete build output directory when trying to
build the builder image.
2021-07-09 16:16:34 +02:00
Stefan Agner
b03482996f Drop superseeded CRDA utility (#1452)
The CRDA (Central Regulatory Domain Agent) utility has been used as a
user space helper to load regulatory information for WiFi drivers.
However, since Linux 4.15 the kernel can load the regulatory information
directly from a signed firmware file "regulatory.db".

The regulatory.db file is provided by the WIRELESS_REGDB package, which
has been already installed since its a dependency of CRDA.

Drop CRDA and select WIRELESS_REGDB package explicitly to make sure the
regulatory.db file is present.
2021-07-09 16:12:03 +02:00
Stefan Agner
0c6888cdd0 buildroot: package/lvm2: install dmsetup only (#1449)
LVM2 is not really required in the embedded use case. Opt out of
installing the standard installation which will install only dmsetup.
This requires a backported fix for the lvm2 package to not install
unnecessary systemd services.

Fixes: #1448
2021-07-08 19:43:17 +02:00
Pascal Vizeli
269246c412 Using image name from version file (#1437)
* Using image name from version file

* Use jq for arch/machine substitution

Co-authored-by: Stefan Agner <stefan@agner.ch>
2021-07-08 19:43:03 +02:00
Stefan Agner
6c79ce0f98 Use git submodule for buildroot (#1445)
* Drop buildroot from git repository

Manage buildroot in a separate git repository and use a git submodule
to include it into the HAOS source tree.

This makes it easier to manage changes to buildroot since it can be
managed by git. A buildroot fork repository is being maintained with
the changes we currently have. It makes the buildroot-patches unnecessary
and should make it easier to rebase and upstream changes to buildroot.

* Remove buildroot-patches

Now that buildroot changes are managed in the buildroot fork repository
there is no need to manage patches in a separate directory.

* Initialize git submodule if necessary

* Move build directory to root

This avoids conflict/local modification issues with the buildroot
git submodule.
2021-07-08 16:19:37 +02:00
Stefan Agner
166537bf00 Dockerfile: Add dependencies for make graph-depends/-size targets (#1444)
Install buildroot dependencies so make graph-depends/-size targets can
be used.
2021-07-08 11:51:15 +02:00
Alexander Reinert
c2ac8b5763 Update generic_raw_uart module to latest version (#1430) 2021-06-22 22:50:09 +02:00
Joakim Sørensen
a538ac2c8a Adjust recommended platforms (#1429) 2021-06-22 17:35:30 +02:00
Stefan Agner
e5933c4ed4 Add firmware for RTL8761B/BU devices (#1392) (#1423) 2021-06-20 01:07:56 +02:00
Stefan Agner
94432dad88 Linux: Update kernel 5.10.45 (#1424) 2021-06-20 01:07:37 +02:00
Stefan Agner
9c8172df40 Update buildroot to 2021.02.3 (#1422)
Signed-off-by: Stefan Agner <stefan@agner.ch>
2021-06-19 19:26:55 +02:00
Stefan Agner
96a8ab17c1 Improve kernel update scripts (#1413)
* Improve kernel update scripts

Use separate script for ODROID-N2 for now. Also warn if there are kernel
patches with a specific kernel version number in the source tree: They
typically can be just moved to the new kernel version, but one should
compile check them before committing.
2021-06-19 19:26:44 +02:00
Stefan Agner
f6d639f2bf Use compressed squashfs for kernel (#1418)
* Add squashfs with LZ4 and LZO compression to Barebox

* Add squashfs with LZO compression to U-Boot

* Use squashfs for Linux kernel partition

Generate a squashfs image with LZO compression for the Linux kernel
partition. Adjust the boot scripts to be file system independent commands
to boot from squashfs.
2021-06-17 01:53:35 +02:00
Jens Maus
44cca729f0 Update generic_raw_uart module to latest version (#1417) 2021-06-16 07:50:48 +02:00
Stefan Agner
f39ee8b863 rtl8812au: bump to latest aircrack-ng 5.7.0 version (#1416)
Bump to the latest git version of this out-of-tree driver. This allows
to compile the driver against Linux 5.12.
2021-06-15 08:46:00 +02:00
Stefan Agner
64d3cd88a1 Move ODROID patches (#1415)
The patches for ODROID-C2/C4 don't apply to Linux 5.12 used in
ODROID-N2. Move ODROID-C2/C4 patches to kernel version specific
directory so they don't get applied for ODROID-N2.
2021-06-14 22:10:24 +02:00
Stefan Agner
084636b6cf Bump ODROID-N2 to Linux 5.12 (#1414)
Use the latest Linux stable release 5.12 for ODROID-N2. This allows to
test if we see the random kernel crashes observed with 5.10 in latest
stable 5.12 as well.
2021-06-14 19:04:54 +02:00
Stefan Agner
f7c5154bda Remove unnecessary ODROID-N2 kernel patches (#1412)
For ODROID-N2, release 6 is using Linux 5.9.16. On dev branch we most
likely will move to latest stable and skip 5.10. Drop those unnecessary
patches.
2021-06-14 18:18:55 +02:00
Stefan Agner
9bf12a8648 Use direct I/O for SPL update (#1408)
The rauc hook for the spl slotclass writes to the disk directly. Make
sure the changes do not end up in cache in case the device looses power
or is otherwise not properly rebooted.

Also use the same partition label detection we are using in
hassos-expand.
2021-06-14 11:27:03 +02:00
Stefan Agner
cfb68c5b39 Use file system extents for the kernel partition (#1406)
In the past file system extents have been deactivated to get better
performance in U-Boot. However, the performance issue has been addressed
with commit d5aee659f217 ("fs: ext4: cache extent data") in U-Boot. The
performance should be equal to regular files using no extents.

Enabling extents has an advantage however: Files are stored more
efficently, especially relatively large files like a kernel image. The
impact is not all that big (~100KiB), but worthwhile nonetheless.
2021-06-14 11:26:29 +02:00
Andrew Dunham
cceb5dcf39 pc/ova: support virtio-fs (#1400) 2021-06-14 11:26:12 +02:00
Stefan Agner
582ec82f83 Bump OS release version to 7 (#1404) 2021-06-13 16:51:41 +02:00
12584 changed files with 5254 additions and 521643 deletions

View File

@@ -3,7 +3,8 @@ buildroot/
buildroot-external/
buildroot-patches/
# Release directory gets created using build scripts
# Output/Release directory gets created using build scripts
output*/
release/
# Ignore hidden directories as well

View File

@@ -1,54 +0,0 @@
<!-- READ THIS FIRST:
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version before reporting an issue: https://github.com/home-assistant/operating-system/releases
- Do not report issues for integrations here, please refer to https://github.com/home-assistant/core/issues
- Do not report issues for Add-Ons here, please refer to
Official Add-ons: https://github.com/home-assistant/addons/issues
Home Assistant Community Add-ons: https://github.com/hassio-addons/repository
- This is for bugs only. Feature and enhancement requests should go in our community forum: https://community.home-assistant.io/c/feature-requests
- Provide as many details as possible. Paste logs, configuration sample and code using blocks with three backticks. Do not delete text from this template!
- Please add modifications to boot files, e.g. if you are using Raspberry Pi and did modifications in config.txt.
-->
**Hardware Environment**
<!--
Describe the Home Assistant image you are using and the hardware environment
-->
- [ ] Raspberry Pi [1/2/3/4]
- [ ] ODROID [C2/C4/N2(+)/XU4]
- [ ] ASUS Tinker [S]
- [ ] Generic x86-64 (like Intel NUC)
- [ ] OVA (Open Virtualization Appliance, on Intel NUC or any other hardware, please add the Hypervisor you are using)
**Home Assistant OS release:**
- [ ] Fresh installation of release x.y
- [ ] Updated from version x.y
- Additional information (if accessible):
<!--
- Home Assistant Frontend -> Configuration -> Info (use the copy button in the System Health block)
- Or use this command: `ha info`
-->
**Supervisor logs:**
<!--
- Home Assistant Frontend -> Supervisor -> System (Log Provider Supervisor)
- Or use this command: ha su logs
-->
**Journal logs:**
<!--
- Enable SSH on OS level and login, then use `journalctl`
-->
**Kernel logs:**
<!--
- use this command: dmesg
- Enable SSH on OS level and login, then use `dmesg`.
-->
**Description of problem:**
<!--
- Is the problem reproducible?
- Has this been working before (is this a regression?)
- Has there been attempt to rule out hardware issues? (different SD card etc.)
-->

105
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,105 @@
name: Bug Report Form
description: Report an issue related to the Home Assistant Operating System.
labels: bug
body:
- type: markdown
attributes:
value: |
Make sure to test with the last version of the Operating System before reporting a bug.
If the bug appears to be a regression, make sure to check if the bug indeed disappears
from the previous version. Use `ha os update --version x.y` command to downgrade.
- type: textarea
validations:
required: true
attributes:
label: Describe the issue you are experiencing
description: Provide a clear and concise description of what the bug is.
- type: markdown
attributes:
value: |
## Environment
- type: dropdown
validations:
required: true
attributes:
label: What operating system image do you use?
options:
- generic-x86-64 (Generic UEFI capable x86-64 systems)
- khadas-vim3 (Khadas VIM3)
- odroid-c2 (Hardkernel ODROID-C2)
- odroid-c4 (Hardkernel ODROID-C4)
- odroid-n2 (Hardkernel ODROID-N2/N2+)
- odroid-xu4 (Hardkernel ODROID-XU4)
- ova (for Virtual Machines)
- rpi2 (Raspberry Pi 2)
- rpi3 (Raspberry Pi 3 32-bit OS)
- rpi3-64 (Raspberry Pi 3 64-bit OS)
- rpi4 (Raspberry Pi 4/400 32-bit OS)
- rpi4-64 (Raspberry Pi 4/400 64-bit OS)
- tinker (ASUS Tinker Board/Tinker Board S)
description: >
Can be found in the [Configuration panel -> Info](https://my.home-assistant.io/redirect/info/). It is listed as the `Board` value.
[![Open your Home Assistant instance and show your Home Assistant version information.](https://my.home-assistant.io/badges/info.svg)](https://my.home-assistant.io/redirect/info/)
- type: input
validations:
required: true
attributes:
label: What version of Home Assistant Operating System is installed?
placeholder: "6.6"
description: >
Can be found in the [Configuration panel -> Info](https://my.home-assistant.io/redirect/info/). It is listed as the `Host Operating System` value.
- type: dropdown
validations:
required: true
attributes:
label: Did you upgrade the Operating System.
options:
- "Yes"
- "No"
- type: textarea
validations:
required: true
attributes:
label: Steps to reproduce the issue
description: |
Please tell us exactly how to reproduce your issue.
Provide clear and concise step by step instructions and add code snippets if needed.
value: |
1.
2.
3.
...
- type: textarea
validations:
required: true
attributes:
label: Anything in the Supervisor logs that might be useful for us?
description: >
Supervisor Logs can be found under [Supervisor -> System](https://my.home-assistant.io/redirect/supervisor_logs/), then choose Log Provider `Supervisor`.
[![Open your Home Assistant instance and show your Supervisor system logs.](https://my.home-assistant.io/badges/supervisor_logs.svg)](https://my.home-assistant.io/redirect/supervisor_logs/)
render: txt
- type: textarea
validations:
required: true
attributes:
label: Anything in the Host logs that might be useful for us?
description: >
Supervisor Logs can be found under [Supervisor -> System](https://my.home-assistant.io/redirect/supervisor_logs/), then choose Log Provider `Host`.
render: txt
- type: textarea
attributes:
label: System Health information
description: >
**Optional** Copy the full System Health in this text area.
Can be found in the [Configuration panel -> Info](https://my.home-assistant.io/redirect/info/).
Use the copy icon on top right and choose `For GitHub`.
- type: textarea
attributes:
label: Additional information
description: >
**Optional** If you have any additional information for us, use the field below.
Please note, you can attach screenshots or screen recordings here, by
dragging and dropping files in the field below.

21
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
blank_issues_enabled: false
contact_links:
- name: Report incorrect or missing information on our documentation
url: https://github.com/home-assistant/home-assistant.io/issues
about: Our documentation has its own issue tracker. Please report issues with the website there.
- name: Report incorrect or missing information on our developer documentation
url: https://github.com/home-assistant/developers.home-assistant.io/issues
about: Our developer documentation has its own issue tracker. Please report issues with the website there.
- name: Request a feature for the Operating System
url: https://community.home-assistant.io/c/feature-requests
about: Request an new feature for the Operating System.
- name: I have a question or need support
url: https://www.home-assistant.io/help
about: We use GitHub for tracking bugs, check our website for resources on getting help.
- name: I'm unsure where to go?
url: https://www.home-assistant.io/join-chat
about: If you are unsure where to go, then joining our chat is recommended; Just ask!

32
.github/label-actions.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
assume-fixed:
comment: >
:wave: @{issue-author}, thanks for reporting an issue!
This issue is assumed to be fixed in the latest stable release. Please
reopen in case you can still reproduce the issue with the latest stable
release. You can find the latest stable release at
https://github.com/home-assistant/operating-system/releases/latest
close: true
core-issue:
comment: >
:wave: @{issue-author}, thanks for reporting an issue!
It looks like this issue is related to Home Assistant Core. Please check
the [Home Assistant Core](https://github.com/home-assistant/core/issues)
repository, the issue might have been reported already. Open a new issue
in that repository if you can't find a matching issue.
close: true
supervisor-issue:
comment: >
:wave: @{issue-author}, thanks for reporting an issue!
It looks like this issue is related to Home Assistant Supervisor. Please
check the [Home Assistant Supervisor](https://github.com/home-assistant/supervisor/issues)
repository, the issue might have been reported already. Open a new issue
in that repository if you can't find a matching issue.
close: true

View File

@@ -13,6 +13,8 @@ categories:
label: 'board/odroid'
- title: 'ASUS Tinker'
label: 'board/tinker'
- title: 'Khadas VIM Series'
label: 'board/khadas'
filter-by-commitish: true
commitish: dev
template: |

17
.github/stale.yml vendored
View File

@@ -1,17 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

View File

@@ -4,15 +4,18 @@ name: Development build
on:
workflow_dispatch:
pull_request_target:
types: [opened,synchronize,labeled]
jobs:
version:
name: Generate version
prepare:
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
name: Prepare build
runs-on: [ "ubuntu-20.04" ]
outputs:
version_main: ${{ steps.version_main.outputs.version_main }}
version_dev: ${{ steps.version_dev.outputs.version_dev }}
version_dev: ${{ steps.version_dev.outputs.version_dev }}${{ steps.version_pr.outputs.version_pr }}
matrix: ${{ steps.generate_matrix.outputs.result }}
steps:
- name: Generate Development build version
shell: bash
@@ -21,6 +24,14 @@ jobs:
version_dev="dev$(date --utc +'%Y%m%d')"
echo "Development version \"${version_dev}\""
echo "::set-output name=version_dev::${version_dev}"
- name: Generate Development build version for PR
if: ${{ github.event.pull_request }}
shell: bash
id: version_pr
run: |
version_pr=$(printf "%05d" ${{ github.event.pull_request.number }})
echo "Development build for PR #${{ github.event.pull_request.number }}"
echo "::set-output name=version_pr::${version_pr}"
- uses: actions/checkout@v2
- name: Get Major/Minor version
id: version_main
@@ -28,33 +39,54 @@ jobs:
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
echo "::set-output name=version_main::${major}.${build}"
- name: Create build matrix
uses: actions/github-script@v4
id: generate_matrix
with:
script: |
const boards = require('./.github/workflows/matrix.json')
if (context.eventName == "workflow_dispatch") {
console.log("Run full build for all boards")
return { "board": boards }
}
const labels = context.payload.pull_request.labels.map(l => l.name)
const labelsSet = new Set(labels)
const buildBoards = boards.filter(b => labelsSet.has(b.label))
return { "board": buildBoards }
build:
name: Release build for ${{ matrix.board.name }}
needs: version
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run-dev-build') }}
name: Development build for ${{ matrix.board.id }}
environment: "dev_build"
needs: prepare
strategy:
fail-fast: false
matrix:
board:
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
- {"name": "generic_x86_64", "output": "generic-x86-64", "runner": "x86-64-runner"}
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
runs-on: ${{ matrix.board.runner }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Define git reference
uses: actions/github-script@v4
id: generate_gitref
with:
script: |
if (context.eventName == "workflow_dispatch")
return { "ref": context.ref }
return { "ref": context.payload.pull_request.head.sha }
# Make sure directories of potentially removed submodules are cleaned correctly
- name: Cleanup git submodules
run: find . -name .git -type f -exec rm {} \;
- name: Checkout source
uses: actions/checkout@v2
with:
submodules: true
persist-credentials: false
ref: ${{ fromJSON(steps.generate_gitref.outputs.result).ref }}
- name: Build container
run: docker build -t haos-builder .
@@ -74,22 +106,24 @@ jobs:
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "${{ matrix.board.runner }}-build-cache:/cache" \
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.version.outputs.version_dev }} ${{ matrix.board.name }}
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.prepare.outputs.version_dev }} ${{ matrix.board.defconfig }}
- name: Upload images
uses: appleboy/scp-action@master
uses: burnett01/rsync-deployments@4.1
with:
host: ${{ secrets.DEV_HOST }}
username: ${{ secrets.DEV_USERNAME }}
port: ${{ secrets.DEV_PORT }}
key: ${{ secrets.DEV_SCP_KEY }}
source: "release/*"
target: ${{ secrets.DEV_TARGET_PATH }}/${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}/
strip_components: 1
rsh: -q
switches: -aW --ignore-existing
path: release/
remote_path: ${{ secrets.DEV_TARGET_PATH }}/${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}/
remote_host: ${{ secrets.DEV_HOST }}
remote_port: ${{ secrets.DEV_PORT }}
remote_user: ${{ secrets.DEV_USERNAME }}
remote_key: ${{ secrets.DEV_SSH_KEY }}
bump_version:
name: Bump dev version to ${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}
needs: [ build, version ]
name: Bump dev channel version
if: ${{ github.event_name == 'workflow_dispatch' }}
needs: [ build, prepare ]
runs-on: [ "ubuntu-20.04" ]
steps:
@@ -100,10 +134,10 @@ jobs:
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}
- name: Bump Home Assistant OS dev version
- name: Bump Home Assistant OS dev channel version to ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}
version: ${{ needs.prepare.outputs.version_main }}.${{ needs.prepare.outputs.version_dev }}
channel: "dev"

17
.github/workflows/label-actions.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: 'Label Actions'
on:
issues:
types: [labeled, unlabeled]
permissions:
contents: read
issues: write
pull-requests: write
discussions: write
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v2

80
.github/workflows/matrix.json vendored Normal file
View File

@@ -0,0 +1,80 @@
[
{
"id": "ova",
"defconfig": "ova",
"runner": "x86-64-runner",
"label": "board/ova"
},
{
"id": "generic-x86-64",
"defconfig": "generic_x86_64",
"runner": "x86-64-runner",
"label": "board/generic-x86-64"
},
{
"id": "khadas-vim3",
"defconfig": "khadas_vim3",
"runner": "aarch64-runner",
"label": "board/khadas"
},
{
"id": "odroid-c2",
"defconfig": "odroid_c2",
"runner": "aarch64-runner",
"label": "board/odroid"
},
{
"id": "odroid-c4",
"defconfig": "odroid_c4",
"runner": "aarch64-runner",
"label": "board/odroid"
},
{
"id": "odroid-n2",
"defconfig": "odroid_n2",
"runner": "aarch64-runner",
"label": "board/odroid"
},
{
"id": "odroid-xu4",
"defconfig": "odroid_xu4",
"runner": "aarch64-runner",
"label": "board/odroid"
},
{
"id": "rpi2",
"defconfig": "rpi2",
"runner": "arm-runner",
"label": "board/raspberrypi"
},
{
"id": "rpi3",
"defconfig": "rpi3",
"runner": "arm-runner",
"label": "board/raspberrypi"
},
{
"id": "rpi3-64",
"defconfig": "rpi3_64",
"runner": "aarch64-runner",
"label": "board/raspberrypi"
},
{
"id": "rpi4",
"defconfig": "rpi4",
"runner": "arm-runner",
"label": "board/raspberrypi"
},
{
"id": "rpi4-64",
"defconfig": "rpi4_64",
"runner": "aarch64-runner",
"label": "board/raspberrypi"
},
{
"id": "tinker",
"defconfig": "tinker",
"runner": "arm-runner",
"label": "board/tinker"
}
]

View File

@@ -9,12 +9,20 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v1
uses: actions/checkout@v2
with:
submodules: true
- name: Check Dockerfile
uses: brpaz/hadolint-action@v1.1.0
with:
dockerfile: Dockerfile
- name: Check shell scripts
uses: ludeeus/action-shellcheck@1.0.0
uses: ludeeus/action-shellcheck@1.1.0
with:
ignore: "buildroot"
ignore: buildroot buildroot-external/package/xe-guest-utilities
- name: Check buildroot-external packages
run: |
buildroot/utils/check-package --exclude PackageHeader --br2-external buildroot-external/package/*/*

View File

@@ -43,12 +43,11 @@ jobs:
board:
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
- {"name": "generic_x86_64", "output": "generic-x86-64", "runner": "x86-64-runner"}
- {"name": "khadas_vim3", "output": "khadas-vim3", "runner": "aarch64-runner"}
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
@@ -58,8 +57,14 @@ jobs:
runs-on: ${{ matrix.board.runner }}
steps:
# Make sure directories of potentially removed submodules are cleaned correctly
- name: Cleanup git submodules
run: find . -name .git -type f -exec rm {} \;
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: true
- name: Build container
run: docker build -t haos-builder .

47
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: Stale
# yamllint disable-line rule:truthy
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
steps:
# The 90 day stale policy
# Used for:
# - Issues & PRs
# - No PRs marked as no-stale or pinned
# - No issues marked as no-stale, help-wanted or pinned
- name: 90 days stale issues & PRs policy
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 90
days-before-close: 7
operations-per-run: 150
remove-stale-when-updated: true
stale-issue-label: "stale"
exempt-issue-labels: "no-stale,help-wanted,pinned,enhancement"
stale-issue-message: >
There hasn't been any activity on this issue recently. To keep our
backlog manageable we have to clean old issues, as many of them have
already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant OS version and
check if that solves the issue. Let us know if that works for you by
adding a comment 👍
This issue has now been marked as stale and will be closed if no
further activity occurs. Thank you for your contributions.
stale-pr-label: "stale"
exempt-pr-labels: "no-stale,pinned"
stale-pr-message: >
There hasn't been any activity on this pull request recently. This
pull request has been automatically marked as stale because of that
and will be closed if no further activity occurs within 7 days.
Thank you for your contributions.

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.DS_Store
/release
*.pem
output*/

4
.gitmodules vendored Normal file
View File

@@ -0,0 +1,4 @@
[submodule "buildroot"]
path = buildroot
url = https://github.com/home-assistant/buildroot.git
branch = 2021.02.x-haos

View File

@@ -1,4 +1,4 @@
FROM debian:buster
FROM debian:bullseye
# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -32,7 +32,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
ncurses-dev \
patch \
perl \
python \
python3 \
python3-matplotlib \
python-is-python3 \
graphviz \
rsync \
sudo \
unzip \
@@ -43,6 +46,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
vim \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
skopeo \
jq \
&& rm -rf /var/lib/apt/lists/*
# Init entry
COPY scripts/entry.sh /usr/sbin/
ENTRYPOINT ["/usr/sbin/entry.sh"]

View File

@@ -1,12 +1,8 @@
# Developer Documentation
# Documentation
## Contents
- [Getting started](./getting_started_development.md) - the place for developers to begin
- [Development](./development.md) - more details for developers
- [Deployment](./deployment.md) - approach to git branching and releases
- [Configuration](./configuration.md) - how users can configure HassOS
- [Partition](./partition.md) - partition layout
- [Configuration](./configuration.md) - how users can configure HAOS
- [Network](./network.md) - approach to networking
- [Bluetooth](./bluetooth.md) - approach to bluetooth
- [Kernel](./kernel.md) - kernel versions

View File

@@ -5,10 +5,10 @@
The following boards/devices are supported:
- Raspberry Pi
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 32-bit (recommended)
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 64-bit
- Pi 3 Model B and B+ 32-bit (recommended)
- Pi 3 Model B and B+ 64-bit
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 32-bit
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 64-bit (recommended)
- Pi 3 Model B and B+ 32-bit
- Pi 3 Model B and B+ 64-bit (recommended)
- Pi 2 (not recommended)
- Pi Zero-W (not recommended)
- Pi (not recommended)
@@ -22,7 +22,7 @@ The following boards/devices are supported:
- Intel NUC6CAYH
- Intel NUC10I3FNK2
- Gigabyte GB-BPCE-3455
- Computers supporting x64-64 architecture and UEFI boot should generally work
- Computers supporting x86-64 architecture and UEFI boot should generally work
- Asus
- Tinker Board
- Virtual appliance (x86_64/UEFI):

View File

@@ -1,22 +0,0 @@
# Deployment
We provide 3 different types of release builds:
- development (dev)
- staging (beta)
- production (stable)
## Versioning
The format of version is *MAJOR.BUILD*. Everytime we create a new release with same userland, we bump the build number.
The development number they will be bump for the stable release version and the development version go to next major number.
## Git branch/Tag
The branch `dev` ist the actual development branch and from there we never make a release. The `master` branch contains the development version and from there we build a beta release.
If we create a new productive/staging release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this release.
## Upload release files
We use [ghr](https://github.com/tcnksm/ghr) to upload files to our repository. A binary version is available inside `scripts`.

View File

@@ -1,60 +0,0 @@
# Development
## Boot system
`BOOT_SYS`:
- efi
- hybrid
- mbr
HassOS is using GPT. But to use GPT we need own the first 1024 of boot drive. Is that's not possible, you can use MBR for your device. This also work with SPLs.
Hybrid and SPL use both a hybrid MBR/GPT table but SPL move the GPT header 8 MB for give space to write SPL and boot images before.
`BOOT_SPL`:
- true
- false
Enable SPL update handling.
`BOOTLOADER`:
- U-Boot
- barebox
We support mainly U-Boot but for UEFI systems we can also use [barebox](https://barebox.org/). In the future, we hope to remove barebox with U-Boot also on UEFI.
`DISK_SIZE`:
Default 2. That is the size of end image in GB.
## Supervisor
`SUPERVISOR_MACHINE`:
- intel-nuc
- odroid-c2
- odroid-c4
- odroid-n2
- odroid-xu
- qemuarm
- qemuarm-64
- qemux86
- qemux86-64
- raspberrypi
- raspberrypi2
- raspberrypi3
- raspberrypi4
- raspberrypi3-64
- raspberrypi4-64
- tinker
`SUPERVISOR_ARCH`:
- amd64
- i386
- armhf
- armv7
- aarch64

View File

@@ -1,101 +0,0 @@
# Getting started with HassOS development using Docker on GNU/Linux
First, install `docker-ce` for your distribution. I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a Docker container - which requires a "privileged" container to run, which can only be done as root).
Next, make sure the Docker daemon is running:
```bash
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: https://docs.docker.com
```
My desktop distro doesn't start newly installed services by default, which means I'll have to manually fire up the `docker` service:
```bash
$ sudo systemctl start docker
$ sudo systemctl --no-pager status docker -n0
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2018-10-10 21:08:23 CEST; 25s ago
Docs: https://docs.docker.com
Main PID: 1531 (dockerd)
Tasks: 27 (limit: 4915)
Memory: 163.4M
CGroup: /system.slice/docker.service
├─1531 /usr/bin/dockerd -H fd://
└─1539 docker-containerd --config /var/run/docker/containerd/containerd.toml
```
Now, change your working directory to your home-assistant/operating-system repository checkout (please adapt path names as needed), make sure your intended changes to the source tree are applied (and committed, ideally :)), and execute the `enter.sh` helper script:
```bash
$ cd ~/codebase/operating-system/
$ sudo scripts/enter.sh
Sending build context to Docker daemon 30.48MB
Step 1/6 : FROM ubuntu:18.04
[...]
---> 4dc25a21556b
Successfully built 4dc25a21556b
Successfully tagged hassbuildroot:latest
```
Note that the current iteration of `enter.sh` will try to load the **overlayfs** kernel module, which is not strictly required for Docker's operation, as far as I can tell. It's OK if loading that module fails; the shell script will continue executing. If everything works out, you will find yourself in an interactive login shell inside your Docker container/build environment, where you can peek around:
```bash
root@somehashinhex:/build#
root@somehashinhex:/build# make help
[...]
```
The HassOS developers provide a `Makefile` that will build HassOS images for a list of targets. For example run the command below to start building the _ova_ variant, and go make a cup of tea. Or fifteen.
```bash
root@0db6f7079872:/build# make ova
[...]
```
That will result in a single VMDK image file at the very end of the build process. This image file is a compressed block device dump with a proper GPT partition table, prepared to ship into any OVA-compatible hypervisor's innards. For me, the end of the **ova** build steps looks like this:
```bash
[...]
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 12.2145 s, 87.9 MB/s
make: Leaving directory '/build/buildroot'
make: Entering directory '/build/buildroot'
rm -rf /build/buildroot/output/target /build/buildroot/output/images /build/buildroot/output/host \
/build/buildroot/output/build /build/buildroot/output/staging \
/build/buildroot/output/legal-info /build/buildroot/output/graphs
make: Leaving directory '/build/buildroot'
```
The artifacts you just built are placed in the `target/` subdirectory:
```bash
root@fd292c061896:/build# ls -lh release/
total 141M
-rw-r--r-- 1 root root 141M Oct 10 20:22 hassos_ova-2.2.vmdk.gz
```
In order to be able to use this image file with the QEMU hypervisor, you'll need to unpack it, and convert it to an image format that QEMU can work with. Conveniently, the HassOS buildenv already provides all the tools we need for this conversion:
```bash
root@fd292c061896:/build# gunzip release/hassos_ova-2.2.qcow2.gz
root@fd292c061896:/build# ls -lh release/
total 673M
-rw-r--r-- 1 root root 337M Oct 10 20:25 hassos_ova-2.2.qcow2
```
Now, exit the docker container's environment, and find the build artifacts in the `releases/` directory beneath your repository checkout dir. (The generated files will be owned by _root_; make sure to `chown` them to your user account, if needed.)
From there, QEMU can try to boot it. Since the generated image assumes UEFI support in the host/hypervisor, this is slightly more tricky than with "classic"(/legacy) MBR-based images. On the *Debian* host I use to run my QEMU virtual machine on, you'll need to install the **ovmf** package which provides the "UEFI firmware for 64-bit x86 virtual machines". That package will install a **TianoCore**-derived QEMU UEFI image build at `/usr/share/OVMF/OVMF_CODE.fd`, which we'll use with QEMU to boot the generated qcow2 image. (Please adapt path names as necessary, for example if you have installed the ovmf firmware image at another location.)
```bash
$ /usr/bin/qemu-system-x86_64 -enable-kvm -name hassos_ova -smp 2 -m 1024 -drive file=release/hassos_ova-2.2.qcow2,index=0,media=disk,if=ide,cache=none,format=qcow2 -drive file=/usr/share/ovmf/x64/OVMF_CODE.fd,if=pflash,format=raw,readonly=on
```
This should pop up QEMU's SDL frontend, displaying _hassos_' VT/CLI environment. Specifying additional options and flags to QEMU for network access, keyboard layout et al. are left as an exercise for the reader.
After the boot process has finished, you can log in to _hassos_ without a password, providing *root* as the username. From there, executing `login` on the *ha>* shell prompt will yield a root shell in the host OS.

View File

@@ -5,15 +5,15 @@ Default Kernel tree: 5.10
| Board | Version |
|-------|---------|
| Open Virtual Appliance | 5.10.42 |
| Raspberry Pi | 5.10.17 |
| Raspberry Pi 0-W | 5.10.17 |
| Raspberry Pi 2 | 5.10.17 |
| Raspberry Pi 3 | 5.10.17 |
| Raspberry Pi 4 | 5.10.17 |
| Tinker Board | 5.10.42 |
| Odroid-C2 | 5.10.42 |
| Odroid-C4 | 5.10.42 |
| Odroid-N2 | 5.9.16 |
| Odroid-XU4 | 5.10.42 |
| Generic x86-64 | 5.10.42 |
| Open Virtual Appliance | 5.10.96 |
| Raspberry Pi | 5.10.92 |
| Raspberry Pi 0-W | 5.10.92 |
| Raspberry Pi 2 | 5.10.92 |
| Raspberry Pi 3 | 5.10.92 |
| Raspberry Pi 4 | 5.10.92 |
| Tinker Board | 5.10.96 |
| Odroid-C2 | 5.10.96 |
| Odroid-C4 | 5.10.96 |
| Odroid-N2 | 5.10.96 |
| Odroid-XU4 | 5.10.96 |
| Generic x86-64 | 5.10.96 |

View File

@@ -1,81 +0,0 @@
# Partition
The partition layout is a bit different than the typical setup. We prefer GPT, if possible. With SoCs which don't support GPT, we use a hybrid GPT. For more details about this topic, please refer to the [development](development.md) documentation.
The system is designed to have as few write operations to the storage media as possible. This means that we only write during the OTA updates and 5-6 times per week on the overlay partition. The data partition receives the main I/O operations and for this reason is ideal for placing on a different drive.
A visual representation looks like this:
```text
-------------------------
| Bootloader |
-------------------------
| Kernel A |
-------------------------
| System A |
| |
-------------------------
| Kernel B |
-------------------------
| System B |
| |
-------------------------
| Bootstate |
-------------------------
| Overlay |
| |
...
-------------------------
| Data |
| |
-------------------------
```
Sometime the bootloader part can look different because there can be firmware or SPLs for boot the CPU on the SoC.
## Data disk
![Data-Disk preview](./usb-disk.png)
The data partition is the only partition with real I/O. It will be expanded automatically at boot to the full size of the disk.
## Using datactl to move the data partition.
In a Home Assistant OS installation, the data is stored on the `/mnt/data` partition of the SD card. This is the only read+write partition on the SD drive. Using the `datactl` move command, this partition can be moved off of the SD card onto an externally connected drive, leaving the rest of the read-only system on the SD.
The storage capacity of the external drive must be larger than the storage capacity of the existing SD card.
The command needs to be run from the host console by either connecting a keyboard and monitor or making use of the [debug ssh access](https://developers.home-assistant.io/docs/operating-system/debugging/) over port 22222. The command will not work from within an SSH add-on container.
Log in as `root` to get to the Home Assistant CLI and then enter `login` to continue to the host.
Confirm your USB SSD/HD is connected and recognized using `fdisk -l`.
With the drive connected, use the following command (replacing sdx with your drive, without a partition number):
```sh
$ datactl move /dev/sdx
```
Enter "yes" to confirm the operation. This will prepare the disk, however, the
actual move will be running on next reboot. This will make the first boot significantly longer than usual; please be patient. Reboot with the following command:
```sh
$ ha host reboot
```
Once complete, the external drive
will contain the data and will need to be plugged in to successfully boot Home
Assistant.
## Check if the move was succesful.
Within the Home Assistant interface you won't see if the move was succesful. To check this, go to your host console again (as described above) and enter:
```sh
$ systemctl status mnt-data.mount
```
If the data partition was moved to your USB drive you should see ```sh Active: active (mounted) ``` in the output. Also, it will show, which drive got mounted as /mnt/data (```sh Where ``` and ```sh what ``` section of the output)
## Check Power Supply Rating
Using an USB attached SSD can draw quite some power. For instance on Raspberry Pi 3 the official Raspberry Pi power supply (PSU) only provides 2.5A which can be too tight. Use a power supply which can at least provide 3.5A. Alternatively use a powered USB hub. Connect the Hub to one of the USB slots of your Raspberry Pi, and connect the SSD to the Hub. The power supply that came with the Hub will power the attached device(s).

View File

@@ -12,9 +12,9 @@ TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFI
# Set O variable if not already done on the command line
ifneq ("$(origin O)", "command line")
O := $(BUILDROOT)/output
O := $(BUILDDIR)/output
else
override O := $(BUILDROOT)/$(O)
override O := $(BUILDDIR)/$(O)
endif
.NOTPARALLEL: $(TARGETS) $(TARGETS_CONFIG) all
@@ -28,22 +28,22 @@ $(RELEASE_DIR):
$(TARGETS_CONFIG): %-config:
@echo "config $*"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
$(TARGETS): %: $(RELEASE_DIR) %-config
@echo "build $@"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
cp -f $(O)/images/haos_* $(RELEASE_DIR)/
# Do not clean when building for one target
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
@echo "clean $@"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
endif
@echo "finished $@"
clean:
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
$(MAKE) -C $(BUILDROOT) O=$(O) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
help:
@echo "Supported targets: $(TARGETS)"

View File

@@ -1,8 +1,8 @@
# Home Assistant Operating System
Home Assistant Operating System (formerly HassOS) is an operating system optimized for hosting [Home Assistant](https://www.home-assistant.io) and its [Add-ons](https://www.home-assistant.io/addons/).
Home Assistant Operating System (formerly HassOS) is a Linux based operating system optimized to host [Home Assistant](https://www.home-assistant.io) and its [Add-ons](https://www.home-assistant.io/addons/).
Home Assistant Operating System uses Docker as Container engine. It by default deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [buildroot](https://buildroot.org/) and it is optimized for running Home Assistant, especially on single board compute (SBC) devices like the Pi, ODROID, NUC and Tinker Board (see supported hardware below).
Home Assistant Operating System uses Docker as Container engine. It by default deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [Buildroot](https://buildroot.org/) and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.
## Features
@@ -10,7 +10,7 @@ Home Assistant Operating System uses Docker as Container engine. It by default d
- Minimized I/O
- Over The Air (OTA) updates
- Offline updates
- Modular using Docker
- Modular using Docker container engine
## Supported hardware
@@ -28,11 +28,17 @@ If you just want to use Home Assistant the official [getting started guide](http
If you're interested in finding out more about Home Assistant Operating System and how it works read on...
## HassOS components
## Development
If you don't have experience with embedded systems, Buildroot or the build process for Linux distributions it is recommended to read up on these topics first (e.g. [Bootlin](https://bootlin.com/docs/) has excellent resources).
The Home Assistant Operating System documentation can be found on the [Home Assistant Developer Docs website](https://developers.home-assistant.io/docs/operating-system).
### Components
- **Bootloader:**
- [Barebox](https://barebox.org/) for devices that support EFI
- [U-Boot](https://www.denx.de/wiki/U-Boot) for devices that don't support EFI
- [Barebox](https://barebox.org/) for devices that support UEFI
- [U-Boot](https://www.denx.de/wiki/U-Boot) for devices that don't support UEFI
- **Operating System:**
- [Buildroot](https://buildroot.org/) LTS Linux
- **File Systems:**
@@ -45,12 +51,6 @@ If you're interested in finding out more about Home Assistant Operating System a
- **Security:**
- [AppArmor](https://apparmor.net/) Linux kernel security module
If you don't have experience with these, embedded systems, buildroot or the build process for Linux distributions, then please read up on these topics. The rest of the documentation in this project is for developers and assumes you have experience with embedded systems or a strong understanding of the internal workings of operating systems.
## Developer Documentation
All developer documentation is in the [Documentation](./Documentation) directory.
### Development builds
The Development build GitHub Action Workflow is a manually triggered workflow

1
buildroot Submodule

Submodule buildroot added at 8bbb32c16a

View File

@@ -2,12 +2,13 @@ source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-bcm43xx/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-rtl8723/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/khadas-boot/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/intel-e1000e/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl8812au/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/os-agent/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/udisks2/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/eq3_char_loop/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/generic_raw_uart/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-rf-mod/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/xe-guest-utilities/Config.in"

View File

@@ -1556,7 +1556,6 @@ CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
CONFIG_CFG80211_DEFAULT_PS=y
CONFIG_CFG80211_DEBUGFS=y
CONFIG_CFG80211_CRDA_SUPPORT=y
CONFIG_CFG80211_WEXT=y
CONFIG_LIB80211=y
CONFIG_LIB80211_CRYPT_WEP=y

View File

@@ -3,7 +3,7 @@ BOARD_NAME="Asus TinkerBoard"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage
BOOT_SYS=hyprid
BOOT_SYS=hybrid
BOOT_SPL=true
BOOT_ENV_SIZE=0x8000
SUPERVISOR_MACHINE=tinker

View File

@@ -1,5 +1,5 @@
From 983121a741192153492a61befc0e0fc61b9f8b14 Mon Sep 17 00:00:00 2001
Message-Id: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
From e18419a214ba872d14462354886148f976312e3c Mon Sep 17 00:00:00 2001
Message-Id: <e18419a214ba872d14462354886148f976312e3c.1632758899.git.stefan@agner.ch>
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 12:41:50 +0000
Subject: [PATCH 1/2] SPL: modify load address of U-Boot
@@ -15,7 +15,7 @@ Signed-off-by: Stefan Agner <stefan@agner.ch>
2 files changed, 2 insertions(+)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index 8686a66d13..c3363821dd 100644
index 3ac314ab89..67ca98c383 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -88,3 +88,4 @@ CONFIG_VIDEO_ROCKCHIP=y
@@ -24,7 +24,7 @@ index 8686a66d13..c3363821dd 100644
CONFIG_ERRNO_STR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index 22714833cc..f5dd23577c 100644
index 35e84b7088..93cfe4f094 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -90,3 +90,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
@@ -33,5 +33,5 @@ index 22714833cc..f5dd23577c 100644
CONFIG_ERRNO_STR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
--
2.31.1
2.33.0

View File

@@ -1,7 +1,7 @@
From f9195bc5cb18f71117f6efc1c352209e62c53706 Mon Sep 17 00:00:00 2001
Message-Id: <f9195bc5cb18f71117f6efc1c352209e62c53706.1617731428.git.stefan@agner.ch>
In-Reply-To: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
References: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
From 4c09e7741c219ef28be912e97a986b6402290c9b Mon Sep 17 00:00:00 2001
Message-Id: <4c09e7741c219ef28be912e97a986b6402290c9b.1632758899.git.stefan@agner.ch>
In-Reply-To: <e18419a214ba872d14462354886148f976312e3c.1632758899.git.stefan@agner.ch>
References: <e18419a214ba872d14462354886148f976312e3c.1632758899.git.stefan@agner.ch>
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 11:37:55 +0000
Subject: [PATCH 2/2] pmic: enable LDO2 vcc33_mipi at bootup
@@ -64,5 +64,5 @@ index f85209c649..6fa1bb0c66 100644
+}
+#endif
--
2.31.1
2.33.0

View File

@@ -64,7 +64,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:2 ${kernel_addr_r} zImage; then
if load mmc ${devnum}:2 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
@@ -72,7 +72,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:4 ${kernel_addr_r} zImage; then
if load mmc ${devnum}:4 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi

View File

@@ -1469,7 +1469,6 @@ CONFIG_CFG80211=m
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
CONFIG_CFG80211_DEFAULT_PS=y
CONFIG_CFG80211_CRDA_SUPPORT=y
CONFIG_CFG80211_WEXT=y
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
@@ -3813,15 +3812,17 @@ CONFIG_IR_MESON=m
# CONFIG_IR_SIR is not set
# CONFIG_RC_XBOX_DVD is not set
# CONFIG_IR_TOY is not set
CONFIG_CEC_CORE=y
CONFIG_CEC_CORE=m
CONFIG_CEC_NOTIFIER=y
CONFIG_CEC_PIN=y
CONFIG_MEDIA_CEC_RC=y
CONFIG_MEDIA_CEC_SUPPORT=y
# CONFIG_CEC_CH7322 is not set
# CONFIG_CEC_CROS_EC is not set
# CONFIG_CEC_MESON_AO is not set
# CONFIG_CEC_MESON_G12A_AO is not set
# CONFIG_CEC_GPIO is not set
# CONFIG_USB_PULSE8_CEC is not set
CONFIG_CEC_MESON_AO=m
CONFIG_CEC_MESON_G12A_AO=m
CONFIG_CEC_GPIO=m
CONFIG_USB_PULSE8_CEC=m
# CONFIG_USB_RAINSHADOW_CEC is not set
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_SUPPORT_FILTER=y
@@ -4363,10 +4364,10 @@ CONFIG_DRM_PANEL_BRIDGE=y
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# CONFIG_DRM_I2C_ADV7511 is not set
# CONFIG_DRM_CDNS_MHDP8546 is not set
CONFIG_DRM_DW_HDMI=y
CONFIG_DRM_DW_HDMI=m
# CONFIG_DRM_DW_HDMI_AHB_AUDIO is not set
CONFIG_DRM_DW_HDMI_I2S_AUDIO=y
CONFIG_DRM_DW_HDMI_CEC=y
# CONFIG_DRM_DW_HDMI_CEC is not set
# end of Display Interface Bridges
# CONFIG_DRM_ETNAVIV is not set
@@ -4374,8 +4375,8 @@ CONFIG_DRM_DW_HDMI_CEC=y
# CONFIG_DRM_HISI_HIBMC is not set
# CONFIG_DRM_HISI_KIRIN is not set
# CONFIG_DRM_MXSFB is not set
CONFIG_DRM_MESON=y
CONFIG_DRM_MESON_DW_HDMI=y
CONFIG_DRM_MESON=m
CONFIG_DRM_MESON_DW_HDMI=m
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_GM12U320 is not set
# CONFIG_TINYDRM_HX8357D is not set

View File

@@ -0,0 +1 @@
console=tty0 console=ttyAML0,115200n8

View File

@@ -13,8 +13,7 @@ function hassos_pre_image() {
mkdir -p "${BOOT_DATA}/overlays"
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image

View File

@@ -71,7 +71,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
if load mmc ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
@@ -79,7 +79,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
if load mmc ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi

View File

@@ -0,0 +1 @@
console=tty0 console=ttyAML0,115200n8

View File

@@ -12,8 +12,7 @@ function hassos_pre_image() {
mkdir -p "${BOOT_DATA}/overlays"
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image

View File

@@ -71,7 +71,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
if load mmc ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
@@ -79,7 +79,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
if load mmc ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi

View File

@@ -0,0 +1 @@
console=tty0 console=ttyAML0,115200n8

View File

@@ -12,8 +12,7 @@ function hassos_pre_image() {
mkdir -p "${BOOT_DATA}/overlays"
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image

View File

@@ -76,7 +76,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
if load mmc ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
@@ -84,7 +84,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
if load mmc ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi

View File

@@ -0,0 +1 @@
console=tty1 console=ttySAC2,115200

View File

@@ -11,8 +11,7 @@ function hassos_pre_image() {
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}/exynos5422-odroidxu4.dtb" "${BOOT_DATA}/exynos5422-odroidxu4.dtb"
echo "console=tty1 console=ttySAC2,115200" > "${BOOT_DATA}/cmdline.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image

View File

@@ -51,7 +51,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} zImage; then
if load mmc ${devnum}:5 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
@@ -59,7 +59,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} zImage; then
if load mmc ${devnum}:7 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi

View File

@@ -1,9 +1,9 @@
From cdfb8eea4103e537898073dc3f7bf8f75cec5efb Mon Sep 17 00:00:00 2001
Message-Id: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From c7825747afd8bb975dc918f28e4afe8058a518f3 Mon Sep 17 00:00:00 2001
Message-Id: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Mon, 11 Jan 2021 13:58:31 +0000
Subject: [PATCH 1/8] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases to
ODROID-N2 dtsi
Subject: [PATCH 01/10] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases
to ODROID-N2 dtsi
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
@@ -49,5 +49,5 @@ index 39a09661c5f6..b78be3e6974d 100644
pinctrl-0 = <&pwm_a_e_pins>;
pinctrl-names = "default";
--
2.31.1
2.34.1

View File

@@ -1,10 +1,10 @@
From 8b2ab165b2ed529f74b242159648893d53272c24 Mon Sep 17 00:00:00 2001
Message-Id: <8b2ab165b2ed529f74b242159648893d53272c24.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From ec3b1240b428c5652ccb7fdadad217a2ff8ab4db Mon Sep 17 00:00:00 2001
Message-Id: <ec3b1240b428c5652ccb7fdadad217a2ff8ab4db.1642331593.git.stefan@agner.ch>
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 7 Apr 2021 04:26:08 +0000
Subject: [PATCH 2/8] arm64: dts: meson: add saradc node to ODROID N2/N2+
Subject: [PATCH 02/10] arm64: dts: meson: add saradc node to ODROID N2/N2+
Add the meson saradc node to the ODROID N2/N2+ common dtsi.
@@ -33,5 +33,5 @@ index b78be3e6974d..8a5e132c4b79 100644
&sd_emmc_b {
status = "okay";
--
2.31.1
2.34.1

View File

@@ -1,10 +1,10 @@
From 602012d9081be7a54d2d6cee59035ae019dd3bb4 Mon Sep 17 00:00:00 2001
Message-Id: <602012d9081be7a54d2d6cee59035ae019dd3bb4.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From 5ca49a58577f7e9e6f8e0b1cb7c97e756a0e921f Mon Sep 17 00:00:00 2001
Message-Id: <5ca49a58577f7e9e6f8e0b1cb7c97e756a0e921f.1642331593.git.stefan@agner.ch>
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 7 Apr 2021 04:26:09 +0000
Subject: [PATCH 3/8] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
Subject: [PATCH 03/10] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi.
@@ -74,5 +74,5 @@ index 8a5e132c4b79..41b2f9c96b5f 100644
* WARNING: The USB Hub on the Odroid-N2 needs a reset signal
* to be turned high in order to be detected by the USB Controller
--
2.31.1
2.34.1

View File

@@ -1,10 +1,10 @@
From 0a70fbc9a556737d3f70a1a194ba7be280b007c5 Mon Sep 17 00:00:00 2001
Message-Id: <0a70fbc9a556737d3f70a1a194ba7be280b007c5.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From 70e65f906389f7236fe9ad8e1c05dedac0d1988b Mon Sep 17 00:00:00 2001
Message-Id: <70e65f906389f7236fe9ad8e1c05dedac0d1988b.1642331593.git.stefan@agner.ch>
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:20:48 +0100
Subject: [PATCH 4/8] arm64: dts: meson: g12b: add power button support
Subject: [PATCH 04/10] arm64: dts: meson: g12b: add power button support
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
@@ -38,5 +38,5 @@ index 41b2f9c96b5f..4b6bb7e74e25 100644
compatible = "gpio-leds";
--
2.31.1
2.34.1

View File

@@ -1,10 +1,10 @@
From 8a4a640d1b8dea977795de3f49b6ea3a791e401a Mon Sep 17 00:00:00 2001
Message-Id: <8a4a640d1b8dea977795de3f49b6ea3a791e401a.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From 86d9151effff69d2a8fc2027a31dd60bd8c6eb05 Mon Sep 17 00:00:00 2001
Message-Id: <86d9151effff69d2a8fc2027a31dd60bd8c6eb05.1642331593.git.stefan@agner.ch>
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:38:54 +0100
Subject: [PATCH 5/8] arm64: dts: meson: g12b: add GPIO fan support
Subject: [PATCH 05/10] arm64: dts: meson: g12b: add GPIO fan support
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
pad used to control the fan does not support real PWM, hence the RPM
@@ -38,5 +38,5 @@ index 4b6bb7e74e25..e8a3ede698b5 100644
compatible = "gpio-keys-polled";
poll-interval = <100>;
--
2.31.1
2.34.1

View File

@@ -1,10 +1,10 @@
From eee30c74e72b6092b5e30c4744a4f1d7d9526403 Mon Sep 17 00:00:00 2001
Message-Id: <eee30c74e72b6092b5e30c4744a4f1d7d9526403.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From f1120f132dbdf2e7f7acf328de55bbdce877d882 Mon Sep 17 00:00:00 2001
Message-Id: <f1120f132dbdf2e7f7acf328de55bbdce877d882.1642331593.git.stefan@agner.ch>
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 15:53:55 +0100
Subject: [PATCH 6/8] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
Subject: [PATCH 06/10] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
device
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -70,5 +70,5 @@ index e8a3ede698b5..dd345c6aa4b5 100644
cpu-supply = <&vddcpu_b>;
operating-points-v2 = <&cpu_opp_table_0>;
--
2.31.1
2.34.1

View File

@@ -1,10 +1,10 @@
From b10ae8fd3bef195eda4a30bc5f3995ca13b6cffd Mon Sep 17 00:00:00 2001
Message-Id: <b10ae8fd3bef195eda4a30bc5f3995ca13b6cffd.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From dcaf2dc71dd62487eb37561682934414a5795e0e Mon Sep 17 00:00:00 2001
Message-Id: <dcaf2dc71dd62487eb37561682934414a5795e0e.1642331593.git.stefan@agner.ch>
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Fri, 27 Mar 2020 17:05:22 +0900
Subject: [PATCH 7/8] arm64: dts: meson: add uart_A node
Subject: [PATCH 07/10] arm64: dts: meson: add uart_A node
The UART_A is available through J3 pin 8/10 and documented to be
available as UART by default.
@@ -40,5 +40,5 @@ index dd345c6aa4b5..cec346178e3d 100644
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.31.1
2.34.1

View File

@@ -1,10 +1,10 @@
From aea42d4a9a307438bf7099aee38daedac2bd5044 Mon Sep 17 00:00:00 2001
Message-Id: <aea42d4a9a307438bf7099aee38daedac2bd5044.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From d5d2d8b9eb93eab85af12f1844975903a7c5a879 Mon Sep 17 00:00:00 2001
Message-Id: <d5d2d8b9eb93eab85af12f1844975903a7c5a879.1642331593.git.stefan@agner.ch>
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 29 Apr 2021 21:32:43 +0200
Subject: [PATCH 8/8] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
Subject: [PATCH 08/10] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
@@ -33,5 +33,5 @@ index cec346178e3d..f1c3356c78a0 100644
status = "okay";
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
--
2.31.1
2.34.1

View File

@@ -0,0 +1,52 @@
From 19c34c0ceb6302b07e1017c426796c4cf7322d13 Mon Sep 17 00:00:00 2001
Message-Id: <19c34c0ceb6302b07e1017c426796c4cf7322d13.1642331593.git.stefan@agner.ch>
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 26 Jul 2021 16:59:08 +0200
Subject: [PATCH 09/10] Revert "of/fdt: Make sure no-map does not remove
already reserved regions"
U-Boot on Hardkernel ODROID-N2 adds fdt "memreserve" entries alongside
the reserved-memory nodes present in upstream Linux. This causes
reserving memory with the no-map flag to fail:
[ 0.000000] OF: fdt: Reserved memory: failed to reserve memory for node 'secmon@5000000': base 0x0000000005000000, size 3 MiB
This seems to cause kernel crashes such as:
[129988.642342] SError Interrupt on CPU4, code 0xbf000000 -- SError
Restore the bahavior of Linux kernel 5.9 and older and don't fail
updating the mapping with no-map.
This reverts commit 8a5a75e5e9e55de1cef5d83ca3589cb4899193ef.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/of/fdt.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 57ff31b6b1e4..7ef2246e0b1e 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1149,16 +1149,8 @@ int __init __weak early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size)
int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base,
phys_addr_t size, bool nomap)
{
- if (nomap) {
- /*
- * If the memory is already reserved (by another region), we
- * should not allow it to be marked nomap.
- */
- if (memblock_is_region_reserved(base, size))
- return -EBUSY;
-
+ if (nomap)
return memblock_mark_nomap(base, size);
- }
return memblock_reserve(base, size);
}
--
2.34.1

View File

@@ -0,0 +1,48 @@
From be21685475a0739d44ca4c63fcb7f50b324593c9 Mon Sep 17 00:00:00 2001
Message-Id: <be21685475a0739d44ca4c63fcb7f50b324593c9.1642331593.git.stefan@agner.ch>
In-Reply-To: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
References: <c7825747afd8bb975dc918f28e4afe8058a518f3.1642331593.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Sun, 16 Jan 2022 12:12:29 +0100
Subject: [PATCH 10/10] Revert "drm: meson_drv add shutdown function"
This reverts commit d4ec1ffbdaa8939a208656e9c1440742c457ef16.
It seems that this patch actually breaks reboot on ODROID-N2+.
---
drivers/gpu/drm/meson/meson_drv.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index 2753067c08e6..3d1de9cbb1c8 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -482,17 +482,6 @@ static int meson_probe_remote(struct platform_device *pdev,
return count;
}
-static void meson_drv_shutdown(struct platform_device *pdev)
-{
- struct meson_drm *priv = dev_get_drvdata(&pdev->dev);
-
- if (!priv)
- return;
-
- drm_kms_helper_poll_fini(priv->drm);
- drm_atomic_helper_shutdown(priv->drm);
-}
-
static int meson_drv_probe(struct platform_device *pdev)
{
struct component_match *match = NULL;
@@ -564,7 +553,6 @@ static const struct dev_pm_ops meson_drv_pm_ops = {
static struct platform_driver meson_drm_platform_driver = {
.probe = meson_drv_probe,
- .shutdown = meson_drv_shutdown,
.driver = {
.name = "meson-drm",
.of_match_table = dt_match,
--
2.34.1

View File

@@ -1,38 +0,0 @@
From a189f6229a9462ae2fc406b1e45286d2eea32b40 Mon Sep 17 00:00:00 2001
Message-Id: <a189f6229a9462ae2fc406b1e45286d2eea32b40.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 15 Sep 2020 17:24:31 +0200
Subject: [PATCH 02/11] dt-bindings: arm: amlogic: add support for the
ODROID-N2+
HardKernel ODROID-N2+ uses a revised Amlogic S922X v2 chip that supports
higher cpu clock speeds than the original ODROID-N2.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20200915152432.30616-3-narmstrong@baylibre.com
(cherry picked from commit 88ba71cdc5497390350c87e68ce35688e88be3e8)
---
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
index 5eba9f48823e..12ba8d074370 100644
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
@@ -153,6 +153,7 @@ properties:
- azw,gtking
- azw,gtking-pro
- hardkernel,odroid-n2
+ - hardkernel,odroid-n2-plus
- khadas,vim3
- ugoos,am6
- const: amlogic,s922x
--
2.31.1

View File

@@ -1,79 +0,0 @@
From 2f09401241a0f2348d3e30617e89a00c1dc45895 Mon Sep 17 00:00:00 2001
Message-Id: <2f09401241a0f2348d3e30617e89a00c1dc45895.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 15 Sep 2020 17:24:32 +0200
Subject: [PATCH 03/11] arm64: dts: meson: add support for the ODROID-N2+
HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
clock speeds than the original ODROID-N2.
The rev. C support a slighly higher VDDCPU_A & VDDCPU_B voltages and supports
the same OPPs as the Amlogic A311D SoC from the same G12B family.
Suggested-by: Dongjin Kim <tobetter@hardkernel.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20200915152432.30616-4-narmstrong@baylibre.com
(cherry picked from commit 98d24896ee117b1f0969405476c943e9307e30d4)
---
arch/arm64/boot/dts/amlogic/Makefile | 1 +
.../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 31 +++++++++++++++++++
2 files changed, 32 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 4e2239ffcaa5..b0b3d6791499 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
new file mode 100644
index 000000000000..5de2815ba99d
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 BayLibre, SAS
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ */
+
+/dts-v1/;
+
+/* The Amlogic S922X Rev. C supports the same OPPs as the A311D variant */
+#include "meson-g12b-a311d.dtsi"
+#include "meson-g12b-odroid-n2.dtsi"
+
+/ {
+ compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", "amlogic,g12b";
+ model = "Hardkernel ODROID-N2Plus";
+};
+
+&vddcpu_a {
+ regulator-min-microvolt = <680000>;
+ regulator-max-microvolt = <1040000>;
+
+ pwms = <&pwm_AO_cd 1 1500 0>;
+};
+
+&vddcpu_b {
+ regulator-min-microvolt = <680000>;
+ regulator-max-microvolt = <1040000>;
+
+ pwms = <&pwm_AO_cd 1 1500 0>;
+};
+
--
2.31.1

View File

@@ -1,55 +0,0 @@
From 7dba042e7863dc61ec74c0759493264e48d32df2 Mon Sep 17 00:00:00 2001
Message-Id: <7dba042e7863dc61ec74c0759493264e48d32df2.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Mon, 11 Jan 2021 13:58:31 +0000
Subject: [PATCH 04/11] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases
to ODROID-N2 dtsi
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210111135831.2218-1-christianshewitt@gmail.com
---
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 6982632ae646..5927c4493f5a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -13,6 +13,8 @@ / {
aliases {
serial0 = &uart_AO;
ethernet0 = &ethmac;
+ rtc0 = &rtc;
+ rtc1 = &vrtc;
};
dioo2133: audio-amplifier-0 {
@@ -478,6 +480,18 @@ &ir {
linux,rc-map-name = "rc-odroid";
};
+&i2c3 {
+ status = "okay";
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
+ pinctrl-names = "default";
+
+ rtc: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ wakeup-source;
+ };
+};
+
&pwm_ab {
pinctrl-0 = <&pwm_a_e_pins>;
pinctrl-names = "default";
--
2.31.1

View File

@@ -1,37 +0,0 @@
From 3f2aecc668b172e0c91bf1bfdc78ee18a6bb6645 Mon Sep 17 00:00:00 2001
Message-Id: <3f2aecc668b172e0c91bf1bfdc78ee18a6bb6645.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 7 Apr 2021 04:26:08 +0000
Subject: [PATCH 05/11] arm64: dts: meson: add saradc node to ODROID N2/N2+
Add the meson saradc node to the ODROID N2/N2+ common dtsi.
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210407042609.9736-3-christianshewitt@gmail.com
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 5927c4493f5a..194a437b4e3f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -508,6 +508,11 @@ &pwm_AO_cd {
status = "okay";
};
+&saradc {
+ status = "okay";
+ vref-supply = <&vddao_1v8>;
+};
+
/* SD card */
&sd_emmc_b {
status = "okay";
--
2.31.1

View File

@@ -1,78 +0,0 @@
From d13c62fab2c91cacda74a9001ea6a6c7d8a9af39 Mon Sep 17 00:00:00 2001
Message-Id: <d13c62fab2c91cacda74a9001ea6a6c7d8a9af39.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 7 Apr 2021 04:26:09 +0000
Subject: [PATCH 06/11] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi.
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210407042609.9736-4-christianshewitt@gmail.com
---
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 194a437b4e3f..fe85aa6da460 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -446,6 +446,51 @@ &frddr_c {
};
&gpio {
+ gpio-line-names =
+ /* GPIOZ */
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ /* GPIOH */
+ "", "", "", "", "", "", "", "",
+ "",
+ /* BOOT */
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ /* GPIOC */
+ "", "", "", "", "", "", "", "",
+ /* GPIOA */
+ "PIN_44", /* GPIOA_0 */
+ "PIN_46", /* GPIOA_1 */
+ "PIN_45", /* GPIOA_2 */
+ "PIN_47", /* GPIOA_3 */
+ "PIN_26", /* GPIOA_4 */
+ "", "", "", "", "", "",
+ "PIN_42", /* GPIOA_11 */
+ "PIN_32", /* GPIOA_12 */
+ "PIN_7", /* GPIOA_13 */
+ "PIN_27", /* GPIOA_14 */
+ "PIN_28", /* GPIOA_15 */
+ /* GPIOX */
+ "PIN_16", /* GPIOX_0 */
+ "PIN_18", /* GPIOX_1 */
+ "PIN_22", /* GPIOX_2 */
+ "PIN_11", /* GPIOX_3 */
+ "PIN_13", /* GPIOX_4 */
+ "PIN_33", /* GPIOX_5 */
+ "PIN_35", /* GPIOX_6 */
+ "PIN_15", /* GPIOX_7 */
+ "PIN_19", /* GPIOX_8 */
+ "PIN_21", /* GPIOX_9 */
+ "PIN_24", /* GPIOX_10 */
+ "PIN_23", /* GPIOX_11 */
+ "PIN_8", /* GPIOX_12 */
+ "PIN_10", /* GPIOX_13 */
+ "PIN_29", /* GPIOX_14 */
+ "PIN_31", /* GPIOX_15 */
+ "PIN_12", /* GPIOX_16 */
+ "PIN_3", /* GPIOX_17 */
+ "PIN_5", /* GPIOX_18 */
+ "PIN_36"; /* GPIOX_19 */
/*
* WARNING: The USB Hub on the Odroid-N2 needs a reset signal
* to be turned high in order to be detected by the USB Controller
--
2.31.1

View File

@@ -1,42 +0,0 @@
From 25cd545d370b67f5e5e19d93484d378571526da2 Mon Sep 17 00:00:00 2001
Message-Id: <25cd545d370b67f5e5e19d93484d378571526da2.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:20:48 +0100
Subject: [PATCH 07/11] arm64: dts: meson: g12b: add power button support
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
button press is triggered.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index fe85aa6da460..9b1541ee2273 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
};
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ power-button {
+ label = "power";
+ linux,code = <KEY_POWER>;
+ gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
leds {
compatible = "gpio-leds";
--
2.31.1

View File

@@ -1,42 +0,0 @@
From b94a0698f21a2d8f6623b69fc17fe9491bc22a9b Mon Sep 17 00:00:00 2001
Message-Id: <b94a0698f21a2d8f6623b69fc17fe9491bc22a9b.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:38:54 +0100
Subject: [PATCH 08/11] arm64: dts: meson: g12b: add GPIO fan support
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
pad used to control the fan does not support real PWM, hence the RPM
cannot be modulated.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 9b1541ee2273..8ad7c3ee1aa3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
};
+ /*
+ * 5V 80x80x10.8mm cooling fan from Hardkernel shop.
+ */
+ fan0: gpio-fan {
+ #cooling-cells = <2>;
+ compatible = "gpio-fan";
+ gpio-fan,speed-map = <0 0 1600 1>;
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
gpio-keys-polled {
compatible = "gpio-keys-polled";
poll-interval = <100>;
--
2.31.1

View File

@@ -1,74 +0,0 @@
From 4d9f93dbdc93e83ba8ddf01893b3c29cd11a87f9 Mon Sep 17 00:00:00 2001
Message-Id: <4d9f93dbdc93e83ba8ddf01893b3c29cd11a87f9.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 15:53:55 +0100
Subject: [PATCH 09/11] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
device
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add the GPIO fan as a cooling device for the CPU thermal zone. Since we
have only full fan speed available with this, set the tripping point to
65°C which is the highest tripping point which Hardkernel used in their
downstream kernel.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 8ad7c3ee1aa3..c4052293ea0d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -388,6 +388,44 @@ &clkc_audio {
status = "okay";
};
+&cpu_thermal {
+ trips {
+ cpu_warm: cpu_warm {
+ hysteresis = <5000>;
+ temperature = <65000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ cooling-device =
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ trip = <&cpu_warm>;
+ };
+ map1 {
+ trip = <&cpu_passive>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ map2 {
+ trip = <&cpu_hot>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
&cpu0 {
cpu-supply = <&vddcpu_b>;
operating-points-v2 = <&cpu_opp_table_0>;
--
2.31.1

View File

@@ -1,44 +0,0 @@
From 1eeec94aa6dd6f9900e6213025916eb85f6b3b62 Mon Sep 17 00:00:00 2001
Message-Id: <1eeec94aa6dd6f9900e6213025916eb85f6b3b62.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Fri, 27 Mar 2020 17:05:22 +0900
Subject: [PATCH 10/11] arm64: dts: meson: add uart_A node
The UART_A is available through J3 pin 8/10 and documented to be
available as UART by default.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index c4052293ea0d..38a996ed3e19 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -12,6 +12,7 @@
/ {
aliases {
serial0 = &uart_AO;
+ serial1 = &uart_A;
ethernet0 = &ethmac;
rtc0 = &rtc;
rtc1 = &vrtc;
@@ -728,6 +729,12 @@ &toddr_c {
status = "okay";
};
+&uart_A {
+ status = "okay";
+ pinctrl-0 = <&uart_a_pins>;
+ pinctrl-names = "default";
+};
+
&uart_AO {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.31.1

View File

@@ -1,37 +0,0 @@
From 400fce2e1eaab6d04f542eaa0fe3b53fb9d79d82 Mon Sep 17 00:00:00 2001
Message-Id: <400fce2e1eaab6d04f542eaa0fe3b53fb9d79d82.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 29 Apr 2021 21:32:43 +0200
Subject: [PATCH 11/11] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
I2C instance. Enable i2c2 and use the appropriate pinmux.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 38a996ed3e19..45a8998c4a3a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -586,6 +586,12 @@ &ir {
linux,rc-map-name = "rc-odroid";
};
+&i2c2 {
+ status = "okay";
+ pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
+ pinctrl-names = "default";
+};
+
&i2c3 {
status = "okay";
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
--
2.31.1

View File

@@ -1,5 +1,5 @@
From 8511fa06c13a9761e53ed72fe7111f5c3e3514a0 Mon Sep 17 00:00:00 2001
Message-Id: <8511fa06c13a9761e53ed72fe7111f5c3e3514a0.1617731946.git.stefan@agner.ch>
From ff82d04354784cd982ab1a912c08d3eb22f82d13 Mon Sep 17 00:00:00 2001
Message-Id: <ff82d04354784cd982ab1a912c08d3eb22f82d13.1632758701.git.stefan@agner.ch>
From: Neil Armstrong <narmstrong@baylibre.com>
Date: Mon, 2 Sep 2019 15:42:04 +0200
Subject: [PATCH] HACK: mmc: meson-gx: limit to 24MHz
@@ -23,5 +23,5 @@ index fcf4f03d1e..6ded4b619b 100644
cfg->name = dev->name;
--
2.31.1
2.33.0

View File

@@ -1,38 +0,0 @@
From e194459c7459a1c6f9d1183e05186d164f0c6715 Mon Sep 17 00:00:00 2001
Message-Id: <e194459c7459a1c6f9d1183e05186d164f0c6715.1617807077.git.stefan@agner.ch>
In-Reply-To: <8511fa06c13a9761e53ed72fe7111f5c3e3514a0.1617807077.git.stefan@agner.ch>
References: <8511fa06c13a9761e53ed72fe7111f5c3e3514a0.1617807077.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 1 Apr 2021 14:33:57 +0200
Subject: [PATCH 2/2] arm64: dts: meson: odroidc2: readd PHY reset properties
The sync of the device tree and dt-bindings from Linux v5.6-rc2
11a48a5a18c6 ("Linux 5.6-rc2") causes Ethernet to break on some
ODROID-C2. The PHY seems to need proper reset timing to be functional
in U-Boot and Linux afterwards. Readd the old PHY reset bindings for
dwmac until we support the new bindings in the PHY node.
Fixes: dd5f2351e99a ("arm64: dts: meson: sync dt and bindings from v5.6-rc2")
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/dts/meson-gxbb-odroidc2.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/dts/meson-gxbb-odroidc2.dts b/arch/arm/dts/meson-gxbb-odroidc2.dts
index 70fcfb7b06..8b80bbc90b 100644
--- a/arch/arm/dts/meson-gxbb-odroidc2.dts
+++ b/arch/arm/dts/meson-gxbb-odroidc2.dts
@@ -188,6 +188,10 @@
phy-handle = <&eth_phy0>;
phy-mode = "rgmii";
+ snps,reset-gpio = <&gpio GPIOZ_14 0>;
+ snps,reset-delays-us = <0 10000 1000000>;
+ snps,reset-active-low;
+
amlogic,tx-delay-ns = <2>;
mdio {
--
2.31.1

View File

@@ -0,0 +1,660 @@
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_MEMCG=y
CONFIG_BLK_CGROUP=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_HUGETLB=y
CONFIG_CPUSETS=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y
CONFIG_USER_NS=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_BPF_SYSCALL=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
CONFIG_ARCH_MESON=y
# CONFIG_CAVIUM_ERRATUM_22375 is not set
# CONFIG_CAVIUM_ERRATUM_23154 is not set
# CONFIG_CAVIUM_ERRATUM_27456 is not set
# CONFIG_CAVIUM_ERRATUM_30115 is not set
# CONFIG_CAVIUM_TX2_ERRATUM_219 is not set
# CONFIG_FUJITSU_ERRATUM_010001 is not set
# CONFIG_HISILICON_ERRATUM_161600802 is not set
# CONFIG_QCOM_FALKOR_ERRATUM_1003 is not set
# CONFIG_QCOM_FALKOR_ERRATUM_1009 is not set
# CONFIG_QCOM_QDF2400_ERRATUM_0065 is not set
# CONFIG_QCOM_FALKOR_ERRATUM_E1041 is not set
# CONFIG_SOCIONEXT_SYNQUACER_PREITS is not set
CONFIG_ARM64_VA_BITS_48=y
CONFIG_SCHED_MC=y
CONFIG_HZ_1000=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_XEN=y
CONFIG_COMPAT=y
CONFIG_ARMV8_DEPRECATED=y
CONFIG_SWP_EMULATION=y
CONFIG_CP15_BARRIER_EMULATION=y
CONFIG_SETEND_EMULATION=y
CONFIG_RANDOMIZE_BASE=y
CONFIG_HIBERNATION=y
CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
CONFIG_CPUFREQ_DT=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_CRYPTO_SHA1_ARM64_CE=y
CONFIG_CRYPTO_SHA2_ARM64_CE=y
CONFIG_CRYPTO_SHA512_ARM64_CE=m
CONFIG_CRYPTO_SHA3_ARM64=m
CONFIG_CRYPTO_SM3_ARM64_CE=m
CONFIG_CRYPTO_GHASH_ARM64_CE=y
CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=m
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_BS=m
CONFIG_JUMP_LABEL=y
# CONFIG_SECCOMP is not set
# CONFIG_GCC_PLUGINS is not set
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLK_DEV_THROTTLING=y
CONFIG_PARTITION_ADVANCED=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_KSM=y
CONFIG_MEMORY_FAILURE=y
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_CMA=y
CONFIG_ZSMALLOC=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_XFRM_USER=m
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_INET_ESP=m
CONFIG_IPV6_SIT=m
CONFIG_NETFILTER=y
CONFIG_BRIDGE_NETFILTER=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
CONFIG_NETFILTER_XT_TARGET_LOG=m
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
CONFIG_NETFILTER_XT_MATCH_IPVS=y
CONFIG_IP_VS=y
CONFIG_IP_VS_RR=y
CONFIG_IP_VS_NFCT=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_MANGLE=m
CONFIG_IP6_NF_IPTABLES=m
CONFIG_IP6_NF_FILTER=m
CONFIG_IP6_NF_TARGET_REJECT=m
CONFIG_IP6_NF_MANGLE=m
CONFIG_IP6_NF_NAT=m
CONFIG_IP6_NF_TARGET_MASQUERADE=m
CONFIG_BRIDGE=y
CONFIG_BRIDGE_VLAN_FILTERING=y
CONFIG_VLAN_8021Q=m
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_VLAN_8021Q_MVRP=y
CONFIG_NET_SCHED=y
CONFIG_NET_CLS_CGROUP=y
CONFIG_DNS_RESOLVER=y
CONFIG_CGROUP_NET_PRIO=y
CONFIG_BPF_JIT=y
CONFIG_CAN=m
CONFIG_CAN_VCAN=m
CONFIG_CAN_SLCAN=m
CONFIG_CAN_GS_USB=m
CONFIG_CAN_PEAK_USB=m
CONFIG_BT=m
CONFIG_BT_HIDP=m
CONFIG_BT_LEDS=y
CONFIG_BT_HCIBTUSB=m
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIUART_BCM=y
CONFIG_CFG80211=m
CONFIG_CFG80211_WEXT=y
CONFIG_MAC80211=m
CONFIG_MAC80211_LEDS=y
CONFIG_RFKILL=m
CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y
CONFIG_PCI=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCIEAER=y
CONFIG_PCI_IOV=y
CONFIG_HOTPLUG_PCI=y
CONFIG_PCI_HOST_GENERIC=y
CONFIG_PCIE_DW_PLAT_HOST=y
# CONFIG_PCI_MESON is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_FW_LOADER_USER_HELPER=y
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
CONFIG_SIMPLE_PM_BUS=y
CONFIG_MTD=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_RAW_NAND=y
CONFIG_MTD_NAND_DENALI_DT=y
CONFIG_MTD_SPI_NOR=y
CONFIG_OF_OVERLAY=y
CONFIG_ZRAM=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=m
# CONFIG_XEN_BLKDEV_FRONTEND is not set
CONFIG_BLK_DEV_NVME=m
CONFIG_NVME_HWMON=y
CONFIG_SRAM=y
CONFIG_EEPROM_AT25=m
CONFIG_RAID_ATTRS=m
CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_SAS_LIBSAS=y
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_BLK_DEV_DM=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_NETDEVICES=y
CONFIG_DUMMY=y
CONFIG_WIREGUARD=m
CONFIG_MACVLAN=y
CONFIG_MACVTAP=m
CONFIG_IPVLAN=y
CONFIG_VXLAN=y
CONFIG_NETCONSOLE=y
CONFIG_TUN=y
CONFIG_VETH=y
CONFIG_VIRTIO_NET=y
CONFIG_AMD_XGBE=y
CONFIG_ATL1C=m
CONFIG_BNX2X=m
CONFIG_MACB=y
CONFIG_THUNDER_NIC_PF=y
CONFIG_HIX5HD2_GMAC=y
CONFIG_HNS_DSAF=y
CONFIG_HNS_ENET=y
CONFIG_HNS3=y
CONFIG_HNS3_HCLGE=y
CONFIG_HNS3_ENET=y
CONFIG_E1000E=y
CONFIG_IGB=y
CONFIG_IGBVF=y
CONFIG_MVMDIO=y
CONFIG_SKY2=y
CONFIG_MLX4_EN=m
CONFIG_MLX5_CORE=m
CONFIG_MLX5_CORE_EN=y
CONFIG_MLXFW=m
CONFIG_QCOM_EMAC=m
CONFIG_SMC91X=y
CONFIG_SMSC911X=y
CONFIG_STMMAC_ETH=m
CONFIG_MESON_GXL_PHY=y
CONFIG_MARVELL_PHY=m
CONFIG_MARVELL_10G_PHY=m
CONFIG_MICREL_PHY=y
CONFIG_AT803X_PHY=m
CONFIG_REALTEK_PHY=m
CONFIG_ROCKCHIP_PHY=y
CONFIG_MDIO_BITBANG=y
CONFIG_MDIO_BUS_MUX_MESON_G12A=y
CONFIG_MDIO_BUS_MUX_MMIOREG=y
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8150=m
CONFIG_USB_RTL8152=m
CONFIG_USB_LAN78XX=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_DM9601=m
CONFIG_USB_NET_SR9800=m
CONFIG_USB_NET_SMSC75XX=m
CONFIG_USB_NET_SMSC95XX=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_ATH10K=m
CONFIG_ATH10K_PCI=m
CONFIG_BRCMFMAC=m
CONFIG_MWIFIEX=m
CONFIG_MWIFIEX_PCIE=m
CONFIG_RT2X00=m
CONFIG_RT2500USB=m
CONFIG_RT73USB=m
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT3573=y
CONFIG_RT2800USB_RT53XX=y
CONFIG_RT2800USB_RT55XX=y
CONFIG_RT2800USB_UNKNOWN=y
CONFIG_RTL8192CU=m
CONFIG_WL18XX=m
CONFIG_WLCORE_SDIO=m
# CONFIG_XEN_NETDEV_FRONTEND is not set
CONFIG_INPUT_POLLDEV=m
CONFIG_INPUT_MATRIXKMAP=y
CONFIG_INPUT_EVDEV=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_GPIO_POLLED=y
# CONFIG_MOUSE_PS2 is not set
CONFIG_SERIO_SERPORT=m
CONFIG_SERIO_AMBAKMI=y
CONFIG_SERIO_LIBPS2=y
CONFIG_LEGACY_PTY_COUNT=16
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_16550A_VARIANTS is not set
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DW=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
CONFIG_SERIAL_MESON=y
CONFIG_SERIAL_MESON_CONSOLE=y
CONFIG_SERIAL_XILINX_PS_UART=y
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
CONFIG_SERIAL_FSL_LPUART=y
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
CONFIG_SERIAL_DEV_BUS=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_IPMI_HANDLER=m
CONFIG_IPMI_DEVICE_INTERFACE=m
CONFIG_IPMI_SI=m
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_CAVIUM=m
CONFIG_HW_RANDOM_OPTEE=m
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS_I2C_INFINEON=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX_PCA954x=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_I2C_GPIO=m
CONFIG_I2C_MESON=y
CONFIG_I2C_RK3X=y
CONFIG_SPI=y
CONFIG_SPI_BITBANG=m
CONFIG_SPI_NXP_FLEXSPI=y
CONFIG_SPI_MESON_SPICC=m
CONFIG_SPI_MESON_SPIFC=m
CONFIG_SPI_PL022=y
CONFIG_SPI_ROCKCHIP=y
CONFIG_SPI_SPIDEV=m
CONFIG_PINCTRL_SINGLE=y
CONFIG_PINCTRL_MAX77620=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_DWAPB=y
CONFIG_GPIO_GENERIC_PLATFORM=y
CONFIG_GPIO_MB86S7X=y
CONFIG_GPIO_PL061=y
CONFIG_GPIO_XGENE=y
CONFIG_GPIO_MAX732X=y
CONFIG_GPIO_PCA953X=y
CONFIG_GPIO_PCA953X_IRQ=y
CONFIG_GPIO_MAX77620=y
CONFIG_POWER_RESET_BRCMSTB=y
CONFIG_POWER_RESET_XGENE=y
CONFIG_POWER_RESET_SYSCON=y
CONFIG_SYSCON_REBOOT_MODE=y
CONFIG_BATTERY_SBS=m
CONFIG_BATTERY_BQ27XXX=y
CONFIG_SENSORS_GPIO_FAN=y
CONFIG_SENSORS_LM90=m
CONFIG_SENSORS_PWM_FAN=m
CONFIG_SENSORS_INA2XX=m
CONFIG_SENSORS_INA3221=m
CONFIG_THERMAL=y
CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_CPU_THERMAL=y
CONFIG_DEVFREQ_THERMAL=y
CONFIG_KHADAS_MCU_FAN_THERMAL=m
CONFIG_WATCHDOG=y
CONFIG_ARM_SP805_WATCHDOG=y
CONFIG_DW_WATCHDOG=y
CONFIG_MESON_GXBB_WATCHDOG=y
CONFIG_MESON_WATCHDOG=y
CONFIG_MFD_BD9571MWV=y
CONFIG_MFD_AXP20X_I2C=y
CONFIG_MFD_HI6421_PMIC=y
CONFIG_MFD_MAX77620=y
CONFIG_MFD_RK808=y
CONFIG_MFD_SEC_CORE=y
CONFIG_MFD_ROHM_BD718XX=y
CONFIG_MFD_KHADAS_MCU=m
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_AXP20X=y
CONFIG_REGULATOR_BD718XX=y
CONFIG_REGULATOR_BD9571MWV=y
CONFIG_REGULATOR_FAN53555=y
CONFIG_REGULATOR_GPIO=y
CONFIG_REGULATOR_HI6421V530=y
CONFIG_REGULATOR_MAX77620=y
CONFIG_REGULATOR_PFUZE100=y
CONFIG_REGULATOR_PWM=y
CONFIG_REGULATOR_RK808=y
CONFIG_REGULATOR_S2MPS11=y
CONFIG_REGULATOR_VCTRL=m
CONFIG_RC_CORE=m
CONFIG_RC_DECODERS=y
CONFIG_RC_DEVICES=y
CONFIG_IR_MESON=m
CONFIG_MEDIA_CEC_SUPPORT=y
CONFIG_CEC_MESON_AO=m
CONFIG_CEC_MESON_G12A_AO=m
CONFIG_CEC_GPIO=m
CONFIG_USB_PULSE8_CEC=m
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
CONFIG_VIDEO_V4L2_SUBDEV_API=y
# CONFIG_DVB_NET is not set
# CONFIG_DVB_DYNAMIC_MINORS is not set
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_M5602=m
CONFIG_USB_STV06XX=m
CONFIG_USB_GL860=m
CONFIG_USB_GSPCA_BENQ=m
CONFIG_USB_GSPCA_CONEX=m
CONFIG_USB_GSPCA_CPIA1=m
CONFIG_USB_GSPCA_DTCS033=m
CONFIG_USB_GSPCA_ETOMS=m
CONFIG_USB_GSPCA_FINEPIX=m
CONFIG_USB_GSPCA_JEILINJ=m
CONFIG_USB_GSPCA_JL2005BCD=m
CONFIG_USB_GSPCA_KINECT=m
CONFIG_USB_GSPCA_KONICA=m
CONFIG_USB_GSPCA_MARS=m
CONFIG_USB_GSPCA_MR97310A=m
CONFIG_USB_GSPCA_NW80X=m
CONFIG_USB_GSPCA_OV519=m
CONFIG_USB_GSPCA_OV534=m
CONFIG_USB_GSPCA_OV534_9=m
CONFIG_USB_GSPCA_PAC207=m
CONFIG_USB_GSPCA_PAC7302=m
CONFIG_USB_GSPCA_PAC7311=m
CONFIG_USB_GSPCA_SE401=m
CONFIG_USB_GSPCA_SN9C2028=m
CONFIG_USB_GSPCA_SN9C20X=m
CONFIG_USB_GSPCA_SONIXB=m
CONFIG_USB_GSPCA_SONIXJ=m
CONFIG_USB_GSPCA_SPCA500=m
CONFIG_USB_GSPCA_SPCA501=m
CONFIG_USB_GSPCA_SPCA505=m
CONFIG_USB_GSPCA_SPCA506=m
CONFIG_USB_GSPCA_SPCA508=m
CONFIG_USB_GSPCA_SPCA561=m
CONFIG_USB_GSPCA_SPCA1528=m
CONFIG_USB_GSPCA_SQ905=m
CONFIG_USB_GSPCA_SQ905C=m
CONFIG_USB_GSPCA_SQ930X=m
CONFIG_USB_GSPCA_STK014=m
CONFIG_USB_GSPCA_STK1135=m
CONFIG_USB_GSPCA_STV0680=m
CONFIG_USB_GSPCA_SUNPLUS=m
CONFIG_USB_GSPCA_T613=m
CONFIG_USB_GSPCA_TOPRO=m
CONFIG_USB_GSPCA_TOUPTEK=m
CONFIG_USB_GSPCA_TV8532=m
CONFIG_USB_GSPCA_VC032X=m
CONFIG_USB_GSPCA_VICAM=m
CONFIG_USB_GSPCA_XIRLINK_CIT=m
CONFIG_USB_GSPCA_ZC3XX=m
CONFIG_USB_PWC=m
CONFIG_VIDEO_CPIA2=m
CONFIG_USB_ZR364XX=m
CONFIG_USB_STKWEBCAM=m
CONFIG_USB_S2255=m
CONFIG_VIDEO_USBTV=m
CONFIG_VIDEO_PVRUSB2=m
CONFIG_VIDEO_HDPVR=m
CONFIG_VIDEO_STK1160_COMMON=m
CONFIG_VIDEO_AU0828=m
CONFIG_VIDEO_CX231XX=m
CONFIG_VIDEO_CX231XX_ALSA=m
CONFIG_VIDEO_CX231XX_DVB=m
CONFIG_VIDEO_TM6000=m
CONFIG_VIDEO_TM6000_ALSA=m
CONFIG_VIDEO_TM6000_DVB=m
CONFIG_VIDEO_EM28XX=m
CONFIG_VIDEO_EM28XX_V4L2=m
CONFIG_VIDEO_EM28XX_ALSA=m
CONFIG_VIDEO_EM28XX_DVB=m
CONFIG_MEDIA_PCI_SUPPORT=y
CONFIG_DRM=y
CONFIG_DRM_PANEL_SIMPLE=m
CONFIG_DRM_DW_HDMI_CEC=y
CONFIG_DRM_MESON=y
CONFIG_DRM_PL111=m
CONFIG_DRM_LIMA=m
CONFIG_DRM_PANFROST=m
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_EFI=y
CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_PWM=m
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_DYNAMIC_MINORS=y
# CONFIG_SND_PCI is not set
# CONFIG_SND_SPI is not set
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_SOC=y
CONFIG_SND_MESON_AXG_SOUND_CARD=y
CONFIG_SND_MESON_GX_SOUND_CARD=y
CONFIG_SND_SOC_AK4613=m
CONFIG_SND_SOC_DMIC=m
CONFIG_SND_SOC_ES7134=m
CONFIG_SND_SOC_ES7241=m
CONFIG_SND_SOC_MAX98357A=y
CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
CONFIG_SND_SOC_SPDIF=m
CONFIG_SND_SIMPLE_CARD=m
CONFIG_SND_AUDIO_GRAPH_CARD=m
CONFIG_HIDRAW=y
CONFIG_I2C_HID=m
CONFIG_USB=y
CONFIG_USB_OTG=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_PLATFORM=y
CONFIG_USB_STORAGE=y
CONFIG_USB_UAS=y
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_DWC3=y
CONFIG_USB_DWC2=y
CONFIG_USB_CHIPIDEA=y
CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_ISP1760=y
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_SIMPLE=m
CONFIG_USB_SERIAL_CH341=m
CONFIG_USB_SERIAL_CP210X=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_PL2303=m
CONFIG_USB_SERIAL_TI=m
CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_HSIC_USB3503=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_USB_ULPI=y
CONFIG_USB_GADGET=y
CONFIG_USB_BDC_UDC=y
CONFIG_TYPEC=m
CONFIG_MMC=y
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_ARMMMCI=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_OF_ARASAN=y
CONFIG_MMC_SDHCI_CADENCE=y
CONFIG_MMC_SDHCI_F_SDH30=y
CONFIG_MMC_MESON_GX=y
CONFIG_MMC_SPI=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_EXYNOS=y
CONFIG_MMC_DW_HI3798CV200=y
CONFIG_MMC_DW_K3=y
CONFIG_MMC_SDHCI_XENON=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_PWM=y
CONFIG_LEDS_SYSCON=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_CPU=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_LEDS_TRIGGER_PANIC=y
CONFIG_LEDS_TRIGGER_AUDIO=m
CONFIG_EDAC=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1307=m
CONFIG_RTC_DRV_HYM8563=m
CONFIG_RTC_DRV_MAX77686=y
CONFIG_RTC_DRV_RK808=m
CONFIG_RTC_DRV_PCF8563=y
CONFIG_RTC_DRV_RX8581=m
CONFIG_RTC_DRV_S5M=y
CONFIG_RTC_DRV_DS3232=y
CONFIG_RTC_DRV_EFI=y
CONFIG_RTC_DRV_PL031=y
CONFIG_DMADEVICES=y
CONFIG_FSL_EDMA=y
CONFIG_MV_XOR_V2=y
CONFIG_PL330_DMA=y
CONFIG_QCOM_HIDMA_MGMT=y
CONFIG_QCOM_HIDMA=y
CONFIG_VFIO=y
CONFIG_VFIO_PCI=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_MMIO=y
# CONFIG_XEN_BALLOON is not set
# CONFIG_XEN_DEV_EVTCHN is not set
# CONFIG_XEN_BACKEND is not set
# CONFIG_XENFS is not set
# CONFIG_XEN_SYS_HYPERVISOR is not set
# CONFIG_XEN_GNTDEV is not set
# CONFIG_XEN_GRANT_DEV_ALLOC is not set
CONFIG_STAGING=y
CONFIG_STAGING_GASKET_FRAMEWORK=m
CONFIG_STAGING_APEX_DRIVER=m
CONFIG_COMMON_CLK_RK808=y
CONFIG_COMMON_CLK_CS2000_CP=y
CONFIG_COMMON_CLK_S2MPS11=y
CONFIG_CLK_QORIQ=y
CONFIG_COMMON_CLK_XGENE=y
CONFIG_COMMON_CLK_PWM=y
CONFIG_HWSPINLOCK=y
CONFIG_ARM_SMMU=y
CONFIG_ARM_SMMU_V3=y
CONFIG_REMOTEPROC=y
CONFIG_SOC_BRCMSTB=y
CONFIG_SOC_TI=y
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
CONFIG_EXTCON_USB_GPIO=y
CONFIG_MEMORY=y
CONFIG_IIO=y
CONFIG_SENSORS_ISL29018=m
CONFIG_MPL3115=m
CONFIG_PWM=y
CONFIG_PWM_MESON=y
CONFIG_PHY_XGENE=y
CONFIG_PHY_FSL_IMX8MQ_USB=y
CONFIG_PHY_QCOM_USB_HS=y
CONFIG_PHY_SAMSUNG_USB2=y
CONFIG_MESON_EFUSE=y
CONFIG_TEE=y
CONFIG_OPTEE=y
CONFIG_EXT3_FS=m
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_XFS_FS=m
CONFIG_BTRFS_FS=m
CONFIG_F2FS_FS=m
CONFIG_FANOTIFY=y
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
CONFIG_QUOTA=y
CONFIG_AUTOFS4_FS=y
CONFIG_FUSE_FS=m
CONFIG_CUSE=m
CONFIG_OVERLAY_FS=y
CONFIG_OVERLAY_FS_METACOPY=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_HUGETLBFS=y
CONFIG_CONFIGFS_FS=y
CONFIG_EFIVAR_FS=y
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_XATTR=y
CONFIG_SQUASHFS_LZ4=y
CONFIG_NFS_FS=m
CONFIG_NFS_V4=m
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_CIFS=m
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
CONFIG_CIFS_DFS_UPCALL=y
CONFIG_9P_FS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_SECURITY=y
CONFIG_SECURITY_APPARMOR=y
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity"
CONFIG_CRYPTO_ECHAINIV=y
CONFIG_CRYPTO_CHACHA20=m
CONFIG_CRYPTO_LZ4=y
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_DEV_VIRTIO=m
CONFIG_CRYPTO_DEV_AMLOGIC_GXL=y
CONFIG_INDIRECT_PIO=y
CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=32
CONFIG_IRQ_POLL=y
CONFIG_PRINTK_TIME=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_PANIC_TIMEOUT=5
CONFIG_MEMTEST=y

View File

@@ -0,0 +1,2 @@
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
#overlays=rpi-rf-mod

View File

@@ -0,0 +1 @@
console=tty0 console=ttyAML0,115200n8

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local UBOOT_GXL="${BINARIES_DIR}/u-boot.gxl"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}/meson-g12b-s922x-khadas-vim3.dtb" "${BOOT_DATA}/meson-g12b-s922x-khadas-vim3.dtb"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${UBOOT_GXL}" of="${SPL_IMG}" conv=notrunc bs=1 count=444
dd if="${UBOOT_GXL}" of="${SPL_IMG}" conv=notrunc bs=512 skip=1 seek=1
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,10 @@
BOARD_ID=khadas-vim3
BOARD_NAME="Khadas VIM3"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SPL=true
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=khadas-vim3
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,104 @@
###########################################
part start mmc ${devnum} 9 mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x10; \
env import -c ${ramdisk_addr_r} 0x2000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
# Load environment from haos-config.txt
if test -e mmc ${devnum}:1 haos-config.txt; then
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
env import -t ${ramdisk_addr_r} ${filesize}
fi
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
setenv fdtfile "meson-g12b-s922x-khadas-vim3.dtb"
echo "Loading standard device tree ${fdtfile}"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fdt addr ${fdt_addr_r}
# load dt overlays
fdt resize 65536
for overlay_file in ${overlays}; do
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fi
# logical volumes get numbered after physical ones.
# 1. boot
# 2. Extended partition
# 3. Overlay
# 4. Data
# 5. KernelA
# 6. SystemA
# 7. KernelB
# 8. SystemB
# 9. BootInfo
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if load mmc ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if load mmc ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
printenv bootargs
echo "Starting kernel"
booti ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,4 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set
CONFIG_DISPLAY_BOARDINFO=y

View File

@@ -0,0 +1 @@
console=tty1

View File

@@ -9,8 +9,7 @@ function hassos_pre_image() {
cp "${BINARIES_DIR}/barebox.bin" "${BOOT_DATA}/EFI/BOOT/BOOTx64.EFI"
cp "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/barebox-state-efi.dtb" "${BOOT_DATA}/EFI/barebox/state.dtb"
echo "console=tty1" > "${BOOT_DATA}/cmdline.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
}

View File

@@ -9,6 +9,21 @@ CONFIG_BLK_DEV_NVME=y
CONFIG_IGB=y
CONFIG_IGC=m
CONFIG_NET_VENDOR_ATHEROS=y
CONFIG_ATL2=m
CONFIG_ATL1=m
CONFIG_ATL1C=m
CONFIG_ATL1E=m
CONFIG_ALX=m
CONFIG_NET_VENDOR_BROADCOM=y
CONFIG_B44=m
CONFIG_BCMGENET=m
CONFIG_BNX2=m
CONFIG_TIGON3=m
CONFIG_BNX2X=m
CONFIG_BNXT=m
CONFIG_IWLWIFI=m
CONFIG_IWLMVM=m
@@ -24,4 +39,109 @@ CONFIG_MMC_SDHCI_ACPI=y
CONFIG_MMC_SDHCI_PCI=y
CONFIG_X86_INTEL_LPSS=y
CONFIG_SND_SOC=m
CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y
CONFIG_SND_SOC_INTEL_SST=m
CONFIG_SND_SOC_INTEL_CATPT=m
CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=m
CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI=m
CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI=m
CONFIG_SND_SOC_INTEL_SKYLAKE=m
CONFIG_SND_SOC_INTEL_SKL=m
CONFIG_SND_SOC_INTEL_APL=m
CONFIG_SND_SOC_INTEL_KBL=m
CONFIG_SND_SOC_INTEL_GLK=m
CONFIG_SND_SOC_INTEL_CNL=m
CONFIG_SND_SOC_INTEL_CFL=m
CONFIG_SND_SOC_INTEL_CML_H=m
CONFIG_SND_SOC_INTEL_CML_LP=m
CONFIG_SND_SOC_INTEL_SKYLAKE_FAMILY=m
CONFIG_SND_SOC_INTEL_SKYLAKE_SSP_CLK=m
CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC=y
CONFIG_SND_SOC_INTEL_SKYLAKE_COMMON=m
CONFIG_SND_SOC_ACPI_INTEL_MATCH=m
CONFIG_SND_SOC_INTEL_MACH=y
CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES=y
CONFIG_SND_SOC_INTEL_HDA_DSP_COMMON=m
CONFIG_SND_SOC_INTEL_SOF_MAXIM_COMMON=m
CONFIG_SND_SOC_INTEL_HASWELL_MACH=m
CONFIG_SND_SOC_INTEL_BDW_RT5650_MACH=m
CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH=m
CONFIG_SND_SOC_INTEL_BROADWELL_MACH=m
CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=m
CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=m
CONFIG_SND_SOC_INTEL_BYTCR_WM5102_MACH=m
CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=m
CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=m
CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=m
CONFIG_SND_SOC_INTEL_CHT_BSW_NAU8824_MACH=m
CONFIG_SND_SOC_INTEL_BYT_CHT_CX2072X_MACH=m
CONFIG_SND_SOC_INTEL_BYT_CHT_DA7213_MACH=m
CONFIG_SND_SOC_INTEL_BYT_CHT_ES8316_MACH=m
# CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH is not set
CONFIG_SND_SOC_INTEL_SKL_RT286_MACH=m
CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH=m
CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH=m
CONFIG_SND_SOC_INTEL_DA7219_MAX98357A_GENERIC=m
CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON=m
CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m
CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m
CONFIG_SND_SOC_INTEL_SOF_WM8804_MACH=m
CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH=m
CONFIG_SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH=m
CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98357A_MACH=m
CONFIG_SND_SOC_INTEL_KBL_DA7219_MAX98927_MACH=m
CONFIG_SND_SOC_INTEL_KBL_RT5660_MACH=m
CONFIG_SND_SOC_INTEL_GLK_DA7219_MAX98357A_MACH=m
CONFIG_SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH=m
CONFIG_SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH=m
CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH=m
CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH=m
CONFIG_SND_SOC_INTEL_SOF_PCM512x_MACH=m
CONFIG_SND_SOC_INTEL_SOF_ES8336_MACH=m
CONFIG_SND_SOC_INTEL_CML_LP_DA7219_MAX98357A_MACH=m
CONFIG_SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH=m
CONFIG_SND_SOC_INTEL_SOF_DA7219_MAX98373_MACH=m
CONFIG_SND_SOC_INTEL_EHL_RT5660_MACH=m
CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH=m
CONFIG_SND_SOC_MTK_BTCVSD=m
CONFIG_SND_SOC_SOF_TOPLEVEL=y
CONFIG_SND_SOC_SOF_PCI_DEV=m
CONFIG_SND_SOC_SOF_PCI=m
CONFIG_SND_SOC_SOF_ACPI=m
CONFIG_SND_SOC_SOF_ACPI_DEV=m
# CONFIG_SND_SOC_SOF_DEBUG_PROBES is not set
CONFIG_SND_SOC_SOF=m
CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE=y
CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL=y
CONFIG_SND_SOC_SOF_INTEL_HIFI_EP_IPC=m
CONFIG_SND_SOC_SOF_INTEL_ATOM_HIFI_EP=m
CONFIG_SND_SOC_SOF_INTEL_COMMON=m
CONFIG_SND_SOC_SOF_BAYTRAIL=m
# CONFIG_SND_SOC_SOF_BROADWELL is not set
CONFIG_SND_SOC_SOF_MERRIFIELD=m
CONFIG_SND_SOC_SOF_INTEL_APL=m
CONFIG_SND_SOC_SOF_APOLLOLAKE=m
CONFIG_SND_SOC_SOF_GEMINILAKE=m
CONFIG_SND_SOC_SOF_INTEL_CNL=m
CONFIG_SND_SOC_SOF_CANNONLAKE=m
CONFIG_SND_SOC_SOF_COFFEELAKE=m
CONFIG_SND_SOC_SOF_COMETLAKE=m
CONFIG_SND_SOC_SOF_INTEL_ICL=m
CONFIG_SND_SOC_SOF_ICELAKE=m
CONFIG_SND_SOC_SOF_JASPERLAKE=m
CONFIG_SND_SOC_SOF_INTEL_TGL=m
CONFIG_SND_SOC_SOF_TIGERLAKE=m
CONFIG_SND_SOC_SOF_ELKHARTLAKE=m
CONFIG_SND_SOC_SOF_ALDERLAKE=m
CONFIG_SND_SOC_SOF_HDA_COMMON=m
CONFIG_SND_SOC_SOF_HDA_LINK=y
CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC=y
CONFIG_SND_SOC_SOF_HDA_LINK_BASELINE=m
CONFIG_SND_SOC_SOF_HDA=m
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE=m
CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE=m
CONFIG_SND_SOC_SOF_XTENSA=m
CONFIG_THINKPAD_ACPI=m

View File

@@ -0,0 +1 @@
console=ttyS0 console=tty1

View File

@@ -9,15 +9,12 @@ function hassos_pre_image() {
cp "${BINARIES_DIR}/barebox.bin" "${BOOT_DATA}/EFI/BOOT/BOOTx64.EFI"
cp "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/barebox-state-efi.dtb" "${BOOT_DATA}/EFI/barebox/state.dtb"
echo "console=ttyS0 console=tty1" > "${BOOT_DATA}/cmdline.txt"
cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt"
}
function hassos_post_image() {
local HDD_IMG="$(hassos_image_name img)"
local HDD_OVA="$(hassos_image_name ova)"
local OVA_DATA="${BINARIES_DIR}/ova"
local hdd_img="$(hassos_image_name img)"
# Virtual Disk images
convert_disk_image_virtual
@@ -28,14 +25,8 @@ function hassos_post_image() {
convert_disk_image_xz qcow2
# OVA
mkdir -p "${OVA_DATA}"
rm -f "${HDD_OVA}"
cp -a "${BOARD_DIR}/home-assistant.ovf" "${OVA_DATA}/home-assistant.ovf"
qemu-img convert -O vmdk -o subformat=streamOptimized "${HDD_IMG}" "${OVA_DATA}/home-assistant.vmdk"
(cd "${OVA_DATA}" || exit 1; sha256sum --tag home-assistant.* >home-assistant.mf)
tar -C "${OVA_DATA}" --owner=root --group=root -cf "${HDD_OVA}" home-assistant.ovf home-assistant.vmdk home-assistant.mf
convert_disk_image_ova
# Cleanup
rm -f "${HDD_IMG}"
rm -f "${hdd_img}"
}

View File

@@ -53,12 +53,12 @@
</Item>
<Item>
<rasd:Address>0</rasd:Address>
<rasd:Caption>sataController0</rasd:Caption>
<rasd:Description>SATA Controller</rasd:Description>
<rasd:ElementName>sataController0</rasd:ElementName>
<rasd:Caption>SCSIController</rasd:Caption>
<rasd:Description>SCSI Controller</rasd:Description>
<rasd:ElementName>SCSIController</rasd:ElementName>
<rasd:InstanceID>3</rasd:InstanceID>
<rasd:ResourceSubType>AHCI</rasd:ResourceSubType>
<rasd:ResourceType>20</rasd:ResourceType>
<rasd:ResourceSubType>lsilogic</rasd:ResourceSubType>
<rasd:ResourceType>6</rasd:ResourceType>
</Item>
<Item ovf:required="false">
<rasd:Address>0</rasd:Address>
@@ -136,7 +136,7 @@
<RTC localOrUTC="UTC"/>
</Hardware>
<StorageControllers>
<StorageController name="SATA" type="AHCI" PortCount="1">
<StorageController name="LsiLogic" type="LsiLogic" PortCount="16" useHostIOCache="true" Bootable="true">
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{5f042839-c478-43d9-9eb0-fd8a902146ec}"/>
</AttachedDevice>

View File

@@ -25,6 +25,14 @@ CONFIG_VIRTIO_MMIO=y
CONFIG_SCSI_VIRTIO=y
CONFIG_HW_RANDOM_VIRTIO=y
# These options are needed for virtio-fs
CONFIG_FUSE_FS=y
CONFIG_VIRTIO_FS=y
CONFIG_DAX=y
CONFIG_FS_DAX=y
CONFIG_DAX_DRIVER=y
CONFIG_ZONE_DEVICE=y
CONFIG_FUSION=y
CONFIG_FUSION_SPI=y
CONFIG_FUSION_SAS=y
@@ -38,6 +46,12 @@ CONFIG_PARAVIRT=y
CONFIG_PARAVIRT_SPINLOCKS=y
CONFIG_VIRT_DRIVERS=y
CONFIG_XEN=y
# CONFIG_XEN_DOM0 is not set
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_SND_XEN_FRONTEND=y
CONFIG_XEN_PVCALLS_FRONTEND=m
CONFIG_XEN_WDT=y
CONFIG_DRM_XEN=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_HYPERV=y

View File

@@ -1,130 +0,0 @@
From 4e9abe7945370765a9e8e88b01a7ef5f266bf7fd Mon Sep 17 00:00:00 2001
Message-Id: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Date: Fri, 30 Jun 2017 16:53:34 +0200
Subject: [PATCH dt-utils 1/3] barebox-state: get devicetree from file
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
src/barebox-state.c | 30 ++++++++++++++++++++++--------
src/barebox-state.h | 2 +-
src/keystore-blob.c | 2 +-
3 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/src/barebox-state.c b/src/barebox-state.c
index f8b8df6..76f9c41 100644
--- a/src/barebox-state.c
+++ b/src/barebox-state.c
@@ -308,7 +308,7 @@ static int state_set_var(struct state *state, const char *var, const char *val)
}
-struct state *state_get(const char *name, bool readonly, bool auth)
+struct state *state_get(const char *name, const char *filename, bool readonly, bool auth)
{
struct device_node *root, *node;
char *path;
@@ -317,11 +317,19 @@ struct state *state_get(const char *name, bool readonly, bool auth)
const char *backend_type = NULL;
struct state_variable *v;
- root = of_read_proc_devicetree();
- if (IS_ERR(root)) {
- pr_err("Unable to read devicetree. %s\n",
- strerror(-PTR_ERR(root)));
- return ERR_CAST(root);
+ if (filename) {
+ void *fdt;
+
+ fdt = read_file(filename, NULL);
+ if (fdt)
+ root = of_unflatten_dtb(fdt);
+ } else {
+ root = of_read_proc_devicetree();
+ if (IS_ERR(root)) {
+ pr_err("Unable to read devicetree. %s\n",
+ strerror(-PTR_ERR(root)));
+ return ERR_CAST(root);
+ }
}
of_set_root_node(root);
@@ -372,6 +380,7 @@ static struct option long_options[] = {
{"get", required_argument, 0, 'g' },
{"set", required_argument, 0, 's' },
{"name", required_argument, 0, 'n' },
+ {"input", required_argument, 0, 'i' },
{"dump", no_argument, 0, 'd' },
{"dump-shell", no_argument, 0, OPT_DUMP_SHELL },
{"verbose", no_argument, 0, 'v' },
@@ -387,6 +396,7 @@ static void usage(char *name)
"-g, --get <variable> get the value of a variable\n"
"-s, --set <variable>=<value> set the value of a variable\n"
"-n, --name <name> specify the state to use (default=\"state\"). Multiple states are allowed.\n"
+"-i, --input <name> load the devicetree from a file instead of using the system devicetree.\n"
"-d, --dump dump the state\n"
"--dump-shell dump the state suitable for shell sourcing\n"
"-v, --verbose increase verbosity\n"
@@ -424,12 +434,13 @@ int main(int argc, char *argv[])
bool readonly = true;
int pr_level = 5;
int auth = 1;
+ const char *dtb = NULL;
INIT_LIST_HEAD(&sg_list);
INIT_LIST_HEAD(&state_list.list);
while (1) {
- c = getopt_long(argc, argv, "hg:s:dvn:qf", long_options, &option_index);
+ c = getopt_long(argc, argv, "hg:s:i:dvn:qf", long_options, &option_index);
if (c < 0)
break;
switch (c) {
@@ -475,6 +486,9 @@ int main(int argc, char *argv[])
++nr_states;
break;
}
+ case 'i':
+ dtb = strdup(optarg);
+ break;
case ':':
case '?':
default:
@@ -515,7 +529,7 @@ int main(int argc, char *argv[])
}
list_for_each_entry(state, &state_list.list, list) {
- state->state = state_get(state->name, readonly, auth);
+ state->state = state_get(state->name, dtb, readonly, auth);
if (!IS_ERR(state->state) && !state->name)
state->name = state->state->name;
if (IS_ERR(state->state)) {
diff --git a/src/barebox-state.h b/src/barebox-state.h
index bd89cf4..a0f49a5 100644
--- a/src/barebox-state.h
+++ b/src/barebox-state.h
@@ -1,7 +1,7 @@
#ifndef __BAREBOX_STATE__
#define __BAREBOX_STATE__
-struct state *state_get(const char *name, bool readonly, bool auth);
+struct state *state_get(const char *name, const char *file, bool readonly, bool auth);
char *state_get_var(struct state *state, const char *var);
#endif /* __BAREBOX_STATE__ */
diff --git a/src/keystore-blob.c b/src/keystore-blob.c
index 028dd8b..4572431 100644
--- a/src/keystore-blob.c
+++ b/src/keystore-blob.c
@@ -30,7 +30,7 @@ int keystore_get_secret(const char *name, const unsigned char **key, int *key_le
if (!state) {
struct state *tmp;
- tmp = state_get(keystore_state_name, true, false);
+ tmp = state_get(keystore_state_name, NULL, true, false);
if (IS_ERR(tmp))
return PTR_ERR(tmp);
state = tmp;
--
2.29.2

View File

@@ -1,39 +0,0 @@
From 4eb260d97419349320aa688866b4cf1eb177df70 Mon Sep 17 00:00:00 2001
Message-Id: <4eb260d97419349320aa688866b4cf1eb177df70.1606682453.git.stefan@agner.ch>
In-Reply-To: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
References: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Date: Fri, 30 Jun 2017 16:53:17 +0200
Subject: [PATCH dt-utils 2/3] libdt: support finding devices by partuuid
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
src/libdt.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/libdt.c b/src/libdt.c
index 4638678..b52f80c 100644
--- a/src/libdt.c
+++ b/src/libdt.c
@@ -2416,6 +2416,18 @@ int of_get_devicepath(struct device_node *partition_node, char **devpath, off_t
*/
node = partition_node->parent;
+ if (of_device_is_compatible(node, "fixed-partitions")) {
+ const char *uuid;
+
+ /* when partuuid is specified short-circuit the search for the cdev */
+ ret = of_property_read_string(partition_node, "partuuid", &uuid);
+ if (!ret) {
+ *devpath = basprintf("/dev/disk/by-partuuid/%s", uuid);
+
+ return 0;
+ }
+ }
+
/*
* Respect flash "partitions" subnode. Use parent of parent in this
* case.
--
2.29.2

View File

@@ -1,52 +0,0 @@
From 665603ecadb8385dd6c18840d3b0120859a00369 Mon Sep 17 00:00:00 2001
Message-Id: <665603ecadb8385dd6c18840d3b0120859a00369.1606682453.git.stefan@agner.ch>
In-Reply-To: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
References: <4e9abe7945370765a9e8e88b01a7ef5f266bf7fd.1606682453.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Fri, 13 Nov 2020 10:39:03 +0100
Subject: [PATCH dt-utils 3/3] state: use /run to store lockfile
The current location /var/lock is considered legacy (at least by
systemd). Just use /run to store the lockfile and append the usual .lock
suffix.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
src/barebox-state.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/barebox-state.c b/src/barebox-state.c
index 76f9c41..53e5eb6 100644
--- a/src/barebox-state.c
+++ b/src/barebox-state.c
@@ -38,6 +38,8 @@
#include <dt/dt.h>
#include <state.h>
+#define BAREBOX_STATE_LOCKFILE "/run/barebox-state.lock"
+
struct state_variable;
static int __state_uint8_set(struct state_variable *var, const char *val);
@@ -515,15 +517,15 @@ int main(int argc, char *argv[])
++nr_states;
}
- lock_fd = open("/var/lock/barebox-state", O_CREAT | O_RDWR, 0600);
+ lock_fd = open(BAREBOX_STATE_LOCKFILE, O_CREAT | O_RDWR, 0600);
if (lock_fd < 0) {
- pr_err("Failed to open lock-file /var/lock/barebox-state\n");
+ pr_err("Failed to open lock-file " BAREBOX_STATE_LOCKFILE "\n");
exit(1);
}
ret = flock(lock_fd, LOCK_EX);
if (ret < 0) {
- pr_err("Failed to lock /var/lock/barebox-state: %m\n");
+ pr_err("Failed to lock " BAREBOX_STATE_LOCKFILE ": %m\n");
close(lock_fd);
exit(1);
}
--
2.29.2

View File

@@ -0,0 +1,98 @@
From 332c4f164ac60dcc65c315841d9c6f064ae316ec Mon Sep 17 00:00:00 2001
Message-Id: <332c4f164ac60dcc65c315841d9c6f064ae316ec.1639398304.git.stefan@agner.ch>
From: Zachary Michaels <mikezackles@gmail.com>
Date: Thu, 7 Jan 2021 08:13:11 -0800
Subject: [PATCH] iwlwifi: Make missed beacon timeout configurable
Makes the beacon timeout a module parameter, allowing the original default (16
missed beacons) to be kept while also enabling users that experience problems to
increase the timeout.
See https://bugzilla.kernel.org/show_bug.cgi?id=203709
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 4 ++++
drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | 2 ++
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 3 ++-
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 -
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index be214f39f52b..4401b6b8484a 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1740,6 +1740,7 @@ struct iwl_mod_params iwlwifi_mod_params = {
.power_level = IWL_POWER_INDEX_1,
.uapsd_disable = IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT,
.enable_ini = true,
+ .beacon_timeout = 16,
/* the rest are 0 by default */
};
IWL_EXPORT_SYMBOL(iwlwifi_mod_params);
@@ -1857,6 +1858,9 @@ module_param_named(enable_ini, iwlwifi_mod_params.enable_ini,
bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(enable_ini,
"Enable debug INI TLV FW debug infrastructure (default: true");
+module_param_named(beacon_timeout, iwlwifi_mod_params.beacon_timeout, uint, 0644);
+MODULE_PARM_DESC(beacon_timeout,
+ "Number of missed beacons before disconnecting (default: 16)");
/*
* set bt_coex_active to true, uCode will do kill/defer
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
index e8ce3a300857..801d12a27354 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
@@ -115,6 +115,7 @@ enum iwl_uapsd_disable {
* @disable_11ac: disable VHT capabilities, default = false.
* @remove_when_gone: remove an inaccessible device from the PCIe bus.
* @enable_ini: enable new FW debug infratructure (INI TLVs)
+ * @beacon_timeout: number of missed beacons before disconnect, default = 16
*/
struct iwl_mod_params {
int swcrypto;
@@ -137,6 +138,7 @@ struct iwl_mod_params {
bool disable_11ax;
bool remove_when_gone;
bool enable_ini;
+ u32 beacon_timeout;
};
static inline bool iwl_enable_rx_ampdu(void)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index 6a8bf9bb9c45..34dec6fc8f3e 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -63,6 +63,7 @@
#include <linux/etherdevice.h>
#include <net/mac80211.h>
#include "iwl-io.h"
+#include "iwl-modparams.h"
#include "iwl-prph.h"
#include "fw-api.h"
#include "mvm.h"
@@ -1430,7 +1431,7 @@ void iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm,
* TODO: the threshold should be adjusted based on latency conditions,
* and/or in case of a CS flow on one of the other AP vifs.
*/
- if (rx_missed_bcon > IWL_MVM_MISSED_BEACONS_THRESHOLD_LONG)
+ if (rx_missed_bcon > iwlwifi_mod_params.beacon_timeout)
iwl_mvm_connection_loss(mvm, vif, "missed beacons");
else if (rx_missed_bcon_since_rx > IWL_MVM_MISSED_BEACONS_THRESHOLD)
ieee80211_beacon_loss(vif);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 64f5a4cb3d3a..730638da8fd3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -92,7 +92,6 @@
/* RSSI offset for WkP */
#define IWL_RSSI_OFFSET 50
#define IWL_MVM_MISSED_BEACONS_THRESHOLD 8
-#define IWL_MVM_MISSED_BEACONS_THRESHOLD_LONG 16
/* A TimeUnit is 1024 microsecond */
#define MSEC_TO_TU(_msec) (_msec*1000/1024)
--
2.34.0

View File

@@ -0,0 +1 @@
dwc_otg.lpm_enable=0 console=tty1 console=serial0,115200n8 console=ttyAMA2,115200n8

View File

@@ -5,12 +5,10 @@
# HAOS - don't change it!
disable_splash=1
kernel=u-boot.bin
# uncomment for aarch64 bit support
#arm_64bit=1
arm_64bit=1
# uncomment to enable primary UART console
#enable_uart=1
enable_uart=1
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
@@ -74,3 +72,6 @@ dtparam=audio=on
[all]
#dtoverlay=vc4-fkms-v3d
#max_framebuffers=2
device_tree=bcm2711-rpi-cm4-ha-amber.dtb
dtoverlay=dwc2,dr_mode=host

View File

@@ -0,0 +1,10 @@
BOARD_ID=amber
BOARD_NAME="Amber"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=hybrid
BOOT_SPL=false
BOOT_ENV_SIZE=0x4000
SUPERVISOR_MACHINE=raspberrypi4-64
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,721 @@
From fa42d0ece205b3c2a8a06dac3e4436400cf59978 Mon Sep 17 00:00:00 2001
Message-Id: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Wed, 3 Nov 2021 00:00:45 +0100
Subject: [PATCH 1/7] ARM: dts: bcm2711: Add device tree for Home Assistant
Amber
Add device tree for Home Assistant Amber, a Compute Module 4 based I/O
board.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/Makefile | 3 +-
.../arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts | 659 ++++++++++++++++++
arch/arm64/boot/dts/broadcom/Makefile | 1 +
.../dts/broadcom/bcm2711-rpi-cm4-ha-amber.dts | 1 +
4 files changed, 663 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-amber.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 12cd8bf582e1..4fa8c7be516a 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -14,7 +14,8 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
bcm2711-rpi-4-b.dtb \
bcm2711-rpi-400.dtb \
bcm2710-rpi-cm3.dtb \
- bcm2711-rpi-cm4.dtb
+ bcm2711-rpi-cm4.dtb \
+ bcm2711-rpi-cm4-ha-amber.dtb
dtb-$(CONFIG_ARCH_ALPINE) += \
alpine-db.dtb
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
new file mode 100644
index 000000000000..855da2b029a4
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
@@ -0,0 +1,659 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+#include "bcm2711.dtsi"
+#include "bcm2835-rpi.dtsi"
+
+#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
+
+/ {
+ compatible = "raspberrypi,4-compute-module-ha-amber", "brcm,bcm2711";
+ model = "Raspberry Pi Compute Module 4 on Home Assistant Amber";
+
+ chosen {
+ /* 8250 auxiliary UART instead of pl011 */
+ stdout-path = "serial1:115200n8";
+ };
+
+ /* Will be filled by the bootloader */
+ memory@0 {
+ device_type = "memory";
+ reg = <0 0 0>;
+ };
+
+ aliases {
+ emmc2bus = &emmc2bus;
+ ethernet0 = &genet;
+ pcie0 = &pcie0;
+ blconfig = &blconfig;
+ };
+
+ leds {
+ led-act {
+ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
+ };
+
+ led-pwr {
+ label = "PWR";
+ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
+ default-state = "keep";
+ linux,default-trigger = "default-on";
+ };
+ };
+
+ wifi_pwrseq: wifi-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
+ };
+
+ sd_io_1v8_reg: sd_io_1v8_reg {
+ compatible = "regulator-gpio";
+ regulator-name = "vdd-sd-io";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-settling-time-us = <5000>;
+ gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
+ states = <1800000 0x1
+ 3300000 0x0>;
+ status = "okay";
+ };
+
+ sd_vcc_reg: sd_vcc_reg {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-sd";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ enable-active-high;
+ gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&ddc0 {
+ status = "okay";
+};
+
+&ddc1 {
+ status = "okay";
+};
+
+&firmware {
+ firmware_clocks: clocks {
+ compatible = "raspberrypi,firmware-clocks";
+ #clock-cells = <1>;
+ };
+
+ expgpio: gpio {
+ compatible = "raspberrypi,firmware-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-line-names = "BT_ON",
+ "WL_ON",
+ "PWR_LED_OFF",
+ "ANT1",
+ "VDD_SD_IO_SEL",
+ "CAM_GPIO",
+ "SD_PWR_ON",
+ "ANT2";
+ status = "okay";
+
+ ant1: ant1 {
+ gpio-hog;
+ gpios = <3 GPIO_ACTIVE_HIGH>;
+ output-high;
+ };
+
+ ant2: ant2 {
+ gpio-hog;
+ gpios = <7 GPIO_ACTIVE_HIGH>;
+ output-low;
+ };
+ };
+
+ reset: reset {
+ compatible = "raspberrypi,firmware-reset";
+ #reset-cells = <1>;
+ };
+};
+
+&gpio {
+ /*
+ * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
+ * the official GPU firmware DT blob.
+ *
+ * Legend:
+ * "FOO" = GPIO line named "FOO" on the schematic
+ * "FOO_N" = GPIO line named "FOO" on schematic, active low
+ */
+ gpio-line-names = "ID_SDA",
+ "ID_SCL",
+ "SDA1",
+ "SCL1",
+ "GPIO_GCLK",
+ "GPIO5",
+ "GPIO6",
+ "SPI_CE1_N",
+ "SPI_CE0_N",
+ "SPI_MISO",
+ "SPI_MOSI",
+ "SPI_SCLK",
+ "GPIO12",
+ "GPIO13",
+ /* Serial port */
+ "TXD1",
+ "RXD1",
+ "GPIO16",
+ "GPIO17",
+ "GPIO18",
+ "GPIO19",
+ "GPIO20",
+ "GPIO21",
+ "GPIO22",
+ "GPIO23",
+ "GPIO24",
+ "GPIO25",
+ "GPIO26",
+ "GPIO27",
+ "RGMII_MDIO",
+ "RGMIO_MDC",
+ /* Used by BT module */
+ "CTS0",
+ "RTS0",
+ "TXD0",
+ "RXD0",
+ /* Used by Wifi */
+ "SD1_CLK",
+ "SD1_CMD",
+ "SD1_DATA0",
+ "SD1_DATA1",
+ "SD1_DATA2",
+ "SD1_DATA3",
+ /* Shared with SPI flash */
+ "PWM0_MISO",
+ "PWM1_MOSI",
+ "STATUS_LED_G_CLK",
+ "SPIFLASH_CE_N",
+ "SDA0",
+ "SCL0",
+ "RGMII_RXCLK",
+ "RGMII_RXCTL",
+ "RGMII_RXD0",
+ "RGMII_RXD1",
+ "RGMII_RXD2",
+ "RGMII_RXD3",
+ "RGMII_TXCLK",
+ "RGMII_TXCTL",
+ "RGMII_TXD0",
+ "RGMII_TXD1",
+ "RGMII_TXD2",
+ "RGMII_TXD3";
+};
+
+&hdmi0 {
+ clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
+ clock-names = "hdmi", "bvb", "audio", "cec";
+ wifi-2.4ghz-coexistence;
+ status = "okay";
+};
+
+&hdmi1 {
+ clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
+ clock-names = "hdmi", "bvb", "audio", "cec";
+ wifi-2.4ghz-coexistence;
+ status = "okay";
+};
+
+&hvs {
+ clocks = <&firmware_clocks 4>;
+};
+
+&pixelvalve0 {
+ status = "okay";
+};
+
+&pixelvalve1 {
+ status = "okay";
+};
+
+&pixelvalve2 {
+ status = "okay";
+};
+
+&pixelvalve4 {
+ status = "okay";
+};
+
+&pwm1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
+ status = "okay";
+};
+
+&rmem {
+ /*
+ * RPi4's co-processor will copy the board's bootloader configuration
+ * into memory for the OS to consume. It'll also update this node with
+ * its placement information.
+ */
+ blconfig: nvram@0 {
+ compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0x0 0x0 0x0>;
+ no-map;
+ status = "disabled";
+ };
+};
+
+/* SDHCI is used to control the SDIO for wireless */
+&sdhci {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&emmc_gpio34>;
+ bus-width = <4>;
+ non-removable;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ status = "okay";
+
+ brcmf: wifi@1 {
+ reg = <1>;
+ compatible = "brcm,bcm4329-fmac";
+ };
+};
+
+/* EMMC2 is used to drive the EMMC card */
+&emmc2 {
+ bus-width = <8>;
+ vqmmc-supply = <&sd_io_1v8_reg>;
+ vmmc-supply = <&sd_vcc_reg>;
+ broken-cd;
+ status = "okay";
+};
+
+&genet {
+ phy-handle = <&phy1>;
+ phy-mode = "rgmii-rxid";
+ status = "okay";
+};
+
+&genet_mdio {
+ phy1: ethernet-phy@0 {
+ /* No PHY interrupt */
+ reg = <0x0>;
+ };
+};
+
+&pcie0 {
+ pci@1,0 {
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+
+ reg = <0 0 0 0 0>;
+
+ usb@1,0 {
+ reg = <0x10000 0 0 0 0>;
+ resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
+ };
+ };
+};
+
+/* uart0 communicates with the BT module */
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
+ uart-has-rtscts;
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm43438-bt";
+ max-speed = <2000000>;
+ shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+/* uart1 is mapped to the pin header */
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_gpio14>;
+ status = "okay";
+};
+
+&vchiq {
+ interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&vc4 {
+ status = "okay";
+};
+
+&vec {
+ status = "disabled";
+};
+
+// =============================================
+// Downstream rpi- changes
+
+#define BCM2711
+
+#include "bcm270x.dtsi"
+#include "bcm271x-rpi-bt.dtsi"
+
+/ {
+ soc {
+ /delete-node/ pixelvalve@7e807000;
+ /delete-node/ hdmi@7e902000;
+ };
+};
+
+#include "bcm2711-rpi.dtsi"
+#include "bcm283x-rpi-csi0-2lane.dtsi"
+#include "bcm283x-rpi-csi1-4lane.dtsi"
+#include "bcm283x-rpi-i2c0mux_0_44.dtsi"
+#include "bcm283x-rpi-cam1-regulator.dtsi"
+
+/ {
+ chosen {
+ bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
+ };
+
+ aliases {
+ serial0 = &uart1;
+ serial1 = &uart0;
+ mmc0 = &emmc2;
+ mmc1 = &mmcnr;
+ mmc2 = &sdhost;
+ i2c3 = &i2c3;
+ i2c4 = &i2c4;
+ i2c5 = &i2c5;
+ i2c6 = &i2c6;
+ i2c20 = &ddc0;
+ i2c21 = &ddc1;
+ spi3 = &spi3;
+ spi4 = &spi4;
+ spi5 = &spi5;
+ spi6 = &spi6;
+ /delete-property/ intc;
+ };
+
+ /delete-node/ wifi-pwrseq;
+};
+
+&mmcnr {
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdio_pins>;
+ bus-width = <4>;
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-0 = <&uart0_pins &bt_pins>;
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-0 = <&uart1_pins>;
+};
+
+&spi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
+ cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
+
+ spidev0: spidev@0{
+ compatible = "spidev";
+ reg = <0>; /* CE0 */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ spi-max-frequency = <125000000>;
+ };
+
+ spidev1: spidev@1{
+ compatible = "spidev";
+ reg = <1>; /* CE1 */
+ #address-cells = <1>;
+ #size-cells = <0>;
+ spi-max-frequency = <125000000>;
+ };
+};
+
+&gpio {
+ spi0_pins: spi0_pins {
+ brcm,pins = <9 10 11>;
+ brcm,function = <BCM2835_FSEL_ALT0>;
+ };
+
+ spi0_cs_pins: spi0_cs_pins {
+ brcm,pins = <8 7>;
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
+ };
+
+ spi3_pins: spi3_pins {
+ brcm,pins = <1 2 3>;
+ brcm,function = <BCM2835_FSEL_ALT3>;
+ };
+
+ spi3_cs_pins: spi3_cs_pins {
+ brcm,pins = <0 24>;
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
+ };
+
+ spi4_pins: spi4_pins {
+ brcm,pins = <5 6 7>;
+ brcm,function = <BCM2835_FSEL_ALT3>;
+ };
+
+ spi4_cs_pins: spi4_cs_pins {
+ brcm,pins = <4 25>;
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
+ };
+
+ spi5_pins: spi5_pins {
+ brcm,pins = <13 14 15>;
+ brcm,function = <BCM2835_FSEL_ALT3>;
+ };
+
+ spi5_cs_pins: spi5_cs_pins {
+ brcm,pins = <12 26>;
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
+ };
+
+ spi6_pins: spi6_pins {
+ brcm,pins = <19 20 21>;
+ brcm,function = <BCM2835_FSEL_ALT3>;
+ };
+
+ spi6_cs_pins: spi6_cs_pins {
+ brcm,pins = <18 27>;
+ brcm,function = <BCM2835_FSEL_GPIO_OUT>;
+ };
+
+ i2c0_pins: i2c0 {
+ brcm,pins = <0 1>;
+ brcm,function = <BCM2835_FSEL_ALT0>;
+ brcm,pull = <BCM2835_PUD_UP>;
+ };
+
+ i2c1_pins: i2c1 {
+ brcm,pins = <2 3>;
+ brcm,function = <BCM2835_FSEL_ALT0>;
+ brcm,pull = <BCM2835_PUD_UP>;
+ };
+
+ i2c3_pins: i2c3 {
+ brcm,pins = <4 5>;
+ brcm,function = <BCM2835_FSEL_ALT5>;
+ brcm,pull = <BCM2835_PUD_UP>;
+ };
+
+ i2c4_pins: i2c4 {
+ brcm,pins = <8 9>;
+ brcm,function = <BCM2835_FSEL_ALT5>;
+ brcm,pull = <BCM2835_PUD_UP>;
+ };
+
+ i2c5_pins: i2c5 {
+ brcm,pins = <12 13>;
+ brcm,function = <BCM2835_FSEL_ALT5>;
+ brcm,pull = <BCM2835_PUD_UP>;
+ };
+
+ i2c6_pins: i2c6 {
+ brcm,pins = <22 23>;
+ brcm,function = <BCM2835_FSEL_ALT5>;
+ brcm,pull = <BCM2835_PUD_UP>;
+ };
+
+ i2s_pins: i2s {
+ brcm,pins = <18 19 20 21>;
+ brcm,function = <BCM2835_FSEL_ALT0>;
+ };
+
+ sdio_pins: sdio_pins {
+ brcm,pins = <34 35 36 37 38 39>;
+ brcm,function = <BCM2835_FSEL_ALT3>; // alt3 = SD1
+ brcm,pull = <0 2 2 2 2 2>;
+ };
+
+ bt_pins: bt_pins {
+ brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0
+ // to fool pinctrl
+ brcm,function = <0>;
+ brcm,pull = <2>;
+ };
+
+ uart0_pins: uart0_pins {
+ brcm,pins = <32 33>;
+ brcm,function = <BCM2835_FSEL_ALT3>;
+ brcm,pull = <0 2>;
+ };
+
+ uart1_pins: uart1_pins {
+ brcm,pins;
+ brcm,function;
+ brcm,pull;
+ };
+
+ uart2_pins: uart2_pins {
+ brcm,pins = <0 1>;
+ brcm,function = <BCM2835_FSEL_ALT4>;
+ brcm,pull = <0 2>;
+ };
+
+ uart3_pins: uart3_pins {
+ brcm,pins = <4 5>;
+ brcm,function = <BCM2835_FSEL_ALT4>;
+ brcm,pull = <0 2>;
+ };
+
+ uart4_pins: uart4_pins {
+ brcm,pins = <8 9>;
+ brcm,function = <BCM2835_FSEL_ALT4>;
+ brcm,pull = <0 2>;
+ };
+
+ uart5_pins: uart5_pins {
+ brcm,pins = <12 13>;
+ brcm,function = <BCM2835_FSEL_ALT4>;
+ brcm,pull = <0 2>;
+ };
+};
+
+&i2c0if {
+ clock-frequency = <100000>;
+};
+
+&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
+ clock-frequency = <100000>;
+};
+
+&i2s {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s_pins>;
+};
+
+// =============================================
+// Board specific stuff here
+
+&pcie0 {
+ brcm,enable-l1ss;
+};
+
+&sdhost {
+ status = "disabled";
+};
+
+&phy1 {
+ led-modes = <0x00 0x08>; /* link/activity link */
+};
+
+&gpio {
+ audio_pins: audio_pins {
+ brcm,pins = <>;
+ brcm,function = <>;
+ };
+};
+
+&leds {
+ act_led: led-act {
+ label = "led0";
+ linux,default-trigger = "mmc0";
+ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
+ };
+
+ pwr_led: led-pwr {
+ label = "led1";
+ linux,default-trigger = "default-on";
+ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&pwm1 {
+ status = "disabled";
+};
+
+&audio {
+ pinctrl-names = "default";
+ pinctrl-0 = <&audio_pins>;
+ brcm,disable-headphones = <1>;
+};
+
+cam0_reg: &cam1_reg {
+ gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
+};
+
+/ {
+ __overrides__ {
+ act_led_gpio = <&act_led>,"gpios:4";
+ act_led_activelow = <&act_led>,"gpios:8";
+ act_led_trigger = <&act_led>,"linux,default-trigger";
+
+ pwr_led_gpio = <&pwr_led>,"gpios:4";
+ pwr_led_activelow = <&pwr_led>,"gpios:8";
+ pwr_led_trigger = <&pwr_led>,"linux,default-trigger";
+
+ eth_led0 = <&phy1>,"led-modes:0";
+ eth_led1 = <&phy1>,"led-modes:4";
+
+ ant1 = <&ant1>,"output-high?=on",
+ <&ant1>, "output-low?=off",
+ <&ant2>, "output-high?=off",
+ <&ant2>, "output-low?=on";
+ ant2 = <&ant1>,"output-high?=off",
+ <&ant1>, "output-low?=on",
+ <&ant2>, "output-high?=on",
+ <&ant2>, "output-low?=off";
+ noant = <&ant1>,"output-high?=off",
+ <&ant1>, "output-low?=on",
+ <&ant2>, "output-high?=off",
+ <&ant2>, "output-low?=on";
+
+ sd_poll_once = <&emmc2>, "non-removable?";
+ spi_dma4 = <&spi0>, "dmas:0=", <&dma40>,
+ <&spi0>, "dmas:8=", <&dma40>;
+ };
+};
diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
index 69809bf2f45d..aef509d06d14 100644
--- a/arch/arm64/boot/dts/broadcom/Makefile
+++ b/arch/arm64/boot/dts/broadcom/Makefile
@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-4-b.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2710-rpi-cm3.dtb
dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4.dtb
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-cm4-ha-amber.dtb
subdir-y += northstar2
subdir-y += stingray
diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-amber.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-amber.dts
new file mode 100644
index 000000000000..728975338bf0
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-cm4-ha-amber.dts
@@ -0,0 +1 @@
+#include "../../../../arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts"
--
2.33.1

View File

@@ -0,0 +1,58 @@
From 60125e49aff88c430ebc6b8702aaf3867f529b75 Mon Sep 17 00:00:00 2001
Message-Id: <60125e49aff88c430ebc6b8702aaf3867f529b75.1635895105.git.stefan@agner.ch>
In-Reply-To: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
References: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 4 Mar 2021 14:33:09 +0100
Subject: [PATCH 2/7] ARM: dts: bcm2711: amber: Mux UART4 for SiLabs radio
module
Enable UART4 by default and mux pins including hardware flow control.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
index 855da2b029a4..ba4116cdffc4 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
@@ -21,6 +21,7 @@ memory@0 {
};
aliases {
+ serial4 = &uart4;
emmc2bus = &emmc2bus;
ethernet0 = &genet;
pcie0 = &pcie0;
@@ -321,6 +322,14 @@ &uart1 {
status = "okay";
};
+/* uart4 for Zigbee */
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins>;
+ uart-has-rtscts;
+ status = "okay";
+};
+
&vchiq {
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
};
@@ -549,9 +558,9 @@ uart3_pins: uart3_pins {
};
uart4_pins: uart4_pins {
- brcm,pins = <8 9>;
+ brcm,pins = <8 9 10 11>;
brcm,function = <BCM2835_FSEL_ALT4>;
- brcm,pull = <0 2>;
+ brcm,pull = <0 2 2 0>;
};
uart5_pins: uart5_pins {
--
2.33.1

View File

@@ -0,0 +1,50 @@
From 1e395219026ad0575483aecc9d49992099e73e8b Mon Sep 17 00:00:00 2001
Message-Id: <1e395219026ad0575483aecc9d49992099e73e8b.1635895105.git.stefan@agner.ch>
In-Reply-To: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
References: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 4 Mar 2021 14:44:23 +0100
Subject: [PATCH 3/7] ARM: dts: bcm2711: amber: Mux debug UART5
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
index ba4116cdffc4..4c2fe964eb72 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
@@ -22,6 +22,7 @@ memory@0 {
aliases {
serial4 = &uart4;
+ serial5 = &uart5;
emmc2bus = &emmc2bus;
ethernet0 = &genet;
pcie0 = &pcie0;
@@ -330,6 +331,13 @@ &uart4 {
status = "okay";
};
+/* uart5 default Debug UART */
+&uart5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart5_pins>;
+ status = "okay";
+};
+
&vchiq {
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
};
@@ -366,6 +374,7 @@ soc {
/ {
chosen {
bootargs = "coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
+ stdout-path = "serial5:115200n8";
};
aliases {
--
2.33.1

View File

@@ -0,0 +1,35 @@
From 071423b3beab53facdc69b7c945f82a907825f80 Mon Sep 17 00:00:00 2001
Message-Id: <071423b3beab53facdc69b7c945f82a907825f80.1635895105.git.stefan@agner.ch>
In-Reply-To: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
References: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 4 Mar 2021 14:48:48 +0100
Subject: [PATCH 4/7] ARM: dts: bcm2711: amber: Enable I2C6 by default
The main I2C bus used on Amber is I2C6. Enable it by default.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
index 4c2fe964eb72..a95c3f96044a 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
@@ -589,6 +589,12 @@ &i2c1 {
clock-frequency = <100000>;
};
+&i2c6 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c6_pins>;
+ status = "okay";
+};
+
&i2s {
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>;
--
2.33.1

View File

@@ -0,0 +1,67 @@
From 3fa8a55b7fd515f0ffe8b000be23080003ed5ac4 Mon Sep 17 00:00:00 2001
Message-Id: <3fa8a55b7fd515f0ffe8b000be23080003ed5ac4.1635895105.git.stefan@agner.ch>
In-Reply-To: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
References: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 4 Mar 2021 17:19:01 +0100
Subject: [PATCH 5/7] ARM: dts: bcm2711: amber: add I2S audio codec
Add TI PCM5122 I2S audio codec.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
.../arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
index a95c3f96044a..637ce01618d8 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
@@ -593,11 +593,22 @@ &i2c6 {
pinctrl-names = "default";
pinctrl-0 = <&i2c6_pins>;
status = "okay";
+
+ card_codec: pcm5121@4c {
+ #sound-dai-cells = <0>;
+ compatible = "ti,pcm5121";
+ reg = <0x4c>;
+ AVDD-supply = <&vdd_3v3_reg>;
+ DVDD-supply = <&vdd_3v3_reg>;
+ CPVDD-supply = <&vdd_3v3_reg>;
+ status = "okay";
+ };
};
&i2s {
pinctrl-names = "default";
pinctrl-0 = <&i2s_pins>;
+ status = "okay";
};
// =============================================
@@ -640,6 +651,21 @@ &pwm1 {
status = "disabled";
};
+&sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "pcm5521-sound";
+ status = "okay";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s>;
+ };
+
+ dailink0_slave: simple-audio-card,codec {
+ sound-dai = <&card_codec>;
+ };
+};
+
&audio {
pinctrl-names = "default";
pinctrl-0 = <&audio_pins>;
--
2.33.1

View File

@@ -0,0 +1,71 @@
From 7e2f95935408ec5b1d7a2b63daaef7fdb01d642c Mon Sep 17 00:00:00 2001
Message-Id: <7e2f95935408ec5b1d7a2b63daaef7fdb01d642c.1635895105.git.stefan@agner.ch>
In-Reply-To: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
References: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Tue, 9 Mar 2021 15:02:53 +0100
Subject: [PATCH 6/7] ARM: dts: bcm2711: amber: enable GPIO keys
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
.../arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts | 30 +++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
index 637ce01618d8..a2cbb8510491 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
@@ -2,6 +2,7 @@
/dts-v1/;
#include "bcm2711.dtsi"
#include "bcm2835-rpi.dtsi"
+#include <dt-bindings/input/input.h>
#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
@@ -29,6 +30,29 @@ aliases {
blconfig = &blconfig;
};
+ keys: gpio-keys {
+ compatible = "gpio-keys";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio_button_pins>;
+
+ status = "okay";
+
+ power {
+ label = "Power Button";
+ linux,code = <KEY_POWER>;
+ gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
+ debounce-interval = <100>; // ms
+ };
+
+ user {
+ label = "User Button";
+ linux,code = <KEY_MACRO>;
+ gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+ debounce-interval = <100>; // ms
+ };
+ };
+
leds {
led-act {
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
@@ -438,6 +462,12 @@ spidev1: spidev@1{
};
&gpio {
+ gpio_button_pins: gpio_button_pins {
+ brcm,pins = <26 27>;
+ brcm,function = <BCM2835_FSEL_GPIO_IN>;
+ brcm,pull = <BCM2835_PUD_UP>;
+ };
+
spi0_pins: spi0_pins {
brcm,pins = <9 10 11>;
brcm,function = <BCM2835_FSEL_ALT0>;
--
2.33.1

View File

@@ -0,0 +1,35 @@
From c9b6a336142c18892a1b617e8e1460ddd89a0991 Mon Sep 17 00:00:00 2001
Message-Id: <c9b6a336142c18892a1b617e8e1460ddd89a0991.1635895105.git.stefan@agner.ch>
In-Reply-To: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
References: <fa42d0ece205b3c2a8a06dac3e4436400cf59978.1635895105.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 28 Oct 2021 19:38:04 +0200
Subject: [PATCH 7/7] ARM: dts: bcm2711: amber: add user LED
Add yellow user LED.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
index a2cbb8510491..a80a50de399e 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-amber.dts
@@ -675,6 +675,12 @@ pwr_led: led-pwr {
linux,default-trigger = "default-on";
gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
};
+
+ user_led: led-user {
+ label = "led2";
+ linux,default-trigger = "heartbeat";
+ gpios = <&gpio 44 GPIO_ACTIVE_HIGH>;
+ };
};
&pwm1 {
--
2.33.1

View File

@@ -0,0 +1,79 @@
part start ${devtype} ${devnum} 6 dev_env
${devtype} dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
${devtype} read ${ramdisk_addr_r} ${dev_env} 0x20; \
env import -c ${ramdisk_addr_r} 0x4000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
${devtype} write ${ramdisk_addr_r} ${dev_env} 0x20;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
if gpio input GPIO27; then
sleep 1
if gpio input GPIO27; then
echo "Device wipe button has been pressed, setting wipe flag..."
setenv bootargs_hassos "${bootargs_hassos} haos.wipe=1"
fi
fi
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro"
# Preserve origin bootargs
setenv bootargs_rpi
setenv fdt_org ${fdt_addr}
fdt addr ${fdt_org}
fdt get value bootargs_rpi /chosen bootargs
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if load ${devtype} ${devnum}:2 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_a} rauc.slot=A"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if load ${devtype} ${devnum}:4 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B"
fi
fi
fi
done
setenv fdt_addr
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
echo "Starting kernel"
booti ${kernel_addr_r} - ${fdt_org}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,2 @@
CONFIG_CMD_NVME=y
CONFIG_NVME=y

View File

@@ -0,0 +1 @@
dwc_otg.lpm_enable=0 console=tty1

View File

@@ -0,0 +1,81 @@
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# HAOS - don't change it!
disable_splash=1
kernel=u-boot.bin
# uncomment for aarch64 bit support
#arm_64bit=1
# uncomment to enable primary UART console
#enable_uart=1
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
# Uncomment to disable continous SD-card poll (for USB SSD)
#dtparam=sd_poll_once=on
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
#enable_uart=1
#dtparam=i2c_arm=on
#dtoverlay=miniuart-bt
#dtoverlay=rpi-rf-mod
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d
#max_framebuffers=2

Some files were not shown because too many files have changed in this diff Show More