Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c469e6f27 | ||
|
|
bbbaff117a | ||
|
|
6c58a94a4d | ||
|
|
2b89de39e3 | ||
|
|
1ca4275698 | ||
|
|
647a461a74 |
30
Dockerfile
30
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM debian:buster
|
||||
FROM ubuntu:18.04
|
||||
|
||||
# Set shell
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
@@ -9,35 +9,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gpg-agent \
|
||||
gpg \
|
||||
dirmngr \
|
||||
software-properties-common \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
|
||||
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
|
||||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
|
||||
&& add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
docker-ce \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Build tools
|
||||
# Build Tools
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
bash \
|
||||
bc \
|
||||
binutils \
|
||||
build-essential \
|
||||
bzip2 \
|
||||
cpio \
|
||||
file \
|
||||
git \
|
||||
make \
|
||||
ncurses-dev \
|
||||
patch \
|
||||
perl \
|
||||
python \
|
||||
rsync \
|
||||
sudo \
|
||||
unzip \
|
||||
wget \
|
||||
qemu-utils \
|
||||
wget patch vim cpio python unzip rsync bc bzip2 ncurses-dev sudo \
|
||||
git make g++ file perl bash binutils locales qemu-utils bison flex \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Init entry
|
||||
|
||||
@@ -5,13 +5,11 @@ Supported Hardware:
|
||||
| Device | Board |
|
||||
|--------|-----------|
|
||||
| Tinker RK3288 | tinker |
|
||||
| Tinker S RK3288 | |
|
||||
| Tinker S RK3288 | tinker |
|
||||
|
||||
<!--
|
||||
## eMMC
|
||||
|
||||
eMMC support is provided transparently. Just flash the image to the eMMC by connecting your Tinker Board S to your PC via Micro-USB.
|
||||
-->
|
||||
|
||||
## Serial console
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Automatic
|
||||
|
||||
You can use an USB drive with HassOS to configure network options, SSH access to the host and to install updates.
|
||||
Format a USB stick with FAT32/EXT4/NTFS and name it `CONFIG` (in all capitals). Alternative you can create a `CONFIG` folder inside the `boot` partition. Use the following directory structure within the USB drive:
|
||||
Format a USB stick with FAT32/EXT4/NTFS and name it `CONFIG` (in all capitals). Alternative you can create a `CONFIG` folder inside boot partition. Use the following directory structure within the USB drive:
|
||||
|
||||
```text
|
||||
network/
|
||||
@@ -24,7 +24,7 @@ hassos-xy.raucb
|
||||
- The `hassos-*.raucb` file is a firmware OTA update which will be installed. These can be found on on the [release][hassos-release] page.
|
||||
|
||||
You can put this USB stick into the device and it will be read on startup and files written to the correct places. You can also trigger this process later over the
|
||||
API/UI or by calling `systemctl restart hassos-config` on the host. *The USB Stick just needs to be inserted to the device during this setup process and can be disconnected afterwards.*
|
||||
API/UI or by calling `systemctl restart hassos-config` on the host. *The USB Stick just needs to be insterted to the device during this setup process and can be disconnected afterwards.*
|
||||
|
||||
## Local
|
||||
|
||||
@@ -47,9 +47,7 @@ You can manual add, edit or remove connections configurations from `/etc/Network
|
||||
### NTP
|
||||
|
||||
You can manual edit the systemd timesync file on `/etc/systemd/timesyncd.conf`.
|
||||
|
||||
Our default NTP configuration look like:
|
||||
|
||||
Our default ntp configuration look like:
|
||||
```
|
||||
[Time]
|
||||
NTP=time1.google.com time2.google.com time3.google.com
|
||||
|
||||
@@ -3,37 +3,33 @@
|
||||
## Boot system
|
||||
|
||||
`BOOT_SYS`:
|
||||
|
||||
- efi
|
||||
- hybrid
|
||||
- hyprid
|
||||
- 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.
|
||||
HassOS is basicly used GPT. But for use GPT we need own the first 1024 of
|
||||
boot drive. Is that not possible, you can use MBR for your device, they work also 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.
|
||||
Hyprid and SPL use both a hyprid MBR/GPT table but SPL move the GPT header 8MB for give space to write SPL and boot images before.
|
||||
|
||||
`BOOT_SPL`:
|
||||
|
||||
- true
|
||||
- false
|
||||
|
||||
Enable SPL update handling.
|
||||
|
||||
`BOOTLOADER`:
|
||||
|
||||
- U-Boot
|
||||
- uboot
|
||||
- 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.
|
||||
We support mainly uboot but for uefi system we can also use barebox. In future we hope to remove barebox with uboot also on uefi.
|
||||
|
||||
`DISK_SIZE`:
|
||||
|
||||
Default 2. That is the size of end image in GB.
|
||||
|
||||
## Supervisor
|
||||
|
||||
`SUPERVISOR_MACHINE`:
|
||||
|
||||
- intel-nuc
|
||||
- odroid-c2
|
||||
- odroid-n2
|
||||
@@ -50,8 +46,7 @@ Default 2. That is the size of end image in GB.
|
||||
- raspberrypi4-64
|
||||
- tinker
|
||||
|
||||
`SUPERVISOR_ARCH`:
|
||||
|
||||
`SUPERVISOR_ARCH`
|
||||
- amd64
|
||||
- i386
|
||||
- armhf
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# Getting started with HassOS development using Docker on GNU/Linux
|
||||
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).
|
||||
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:
|
||||
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)
|
||||
@@ -14,7 +15,7 @@ $ sudo systemctl status docker
|
||||
|
||||
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
|
||||
@@ -29,9 +30,9 @@ $ sudo systemctl --no-pager status docker -n0
|
||||
└─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:
|
||||
Now, change your working directory to your hassos repo checkout (please adapt pathnames 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/hassos/
|
||||
$ sudo scripts/enter.sh
|
||||
Sending build context to Docker daemon 30.48MB
|
||||
@@ -42,24 +43,24 @@ 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:
|
||||
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.
|
||||
The _hassos_ developers provide a Makefile that will build hassos images for a (rather long!) 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
|
||||
@@ -73,15 +74,15 @@ 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:
|
||||
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
|
||||
@@ -90,12 +91,14 @@ total 673M
|
||||
|
||||
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.)
|
||||
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 is described as providing "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 pathnames 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.
|
||||
This should pop up qemu's SDL frontend, displaying _hassos_' VT/CLI environment. Specifying addtional 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.
|
||||
|
||||
Happy hacking! :)
|
||||
|
||||
@@ -5,14 +5,14 @@ Default Kernel tree: 5.4
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Applicance | 5.4.50 |
|
||||
| Raspberry Pi | 4.19.127 |
|
||||
| Raspberry Pi 0-W | 4.19.127 |
|
||||
| Raspberry Pi 2 | 4.19.127 |
|
||||
| Raspberry Pi 3 | 4.19.127 |
|
||||
| Raspberry Pi 4 | 4.19.127 |
|
||||
| Tinker Board | 5.4.50 |
|
||||
| Odroid-C2 | 5.7.7 |
|
||||
| Odroid-N2 | 5.7.7 |
|
||||
| Odroid-XU4 | 5.7.7 |
|
||||
| Intel NUC | 5.4.50 |
|
||||
| Open Virtual Applicance | 5.4.39 |
|
||||
| Raspberry Pi | 5.4.38 |
|
||||
| Raspberry Pi 0-W | 5.4.38 |
|
||||
| Raspberry Pi 2 | 5.4.38 |
|
||||
| Raspberry Pi 3 | 5.4.38 |
|
||||
| Raspberry Pi 4 | 5.4.38 |
|
||||
| Tinker Board | 5.4.39 |
|
||||
| Odroid-C2 | 5.4.35 |
|
||||
| Odroid-N2 | 5.4.32 |
|
||||
| Odroid-XU4 | 5.4.35 |
|
||||
| Intel NUC | 5.4.39 |
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
# Network
|
||||
|
||||
HassOS uses NetworkManager to control the host network.
|
||||
## Configure Network
|
||||
HassOS uses NetworkManager to control the host network. In future releases, you will be able to set up the configuration using the API/UI. Currently only a manual configuration using NetworkManager connection files is supported. Without a configuration file, the device will use DHCP by default. These network connection files can be placed on a USB drive and imported to the host as described in [Configuration][configuration-usb].
|
||||
|
||||
## Configure network
|
||||
## Configuration Examples
|
||||
|
||||
Only a manual configuration using NetworkManager connection files is supported. Without a configuration file, the device will use DHCP by default. These network connection files can be placed on a USB drive and imported to the host as described in [Configuration][configuration-usb].
|
||||
|
||||
## Configuration examples
|
||||
|
||||
You can read the [NetworkManager manual][nm-manual] or find many configuration examples across the internet. Keep in mind that the system is read-only. If you don't want the IP address to change on every boot, you should modify the UUID property to a generic [UUID4][uuid]. Inside the `\CONFIG\network\` directory on the USB drive or SD card, create a file called `my-network` and add the appropriate contents below:
|
||||
You can read the [Official Manual][keyfile] or find many configuration examples across the internet. The system is read-only, if you don't want the IP address to change on every boot, you should set the UUID property with a generic [UUID4][uuid]. Inside `\CONFIG\network\` on the USB or SD, create a file called `my-network` and add the appropriate contents below:
|
||||
|
||||
### Default
|
||||
|
||||
A preinstalled connection profile is provided by default:
|
||||
We have a preinstalled connection profile:
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
@@ -28,7 +25,7 @@ addr-gen-mode=stable-privacy
|
||||
method=auto
|
||||
```
|
||||
|
||||
### Wired connection to the LAN
|
||||
### LAN
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
@@ -44,7 +41,7 @@ addr-gen-mode=stable-privacy
|
||||
method=auto
|
||||
```
|
||||
|
||||
### Wireless LAN WPA/PSK
|
||||
### Wireless WPA/PSK
|
||||
|
||||
```ini
|
||||
[connection]
|
||||
@@ -81,8 +78,7 @@ method=manual
|
||||
address=192.168.1.111/24;192.168.1.1
|
||||
dns=8.8.8.8;8.8.4.4;
|
||||
```
|
||||
|
||||
For `address`, the value before the semicolon is the IP address and subnet prefix bitlength. The second value (after the semicolon) is the IP address of the local gateway.
|
||||
For address, the value before the semicolon is the IP address and subnet prefix bitlength; the second value is the IP address of the gateway.
|
||||
|
||||
## Tips
|
||||
|
||||
@@ -91,63 +87,59 @@ For `address`, the value before the semicolon is the IP address and subnet prefi
|
||||
If you want to reset the network configuration back to the default DHCP settings, use the following commands on the host:
|
||||
|
||||
```bash
|
||||
# rm /etc/NetworkManager/system-connections/*
|
||||
# cp /usr/share/system-connections/* /etc/NetworkManager/system-connections/
|
||||
# nmcli con reload
|
||||
$ rm /etc/NetworkManager/system-connections/*
|
||||
$ cp /usr/share/system-connections/* /etc/NetworkManager/system-connections/
|
||||
$ nmcli con reload
|
||||
```
|
||||
|
||||
### Powersave
|
||||
|
||||
If you have trouble with powersave then apply the following changes:
|
||||
If you have trouble with powersave you can do following:
|
||||
|
||||
```ini
|
||||
[wifi]
|
||||
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
|
||||
powersave=0
|
||||
```
|
||||
## Using nmcli to set a static IPV4 address
|
||||
|
||||
## Using `nmcli` to set a static IPv4 address
|
||||
Log into the HASSOS base system via a console:
|
||||
|
||||
Log into the the HassOS base system via a console:
|
||||
|
||||
```bash
|
||||
```
|
||||
Welcome to Home Assistant
|
||||
homeassistant login:
|
||||
```
|
||||
Login as `root` (no password needed)
|
||||
|
||||
- Login as `root` (no password needed). At the `ha >` prompt, type `login` (as instructed).
|
||||
At the `ha >` prompt, type `login` (as instructed).
|
||||
|
||||
From there you use the `nmcli` configuration tool.
|
||||
From here you will use the `nmcli` configuration tool.
|
||||
|
||||
- `# nmcli con show` will list the "HassOS default" connection in use.
|
||||
- `# nmcli con show "HassOS default"` will list all the properties of the connection.
|
||||
`# nmcli connection show` will list the “HassOS default” connection in use.
|
||||
|
||||
To start editing the configuration setting for "HassOS default":
|
||||
`# nmcli con show "HassOS default"` will list all the properties of the connection.
|
||||
|
||||
```bash
|
||||
# nmcli con edit "HassOS default"
|
||||
```
|
||||
`# nmcli con edit "HassOS default"` will put you in a position to edit the connection.
|
||||
|
||||
`nmcli> print ipv4` will show you the ipv4 properties of this connection.
|
||||
|
||||
To add your static IP address (select 'yes' for manual method);
|
||||
|
||||
```bash
|
||||
```
|
||||
nmcli> set ipv4.addresses 192.168.100.10/24
|
||||
Do you also want to set 'ipv4.method' to 'manual'? [yes]:
|
||||
```
|
||||
|
||||
In addition, it's recommended to set the DNS server and the local gateway. For most home routers the DNS server will have the same IP address as the router itself. If you are using Pi-Hole or a third-party DNS system then you can set the DNS server to that.
|
||||
|
||||
```bash
|
||||
In addition I have found it is wise to set the dns server and the local gateway. For most home routers these will be the same address. If you are using Pi-Hole you can set the dns to that.
|
||||
```
|
||||
nmcli> set ipv4.dns 192.168.100.1
|
||||
nmcli> set ipv4.gateway 192.168.100.1
|
||||
nmcli> save
|
||||
nmcli> quit
|
||||
```
|
||||
|
||||
`nmcli> print ipv4` will show you the IPv4 properties of this connection. With `nmcli> save` you will save the changes afterwards.
|
||||
|
||||
If you now view the default connection `cat /etc/NetworkManager/system-connections/default` you should see the method is manual and the address is set.
|
||||
|
||||
Doing a `nmcli con reload` does not always work, so restart the virtual machine or the physical system.
|
||||
Doing a `nmcli con reload` does not always work so restart the VM.
|
||||
|
||||
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/nm-settings.html
|
||||
[keyfile]: https://developer.gnome.org/NetworkManager/stable/nm-settings.html
|
||||
[configuration-usb]: configuration.md
|
||||
[uuid]: https://www.uuidgenerator.net/
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# Partition
|
||||
|
||||
The partition layout is a bit different than for regular setups. We prefer GPT, if possible. With SoCs which don't support GPT, we use the hybrid GPT. For more details about this topic, please refer to the [development](development.mnd) documentation.
|
||||
The partition layout is a bit different on the first part. We prefere GPT every time where is possible. With SoCs they don't support GPT, we can use the hyprid GPT. More about this on [development](development.mnd) documentation.
|
||||
|
||||
The system is designed to have as less as possible write operations on the storage media. Which means that we have basically only write during the OTA update and 5-6 times per week on the overlay part. The data partition is having I/O. This is the reason which is should be run on a different drive.
|
||||
The system is designed to have less as possible writes on the system. Which means we have basicly just writes on the OTA update and pretty small (5-6 times per week) on the overlay part. The Data partition have real I/O which is possible to offload into a different drive.
|
||||
|
||||
A visual representation looks like this:
|
||||
Basic it look like:
|
||||
|
||||
```text
|
||||
```
|
||||
-------------------------
|
||||
| Bootloader |
|
||||
-------------------------
|
||||
@@ -36,12 +36,11 @@ Sometime the bootloader part can look different because there can be firmware or
|
||||
|
||||
## Data
|
||||
|
||||
The data partition is the only partition with real I/O. It will be expanded automatic on boot time to the full size of the disk.
|
||||
The data partation is the only partition with real I/O. It will be expanded automatic on boot time to the full size of the disk.
|
||||
|
||||
This partition can be offloaded to a different drive with the utility:
|
||||
|
||||
```sh
|
||||
$ datactl move /dev/xxx
|
||||
```
|
||||
|
||||
On next boot, the partition will be moved to the new drive. The drive needs to be bigger as the old one and we own the full new drive.
|
||||
On next boot, the partition will be moved to the new drive. The drive need to be bigger as the old one and we own the full new drive.
|
||||
|
||||
13
README.md
13
README.md
@@ -1,18 +1,15 @@
|
||||
# Home Assistant Operating system
|
||||
# Home Assistant Operating-System
|
||||
Hass.io OS based on [buildroot](https://buildroot.org/). It's a hypervisor for Docker and supports various kind of IoT hardware. It is also available as virtual appliance. The whole system is optimized for embedded system and security. You can update the system simple with OTA updates or offline updates.
|
||||
|
||||
Home Assistant Operating System (HassOS) is based on [buildroot](https://buildroot.org/). It's a hypervisor for Docker and supports various kind of hardware. It is also available as virtual appliance for different virtualization solutions. The whole system is optimized for hosting [Home Assistant](https://www.home-assistant.io) and its features (to be precise, the [Add-ons](https://www.home-assistant.io/addons/)). You can update the system by using OTA updates or offline updates.
|
||||
|
||||
This is an embedded Linux which works different than a normal Linux distribution. The system is designed to run with minimal I/O and is optimized for its tasks.
|
||||
|
||||
If you don't have experience with embedded systems, buildroot or the build process Linux distributions, then please read up on those topics. All provided documentation here is focusing on developers with a background on embedded systems or a strong understanding of the internal workings of operating systems.
|
||||
This is a embedded Linux which work different as a normal Linux distribution. The system is designed to run with less as possible I/O and full optimized for what is needed to be. Not more and not less. If you don't have expirence with embedded systems, that will be the point to go out of this repository. All docs are for developer with embedded background.
|
||||
|
||||
## Focus
|
||||
|
||||
- Barebox as bootloader on EFI
|
||||
- U-Boot as bootloader
|
||||
- U-Boot as bootloader on IoT
|
||||
- Linux/Buildroot LTS
|
||||
- RAUC for OTA updates
|
||||
- SquashFS LZ4 as filesystem
|
||||
- Docker-CE
|
||||
- AppArmor protected
|
||||
- ZRAM LZ4 for `/tmp`, `/var` and swap
|
||||
- ZRAM LZ4 for /tmp, /var, swap
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
# CONFIG_DOS_PARTITION is not set
|
||||
CONFIG_DM_VIDEO=y
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
4530
buildroot-external/board/hardkernel/kernel-exynos.config
Normal file
4530
buildroot-external/board/hardkernel/kernel-exynos.config
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,6 @@
|
||||
CONFIG_DOS_PARTITION=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_CMD_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
CONFIG_DOS_PARTITION=y
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
# CONFIG_USB_STORAGE is not set
|
||||
CONFIG_DISPLAY_BOARDINFO=y
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 81b290367d59103d1f041709c56a3de1c360e102 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 13 May 2019 14:45:31 +0200
|
||||
Subject: [PATCH] FROMLIST: clk: meson: g12a: fix gp0 and hifi ranges
|
||||
|
||||
While some SoC samples are able to lock with a PLL factor of 55, others
|
||||
samples can't. ATM, a minimum of 60 appears to work on all the samples
|
||||
I have tried.
|
||||
|
||||
Even with 60, it sometimes takes a long time for the PLL to eventually
|
||||
lock. The documentation says that the minimum rate of these PLLs DCO
|
||||
should be 3GHz, a factor of 125. Let's use that to be on the safe side.
|
||||
|
||||
With factor range changed, the PLL seems to lock quickly (enough) so far.
|
||||
It is still unclear if the range was the only reason for the delay.
|
||||
|
||||
Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller")
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/clk/meson/g12a.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
|
||||
index b3af61cc6fb9..66cf791bfc8c 100644
|
||||
--- a/drivers/clk/meson/g12a.c
|
||||
+++ b/drivers/clk/meson/g12a.c
|
||||
@@ -1591,7 +1591,7 @@ static struct clk_regmap g12b_cpub_clk_trace = {
|
||||
};
|
||||
|
||||
static const struct pll_mult_range g12a_gp0_pll_mult_range = {
|
||||
- .min = 55,
|
||||
+ .min = 125,
|
||||
.max = 255,
|
||||
};
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 122cb1d72a440bc6a84e50b1ed40af7ed7f737c6 Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Mon, 27 Apr 2020 23:41:44 +0000
|
||||
Subject: [PATCH 1/1] Odroid-N2: arm64/dts: fix audio name
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
index 1cf9af35e435..f0aac838bc46 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
sound {
|
||||
compatible = "amlogic,axg-sound-card";
|
||||
- model = "G12A-ODROIDN2";
|
||||
+ model = "G12B-ODROID-N2";
|
||||
audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&dio2133>;
|
||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
From bbafdffacb88adb701ca2f37f3169df4c9ac3824 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 8 Jun 2020 10:44:58 +0200
|
||||
Subject: [PATCH 1/8] mmc: meson-gx: limit segments to 1 when dram-access-quirk
|
||||
is needed
|
||||
|
||||
The actual max_segs computation leads to failure while using the broadcom
|
||||
sdio brcmfmac/bcmsdh driver, since the driver tries to make usage of scatter
|
||||
gather.
|
||||
|
||||
But with the dram-access-quirk we use a 1,5K SRAM bounce buffer, and the
|
||||
max_segs current value of 3 leads to max transfers to 4,5k, which doesn't work.
|
||||
|
||||
This patch sets max_segs to 1 to better describe the hardware limitation,
|
||||
and fix the SDIO functionnality with the brcmfmac/bcmsdh driver on Amlogic
|
||||
G12A/G12B SoCs on boards like SEI510 or Khadas VIM3.
|
||||
|
||||
Reported-by: Art Nikpal <art@khadas.com>
|
||||
Reported-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Fixes: acdc8e71d9bb ("mmc: meson-gx: add dram-access-quirk")
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/mmc/host/meson-gx-mmc.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
|
||||
index 35400cf2a2e4..cfaf8e7e22ec 100644
|
||||
--- a/drivers/mmc/host/meson-gx-mmc.c
|
||||
+++ b/drivers/mmc/host/meson-gx-mmc.c
|
||||
@@ -1143,9 +1143,11 @@ static int meson_mmc_probe(struct platform_device *pdev)
|
||||
|
||||
mmc->caps |= MMC_CAP_CMD23;
|
||||
if (host->dram_access_quirk) {
|
||||
+ /* Limit segments to 1 due to low available sram memory */
|
||||
+ mmc->max_segs = 1;
|
||||
/* Limit to the available sram memory */
|
||||
- mmc->max_segs = SD_EMMC_SRAM_DATA_BUF_LEN / mmc->max_blk_size;
|
||||
- mmc->max_blk_count = mmc->max_segs;
|
||||
+ mmc->max_blk_count = SD_EMMC_SRAM_DATA_BUF_LEN /
|
||||
+ mmc->max_blk_size;
|
||||
} else {
|
||||
mmc->max_blk_count = CMD_CFG_LENGTH_MASK;
|
||||
mmc->max_segs = SD_EMMC_DESC_BUF_LEN /
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
From e2b93751cfd0722801b65b4603b588ab9df4c12b Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Tue, 21 Apr 2020 18:39:30 +0200
|
||||
Subject: [PATCH 2/8] arm64: defconfig: enable meson gx audio as module
|
||||
|
||||
Enable the module config for the Amlogic GX audio card.
|
||||
This module will imply the internal components usually associated
|
||||
with it to make a functional sound card on these platforms.
|
||||
|
||||
Also enable the simple amplifier module which often used on the
|
||||
output stage of those cards.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20200421163935.775935-2-jbrunet@baylibre.com
|
||||
---
|
||||
arch/arm64/configs/defconfig | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
|
||||
index 03d0189f7d68..ceb60ee9c340 100644
|
||||
--- a/arch/arm64/configs/defconfig
|
||||
+++ b/arch/arm64/configs/defconfig
|
||||
@@ -644,6 +644,7 @@ CONFIG_SND_HDA_CODEC_HDMI=m
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_BCM2835_SOC_I2S=m
|
||||
CONFIG_SND_MESON_AXG_SOUND_CARD=m
|
||||
+CONFIG_SND_MESON_GX_SOUND_CARD=m
|
||||
CONFIG_SND_SOC_SDM845=m
|
||||
CONFIG_SND_SOC_ROCKCHIP=m
|
||||
CONFIG_SND_SOC_ROCKCHIP_SPDIF=m
|
||||
@@ -656,6 +657,7 @@ CONFIG_SND_SOC_AK4613=m
|
||||
CONFIG_SND_SOC_ES7134=m
|
||||
CONFIG_SND_SOC_ES7241=m
|
||||
CONFIG_SND_SOC_PCM3168A_I2C=m
|
||||
+CONFIG_SND_SOC_SIMPLE_AMPLIFIER=m
|
||||
CONFIG_SND_SOC_TAS571X=m
|
||||
CONFIG_SND_SOC_WCD934X=m
|
||||
CONFIG_SND_SOC_WSA881X=m
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
From 821b8ac21b1675910423ee69d37cb1977b8f271e Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 30 Mar 2020 17:39:04 +0200
|
||||
Subject: [PATCH 3/8] ASoC: meson: imply acodec glue on axg sound card
|
||||
|
||||
When axg card driver support is enabled, lets enable the related
|
||||
internal DAC glue by default.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson/Kconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig
|
||||
index 8b6295283989..363dc3b1bbe4 100644
|
||||
--- a/sound/soc/meson/Kconfig
|
||||
+++ b/sound/soc/meson/Kconfig
|
||||
@@ -68,6 +68,7 @@ config SND_MESON_AXG_SOUND_CARD
|
||||
imply SND_MESON_AXG_SPDIFOUT
|
||||
imply SND_MESON_AXG_SPDIFIN
|
||||
imply SND_MESON_AXG_PDM
|
||||
+ imply SND_MESON_G12A_TOACODEC
|
||||
imply SND_MESON_G12A_TOHDMITX if DRM_MESON_DW_HDMI
|
||||
help
|
||||
Select Y or M to add support for the AXG SoC sound card
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
From 60164df03c6314d8f5f3afef56b0bf97962ec9ee Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 24 Feb 2020 14:35:17 +0100
|
||||
Subject: [PATCH 4/8] ASoC: meson: gx-card: fix sound-dai dt schema
|
||||
|
||||
There is a fair amount of warnings when running 'make dtbs_check' with
|
||||
amlogic,gx-sound-card.yaml.
|
||||
|
||||
Ex:
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:1: missing phandle tag in 0
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:2: missing phandle tag in 0
|
||||
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0: [66, 0, 0] is too long
|
||||
|
||||
The reason is that the sound-dai phandle provided has cells, and in such
|
||||
case the schema should use 'phandle-array' instead of 'phandle'.
|
||||
|
||||
Fixes: fd00366b8e41 ("ASoC: meson: gx: add sound card dt-binding documentation")
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
.../devicetree/bindings/sound/amlogic,gx-sound-card.yaml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
|
||||
index fb374c659be1..a48222e8cd08 100644
|
||||
--- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
|
||||
+++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml
|
||||
@@ -57,7 +57,7 @@ patternProperties:
|
||||
rate
|
||||
|
||||
sound-dai:
|
||||
- $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
description: phandle of the CPU DAI
|
||||
|
||||
patternProperties:
|
||||
@@ -71,7 +71,7 @@ patternProperties:
|
||||
|
||||
properties:
|
||||
sound-dai:
|
||||
- $ref: /schemas/types.yaml#/definitions/phandle
|
||||
+ $ref: /schemas/types.yaml#/definitions/phandle-array
|
||||
description: phandle of the codec DAI
|
||||
|
||||
required:
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From e128dd1ca079c5ee558ab100387d9f81bd4f3980 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 7 May 2020 00:16:55 +0200
|
||||
Subject: [PATCH 5/8] arm64: dts: meson: g12: add internal DAC
|
||||
|
||||
add internal audio DAC support on the g12 and sm1 SoC family
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20200506221656.477379-7-jbrunet@baylibre.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
index c0aef7d69117..593a006f4b7b 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
@@ -250,6 +250,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
+ acodec: audio-controller@32000 {
|
||||
+ compatible = "amlogic,t9015";
|
||||
+ reg = <0x0 0x32000 0x0 0x14>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ sound-name-prefix = "ACODEC";
|
||||
+ clocks = <&clkc CLKID_AUDIO_CODEC>;
|
||||
+ clock-names = "pclk";
|
||||
+ resets = <&reset RESET_AUDIO_CODEC>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
periphs: bus@34400 {
|
||||
compatible = "simple-bus";
|
||||
reg = <0x0 0x34400 0x0 0x400>;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From 5ea4085da165fd3f3aa211cb3664dd166d0d5fd7 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Thu, 7 May 2020 00:16:56 +0200
|
||||
Subject: [PATCH 6/8] arm64: dts: meson: g12: add internal DAC glue
|
||||
|
||||
add the internal DAC glue support on the g12 and sm1 family
|
||||
This glue connects the different TDM interfaces of the SoC to
|
||||
the internal audio DAC codec.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/20200506221656.477379-8-jbrunet@baylibre.com
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12.dtsi | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
|
||||
index 55d39020ec72..0d14409f509c 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12.dtsi
|
||||
@@ -343,6 +343,15 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ toacodec: audio-controller@740 {
|
||||
+ compatible = "amlogic,g12a-toacodec";
|
||||
+ reg = <0x0 0x740 0x0 0x4>;
|
||||
+ #sound-dai-cells = <1>;
|
||||
+ sound-name-prefix = "TOACODEC";
|
||||
+ resets = <&clkc_audio AUD_RESET_TOACODEC>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
tohdmitx: audio-controller@744 {
|
||||
compatible = "amlogic,g12a-tohdmitx";
|
||||
reg = <0x0 0x744 0x0 0x4>;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
From 15b3cef2ea75c4d81cb067264be1cf49c49f81b1 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 15 Jun 2020 15:38:44 +0200
|
||||
Subject: [PATCH 7/8] arm64: dts: meson-g12b: odroid-n2: enable audio loopback
|
||||
|
||||
Add capture pcm interfaces and loopback routes to the odroid-n2
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 65 +++++++++++++++++--
|
||||
1 file changed, 61 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
index 169ea283d4ee..d4421ad164bd 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
@@ -209,11 +209,28 @@
|
||||
sound {
|
||||
compatible = "amlogic,axg-sound-card";
|
||||
model = "G12B-ODROID-N2";
|
||||
- audio-aux-devs = <&tdmout_b>;
|
||||
+ audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>,
|
||||
+ <&tdmin_c>, <&tdmin_lb>;
|
||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
||||
- "TDM_B Playback", "TDMOUT_B OUT";
|
||||
+ "TDM_B Playback", "TDMOUT_B OUT",
|
||||
+ "TDMIN_A IN 4", "TDM_B Loopback",
|
||||
+ "TDMIN_B IN 4", "TDM_B Loopback",
|
||||
+ "TDMIN_C IN 4", "TDM_B Loopback",
|
||||
+ "TDMIN_LB IN 1", "TDM_B Loopback",
|
||||
+ "TODDR_A IN 0", "TDMIN_A OUT",
|
||||
+ "TODDR_B IN 0", "TDMIN_A OUT",
|
||||
+ "TODDR_C IN 0", "TDMIN_A OUT",
|
||||
+ "TODDR_A IN 1", "TDMIN_B OUT",
|
||||
+ "TODDR_B IN 1", "TDMIN_B OUT",
|
||||
+ "TODDR_C IN 1", "TDMIN_B OUT",
|
||||
+ "TODDR_A IN 2", "TDMIN_C OUT",
|
||||
+ "TODDR_B IN 2", "TDMIN_C OUT",
|
||||
+ "TODDR_C IN 2", "TDMIN_C OUT",
|
||||
+ "TODDR_A IN 6", "TDMIN_LB OUT",
|
||||
+ "TODDR_B IN 6", "TDMIN_LB OUT",
|
||||
+ "TODDR_C IN 6", "TDMIN_LB OUT";
|
||||
|
||||
assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
<&clkc CLKID_MPLL0>,
|
||||
@@ -236,8 +253,20 @@
|
||||
sound-dai = <&frddr_c>;
|
||||
};
|
||||
|
||||
- /* 8ch hdmi interface */
|
||||
dai-link-3 {
|
||||
+ sound-dai = <&toddr_a>;
|
||||
+ };
|
||||
+
|
||||
+ dai-link-4 {
|
||||
+ sound-dai = <&toddr_b>;
|
||||
+ };
|
||||
+
|
||||
+ dai-link-5 {
|
||||
+ sound-dai = <&toddr_c>;
|
||||
+ };
|
||||
+
|
||||
+ /* 8ch hdmi interface */
|
||||
+ dai-link-6 {
|
||||
sound-dai = <&tdmif_b>;
|
||||
dai-format = "i2s";
|
||||
dai-tdm-slot-tx-mask-0 = <1 1>;
|
||||
@@ -252,7 +281,7 @@
|
||||
};
|
||||
|
||||
/* hdmi glue */
|
||||
- dai-link-4 {
|
||||
+ dai-link-7 {
|
||||
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
||||
|
||||
codec {
|
||||
@@ -476,6 +505,22 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tdmin_a {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tdmin_b {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tdmin_c {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&tdmin_lb {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&tdmout_b {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -484,6 +529,18 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&toddr_a {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&toddr_b {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&toddr_c {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart_AO {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&uart_ao_a_pins>;
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
From 978cc250574b7f1ab45f494cc2a094e3c9fd1fa4 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Mon, 15 Jun 2020 16:34:37 +0200
|
||||
Subject: [PATCH 8/8] arm64: dts: meson: odroid-n2: add jack audio output
|
||||
support
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 79 +++++++++++++++++--
|
||||
1 file changed, 74 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
index d4421ad164bd..34fffa6d859d 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "meson-g12b-s922x.dtsi"
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
||||
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
|
||||
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
||||
|
||||
/ {
|
||||
@@ -20,6 +21,14 @@
|
||||
ethernet0 = ðmac;
|
||||
};
|
||||
|
||||
+ dioo2133: audio-amplifier-0 {
|
||||
+ compatible = "simple-audio-amplifier";
|
||||
+ enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
|
||||
+ VCC-supply = <&vcc_5v>;
|
||||
+ sound-name-prefix = "U19";
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
@@ -209,16 +218,26 @@
|
||||
sound {
|
||||
compatible = "amlogic,axg-sound-card";
|
||||
model = "G12B-ODROID-N2";
|
||||
- audio-aux-devs = <&tdmout_b>, <&tdmin_a>, <&tdmin_b>,
|
||||
- <&tdmin_c>, <&tdmin_lb>;
|
||||
+ audio-widgets = "Line", "Lineout";
|
||||
+ audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
|
||||
+ <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
|
||||
+ <&dioo2133>;
|
||||
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
|
||||
"TDMOUT_B IN 1", "FRDDR_B OUT 1",
|
||||
"TDMOUT_B IN 2", "FRDDR_C OUT 1",
|
||||
"TDM_B Playback", "TDMOUT_B OUT",
|
||||
+ "TDMOUT_C IN 0", "FRDDR_A OUT 2",
|
||||
+ "TDMOUT_C IN 1", "FRDDR_B OUT 2",
|
||||
+ "TDMOUT_C IN 2", "FRDDR_C OUT 2",
|
||||
+ "TDM_C Playback", "TDMOUT_C OUT",
|
||||
"TDMIN_A IN 4", "TDM_B Loopback",
|
||||
"TDMIN_B IN 4", "TDM_B Loopback",
|
||||
"TDMIN_C IN 4", "TDM_B Loopback",
|
||||
"TDMIN_LB IN 1", "TDM_B Loopback",
|
||||
+ "TDMIN_A IN 5", "TDM_C Loopback",
|
||||
+ "TDMIN_B IN 5", "TDM_C Loopback",
|
||||
+ "TDMIN_C IN 5", "TDM_C Loopback",
|
||||
+ "TDMIN_LB IN 2", "TDM_C Loopback",
|
||||
"TODDR_A IN 0", "TDMIN_A OUT",
|
||||
"TODDR_B IN 0", "TDMIN_A OUT",
|
||||
"TODDR_C IN 0", "TDMIN_A OUT",
|
||||
@@ -230,7 +249,11 @@
|
||||
"TODDR_C IN 2", "TDMIN_C OUT",
|
||||
"TODDR_A IN 6", "TDMIN_LB OUT",
|
||||
"TODDR_B IN 6", "TDMIN_LB OUT",
|
||||
- "TODDR_C IN 6", "TDMIN_LB OUT";
|
||||
+ "TODDR_C IN 6", "TDMIN_LB OUT",
|
||||
+ "U19 INL", "ACODEC LOLP",
|
||||
+ "U19 INR", "ACODEC LORP",
|
||||
+ "Lineout", "U19 OUTL",
|
||||
+ "Lineout", "U19 OUTR";
|
||||
|
||||
assigned-clocks = <&clkc CLKID_MPLL2>,
|
||||
<&clkc CLKID_MPLL0>,
|
||||
@@ -275,22 +298,56 @@
|
||||
dai-tdm-slot-tx-mask-3 = <1 1>;
|
||||
mclk-fs = <256>;
|
||||
|
||||
- codec {
|
||||
+ codec-0 {
|
||||
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
|
||||
};
|
||||
+
|
||||
+ codec-1 {
|
||||
+ sound-dai = <&toacodec TOACODEC_IN_B>;
|
||||
+ };
|
||||
};
|
||||
|
||||
- /* hdmi glue */
|
||||
+ /* i2s jack output interface */
|
||||
dai-link-7 {
|
||||
+ sound-dai = <&tdmif_c>;
|
||||
+ dai-format = "i2s";
|
||||
+ dai-tdm-slot-tx-mask-0 = <1 1>;
|
||||
+ mclk-fs = <256>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
|
||||
+ };
|
||||
+
|
||||
+ codec-1 {
|
||||
+ sound-dai = <&toacodec TOACODEC_IN_C>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ /* hdmi glue */
|
||||
+ dai-link-8 {
|
||||
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
|
||||
|
||||
codec {
|
||||
sound-dai = <&hdmi_tx>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ /* acodec glue */
|
||||
+ dai-link-9 {
|
||||
+ sound-dai = <&toacodec TOACODEC_OUT>;
|
||||
+
|
||||
+ codec {
|
||||
+ sound-dai = <&acodec>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
+&acodec {
|
||||
+ AVDD-supply = <&vddao_1v8>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&arb {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -505,6 +562,10 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tdmif_c {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&tdmin_a {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -525,6 +586,14 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tdmout_c {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&toacodec {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&tohdmitx {
|
||||
status = "okay";
|
||||
};
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<Envelope ovf:version="1.0" xml:lang="en-US" xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vbox="http://www.virtualbox.org/ovf/machine" xmlns:vmw="http://www.vmware.com/schema/ovf">
|
||||
<Envelope ovf:version="1.0" xml:lang="en-US" xmlns="http://schemas.dmtf.org/ovf/envelope/1" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData" xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:vbox="http://www.virtualbox.org/ovf/machine">
|
||||
<References>
|
||||
<File ovf:id="file1" ovf:href="home-assistant.vmdk"/>
|
||||
</References>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Product>Operating-System</Product>
|
||||
<ProductUrl>https://home-assistant.io</ProductUrl>
|
||||
</ProductSection>
|
||||
<OperatingSystemSection ovf:id="100" vmw:osType="other4xLinux64Guest">
|
||||
<OperatingSystemSection ovf:id="102" vmw:osType="otherLinux64Guest" ovf:required="false">
|
||||
<Info>The kind of installed guest operating system</Info>
|
||||
<Description>Linux</Description>
|
||||
</OperatingSystemSection>
|
||||
@@ -81,8 +81,8 @@
|
||||
<Item>
|
||||
<rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
|
||||
<rasd:Caption>eth0</rasd:Caption>
|
||||
<rasd:Connection>Bridged</rasd:Connection>
|
||||
<rasd:Description>Ethernet adapter</rasd:Description>
|
||||
<rasd:Connection>Bridged</rasd:Connection>
|
||||
<rasd:ElementName>eth0</rasd:ElementName>
|
||||
<rasd:InstanceID>6</rasd:InstanceID>
|
||||
<rasd:ResourceSubType>E1000</rasd:ResourceSubType>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From b8cabc02384390446cb7f2e34af07b44881246e3 Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 24 Apr 2020 22:03:34 +0000
|
||||
Subject: [PATCH 1/1] rpi-dts: allow uboot find serial
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
index 7e95601376d0..82a0ee0d5889 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -306,7 +306,7 @@
|
||||
};
|
||||
|
||||
uart0: serial@7e201000 {
|
||||
- compatible = "arm,pl011", "arm,primecell";
|
||||
+ compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
|
||||
reg = <0x7e201000 0x200>;
|
||||
interrupts = <2 25>;
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.50"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.39"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="x86_64"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@@ -47,7 +47,6 @@ BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8000=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8265=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_9XXX=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_I915=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_DT_UTILS=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
|
||||
@@ -21,8 +21,8 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.7"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/f2eb401e73e9b54432cf4234722cb4fad1b334f2.tar.gz"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
@@ -38,7 +38,6 @@ BR2_PACKAGE_JQ=y
|
||||
BR2_PACKAGE_E2FSPROGS=y
|
||||
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -56,6 +55,7 @@ BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
BR2_PACKAGE_DHCP_CLIENT=y
|
||||
BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y
|
||||
BR2_PACKAGE_DROPBEAR=y
|
||||
# BR2_PACKAGE_DROPBEAR_CLIENT is not set
|
||||
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
||||
@@ -88,7 +88,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-c2"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
|
||||
@@ -21,8 +21,8 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.7"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/40b58dcff55ee1046f6d69953b241ff27b92f749.tar.gz"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
@@ -38,7 +38,6 @@ BR2_PACKAGE_JQ=y
|
||||
BR2_PACKAGE_E2FSPROGS=y
|
||||
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -56,6 +55,7 @@ BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
BR2_PACKAGE_DHCP_CLIENT=y
|
||||
BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y
|
||||
BR2_PACKAGE_DROPBEAR=y
|
||||
# BR2_PACKAGE_DROPBEAR_CLIENT is not set
|
||||
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
||||
@@ -88,7 +88,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-n2"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
|
||||
@@ -22,9 +22,10 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.7"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="exynos"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/f2eb401e73e9b54432cf4234722cb4fad1b334f2.tar.gz"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-exynos.config"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
@@ -40,7 +41,6 @@ BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_MFC_V8=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -58,6 +58,7 @@ BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
BR2_PACKAGE_DHCP_CLIENT=y
|
||||
BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y
|
||||
BR2_PACKAGE_DROPBEAR=y
|
||||
# BR2_PACKAGE_DROPBEAR_CLIENT is not set
|
||||
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
||||
@@ -92,7 +93,7 @@ BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
|
||||
@@ -23,7 +23,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.50"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.39"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="x86_64"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@@ -37,7 +37,6 @@ BR2_PACKAGE_JQ=y
|
||||
BR2_PACKAGE_E2FSPROGS=y
|
||||
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_DT_UTILS=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi0-w $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/a03605b08ae73107100c72dc92c92adf0dde3e42.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@@ -41,7 +41,6 @@ BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -91,7 +90,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_0_w"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi2 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/a03605b08ae73107100c72dc92c92adf0dde3e42.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@@ -40,7 +40,6 @@ BR2_PACKAGE_E2FSPROGS=y
|
||||
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -90,12 +89,12 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_2"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
BR2_PACKAGE_HOST_MTOOLS=y
|
||||
BR2_PACKAGE_HOST_RAUC=y
|
||||
BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="armv7"
|
||||
BR2_PACKAGE_HASSIO_ARCH="armhf"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/a03605b08ae73107100c72dc92c92adf0dde3e42.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@@ -41,7 +41,6 @@ BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -91,7 +90,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_3"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot64.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/a03605b08ae73107100c72dc92c92adf0dde3e42.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2709"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@@ -41,7 +41,6 @@ BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -91,7 +90,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_3_32b"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/a03605b08ae73107100c72dc92c92adf0dde3e42.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@@ -42,7 +42,6 @@ BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
|
||||
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -92,7 +91,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_4"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot64.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/a03605b08ae73107100c72dc92c92adf0dde3e42.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@@ -42,7 +42,6 @@ BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
|
||||
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -92,7 +91,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_4_32b"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/a03605b08ae73107100c72dc92c92adf0dde3e42.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/c41ae7cf543c1d680b4ac1afae40ca5bb0a96661.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@@ -40,7 +40,6 @@ BR2_PACKAGE_E2FSPROGS=y
|
||||
BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
@@ -90,7 +89,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
|
||||
@@ -24,7 +24,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.50"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.39"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config"
|
||||
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config"
|
||||
@@ -42,7 +42,6 @@ BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
|
||||
BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE=y
|
||||
BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_UBOOT_TOOLS=y
|
||||
|
||||
@@ -41,5 +41,3 @@ CONFIG_CIFS_XATTR=y
|
||||
CONFIG_CIFS_POSIX=y
|
||||
CONFIG_CIFS_ACL=y
|
||||
CONFIG_CIFS_DFS_UPCALL=y
|
||||
|
||||
CONFIG_WIREGUARD=m
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
VERSION_MAJOR=4
|
||||
VERSION_BUILD=11
|
||||
VERSION_BUILD=6
|
||||
|
||||
HASSOS_NAME="HassOS"
|
||||
HASSOS_ID="hassos"
|
||||
|
||||
DEPLOYMENT="production"
|
||||
DEPLOYMENT="staging"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM debian:buster
|
||||
FROM ubuntu:18.04
|
||||
|
||||
# Set shell
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
@@ -10,11 +10,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
jq \
|
||||
gpg-agent \
|
||||
gpg \
|
||||
dirmngr \
|
||||
software-properties-common \
|
||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
|
||||
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
|
||||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
|
||||
&& add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
docker-ce docker-ce-cli containerd.io \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
[Unit]
|
||||
Description=QEMU Guest Agent
|
||||
After=syslog.target network.target
|
||||
ConditionVirtualization=|kvm
|
||||
ConditionVirtualization=|qemu
|
||||
ConditionVirtualization=kvm
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/libexec/qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0
|
||||
|
||||
@@ -11,9 +11,9 @@ StartLimitBurst=5
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
ExecStartPre=-/usr/bin/docker stop hassio_supervisor
|
||||
ExecStartPre=-/usr/bin/docker stop hassos_supervisor
|
||||
ExecStart=/usr/sbin/hassos-supervisor
|
||||
ExecStop=-/usr/bin/docker stop hassio_supervisor
|
||||
ExecStop=-/usr/bin/docker stop hassos_supervisor
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -21,20 +21,6 @@ OLD_DEVICE_CHILD="$(findfs LABEL="hassos-data")"
|
||||
OLD_DEVICE_ROOT="/dev/$(lsblk -no pkname "${OLD_DEVICE_CHILD}")"
|
||||
OLD_PART_NUM="${OLD_DEVICE_CHILD: -1}"
|
||||
|
||||
# Wait for devices
|
||||
timeout 90 \
|
||||
ash -c \
|
||||
"until [ -e \"${NEW_DEVICE_ROOT}\" ]; do sleep 5; done" \
|
||||
> /dev/null 2>&1 || true;
|
||||
|
||||
# Check if block device is exists
|
||||
if [ ! -b "${NEW_DEVICE_ROOT}" ]; then
|
||||
echo "[ERROR] No block device ${NEW_DEVICE_ROOT}!"
|
||||
exit 1
|
||||
fi
|
||||
echo "[INFO] Cleanup device ${NEW_DEVICE_ROOT}!"
|
||||
sgdisk -Z "${NEW_DEVICE_ROOT}"
|
||||
|
||||
# Create new partition
|
||||
echo "[INFO] Create new hassos-data partition"
|
||||
sgdisk -o "${NEW_DEVICE_ROOT}"
|
||||
@@ -65,7 +51,7 @@ if sfdisk -dq "${OLD_DEVICE_ROOT}" | grep -q 'label: gpt'; then
|
||||
sgdisk -v "${OLD_DEVICE_ROOT}"
|
||||
|
||||
else
|
||||
sfdisk --delete "${OLD_DEVICE_ROOT}" "${OLD_PART_NUM}" --force
|
||||
sfdisk --delete "${OLD_PART_NUM}" "${OLD_DEVICE_ROOT}" --force
|
||||
sfdisk -V "${OLD_DEVICE_ROOT}"
|
||||
fi
|
||||
|
||||
@@ -77,7 +63,6 @@ resize2fs -f "${NEW_DEVICE_CHILD}"
|
||||
|
||||
# Fix partition layout
|
||||
partx -d "${OLD_DEVICE_CHILD}"
|
||||
partx -u "${OLD_DEVICE_ROOT}"
|
||||
partx -u "${NEW_DEVICE_ROOT}"
|
||||
|
||||
echo "[INFO] Finish hassos data movement"
|
||||
|
||||
@@ -3,18 +3,12 @@
|
||||
# Run logging cli
|
||||
# ==============================================================================
|
||||
|
||||
# Run CLI container
|
||||
if [ "$(docker ps -q -f name=hassio_cli)" ]; then
|
||||
docker container exec \
|
||||
-ti hassio_cli \
|
||||
/usr/bin/cli.sh \
|
||||
docker container exec \
|
||||
-ti hassio_cli \
|
||||
/usr/bin/cli.sh \
|
||||
|
||||
# Jump to root login shell
|
||||
if [ $? -eq 10 ]; then
|
||||
/bin/ash -l
|
||||
fi
|
||||
else
|
||||
echo "[ERROR] Somethings going wrong! Jump into emergency console..."
|
||||
# Jump to root login shell
|
||||
if [ $? -eq 10 ]; then
|
||||
/bin/ash -l
|
||||
fi
|
||||
|
||||
|
||||
@@ -9,72 +9,16 @@ set -e
|
||||
. /etc/os-release
|
||||
|
||||
# Init supervisor
|
||||
SUPERVISOR_MIN_RUNTIME=15
|
||||
SUPERVISOR_IMAGE="homeassistant/${SUPERVISOR_ARCH}-hassio-supervisor"
|
||||
SUPERVISOR_DATA=/mnt/data/supervisor
|
||||
SUPERVISOR_IMAGE_ID=$(docker inspect --format='{{.Id}}' "${SUPERVISOR_IMAGE}" || echo "")
|
||||
SUPERVISOR_IMAGE_ID=$(docker inspect --format='{{.Id}}' "${SUPERVISOR_IMAGE}")
|
||||
SUPERVISOR_CONTAINER_ID=$(docker inspect --format='{{.Image}}' hassio_supervisor || echo "")
|
||||
|
||||
# Check if previous runtime of the container meets the minimal runtime
|
||||
# If not, we might be in trouble. Image or container corruption, bad release?
|
||||
# Delete the container, delete the image, pull a fresh one
|
||||
if [ -n "${SUPERVISOR_CONTAINER_ID}" ] && [ "${SUPERVISOR_IMAGE_ID}" = "${SUPERVISOR_CONTAINER_ID}" ]; then
|
||||
SUPERVISOR_START=$(docker inspect --format='{{.State.StartedAt}}' hassio_supervisor | sed -re "s/([-0-9]+)T([0-9\:]+).*/\1 \2/g")
|
||||
SUPERVISOR_STOP=$(docker inspect --format='{{.State.FinishedAt}}' hassio_supervisor | sed -re "s/([-0-9]+)T([0-9\:]+).*/\1 \2/g")
|
||||
|
||||
if [ -n "${SUPERVISOR_START}" ] && [ -n "${SUPERVISOR_STOP}" ]; then
|
||||
START=$(date --date="${SUPERVISOR_START}" +%s)
|
||||
STOP=$(date --date="${SUPERVISOR_STOP}" +%s)
|
||||
SUPERVISOR_RUNTIME=$((STOP-START))
|
||||
# Minimial runtime not met, remove container and image
|
||||
if [ "${SUPERVISOR_RUNTIME}" -lt "${SUPERVISOR_MIN_RUNTIME}" ]; then
|
||||
echo "[WARNING] Supervisor container exited too quickly, forcing a fresh image and container..."
|
||||
docker container rm --force hassio_supervisor || true
|
||||
SUPERVISOR_CONTAINER_ID=""
|
||||
docker rmi --force "${SUPERVISOR_IMAGE_ID}" || true
|
||||
SUPERVISOR_IMAGE_ID=""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# If Supervisor image is missing, pull it
|
||||
if [ -z "${SUPERVISOR_IMAGE_ID}" ]; then
|
||||
# Get the latest from update information
|
||||
# Using updater information instead of config. If the config version is
|
||||
# broken, this creates a way (e.g., bad release).
|
||||
SUPERVISOR_VERSION_UPDATER=$(jq -r '.version // empty' "${SUPERVISOR_DATA}/config.json" || echo "")
|
||||
SUPERVISOR_VERSION="${SUPERVISOR_VERSION_UPDATER:-latest}"
|
||||
|
||||
echo "[WARNING] Supervisor image missing, downloading a fresh one: ${SUPERVISOR_VERSION}"
|
||||
|
||||
# Pull in the Supervisor
|
||||
if docker pull "${SUPERVISOR_IMAGE}:${SUPERVISOR_VERSION}"; then
|
||||
# Tag as latest if versioned
|
||||
if [ "${SUPERVISOR_VERSION}" != "latest" ]; then
|
||||
docker tag "${SUPERVISOR_IMAGE}:${SUPERVISOR_VERSION}" "${SUPERVISOR_IMAGE}:latest"
|
||||
fi
|
||||
else
|
||||
# Pull failed, updater info might be corrupted, re-trying with latest
|
||||
echo "[WARNING] Supervisor downloading failed trying: latest"
|
||||
docker pull "${SUPERVISOR_IMAGE}:latest"
|
||||
fi
|
||||
|
||||
SUPERVISOR_IMAGE_ID=$(docker inspect --format='{{.Id}}' "${SUPERVISOR_IMAGE}" || echo "")
|
||||
fi
|
||||
|
||||
# Image changed, remove previous container
|
||||
if [ -n "${SUPERVISOR_CONTAINER_ID}" ] && [ "${SUPERVISOR_IMAGE_ID}" != "${SUPERVISOR_CONTAINER_ID}" ]; then
|
||||
echo "[INFO] Supervisor image has been updated, destroying previous container..."
|
||||
runSupervisor() {
|
||||
docker container rm --force hassio_supervisor || true
|
||||
SUPERVISOR_CONTAINER_ID=""
|
||||
fi
|
||||
|
||||
# If Supervisor container is missing, create it
|
||||
if [ -z "${SUPERVISOR_CONTAINER_ID}" ]; then
|
||||
echo "[INFO] Creating a new Supervisor container..."
|
||||
# shellcheck disable=SC2086
|
||||
docker container create \
|
||||
--name hassio_supervisor \
|
||||
docker container run --name hassio_supervisor \
|
||||
--privileged --security-opt apparmor="hassio-supervisor" \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /var/run/dbus:/var/run/dbus \
|
||||
@@ -83,10 +27,9 @@ if [ -z "${SUPERVISOR_CONTAINER_ID}" ]; then
|
||||
-e SUPERVISOR_SHARE=${SUPERVISOR_DATA} \
|
||||
-e SUPERVISOR_NAME=hassio_supervisor \
|
||||
-e SUPERVISOR_MACHINE=${SUPERVISOR_MACHINE} \
|
||||
"${SUPERVISOR_IMAGE}:latest"
|
||||
fi
|
||||
"${SUPERVISOR_IMAGE}"
|
||||
}
|
||||
|
||||
# Run supervisor
|
||||
mkdir -p ${SUPERVISOR_DATA}
|
||||
echo "[INFO] Starting the Supervisor..."
|
||||
exec docker container start --attach hassio_supervisor
|
||||
([ "${SUPERVISOR_IMAGE_ID}" = "${SUPERVISOR_CONTAINER_ID}" ] && docker container start --attach hassio_supervisor) || runSupervisor
|
||||
|
||||
@@ -16,7 +16,7 @@ index 59ab1da0c6..e3ba1bf99c 100644
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed
|
||||
-sha256 31a84340be08be319570a9d1439f25c0e3513fed73065a56aa5dd61dd605d5d9 rpi-firmware-01ecfd2ba2b7cf3a2f4aa75ada895ee4a3e729f5.tar.gz
|
||||
+sha256 4789d4422b3bc7eab157471ba36aebd54efc2a6de4c937f5cfdb4392af04fe80 rpi-firmware-7caead9416f64b2d33361c703fb243b8e157eba4.tar.gz
|
||||
+sha256 77ad450dd7cabb58ca04a18fd704844df6e642374346cf006a07edca46615af1 rpi-firmware-7eff9f6774bb43bfd61e749a0b45ffddc98c2311.tar.gz
|
||||
sha256 c7283ff51f863d93a275c66e3b4cb08021a5dd4d8c1e7acc47d872fbe52d3d6b boot/LICENCE.broadcom
|
||||
diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk
|
||||
index 6fee60b08c..2177ca9859 100644
|
||||
@@ -27,7 +27,7 @@ index 6fee60b08c..2177ca9859 100644
|
||||
################################################################################
|
||||
|
||||
-RPI_FIRMWARE_VERSION = 01ecfd2ba2b7cf3a2f4aa75ada895ee4a3e729f5
|
||||
+RPI_FIRMWARE_VERSION = 7caead9416f64b2d33361c703fb243b8e157eba4
|
||||
+RPI_FIRMWARE_VERSION = 7eff9f6774bb43bfd61e749a0b45ffddc98c2311
|
||||
RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION))
|
||||
RPI_FIRMWARE_LICENSE = BSD-3-Clause
|
||||
RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From aec12d6fc55c1c444ff9d226ec4748d27673c8a2 Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Thu, 7 May 2020 09:02:05 +0000
|
||||
Subject: [PATCH 1/1] docker-proxy: Bump version
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
package/docker-proxy/docker-proxy.hash | 2 +-
|
||||
package/docker-proxy/docker-proxy.mk | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/package/docker-proxy/docker-proxy.hash b/package/docker-proxy/docker-proxy.hash
|
||||
index 58de697929..1416db4042 100644
|
||||
--- a/package/docker-proxy/docker-proxy.hash
|
||||
+++ b/package/docker-proxy/docker-proxy.hash
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally calculated
|
||||
-sha256 866c8d196b9396a383b437b0d775476459ed7c11f527c4f6bbf1fd08524b461d docker-proxy-55685ba49593e67f5e1c8180539379b16736c25e.tar.gz
|
||||
+sha256 2e1fdcc401a22d53103be6cfb5475c40af9f9a82a996ec6d508e0994dc2c5e4a docker-proxy-1ea375d2b54d2e914e41970a04553ad55ef39b62.tar.gz
|
||||
sha256 cb5e8e7e5f4a3988e1063c142c60dc2df75605f4c46515e776e3aca6df976e14 LICENSE
|
||||
diff --git a/package/docker-proxy/docker-proxy.mk b/package/docker-proxy/docker-proxy.mk
|
||||
index 8843266c30..1ab84159d1 100644
|
||||
--- a/package/docker-proxy/docker-proxy.mk
|
||||
+++ b/package/docker-proxy/docker-proxy.mk
|
||||
@@ -4,8 +4,8 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
-DOCKER_PROXY_VERSION = 55685ba49593e67f5e1c8180539379b16736c25e
|
||||
-DOCKER_PROXY_SITE = $(call github,docker,libnetwork,$(DOCKER_PROXY_VERSION))
|
||||
+DOCKER_PROXY_VERSION = 1ea375d2b54d2e914e41970a04553ad55ef39b62
|
||||
+DOCKER_PROXY_SITE = $(call github,moby,libnetwork,$(DOCKER_PROXY_VERSION))
|
||||
|
||||
DOCKER_PROXY_LICENSE = Apache-2.0
|
||||
DOCKER_PROXY_LICENSE_FILES = LICENSE
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
From e36dc9a2a030204b5b6c6868348878b596f88de3 Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Fri, 5 Jun 2020 14:18:26 +0000
|
||||
Subject: [PATCH 1/1] Linux 5.7
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
package/linux-headers/Config.in.host | 4 ++++
|
||||
toolchain/Config.in | 5 +++++
|
||||
.../toolchain-external-custom/Config.in.options | 4 ++++
|
||||
3 files changed, 13 insertions(+)
|
||||
|
||||
diff --git a/package/linux-headers/Config.in.host b/package/linux-headers/Config.in.host
|
||||
index 95e85a00..88b9ff99 100644
|
||||
--- a/package/linux-headers/Config.in.host
|
||||
+++ b/package/linux-headers/Config.in.host
|
||||
@@ -127,6 +127,10 @@ choice
|
||||
If your kernel headers are more recent than the latest version
|
||||
in the choice, then select the latest version.
|
||||
|
||||
+config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7
|
||||
+ bool "5.7.x or later"
|
||||
+ select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7
|
||||
+
|
||||
config BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4
|
||||
bool "5.4.x or later"
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
|
||||
diff --git a/toolchain/Config.in b/toolchain/Config.in
|
||||
index bff57280..c07a92ce 100644
|
||||
--- a/toolchain/Config.in
|
||||
+++ b/toolchain/Config.in
|
||||
@@ -470,6 +470,10 @@ config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3
|
||||
select BR2_TOOLCHAIN_HEADERS_LATEST
|
||||
|
||||
+config BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7
|
||||
+ bool
|
||||
+ select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
|
||||
+
|
||||
# This should be selected by the latest version, above, to indicate that
|
||||
# Buildroot does not know of more recent headers than the ones selected.
|
||||
# This allows using toolchains with headers more recent than Buildroot
|
||||
@@ -481,6 +485,7 @@ config BR2_TOOLCHAIN_HEADERS_LATEST
|
||||
# stops affecting a value on the first matching default.
|
||||
config BR2_TOOLCHAIN_HEADERS_AT_LEAST
|
||||
string
|
||||
+ default "5.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7
|
||||
default "5.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
|
||||
default "5.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_3
|
||||
default "5.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
|
||||
diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
|
||||
index 8c38dd9f..b49231e1 100644
|
||||
--- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
|
||||
+++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
|
||||
@@ -115,6 +115,10 @@ choice
|
||||
If your toolchain uses headers newer than the latest version
|
||||
in the choice, then select the latest version.
|
||||
|
||||
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_7
|
||||
+ bool "5.7.x or later"
|
||||
+ select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_7
|
||||
+
|
||||
config BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_4
|
||||
bool "5.4.x or later"
|
||||
select BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_4
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
From 40e0bf4c0c36970f8e94591fdb0a5a8910bf9859 Mon Sep 17 00:00:00 2001
|
||||
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
Date: Tue, 12 May 2020 22:33:53 +0200
|
||||
Subject: [PATCH 1/1] linux: forcibly disable use of gcc plugins
|
||||
|
||||
The soon-to-be-released linux 5.7 has changed the way it detects the
|
||||
ability of gcc to use plugins, when it dropped support for gcc 4.7 or
|
||||
older [0].
|
||||
|
||||
To detect the ability to use gcc plugins, the kernel has to check
|
||||
whether the host gcc is capable enough to build them.
|
||||
|
||||
When we call one of the configurator for the Linux kernel, we explicitly
|
||||
pass a value of HOSTCC=$(HOSTCC_NOCCACHE), because there might be a
|
||||
discrepancy between the ncurses headers and libraries as found by the
|
||||
Linux kconfig build [1] [2].
|
||||
|
||||
But then, when we build the kernel, we pass another value to use [3]
|
||||
HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)" which boils down to
|
||||
roughly: gcc -I.../host/include -L.../host/lib -Wl,-rpath,.../host/lib
|
||||
This is needed so that at build time, the kernel can build host tools
|
||||
that link with our openssl et al.
|
||||
|
||||
So, the two HOSTCC we pass to the kernel may have different behaviours.
|
||||
For example, on a machine where gmp is missing in the system, it is
|
||||
available in $(O)/host/ when using an internal toolchain (and under a
|
||||
few other conditions).
|
||||
|
||||
In that case, when configuring the kernel, it decides that the host
|
||||
compiler can't build plugins, so the dependencies of CONFIG_GCC_PLUGINS
|
||||
are not met, and that option is not present in the linux' .config file
|
||||
(neither as "=y" nor as "is not set"). But then, when we build the
|
||||
kernel, the host compiler suddenly becomes capable of building the
|
||||
plugins, and the internal syncconfig run by the kernel will notice that
|
||||
the dependencies of CONFIG_GCC_PLUGINS are now met, and that the user
|
||||
shall decide on its value. And this blocks a build on an interactive
|
||||
console (abbreviated):
|
||||
|
||||
* Restart config...
|
||||
* GCC plugins
|
||||
GCC plugins (GCC_PLUGINS) [Y/n/?] (NEW) _
|
||||
|
||||
But most problematic is the behaviour when run in a shell that is not
|
||||
interactiove (e.g. a CI job or such) (abbreviated):
|
||||
|
||||
* Restart config...
|
||||
* GCC plugins
|
||||
GCC plugins (GCC_PLUGINS) [Y/n/?] (NEW)
|
||||
Error in reading or end of file.
|
||||
Generate some entropy during boot and runtime (GCC_PLUGIN_LATENT_ENTROPY) [N/y/?] (NEW)
|
||||
Error in reading or end of file.
|
||||
Randomize layout of sensitive kernel structures (GCC_PLUGIN_RANDSTRUCT) [N/y/?] (NEW)
|
||||
Error in reading or end of file.
|
||||
* Memory initialization
|
||||
Initialize kernel stack variables at function entry
|
||||
> 1. no automatic initialization (weakest) (INIT_STACK_NONE)
|
||||
2. zero-init structs marked for userspace (weak) (GCC_PLUGIN_STRUCTLEAK_USER) (NEW)
|
||||
3. zero-init structs passed by reference (strong) (GCC_PLUGIN_STRUCTLEAK_BYREF) (NEW)
|
||||
4. zero-init anything passed by reference (very strong) (GCC_PLUGIN_STRUCTLEAK_BYREF_ALL) (NEW)
|
||||
choice[1-4?]:
|
||||
Error in reading or end of file.
|
||||
Poison kernel stack before returning from syscalls (GCC_PLUGIN_STACKLEAK) [N/y/?] (NEW)
|
||||
Error in reading or end of file.
|
||||
Enable heap memory zeroing on allocation by default (INIT_ON_ALLOC_DEFAULT_ON) [N/y/?] n
|
||||
Enable heap memory zeroing on free by default (INIT_ON_FREE_DEFAULT_ON) [N/y/?] n
|
||||
|
||||
The most obvious and simple solution would be to unconditionally disable
|
||||
gcc plugins altogether, in the KCONFIG_FIXUP hook. But that can't work
|
||||
either, because after applying the fixups, we call olddefconfig (or the
|
||||
likes) with the incapable HOSTCC, so the disabled option would be removed
|
||||
anyway, and we'd be back to square one.
|
||||
|
||||
So, in addition to the above, we also forcibly hack the same call just
|
||||
before actually building the kernel.
|
||||
|
||||
Note that the two are needed: the one in the fixups is needed for those
|
||||
that have a system that already allows building gcc plugins, and the
|
||||
second is needed in the other case, where the system does not allow it
|
||||
but would work with our additional headers and libs in $(O)/host/. The
|
||||
two ensure there is a very similar experience in the two situations.
|
||||
|
||||
Forcibly disabling the use of gcc plugins is not a regression on our
|
||||
side: it has never been possible to do so so far. We're now making sure
|
||||
that can't work by accident.
|
||||
|
||||
Reported-by: Ganesh <ganesh45in@gmail.com>,
|
||||
Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
Cc: Michael Walle <michael.walle@kontron.com>
|
||||
Cc: Peter Korsgaard <peter@korsgaard.com>
|
||||
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Cc: Arnout Vandecappelle <arnout@mind.be>
|
||||
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
linux/linux.mk | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/buildroot/linux/linux.mk b/buildroot/linux/linux.mk
|
||||
index ae1edbeb..5a1cb42e 100644
|
||||
--- a/buildroot/linux/linux.mk
|
||||
+++ b/buildroot/linux/linux.mk
|
||||
@@ -408,6 +408,7 @@ define LINUX_KCONFIG_FIXUP_CMDS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FB,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224,$(@D)/.config))
|
||||
+ $(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS,$(@D)/.config)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
|
||||
@@ -467,7 +468,10 @@ endif
|
||||
# '$(LINUX_TARGET_NAME)' targets separately because calling them in
|
||||
# the same $(MAKE) invocation has shown to cause parallel build
|
||||
# issues.
|
||||
+# The call to disable gcc-plugins is a stop-gap measure:
|
||||
+# http://lists.busybox.net/pipermail/buildroot/2020-May/282727.html
|
||||
define LINUX_BUILD_CMDS
|
||||
+ $(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS,$(@D)/.config)
|
||||
$(foreach dts,$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)), \
|
||||
cp -f $(dts) $(LINUX_ARCH_PATH)/boot/dts/
|
||||
)
|
||||
--
|
||||
2.17.1
|
||||
@@ -1,37 +0,0 @@
|
||||
From e7becf35dd9d78fd7be773c765904cea1199ad14 Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Sat, 6 Jun 2020 22:51:33 +0000
|
||||
Subject: [PATCH 1/1] Bump wireguard-linux-compat
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
package/wireguard-linux-compat/wireguard-linux-compat.hash | 2 +-
|
||||
package/wireguard-linux-compat/wireguard-linux-compat.mk | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/package/wireguard-linux-compat/wireguard-linux-compat.hash b/package/wireguard-linux-compat/wireguard-linux-compat.hash
|
||||
index d308f47a13..6835f98d09 100644
|
||||
--- a/package/wireguard-linux-compat/wireguard-linux-compat.hash
|
||||
+++ b/package/wireguard-linux-compat/wireguard-linux-compat.hash
|
||||
@@ -1,4 +1,4 @@
|
||||
# https://lists.zx2c4.com/pipermail/wireguard/2020-April/005296.html
|
||||
-sha256 cf166348fbb67419528e73049ce001d29131aea367fa6aef9d3e223f7251e116 wireguard-linux-compat-1.0.20200413.tar.xz
|
||||
+sha256 16e7ae4bef734b243428eea07f3b3c3d4721880c3ea8eb8f98628fd6ae5b77c3 wireguard-linux-compat-1.0.20200520.tar.xz
|
||||
# Locally calculated
|
||||
sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
|
||||
diff --git a/package/wireguard-linux-compat/wireguard-linux-compat.mk b/package/wireguard-linux-compat/wireguard-linux-compat.mk
|
||||
index 6d90245bd2..c6d79f59f9 100644
|
||||
--- a/package/wireguard-linux-compat/wireguard-linux-compat.mk
|
||||
+++ b/package/wireguard-linux-compat/wireguard-linux-compat.mk
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
-WIREGUARD_LINUX_COMPAT_VERSION = 1.0.20200413
|
||||
+WIREGUARD_LINUX_COMPAT_VERSION = 1.0.20200520
|
||||
WIREGUARD_LINUX_COMPAT_SITE = https://git.zx2c4.com/wireguard-linux-compat/snapshot
|
||||
WIREGUARD_LINUX_COMPAT_SOURCE = wireguard-linux-compat-$(WIREGUARD_LINUX_COMPAT_VERSION).tar.xz
|
||||
WIREGUARD_LINUX_COMPAT_LICENSE = GPL-2.0
|
||||
--
|
||||
2.17.1
|
||||
|
||||
5
buildroot/.br2-external.in.jpeg
Normal file
5
buildroot/.br2-external.in.jpeg
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
#
|
||||
|
||||
# No br2-external tree defined.
|
||||
5
buildroot/.br2-external.in.menus
Normal file
5
buildroot/.br2-external.in.menus
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
#
|
||||
|
||||
# No br2-external tree defined.
|
||||
5
buildroot/.br2-external.in.openssl
Normal file
5
buildroot/.br2-external.in.openssl
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
#
|
||||
|
||||
# No br2-external tree defined.
|
||||
5
buildroot/.br2-external.in.paths
Normal file
5
buildroot/.br2-external.in.paths
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
#
|
||||
|
||||
# No br2-external tree defined.
|
||||
5
buildroot/.br2-external.in.toolchains
Normal file
5
buildroot/.br2-external.in.toolchains
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
#
|
||||
|
||||
# No br2-external tree defined.
|
||||
10
buildroot/.br2-external.mk
Normal file
10
buildroot/.br2-external.mk
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
#
|
||||
|
||||
BR2_EXTERNAL ?=
|
||||
BR2_EXTERNAL_NAMES =
|
||||
BR2_EXTERNAL_DIRS =
|
||||
BR2_EXTERNAL_MKS =
|
||||
|
||||
# No br2-external tree defined.
|
||||
@@ -1,45 +1,3 @@
|
||||
2020.02.2, released May 12th, 2020
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
Musl: Disallow on PPC64 cores without AltiVec support
|
||||
(E.G. e5500).
|
||||
|
||||
fs/cpio: Correctly handle booting with 'console='
|
||||
|
||||
release: Ensure temporary .br2-external.* files are not
|
||||
included in the release tarball
|
||||
|
||||
Defconfigs: Fix various mistyped config options, or config
|
||||
options where the dependencies were no longer met.
|
||||
|
||||
Updated/fixed packages: apache, azure-iot-sdk-c, binutils,
|
||||
boinc, c-ares, cvs, docker-cli, docker-containerd,
|
||||
docker-engine, domoticz, e2fsprogs, efl, evtest, exim, ffmpeg,
|
||||
freerdp, gcc, gflags, glibc, gnuconfig, haproxy, imx-gpu-2d,
|
||||
irrlicht, jpeg kodi-pvr-vuplus, libarchive, libcoap,
|
||||
libfpm-extra, libglib2, libhtp, libid3tag, libinput, libmad,
|
||||
libopenssl, libsepol, libssh, libv4l, libvncserver, libwpe,
|
||||
localedef, mariadb, matchbox, mbedtls, mc, mesa3d-headers,
|
||||
meson, midori, msgpack, netsnmp, nginx, ogre, openjdk,
|
||||
openldap, openvpn, p7zip, paho-mqtt-c, php, polkit, python,
|
||||
python-attrs, python-crossbar, python-dpkt, python-flask,
|
||||
python-future, python-iptables, python-jedi, python-markdown2,
|
||||
python3, qemu, qpdf, qt5, samba4, squashfs, squid, strongswan,
|
||||
suricata, tzdata, util-linux, vlc, wget, webkitgtk,
|
||||
wireguard-linux-compat, wireshark, wpebackend-fdo, wpewebkit,
|
||||
zic
|
||||
|
||||
Issues resolved (http://bugs.uclibc.org):
|
||||
|
||||
#11866: initramfs file system fails to boot using Grub on EFI x86_64
|
||||
#12271: python-iptables runtime dependencies
|
||||
#12726: systemctl preset-all failed for ctrl-alt-del.target
|
||||
#12751: OpenJdk package installation issues on target
|
||||
#12796: Update OpenSSL to Version 1.1.1g to patch CVE-2020-1967
|
||||
#12811: bootstrap stuck and no login prompt
|
||||
#12841: util-linux/sfdisk 2.35.1 fails on sector-size header
|
||||
|
||||
2020.02.1, released April 10th, 2020
|
||||
|
||||
Important / security related fixes.
|
||||
|
||||
@@ -484,12 +484,18 @@ F: package/sunxi-boards/
|
||||
|
||||
N: Carlos Santos <unixmania@gmail.com>
|
||||
F: package/busybox/
|
||||
F: package/cups/
|
||||
F: package/cups-filters/
|
||||
F: package/gtest/
|
||||
F: package/initscripts/
|
||||
F: package/intel-microcode/
|
||||
F: package/libpam-radius-auth/
|
||||
F: package/libpam-tacplus/
|
||||
F: package/liburiparser/
|
||||
F: package/modem-manager/
|
||||
F: package/pamtester/
|
||||
F: package/pcm-tools/
|
||||
F: package/perl-file-util/
|
||||
F: package/skeleton-custom/
|
||||
F: package/skeleton-init-common/
|
||||
F: package/skeleton-init-none/
|
||||
@@ -670,7 +676,7 @@ F: linux/linux-ext-ev3dev-linux-drivers.mk
|
||||
F: package/brickd/
|
||||
F: package/ev3dev-linux-drivers/
|
||||
|
||||
N: Davide Viti <zinosat@gmail.com>
|
||||
N: Davide Viti <zinosat@tiscali.it>
|
||||
F: package/flann/
|
||||
F: package/python-paho-mqtt/
|
||||
F: package/qhull/
|
||||
@@ -2084,6 +2090,9 @@ F: package/libfreeimage/
|
||||
N: Renaud Aubin <root@renaud.io>
|
||||
F: package/libhttpparser/
|
||||
|
||||
N: Rhys Williams <github@wilberforce.co.nz>
|
||||
F: package/lirc-tools/
|
||||
|
||||
N: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
|
||||
F: package/atop/
|
||||
F: package/thermald/
|
||||
|
||||
@@ -92,9 +92,9 @@ all:
|
||||
.PHONY: all
|
||||
|
||||
# Set and export the version string
|
||||
export BR2_VERSION := 2020.02.2
|
||||
export BR2_VERSION := 2020.02.1
|
||||
# Actual time the release is cut (for reproducible builds)
|
||||
BR2_VERSION_EPOCH = 1589285000
|
||||
BR2_VERSION_EPOCH = 1586551000
|
||||
|
||||
# Save running make version since it's clobbered by the make package
|
||||
RUNNING_MAKE_VERSION := $(MAKE_VERSION)
|
||||
@@ -1189,7 +1189,7 @@ release: OUT = buildroot-$(BR2_VERSION)
|
||||
release:
|
||||
git archive --format=tar --prefix=$(OUT)/ HEAD > $(OUT).tar
|
||||
$(MAKE) O=$(OUT) manual-html manual-text manual-pdf
|
||||
$(MAKE) O=$(OUT) distclean
|
||||
$(MAKE) O=$(OUT) clean
|
||||
tar rf $(OUT).tar $(OUT)
|
||||
gzip -9 -c < $(OUT).tar > $(OUT).tar.gz
|
||||
bzip2 -9 -c < $(OUT).tar > $(OUT).tar.bz2
|
||||
|
||||
176
buildroot/board/hardkernel/odroidc2/boot.ini
Normal file
176
buildroot/board/hardkernel/odroidc2/boot.ini
Normal file
@@ -0,0 +1,176 @@
|
||||
ODROIDC2-UBOOT-CONFIG
|
||||
|
||||
########################################################################
|
||||
# Changes made to this are overwritten every time there's a new upgrade
|
||||
# To make your changes permanent change it on
|
||||
# boot.ini.default
|
||||
# After changing it on boot.ini.default run the bootini command to
|
||||
# rewrite this file with your personal permanent settings.
|
||||
# Documentation: http://odroid.com/dokuwiki/doku.php?id=en:c2_persistent_bootini
|
||||
########################################################################
|
||||
|
||||
# Possible screen resolutions
|
||||
# Uncomment only a single Line! The line with setenv written.
|
||||
# At least one mode must be selected.
|
||||
|
||||
# Custom modeline!
|
||||
# To use custom modeline you need to disable all the below resolutions
|
||||
# and setup your own!
|
||||
# For more information check our wiki:
|
||||
# http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting
|
||||
# Example below:
|
||||
# setenv m "custombuilt"
|
||||
# setenv modeline "1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1"
|
||||
|
||||
# 480 Lines (720x480)
|
||||
# setenv m "480i60hz" # Interlaced 60Hz
|
||||
# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
|
||||
# setenv m "480p60hz" # 480 Progressive 60Hz
|
||||
# setenv m "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz
|
||||
|
||||
# 576 Lines (720x576)
|
||||
# setenv m "576i50hz" # Interlaced 50Hz
|
||||
# setenv m "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz
|
||||
# setenv m "576p50hz" # Progressive 50Hz
|
||||
# setenv m "576p_rpt" # Progressive for Rear Projection Televisions 50Hz
|
||||
|
||||
# 720 Lines (1280x720)
|
||||
# setenv m "720p50hz" # 50Hz
|
||||
# setenv m "720p60hz" # 60Hz
|
||||
|
||||
# 1080 Lines (1920x1080)
|
||||
# setenv m "1080i60hz" # Interlaced 60Hz
|
||||
setenv m "1080p60hz" # Progressive 60Hz
|
||||
# setenv m "1080i50hz" # Interlaced 50Hz
|
||||
# setenv m "1080p50hz" # Progressive 50Hz
|
||||
# setenv m "1080p24hz" # Progressive 24Hz
|
||||
|
||||
# 4K (3840x2160)
|
||||
# setenv m "2160p30hz" # Progressive 30Hz
|
||||
# setenv m "2160p25hz" # Progressive 25Hz
|
||||
# setenv m "2160p24hz" # Progressive 24Hz
|
||||
# setenv m "smpte24hz" # Progressive 24Hz SMPTE
|
||||
# setenv m "2160p50hz" # Progressive 50Hz
|
||||
# setenv m "2160p60hz" # Progressive 60Hz
|
||||
# setenv m "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
|
||||
# setenv m "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
|
||||
|
||||
### VESA modes ###
|
||||
# setenv m "640x480p60hz"
|
||||
# setenv m "800x480p60hz"
|
||||
# setenv m "480x800p60hz"
|
||||
# setenv m "800x600p60hz"
|
||||
# setenv m "1024x600p60hz"
|
||||
# setenv m "1024x768p60hz"
|
||||
# setenv m "1280x800p60hz"
|
||||
# setenv m "1280x1024p60hz"
|
||||
# setenv m "1360x768p60hz"
|
||||
# setenv m "1440x900p60hz"
|
||||
# setenv m "1600x900p60hz"
|
||||
# setenv m "1680x1050p60hz"
|
||||
# setenv m "1600x1200p60hz"
|
||||
# setenv m "1920x1200p60hz"
|
||||
# setenv m "2560x1080p60hz"
|
||||
# setenv m "2560x1440p60hz"
|
||||
# setenv m "2560x1600p60hz"
|
||||
# setenv m "3440x1440p60hz"
|
||||
|
||||
# HDMI BPP Mode
|
||||
setenv m_bpp "32"
|
||||
# setenv m_bpp "24"
|
||||
# setenv m_bpp "16"
|
||||
|
||||
# HDMI DVI/VGA modes
|
||||
# By default its set to HDMI, if needed change below.
|
||||
# Uncomment only a single Line.
|
||||
# setenv vout "dvi"
|
||||
# setenv vout "vga"
|
||||
|
||||
# HDMI HotPlug Detection control
|
||||
# Allows you to force HDMI thinking that the cable is connected.
|
||||
# true = HDMI will believe that cable is always connected
|
||||
# false = will let board/monitor negotiate the connection status
|
||||
setenv hpd "true"
|
||||
# setenv hpd "false"
|
||||
|
||||
# Monitor output
|
||||
# Controls if HDMI PHY should output anything to the monitor
|
||||
setenv monitor_onoff "false" # true or false
|
||||
|
||||
# Server Mode (aka. No Graphics)
|
||||
# Setting nographics to 1 will disable all video subsystem
|
||||
# This mode is ideal of server type usage. (Saves ~300Mb of RAM)
|
||||
setenv nographics "0"
|
||||
|
||||
# Meson Timer
|
||||
# 1 - Meson Timer
|
||||
# 0 - Arch Timer
|
||||
# Using meson_timer improves the video playback however it breaks KVM (virtualization).
|
||||
# Using arch timer allows KVM/Virtualization to work however you'll experience poor video
|
||||
setenv mesontimer "1"
|
||||
|
||||
# UHS (Ultra High Speed) MicroSD mode enable/disable
|
||||
setenv disableuhs "false"
|
||||
|
||||
# MicroSD Card Detection enable/disable
|
||||
# Force the MMC controlled to believe that a card is connected.
|
||||
setenv mmc_removable "true"
|
||||
|
||||
# USB Multi WebCam tweak
|
||||
# Only enable this if you use it.
|
||||
setenv usbmulticam "false"
|
||||
|
||||
# Default Console Device Setting
|
||||
setenv condev "console=ttyS0,115200n8 console=tty0" # on both
|
||||
|
||||
# CPU Frequency / Cores control
|
||||
###########################################
|
||||
### WARNING!!! WARNING!!! WARNING!!!
|
||||
# Before changing anything here please read the wiki entry:
|
||||
# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq
|
||||
#
|
||||
# MAX CPU's
|
||||
# setenv maxcpus "1"
|
||||
# setenv maxcpus "2"
|
||||
# setenv maxcpus "3"
|
||||
setenv maxcpus "4"
|
||||
|
||||
# MAX Frequency
|
||||
# setenv max_freq "2016" # 2.016GHz
|
||||
# setenv max_freq "1944" # 1.944GHz
|
||||
# setenv max_freq "1944" # 1.944GHz
|
||||
# setenv max_freq "1920" # 1.920GHz
|
||||
# setenv max_freq "1896" # 1.896GHz
|
||||
# setenv max_freq "1752" # 1.752GHz
|
||||
# setenv max_freq "1680" # 1.680GHz
|
||||
# setenv max_freq "1656" # 1.656GHz
|
||||
setenv max_freq "1536" # 1.536GHz
|
||||
|
||||
|
||||
|
||||
###########################################
|
||||
|
||||
# Boot Arguments
|
||||
if test "${m}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi
|
||||
|
||||
setenv bootargs "root=/dev/mmcblk0p2 rootwait ro ${condev} no_console_suspend hdmimode=${m} ${cmode} m_bpp=${m_bpp} vout=${vout} fsck.repair=yes net.ifnames=0 elevator=noop disablehpd=${hpd} max_freq=${max_freq} maxcpus=${maxcpus} monitor_onoff=${monitor_onoff} disableuhs=${disableuhs} mmc_removable=${mmc_removable} usbmulticam=${usbmulticam}"
|
||||
|
||||
# Booting
|
||||
|
||||
setenv loadaddr "0x11000000"
|
||||
setenv dtb_loadaddr "0x1000000"
|
||||
setenv initrd_loadaddr "0x13000000"
|
||||
|
||||
fatload mmc 0:1 ${loadaddr} Image
|
||||
fatload mmc 0:1 ${dtb_loadaddr} meson64_odroidc2.dtb
|
||||
fdt addr ${dtb_loadaddr}
|
||||
|
||||
if test "${mesontimer}" = "0"; then fdt rm /meson_timer; fdt rm /cpus/cpu@0/timer; fdt rm /cpus/cpu@1/timer; fdt rm /cpus/cpu@2/timer; fdt rm /cpus/cpu@3/timer; fi
|
||||
if test "${mesontimer}" = "1"; then fdt rm /timer; fi
|
||||
|
||||
if test "${nographics}" = "1"; then fdt rm /reserved-memory; fdt rm /aocec; fi
|
||||
if test "${nographics}" = "1"; then fdt rm /meson-fb; fdt rm /amhdmitx; fdt rm /picdec; fdt rm /ppmgr; fi
|
||||
if test "${nographics}" = "1"; then fdt rm /meson-vout; fdt rm /mesonstream; fdt rm /meson-fb; fi
|
||||
if test "${nographics}" = "1"; then fdt rm /deinterlace; fdt rm /codec_mm; fi
|
||||
|
||||
booti ${loadaddr} - ${dtb_loadaddr}
|
||||
27
buildroot/board/hardkernel/odroidc2/genimage.cfg
Normal file
27
buildroot/board/hardkernel/odroidc2/genimage.cfg
Normal file
@@ -0,0 +1,27 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"boot.ini",
|
||||
"Image",
|
||||
"meson64_odroidc2.dtb"
|
||||
}
|
||||
}
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition vfat {
|
||||
partition-type = 0xC
|
||||
image = "boot.vfat"
|
||||
offset = 1048576
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
19
buildroot/board/hardkernel/odroidc2/post-image.sh
Executable file
19
buildroot/board/hardkernel/odroidc2/post-image.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
|
||||
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
|
||||
cp ${BOARD_DIR}/boot.ini ${BINARIES_DIR}/
|
||||
|
||||
rm -rf "${GENIMAGE_TMP}"
|
||||
|
||||
genimage \
|
||||
--rootpath "${TARGET_DIR}" \
|
||||
--tmppath "${GENIMAGE_TMP}" \
|
||||
--inputpath "${BINARIES_DIR}" \
|
||||
--outputpath "${BINARIES_DIR}" \
|
||||
--config "${GENIMAGE_CFG}"
|
||||
|
||||
dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=1 count=442 conv=sync,notrunc
|
||||
dd if=${BINARIES_DIR}/u-boot.bin of=${BINARIES_DIR}/sdcard.img bs=512 skip=1 seek=1 conv=fsync,notrunc
|
||||
53
buildroot/board/hardkernel/odroidc2/readme.txt
Normal file
53
buildroot/board/hardkernel/odroidc2/readme.txt
Normal file
@@ -0,0 +1,53 @@
|
||||
ODROID-C2
|
||||
|
||||
Intro
|
||||
=====
|
||||
To be able to use ODROID-C2 board with the images generated by
|
||||
Buildroot, you have to prepare the SDCard or eMMC.
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
$ make odroidc2_defconfig
|
||||
|
||||
Then you can edit the build options using
|
||||
|
||||
$ make menuconfig
|
||||
|
||||
Compile all and build rootfs image:
|
||||
|
||||
$ make
|
||||
|
||||
Note: you will need to have access to the network, since Buildroot will
|
||||
download the packages' sources.
|
||||
|
||||
Result of the build
|
||||
-------------------
|
||||
|
||||
After building, you should obtain this tree:
|
||||
|
||||
output/images/
|
||||
+-- Image
|
||||
+-- boot.ini [1]
|
||||
+-- boot.vfat
|
||||
+-- meson64_odroidc2.dtb
|
||||
+-- rootfs.ext2
|
||||
+-- rootfs.ext4
|
||||
+-- rootfs.tar
|
||||
+-- sdcard.img
|
||||
`-- u-boot.bin
|
||||
|
||||
[1] This is the ODROID-C2 configuration file used in u-boot.
|
||||
|
||||
How to write the SD card or eMMC
|
||||
================================
|
||||
|
||||
Once the build process is finished you will have an image called "sdcard.img"
|
||||
in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an SD card or eMMC with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
|
||||
Insert the SDcard into your ODROID-C2, and power it up. Your new system
|
||||
should come up now.
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -d -m 755 $TARGET_DIR/boot
|
||||
|
||||
$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \
|
||||
-n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr
|
||||
-n "boot script" -d $BOARD_DIR/boot.scr.txt $BOARD_DIR/boot.scr
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/boot.scr $TARGET_DIR/boot/boot.scr
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -d -m 755 $TARGET_DIR/boot
|
||||
$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \
|
||||
-n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr
|
||||
-n "boot script" -d $BOARD_DIR/boot.scr.txt $BOARD_DIR/boot.scr
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/boot.scr $TARGET_DIR/boot/boot.scr
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -d -m 755 $TARGET_DIR/boot
|
||||
|
||||
$HOST_DIR/bin/mkimage -A arm -O linux -T script -C none \
|
||||
-n "boot script" -d $BOARD_DIR/boot.scr.txt $TARGET_DIR/boot/boot.scr
|
||||
-n "boot script" -d $BOARD_DIR/boot.scr.txt $BOARD_DIR/boot.scr
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/boot.scr $TARGET_DIR/boot/boot.scr
|
||||
|
||||
@@ -40,7 +40,6 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to Amarula A64-Relic"
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_PACKAGE_HOST_ANDROID_TOOLS=y
|
||||
BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
||||
|
||||
@@ -9,7 +9,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
|
||||
|
||||
# System
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
|
||||
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
|
||||
|
||||
# Bootloader
|
||||
BR2_TARGET_UBOOT=y
|
||||
@@ -52,6 +51,7 @@ BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
|
||||
# qt5
|
||||
BR2_PACKAGE_QT5=y
|
||||
BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y
|
||||
BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
|
||||
BR2_PACKAGE_QT5BASE_LINUXFB=y
|
||||
BR2_PACKAGE_QT5BASE_FONTCONFIG=y
|
||||
|
||||
@@ -25,7 +25,7 @@ BR2_TARGET_UBOOT_FORMAT_SD=y
|
||||
|
||||
# Filesystem
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_TARGET_ROOTFS_EXT4=y
|
||||
|
||||
# To generate SD Image
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
|
||||
@@ -25,7 +25,7 @@ BR2_TARGET_UBOOT_FORMAT_SD=y
|
||||
|
||||
# Filesystem
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_TARGET_ROOTFS_EXT4=y
|
||||
|
||||
# To generate SD card image
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
|
||||
@@ -68,6 +68,7 @@ BR2_PACKAGE_MESA3D_DEMOS=y
|
||||
|
||||
# Qt5
|
||||
BR2_PACKAGE_QT5=y
|
||||
BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y
|
||||
BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
|
||||
BR2_PACKAGE_QT5BASE_LINUXFB=y
|
||||
BR2_PACKAGE_QT5BASE_FONTCONFIG=y
|
||||
|
||||
@@ -42,7 +42,6 @@ BR2_PACKAGE_MESA3D_DEMOS=y
|
||||
BR2_PACKAGE_MESA3D=y
|
||||
BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
|
||||
BR2_PACKAGE_MESA3D_DRI_DRIVER_I965=y
|
||||
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
|
||||
|
||||
# Framebuffer (just for testing purposes)
|
||||
BR2_PACKAGE_FB_TEST_APP=y
|
||||
|
||||
@@ -6,10 +6,6 @@ BR2_ARM_EABIHF=y
|
||||
# Linux headers same as kernel, a 5.4 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
|
||||
# Toolchain
|
||||
# glibc is needed for sunxi-mali-mainline-package.
|
||||
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
|
||||
|
||||
# System configuration
|
||||
BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"
|
||||
|
||||
@@ -6,10 +6,6 @@ BR2_ARM_EABIHF=y
|
||||
# Linux headers same as kernel, a 5.4 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
|
||||
# Toolchain
|
||||
# glibc is needed for sunxi-mali-mainline-package.
|
||||
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
|
||||
|
||||
# System configuration
|
||||
BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"
|
||||
|
||||
@@ -33,7 +33,7 @@ BR2_PACKAGE_ZD1211_FIRMWARE=y
|
||||
|
||||
# Filesystem
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_TARGET_ROOTFS_EXT4=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
|
||||
# U-Boot
|
||||
|
||||
@@ -10,7 +10,7 @@ BR2_TARGET_ROOTFS_INITRAMFS=y
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
|
||||
|
||||
# Use soft float
|
||||
BR2_POWERPC_SOFT_FLOAT=y
|
||||
BR2_SOFT_FLOAT=y
|
||||
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
|
||||
@@ -23,6 +23,7 @@ BR2_LINUX_KERNEL_IMAGE=y
|
||||
|
||||
# Bootloader
|
||||
BR2_TARGET_OPENSBI=y
|
||||
BR2_TARGET_OPENSBI_USE_PLAT=y
|
||||
BR2_TARGET_OPENSBI_PLAT="qemu/virt"
|
||||
|
||||
# host-qemu for gitlab testing
|
||||
|
||||
@@ -22,6 +22,7 @@ BR2_LINUX_KERNEL_IMAGE=y
|
||||
|
||||
# Bootloader
|
||||
BR2_TARGET_OPENSBI=y
|
||||
BR2_TARGET_OPENSBI_USE_PLAT=y
|
||||
BR2_TARGET_OPENSBI_PLAT="qemu/virt"
|
||||
|
||||
# host-qemu for gitlab testing
|
||||
|
||||
@@ -98,9 +98,10 @@ Note that:
|
||||
dependencies are automatically added as needed by the Python
|
||||
package infrastructure.
|
||||
|
||||
* Similarly, it is not needed to add +host-setuptools+ to
|
||||
+PYTHON_FOO_DEPENDENCIES+ for setuptools-based packages, since it's
|
||||
automatically added by the Python infrastructure as needed.
|
||||
* Similarly, it is not needed to add +host-setuptools+ and/or
|
||||
+host-distutilscross+ dependencies to +PYTHON_FOO_DEPENDENCIES+ for
|
||||
setuptools-based packages, since these are automatically added by
|
||||
the Python infrastructure as needed.
|
||||
|
||||
One variable specific to the Python infrastructure is mandatory:
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -163,13 +163,13 @@ List of Examples
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
Buildroot 2020.02.2 manual generated on 2020-05-12 12:18:45 UTC from
|
||||
git revision 2f7183d131
|
||||
Buildroot 2020.02.1 manual generated on 2020-04-10 20:45:00 UTC from
|
||||
git revision 80e565bbeb
|
||||
|
||||
The Buildroot manual is written by the Buildroot developers. It is
|
||||
licensed under the GNU General Public License, version 2. Refer to
|
||||
the COPYING [http://git.buildroot.org/buildroot/tree/COPYING?id=
|
||||
2f7183d13133f2ded97fee273bd0cbed10226e4e] file in the Buildroot
|
||||
80e565bbebc61bf113bcd3b3475fa27a5127f466] file in the Buildroot
|
||||
sources for the full text of this license.
|
||||
|
||||
Copyright © 2004-2020 The Buildroot developers
|
||||
@@ -5167,9 +5167,10 @@ Note that:
|
||||
PYTHON_FOO_DEPENDENCIES variable of a package, since these basic
|
||||
dependencies are automatically added as needed by the Python
|
||||
package infrastructure.
|
||||
* Similarly, it is not needed to add host-setuptools to
|
||||
PYTHON_FOO_DEPENDENCIES for setuptools-based packages, since it’s
|
||||
automatically added by the Python infrastructure as needed.
|
||||
* Similarly, it is not needed to add host-setuptools and/or
|
||||
host-distutilscross dependencies to PYTHON_FOO_DEPENDENCIES for
|
||||
setuptools-based packages, since these are automatically added by
|
||||
the Python infrastructure as needed.
|
||||
|
||||
One variable specific to the Python infrastructure is mandatory:
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
# devtmpfs does not get automounted for initramfs
|
||||
/bin/mount -t devtmpfs devtmpfs /dev
|
||||
exec 0</dev/console
|
||||
exec 1>/dev/console
|
||||
exec 2>/dev/console
|
||||
exec /sbin/init "$@"
|
||||
|
||||
@@ -30,7 +30,7 @@ config BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
bool "Latest version (5.4)"
|
||||
|
||||
config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
|
||||
bool "Latest CIP SLTS version (4.19.118-cip25)"
|
||||
bool "Latest CIP SLTS version (4.19.98-cip19)"
|
||||
help
|
||||
CIP launched in the spring of 2016 to address the needs of
|
||||
organizations in industries such as power generation and
|
||||
@@ -49,7 +49,7 @@ config BR2_LINUX_KERNEL_LATEST_CIP_VERSION
|
||||
https://www.cip-project.org
|
||||
|
||||
config BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
|
||||
bool "Latest CIP RT SLTS version (4.19.115-cip24-rt9)"
|
||||
bool "Latest CIP RT SLTS version (4.19.98-cip19-rt7)"
|
||||
help
|
||||
Same as the CIP version, but this is the PREEMPT_RT realtime
|
||||
variant.
|
||||
@@ -128,9 +128,9 @@ endif
|
||||
|
||||
config BR2_LINUX_KERNEL_VERSION
|
||||
string
|
||||
default "5.4.40" if BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
default "4.19.118-cip25" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
|
||||
default "4.19.115-cip24-rt9" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
|
||||
default "5.4.31" if BR2_LINUX_KERNEL_LATEST_VERSION
|
||||
default "4.19.98-cip19" if BR2_LINUX_KERNEL_LATEST_CIP_VERSION
|
||||
default "4.19.98-cip19-rt7" if BR2_LINUX_KERNEL_LATEST_CIP_RT_VERSION
|
||||
default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \
|
||||
if BR2_LINUX_KERNEL_CUSTOM_VERSION
|
||||
default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# From https://www.kernel.org/pub/linux/kernel/v5.x/sha256sums.asc
|
||||
sha256 83563f027687ecaafb41d0d2d52056f40ec9822f8a9e43592e215349730020ab linux-5.4.40.tar.xz
|
||||
sha256 a11083f8f809887f6a0f8d4467532385b99418f17998fe6e837807491c276eeb linux-5.4.31.tar.xz
|
||||
# From https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
|
||||
sha256 cd963e66d7fb07f142fa5274ec90f46c8388a327e2ba28c5fec245d734b0d425 linux-4.4.223.tar.xz
|
||||
sha256 cf5300e6f5d8c66c2bed8f00d53f9c58103731809862427012e4010f5d782ae5 linux-4.9.223.tar.xz
|
||||
sha256 444ef973d9b6a6ea174e4a9086f0aea980d8575d13302e431ad688f22e27ed0e linux-4.14.180.tar.xz
|
||||
sha256 5050268ec5cf003d96366d1611ecfa4ab6974125d6fa26cea1ccb81dd4df00a5 linux-4.19.122.tar.xz
|
||||
sha256 ea68cb8e9fa255bb1d0402c5aa8f26984f9b1c8607ff3bed5d3284109167f063 linux-4.4.218.tar.xz
|
||||
sha256 df3a6e615ec4c57b04775e9c018c67045223ac662e696d28fd37baa5114349cd linux-4.9.218.tar.xz
|
||||
sha256 cb440ac5d20071dcb482e5062958514064b0c5a8375c92653062ea201ae0222c linux-4.14.175.tar.xz
|
||||
sha256 1e40a0dc6afc95a259f97b80d5f5ef8f89e2ee49e993ba6844e2bc55de361f0e linux-4.19.114.tar.xz
|
||||
# Locally computed
|
||||
sha256 ea53913813cb5a9069608532b327de7a7ed0fdc8fed8c6f10cd55d1ac6a58ffb linux-cip-4.19.118-cip25.tar.gz
|
||||
sha256 7f0a0db0e1cfb14053523f4432f1ad1468b5bd42305b44905c4b103466c8d655 linux-cip-4.19.115-cip24-rt9.tar.gz
|
||||
sha256 18f9ddba0b777d1942d6c81877ba97c4bcd08488e2c409e57dcce866b9de5fc2 linux-cip-4.19.98-cip19.tar.gz
|
||||
sha256 7d5aeb67da41dc66ef28621ef994ef4403e8b1f5c3df38b1843da20972444280 linux-cip-4.19.98-cip19-rt7.tar.gz
|
||||
|
||||
# Licenses hashes
|
||||
sha256 ee5808b032a67f587d3541099d46de34f5bec8cd5976114ba07f1299ee6001ff COPYING
|
||||
|
||||
@@ -408,7 +408,6 @@ define LINUX_KCONFIG_FIXUP_CMDS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FB,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO,$(@D)/.config)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224,$(@D)/.config))
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS,$(@D)/.config)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
|
||||
@@ -468,10 +467,7 @@ endif
|
||||
# '$(LINUX_TARGET_NAME)' targets separately because calling them in
|
||||
# the same $(MAKE) invocation has shown to cause parallel build
|
||||
# issues.
|
||||
# The call to disable gcc-plugins is a stop-gap measure:
|
||||
# http://lists.busybox.net/pipermail/buildroot/2020-May/282727.html
|
||||
define LINUX_BUILD_CMDS
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS,$(@D)/.config)
|
||||
$(foreach dts,$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)), \
|
||||
cp -f $(dts) $(LINUX_ARCH_PATH)/boot/dts/
|
||||
)
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
From 5b95d256387b45fbe33f7ee7890ae35afdd5c371 Mon Sep 17 00:00:00 2001
|
||||
From: Joe Orton <jorton@apache.org>
|
||||
Date: Fri, 13 Mar 2020 14:34:18 +0000
|
||||
Subject: [PATCH] * server/log.c (ap_log_pid): Use a temporary file, then
|
||||
rename once successfully written; also add error checking. Avoids startup
|
||||
failures if a previous httpd invocation crashed while writing the pidfile.
|
||||
|
||||
Submitted by: Nicolas Carrier <carrier.nicolas0 gmail.com>, jorton
|
||||
Github: closes #100, closes #69
|
||||
PR: 63140
|
||||
|
||||
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1875153 13f79535-47bb-0310-9956-ffa450edef68
|
||||
Signed-off-by: Nicolas Carrier <nicolas.carrier@orolia.com>
|
||||
---
|
||||
server/log.c | 33 ++++++++++++++++++++++++++-------
|
||||
1 file changed, 26 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/server/log.c b/server/log.c
|
||||
index f0bde6e4b8..8d54b4e057 100644
|
||||
--- a/server/log.c
|
||||
+++ b/server/log.c
|
||||
@@ -1598,6 +1598,9 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename)
|
||||
pid_t mypid;
|
||||
apr_status_t rv;
|
||||
const char *fname;
|
||||
+ char *temp_fname;
|
||||
+ apr_fileperms_t perms;
|
||||
+ char pidstr[64];
|
||||
|
||||
if (!filename) {
|
||||
return;
|
||||
@@ -1626,19 +1629,35 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename)
|
||||
fname);
|
||||
}
|
||||
|
||||
- if ((rv = apr_file_open(&pid_file, fname,
|
||||
- APR_WRITE | APR_CREATE | APR_TRUNCATE,
|
||||
- APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p))
|
||||
- != APR_SUCCESS) {
|
||||
+ temp_fname = apr_pstrcat(p, fname, ".XXXXXX", NULL);
|
||||
+ rv = apr_file_mktemp(&pid_file, temp_fname,
|
||||
+ APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE, p);
|
||||
+ if (rv != APR_SUCCESS) {
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00099)
|
||||
- "could not create %s", fname);
|
||||
+ "could not create %s", temp_fname);
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(00100)
|
||||
"%s: could not log pid to file %s",
|
||||
ap_server_argv0, fname);
|
||||
exit(1);
|
||||
}
|
||||
- apr_file_printf(pid_file, "%" APR_PID_T_FMT APR_EOL_STR, mypid);
|
||||
- apr_file_close(pid_file);
|
||||
+
|
||||
+ apr_snprintf(pidstr, sizeof pidstr, "%" APR_PID_T_FMT APR_EOL_STR, mypid);
|
||||
+
|
||||
+ perms = APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD;
|
||||
+ rv = apr_file_perms_set(temp_fname, perms);
|
||||
+ if (rv == APR_SUCCESS)
|
||||
+ rv = apr_file_write_full(pid_file, pidstr, strlen(pidstr), NULL);
|
||||
+ if (rv == APR_SUCCESS)
|
||||
+ rv = apr_file_close(pid_file);
|
||||
+ if (rv == APR_SUCCESS)
|
||||
+ rv = apr_file_rename(temp_fname, fname, p);
|
||||
+ if (rv != APR_SUCCESS) {
|
||||
+ ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(10231)
|
||||
+ "%s: Failed creating pid file %s",
|
||||
+ ap_server_argv0, temp_fname);
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
saved_pid = mypid;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# From http://archive.apache.org/dist/httpd/httpd-2.4.43.tar.bz2.sha256
|
||||
sha256 a497652ab3fc81318cdc2a203090a999150d86461acff97c1065dc910fe10f43 httpd-2.4.43.tar.bz2
|
||||
# From http://archive.apache.org/dist/httpd/httpd-2.4.41.tar.bz2.sha256
|
||||
sha256 133d48298fe5315ae9366a0ec66282fa4040efa5d566174481077ade7d18ea40 httpd-2.4.41.tar.bz2
|
||||
# Locally computed
|
||||
sha256 47b8c2b6c3309282a99d4a3001575c790fead690cc14734628c4667d2bbffc43 LICENSE
|
||||
sha256 c49c0819a726b70142621715dae3159c47b0349c2bc9db079070f28dadac0229 LICENSE
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
APACHE_VERSION = 2.4.43
|
||||
APACHE_VERSION = 2.4.41
|
||||
APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2
|
||||
APACHE_SITE = http://archive.apache.org/dist/httpd
|
||||
APACHE_LICENSE = Apache-2.0
|
||||
@@ -99,7 +99,6 @@ APACHE_CONF_OPTS += --disable-deflate
|
||||
endif
|
||||
|
||||
define APACHE_FIX_STAGING_APACHE_CONFIG
|
||||
$(SED) 's%"/usr/bin"%"$(STAGING_DIR)/usr/bin"%' $(STAGING_DIR)/usr/bin/apxs
|
||||
$(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs
|
||||
$(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk
|
||||
endef
|
||||
|
||||
@@ -17,55 +17,35 @@ AZURE_IOT_SDK_C_CONF_OPTS = -Dskip_samples=ON
|
||||
# The project only supports building one kind of library.
|
||||
# Further the install target installs the wrong files, so we do it here:
|
||||
ifeq ($(BR2_STATIC_LIBS),y)
|
||||
AZURE_IOT_SDK_C_LIBS += \
|
||||
uamqp/libuamqp.a \
|
||||
c-utility/libaziotsharedutil.a \
|
||||
iothub_client/libiothub_client.a \
|
||||
iothub_client/libiothub_client_mqtt_ws_transport.a \
|
||||
AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.a c-utility/libaziotsharedutil.a \
|
||||
iothub_client/libiothub_client.a iothub_client/libiothub_client_mqtt_ws_transport.a \
|
||||
iothub_client/libiothub_client_amqp_ws_transport.a \
|
||||
iothub_client/libiothub_client_http_transport.a \
|
||||
iothub_client/libiothub_client_amqp_transport.a \
|
||||
iothub_client/libiothub_client_mqtt_transport.a \
|
||||
iothub_service_client/libiothub_service_client.a \
|
||||
serializer/libserializer.a \
|
||||
umqtt/libumqtt.a \
|
||||
libparson.a
|
||||
iothub_service_client/libiothub_service_client.a serializer/libserializer.a umqtt/libumqtt.a
|
||||
else
|
||||
AZURE_IOT_SDK_C_LIBS += \
|
||||
uamqp/libuamqp.so \
|
||||
c-utility/libaziotsharedutil.so \
|
||||
iothub_client/libiothub_client.so \
|
||||
iothub_client/libiothub_client_mqtt_ws_transport.so \
|
||||
AZURE_IOT_SDK_C_LIBS += uamqp/libuamqp.so c-utility/libaziotsharedutil.so \
|
||||
iothub_client/libiothub_client.so iothub_client/libiothub_client_mqtt_ws_transport.so \
|
||||
iothub_client/libiothub_client_amqp_ws_transport.so \
|
||||
iothub_client/libiothub_client_http_transport.so \
|
||||
iothub_client/libiothub_client_amqp_transport.so \
|
||||
iothub_client/libiothub_client_mqtt_transport.so \
|
||||
iothub_service_client/libiothub_service_client.so \
|
||||
serializer/libserializer.so \
|
||||
umqtt/libumqtt.so.1.1.11 \
|
||||
libparson.so
|
||||
|
||||
define AZURE_IOT_SDK_C_CREATE_SYMLINKS
|
||||
ln -sf libumqtt.so.1.1.11 $(1)/usr/lib/libumqtt.so.1
|
||||
ln -sf libumqtt.so.1.1.11 $(1)/usr/lib/libumqtt.so
|
||||
endef
|
||||
iothub_service_client/libiothub_service_client.so serializer/libserializer.so umqtt/libumqtt.so
|
||||
endif
|
||||
|
||||
define AZURE_IOT_SDK_C_INSTALL_LIBS
|
||||
$(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
|
||||
$(INSTALL) -D -m 0755 $(@D)/$(l) $(1)/usr/lib/$(notdir $(l))
|
||||
)
|
||||
$(call AZURE_IOT_SDK_C_CREATE_SYMLINKS,$(1))
|
||||
endef
|
||||
|
||||
define AZURE_IOT_SDK_C_INSTALL_STAGING_CMDS
|
||||
$(call AZURE_IOT_SDK_C_INSTALL_LIBS,$(STAGING_DIR))
|
||||
$(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
|
||||
$(INSTALL) -D -m 0755 $(@D)/$(l) $(STAGING_DIR)/usr/lib/
|
||||
)
|
||||
cp -a $(@D)/c-utility/inc/* $(STAGING_DIR)/usr/include/
|
||||
cp -a $(@D)/iothub_client/inc/* $(STAGING_DIR)/usr/include/
|
||||
endef
|
||||
|
||||
define AZURE_IOT_SDK_C_INSTALL_TARGET_CMDS
|
||||
$(call AZURE_IOT_SDK_C_INSTALL_LIBS,$(TARGET_DIR))
|
||||
$(foreach l,$(AZURE_IOT_SDK_C_LIBS), \
|
||||
$(INSTALL) -D -m 0755 $(@D)/$(l) $(TARGET_DIR)/usr/lib/
|
||||
)
|
||||
endef
|
||||
|
||||
$(eval $(cmake-package))
|
||||
|
||||
@@ -1,376 +0,0 @@
|
||||
From c7a1d1f656c717394937a92cb970f0f4cecce128 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sun, 19 Apr 2020 19:04:41 -0700
|
||||
Subject: [PATCH] xtensa: fix PR ld/25861
|
||||
|
||||
Introduce new relaxations XTENSA_PDIFF{8,16,32} for positive differences
|
||||
(subtracted symbol precedes diminished symbol) and XTENSA_NDIFF{8,16,32}
|
||||
for negative differences (subtracted symbol follows diminished symbol).
|
||||
Don't generate XTENSA_DIFF relocations in the assembler, generate
|
||||
XTENSA_PDIFF or XTENSA_NDIFF based on relative symbol position.
|
||||
|
||||
Handle XTENSA_DIFF in BFD for compatibility with old object files.
|
||||
Handle XTENSA_PDIFF and XTENSA_NDIFF in BFD, treating difference value
|
||||
as unsigned.
|
||||
|
||||
2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
|
||||
bfd/
|
||||
* bfd-in2.h: Regenerated.
|
||||
* elf32-xtensa.c (elf_howto_table): New entries for
|
||||
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
|
||||
(elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
|
||||
(relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
|
||||
R_XTENSA_NDIFF{8,16,32}.
|
||||
* libbfd.h (bfd_reloc_code_real_names): Add names for
|
||||
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
|
||||
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
|
||||
* reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
|
||||
and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
|
||||
|
||||
binutils/
|
||||
* readelf.c (is_none_reloc): Recognize
|
||||
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
|
||||
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
|
||||
|
||||
gas/
|
||||
* config/tc-xtensa.c (md_apply_fix): Replace
|
||||
BFD_RELOC_XTENSA_DIFF{8,16,32} generation with
|
||||
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
|
||||
BFD_RELOC_XTENSA_NDIFF{8,16,32} generation.
|
||||
* testsuite/gas/xtensa/loc.d: Replace BFD_RELOC_XTENSA_DIFF16
|
||||
with BFD_RELOC_XTENSA_PDIFF16 in the expected output.
|
||||
|
||||
include/
|
||||
* elf/xtensa.h (elf_xtensa_reloc_type): New entries for
|
||||
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: 30ce8e47fad9b057b6d7af9e1d43061126d34d20
|
||||
|
||||
bfd/bfd-in2.h | 20 ++++++-
|
||||
bfd/elf32-xtensa.c | 89 +++++++++++++++++++++++++++++-
|
||||
bfd/libbfd.h | 6 ++
|
||||
bfd/reloc.c | 24 ++++++++
|
||||
binutils/readelf.c | 8 ++-
|
||||
gas/config/tc-xtensa.c | 12 +++-
|
||||
gas/testsuite/gas/xtensa/loc.d | 2 +-
|
||||
include/elf/xtensa.h | 6 ++
|
||||
11 files changed, 160 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
|
||||
index 37114607b515..be6a30f57955 100644
|
||||
--- a/bfd/bfd-in2.h
|
||||
+++ b/bfd/bfd-in2.h
|
||||
@@ -5217,7 +5217,9 @@ to one of its own internal functions or data structures. */
|
||||
PLT entries. Otherwise, this is just a generic 32-bit relocation. */
|
||||
BFD_RELOC_XTENSA_PLT,
|
||||
|
||||
-/* Xtensa relocations to mark the difference of two local symbols.
|
||||
+/* Xtensa relocations for backward compatibility. These have been replaced
|
||||
+by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
|
||||
+Xtensa relocations to mark the difference of two local symbols.
|
||||
These are only needed to support linker relaxation and can be ignored
|
||||
when not relaxing. The field is set to the value of the difference
|
||||
assuming no relaxation. The relocation encodes the position of the
|
||||
@@ -5291,6 +5293,22 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */
|
||||
BFD_RELOC_XTENSA_TLS_ARG,
|
||||
BFD_RELOC_XTENSA_TLS_CALL,
|
||||
|
||||
+/* Xtensa relocations to mark the difference of two local symbols.
|
||||
+These are only needed to support linker relaxation and can be ignored
|
||||
+when not relaxing. The field is set to the value of the difference
|
||||
+assuming no relaxation. The relocation encodes the position of the
|
||||
+subtracted symbol so the linker can determine whether to adjust the field
|
||||
+value. PDIFF relocations are used for positive differences, NDIFF
|
||||
+relocations are used for negative differences. The difference value
|
||||
+is treated as unsigned with these relocation types, giving full
|
||||
+8/16 value ranges. */
|
||||
+ BFD_RELOC_XTENSA_PDIFF8,
|
||||
+ BFD_RELOC_XTENSA_PDIFF16,
|
||||
+ BFD_RELOC_XTENSA_PDIFF32,
|
||||
+ BFD_RELOC_XTENSA_NDIFF8,
|
||||
+ BFD_RELOC_XTENSA_NDIFF16,
|
||||
+ BFD_RELOC_XTENSA_NDIFF32,
|
||||
+
|
||||
/* 8 bit signed offset in (ix+d) or (iy+d). */
|
||||
BFD_RELOC_Z80_DISP8,
|
||||
|
||||
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
|
||||
index 473a9d76f289..fded42d52a9a 100644
|
||||
--- a/bfd/elf32-xtensa.c
|
||||
+++ b/bfd/elf32-xtensa.c
|
||||
@@ -325,6 +325,20 @@ static reloc_howto_type elf_howto_table[] =
|
||||
HOWTO (R_XTENSA_TLS_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
|
||||
bfd_elf_xtensa_reloc, "R_XTENSA_TLS_CALL",
|
||||
FALSE, 0, 0, FALSE),
|
||||
+
|
||||
+ HOWTO (R_XTENSA_PDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF8", FALSE, 0, 0xff, FALSE),
|
||||
+ HOWTO (R_XTENSA_PDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF16", FALSE, 0, 0xffff, FALSE),
|
||||
+ HOWTO (R_XTENSA_PDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF32", FALSE, 0, 0xffffffff, FALSE),
|
||||
+
|
||||
+ HOWTO (R_XTENSA_NDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF8", FALSE, 0, 0xff, FALSE),
|
||||
+ HOWTO (R_XTENSA_NDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF16", FALSE, 0, 0xffff, FALSE),
|
||||
+ HOWTO (R_XTENSA_NDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF32", FALSE, 0, 0xffffffff, FALSE),
|
||||
};
|
||||
|
||||
#if DEBUG_GEN_RELOC
|
||||
@@ -364,6 +378,30 @@ elf_xtensa_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
TRACE ("BFD_RELOC_XTENSA_DIFF32");
|
||||
return &elf_howto_table[(unsigned) R_XTENSA_DIFF32 ];
|
||||
|
||||
+ case BFD_RELOC_XTENSA_PDIFF8:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_PDIFF8");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF8 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_PDIFF16:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_PDIFF16");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF16 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_PDIFF32:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_PDIFF32");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF32 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_NDIFF8:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_NDIFF8");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF8 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_NDIFF16:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_NDIFF16");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF16 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_NDIFF32:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_NDIFF32");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF32 ];
|
||||
+
|
||||
case BFD_RELOC_XTENSA_RTLD:
|
||||
TRACE ("BFD_RELOC_XTENSA_RTLD");
|
||||
return &elf_howto_table[(unsigned) R_XTENSA_RTLD ];
|
||||
@@ -1851,6 +1889,12 @@ elf_xtensa_do_reloc (reloc_howto_type *howto,
|
||||
case R_XTENSA_DIFF8:
|
||||
case R_XTENSA_DIFF16:
|
||||
case R_XTENSA_DIFF32:
|
||||
+ case R_XTENSA_PDIFF8:
|
||||
+ case R_XTENSA_PDIFF16:
|
||||
+ case R_XTENSA_PDIFF32:
|
||||
+ case R_XTENSA_NDIFF8:
|
||||
+ case R_XTENSA_NDIFF16:
|
||||
+ case R_XTENSA_NDIFF32:
|
||||
case R_XTENSA_TLS_FUNC:
|
||||
case R_XTENSA_TLS_ARG:
|
||||
case R_XTENSA_TLS_CALL:
|
||||
@@ -9604,7 +9648,13 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
|
||||
if (r_type == R_XTENSA_DIFF8
|
||||
|| r_type == R_XTENSA_DIFF16
|
||||
- || r_type == R_XTENSA_DIFF32)
|
||||
+ || r_type == R_XTENSA_DIFF32
|
||||
+ || r_type == R_XTENSA_PDIFF8
|
||||
+ || r_type == R_XTENSA_PDIFF16
|
||||
+ || r_type == R_XTENSA_PDIFF32
|
||||
+ || r_type == R_XTENSA_NDIFF8
|
||||
+ || r_type == R_XTENSA_NDIFF16
|
||||
+ || r_type == R_XTENSA_NDIFF32)
|
||||
{
|
||||
bfd_signed_vma diff_value = 0;
|
||||
bfd_vma new_end_offset, diff_mask = 0;
|
||||
@@ -9631,8 +9681,27 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
diff_value =
|
||||
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
+ case R_XTENSA_PDIFF8:
|
||||
+ case R_XTENSA_NDIFF8:
|
||||
+ diff_value =
|
||||
+ bfd_get_8 (abfd, &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF16:
|
||||
+ case R_XTENSA_NDIFF16:
|
||||
+ diff_value =
|
||||
+ bfd_get_16 (abfd, &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF32:
|
||||
+ case R_XTENSA_NDIFF32:
|
||||
+ diff_value =
|
||||
+ bfd_get_32 (abfd, &contents[old_source_offset]);
|
||||
+ break;
|
||||
}
|
||||
|
||||
+ if (r_type >= R_XTENSA_NDIFF8
|
||||
+ && r_type <= R_XTENSA_NDIFF32)
|
||||
+ diff_value = -diff_value;
|
||||
+
|
||||
new_end_offset = offset_with_removed_text_map
|
||||
(&target_relax_info->action_list,
|
||||
r_rel.target_offset + diff_value);
|
||||
@@ -9655,6 +9724,24 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
bfd_put_signed_32 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
+ case R_XTENSA_PDIFF8:
|
||||
+ case R_XTENSA_NDIFF8:
|
||||
+ diff_mask = 0xff;
|
||||
+ bfd_put_8 (abfd, diff_value,
|
||||
+ &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF16:
|
||||
+ case R_XTENSA_NDIFF16:
|
||||
+ diff_mask = 0xffff;
|
||||
+ bfd_put_16 (abfd, diff_value,
|
||||
+ &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF32:
|
||||
+ case R_XTENSA_NDIFF32:
|
||||
+ diff_mask = 0xffffffff;
|
||||
+ bfd_put_32 (abfd, diff_value,
|
||||
+ &contents[old_source_offset]);
|
||||
+ break;
|
||||
}
|
||||
|
||||
/* Check for overflow. Sign bits must be all zeroes or all ones */
|
||||
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
|
||||
index 3c184fcadadf..989f4bc0b595 100644
|
||||
--- a/bfd/libbfd.h
|
||||
+++ b/bfd/libbfd.h
|
||||
@@ -2919,6 +2919,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
||||
"BFD_RELOC_XTENSA_TLS_FUNC",
|
||||
"BFD_RELOC_XTENSA_TLS_ARG",
|
||||
"BFD_RELOC_XTENSA_TLS_CALL",
|
||||
+ "BFD_RELOC_XTENSA_PDIFF8",
|
||||
+ "BFD_RELOC_XTENSA_PDIFF16",
|
||||
+ "BFD_RELOC_XTENSA_PDIFF32",
|
||||
+ "BFD_RELOC_XTENSA_NDIFF8",
|
||||
+ "BFD_RELOC_XTENSA_NDIFF16",
|
||||
+ "BFD_RELOC_XTENSA_NDIFF32",
|
||||
"BFD_RELOC_Z80_DISP8",
|
||||
"BFD_RELOC_Z80_BYTE0",
|
||||
"BFD_RELOC_Z80_BYTE1",
|
||||
diff --git a/bfd/reloc.c b/bfd/reloc.c
|
||||
index c4dec86d1d46..f5df8e2ab3eb 100644
|
||||
--- a/bfd/reloc.c
|
||||
+++ b/bfd/reloc.c
|
||||
@@ -6556,6 +6556,8 @@ ENUMX
|
||||
ENUMX
|
||||
BFD_RELOC_XTENSA_DIFF32
|
||||
ENUMDOC
|
||||
+ Xtensa relocations for backward compatibility. These have been replaced
|
||||
+ by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
|
||||
Xtensa relocations to mark the difference of two local symbols.
|
||||
These are only needed to support linker relaxation and can be ignored
|
||||
when not relaxing. The field is set to the value of the difference
|
||||
@@ -6668,6 +6670,28 @@ ENUMX
|
||||
BFD_RELOC_XTENSA_TLS_CALL
|
||||
ENUMDOC
|
||||
Xtensa TLS relocations.
|
||||
+ENUM
|
||||
+ BFD_RELOC_XTENSA_PDIFF8
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_PDIFF16
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_PDIFF32
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_NDIFF8
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_NDIFF16
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_NDIFF32
|
||||
+ENUMDOC
|
||||
+ Xtensa relocations to mark the difference of two local symbols.
|
||||
+ These are only needed to support linker relaxation and can be ignored
|
||||
+ when not relaxing. The field is set to the value of the difference
|
||||
+ assuming no relaxation. The relocation encodes the position of the
|
||||
+ subtracted symbol so the linker can determine whether to adjust the field
|
||||
+ value. PDIFF relocations are used for positive differences, NDIFF
|
||||
+ relocations are used for negative differences. The difference value
|
||||
+ is treated as unsigned with these relocation types, giving full
|
||||
+ 8/16 value ranges.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_Z80_DISP8
|
||||
diff --git a/binutils/readelf.c b/binutils/readelf.c
|
||||
index d4756c93b345..800918f901c8 100644
|
||||
--- a/binutils/readelf.c
|
||||
+++ b/binutils/readelf.c
|
||||
@@ -13262,7 +13262,13 @@ is_none_reloc (Filedata * filedata, unsigned int reloc_type)
|
||||
return (reloc_type == 0 /* R_XTENSA_NONE. */
|
||||
|| reloc_type == 17 /* R_XTENSA_DIFF8. */
|
||||
|| reloc_type == 18 /* R_XTENSA_DIFF16. */
|
||||
- || reloc_type == 19 /* R_XTENSA_DIFF32. */);
|
||||
+ || reloc_type == 19 /* R_XTENSA_DIFF32. */
|
||||
+ || reloc_type == 57 /* R_XTENSA_PDIFF8. */
|
||||
+ || reloc_type == 58 /* R_XTENSA_PDIFF16. */
|
||||
+ || reloc_type == 59 /* R_XTENSA_PDIFF32. */
|
||||
+ || reloc_type == 60 /* R_XTENSA_NDIFF8. */
|
||||
+ || reloc_type == 61 /* R_XTENSA_NDIFF16. */
|
||||
+ || reloc_type == 62 /* R_XTENSA_NDIFF32. */);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
|
||||
index 71d4d94a8d7d..ee75c13548ff 100644
|
||||
--- a/gas/config/tc-xtensa.c
|
||||
+++ b/gas/config/tc-xtensa.c
|
||||
@@ -5974,18 +5974,24 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
|
||||
case BFD_RELOC_8:
|
||||
if (fixP->fx_subsy)
|
||||
{
|
||||
+ bfd_boolean neg = S_GET_VALUE (fixP->fx_addsy) + fixP->fx_offset
|
||||
+ < S_GET_VALUE (fixP->fx_subsy);
|
||||
+
|
||||
switch (fixP->fx_r_type)
|
||||
{
|
||||
case BFD_RELOC_8:
|
||||
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
|
||||
+ fixP->fx_r_type = neg
|
||||
+ ? BFD_RELOC_XTENSA_NDIFF8 : BFD_RELOC_XTENSA_PDIFF8;
|
||||
fixP->fx_signed = 0;
|
||||
break;
|
||||
case BFD_RELOC_16:
|
||||
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16;
|
||||
+ fixP->fx_r_type = neg
|
||||
+ ? BFD_RELOC_XTENSA_NDIFF16 : BFD_RELOC_XTENSA_PDIFF16;
|
||||
fixP->fx_signed = 0;
|
||||
break;
|
||||
case BFD_RELOC_32:
|
||||
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32;
|
||||
+ fixP->fx_r_type = neg
|
||||
+ ? BFD_RELOC_XTENSA_NDIFF32 : BFD_RELOC_XTENSA_PDIFF32;
|
||||
fixP->fx_signed = 0;
|
||||
break;
|
||||
default:
|
||||
diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d
|
||||
index 71983cc90055..8fb3425999d5 100644
|
||||
--- a/gas/testsuite/gas/xtensa/loc.d
|
||||
+++ b/gas/testsuite/gas/xtensa/loc.d
|
||||
@@ -6,5 +6,5 @@
|
||||
|
||||
RELOCATION RECORDS FOR \[\.debug_line\]:
|
||||
#...
|
||||
-.*R_XTENSA_DIFF16.*\.text\+0x00009c42
|
||||
+.*R_XTENSA_PDIFF16.*\.text\+0x00009c42
|
||||
#...
|
||||
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
|
||||
index 2eb5e4e52941..bd5c80d13777 100644
|
||||
--- a/include/elf/xtensa.h
|
||||
+++ b/include/elf/xtensa.h
|
||||
@@ -87,6 +87,12 @@ START_RELOC_NUMBERS (elf_xtensa_reloc_type)
|
||||
RELOC_NUMBER (R_XTENSA_TLS_FUNC, 54)
|
||||
RELOC_NUMBER (R_XTENSA_TLS_ARG, 55)
|
||||
RELOC_NUMBER (R_XTENSA_TLS_CALL, 56)
|
||||
+ RELOC_NUMBER (R_XTENSA_PDIFF8, 57)
|
||||
+ RELOC_NUMBER (R_XTENSA_PDIFF16, 58)
|
||||
+ RELOC_NUMBER (R_XTENSA_PDIFF32, 59)
|
||||
+ RELOC_NUMBER (R_XTENSA_NDIFF8, 60)
|
||||
+ RELOC_NUMBER (R_XTENSA_NDIFF16, 61)
|
||||
+ RELOC_NUMBER (R_XTENSA_NDIFF32, 62)
|
||||
END_RELOC_NUMBERS (R_XTENSA_max)
|
||||
|
||||
/* Processor-specific flags for the ELF header e_flags field. */
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
From 735321812435ae278d3766a3371f55937dc776d6 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sat, 25 Apr 2020 00:40:25 -0700
|
||||
Subject: [PATCH] xtensa: fix XTENSA_NDIFF handling for PR ld/25861
|
||||
|
||||
Fields marked with XTENSA_NDIFF relocations are not negated, they only
|
||||
have sign bits removed. Don't negate their values when relaxation is
|
||||
performed. Don't add sign bits when the value is zero. Report overflow
|
||||
when the result has negative sign but all significant bits are zero.
|
||||
|
||||
2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
|
||||
bfd/
|
||||
* elf32-xtensa.c (relax_section): Don't negate diff_value for
|
||||
XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
|
||||
equals 0. Report overflow when the result has negative sign but
|
||||
all significant bits are zero.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Backported from: d548f47df4d2e3d117d504a4c9977982c78a0556
|
||||
---
|
||||
|
||||
bfd/elf32-xtensa.c | 26 +++++++++++++++-----------
|
||||
1 file changed, 15 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
|
||||
index fded42d52a9a..4327b027911f 100644
|
||||
--- a/bfd/elf32-xtensa.c
|
||||
+++ b/bfd/elf32-xtensa.c
|
||||
@@ -9670,37 +9670,44 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
switch (r_type)
|
||||
{
|
||||
case R_XTENSA_DIFF8:
|
||||
+ diff_mask = 0x7f;
|
||||
diff_value =
|
||||
bfd_get_signed_8 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF16:
|
||||
+ diff_mask = 0x7fff;
|
||||
diff_value =
|
||||
bfd_get_signed_16 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF32:
|
||||
+ diff_mask = 0x7fffffff;
|
||||
diff_value =
|
||||
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF8:
|
||||
case R_XTENSA_NDIFF8:
|
||||
+ diff_mask = 0xff;
|
||||
diff_value =
|
||||
bfd_get_8 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF16:
|
||||
case R_XTENSA_NDIFF16:
|
||||
+ diff_mask = 0xffff;
|
||||
diff_value =
|
||||
bfd_get_16 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF32:
|
||||
case R_XTENSA_NDIFF32:
|
||||
+ diff_mask = 0xffffffff;
|
||||
diff_value =
|
||||
bfd_get_32 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (r_type >= R_XTENSA_NDIFF8
|
||||
- && r_type <= R_XTENSA_NDIFF32)
|
||||
- diff_value = -diff_value;
|
||||
+ && r_type <= R_XTENSA_NDIFF32
|
||||
+ && diff_value)
|
||||
+ diff_value |= ~diff_mask;
|
||||
|
||||
new_end_offset = offset_with_removed_text_map
|
||||
(&target_relax_info->action_list,
|
||||
@@ -9710,43 +9717,40 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
switch (r_type)
|
||||
{
|
||||
case R_XTENSA_DIFF8:
|
||||
- diff_mask = 0x7f;
|
||||
bfd_put_signed_8 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF16:
|
||||
- diff_mask = 0x7fff;
|
||||
bfd_put_signed_16 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF32:
|
||||
- diff_mask = 0x7fffffff;
|
||||
bfd_put_signed_32 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF8:
|
||||
case R_XTENSA_NDIFF8:
|
||||
- diff_mask = 0xff;
|
||||
bfd_put_8 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF16:
|
||||
case R_XTENSA_NDIFF16:
|
||||
- diff_mask = 0xffff;
|
||||
bfd_put_16 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF32:
|
||||
case R_XTENSA_NDIFF32:
|
||||
- diff_mask = 0xffffffff;
|
||||
bfd_put_32 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
}
|
||||
|
||||
- /* Check for overflow. Sign bits must be all zeroes or all ones */
|
||||
- if ((diff_value & ~diff_mask) != 0 &&
|
||||
- (diff_value & ~diff_mask) != (-1 & ~diff_mask))
|
||||
+ /* Check for overflow. Sign bits must be all zeroes or
|
||||
+ all ones. When sign bits are all ones diff_value
|
||||
+ may not be zero. */
|
||||
+ if (((diff_value & ~diff_mask) != 0
|
||||
+ && (diff_value & ~diff_mask) != ~diff_mask)
|
||||
+ || (diff_value && (bfd_vma) diff_value == ~diff_mask))
|
||||
{
|
||||
(*link_info->callbacks->reloc_dangerous)
|
||||
(link_info, _("overflow after relaxation"),
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,432 +0,0 @@
|
||||
From c7a1d1f656c717394937a92cb970f0f4cecce128 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sun, 19 Apr 2020 19:04:41 -0700
|
||||
Subject: [PATCH] xtensa: fix PR ld/25861
|
||||
|
||||
Introduce new relaxations XTENSA_PDIFF{8,16,32} for positive differences
|
||||
(subtracted symbol precedes diminished symbol) and XTENSA_NDIFF{8,16,32}
|
||||
for negative differences (subtracted symbol follows diminished symbol).
|
||||
Don't generate XTENSA_DIFF relocations in the assembler, generate
|
||||
XTENSA_PDIFF or XTENSA_NDIFF based on relative symbol position.
|
||||
|
||||
Handle XTENSA_DIFF in BFD for compatibility with old object files.
|
||||
Handle XTENSA_PDIFF and XTENSA_NDIFF in BFD, treating difference value
|
||||
as unsigned.
|
||||
|
||||
2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
|
||||
bfd/
|
||||
* bfd-in2.h: Regenerated.
|
||||
* elf32-xtensa.c (elf_howto_table): New entries for
|
||||
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
|
||||
(elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
|
||||
(relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
|
||||
R_XTENSA_NDIFF{8,16,32}.
|
||||
* libbfd.h (bfd_reloc_code_real_names): Add names for
|
||||
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
|
||||
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
|
||||
* reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
|
||||
and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
|
||||
|
||||
binutils/
|
||||
* readelf.c (is_none_reloc): Recognize
|
||||
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
|
||||
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
|
||||
|
||||
gas/
|
||||
* config/tc-xtensa.c (md_apply_fix): Replace
|
||||
BFD_RELOC_XTENSA_DIFF{8,16,32} generation with
|
||||
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
|
||||
BFD_RELOC_XTENSA_NDIFF{8,16,32} generation.
|
||||
* testsuite/gas/xtensa/loc.d: Replace BFD_RELOC_XTENSA_DIFF16
|
||||
with BFD_RELOC_XTENSA_PDIFF16 in the expected output.
|
||||
|
||||
include/
|
||||
* elf/xtensa.h (elf_xtensa_reloc_type): New entries for
|
||||
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
|
||||
|
||||
ld/
|
||||
* testsuite/ld-xtensa/relax-loc.d: New test definition.
|
||||
* testsuite/ld-xtensa/relax-loc.s: New test source.
|
||||
* testsuite/ld-xtensa/xtensa.exp (relax-loc): New test.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: 30ce8e47fad9b057b6d7af9e1d43061126d34d20
|
||||
|
||||
bfd/bfd-in2.h | 20 ++++++-
|
||||
bfd/elf32-xtensa.c | 89 +++++++++++++++++++++++++++++-
|
||||
bfd/libbfd.h | 6 ++
|
||||
bfd/reloc.c | 24 ++++++++
|
||||
binutils/readelf.c | 8 ++-
|
||||
gas/config/tc-xtensa.c | 12 +++-
|
||||
gas/testsuite/gas/xtensa/loc.d | 2 +-
|
||||
include/elf/xtensa.h | 6 ++
|
||||
ld/testsuite/ld-xtensa/relax-loc.d | 7 +++
|
||||
ld/testsuite/ld-xtensa/relax-loc.s | 15 +++++
|
||||
ld/testsuite/ld-xtensa/xtensa.exp | 1 +
|
||||
11 files changed, 183 insertions(+), 7 deletions(-)
|
||||
create mode 100644 ld/testsuite/ld-xtensa/relax-loc.d
|
||||
create mode 100644 ld/testsuite/ld-xtensa/relax-loc.s
|
||||
|
||||
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
|
||||
index 37114607b515..be6a30f57955 100644
|
||||
--- a/bfd/bfd-in2.h
|
||||
+++ b/bfd/bfd-in2.h
|
||||
@@ -5217,7 +5217,9 @@ to one of its own internal functions or data structures. */
|
||||
PLT entries. Otherwise, this is just a generic 32-bit relocation. */
|
||||
BFD_RELOC_XTENSA_PLT,
|
||||
|
||||
-/* Xtensa relocations to mark the difference of two local symbols.
|
||||
+/* Xtensa relocations for backward compatibility. These have been replaced
|
||||
+by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
|
||||
+Xtensa relocations to mark the difference of two local symbols.
|
||||
These are only needed to support linker relaxation and can be ignored
|
||||
when not relaxing. The field is set to the value of the difference
|
||||
assuming no relaxation. The relocation encodes the position of the
|
||||
@@ -5291,6 +5293,22 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */
|
||||
BFD_RELOC_XTENSA_TLS_ARG,
|
||||
BFD_RELOC_XTENSA_TLS_CALL,
|
||||
|
||||
+/* Xtensa relocations to mark the difference of two local symbols.
|
||||
+These are only needed to support linker relaxation and can be ignored
|
||||
+when not relaxing. The field is set to the value of the difference
|
||||
+assuming no relaxation. The relocation encodes the position of the
|
||||
+subtracted symbol so the linker can determine whether to adjust the field
|
||||
+value. PDIFF relocations are used for positive differences, NDIFF
|
||||
+relocations are used for negative differences. The difference value
|
||||
+is treated as unsigned with these relocation types, giving full
|
||||
+8/16 value ranges. */
|
||||
+ BFD_RELOC_XTENSA_PDIFF8,
|
||||
+ BFD_RELOC_XTENSA_PDIFF16,
|
||||
+ BFD_RELOC_XTENSA_PDIFF32,
|
||||
+ BFD_RELOC_XTENSA_NDIFF8,
|
||||
+ BFD_RELOC_XTENSA_NDIFF16,
|
||||
+ BFD_RELOC_XTENSA_NDIFF32,
|
||||
+
|
||||
/* 8 bit signed offset in (ix+d) or (iy+d). */
|
||||
BFD_RELOC_Z80_DISP8,
|
||||
|
||||
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
|
||||
index 473a9d76f289..fded42d52a9a 100644
|
||||
--- a/bfd/elf32-xtensa.c
|
||||
+++ b/bfd/elf32-xtensa.c
|
||||
@@ -325,6 +325,20 @@ static reloc_howto_type elf_howto_table[] =
|
||||
HOWTO (R_XTENSA_TLS_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
|
||||
bfd_elf_xtensa_reloc, "R_XTENSA_TLS_CALL",
|
||||
FALSE, 0, 0, FALSE),
|
||||
+
|
||||
+ HOWTO (R_XTENSA_PDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF8", FALSE, 0, 0xff, FALSE),
|
||||
+ HOWTO (R_XTENSA_PDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF16", FALSE, 0, 0xffff, FALSE),
|
||||
+ HOWTO (R_XTENSA_PDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF32", FALSE, 0, 0xffffffff, FALSE),
|
||||
+
|
||||
+ HOWTO (R_XTENSA_NDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF8", FALSE, 0, 0xff, FALSE),
|
||||
+ HOWTO (R_XTENSA_NDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF16", FALSE, 0, 0xffff, FALSE),
|
||||
+ HOWTO (R_XTENSA_NDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF32", FALSE, 0, 0xffffffff, FALSE),
|
||||
};
|
||||
|
||||
#if DEBUG_GEN_RELOC
|
||||
@@ -364,6 +378,30 @@ elf_xtensa_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
TRACE ("BFD_RELOC_XTENSA_DIFF32");
|
||||
return &elf_howto_table[(unsigned) R_XTENSA_DIFF32 ];
|
||||
|
||||
+ case BFD_RELOC_XTENSA_PDIFF8:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_PDIFF8");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF8 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_PDIFF16:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_PDIFF16");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF16 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_PDIFF32:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_PDIFF32");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF32 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_NDIFF8:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_NDIFF8");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF8 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_NDIFF16:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_NDIFF16");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF16 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_NDIFF32:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_NDIFF32");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF32 ];
|
||||
+
|
||||
case BFD_RELOC_XTENSA_RTLD:
|
||||
TRACE ("BFD_RELOC_XTENSA_RTLD");
|
||||
return &elf_howto_table[(unsigned) R_XTENSA_RTLD ];
|
||||
@@ -1851,6 +1889,12 @@ elf_xtensa_do_reloc (reloc_howto_type *howto,
|
||||
case R_XTENSA_DIFF8:
|
||||
case R_XTENSA_DIFF16:
|
||||
case R_XTENSA_DIFF32:
|
||||
+ case R_XTENSA_PDIFF8:
|
||||
+ case R_XTENSA_PDIFF16:
|
||||
+ case R_XTENSA_PDIFF32:
|
||||
+ case R_XTENSA_NDIFF8:
|
||||
+ case R_XTENSA_NDIFF16:
|
||||
+ case R_XTENSA_NDIFF32:
|
||||
case R_XTENSA_TLS_FUNC:
|
||||
case R_XTENSA_TLS_ARG:
|
||||
case R_XTENSA_TLS_CALL:
|
||||
@@ -9604,7 +9648,13 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
|
||||
if (r_type == R_XTENSA_DIFF8
|
||||
|| r_type == R_XTENSA_DIFF16
|
||||
- || r_type == R_XTENSA_DIFF32)
|
||||
+ || r_type == R_XTENSA_DIFF32
|
||||
+ || r_type == R_XTENSA_PDIFF8
|
||||
+ || r_type == R_XTENSA_PDIFF16
|
||||
+ || r_type == R_XTENSA_PDIFF32
|
||||
+ || r_type == R_XTENSA_NDIFF8
|
||||
+ || r_type == R_XTENSA_NDIFF16
|
||||
+ || r_type == R_XTENSA_NDIFF32)
|
||||
{
|
||||
bfd_signed_vma diff_value = 0;
|
||||
bfd_vma new_end_offset, diff_mask = 0;
|
||||
@@ -9631,8 +9681,27 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
diff_value =
|
||||
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
+ case R_XTENSA_PDIFF8:
|
||||
+ case R_XTENSA_NDIFF8:
|
||||
+ diff_value =
|
||||
+ bfd_get_8 (abfd, &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF16:
|
||||
+ case R_XTENSA_NDIFF16:
|
||||
+ diff_value =
|
||||
+ bfd_get_16 (abfd, &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF32:
|
||||
+ case R_XTENSA_NDIFF32:
|
||||
+ diff_value =
|
||||
+ bfd_get_32 (abfd, &contents[old_source_offset]);
|
||||
+ break;
|
||||
}
|
||||
|
||||
+ if (r_type >= R_XTENSA_NDIFF8
|
||||
+ && r_type <= R_XTENSA_NDIFF32)
|
||||
+ diff_value = -diff_value;
|
||||
+
|
||||
new_end_offset = offset_with_removed_text_map
|
||||
(&target_relax_info->action_list,
|
||||
r_rel.target_offset + diff_value);
|
||||
@@ -9655,6 +9724,24 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
bfd_put_signed_32 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
+ case R_XTENSA_PDIFF8:
|
||||
+ case R_XTENSA_NDIFF8:
|
||||
+ diff_mask = 0xff;
|
||||
+ bfd_put_8 (abfd, diff_value,
|
||||
+ &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF16:
|
||||
+ case R_XTENSA_NDIFF16:
|
||||
+ diff_mask = 0xffff;
|
||||
+ bfd_put_16 (abfd, diff_value,
|
||||
+ &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF32:
|
||||
+ case R_XTENSA_NDIFF32:
|
||||
+ diff_mask = 0xffffffff;
|
||||
+ bfd_put_32 (abfd, diff_value,
|
||||
+ &contents[old_source_offset]);
|
||||
+ break;
|
||||
}
|
||||
|
||||
/* Check for overflow. Sign bits must be all zeroes or all ones */
|
||||
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
|
||||
index 3c184fcadadf..989f4bc0b595 100644
|
||||
--- a/bfd/libbfd.h
|
||||
+++ b/bfd/libbfd.h
|
||||
@@ -2919,6 +2919,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
||||
"BFD_RELOC_XTENSA_TLS_FUNC",
|
||||
"BFD_RELOC_XTENSA_TLS_ARG",
|
||||
"BFD_RELOC_XTENSA_TLS_CALL",
|
||||
+ "BFD_RELOC_XTENSA_PDIFF8",
|
||||
+ "BFD_RELOC_XTENSA_PDIFF16",
|
||||
+ "BFD_RELOC_XTENSA_PDIFF32",
|
||||
+ "BFD_RELOC_XTENSA_NDIFF8",
|
||||
+ "BFD_RELOC_XTENSA_NDIFF16",
|
||||
+ "BFD_RELOC_XTENSA_NDIFF32",
|
||||
"BFD_RELOC_Z80_DISP8",
|
||||
"BFD_RELOC_Z80_BYTE0",
|
||||
"BFD_RELOC_Z80_BYTE1",
|
||||
diff --git a/bfd/reloc.c b/bfd/reloc.c
|
||||
index c4dec86d1d46..f5df8e2ab3eb 100644
|
||||
--- a/bfd/reloc.c
|
||||
+++ b/bfd/reloc.c
|
||||
@@ -6556,6 +6556,8 @@ ENUMX
|
||||
ENUMX
|
||||
BFD_RELOC_XTENSA_DIFF32
|
||||
ENUMDOC
|
||||
+ Xtensa relocations for backward compatibility. These have been replaced
|
||||
+ by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
|
||||
Xtensa relocations to mark the difference of two local symbols.
|
||||
These are only needed to support linker relaxation and can be ignored
|
||||
when not relaxing. The field is set to the value of the difference
|
||||
@@ -6668,6 +6670,28 @@ ENUMX
|
||||
BFD_RELOC_XTENSA_TLS_CALL
|
||||
ENUMDOC
|
||||
Xtensa TLS relocations.
|
||||
+ENUM
|
||||
+ BFD_RELOC_XTENSA_PDIFF8
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_PDIFF16
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_PDIFF32
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_NDIFF8
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_NDIFF16
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_NDIFF32
|
||||
+ENUMDOC
|
||||
+ Xtensa relocations to mark the difference of two local symbols.
|
||||
+ These are only needed to support linker relaxation and can be ignored
|
||||
+ when not relaxing. The field is set to the value of the difference
|
||||
+ assuming no relaxation. The relocation encodes the position of the
|
||||
+ subtracted symbol so the linker can determine whether to adjust the field
|
||||
+ value. PDIFF relocations are used for positive differences, NDIFF
|
||||
+ relocations are used for negative differences. The difference value
|
||||
+ is treated as unsigned with these relocation types, giving full
|
||||
+ 8/16 value ranges.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_Z80_DISP8
|
||||
diff --git a/binutils/readelf.c b/binutils/readelf.c
|
||||
index d4756c93b345..800918f901c8 100644
|
||||
--- a/binutils/readelf.c
|
||||
+++ b/binutils/readelf.c
|
||||
@@ -13262,7 +13262,13 @@ is_none_reloc (Filedata * filedata, unsigned int reloc_type)
|
||||
return (reloc_type == 0 /* R_XTENSA_NONE. */
|
||||
|| reloc_type == 17 /* R_XTENSA_DIFF8. */
|
||||
|| reloc_type == 18 /* R_XTENSA_DIFF16. */
|
||||
- || reloc_type == 19 /* R_XTENSA_DIFF32. */);
|
||||
+ || reloc_type == 19 /* R_XTENSA_DIFF32. */
|
||||
+ || reloc_type == 57 /* R_XTENSA_PDIFF8. */
|
||||
+ || reloc_type == 58 /* R_XTENSA_PDIFF16. */
|
||||
+ || reloc_type == 59 /* R_XTENSA_PDIFF32. */
|
||||
+ || reloc_type == 60 /* R_XTENSA_NDIFF8. */
|
||||
+ || reloc_type == 61 /* R_XTENSA_NDIFF16. */
|
||||
+ || reloc_type == 62 /* R_XTENSA_NDIFF32. */);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
|
||||
index 71d4d94a8d7d..ee75c13548ff 100644
|
||||
--- a/gas/config/tc-xtensa.c
|
||||
+++ b/gas/config/tc-xtensa.c
|
||||
@@ -5974,18 +5974,24 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
|
||||
case BFD_RELOC_8:
|
||||
if (fixP->fx_subsy)
|
||||
{
|
||||
+ bfd_boolean neg = S_GET_VALUE (fixP->fx_addsy) + fixP->fx_offset
|
||||
+ < S_GET_VALUE (fixP->fx_subsy);
|
||||
+
|
||||
switch (fixP->fx_r_type)
|
||||
{
|
||||
case BFD_RELOC_8:
|
||||
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
|
||||
+ fixP->fx_r_type = neg
|
||||
+ ? BFD_RELOC_XTENSA_NDIFF8 : BFD_RELOC_XTENSA_PDIFF8;
|
||||
fixP->fx_signed = 0;
|
||||
break;
|
||||
case BFD_RELOC_16:
|
||||
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16;
|
||||
+ fixP->fx_r_type = neg
|
||||
+ ? BFD_RELOC_XTENSA_NDIFF16 : BFD_RELOC_XTENSA_PDIFF16;
|
||||
fixP->fx_signed = 0;
|
||||
break;
|
||||
case BFD_RELOC_32:
|
||||
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32;
|
||||
+ fixP->fx_r_type = neg
|
||||
+ ? BFD_RELOC_XTENSA_NDIFF32 : BFD_RELOC_XTENSA_PDIFF32;
|
||||
fixP->fx_signed = 0;
|
||||
break;
|
||||
default:
|
||||
diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d
|
||||
index 71983cc90055..8fb3425999d5 100644
|
||||
--- a/gas/testsuite/gas/xtensa/loc.d
|
||||
+++ b/gas/testsuite/gas/xtensa/loc.d
|
||||
@@ -6,5 +6,5 @@
|
||||
|
||||
RELOCATION RECORDS FOR \[\.debug_line\]:
|
||||
#...
|
||||
-.*R_XTENSA_DIFF16.*\.text\+0x00009c42
|
||||
+.*R_XTENSA_PDIFF16.*\.text\+0x00009c42
|
||||
#...
|
||||
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
|
||||
index 2eb5e4e52941..bd5c80d13777 100644
|
||||
--- a/include/elf/xtensa.h
|
||||
+++ b/include/elf/xtensa.h
|
||||
@@ -87,6 +87,12 @@ START_RELOC_NUMBERS (elf_xtensa_reloc_type)
|
||||
RELOC_NUMBER (R_XTENSA_TLS_FUNC, 54)
|
||||
RELOC_NUMBER (R_XTENSA_TLS_ARG, 55)
|
||||
RELOC_NUMBER (R_XTENSA_TLS_CALL, 56)
|
||||
+ RELOC_NUMBER (R_XTENSA_PDIFF8, 57)
|
||||
+ RELOC_NUMBER (R_XTENSA_PDIFF16, 58)
|
||||
+ RELOC_NUMBER (R_XTENSA_PDIFF32, 59)
|
||||
+ RELOC_NUMBER (R_XTENSA_NDIFF8, 60)
|
||||
+ RELOC_NUMBER (R_XTENSA_NDIFF16, 61)
|
||||
+ RELOC_NUMBER (R_XTENSA_NDIFF32, 62)
|
||||
END_RELOC_NUMBERS (R_XTENSA_max)
|
||||
|
||||
/* Processor-specific flags for the ELF header e_flags field. */
|
||||
diff --git a/ld/testsuite/ld-xtensa/relax-loc.d b/ld/testsuite/ld-xtensa/relax-loc.d
|
||||
new file mode 100644
|
||||
index 000000000000..3c8d673732ff
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-xtensa/relax-loc.d
|
||||
@@ -0,0 +1,7 @@
|
||||
+#as: --text-section-literals
|
||||
+#ld:
|
||||
+#objdump: --dwarf=decodedline
|
||||
+#...
|
||||
+relax-loc.s[ ]+1[ ]+0x400054[ ]+.*
|
||||
+relax-loc.s[ ]+2[ ]+0x40005c[ ]+.*
|
||||
+#...
|
||||
diff --git a/ld/testsuite/ld-xtensa/relax-loc.s b/ld/testsuite/ld-xtensa/relax-loc.s
|
||||
new file mode 100644
|
||||
index 000000000000..d768470e287a
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-xtensa/relax-loc.s
|
||||
@@ -0,0 +1,15 @@
|
||||
+ .file 1 "relax-loc.s"
|
||||
+ .globl _start
|
||||
+ .globl _ResetVector
|
||||
+ .text
|
||||
+_ResetVector:
|
||||
+_start:
|
||||
+ .loc 1 1
|
||||
+ j 1f
|
||||
+ .literal_position
|
||||
+1:
|
||||
+ .loc 1 2
|
||||
+
|
||||
+ .rep 10000
|
||||
+ movi a2, 0x12345678
|
||||
+ .endr
|
||||
diff --git a/ld/testsuite/ld-xtensa/xtensa.exp b/ld/testsuite/ld-xtensa/xtensa.exp
|
||||
index 9b2235b2151b..de39887936ad 100644
|
||||
--- a/ld/testsuite/ld-xtensa/xtensa.exp
|
||||
+++ b/ld/testsuite/ld-xtensa/xtensa.exp
|
||||
@@ -27,6 +27,7 @@ run_dump_test "call_overflow"
|
||||
run_dump_test "coalesce"
|
||||
run_dump_test "diff_overflow"
|
||||
run_dump_test "lcall"
|
||||
+run_dump_test "relax-loc"
|
||||
|
||||
run_dump_test "relax-static-pie"
|
||||
run_dump_test "relax-static-local-pie"
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
From 735321812435ae278d3766a3371f55937dc776d6 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sat, 25 Apr 2020 00:40:25 -0700
|
||||
Subject: [PATCH] xtensa: fix XTENSA_NDIFF handling for PR ld/25861
|
||||
|
||||
Fields marked with XTENSA_NDIFF relocations are not negated, they only
|
||||
have sign bits removed. Don't negate their values when relaxation is
|
||||
performed. Don't add sign bits when the value is zero. Report overflow
|
||||
when the result has negative sign but all significant bits are zero.
|
||||
|
||||
2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
|
||||
bfd/
|
||||
* elf32-xtensa.c (relax_section): Don't negate diff_value for
|
||||
XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
|
||||
equals 0. Report overflow when the result has negative sign but
|
||||
all significant bits are zero.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Backported from: d548f47df4d2e3d117d504a4c9977982c78a0556
|
||||
---
|
||||
|
||||
bfd/elf32-xtensa.c | 26 +++++++++++++++-----------
|
||||
1 file changed, 15 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
|
||||
index fded42d52a9a..4327b027911f 100644
|
||||
--- a/bfd/elf32-xtensa.c
|
||||
+++ b/bfd/elf32-xtensa.c
|
||||
@@ -9670,37 +9670,44 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
switch (r_type)
|
||||
{
|
||||
case R_XTENSA_DIFF8:
|
||||
+ diff_mask = 0x7f;
|
||||
diff_value =
|
||||
bfd_get_signed_8 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF16:
|
||||
+ diff_mask = 0x7fff;
|
||||
diff_value =
|
||||
bfd_get_signed_16 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF32:
|
||||
+ diff_mask = 0x7fffffff;
|
||||
diff_value =
|
||||
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF8:
|
||||
case R_XTENSA_NDIFF8:
|
||||
+ diff_mask = 0xff;
|
||||
diff_value =
|
||||
bfd_get_8 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF16:
|
||||
case R_XTENSA_NDIFF16:
|
||||
+ diff_mask = 0xffff;
|
||||
diff_value =
|
||||
bfd_get_16 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF32:
|
||||
case R_XTENSA_NDIFF32:
|
||||
+ diff_mask = 0xffffffff;
|
||||
diff_value =
|
||||
bfd_get_32 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (r_type >= R_XTENSA_NDIFF8
|
||||
- && r_type <= R_XTENSA_NDIFF32)
|
||||
- diff_value = -diff_value;
|
||||
+ && r_type <= R_XTENSA_NDIFF32
|
||||
+ && diff_value)
|
||||
+ diff_value |= ~diff_mask;
|
||||
|
||||
new_end_offset = offset_with_removed_text_map
|
||||
(&target_relax_info->action_list,
|
||||
@@ -9710,43 +9717,40 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
switch (r_type)
|
||||
{
|
||||
case R_XTENSA_DIFF8:
|
||||
- diff_mask = 0x7f;
|
||||
bfd_put_signed_8 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF16:
|
||||
- diff_mask = 0x7fff;
|
||||
bfd_put_signed_16 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF32:
|
||||
- diff_mask = 0x7fffffff;
|
||||
bfd_put_signed_32 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF8:
|
||||
case R_XTENSA_NDIFF8:
|
||||
- diff_mask = 0xff;
|
||||
bfd_put_8 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF16:
|
||||
case R_XTENSA_NDIFF16:
|
||||
- diff_mask = 0xffff;
|
||||
bfd_put_16 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF32:
|
||||
case R_XTENSA_NDIFF32:
|
||||
- diff_mask = 0xffffffff;
|
||||
bfd_put_32 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
}
|
||||
|
||||
- /* Check for overflow. Sign bits must be all zeroes or all ones */
|
||||
- if ((diff_value & ~diff_mask) != 0 &&
|
||||
- (diff_value & ~diff_mask) != (-1 & ~diff_mask))
|
||||
+ /* Check for overflow. Sign bits must be all zeroes or
|
||||
+ all ones. When sign bits are all ones diff_value
|
||||
+ may not be zero. */
|
||||
+ if (((diff_value & ~diff_mask) != 0
|
||||
+ && (diff_value & ~diff_mask) != ~diff_mask)
|
||||
+ || (diff_value && (bfd_vma) diff_value == ~diff_mask))
|
||||
{
|
||||
(*link_info->callbacks->reloc_dangerous)
|
||||
(link_info, _("overflow after relaxation"),
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,432 +0,0 @@
|
||||
From c7a1d1f656c717394937a92cb970f0f4cecce128 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sun, 19 Apr 2020 19:04:41 -0700
|
||||
Subject: [PATCH] xtensa: fix PR ld/25861
|
||||
|
||||
Introduce new relaxations XTENSA_PDIFF{8,16,32} for positive differences
|
||||
(subtracted symbol precedes diminished symbol) and XTENSA_NDIFF{8,16,32}
|
||||
for negative differences (subtracted symbol follows diminished symbol).
|
||||
Don't generate XTENSA_DIFF relocations in the assembler, generate
|
||||
XTENSA_PDIFF or XTENSA_NDIFF based on relative symbol position.
|
||||
|
||||
Handle XTENSA_DIFF in BFD for compatibility with old object files.
|
||||
Handle XTENSA_PDIFF and XTENSA_NDIFF in BFD, treating difference value
|
||||
as unsigned.
|
||||
|
||||
2020-04-22 Max Filippov <jcmvbkbc@gmail.com>
|
||||
bfd/
|
||||
* bfd-in2.h: Regenerated.
|
||||
* elf32-xtensa.c (elf_howto_table): New entries for
|
||||
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
|
||||
(elf_xtensa_reloc_type_lookup, elf_xtensa_do_reloc)
|
||||
(relax_section): Add cases for R_XTENSA_PDIFF{8,16,32} and
|
||||
R_XTENSA_NDIFF{8,16,32}.
|
||||
* libbfd.h (bfd_reloc_code_real_names): Add names for
|
||||
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
|
||||
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
|
||||
* reloc.c: Add documentation for BFD_RELOC_XTENSA_PDIFF{8,16,32}
|
||||
and BFD_RELOC_XTENSA_NDIFF{8,16,32}.
|
||||
|
||||
binutils/
|
||||
* readelf.c (is_none_reloc): Recognize
|
||||
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
|
||||
BFD_RELOC_XTENSA_NDIFF{8,16,32}.
|
||||
|
||||
gas/
|
||||
* config/tc-xtensa.c (md_apply_fix): Replace
|
||||
BFD_RELOC_XTENSA_DIFF{8,16,32} generation with
|
||||
BFD_RELOC_XTENSA_PDIFF{8,16,32} and
|
||||
BFD_RELOC_XTENSA_NDIFF{8,16,32} generation.
|
||||
* testsuite/gas/xtensa/loc.d: Replace BFD_RELOC_XTENSA_DIFF16
|
||||
with BFD_RELOC_XTENSA_PDIFF16 in the expected output.
|
||||
|
||||
include/
|
||||
* elf/xtensa.h (elf_xtensa_reloc_type): New entries for
|
||||
R_XTENSA_PDIFF{8,16,32} and R_XTENSA_NDIFF{8,16,32}.
|
||||
|
||||
ld/
|
||||
* testsuite/ld-xtensa/relax-loc.d: New test definition.
|
||||
* testsuite/ld-xtensa/relax-loc.s: New test source.
|
||||
* testsuite/ld-xtensa/xtensa.exp (relax-loc): New test.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
---
|
||||
Backported from: 30ce8e47fad9b057b6d7af9e1d43061126d34d20
|
||||
|
||||
bfd/bfd-in2.h | 20 ++++++-
|
||||
bfd/elf32-xtensa.c | 89 +++++++++++++++++++++++++++++-
|
||||
bfd/libbfd.h | 6 ++
|
||||
bfd/reloc.c | 24 ++++++++
|
||||
binutils/readelf.c | 8 ++-
|
||||
gas/config/tc-xtensa.c | 12 +++-
|
||||
gas/testsuite/gas/xtensa/loc.d | 2 +-
|
||||
include/elf/xtensa.h | 6 ++
|
||||
ld/testsuite/ld-xtensa/relax-loc.d | 7 +++
|
||||
ld/testsuite/ld-xtensa/relax-loc.s | 15 +++++
|
||||
ld/testsuite/ld-xtensa/xtensa.exp | 1 +
|
||||
11 files changed, 183 insertions(+), 7 deletions(-)
|
||||
create mode 100644 ld/testsuite/ld-xtensa/relax-loc.d
|
||||
create mode 100644 ld/testsuite/ld-xtensa/relax-loc.s
|
||||
|
||||
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
|
||||
index 37114607b515..be6a30f57955 100644
|
||||
--- a/bfd/bfd-in2.h
|
||||
+++ b/bfd/bfd-in2.h
|
||||
@@ -5217,7 +5217,9 @@ to one of its own internal functions or data structures. */
|
||||
PLT entries. Otherwise, this is just a generic 32-bit relocation. */
|
||||
BFD_RELOC_XTENSA_PLT,
|
||||
|
||||
-/* Xtensa relocations to mark the difference of two local symbols.
|
||||
+/* Xtensa relocations for backward compatibility. These have been replaced
|
||||
+by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
|
||||
+Xtensa relocations to mark the difference of two local symbols.
|
||||
These are only needed to support linker relaxation and can be ignored
|
||||
when not relaxing. The field is set to the value of the difference
|
||||
assuming no relaxation. The relocation encodes the position of the
|
||||
@@ -5291,6 +5293,22 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */
|
||||
BFD_RELOC_XTENSA_TLS_ARG,
|
||||
BFD_RELOC_XTENSA_TLS_CALL,
|
||||
|
||||
+/* Xtensa relocations to mark the difference of two local symbols.
|
||||
+These are only needed to support linker relaxation and can be ignored
|
||||
+when not relaxing. The field is set to the value of the difference
|
||||
+assuming no relaxation. The relocation encodes the position of the
|
||||
+subtracted symbol so the linker can determine whether to adjust the field
|
||||
+value. PDIFF relocations are used for positive differences, NDIFF
|
||||
+relocations are used for negative differences. The difference value
|
||||
+is treated as unsigned with these relocation types, giving full
|
||||
+8/16 value ranges. */
|
||||
+ BFD_RELOC_XTENSA_PDIFF8,
|
||||
+ BFD_RELOC_XTENSA_PDIFF16,
|
||||
+ BFD_RELOC_XTENSA_PDIFF32,
|
||||
+ BFD_RELOC_XTENSA_NDIFF8,
|
||||
+ BFD_RELOC_XTENSA_NDIFF16,
|
||||
+ BFD_RELOC_XTENSA_NDIFF32,
|
||||
+
|
||||
/* 8 bit signed offset in (ix+d) or (iy+d). */
|
||||
BFD_RELOC_Z80_DISP8,
|
||||
|
||||
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
|
||||
index 473a9d76f289..fded42d52a9a 100644
|
||||
--- a/bfd/elf32-xtensa.c
|
||||
+++ b/bfd/elf32-xtensa.c
|
||||
@@ -325,6 +325,20 @@ static reloc_howto_type elf_howto_table[] =
|
||||
HOWTO (R_XTENSA_TLS_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont,
|
||||
bfd_elf_xtensa_reloc, "R_XTENSA_TLS_CALL",
|
||||
FALSE, 0, 0, FALSE),
|
||||
+
|
||||
+ HOWTO (R_XTENSA_PDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF8", FALSE, 0, 0xff, FALSE),
|
||||
+ HOWTO (R_XTENSA_PDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF16", FALSE, 0, 0xffff, FALSE),
|
||||
+ HOWTO (R_XTENSA_PDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF32", FALSE, 0, 0xffffffff, FALSE),
|
||||
+
|
||||
+ HOWTO (R_XTENSA_NDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF8", FALSE, 0, 0xff, FALSE),
|
||||
+ HOWTO (R_XTENSA_NDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF16", FALSE, 0, 0xffff, FALSE),
|
||||
+ HOWTO (R_XTENSA_NDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,
|
||||
+ bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF32", FALSE, 0, 0xffffffff, FALSE),
|
||||
};
|
||||
|
||||
#if DEBUG_GEN_RELOC
|
||||
@@ -364,6 +378,30 @@ elf_xtensa_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
|
||||
TRACE ("BFD_RELOC_XTENSA_DIFF32");
|
||||
return &elf_howto_table[(unsigned) R_XTENSA_DIFF32 ];
|
||||
|
||||
+ case BFD_RELOC_XTENSA_PDIFF8:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_PDIFF8");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF8 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_PDIFF16:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_PDIFF16");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF16 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_PDIFF32:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_PDIFF32");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_PDIFF32 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_NDIFF8:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_NDIFF8");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF8 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_NDIFF16:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_NDIFF16");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF16 ];
|
||||
+
|
||||
+ case BFD_RELOC_XTENSA_NDIFF32:
|
||||
+ TRACE ("BFD_RELOC_XTENSA_NDIFF32");
|
||||
+ return &elf_howto_table[(unsigned) R_XTENSA_NDIFF32 ];
|
||||
+
|
||||
case BFD_RELOC_XTENSA_RTLD:
|
||||
TRACE ("BFD_RELOC_XTENSA_RTLD");
|
||||
return &elf_howto_table[(unsigned) R_XTENSA_RTLD ];
|
||||
@@ -1851,6 +1889,12 @@ elf_xtensa_do_reloc (reloc_howto_type *howto,
|
||||
case R_XTENSA_DIFF8:
|
||||
case R_XTENSA_DIFF16:
|
||||
case R_XTENSA_DIFF32:
|
||||
+ case R_XTENSA_PDIFF8:
|
||||
+ case R_XTENSA_PDIFF16:
|
||||
+ case R_XTENSA_PDIFF32:
|
||||
+ case R_XTENSA_NDIFF8:
|
||||
+ case R_XTENSA_NDIFF16:
|
||||
+ case R_XTENSA_NDIFF32:
|
||||
case R_XTENSA_TLS_FUNC:
|
||||
case R_XTENSA_TLS_ARG:
|
||||
case R_XTENSA_TLS_CALL:
|
||||
@@ -9604,7 +9648,13 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
|
||||
if (r_type == R_XTENSA_DIFF8
|
||||
|| r_type == R_XTENSA_DIFF16
|
||||
- || r_type == R_XTENSA_DIFF32)
|
||||
+ || r_type == R_XTENSA_DIFF32
|
||||
+ || r_type == R_XTENSA_PDIFF8
|
||||
+ || r_type == R_XTENSA_PDIFF16
|
||||
+ || r_type == R_XTENSA_PDIFF32
|
||||
+ || r_type == R_XTENSA_NDIFF8
|
||||
+ || r_type == R_XTENSA_NDIFF16
|
||||
+ || r_type == R_XTENSA_NDIFF32)
|
||||
{
|
||||
bfd_signed_vma diff_value = 0;
|
||||
bfd_vma new_end_offset, diff_mask = 0;
|
||||
@@ -9631,8 +9681,27 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
diff_value =
|
||||
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
+ case R_XTENSA_PDIFF8:
|
||||
+ case R_XTENSA_NDIFF8:
|
||||
+ diff_value =
|
||||
+ bfd_get_8 (abfd, &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF16:
|
||||
+ case R_XTENSA_NDIFF16:
|
||||
+ diff_value =
|
||||
+ bfd_get_16 (abfd, &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF32:
|
||||
+ case R_XTENSA_NDIFF32:
|
||||
+ diff_value =
|
||||
+ bfd_get_32 (abfd, &contents[old_source_offset]);
|
||||
+ break;
|
||||
}
|
||||
|
||||
+ if (r_type >= R_XTENSA_NDIFF8
|
||||
+ && r_type <= R_XTENSA_NDIFF32)
|
||||
+ diff_value = -diff_value;
|
||||
+
|
||||
new_end_offset = offset_with_removed_text_map
|
||||
(&target_relax_info->action_list,
|
||||
r_rel.target_offset + diff_value);
|
||||
@@ -9655,6 +9724,24 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
bfd_put_signed_32 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
+ case R_XTENSA_PDIFF8:
|
||||
+ case R_XTENSA_NDIFF8:
|
||||
+ diff_mask = 0xff;
|
||||
+ bfd_put_8 (abfd, diff_value,
|
||||
+ &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF16:
|
||||
+ case R_XTENSA_NDIFF16:
|
||||
+ diff_mask = 0xffff;
|
||||
+ bfd_put_16 (abfd, diff_value,
|
||||
+ &contents[old_source_offset]);
|
||||
+ break;
|
||||
+ case R_XTENSA_PDIFF32:
|
||||
+ case R_XTENSA_NDIFF32:
|
||||
+ diff_mask = 0xffffffff;
|
||||
+ bfd_put_32 (abfd, diff_value,
|
||||
+ &contents[old_source_offset]);
|
||||
+ break;
|
||||
}
|
||||
|
||||
/* Check for overflow. Sign bits must be all zeroes or all ones */
|
||||
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
|
||||
index 3c184fcadadf..989f4bc0b595 100644
|
||||
--- a/bfd/libbfd.h
|
||||
+++ b/bfd/libbfd.h
|
||||
@@ -2919,6 +2919,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
|
||||
"BFD_RELOC_XTENSA_TLS_FUNC",
|
||||
"BFD_RELOC_XTENSA_TLS_ARG",
|
||||
"BFD_RELOC_XTENSA_TLS_CALL",
|
||||
+ "BFD_RELOC_XTENSA_PDIFF8",
|
||||
+ "BFD_RELOC_XTENSA_PDIFF16",
|
||||
+ "BFD_RELOC_XTENSA_PDIFF32",
|
||||
+ "BFD_RELOC_XTENSA_NDIFF8",
|
||||
+ "BFD_RELOC_XTENSA_NDIFF16",
|
||||
+ "BFD_RELOC_XTENSA_NDIFF32",
|
||||
"BFD_RELOC_Z80_DISP8",
|
||||
"BFD_RELOC_Z80_BYTE0",
|
||||
"BFD_RELOC_Z80_BYTE1",
|
||||
diff --git a/bfd/reloc.c b/bfd/reloc.c
|
||||
index c4dec86d1d46..f5df8e2ab3eb 100644
|
||||
--- a/bfd/reloc.c
|
||||
+++ b/bfd/reloc.c
|
||||
@@ -6556,6 +6556,8 @@ ENUMX
|
||||
ENUMX
|
||||
BFD_RELOC_XTENSA_DIFF32
|
||||
ENUMDOC
|
||||
+ Xtensa relocations for backward compatibility. These have been replaced
|
||||
+ by BFD_RELOC_XTENSA_PDIFF and BFD_RELOC_XTENSA_NDIFF.
|
||||
Xtensa relocations to mark the difference of two local symbols.
|
||||
These are only needed to support linker relaxation and can be ignored
|
||||
when not relaxing. The field is set to the value of the difference
|
||||
@@ -6668,6 +6670,28 @@ ENUMX
|
||||
BFD_RELOC_XTENSA_TLS_CALL
|
||||
ENUMDOC
|
||||
Xtensa TLS relocations.
|
||||
+ENUM
|
||||
+ BFD_RELOC_XTENSA_PDIFF8
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_PDIFF16
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_PDIFF32
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_NDIFF8
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_NDIFF16
|
||||
+ENUMX
|
||||
+ BFD_RELOC_XTENSA_NDIFF32
|
||||
+ENUMDOC
|
||||
+ Xtensa relocations to mark the difference of two local symbols.
|
||||
+ These are only needed to support linker relaxation and can be ignored
|
||||
+ when not relaxing. The field is set to the value of the difference
|
||||
+ assuming no relaxation. The relocation encodes the position of the
|
||||
+ subtracted symbol so the linker can determine whether to adjust the field
|
||||
+ value. PDIFF relocations are used for positive differences, NDIFF
|
||||
+ relocations are used for negative differences. The difference value
|
||||
+ is treated as unsigned with these relocation types, giving full
|
||||
+ 8/16 value ranges.
|
||||
|
||||
ENUM
|
||||
BFD_RELOC_Z80_DISP8
|
||||
diff --git a/binutils/readelf.c b/binutils/readelf.c
|
||||
index d4756c93b345..800918f901c8 100644
|
||||
--- a/binutils/readelf.c
|
||||
+++ b/binutils/readelf.c
|
||||
@@ -13262,7 +13262,13 @@ is_none_reloc (Filedata * filedata, unsigned int reloc_type)
|
||||
return (reloc_type == 0 /* R_XTENSA_NONE. */
|
||||
|| reloc_type == 17 /* R_XTENSA_DIFF8. */
|
||||
|| reloc_type == 18 /* R_XTENSA_DIFF16. */
|
||||
- || reloc_type == 19 /* R_XTENSA_DIFF32. */);
|
||||
+ || reloc_type == 19 /* R_XTENSA_DIFF32. */
|
||||
+ || reloc_type == 57 /* R_XTENSA_PDIFF8. */
|
||||
+ || reloc_type == 58 /* R_XTENSA_PDIFF16. */
|
||||
+ || reloc_type == 59 /* R_XTENSA_PDIFF32. */
|
||||
+ || reloc_type == 60 /* R_XTENSA_NDIFF8. */
|
||||
+ || reloc_type == 61 /* R_XTENSA_NDIFF16. */
|
||||
+ || reloc_type == 62 /* R_XTENSA_NDIFF32. */);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
|
||||
index 71d4d94a8d7d..ee75c13548ff 100644
|
||||
--- a/gas/config/tc-xtensa.c
|
||||
+++ b/gas/config/tc-xtensa.c
|
||||
@@ -5974,18 +5974,24 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
|
||||
case BFD_RELOC_8:
|
||||
if (fixP->fx_subsy)
|
||||
{
|
||||
+ bfd_boolean neg = S_GET_VALUE (fixP->fx_addsy) + fixP->fx_offset
|
||||
+ < S_GET_VALUE (fixP->fx_subsy);
|
||||
+
|
||||
switch (fixP->fx_r_type)
|
||||
{
|
||||
case BFD_RELOC_8:
|
||||
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8;
|
||||
+ fixP->fx_r_type = neg
|
||||
+ ? BFD_RELOC_XTENSA_NDIFF8 : BFD_RELOC_XTENSA_PDIFF8;
|
||||
fixP->fx_signed = 0;
|
||||
break;
|
||||
case BFD_RELOC_16:
|
||||
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16;
|
||||
+ fixP->fx_r_type = neg
|
||||
+ ? BFD_RELOC_XTENSA_NDIFF16 : BFD_RELOC_XTENSA_PDIFF16;
|
||||
fixP->fx_signed = 0;
|
||||
break;
|
||||
case BFD_RELOC_32:
|
||||
- fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32;
|
||||
+ fixP->fx_r_type = neg
|
||||
+ ? BFD_RELOC_XTENSA_NDIFF32 : BFD_RELOC_XTENSA_PDIFF32;
|
||||
fixP->fx_signed = 0;
|
||||
break;
|
||||
default:
|
||||
diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d
|
||||
index 71983cc90055..8fb3425999d5 100644
|
||||
--- a/gas/testsuite/gas/xtensa/loc.d
|
||||
+++ b/gas/testsuite/gas/xtensa/loc.d
|
||||
@@ -6,5 +6,5 @@
|
||||
|
||||
RELOCATION RECORDS FOR \[\.debug_line\]:
|
||||
#...
|
||||
-.*R_XTENSA_DIFF16.*\.text\+0x00009c42
|
||||
+.*R_XTENSA_PDIFF16.*\.text\+0x00009c42
|
||||
#...
|
||||
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
|
||||
index 2eb5e4e52941..bd5c80d13777 100644
|
||||
--- a/include/elf/xtensa.h
|
||||
+++ b/include/elf/xtensa.h
|
||||
@@ -87,6 +87,12 @@ START_RELOC_NUMBERS (elf_xtensa_reloc_type)
|
||||
RELOC_NUMBER (R_XTENSA_TLS_FUNC, 54)
|
||||
RELOC_NUMBER (R_XTENSA_TLS_ARG, 55)
|
||||
RELOC_NUMBER (R_XTENSA_TLS_CALL, 56)
|
||||
+ RELOC_NUMBER (R_XTENSA_PDIFF8, 57)
|
||||
+ RELOC_NUMBER (R_XTENSA_PDIFF16, 58)
|
||||
+ RELOC_NUMBER (R_XTENSA_PDIFF32, 59)
|
||||
+ RELOC_NUMBER (R_XTENSA_NDIFF8, 60)
|
||||
+ RELOC_NUMBER (R_XTENSA_NDIFF16, 61)
|
||||
+ RELOC_NUMBER (R_XTENSA_NDIFF32, 62)
|
||||
END_RELOC_NUMBERS (R_XTENSA_max)
|
||||
|
||||
/* Processor-specific flags for the ELF header e_flags field. */
|
||||
diff --git a/ld/testsuite/ld-xtensa/relax-loc.d b/ld/testsuite/ld-xtensa/relax-loc.d
|
||||
new file mode 100644
|
||||
index 000000000000..3c8d673732ff
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-xtensa/relax-loc.d
|
||||
@@ -0,0 +1,7 @@
|
||||
+#as: --text-section-literals
|
||||
+#ld:
|
||||
+#objdump: --dwarf=decodedline
|
||||
+#...
|
||||
+relax-loc.s[ ]+1[ ]+0x400054[ ]+.*
|
||||
+relax-loc.s[ ]+2[ ]+0x40005c[ ]+.*
|
||||
+#...
|
||||
diff --git a/ld/testsuite/ld-xtensa/relax-loc.s b/ld/testsuite/ld-xtensa/relax-loc.s
|
||||
new file mode 100644
|
||||
index 000000000000..d768470e287a
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-xtensa/relax-loc.s
|
||||
@@ -0,0 +1,15 @@
|
||||
+ .file 1 "relax-loc.s"
|
||||
+ .globl _start
|
||||
+ .globl _ResetVector
|
||||
+ .text
|
||||
+_ResetVector:
|
||||
+_start:
|
||||
+ .loc 1 1
|
||||
+ j 1f
|
||||
+ .literal_position
|
||||
+1:
|
||||
+ .loc 1 2
|
||||
+
|
||||
+ .rep 10000
|
||||
+ movi a2, 0x12345678
|
||||
+ .endr
|
||||
diff --git a/ld/testsuite/ld-xtensa/xtensa.exp b/ld/testsuite/ld-xtensa/xtensa.exp
|
||||
index 9b2235b2151b..de39887936ad 100644
|
||||
--- a/ld/testsuite/ld-xtensa/xtensa.exp
|
||||
+++ b/ld/testsuite/ld-xtensa/xtensa.exp
|
||||
@@ -27,6 +27,7 @@ run_dump_test "call_overflow"
|
||||
run_dump_test "coalesce"
|
||||
run_dump_test "diff_overflow"
|
||||
run_dump_test "lcall"
|
||||
+run_dump_test "relax-loc"
|
||||
|
||||
run_dump_test "relax-static-pie"
|
||||
run_dump_test "relax-static-local-pie"
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
From 735321812435ae278d3766a3371f55937dc776d6 Mon Sep 17 00:00:00 2001
|
||||
From: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Date: Sat, 25 Apr 2020 00:40:25 -0700
|
||||
Subject: [PATCH] xtensa: fix XTENSA_NDIFF handling for PR ld/25861
|
||||
|
||||
Fields marked with XTENSA_NDIFF relocations are not negated, they only
|
||||
have sign bits removed. Don't negate their values when relaxation is
|
||||
performed. Don't add sign bits when the value is zero. Report overflow
|
||||
when the result has negative sign but all significant bits are zero.
|
||||
|
||||
2020-04-29 Max Filippov <jcmvbkbc@gmail.com>
|
||||
bfd/
|
||||
* elf32-xtensa.c (relax_section): Don't negate diff_value for
|
||||
XTENSA_NDIFF relocations. Don't add sign bits whe diff_value
|
||||
equals 0. Report overflow when the result has negative sign but
|
||||
all significant bits are zero.
|
||||
|
||||
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
||||
Backported from: d548f47df4d2e3d117d504a4c9977982c78a0556
|
||||
---
|
||||
|
||||
bfd/elf32-xtensa.c | 26 +++++++++++++++-----------
|
||||
1 file changed, 15 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
|
||||
index fded42d52a9a..4327b027911f 100644
|
||||
--- a/bfd/elf32-xtensa.c
|
||||
+++ b/bfd/elf32-xtensa.c
|
||||
@@ -9670,37 +9670,44 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
switch (r_type)
|
||||
{
|
||||
case R_XTENSA_DIFF8:
|
||||
+ diff_mask = 0x7f;
|
||||
diff_value =
|
||||
bfd_get_signed_8 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF16:
|
||||
+ diff_mask = 0x7fff;
|
||||
diff_value =
|
||||
bfd_get_signed_16 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF32:
|
||||
+ diff_mask = 0x7fffffff;
|
||||
diff_value =
|
||||
bfd_get_signed_32 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF8:
|
||||
case R_XTENSA_NDIFF8:
|
||||
+ diff_mask = 0xff;
|
||||
diff_value =
|
||||
bfd_get_8 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF16:
|
||||
case R_XTENSA_NDIFF16:
|
||||
+ diff_mask = 0xffff;
|
||||
diff_value =
|
||||
bfd_get_16 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF32:
|
||||
case R_XTENSA_NDIFF32:
|
||||
+ diff_mask = 0xffffffff;
|
||||
diff_value =
|
||||
bfd_get_32 (abfd, &contents[old_source_offset]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (r_type >= R_XTENSA_NDIFF8
|
||||
- && r_type <= R_XTENSA_NDIFF32)
|
||||
- diff_value = -diff_value;
|
||||
+ && r_type <= R_XTENSA_NDIFF32
|
||||
+ && diff_value)
|
||||
+ diff_value |= ~diff_mask;
|
||||
|
||||
new_end_offset = offset_with_removed_text_map
|
||||
(&target_relax_info->action_list,
|
||||
@@ -9710,43 +9717,40 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
|
||||
switch (r_type)
|
||||
{
|
||||
case R_XTENSA_DIFF8:
|
||||
- diff_mask = 0x7f;
|
||||
bfd_put_signed_8 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF16:
|
||||
- diff_mask = 0x7fff;
|
||||
bfd_put_signed_16 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_DIFF32:
|
||||
- diff_mask = 0x7fffffff;
|
||||
bfd_put_signed_32 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF8:
|
||||
case R_XTENSA_NDIFF8:
|
||||
- diff_mask = 0xff;
|
||||
bfd_put_8 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF16:
|
||||
case R_XTENSA_NDIFF16:
|
||||
- diff_mask = 0xffff;
|
||||
bfd_put_16 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
case R_XTENSA_PDIFF32:
|
||||
case R_XTENSA_NDIFF32:
|
||||
- diff_mask = 0xffffffff;
|
||||
bfd_put_32 (abfd, diff_value,
|
||||
&contents[old_source_offset]);
|
||||
break;
|
||||
}
|
||||
|
||||
- /* Check for overflow. Sign bits must be all zeroes or all ones */
|
||||
- if ((diff_value & ~diff_mask) != 0 &&
|
||||
- (diff_value & ~diff_mask) != (-1 & ~diff_mask))
|
||||
+ /* Check for overflow. Sign bits must be all zeroes or
|
||||
+ all ones. When sign bits are all ones diff_value
|
||||
+ may not be zero. */
|
||||
+ if (((diff_value & ~diff_mask) != 0
|
||||
+ && (diff_value & ~diff_mask) != ~diff_mask)
|
||||
+ || (diff_value && (bfd_vma) diff_value == ~diff_mask))
|
||||
{
|
||||
(*link_info->callbacks->reloc_dangerous)
|
||||
(link_info, _("overflow after relaxation"),
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -15,7 +15,6 @@ BOINC_LICENSE = LGPL-3.0+
|
||||
BOINC_LICENSE_FILES = COPYING COPYING.LESSER
|
||||
BOINC_DEPENDENCIES = host-pkgconf libcurl openssl
|
||||
BOINC_AUTORECONF = YES
|
||||
BOINC_CONF_ENV = ac_cv_path__libcurl_config=$(STAGING_DIR)/usr/bin/curl-config
|
||||
BOINC_CONF_OPTS = \
|
||||
--disable-apps \
|
||||
--disable-boinczip \
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
Use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS.
|
||||
Otherwise it complains of CPPFLAGS in CFLAGS.
|
||||
|
||||
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
||||
|
||||
diff -Nura c-ares-1.10.0.orig/m4/xc-cc-check.m4 c-ares-1.10.0/m4/xc-cc-check.m4
|
||||
--- c-ares-1.10.0.orig/m4/xc-cc-check.m4 2013-12-26 19:40:46.354195974 -0300
|
||||
+++ c-ares-1.10.0/m4/xc-cc-check.m4 2013-12-26 19:41:01.850718535 -0300
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
AC_DEFUN([_XC_PROG_CC], [
|
||||
AC_REQUIRE([_XC_PROG_CC_PREAMBLE])dnl
|
||||
- AC_REQUIRE([XC_CHECK_USER_FLAGS])dnl
|
||||
+ AC_REQUIRE([XC_CHECK_BUILD_FLAGS])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AM_PROG_CC_C_O])dnl
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user