mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-30 16:36:29 +00:00
commit
fa88a04722
40
.github/ISSUE_TEMPLATE.md
vendored
40
.github/ISSUE_TEMPLATE.md
vendored
@ -1,34 +1,54 @@
|
||||
<!-- READ THIS FIRST:
|
||||
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
|
||||
- Make sure you are running the latest version before reporting an issue: https://github.com/home-assistant/core/releases
|
||||
- Make sure you are running the latest version before reporting an issue: https://github.com/home-assistant/operating-system/releases
|
||||
- Do not report issues for integrations here, please refer to https://github.com/home-assistant/core/issues
|
||||
- Do not report issues for Add-Ons here, please refer to
|
||||
Official Add-ons: https://github.com/home-assistant/addons/issues
|
||||
Home Assistant Community Add-ons: https://github.com/hassio-addons/repository
|
||||
- This is for bugs only. Feature and enhancement requests should go in our community forum: https://community.home-assistant.io/c/feature-requests
|
||||
- Provide as many details as possible. Paste logs, configuration sample and code into the backticks. Do not delete any text from this template!
|
||||
- If you have a problem with an add-on, make an issue in its repository.
|
||||
- If you are using Raspberry Pi overlays in config.txt and your system doesn't work anymore please report this to the Raspberry Pi kernel project.
|
||||
|
||||
- Provide as many details as possible. Paste logs, configuration sample and code using blocks with three backticks. Do not delete text from this template!
|
||||
- Please add modifications to boot files, e.g. if you are using Raspberry Pi and did modifications in config.txt.
|
||||
-->
|
||||
|
||||
**HassOS release with the issue:**
|
||||
**Hardware Environment**
|
||||
<!--
|
||||
- Frontend -> Configuration -> Info
|
||||
- Or use this command: hass --version
|
||||
Describe the Homme Assistant image you are using and the hardare environemnt
|
||||
-->
|
||||
- [ ] Raspberry Pi [1/2/3/4]
|
||||
- [ ] ODROID [C2/C4/N2(+)/XU4]
|
||||
- [ ] ASUS Tinker [S]
|
||||
- [ ] Intel NUC (or compatible)
|
||||
- [ ] OVA (Open Virtualization Applicance, on Intel NUC or any other hardware, please add the Hypervisor you are using)
|
||||
|
||||
**Home Assistant OS release:**
|
||||
- [ ] Fresh installation of release x.y
|
||||
- [ ] Updated from version x.y
|
||||
- Additional information (if accessible):
|
||||
<!--
|
||||
- Home Assistant Frontend -> Configuration -> Info (use the copy button in the System Health block)
|
||||
- Or use this command: `ha info`
|
||||
-->
|
||||
|
||||
**Supervisor logs:**
|
||||
<!--
|
||||
- Frontend -> Supervisor -> System
|
||||
- Home Assistant Frontend -> Supervisor -> System (Log Provider Supervisor)
|
||||
- Or use this command: ha su logs
|
||||
-->
|
||||
|
||||
**Journal logs:**
|
||||
<!--
|
||||
- use this command: journalctl
|
||||
- Enable SSH on OS level and login, then use `journalctl`
|
||||
-->
|
||||
|
||||
**Kernel logs:**
|
||||
<!--
|
||||
- use this command: dmesg
|
||||
- Enable SSH on OS level and login, then use `dmesg`.
|
||||
-->
|
||||
|
||||
**Description of problem:**
|
||||
<!--
|
||||
- Is the problem reproducible?
|
||||
- Has this been working before (is this a regression?)
|
||||
- Has there been attempt to rule out harware issues? (different SD card etc.)
|
||||
-->
|
||||
|
10
.github/release-drafter.yml
vendored
10
.github/release-drafter.yml
vendored
@ -1,16 +1,18 @@
|
||||
categories:
|
||||
- title: 'HassOS Core'
|
||||
- title: 'Home Assistant Operating System'
|
||||
label: 'os'
|
||||
- title: 'Build'
|
||||
- title: 'Build System'
|
||||
label: 'build'
|
||||
- title: 'Raspberry Pi'
|
||||
label: 'board/raspberrypi'
|
||||
- title: 'Open Virtual Appliance'
|
||||
label: 'board/ova'
|
||||
- title: 'Intel-Nuc'
|
||||
- title: 'Intel NUC'
|
||||
label: 'board/intel-nuc'
|
||||
- title: 'Hardkernel'
|
||||
- title: 'Hardkernel ODROID'
|
||||
label: 'board/hardkernel'
|
||||
- title: 'ASUS Tinker'
|
||||
label: 'board/tinker'
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
|
81
.github/workflows/dev.yml
vendored
Normal file
81
.github/workflows/dev.yml
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
# Home Assistant Operating System build workflow
|
||||
|
||||
name: Development build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
version:
|
||||
|
||||
name: Generate version
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
outputs:
|
||||
version_dev: ${{ steps.version.outputs.version_dev }}
|
||||
steps:
|
||||
- name: Generate Development build version
|
||||
shell: bash
|
||||
id: version
|
||||
run: |
|
||||
version_dev="dev$(date --utc +'%Y%m%d')"
|
||||
echo "Development version \"${version_dev}\""
|
||||
echo "::set-output name=version_dev::${version_dev}"
|
||||
|
||||
build:
|
||||
name: Release build for ${{ matrix.board.name }}
|
||||
needs: version
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
board:
|
||||
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
|
||||
- {"name": "intel_nuc", "output": "intel-nuc", "runner": "x86-64-runner"}
|
||||
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
|
||||
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
|
||||
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
|
||||
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
|
||||
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
|
||||
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
|
||||
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
|
||||
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
|
||||
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
|
||||
runs-on: ${{ matrix.board.runner }}
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build container
|
||||
run: docker build -t haos-builder .
|
||||
|
||||
- name: 'Add release PKI certs'
|
||||
env:
|
||||
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
|
||||
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
|
||||
run: |
|
||||
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
|
||||
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
BUILDER_UID="$(id -u)"
|
||||
BUILDER_GID="$(id -g)"
|
||||
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
|
||||
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
|
||||
-v "${{ matrix.board.runner }}-build-cache:/cache" \
|
||||
haos-builder make VERSION_DEV=${{ needs.version.outputs.version_dev }} ${{ matrix.board.name }}
|
||||
|
||||
- name: Upload images
|
||||
uses: appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ secrets.DEV_HOST }}
|
||||
username: ${{ secrets.DEV_USERNAME }}
|
||||
port: ${{ secrets.DEV_PORT }}
|
||||
key: ${{ secrets.DEV_SCP_KEY }}
|
||||
source: "release/*"
|
||||
target: ${{ secrets.DEV_TARGET_PATH }}/${{ needs.version.outputs.version_dev }}/
|
||||
strip_components: 1
|
||||
|
20
.github/workflows/pr-checks.yml
vendored
Normal file
20
.github/workflows/pr-checks.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
# Home Assistant Operating System pull-request checks
|
||||
|
||||
name: PR checks
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
linters:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v1
|
||||
- name: Check Dockerfile
|
||||
uses: brpaz/hadolint-action@v1.1.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
- name: Check shell scripts
|
||||
uses: ludeeus/action-shellcheck@1.0.0
|
||||
with:
|
||||
ignore: "buildroot"
|
15
.github/workflows/release-drafter.yml
vendored
Normal file
15
.github/workflows/release-drafter.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
name: Release Drafter
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- rel-4
|
||||
|
||||
jobs:
|
||||
update_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
158
.github/workflows/release.yml
vendored
Normal file
158
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,158 @@
|
||||
# Home Assistant Operating System release build workflow
|
||||
|
||||
name: Release build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
validate_release:
|
||||
name: Validate release
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
outputs:
|
||||
version: ${{ steps.version_check.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Validate version
|
||||
id: version_check
|
||||
run: |
|
||||
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
|
||||
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
|
||||
if [ "${major}.${build}" != "${{ github.event.release.tag_name }}" ]; then
|
||||
echo "Version number in Buildroot metadata is does not match tag (${major}.${build} vs ${{ github.event.release.tag_name }})."
|
||||
exit 1
|
||||
fi
|
||||
echo "::set-output name=version::${major}.${build}"
|
||||
|
||||
build:
|
||||
name: Release build for ${{ matrix.board.name }}
|
||||
needs: validate_release
|
||||
strategy:
|
||||
matrix:
|
||||
board:
|
||||
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
|
||||
- {"name": "intel_nuc", "output": "intel-nuc", "runner": "x86-64-runner"}
|
||||
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
|
||||
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
|
||||
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
|
||||
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
|
||||
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
|
||||
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
|
||||
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
|
||||
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
|
||||
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
|
||||
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
|
||||
runs-on: ${{ matrix.board.runner }}
|
||||
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build container
|
||||
run: docker build -t haos-builder .
|
||||
|
||||
- name: 'Add release PKI certs'
|
||||
env:
|
||||
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
|
||||
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
|
||||
run: |
|
||||
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
|
||||
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
BUILDER_UID="$(id -u)"
|
||||
BUILDER_GID="$(id -g)"
|
||||
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
|
||||
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
|
||||
-v "${{ matrix.board.runner }}-build-cache:/cache" \
|
||||
haos-builder make ${{ matrix.board.name }}
|
||||
|
||||
- name: Upload disk image
|
||||
if: ${{ matrix.board.name != 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.gz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Upload rauc update
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload qcow2 image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.gz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Upload vdi image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.gz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Upload vhdx image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.gz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
- name: Upload vmdk image
|
||||
if: ${{ matrix.board.name == 'ova' }}
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ${{ github.workspace }}/release/hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.gz
|
||||
asset_name: hassos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
bump_version:
|
||||
name: Bump dev version to ${{ needs.validate_release.outputs.version }}
|
||||
needs: [ build, validate_release ]
|
||||
runs-on: [ "ubuntu-20.04" ]
|
||||
|
||||
steps:
|
||||
- name: Initialize git
|
||||
uses: home-assistant/actions/helpers/git-init@master
|
||||
with:
|
||||
name: ${{ secrets.GIT_NAME }}
|
||||
email: ${{ secrets.GIT_EMAIL }}
|
||||
token: ${{ secrets.GIT_TOKEN }}
|
||||
|
||||
- name: Bump Home Assistant OS dev version
|
||||
uses: home-assistant/actions/helpers/version-push@master
|
||||
with:
|
||||
key: "hassos[]"
|
||||
key-description: "Home Assistant OS"
|
||||
version: ${{ needs.validate_release.outputs.version }}
|
||||
channel: "dev"
|
@ -5,15 +5,15 @@ Default Kernel tree: 5.4
|
||||
|
||||
| Board | Version |
|
||||
|-------|---------|
|
||||
| Open Virtual Appliance | 5.4.63 |
|
||||
| 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.63 |
|
||||
| Odroid-C2 | 5.9.6 |
|
||||
| Odroid-C4 | 5.9.6 |
|
||||
| Odroid-N2 | 5.9.6 |
|
||||
| Odroid-XU4 | 5.9.6 |
|
||||
| Intel NUC | 5.4.63 |
|
||||
| Open Virtual Appliance | 5.4.80 |
|
||||
| Raspberry Pi | 5.4.79 |
|
||||
| Raspberry Pi 0-W | 5.4.79 |
|
||||
| Raspberry Pi 2 | 5.4.79 |
|
||||
| Raspberry Pi 3 | 5.4.79 |
|
||||
| Raspberry Pi 4 | 5.4.79 |
|
||||
| Tinker Board | 5.4.80 |
|
||||
| Odroid-C2 | 5.9.11 |
|
||||
| Odroid-C4 | 5.9.11 |
|
||||
| Odroid-N2 | 5.9.11 |
|
||||
| Odroid-XU4 | 5.9.11 |
|
||||
| Intel NUC | 5.4.80 |
|
||||
|
4
Makefile
4
Makefile
@ -3,6 +3,8 @@ RELEASE_DIR = /build/release
|
||||
BUILDROOT=/build/buildroot
|
||||
BUILDROOT_EXTERNAL=/build/buildroot-external
|
||||
DEFCONFIG_DIR = $(BUILDROOT_EXTERNAL)/configs
|
||||
VERSION_DATE := $(shell date --utc +'%Y%m%d')
|
||||
VERSION_DEV := "dev$(VERSION_DATE)"
|
||||
|
||||
TARGETS := $(notdir $(patsubst %_defconfig,%,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
|
||||
TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
|
||||
@ -29,7 +31,7 @@ $(TARGETS_CONFIG): %-config:
|
||||
|
||||
$(TARGETS): %: $(RELEASE_DIR) %-config
|
||||
@echo "build $@"
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL)
|
||||
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
|
||||
cp -f $(O)/images/hassos_* $(RELEASE_DIR)/
|
||||
|
||||
# Do not clean when building for one target
|
||||
|
@ -50,3 +50,9 @@ If you don't have experience with these, embedded systems, buildroot or the buil
|
||||
## Developer Documentation
|
||||
|
||||
All developer documentation is in the [Documentation](./Documentation) directory.
|
||||
|
||||
### Development builds
|
||||
|
||||
The Development build GitHub Action Workflow is a manually triggered workflow
|
||||
which creates Home Assistant OS development builds. The development builds are
|
||||
available at [os-builds.home-assistant.io](https://os-builds.home-assistant.io/).
|
||||
|
@ -1,53 +0,0 @@
|
||||
# https://dev.azure.com/home-assistant
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- dev
|
||||
pr:
|
||||
- dev
|
||||
|
||||
variables:
|
||||
- name: versionHadolint
|
||||
value: 'v1.17.2'
|
||||
- name: versionShellCheck
|
||||
value: 'v0.7.0'
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'Hadolint'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo docker pull hadolint/hadolint:$(versionHadolint)
|
||||
displayName: 'Install Hadolint'
|
||||
- script: |
|
||||
sudo docker run --rm -i \
|
||||
-v $(pwd)/.hadolint.yaml:/.hadolint.yaml:ro \
|
||||
hadolint/hadolint:$(versionHadolint) < Dockerfile
|
||||
displayName: 'Run Hadolint'
|
||||
|
||||
|
||||
- job: 'ShellCheck'
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
steps:
|
||||
- script: |
|
||||
sudo docker pull koalaman/shellcheck:$(versionShellCheck)
|
||||
displayName: 'Install ShellCheck'
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
# Check build script
|
||||
sudo docker run --rm -i \
|
||||
-v $(pwd):/mnt:ro koalaman/shellcheck:$(versionShellCheck) \
|
||||
scripts/*.sh \
|
||||
buildroot-external/scripts/*.sh \
|
||||
buildroot-external/board/**/*.sh \
|
||||
buildroot-external/ota/rauc-hook \
|
||||
buildroot-external/rootfs-overlay/usr/bin/* \
|
||||
buildroot-external/rootfs-overlay/usr/sbin/* \
|
||||
buildroot-external/rootfs-overlay/usr/libexec/* \
|
||||
displayName: 'Run ShellCheck'
|
@ -1,97 +0,0 @@
|
||||
# https://dev.azure.com/home-assistant
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
tags:
|
||||
include:
|
||||
- '*'
|
||||
exclude:
|
||||
- untagged*
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
- name: versionGHR
|
||||
value: 'v0.13.0'
|
||||
- group: github
|
||||
- group: rauc
|
||||
|
||||
jobs:
|
||||
|
||||
- job: 'VersionValidate'
|
||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags')
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- script: |
|
||||
. buildroot-external/meta
|
||||
|
||||
if [ "${VERSION_MAJOR}.${VERSION_BUILD}" != "$(Build.SourceBranchName)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
displayName: 'Check version of branch/tag'
|
||||
|
||||
|
||||
- job: 'Release'
|
||||
dependsOn:
|
||||
- 'VersionValidate'
|
||||
timeoutInMinutes: 240
|
||||
pool:
|
||||
name: 'Buildroot'
|
||||
strategy:
|
||||
maxParallel: 1
|
||||
matrix:
|
||||
OpenVirtualAppliance:
|
||||
board: 'ova'
|
||||
IntelNuc:
|
||||
board: 'intel_nuc'
|
||||
OdroidC2:
|
||||
board: 'odroid_c2'
|
||||
OdroidC4:
|
||||
board: 'odroid_c4'
|
||||
OdroidN2:
|
||||
board: 'odroid_n2'
|
||||
OdroidXU4:
|
||||
board: 'odroid_xu4'
|
||||
RaspberryPi:
|
||||
board: 'rpi'
|
||||
RaspberryPi0-W:
|
||||
board: 'rpi0_w'
|
||||
RaspberryPi2:
|
||||
board: 'rpi2'
|
||||
RaspberryPi3:
|
||||
board: 'rpi3'
|
||||
RaspberryPi3-64:
|
||||
board: 'rpi3_64'
|
||||
RaspberryPi4:
|
||||
board: 'rpi4'
|
||||
RaspberryPi4-64:
|
||||
board: 'rpi4_64'
|
||||
AsusTinker:
|
||||
board: 'tinker'
|
||||
workspace:
|
||||
clean: 'all'
|
||||
steps:
|
||||
- script: |
|
||||
echo -e "-----BEGIN CERTIFICATE-----\n$(releaseCertificate)\n-----END CERTIFICATE-----" > cert.pem
|
||||
echo -e "-----BEGIN PRIVATE KEY-----\n$(releaseKey)\n-----END PRIVATE KEY-----" > key.pem
|
||||
displayName: 'Add release PKI certs'
|
||||
- script: |
|
||||
sudo docker build -t hassos:azure .
|
||||
displayName: 'Build container for HassOS'
|
||||
- script: |
|
||||
curl -SsL https://github.com/tcnksm/ghr/releases/download/$(versionGHR)/ghr_$(versionGHR)_linux_amd64.tar.gz | tar xzf -
|
||||
cp ghr_$(versionGHR)_linux_amd64/ghr .
|
||||
rm -rf ghr_$(versionGHR)_linux_amd64
|
||||
displayName: 'Install GHR'
|
||||
- script: |
|
||||
BUILDER_UID="$(id -u)"
|
||||
BUILDER_GID="$(id -g)"
|
||||
|
||||
sudo docker run --rm --privileged -v "$(pwd):/build" \
|
||||
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
|
||||
-v "/mnt/build-cache:/cache" \
|
||||
hassos:azure make $(board)
|
||||
displayName: 'Build $(board)'
|
||||
- script: |
|
||||
./ghr -t $(githubToken) -replace $(Build.SourceBranchName) release/
|
||||
displayName: 'Upload $(board)'
|
@ -1,8 +1,7 @@
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/libapparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/apparmor/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-bcm43xx/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-rtl8723/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/intel-e1000e/Config.in"
|
||||
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in"
|
||||
|
@ -21,5 +21,5 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
@ -40,16 +40,17 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:2 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:2 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:4 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:4 ${kernel_addr_r} zImage"; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@ -64,10 +65,8 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
echo "Starting kernel"
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
@ -4954,7 +4954,7 @@ CONFIG_RTC_DRV_RK808=m
|
||||
# CONFIG_RTC_DRV_PCF8523 is not set
|
||||
# CONFIG_RTC_DRV_PCF85063 is not set
|
||||
# CONFIG_RTC_DRV_PCF85363 is not set
|
||||
# CONFIG_RTC_DRV_PCF8563 is not set
|
||||
CONFIG_RTC_DRV_PCF8563=y
|
||||
# CONFIG_RTC_DRV_PCF8583 is not set
|
||||
# CONFIG_RTC_DRV_M41T80 is not set
|
||||
# CONFIG_RTC_DRV_BQ32K is not set
|
||||
|
@ -22,6 +22,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,6 @@ setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=ap
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
|
||||
|
||||
usb start
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-gxbb-odroidc2.dtb
|
||||
@ -48,16 +46,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:5 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:7 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@ -72,12 +72,9 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
printenv load_kernel
|
||||
printenv bootargs
|
||||
echo "Starting kernel"
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
@ -19,5 +19,5 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
@ -25,8 +25,6 @@ setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=ap
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
|
||||
|
||||
usb start
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} meson-sm1-odroid-c4.dtb
|
||||
@ -48,16 +46,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:5 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:7 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@ -72,12 +72,9 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
printenv load_kernel
|
||||
printenv bootargs
|
||||
echo "Starting kernel"
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
@ -19,6 +19,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,6 @@ setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=ap
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
|
||||
|
||||
usb start
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
if test "${board_rev}" = "c"; then
|
||||
@ -52,16 +50,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:5 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:7 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@ -76,12 +76,9 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
printenv load_kernel
|
||||
printenv bootargs
|
||||
echo "Starting kernel"
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
@ -26,5 +26,5 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
@ -27,8 +27,6 @@ setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=ap
|
||||
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
|
||||
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
|
||||
|
||||
#usb start
|
||||
|
||||
# Load extraargs
|
||||
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
|
||||
fatload mmc ${devnum}:1 ${fdt_addr_r} exynos5422-odroidxu4.dtb
|
||||
@ -52,16 +50,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:5 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:5 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load mmc ${devnum}:7 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load mmc ${devnum}:7 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@ -76,13 +76,9 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
printenv load_kernel
|
||||
printenv bootargs
|
||||
dmc ${ddr_freq}
|
||||
echo "Starting kernel"
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
@ -1,38 +0,0 @@
|
||||
From f2eead311d9dd9ff7ee0846914147250d7711f98 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f2eead311d9dd9ff7ee0846914147250d7711f98.1603528796.git.stefan@agner.ch>
|
||||
In-Reply-To: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
|
||||
References: <734f52f38625ce29c964517255538b3b0b546e8d.1603528796.git.stefan@agner.ch>
|
||||
From: Scott K Logan <logans@cottsay.net>
|
||||
Date: Fri, 25 Sep 2020 01:43:53 -0700
|
||||
Subject: [PATCH 4/7] arm64: dts: meson: add missing g12 rng clock
|
||||
|
||||
This adds the missing perpheral clock for the RNG for Amlogic G12. As
|
||||
stated in amlogic,meson-rng.yaml, this isn't always necessary for the
|
||||
RNG to function, but is better to have in case the clock is disabled for
|
||||
some reason prior to loading.
|
||||
|
||||
Signed-off-by: Scott K Logan <logans@cottsay.net>
|
||||
Suggested-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
|
||||
Link: https://lore.kernel.org/r/520a1a8ec7a958b3d918d89563ec7e93a4100a45.camel@cottsay.net
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
index 1e83ec5b8c91..81f490e404ca 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
@@ -282,6 +282,8 @@ apb_efuse: bus@30000 {
|
||||
hwrng: rng@218 {
|
||||
compatible = "amlogic,meson-rng";
|
||||
reg = <0x0 0x218 0x0 0x4>;
|
||||
+ clocks = <&clkc CLKID_RNG0>;
|
||||
+ clock-names = "core";
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
@ -0,0 +1,52 @@
|
||||
From 75b8900d6750fa9d44546219a9b925c5df73a985 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <75b8900d6750fa9d44546219a9b925c5df73a985.1605564817.git.stefan@agner.ch>
|
||||
In-Reply-To: <734f52f38625ce29c964517255538b3b0b546e8d.1605564817.git.stefan@agner.ch>
|
||||
References: <734f52f38625ce29c964517255538b3b0b546e8d.1605564817.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 16 Nov 2020 23:11:02 +0100
|
||||
Subject: [PATCH 8/8] arm64: dts: meson: add RTC to ODROID-N2 boards
|
||||
|
||||
All ODROID-N2 boards come with a NXP PCF8563TS RTC connected to I2C bus
|
||||
3. This is the RTC which is connected to the on-board RTC backup battery.
|
||||
Use it as primary RTC.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
index 6982632ae646..40390feba053 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
||||
@@ -13,6 +13,8 @@ / {
|
||||
aliases {
|
||||
serial0 = &uart_AO;
|
||||
ethernet0 = ðmac;
|
||||
+ rtc0 = &board_rtc;
|
||||
+ rtc1 = &vrtc;
|
||||
};
|
||||
|
||||
dioo2133: audio-amplifier-0 {
|
||||
@@ -471,6 +473,18 @@ hdmi_tx_tmds_out: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+&i2c3 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ clock-frequency = <400000>;
|
||||
+
|
||||
+ board_rtc: rtc@51 {
|
||||
+ compatible = "nxp,pcf8563";
|
||||
+ reg = <0x51>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&ir {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&remote_input_ao_pins>;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,5 +1,5 @@
|
||||
From 698972869afda7095e31892c48051350788aa0a1 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <698972869afda7095e31892c48051350788aa0a1.1603550330.git.stefan@agner.ch>
|
||||
From f9877c2895d6c05710a828d0cd46d9f25626b070 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f9877c2895d6c05710a828d0cd46d9f25626b070.1606490648.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Mon, 31 Aug 2020 13:40:18 +0200
|
||||
Subject: [PATCH 1/2] ARM: meson: isolate loading of socinfo
|
||||
@ -9,14 +9,14 @@ reused later.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
arch/arm/mach-meson/board-info.c | 20 ++++++++++++++++++--
|
||||
1 file changed, 18 insertions(+), 2 deletions(-)
|
||||
arch/arm/mach-meson/board-info.c | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
|
||||
index 3abb27e03b..cfcd5bbd3b 100644
|
||||
index 3abb27e03b..c585b12ca5 100644
|
||||
--- a/arch/arm/mach-meson/board-info.c
|
||||
+++ b/arch/arm/mach-meson/board-info.c
|
||||
@@ -126,12 +126,16 @@ static void print_board_model(void)
|
||||
@@ -126,7 +126,7 @@ static void print_board_model(void)
|
||||
printf("Model: %s\n", model ? model : "Unknown");
|
||||
}
|
||||
|
||||
@ -25,17 +25,7 @@ index 3abb27e03b..cfcd5bbd3b 100644
|
||||
{
|
||||
struct regmap *regmap;
|
||||
int nodeoffset, ret;
|
||||
ofnode node;
|
||||
- unsigned int socinfo;
|
||||
+ static unsigned int socinfo = 0;
|
||||
+
|
||||
+ /* Empty socinfo is invalid, so !socinfo is successfully initialized */
|
||||
+ if (socinfo)
|
||||
+ return socinfo;
|
||||
|
||||
/* find the offset of compatible node */
|
||||
nodeoffset = fdt_node_offset_by_compatible(gd->fdt_blob, -1,
|
||||
@@ -158,8 +162,20 @@ int show_board_info(void)
|
||||
@@ -158,8 +158,20 @@ int show_board_info(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -57,5 +47,5 @@ index 3abb27e03b..cfcd5bbd3b 100644
|
||||
socinfo_to_soc_id(socinfo),
|
||||
socinfo_to_package_id(socinfo),
|
||||
--
|
||||
2.29.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 439e2a240062c4be21ac7879b130ef590106cdd8 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <439e2a240062c4be21ac7879b130ef590106cdd8.1603550497.git.stefan@agner.ch>
|
||||
In-Reply-To: <698972869afda7095e31892c48051350788aa0a1.1603550497.git.stefan@agner.ch>
|
||||
References: <698972869afda7095e31892c48051350788aa0a1.1603550497.git.stefan@agner.ch>
|
||||
From 31e32295dc261032d7f5540a0b7f79a4f5a5b807 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <31e32295dc261032d7f5540a0b7f79a4f5a5b807.1606490648.git.stefan@agner.ch>
|
||||
In-Reply-To: <f9877c2895d6c05710a828d0cd46d9f25626b070.1606490648.git.stefan@agner.ch>
|
||||
References: <f9877c2895d6c05710a828d0cd46d9f25626b070.1606490648.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Tue, 4 Aug 2020 13:50:57 +0000
|
||||
Subject: [PATCH 2/2] meson: Add board_rev to env
|
||||
@ -35,10 +35,10 @@ index a90fe55081..c67d12d06c 100644
|
||||
+
|
||||
#endif /* __MESON_BOOT_H__ */
|
||||
diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c
|
||||
index cfcd5bbd3b..3ea7eb7251 100644
|
||||
index c585b12ca5..9dbb997281 100644
|
||||
--- a/arch/arm/mach-meson/board-info.c
|
||||
+++ b/arch/arm/mach-meson/board-info.c
|
||||
@@ -186,3 +186,15 @@ int show_board_info(void)
|
||||
@@ -182,3 +182,15 @@ int show_board_info(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -78,5 +78,5 @@ index caf7fd6810..c2a191ba6a 100644
|
||||
|
||||
if (!eth_env_get_enetaddr("ethaddr", mac_addr)) {
|
||||
--
|
||||
2.29.1
|
||||
2.29.2
|
||||
|
||||
|
@ -15,6 +15,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
@ -22,18 +22,18 @@ function hassos_post_image() {
|
||||
# Virtual Disk images
|
||||
convert_disk_image_virtual
|
||||
|
||||
convert_disk_image_gz vmdk
|
||||
convert_disk_image_gz vhdx
|
||||
convert_disk_image_gz vdi
|
||||
convert_disk_image_gz qcow2
|
||||
convert_disk_image_xz vmdk
|
||||
convert_disk_image_xz vhdx
|
||||
convert_disk_image_xz vdi
|
||||
convert_disk_image_xz qcow2
|
||||
|
||||
# OVA
|
||||
mkdir -p "${OVA_DATA}"
|
||||
rm -f "${HDD_OVA}"
|
||||
|
||||
cp -a ${BOARD_DIR}/home-assistant.ovf "${OVA_DATA}/home-assistant.ovf"
|
||||
cp -a "${BOARD_DIR}/home-assistant.ovf" "${OVA_DATA}/home-assistant.ovf"
|
||||
qemu-img convert -O vmdk -o subformat=streamOptimized "${HDD_IMG}" "${OVA_DATA}/home-assistant.vmdk"
|
||||
(cd "${OVA_DATA}"; sha256sum --tag home-assistant.* >home-assistant.mf)
|
||||
(cd "${OVA_DATA}" || exit 1; sha256sum --tag home-assistant.* >home-assistant.mf)
|
||||
tar -C "${OVA_DATA}" --owner=root --group=root -cf "${HDD_OVA}" home-assistant.ovf home-assistant.vmdk home-assistant.mf
|
||||
|
||||
# Cleanup
|
||||
|
@ -18,8 +18,8 @@
|
||||
<Name>Home Assistant</Name>
|
||||
<ProductSection>
|
||||
<Info>Meta-information about the installed software</Info>
|
||||
<Product>Operating-System</Product>
|
||||
<ProductUrl>https://home-assistant.io</ProductUrl>
|
||||
<Product>Home Assistant Operating System</Product>
|
||||
<ProductUrl>https://www.home-assistant.io</ProductUrl>
|
||||
</ProductSection>
|
||||
<OperatingSystemSection ovf:id="100" vmw:osType="other4xLinux64Guest">
|
||||
<Info>The kind of installed guest operating system</Info>
|
||||
@ -89,6 +89,13 @@
|
||||
<rasd:ResourceSubType>E1000</rasd:ResourceSubType>
|
||||
<rasd:ResourceType>10</rasd:ResourceType>
|
||||
</Item>
|
||||
<Item ovf:required="false">
|
||||
<rasd:AutomaticAllocation>true</rasd:AutomaticAllocation>
|
||||
<rasd:ElementName>Audio</rasd:ElementName>
|
||||
<rasd:InstanceID>11</rasd:InstanceID>
|
||||
<rasd:ResourceSubType>vmware.soundcard.hdaudio</rasd:ResourceSubType>
|
||||
<rasd:ResourceType>1</rasd:ResourceType>
|
||||
</Item>
|
||||
<vmw:Config ovf:required="false" vmw:key="firmware" vmw:value="efi"/>
|
||||
<vmw:ExtraConfig ovf:required="false" vmw:key="cpuid.coresPerSocket" vmw:value="2"/>
|
||||
<vmw:ExtraConfig ovf:required="false" vmw:key="svga.present" vmw:value="TRUE"/>
|
||||
@ -121,11 +128,11 @@
|
||||
</Controllers>
|
||||
</USB>
|
||||
<Network>
|
||||
<Adapter slot="0" enabled="true" type="82540EM">
|
||||
<Adapter slot="0" enabled="true" type="virtio">
|
||||
<BridgedInterface />
|
||||
</Adapter>
|
||||
</Network>
|
||||
<AudioAdapter driver="Null" enabled="false"/>
|
||||
<AudioAdapter controller="HDA" enabled="true"/>
|
||||
<RTC localOrUTC="UTC"/>
|
||||
</Hardware>
|
||||
<StorageControllers>
|
||||
|
@ -5,6 +5,6 @@ BOOTLOADER=barebox
|
||||
KERNEL_FILE=bzImage
|
||||
BOOT_SYS=efi
|
||||
BOOT_SPL=false
|
||||
DISK_SIZE=6
|
||||
DISK_SIZE=32
|
||||
SUPERVISOR_MACHINE=qemux86-64
|
||||
SUPERVISOR_ARCH=amd64
|
||||
|
@ -15,6 +15,8 @@ function hassos_pre_image() {
|
||||
if [[ "${BOARD_ID}" =~ "rpi4" ]]; then
|
||||
cp "${BINARIES_DIR}/rpi-firmware/fixup.dat" "${BOOT_DATA}/fixup4.dat"
|
||||
cp "${BINARIES_DIR}/rpi-firmware/start.elf" "${BOOT_DATA}/start4.elf"
|
||||
cp "${BINARIES_DIR}/rpi-eeprom/pieeprom.sig" "${BOOT_DATA}/pieeprom.sig"
|
||||
cp "${BINARIES_DIR}/rpi-eeprom/pieeprom.upd" "${BOOT_DATA}/pieeprom.upd"
|
||||
else
|
||||
cp -t "${BOOT_DATA}" \
|
||||
"${BINARIES_DIR}/rpi-firmware/fixup.dat" \
|
||||
@ -33,6 +35,6 @@ function hassos_pre_image() {
|
||||
|
||||
|
||||
function hassos_post_image() {
|
||||
convert_disk_image_gz
|
||||
convert_disk_image_xz
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
From 3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
Message-Id: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
From: Florian Fainelli <f.fainelli@gmail.com>
|
||||
Date: Mon, 15 Jun 2020 10:40:41 +0200
|
||||
Subject: [PATCH 1/8] dt-bindings: arm: bcm: Convert BCM2835 firmware binding
|
||||
@ -83,5 +83,5 @@ index 000000000000..cec540c052b6
|
||||
+ };
|
||||
+...
|
||||
--
|
||||
2.29.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 3ad7fb9329eabd1d7f692f612742ca5ac38854a5 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3ad7fb9329eabd1d7f692f612742ca5ac38854a5.1604762912.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
Message-Id: <3ad7fb9329eabd1d7f692f612742ca5ac38854a5.1605346684.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
From: Maxime Ripard <maxime@cerno.tech>
|
||||
Date: Mon, 15 Jun 2020 10:40:42 +0200
|
||||
Subject: [PATCH 2/8] dt-bindings: clock: Add a binding for the RPi Firmware
|
||||
@ -67,5 +67,5 @@ index cec540c052b6..b48ed875eb8e 100644
|
||||
};
|
||||
...
|
||||
--
|
||||
2.29.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 305aeb868929695699e04e26dd590e64ad3c42dd Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <305aeb868929695699e04e26dd590e64ad3c42dd.1604762912.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
Message-Id: <305aeb868929695699e04e26dd590e64ad3c42dd.1605346684.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
From: Maxime Ripard <maxime@cerno.tech>
|
||||
Date: Fri, 26 Jun 2020 13:54:33 +0200
|
||||
Subject: [PATCH 3/8] dt-bindings: arm: bcm: Add a select to the RPI Firmware
|
||||
@ -46,5 +46,5 @@ index b48ed875eb8e..17e4f20c8d39 100644
|
||||
compatible:
|
||||
items:
|
||||
--
|
||||
2.29.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 33743cfcff296b1011e46168ecab185a00e0f00d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <33743cfcff296b1011e46168ecab185a00e0f00d.1604762912.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
Message-Id: <33743cfcff296b1011e46168ecab185a00e0f00d.1605346684.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Mon, 29 Jun 2020 18:18:37 +0200
|
||||
Subject: [PATCH 4/8] dt-bindings: reset: Add a binding for the RPi Firmware
|
||||
@ -79,5 +79,5 @@ index 000000000000..1a4f4c792723
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.29.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From fecb02cc3664de0d1c43ce566ff95c1b68fca51e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <fecb02cc3664de0d1c43ce566ff95c1b68fca51e.1604762912.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
Message-Id: <fecb02cc3664de0d1c43ce566ff95c1b68fca51e.1605346684.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Mon, 29 Jun 2020 18:18:39 +0200
|
||||
Subject: [PATCH 5/8] ARM: dts: bcm2711: Add firmware usb reset node
|
||||
@ -35,5 +35,5 @@ index 21b20e334b1a..d77d61d41bbc 100644
|
||||
|
||||
&gpio {
|
||||
--
|
||||
2.29.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From e0231cd65d8c13be1cebae1e6b5fbef61be6be0d Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e0231cd65d8c13be1cebae1e6b5fbef61be6be0d.1604762912.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
Message-Id: <e0231cd65d8c13be1cebae1e6b5fbef61be6be0d.1605346684.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Mon, 29 Jun 2020 18:18:40 +0200
|
||||
Subject: [PATCH 6/8] ARM: dts: bcm2711: Add reset controller to xHCI node
|
||||
@ -56,5 +56,5 @@ index d77d61d41bbc..513cae21e64c 100644
|
||||
&uart0 {
|
||||
pinctrl-names = "default";
|
||||
--
|
||||
2.29.1
|
||||
2.29.2
|
||||
|
||||
|
@ -0,0 +1,233 @@
|
||||
From 5038cc5a33a1534bd0e521674314938224838ce4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <5038cc5a33a1534bd0e521674314938224838ce4.1605346684.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
From: Arnd Bergmann <arnd@arndb.de>
|
||||
Date: Fri, 13 Nov 2020 15:59:32 +0100
|
||||
Subject: [PATCH 7/8] arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where
|
||||
needed
|
||||
|
||||
Stefan Agner reported a bug when using zsram on 32-bit Arm machines
|
||||
with RAM above the 4GB address boundary:
|
||||
|
||||
Unable to handle kernel NULL pointer dereference at virtual address 00000000
|
||||
pgd = a27bd01c
|
||||
[00000000] *pgd=236a0003, *pmd=1ffa64003
|
||||
Internal error: Oops: 207 [#1] SMP ARM
|
||||
Modules linked in: mdio_bcm_unimac(+) brcmfmac cfg80211 brcmutil raspberrypi_hwmon hci_uart crc32_arm_ce bcm2711_thermal phy_generic genet
|
||||
CPU: 0 PID: 123 Comm: mkfs.ext4 Not tainted 5.9.6 #1
|
||||
Hardware name: BCM2711
|
||||
PC is at zs_map_object+0x94/0x338
|
||||
LR is at zram_bvec_rw.constprop.0+0x330/0xa64
|
||||
pc : [<c0602b38>] lr : [<c0bda6a0>] psr: 60000013
|
||||
sp : e376bbe0 ip : 00000000 fp : c1e2921c
|
||||
r10: 00000002 r9 : c1dda730 r8 : 00000000
|
||||
r7 : e8ff7a00 r6 : 00000000 r5 : 02f9ffa0 r4 : e3710000
|
||||
r3 : 000fdffe r2 : c1e0ce80 r1 : ebf979a0 r0 : 00000000
|
||||
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
|
||||
Control: 30c5383d Table: 235c2a80 DAC: fffffffd
|
||||
Process mkfs.ext4 (pid: 123, stack limit = 0x495a22e6)
|
||||
Stack: (0xe376bbe0 to 0xe376c000)
|
||||
|
||||
As it turns out, zsram needs to know the maximum memory size, which
|
||||
is defined in MAX_PHYSMEM_BITS when CONFIG_SPARSEMEM is set, or in
|
||||
MAX_POSSIBLE_PHYSMEM_BITS on the x86 architecture.
|
||||
|
||||
The same problem will be hit on all 32-bit architectures that have a
|
||||
physical address space larger than 4GB and happen to not enable sparsemem
|
||||
and include asm/sparsemem.h from asm/pgtable.h.
|
||||
|
||||
After the initial discussion, I suggested just always defining
|
||||
MAX_POSSIBLE_PHYSMEM_BITS whenever CONFIG_PHYS_ADDR_T_64BIT is
|
||||
set, or provoking a build error otherwise. This addresses all
|
||||
configurations that can currently have this runtime bug, but
|
||||
leaves all other configurations unchanged.
|
||||
|
||||
I looked up the possible number of bits in source code and
|
||||
datasheets, here is what I found:
|
||||
|
||||
- on ARC, CONFIG_ARC_HAS_PAE40 controls whether 32 or 40 bits are used
|
||||
- on ARM, CONFIG_LPAE enables 40 bit addressing, without it we never
|
||||
support more than 32 bits, even though supersections in theory allow
|
||||
up to 40 bits as well.
|
||||
- on MIPS, some MIPS32r1 or later chips support 36 bits, and MIPS32r5
|
||||
XPA supports up to 60 bits in theory, but 40 bits are more than
|
||||
anyone will ever ship
|
||||
- On PowerPC, there are three different implementations of 36 bit
|
||||
addressing, but 32-bit is used without CONFIG_PTE_64BIT
|
||||
- On RISC-V, the normal page table format can support 34 bit
|
||||
addressing. There is no highmem support on RISC-V, so anything
|
||||
above 2GB is unused, but it might be useful to eventually support
|
||||
CONFIG_ZRAM for high pages.
|
||||
|
||||
Fixes: 61989a80fb3a ("staging: zsmalloc: zsmalloc memory allocation library")
|
||||
Fixes: 02390b87a945 ("mm/zsmalloc: Prepare to variable MAX_PHYSMEM_BITS")
|
||||
Cc: Stefan Agner <stefan@agner.ch>
|
||||
Cc: Mike Rapoport <rppt@kernel.org>
|
||||
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
|
||||
Cc: Nitin Gupta <ngupta@vflare.org>
|
||||
Cc: Minchan Kim <minchan@kernel.org>
|
||||
Cc: Vineet Gupta <vgupta@synopsys.com>
|
||||
Cc: linux-snps-arc@lists.infradead.org
|
||||
Cc: Russell King <linux@armlinux.org.uk>
|
||||
Cc: linux-arm-kernel@lists.infradead.org
|
||||
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||
Cc: linux-mips@vger.kernel.org
|
||||
Cc: Michael Ellerman <mpe@ellerman.id.au>
|
||||
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
||||
Cc: Paul Mackerras <paulus@samba.org>
|
||||
Cc: linuxppc-dev@lists.ozlabs.org
|
||||
Cc: Paul Walmsley <paul.walmsley@sifive.com>
|
||||
Cc: Palmer Dabbelt <palmer@dabbelt.com>
|
||||
Cc: Albert Ou <aou@eecs.berkeley.edu>
|
||||
Cc: linux-riscv@lists.infradead.org
|
||||
Link: https://lore.kernel.org/linux-mm/bdfa44bf1c570b05d6c70898e2bbb0acf234ecdf.1604762181.git.stefan@agner.ch/
|
||||
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
||||
---
|
||||
arch/arc/include/asm/pgtable.h | 2 ++
|
||||
arch/arm/include/asm/pgtable-2level.h | 2 ++
|
||||
arch/arm/include/asm/pgtable-3level.h | 2 ++
|
||||
arch/mips/include/asm/pgtable-32.h | 3 +++
|
||||
arch/powerpc/include/asm/book3s/32/pgtable.h | 2 ++
|
||||
arch/powerpc/include/asm/nohash/32/pgtable.h | 2 ++
|
||||
arch/riscv/include/asm/pgtable-32.h | 2 ++
|
||||
include/asm-generic/pgtable.h | 13 +++++++++++++
|
||||
8 files changed, 28 insertions(+)
|
||||
|
||||
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h
|
||||
index 7addd0301c51..6bdcf9b495b8 100644
|
||||
--- a/arch/arc/include/asm/pgtable.h
|
||||
+++ b/arch/arc/include/asm/pgtable.h
|
||||
@@ -135,8 +135,10 @@
|
||||
|
||||
#ifdef CONFIG_ARC_HAS_PAE40
|
||||
#define PTE_BITS_NON_RWX_IN_PD1 (0xff00000000 | PAGE_MASK | _PAGE_CACHEABLE)
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
#else
|
||||
#define PTE_BITS_NON_RWX_IN_PD1 (PAGE_MASK | _PAGE_CACHEABLE)
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
diff --git a/arch/arm/include/asm/pgtable-2level.h b/arch/arm/include/asm/pgtable-2level.h
|
||||
index 51beec41d48c..50b51ac91fcb 100644
|
||||
--- a/arch/arm/include/asm/pgtable-2level.h
|
||||
+++ b/arch/arm/include/asm/pgtable-2level.h
|
||||
@@ -75,6 +75,8 @@
|
||||
#define PTE_HWTABLE_OFF (PTE_HWTABLE_PTRS * sizeof(pte_t))
|
||||
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u32))
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
+
|
||||
/*
|
||||
* PMD_SHIFT determines the size of the area a second-level page table can map
|
||||
* PGDIR_SHIFT determines what a third-level page table entry can map
|
||||
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
|
||||
index 5b18295021a0..8006a56cc2ce 100644
|
||||
--- a/arch/arm/include/asm/pgtable-3level.h
|
||||
+++ b/arch/arm/include/asm/pgtable-3level.h
|
||||
@@ -25,6 +25,8 @@
|
||||
#define PTE_HWTABLE_OFF (0)
|
||||
#define PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(u64))
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
+
|
||||
/*
|
||||
* PGDIR_SHIFT determines the size a top-level page table entry can map.
|
||||
*/
|
||||
diff --git a/arch/mips/include/asm/pgtable-32.h b/arch/mips/include/asm/pgtable-32.h
|
||||
index ba967148b016..2604fab8a92d 100644
|
||||
--- a/arch/mips/include/asm/pgtable-32.h
|
||||
+++ b/arch/mips/include/asm/pgtable-32.h
|
||||
@@ -155,6 +155,7 @@ static inline void pmd_clear(pmd_t *pmdp)
|
||||
|
||||
#if defined(CONFIG_XPA)
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 40
|
||||
#define pte_pfn(x) (((unsigned long)((x).pte_high >> _PFN_SHIFT)) | (unsigned long)((x).pte_low << _PAGE_PRESENT_SHIFT))
|
||||
static inline pte_t
|
||||
pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
@@ -170,6 +171,7 @@ pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
|
||||
#elif defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#define pte_pfn(x) ((unsigned long)((x).pte_high >> 6))
|
||||
|
||||
static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
@@ -184,6 +186,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
|
||||
|
||||
#else
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#ifdef CONFIG_CPU_VR41XX
|
||||
#define pte_pfn(x) ((unsigned long)((x).pte >> (PAGE_SHIFT + 2)))
|
||||
#define pfn_pte(pfn, prot) __pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot))
|
||||
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
|
||||
index 0796533d37dd..7b6349be621a 100644
|
||||
--- a/arch/powerpc/include/asm/book3s/32/pgtable.h
|
||||
+++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
|
||||
@@ -37,8 +37,10 @@ static inline bool pte_user(pte_t pte)
|
||||
*/
|
||||
#ifdef CONFIG_PTE_64BIT
|
||||
#define PTE_RPN_MASK (~((1ULL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#else
|
||||
#define PTE_RPN_MASK (~((1UL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/*
|
||||
diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h
|
||||
index 552b96eef0c8..3d32d7103ec8 100644
|
||||
--- a/arch/powerpc/include/asm/nohash/32/pgtable.h
|
||||
+++ b/arch/powerpc/include/asm/nohash/32/pgtable.h
|
||||
@@ -148,8 +148,10 @@ int map_kernel_page(unsigned long va, phys_addr_t pa, pgprot_t prot);
|
||||
*/
|
||||
#if defined(CONFIG_PPC32) && defined(CONFIG_PTE_64BIT)
|
||||
#define PTE_RPN_MASK (~((1ULL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 36
|
||||
#else
|
||||
#define PTE_RPN_MASK (~((1UL << PTE_RPN_SHIFT) - 1))
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
#endif
|
||||
|
||||
/*
|
||||
diff --git a/arch/riscv/include/asm/pgtable-32.h b/arch/riscv/include/asm/pgtable-32.h
|
||||
index b0ab66e5fdb1..5b2e79e5bfa5 100644
|
||||
--- a/arch/riscv/include/asm/pgtable-32.h
|
||||
+++ b/arch/riscv/include/asm/pgtable-32.h
|
||||
@@ -14,4 +14,6 @@
|
||||
#define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
|
||||
#define PGDIR_MASK (~(PGDIR_SIZE - 1))
|
||||
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 34
|
||||
+
|
||||
#endif /* _ASM_RISCV_PGTABLE_32_H */
|
||||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
|
||||
index 6fd08cf04add..7a8c43dee873 100644
|
||||
--- a/include/asm-generic/pgtable.h
|
||||
+++ b/include/asm-generic/pgtable.h
|
||||
@@ -1163,6 +1163,19 @@ static inline bool arch_has_pfn_modify_check(void)
|
||||
#define io_remap_pfn_range remap_pfn_range
|
||||
#endif
|
||||
|
||||
+#if !defined(MAX_POSSIBLE_PHYSMEM_BITS) && !defined(CONFIG_64BIT)
|
||||
+#ifdef CONFIG_PHYS_ADDR_T_64BIT
|
||||
+/*
|
||||
+ * ZSMALLOC needs to know the highest PFN on 32-bit architectures
|
||||
+ * with physical address space extension, but falls back to
|
||||
+ * BITS_PER_LONG otherwise.
|
||||
+ */
|
||||
+#error Missing MAX_POSSIBLE_PHYSMEM_BITS definition
|
||||
+#else
|
||||
+#define MAX_POSSIBLE_PHYSMEM_BITS 32
|
||||
+#endif
|
||||
+#endif
|
||||
+
|
||||
#ifndef has_transparent_hugepage
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#define has_transparent_hugepage() 1
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,76 +0,0 @@
|
||||
From 635706b878ef1263c4d495947a51c70c88707bbf Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <635706b878ef1263c4d495947a51c70c88707bbf.1604762912.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1604762912.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Sat, 7 Nov 2020 16:00:09 +0100
|
||||
Subject: [PATCH 7/8] mm/zsmalloc: include sparsemem.h for MAX_PHYSMEM_BITS
|
||||
|
||||
Most architectures define MAX_PHYSMEM_BITS in asm/sparsemem.h and don't
|
||||
include it in asm/pgtable.h. Include asm/sparsemem.h directly to get
|
||||
the MAX_PHYSMEM_BITS define on all architectures.
|
||||
|
||||
This fixes a crash when accessing zram on 32-bit ARM platform with LPAE and
|
||||
more than 4GB of memory:
|
||||
Unable to handle kernel NULL pointer dereference at virtual address 00000000
|
||||
pgd = a27bd01c
|
||||
[00000000] *pgd=236a0003, *pmd=1ffa64003
|
||||
Internal error: Oops: 207 [#1] SMP ARM
|
||||
Modules linked in: mdio_bcm_unimac(+) brcmfmac cfg80211 brcmutil raspberrypi_hwmon hci_uart crc32_arm_ce bcm2711_thermal phy_generic genet
|
||||
CPU: 0 PID: 123 Comm: mkfs.ext4 Not tainted 5.9.6 #1
|
||||
Hardware name: BCM2711
|
||||
PC is at zs_map_object+0x94/0x338
|
||||
LR is at zram_bvec_rw.constprop.0+0x330/0xa64
|
||||
pc : [<c0602b38>] lr : [<c0bda6a0>] psr: 60000013
|
||||
sp : e376bbe0 ip : 00000000 fp : c1e2921c
|
||||
r10: 00000002 r9 : c1dda730 r8 : 00000000
|
||||
r7 : e8ff7a00 r6 : 00000000 r5 : 02f9ffa0 r4 : e3710000
|
||||
r3 : 000fdffe r2 : c1e0ce80 r1 : ebf979a0 r0 : 00000000
|
||||
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
|
||||
Control: 30c5383d Table: 235c2a80 DAC: fffffffd
|
||||
Process mkfs.ext4 (pid: 123, stack limit = 0x495a22e6)
|
||||
Stack: (0xe376bbe0 to 0xe376c000)
|
||||
...
|
||||
[<c0602b38>] (zs_map_object) from [<c0bda6a0>] (zram_bvec_rw.constprop.0+0x330/0xa64)
|
||||
[<c0bda6a0>] (zram_bvec_rw.constprop.0) from [<c0bdaf78>] (zram_submit_bio+0x1a4/0x40c)
|
||||
[<c0bdaf78>] (zram_submit_bio) from [<c085806c>] (submit_bio_noacct+0xd0/0x3c8)
|
||||
[<c085806c>] (submit_bio_noacct) from [<c08583b0>] (submit_bio+0x4c/0x190)
|
||||
[<c08583b0>] (submit_bio) from [<c06496b4>] (submit_bh_wbc+0x188/0x1b8)
|
||||
[<c06496b4>] (submit_bh_wbc) from [<c064ce98>] (__block_write_full_page+0x340/0x5e4)
|
||||
[<c064ce98>] (__block_write_full_page) from [<c064d3ec>] (block_write_full_page+0x128/0x170)
|
||||
[<c064d3ec>] (block_write_full_page) from [<c0591ae8>] (__writepage+0x14/0x68)
|
||||
[<c0591ae8>] (__writepage) from [<c0593efc>] (write_cache_pages+0x1bc/0x494)
|
||||
[<c0593efc>] (write_cache_pages) from [<c059422c>] (generic_writepages+0x58/0x8c)
|
||||
[<c059422c>] (generic_writepages) from [<c0594c24>] (do_writepages+0x48/0xec)
|
||||
[<c0594c24>] (do_writepages) from [<c0589330>] (__filemap_fdatawrite_range+0xf0/0x128)
|
||||
[<c0589330>] (__filemap_fdatawrite_range) from [<c05894bc>] (file_write_and_wait_range+0x48/0x98)
|
||||
[<c05894bc>] (file_write_and_wait_range) from [<c064f3f8>] (blkdev_fsync+0x1c/0x44)
|
||||
[<c064f3f8>] (blkdev_fsync) from [<c064408c>] (do_fsync+0x3c/0x70)
|
||||
[<c064408c>] (do_fsync) from [<c0400374>] (__sys_trace_return+0x0/0x2c)
|
||||
Exception stack(0xe376bfa8 to 0xe376bff0)
|
||||
bfa0: 0003d2e0 b6f7b6f0 00000003 00046e40 00001000 00000000
|
||||
bfc0: 0003d2e0 b6f7b6f0 00000000 00000076 00000000 00000000 befcbb20 befcbb28
|
||||
bfe0: b6f4e060 befcbad8 b6f23e0c b6dc4a80
|
||||
Code: e5927000 e0050391 e0871005 e5918018 (e5983000)
|
||||
|
||||
Fixes: 61989a80fb3a ("staging: zsmalloc: zsmalloc memory allocation library")
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
mm/zsmalloc.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
|
||||
index 22d17ecfe7df..b815c39dda19 100644
|
||||
--- a/mm/zsmalloc.c
|
||||
+++ b/mm/zsmalloc.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
+#include <asm/sparsemem.h>
|
||||
#include <asm/tlbflush.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <linux/cpumask.h>
|
||||
--
|
||||
2.29.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From df50ba2a4538ce9a43d28c2a9ef56377b7bad59f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <df50ba2a4538ce9a43d28c2a9ef56377b7bad59f.1605026982.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605026982.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605026982.git.stefan@agner.ch>
|
||||
From c18ca341da823bd2ec5aa04ea5970d3867eaae73 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c18ca341da823bd2ec5aa04ea5970d3867eaae73.1605346684.git.stefan@agner.ch>
|
||||
In-Reply-To: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
References: <3651b4af52d63d4e37f40c7a6d0809b0a6c9dd73.1605346684.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Tue, 2 Jun 2020 21:20:08 +0000
|
||||
Subject: [PATCH 8/8] ARM: dts: bcm283x: add compatible picked up by U-Boot
|
||||
@ -72,5 +72,5 @@ index 4426f9e6ba92..abcf677fe416 100644
|
||||
interrupts = <2 25>;
|
||||
clocks = <&clocks BCM2835_CLOCK_UART>,
|
||||
--
|
||||
2.29.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
From a04331a6ba7334282836bbaa76e979c4e6be3900 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a04331a6ba7334282836bbaa76e979c4e6be3900.1602102849.git.stefan@agner.ch>
|
||||
Message-Id: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Tue, 10 Dec 2019 09:48:46 +0000
|
||||
Subject: [PATCH 1/2] rpi: Use CONFIG_OF_BOARD instead of CONFIG_EMBED
|
||||
Subject: [PATCH 01/15] rpi: Use CONFIG_OF_BOARD instead of CONFIG_EMBED
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@ -79,5 +79,5 @@ index b5ad53c37b..223fc03275 100644
|
||||
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
|
||||
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
|
||||
--
|
||||
2.28.0
|
||||
2.29.2
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
From cc40a554b003df9b07f8a55f69a94d7393d81cbc Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <cc40a554b003df9b07f8a55f69a94d7393d81cbc.1602102849.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1602102849.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1602102849.git.stefan@agner.ch>
|
||||
Message-Id: <cc40a554b003df9b07f8a55f69a94d7393d81cbc.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Florin Sarbu <florin@balena.io>
|
||||
Date: Thu, 12 Sep 2019 12:31:31 +0200
|
||||
Subject: [PATCH 2/2] raspberrypi: Disable simple framebuffer support
|
||||
Subject: [PATCH 02/15] raspberrypi: Disable simple framebuffer support
|
||||
|
||||
On 4.19 kernels this u-boot driver clashes with bcm2708_fb.
|
||||
So let's disable it from here so that we have bcm2708_fb
|
||||
@ -61,5 +61,5 @@ index 834f1cd236..19a0d611c4 100644
|
||||
#ifdef CONFIG_CMD_USB
|
||||
#define CONFIG_TFTP_TSIZE
|
||||
--
|
||||
2.28.0
|
||||
2.29.2
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
From b0895f2384712f3d0d89405c06519da195e9ccc9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b0895f2384712f3d0d89405c06519da195e9ccc9.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Thu, 26 Nov 2020 17:56:01 +0100
|
||||
Subject: [PATCH 03/15] rpi: force a smaller amount of memory
|
||||
|
||||
This fixes booting from USB on 32-bit installations. It seems not to
|
||||
affect the detected memory or SD card boot negatively.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
board/raspberrypi/rpi/rpi.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
|
||||
index 5cfee7c00a..18e60e76cc 100644
|
||||
--- a/board/raspberrypi/rpi/rpi.c
|
||||
+++ b/board/raspberrypi/rpi/rpi.c
|
||||
@@ -267,6 +267,10 @@ int dram_init(void)
|
||||
}
|
||||
|
||||
gd->ram_size = msg->get_arm_mem.body.resp.mem_size;
|
||||
+#ifdef CONFIG_TARGET_RPI_4_32B
|
||||
+ printf("(fixing) ");
|
||||
+ gd->ram_size = SZ_512M;
|
||||
+#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,91 @@
|
||||
From 000f636c9ea4909a23119ba65d3a3847687c8c6b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <000f636c9ea4909a23119ba65d3a3847687c8c6b.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
|
||||
Date: Tue, 8 Sep 2020 18:59:59 +0200
|
||||
Subject: [PATCH 04/15] usb: xhci: convert to TRB_TYPE()
|
||||
|
||||
Use TRB_TYPE(p) instead of ((p) << TRB_TYPE_SHIFT)
|
||||
|
||||
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
|
||||
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
|
||||
---
|
||||
drivers/usb/host/xhci-mem.c | 3 +--
|
||||
drivers/usb/host/xhci-ring.c | 11 +++++------
|
||||
include/usb/xhci.h | 1 -
|
||||
3 files changed, 6 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
|
||||
index 1da0524aa0..d627aa5555 100644
|
||||
--- a/drivers/usb/host/xhci-mem.c
|
||||
+++ b/drivers/usb/host/xhci-mem.c
|
||||
@@ -236,8 +236,7 @@ static void xhci_link_segments(struct xhci_segment *prev,
|
||||
*/
|
||||
val = le32_to_cpu(prev->trbs[TRBS_PER_SEGMENT-1].link.control);
|
||||
val &= ~TRB_TYPE_BITMASK;
|
||||
- val |= (TRB_LINK << TRB_TYPE_SHIFT);
|
||||
-
|
||||
+ val |= TRB_TYPE(TRB_LINK);
|
||||
prev->trbs[TRBS_PER_SEGMENT-1].link.control = cpu_to_le32(val);
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
|
||||
index 092ed6eaf1..a893277c75 100644
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -699,7 +699,7 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe,
|
||||
trb_fields[0] = lower_32_bits(addr);
|
||||
trb_fields[1] = upper_32_bits(addr);
|
||||
trb_fields[2] = length_field;
|
||||
- trb_fields[3] = field | (TRB_NORMAL << TRB_TYPE_SHIFT);
|
||||
+ trb_fields[3] = field | TRB_TYPE(TRB_NORMAL);
|
||||
|
||||
queue_trb(ctrl, ring, (num_trbs > 1), trb_fields);
|
||||
|
||||
@@ -825,7 +825,7 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
|
||||
/* Queue setup TRB - see section 6.4.1.2.1 */
|
||||
/* FIXME better way to translate setup_packet into two u32 fields? */
|
||||
field = 0;
|
||||
- field |= TRB_IDT | (TRB_SETUP << TRB_TYPE_SHIFT);
|
||||
+ field |= TRB_IDT | TRB_TYPE(TRB_SETUP);
|
||||
if (start_cycle == 0)
|
||||
field |= 0x1;
|
||||
|
||||
@@ -862,9 +862,9 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
|
||||
/* If there's data, queue data TRBs */
|
||||
/* Only set interrupt on short packet for IN endpoints */
|
||||
if (usb_pipein(pipe))
|
||||
- field = TRB_ISP | (TRB_DATA << TRB_TYPE_SHIFT);
|
||||
+ field = TRB_ISP | TRB_TYPE(TRB_DATA);
|
||||
else
|
||||
- field = (TRB_DATA << TRB_TYPE_SHIFT);
|
||||
+ field = TRB_TYPE(TRB_DATA);
|
||||
|
||||
length_field = (length & TRB_LEN_MASK) | xhci_td_remainder(length) |
|
||||
((0 & TRB_INTR_TARGET_MASK) << TRB_INTR_TARGET_SHIFT);
|
||||
@@ -904,8 +904,7 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
|
||||
trb_fields[2] = ((0 & TRB_INTR_TARGET_MASK) << TRB_INTR_TARGET_SHIFT);
|
||||
/* Event on completion */
|
||||
trb_fields[3] = field | TRB_IOC |
|
||||
- (TRB_STATUS << TRB_TYPE_SHIFT) |
|
||||
- ep_ring->cycle_state;
|
||||
+ TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state;
|
||||
|
||||
queue_trb(ctrl, ep_ring, false, trb_fields);
|
||||
|
||||
diff --git a/include/usb/xhci.h b/include/usb/xhci.h
|
||||
index 7d34103fd5..6e7a040379 100644
|
||||
--- a/include/usb/xhci.h
|
||||
+++ b/include/usb/xhci.h
|
||||
@@ -903,7 +903,6 @@ union xhci_trb {
|
||||
/* TRB bit mask */
|
||||
#define TRB_TYPE_BITMASK (0xfc00)
|
||||
#define TRB_TYPE(p) ((p) << 10)
|
||||
-#define TRB_TYPE_SHIFT (10)
|
||||
#define TRB_FIELD_TO_TYPE(p) (((p) & TRB_TYPE_BITMASK) >> 10)
|
||||
|
||||
/* TRB type IDs */
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,121 @@
|
||||
From bab3fd38c8eec5f3d12e41e706c02c79b4c4a21e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <bab3fd38c8eec5f3d12e41e706c02c79b4c4a21e.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
|
||||
Date: Tue, 8 Sep 2020 19:00:02 +0200
|
||||
Subject: [PATCH 05/15] usb: xhci: use macros with parameter to fill ep_info2
|
||||
|
||||
Use macros with parameter to fill ep_info2, then some macros
|
||||
for MASK and SHIFT can be removed
|
||||
|
||||
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
|
||||
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
|
||||
---
|
||||
drivers/usb/host/xhci-mem.c | 15 +++++----------
|
||||
drivers/usb/host/xhci.c | 6 ++----
|
||||
include/usb/xhci.h | 6 ------
|
||||
3 files changed, 7 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
|
||||
index d627aa5555..0b49614995 100644
|
||||
--- a/drivers/usb/host/xhci-mem.c
|
||||
+++ b/drivers/usb/host/xhci-mem.c
|
||||
@@ -825,25 +825,22 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl,
|
||||
|
||||
/* Step 4 - ring already allocated */
|
||||
/* Step 5 */
|
||||
- ep0_ctx->ep_info2 = cpu_to_le32(CTRL_EP << EP_TYPE_SHIFT);
|
||||
+ ep0_ctx->ep_info2 = cpu_to_le32(EP_TYPE(CTRL_EP));
|
||||
debug("SPEED = %d\n", speed);
|
||||
|
||||
switch (speed) {
|
||||
case USB_SPEED_SUPER:
|
||||
- ep0_ctx->ep_info2 |= cpu_to_le32(((512 & MAX_PACKET_MASK) <<
|
||||
- MAX_PACKET_SHIFT));
|
||||
+ ep0_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(512));
|
||||
debug("Setting Packet size = 512bytes\n");
|
||||
break;
|
||||
case USB_SPEED_HIGH:
|
||||
/* USB core guesses at a 64-byte max packet first for FS devices */
|
||||
case USB_SPEED_FULL:
|
||||
- ep0_ctx->ep_info2 |= cpu_to_le32(((64 & MAX_PACKET_MASK) <<
|
||||
- MAX_PACKET_SHIFT));
|
||||
+ ep0_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(64));
|
||||
debug("Setting Packet size = 64bytes\n");
|
||||
break;
|
||||
case USB_SPEED_LOW:
|
||||
- ep0_ctx->ep_info2 |= cpu_to_le32(((8 & MAX_PACKET_MASK) <<
|
||||
- MAX_PACKET_SHIFT));
|
||||
+ ep0_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(8));
|
||||
debug("Setting Packet size = 8bytes\n");
|
||||
break;
|
||||
default:
|
||||
@@ -852,9 +849,7 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl,
|
||||
}
|
||||
|
||||
/* EP 0 can handle "burst" sizes of 1, so Max Burst Size field is 0 */
|
||||
- ep0_ctx->ep_info2 |=
|
||||
- cpu_to_le32(((0 & MAX_BURST_MASK) << MAX_BURST_SHIFT) |
|
||||
- ((3 & ERROR_COUNT_MASK) << ERROR_COUNT_SHIFT));
|
||||
+ ep0_ctx->ep_info2 |= cpu_to_le32(MAX_BURST(0) | ERROR_COUNT(3));
|
||||
|
||||
trb_64 = virt_to_phys(virt_dev->eps[0].ring->first_seg->trbs);
|
||||
ep0_ctx->deq = cpu_to_le64(trb_64 | virt_dev->eps[0].ring->cycle_state);
|
||||
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
|
||||
index 126dabc11b..999ef79173 100644
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -618,8 +618,7 @@ static int xhci_set_configuration(struct usb_device *udev)
|
||||
cpu_to_le32(EP_MAX_ESIT_PAYLOAD_HI(max_esit_payload) |
|
||||
EP_INTERVAL(interval) | EP_MULT(mult));
|
||||
|
||||
- ep_ctx[ep_index]->ep_info2 =
|
||||
- cpu_to_le32(ep_type << EP_TYPE_SHIFT);
|
||||
+ ep_ctx[ep_index]->ep_info2 = cpu_to_le32(EP_TYPE(ep_type));
|
||||
ep_ctx[ep_index]->ep_info2 |=
|
||||
cpu_to_le32(MAX_PACKET
|
||||
(get_unaligned(&endpt_desc->wMaxPacketSize)));
|
||||
@@ -832,8 +831,7 @@ int xhci_check_maxpacket(struct usb_device *udev)
|
||||
ctrl->devs[slot_id]->out_ctx, ep_index);
|
||||
in_ctx = ctrl->devs[slot_id]->in_ctx;
|
||||
ep_ctx = xhci_get_ep_ctx(ctrl, in_ctx, ep_index);
|
||||
- ep_ctx->ep_info2 &= cpu_to_le32(~((0xffff & MAX_PACKET_MASK)
|
||||
- << MAX_PACKET_SHIFT));
|
||||
+ ep_ctx->ep_info2 &= cpu_to_le32(~MAX_PACKET(MAX_PACKET_MASK));
|
||||
ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet_size));
|
||||
|
||||
/*
|
||||
diff --git a/include/usb/xhci.h b/include/usb/xhci.h
|
||||
index 6e7a040379..2e201bcbfa 100644
|
||||
--- a/include/usb/xhci.h
|
||||
+++ b/include/usb/xhci.h
|
||||
@@ -634,11 +634,8 @@ struct xhci_ep_ctx {
|
||||
*/
|
||||
#define FORCE_EVENT (0x1)
|
||||
#define ERROR_COUNT(p) (((p) & 0x3) << 1)
|
||||
-#define ERROR_COUNT_SHIFT (1)
|
||||
-#define ERROR_COUNT_MASK (0x3)
|
||||
#define CTX_TO_EP_TYPE(p) (((p) >> 3) & 0x7)
|
||||
#define EP_TYPE(p) ((p) << 3)
|
||||
-#define EP_TYPE_SHIFT (3)
|
||||
#define ISOC_OUT_EP 1
|
||||
#define BULK_OUT_EP 2
|
||||
#define INT_OUT_EP 3
|
||||
@@ -649,13 +646,10 @@ struct xhci_ep_ctx {
|
||||
/* bit 6 reserved */
|
||||
/* bit 7 is Host Initiate Disable - for disabling stream selection */
|
||||
#define MAX_BURST(p) (((p)&0xff) << 8)
|
||||
-#define MAX_BURST_MASK (0xff)
|
||||
-#define MAX_BURST_SHIFT (8)
|
||||
#define CTX_TO_MAX_BURST(p) (((p) >> 8) & 0xff)
|
||||
#define MAX_PACKET(p) (((p)&0xffff) << 16)
|
||||
#define MAX_PACKET_MASK (0xffff)
|
||||
#define MAX_PACKET_DECODED(p) (((p) >> 16) & 0xffff)
|
||||
-#define MAX_PACKET_SHIFT (16)
|
||||
|
||||
/* Get max packet size from ep desc. Bit 10..0 specify the max packet size.
|
||||
* USB2.0 spec 9.6.6.
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,95 @@
|
||||
From 8591faf0da31be68ea45fdc8a0485c0163a3eb52 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8591faf0da31be68ea45fdc8a0485c0163a3eb52.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
Date: Tue, 29 Sep 2020 22:03:01 +0200
|
||||
Subject: [PATCH 06/15] usb: xhci: avoid type conversion of void *
|
||||
|
||||
void * can be assigned to any pointer variable. Avoid unnecessary
|
||||
conversions.
|
||||
|
||||
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||
---
|
||||
drivers/usb/host/xhci-mem.c | 21 +++++++++------------
|
||||
1 file changed, 9 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
|
||||
index 0b49614995..b002d6f166 100644
|
||||
--- a/drivers/usb/host/xhci-mem.c
|
||||
+++ b/drivers/usb/host/xhci-mem.c
|
||||
@@ -279,10 +279,10 @@ static struct xhci_segment *xhci_segment_alloc(void)
|
||||
{
|
||||
struct xhci_segment *seg;
|
||||
|
||||
- seg = (struct xhci_segment *)malloc(sizeof(struct xhci_segment));
|
||||
+ seg = malloc(sizeof(struct xhci_segment));
|
||||
BUG_ON(!seg);
|
||||
|
||||
- seg->trbs = (union xhci_trb *)xhci_malloc(SEGMENT_SIZE);
|
||||
+ seg->trbs = xhci_malloc(SEGMENT_SIZE);
|
||||
|
||||
seg->next = NULL;
|
||||
|
||||
@@ -309,7 +309,7 @@ struct xhci_ring *xhci_ring_alloc(unsigned int num_segs, bool link_trbs)
|
||||
struct xhci_ring *ring;
|
||||
struct xhci_segment *prev;
|
||||
|
||||
- ring = (struct xhci_ring *)malloc(sizeof(struct xhci_ring));
|
||||
+ ring = malloc(sizeof(struct xhci_ring));
|
||||
BUG_ON(!ring);
|
||||
|
||||
if (num_segs == 0)
|
||||
@@ -425,8 +425,7 @@ static struct xhci_container_ctx
|
||||
{
|
||||
struct xhci_container_ctx *ctx;
|
||||
|
||||
- ctx = (struct xhci_container_ctx *)
|
||||
- malloc(sizeof(struct xhci_container_ctx));
|
||||
+ ctx = malloc(sizeof(struct xhci_container_ctx));
|
||||
BUG_ON(!ctx);
|
||||
|
||||
BUG_ON((type != XHCI_CTX_TYPE_DEVICE) && (type != XHCI_CTX_TYPE_INPUT));
|
||||
@@ -436,7 +435,7 @@ static struct xhci_container_ctx
|
||||
if (type == XHCI_CTX_TYPE_INPUT)
|
||||
ctx->size += CTX_SIZE(readl(&ctrl->hccr->cr_hccparams));
|
||||
|
||||
- ctx->bytes = (u8 *)xhci_malloc(ctx->size);
|
||||
+ ctx->bytes = xhci_malloc(ctx->size);
|
||||
|
||||
return ctx;
|
||||
}
|
||||
@@ -458,8 +457,7 @@ int xhci_alloc_virt_device(struct xhci_ctrl *ctrl, unsigned int slot_id)
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
- ctrl->devs[slot_id] = (struct xhci_virt_device *)
|
||||
- malloc(sizeof(struct xhci_virt_device));
|
||||
+ ctrl->devs[slot_id] = malloc(sizeof(struct xhci_virt_device));
|
||||
|
||||
if (!ctrl->devs[slot_id]) {
|
||||
puts("Failed to allocate virtual device\n");
|
||||
@@ -518,8 +516,7 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr,
|
||||
struct xhci_segment *seg;
|
||||
|
||||
/* DCBAA initialization */
|
||||
- ctrl->dcbaa = (struct xhci_device_context_array *)
|
||||
- xhci_malloc(sizeof(struct xhci_device_context_array));
|
||||
+ ctrl->dcbaa = xhci_malloc(sizeof(struct xhci_device_context_array));
|
||||
if (ctrl->dcbaa == NULL) {
|
||||
puts("unable to allocate DCBA\n");
|
||||
return -ENOMEM;
|
||||
@@ -555,8 +552,8 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr,
|
||||
|
||||
/* Event ring does not maintain link TRB */
|
||||
ctrl->event_ring = xhci_ring_alloc(ERST_NUM_SEGS, false);
|
||||
- ctrl->erst.entries = (struct xhci_erst_entry *)
|
||||
- xhci_malloc(sizeof(struct xhci_erst_entry) * ERST_NUM_SEGS);
|
||||
+ ctrl->erst.entries = xhci_malloc(sizeof(struct xhci_erst_entry) *
|
||||
+ ERST_NUM_SEGS);
|
||||
|
||||
ctrl->erst.num_entries = ERST_NUM_SEGS;
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,281 @@
|
||||
From f12d0a67a79679641299b1b923883e62332ee6d4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f12d0a67a79679641299b1b923883e62332ee6d4.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Michael Walle <michael@walle.cc>
|
||||
Date: Wed, 23 Sep 2020 12:42:51 +0200
|
||||
Subject: [PATCH 07/15] mmc: sdhci: move the ADMA2 table handling into own
|
||||
module
|
||||
|
||||
There are other (non-SDHCI) controllers which supports ADMA2 descriptor
|
||||
tables, namely the Freescale eSDHC. Instead of copying the code, move it
|
||||
into an own module.
|
||||
|
||||
Signed-off-by: Michael Walle <michael@walle.cc>
|
||||
---
|
||||
drivers/mmc/Kconfig | 5 +++
|
||||
drivers/mmc/Makefile | 1 +
|
||||
drivers/mmc/sdhci-adma.c | 73 ++++++++++++++++++++++++++++++++++++++++
|
||||
drivers/mmc/sdhci.c | 63 +++++-----------------------------
|
||||
include/sdhci.h | 8 +++--
|
||||
5 files changed, 92 insertions(+), 58 deletions(-)
|
||||
create mode 100644 drivers/mmc/sdhci-adma.c
|
||||
|
||||
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
|
||||
index 0c252e34c7..88582db58c 100644
|
||||
--- a/drivers/mmc/Kconfig
|
||||
+++ b/drivers/mmc/Kconfig
|
||||
@@ -46,6 +46,9 @@ config SPL_DM_MMC
|
||||
|
||||
if MMC
|
||||
|
||||
+config MMC_SDHCI_ADMA_HELPERS
|
||||
+ bool
|
||||
+
|
||||
config MMC_SPI
|
||||
bool "Support for SPI-based MMC controller"
|
||||
depends on DM_MMC && DM_SPI
|
||||
@@ -445,6 +448,7 @@ config MMC_SDHCI_SDMA
|
||||
config MMC_SDHCI_ADMA
|
||||
bool "Support SDHCI ADMA2"
|
||||
depends on MMC_SDHCI
|
||||
+ select MMC_SDHCI_ADMA_HELPERS
|
||||
help
|
||||
This enables support for the ADMA (Advanced DMA) defined
|
||||
in the SD Host Controller Standard Specification Version 3.00
|
||||
@@ -452,6 +456,7 @@ config MMC_SDHCI_ADMA
|
||||
config SPL_MMC_SDHCI_ADMA
|
||||
bool "Support SDHCI ADMA2 in SPL"
|
||||
depends on MMC_SDHCI
|
||||
+ select MMC_SDHCI_ADMA_HELPERS
|
||||
help
|
||||
This enables support for the ADMA (Advanced DMA) defined
|
||||
in the SD Host Controller Standard Specification Version 3.00 in SPL.
|
||||
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
|
||||
index 22266ec8ec..1c849cbab2 100644
|
||||
--- a/drivers/mmc/Makefile
|
||||
+++ b/drivers/mmc/Makefile
|
||||
@@ -6,6 +6,7 @@
|
||||
obj-y += mmc.o
|
||||
obj-$(CONFIG_$(SPL_)DM_MMC) += mmc-uclass.o
|
||||
obj-$(CONFIG_$(SPL_)MMC_WRITE) += mmc_write.o
|
||||
+obj-$(CONFIG_MMC_SDHCI_ADMA_HELPERS) += sdhci-adma.o
|
||||
|
||||
ifndef CONFIG_$(SPL_)BLK
|
||||
obj-y += mmc_legacy.o
|
||||
diff --git a/drivers/mmc/sdhci-adma.c b/drivers/mmc/sdhci-adma.c
|
||||
new file mode 100644
|
||||
index 0000000000..2ec057fbb1
|
||||
--- /dev/null
|
||||
+++ b/drivers/mmc/sdhci-adma.c
|
||||
@@ -0,0 +1,73 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * SDHCI ADMA2 helper functions.
|
||||
+ */
|
||||
+
|
||||
+#include <common.h>
|
||||
+#include <cpu_func.h>
|
||||
+#include <sdhci.h>
|
||||
+#include <malloc.h>
|
||||
+#include <asm/cache.h>
|
||||
+
|
||||
+static void sdhci_adma_desc(struct sdhci_adma_desc *desc,
|
||||
+ dma_addr_t addr, u16 len, bool end)
|
||||
+{
|
||||
+ u8 attr;
|
||||
+
|
||||
+ attr = ADMA_DESC_ATTR_VALID | ADMA_DESC_TRANSFER_DATA;
|
||||
+ if (end)
|
||||
+ attr |= ADMA_DESC_ATTR_END;
|
||||
+
|
||||
+ desc->attr = attr;
|
||||
+ desc->len = len;
|
||||
+ desc->reserved = 0;
|
||||
+ desc->addr_lo = lower_32_bits(addr);
|
||||
+#ifdef CONFIG_DMA_ADDR_T_64BIT
|
||||
+ desc->addr_hi = upper_32_bits(addr);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * sdhci_prepare_adma_table() - Populate the ADMA table
|
||||
+ *
|
||||
+ * @table: Pointer to the ADMA table
|
||||
+ * @data: Pointer to MMC data
|
||||
+ * @addr: DMA address to write to or read from
|
||||
+ *
|
||||
+ * Fill the ADMA table according to the MMC data to read from or write to the
|
||||
+ * given DMA address.
|
||||
+ * Please note, that the table size depends on CONFIG_SYS_MMC_MAX_BLK_COUNT and
|
||||
+ * we don't have to check for overflow.
|
||||
+ */
|
||||
+void sdhci_prepare_adma_table(struct sdhci_adma_desc *table,
|
||||
+ struct mmc_data *data, dma_addr_t addr)
|
||||
+{
|
||||
+ uint trans_bytes = data->blocksize * data->blocks;
|
||||
+ uint desc_count = DIV_ROUND_UP(trans_bytes, ADMA_MAX_LEN);
|
||||
+ struct sdhci_adma_desc *desc = table;
|
||||
+ int i = desc_count;
|
||||
+
|
||||
+ while (--i) {
|
||||
+ sdhci_adma_desc(desc, addr, ADMA_MAX_LEN, false);
|
||||
+ addr += ADMA_MAX_LEN;
|
||||
+ trans_bytes -= ADMA_MAX_LEN;
|
||||
+ desc++;
|
||||
+ }
|
||||
+
|
||||
+ sdhci_adma_desc(desc, addr, trans_bytes, true);
|
||||
+
|
||||
+ flush_cache((dma_addr_t)table,
|
||||
+ ROUND(desc_count * sizeof(struct sdhci_adma_desc),
|
||||
+ ARCH_DMA_MINALIGN));
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * sdhci_adma_init() - initialize the ADMA descriptor table
|
||||
+ *
|
||||
+ * @return pointer to the allocated descriptor table or NULL in case of an
|
||||
+ * error.
|
||||
+ */
|
||||
+struct sdhci_adma_desc *sdhci_adma_init(void)
|
||||
+{
|
||||
+ return memalign(ARCH_DMA_MINALIGN, ADMA_TABLE_SZ);
|
||||
+}
|
||||
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
|
||||
index 7673219fb3..d549a264d7 100644
|
||||
--- a/drivers/mmc/sdhci.c
|
||||
+++ b/drivers/mmc/sdhci.c
|
||||
@@ -69,57 +69,6 @@ static void sdhci_transfer_pio(struct sdhci_host *host, struct mmc_data *data)
|
||||
}
|
||||
}
|
||||
|
||||
-#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
|
||||
-static void sdhci_adma_desc(struct sdhci_host *host, dma_addr_t dma_addr,
|
||||
- u16 len, bool end)
|
||||
-{
|
||||
- struct sdhci_adma_desc *desc;
|
||||
- u8 attr;
|
||||
-
|
||||
- desc = &host->adma_desc_table[host->desc_slot];
|
||||
-
|
||||
- attr = ADMA_DESC_ATTR_VALID | ADMA_DESC_TRANSFER_DATA;
|
||||
- if (!end)
|
||||
- host->desc_slot++;
|
||||
- else
|
||||
- attr |= ADMA_DESC_ATTR_END;
|
||||
-
|
||||
- desc->attr = attr;
|
||||
- desc->len = len;
|
||||
- desc->reserved = 0;
|
||||
- desc->addr_lo = lower_32_bits(dma_addr);
|
||||
-#ifdef CONFIG_DMA_ADDR_T_64BIT
|
||||
- desc->addr_hi = upper_32_bits(dma_addr);
|
||||
-#endif
|
||||
-}
|
||||
-
|
||||
-static void sdhci_prepare_adma_table(struct sdhci_host *host,
|
||||
- struct mmc_data *data)
|
||||
-{
|
||||
- uint trans_bytes = data->blocksize * data->blocks;
|
||||
- uint desc_count = DIV_ROUND_UP(trans_bytes, ADMA_MAX_LEN);
|
||||
- int i = desc_count;
|
||||
- dma_addr_t dma_addr = host->start_addr;
|
||||
-
|
||||
- host->desc_slot = 0;
|
||||
-
|
||||
- while (--i) {
|
||||
- sdhci_adma_desc(host, dma_addr, ADMA_MAX_LEN, false);
|
||||
- dma_addr += ADMA_MAX_LEN;
|
||||
- trans_bytes -= ADMA_MAX_LEN;
|
||||
- }
|
||||
-
|
||||
- sdhci_adma_desc(host, dma_addr, trans_bytes, true);
|
||||
-
|
||||
- flush_cache((dma_addr_t)host->adma_desc_table,
|
||||
- ROUND(desc_count * sizeof(struct sdhci_adma_desc),
|
||||
- ARCH_DMA_MINALIGN));
|
||||
-}
|
||||
-#elif defined(CONFIG_MMC_SDHCI_SDMA)
|
||||
-static void sdhci_prepare_adma_table(struct sdhci_host *host,
|
||||
- struct mmc_data *data)
|
||||
-{}
|
||||
-#endif
|
||||
#if (defined(CONFIG_MMC_SDHCI_SDMA) || CONFIG_IS_ENABLED(MMC_SDHCI_ADMA))
|
||||
static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
|
||||
int *is_aligned, int trans_bytes)
|
||||
@@ -156,8 +105,11 @@ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
|
||||
if (host->flags & USE_SDMA) {
|
||||
sdhci_writel(host, phys_to_bus((ulong)host->start_addr),
|
||||
SDHCI_DMA_ADDRESS);
|
||||
- } else if (host->flags & (USE_ADMA | USE_ADMA64)) {
|
||||
- sdhci_prepare_adma_table(host, data);
|
||||
+ }
|
||||
+#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
|
||||
+ else if (host->flags & (USE_ADMA | USE_ADMA64)) {
|
||||
+ sdhci_prepare_adma_table(host->adma_desc_table, data,
|
||||
+ host->start_addr);
|
||||
|
||||
sdhci_writel(host, lower_32_bits(host->adma_addr),
|
||||
SDHCI_ADMA_ADDRESS);
|
||||
@@ -165,6 +117,7 @@ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
|
||||
sdhci_writel(host, upper_32_bits(host->adma_addr),
|
||||
SDHCI_ADMA_ADDRESS_HI);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
#else
|
||||
static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
|
||||
@@ -770,9 +723,9 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
|
||||
__func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
- host->adma_desc_table = memalign(ARCH_DMA_MINALIGN, ADMA_TABLE_SZ);
|
||||
-
|
||||
+ host->adma_desc_table = sdhci_adma_init();
|
||||
host->adma_addr = (dma_addr_t)host->adma_desc_table;
|
||||
+
|
||||
#ifdef CONFIG_DMA_ADDR_T_64BIT
|
||||
host->flags |= USE_ADMA64;
|
||||
#else
|
||||
diff --git a/include/sdhci.h b/include/sdhci.h
|
||||
index 94fc3ed56a..f69d5f81fb 100644
|
||||
--- a/include/sdhci.h
|
||||
+++ b/include/sdhci.h
|
||||
@@ -271,7 +271,6 @@ struct sdhci_ops {
|
||||
int (*deferred_probe)(struct sdhci_host *host);
|
||||
};
|
||||
|
||||
-#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
|
||||
#define ADMA_MAX_LEN 65532
|
||||
#ifdef CONFIG_DMA_ADDR_T_64BIT
|
||||
#define ADMA_DESC_LEN 16
|
||||
@@ -302,7 +301,7 @@ struct sdhci_adma_desc {
|
||||
u32 addr_hi;
|
||||
#endif
|
||||
} __packed;
|
||||
-#endif
|
||||
+
|
||||
struct sdhci_host {
|
||||
const char *name;
|
||||
void *ioaddr;
|
||||
@@ -334,7 +333,6 @@ struct sdhci_host {
|
||||
dma_addr_t adma_addr;
|
||||
#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
|
||||
struct sdhci_adma_desc *adma_desc_table;
|
||||
- uint desc_slot;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -496,4 +494,8 @@ extern const struct dm_mmc_ops sdhci_ops;
|
||||
#else
|
||||
#endif
|
||||
|
||||
+struct sdhci_adma_desc *sdhci_adma_init(void);
|
||||
+void sdhci_prepare_adma_table(struct sdhci_adma_desc *table,
|
||||
+ struct mmc_data *data, dma_addr_t addr);
|
||||
+
|
||||
#endif /* __SDHCI_HW_H */
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,40 @@
|
||||
From 0ad1fdab7a52554d1da758b36917c09965495dd9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <0ad1fdab7a52554d1da758b36917c09965495dd9.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Thu, 19 Nov 2020 18:48:15 +0100
|
||||
Subject: [PATCH 08/15] rpi: Add identifier for the new RPi400
|
||||
|
||||
The Raspberry Pi Foundation released the new RPi400 which we want to
|
||||
detect, so we can enable Ethernet on it and know the correct device tree
|
||||
file name.
|
||||
|
||||
So far the Raspberry Pi foundation is using the RPi4b device-tree file
|
||||
to boot RPi400. I see no reason not to do the same as they are
|
||||
completely compatible.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
---
|
||||
board/raspberrypi/rpi/rpi.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
|
||||
index 18e60e76cc..e36bee3a34 100644
|
||||
--- a/board/raspberrypi/rpi/rpi.c
|
||||
+++ b/board/raspberrypi/rpi/rpi.c
|
||||
@@ -157,6 +157,11 @@ static const struct rpi_model rpi_models_new_scheme[] = {
|
||||
DTB_DIR "bcm2711-rpi-4-b.dtb",
|
||||
true,
|
||||
},
|
||||
+ [0x13] = {
|
||||
+ "400",
|
||||
+ DTB_DIR "bcm2711-rpi-4-b.dtb",
|
||||
+ true,
|
||||
+ },
|
||||
};
|
||||
|
||||
static const struct rpi_model rpi_models_old_scheme[] = {
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,40 @@
|
||||
From f9cb12f4cf902797987fea885fa186ba7d676aa0 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f9cb12f4cf902797987fea885fa186ba7d676aa0.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Thu, 19 Nov 2020 18:48:16 +0100
|
||||
Subject: [PATCH 09/15] rpi: Add identifier for the new CM4
|
||||
|
||||
The Raspberry Pi Foundation released the new Compute Module 4which we
|
||||
want to detect, so we can enable Ethernet on it and know the correct
|
||||
device tree file name.
|
||||
|
||||
Note that this sets the Ethernet option to true since the official CM4
|
||||
IO board has an Ethernet port. But that might not be the case when using
|
||||
custom ones.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
---
|
||||
board/raspberrypi/rpi/rpi.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
|
||||
index e36bee3a34..20311e90fe 100644
|
||||
--- a/board/raspberrypi/rpi/rpi.c
|
||||
+++ b/board/raspberrypi/rpi/rpi.c
|
||||
@@ -162,6 +162,11 @@ static const struct rpi_model rpi_models_new_scheme[] = {
|
||||
DTB_DIR "bcm2711-rpi-4-b.dtb",
|
||||
true,
|
||||
},
|
||||
+ [0x14] = {
|
||||
+ "Compute Modue 4",
|
||||
+ DTB_DIR "bcm2711-rpi-cm4.dtb",
|
||||
+ true,
|
||||
+ },
|
||||
};
|
||||
|
||||
static const struct rpi_model rpi_models_old_scheme[] = {
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,59 @@
|
||||
From c576988161912dfcb1bcd8b87640f5f998a87bf3 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c576988161912dfcb1bcd8b87640f5f998a87bf3.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Thu, 19 Nov 2020 18:48:17 +0100
|
||||
Subject: [PATCH 10/15] pci: pcie-brcmstb: Fix inbound window configurations
|
||||
|
||||
So far we've assumed a fixed configuration for inbound windows as we had
|
||||
a single user for this controller. But the controller's DMA constraints
|
||||
were improved starting with BCM2711's B1 revision of the SoC, notably
|
||||
available in CM4 and Pi400. They allow for wider inbound windows. We can
|
||||
now cover the whole address space, whereas before we where limited to
|
||||
the lower 3GB.
|
||||
|
||||
This information is passed to us through DT's 'dma-ranges' property and
|
||||
it's specially important for us to honor it them since some interactions
|
||||
with the board's co-processor assume we're doing so (specifically the
|
||||
XHCI firmware load operation, which is handled by the co-processor after
|
||||
u-boot has correctly configured the PCIe controller).
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
---
|
||||
drivers/pci/pcie_brcmstb.c | 12 +++++-------
|
||||
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/pcie_brcmstb.c b/drivers/pci/pcie_brcmstb.c
|
||||
index dade79e9c8..f6e8ad0d0a 100644
|
||||
--- a/drivers/pci/pcie_brcmstb.c
|
||||
+++ b/drivers/pci/pcie_brcmstb.c
|
||||
@@ -432,6 +432,7 @@ static int brcm_pcie_probe(struct udevice *dev)
|
||||
struct pci_controller *hose = dev_get_uclass_priv(ctlr);
|
||||
struct brcm_pcie *pcie = dev_get_priv(dev);
|
||||
void __iomem *base = pcie->base;
|
||||
+ struct pci_region region;
|
||||
bool ssc_good = false;
|
||||
int num_out_wins = 0;
|
||||
u64 rc_bar2_offset, rc_bar2_size;
|
||||
@@ -468,13 +469,10 @@ static int brcm_pcie_probe(struct udevice *dev)
|
||||
MISC_CTRL_SCB_ACCESS_EN_MASK |
|
||||
MISC_CTRL_CFG_READ_UR_MODE_MASK |
|
||||
MISC_CTRL_MAX_BURST_SIZE_128);
|
||||
- /*
|
||||
- * TODO: When support for other SoCs than BCM2711 is added we may
|
||||
- * need to use the base address and size(s) provided in the dma-ranges
|
||||
- * property.
|
||||
- */
|
||||
- rc_bar2_offset = 0;
|
||||
- rc_bar2_size = 0xc0000000;
|
||||
+
|
||||
+ pci_get_dma_regions(dev, ®ion, 0);
|
||||
+ rc_bar2_offset = region.bus_start - region.phys_start;
|
||||
+ rc_bar2_size = 1ULL << fls64(region.size - 1);
|
||||
|
||||
tmp = lower_32_bits(rc_bar2_offset);
|
||||
u32p_replace_bits(&tmp, brcm_pcie_encode_ibar_size(rc_bar2_size),
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,327 @@
|
||||
From a2052b8361818ec5acb04e5d0c1d229083dfbeb6 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <a2052b8361818ec5acb04e5d0c1d229083dfbeb6.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Thu, 19 Nov 2020 18:48:18 +0100
|
||||
Subject: [PATCH 11/15] dm: Introduce xxx_get_dma_range()
|
||||
|
||||
Add the follwing functions to get a specific device's DMA ranges:
|
||||
- dev_get_dma_range()
|
||||
- ofnode_get_dma_range()
|
||||
- of_get_dma_range()
|
||||
- fdt_get_dma_range()
|
||||
They are specially useful in oder to be able validate a physical address
|
||||
space range into a bus's and to convert addresses from and to address
|
||||
spaces.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
---
|
||||
common/fdt_support.c | 72 ++++++++++++++++++++++++++++++++++++++++++
|
||||
drivers/core/of_addr.c | 68 +++++++++++++++++++++++++++++++++++++++
|
||||
drivers/core/ofnode.c | 9 ++++++
|
||||
drivers/core/read.c | 5 +++
|
||||
include/dm/of_addr.h | 17 ++++++++++
|
||||
include/dm/ofnode.h | 16 ++++++++++
|
||||
include/dm/read.h | 6 ++++
|
||||
include/fdt_support.h | 14 ++++++++
|
||||
8 files changed, 207 insertions(+)
|
||||
|
||||
diff --git a/common/fdt_support.c b/common/fdt_support.c
|
||||
index a565b470f8..ffc8f8b6b5 100644
|
||||
--- a/common/fdt_support.c
|
||||
+++ b/common/fdt_support.c
|
||||
@@ -1347,6 +1347,78 @@ u64 fdt_translate_dma_address(const void *blob, int node_offset,
|
||||
return __of_translate_address(blob, node_offset, in_addr, "dma-ranges");
|
||||
}
|
||||
|
||||
+int fdt_get_dma_range(const void *blob, int node, phys_addr_t *cpu,
|
||||
+ dma_addr_t *bus, u64 *size)
|
||||
+{
|
||||
+ bool found_dma_ranges = false;
|
||||
+ const fdt32_t *ranges;
|
||||
+ int na, ns, pna, pns;
|
||||
+ int parent = node;
|
||||
+ u64 cpu_addr;
|
||||
+ int ret = 0;
|
||||
+ int len;
|
||||
+
|
||||
+ /* Find the closest dma-ranges property */
|
||||
+ while (parent >= 0) {
|
||||
+ ranges = fdt_getprop(blob, parent, "dma-ranges", &len);
|
||||
+
|
||||
+ /* Ignore empty ranges, they imply no translation required */
|
||||
+ if (ranges && len > 0)
|
||||
+ break;
|
||||
+
|
||||
+ /* Once we find 'dma-ranges', then a missing one is an error */
|
||||
+ if (found_dma_ranges && !ranges) {
|
||||
+ ret = -ENODEV;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (ranges)
|
||||
+ found_dma_ranges = true;
|
||||
+
|
||||
+ parent = fdt_parent_offset(blob, parent);
|
||||
+ }
|
||||
+
|
||||
+ if (!ranges || parent < 0) {
|
||||
+ debug("no dma-ranges found for node %s\n",
|
||||
+ fdt_get_name(blob, node, NULL));
|
||||
+ ret = -ENODEV;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* switch to that node */
|
||||
+ node = parent;
|
||||
+ parent = fdt_parent_offset(blob, node);
|
||||
+ if (parent < 0) {
|
||||
+ printf("Found dma-ranges in root node, shoudln't happen\n");
|
||||
+ ret = -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* Get the address sizes both for the bus and its parent */
|
||||
+ of_match_bus(blob, node)->count_cells(blob, node, &na, &ns);
|
||||
+ if (!OF_CHECK_COUNTS(na, ns)) {
|
||||
+ printf("%s: Bad cell count for %s\n", __FUNCTION__,
|
||||
+ fdt_get_name(blob, node, NULL));
|
||||
+ return -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ of_match_bus(blob, parent)->count_cells(blob, parent, &pna, &pns);
|
||||
+ if (!OF_CHECK_COUNTS(pna, pns)) {
|
||||
+ printf("%s: Bad cell count for %s\n", __FUNCTION__,
|
||||
+ fdt_get_name(blob, parent, NULL));
|
||||
+ return -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ *bus = fdt_read_number(ranges, na);
|
||||
+ cpu_addr = fdt_read_number(ranges + na, pna);
|
||||
+ *cpu = fdt_translate_dma_address(blob, node, (const fdt32_t*)&cpu_addr);
|
||||
+ *size = fdt_read_number(ranges + na + pna, ns);
|
||||
+out:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* fdt_node_offset_by_compat_reg: Find a node that matches compatiable and
|
||||
* who's reg property matches a physical cpu address
|
||||
diff --git a/drivers/core/of_addr.c b/drivers/core/of_addr.c
|
||||
index ca34d84922..8457e04a25 100644
|
||||
--- a/drivers/core/of_addr.c
|
||||
+++ b/drivers/core/of_addr.c
|
||||
@@ -325,6 +325,74 @@ u64 of_translate_dma_address(const struct device_node *dev, const __be32 *in_add
|
||||
return __of_translate_address(dev, in_addr, "dma-ranges");
|
||||
}
|
||||
|
||||
+int of_get_dma_range(const struct device_node *dev, phys_addr_t *cpu,
|
||||
+ dma_addr_t *bus, u64 *size)
|
||||
+{
|
||||
+ bool found_dma_ranges = false;
|
||||
+ struct device_node parent;
|
||||
+ int na, ns, pna, pns;
|
||||
+ const __be32 *ranges;
|
||||
+ int ret = 0;
|
||||
+ int len;
|
||||
+
|
||||
+ /* Find the closest dma-ranges property */
|
||||
+ while (dev) {
|
||||
+ ranges = of_get_property(dev, "dma-ranges", &len);
|
||||
+
|
||||
+ /* Ignore empty ranges, they imply no translation required */
|
||||
+ if (ranges && len > 0)
|
||||
+ break;
|
||||
+
|
||||
+ /* Once we find 'dma-ranges', then a missing one is an error */
|
||||
+ if (found_dma_ranges && !ranges) {
|
||||
+ ret = -ENODEV;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (ranges)
|
||||
+ found_dma_ranges = true;
|
||||
+
|
||||
+ dev = of_get_parent(dev);
|
||||
+ }
|
||||
+
|
||||
+ if (!dev || !ranges) {
|
||||
+ debug("no dma-ranges found for node %s\n",
|
||||
+ of_node_full_name(dev));
|
||||
+ ret = -ENODEV
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* switch to that node */
|
||||
+ parent = of_get_parent(dev);
|
||||
+ if (!parent) {
|
||||
+ printf("Found dma-ranges in root node, shoudln't happen\n");
|
||||
+ ret = -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* Get the address sizes both for the bus and its parent */
|
||||
+ of_match_bus(dev)->count_cells(dev, &na, &ns);
|
||||
+ if (!OF_CHECK_COUNTS(na, ns)) {
|
||||
+ printf("Bad cell count for %s\n", of_node_full_name(dev));
|
||||
+ return -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ of_match_bus(parent)->count_cells(parent, &pna, &pns);
|
||||
+ if (!OF_CHECK_COUNTS(pna, pns)) {
|
||||
+ printf("Bad cell count for %s\n", of_node_full_name(parent));
|
||||
+ return -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ *bus = of_read_number(ranges, na);
|
||||
+ *cpu = of_translate_dma_address(dev, of_read_number(ranges + na, pna));
|
||||
+ *size = of_read_number(ranges + na + pna, ns);
|
||||
+out:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
static int __of_address_to_resource(const struct device_node *dev,
|
||||
const __be32 *addrp, u64 size, unsigned int flags,
|
||||
const char *name, struct resource *r)
|
||||
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
|
||||
index d02d8d33fe..d4e69b0074 100644
|
||||
--- a/drivers/core/ofnode.c
|
||||
+++ b/drivers/core/ofnode.c
|
||||
@@ -888,6 +888,15 @@ u64 ofnode_translate_dma_address(ofnode node, const fdt32_t *in_addr)
|
||||
return fdt_translate_dma_address(gd->fdt_blob, ofnode_to_offset(node), in_addr);
|
||||
}
|
||||
|
||||
+int ofnode_get_dma_range(ofnode node, phys_addr_t *cpu, dma_addr_t *bus, u64 *size)
|
||||
+{
|
||||
+ if (ofnode_is_np(node))
|
||||
+ return of_get_dma_range(ofnode_to_np(node), cpu, bus, size);
|
||||
+ else
|
||||
+ return fdt_get_dma_range(gd->fdt_blob, ofnode_to_offset(node),
|
||||
+ cpu, bus, size);
|
||||
+}
|
||||
+
|
||||
int ofnode_device_is_compatible(ofnode node, const char *compat)
|
||||
{
|
||||
if (ofnode_is_np(node))
|
||||
diff --git a/drivers/core/read.c b/drivers/core/read.c
|
||||
index 86f3f88170..09b58a40db 100644
|
||||
--- a/drivers/core/read.c
|
||||
+++ b/drivers/core/read.c
|
||||
@@ -337,6 +337,11 @@ u64 dev_translate_dma_address(const struct udevice *dev, const fdt32_t *in_addr)
|
||||
return ofnode_translate_dma_address(dev_ofnode(dev), in_addr);
|
||||
}
|
||||
|
||||
+u64 dev_translate_cpu_address(const struct udevice *dev, const fdt32_t *in_addr)
|
||||
+{
|
||||
+ return ofnode_translate_cpu_address(dev_ofnode(dev), in_addr);
|
||||
+}
|
||||
+
|
||||
int dev_read_alias_highest_id(const char *stem)
|
||||
{
|
||||
if (of_live_active())
|
||||
diff --git a/include/dm/of_addr.h b/include/dm/of_addr.h
|
||||
index 3fa1ffce81..ee21d5cf4f 100644
|
||||
--- a/include/dm/of_addr.h
|
||||
+++ b/include/dm/of_addr.h
|
||||
@@ -44,6 +44,23 @@ u64 of_translate_address(const struct device_node *no, const __be32 *in_addr);
|
||||
*/
|
||||
u64 of_translate_dma_address(const struct device_node *no, const __be32 *in_addr);
|
||||
|
||||
+
|
||||
+/**
|
||||
+ * of_get_dma_range() - get dma-ranges for a specific DT node
|
||||
+ *
|
||||
+ * Get DMA ranges for a specifc node, this is useful to perform bus->cpu and
|
||||
+ * cpu->bus address translations
|
||||
+ *
|
||||
+ * @param blob Pointer to device tree blob
|
||||
+ * @param node_offset Node DT offset
|
||||
+ * @param cpu Pointer to variable storing the range's cpu address
|
||||
+ * @param bus Pointer to variable storing the range's bus address
|
||||
+ * @param size Pointer to variable storing the range's size
|
||||
+ * @return translated DMA address or OF_BAD_ADDR on error
|
||||
+ */
|
||||
+int of_get_dma_range(const struct device_node *dev, phys_addr_t *cpu,
|
||||
+ dma_addr_t *bus, u64 *size);
|
||||
+
|
||||
/**
|
||||
* of_get_address() - obtain an address from a node
|
||||
*
|
||||
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
|
||||
index 8df2facf99..d1be553b37 100644
|
||||
--- a/include/dm/ofnode.h
|
||||
+++ b/include/dm/ofnode.h
|
||||
@@ -915,6 +915,22 @@ u64 ofnode_translate_address(ofnode node, const fdt32_t *in_addr);
|
||||
*/
|
||||
u64 ofnode_translate_dma_address(ofnode node, const fdt32_t *in_addr);
|
||||
|
||||
+/**
|
||||
+ * ofnode_get_dma_range() - get dma-ranges for a specific DT node
|
||||
+ *
|
||||
+ * Get DMA ranges for a specifc node, this is useful to perform bus->cpu and
|
||||
+ * cpu->bus address translations
|
||||
+ *
|
||||
+ * @param blob Pointer to device tree blob
|
||||
+ * @param node_offset Node DT offset
|
||||
+ * @param cpu Pointer to variable storing the range's cpu address
|
||||
+ * @param bus Pointer to variable storing the range's bus address
|
||||
+ * @param size Pointer to variable storing the range's size
|
||||
+ * @return translated DMA address or OF_BAD_ADDR on error
|
||||
+ */
|
||||
+int ofnode_get_dma_range(ofnode node, phys_addr_t *cpu, dma_addr_t *bus,
|
||||
+ u64 *size);
|
||||
+
|
||||
/**
|
||||
* ofnode_device_is_compatible() - check if the node is compatible with compat
|
||||
*
|
||||
diff --git a/include/dm/read.h b/include/dm/read.h
|
||||
index 67db94adfc..f4b17bf026 100644
|
||||
--- a/include/dm/read.h
|
||||
+++ b/include/dm/read.h
|
||||
@@ -1002,6 +1002,12 @@ static inline u64 dev_translate_dma_address(const struct udevice *dev,
|
||||
return ofnode_translate_dma_address(dev_ofnode(dev), in_addr);
|
||||
}
|
||||
|
||||
+static inline u64 dev_get_dma_range(const struct udevice *dev, phys_addr_t *cpu,
|
||||
+ dma_addr_t *bus, u64 *size)
|
||||
+{
|
||||
+ return ofnode_get_dma_range(dev_ofnode(dev), cpu, bus, size);
|
||||
+}
|
||||
+
|
||||
static inline int dev_read_alias_highest_id(const char *stem)
|
||||
{
|
||||
if (!CONFIG_IS_ENABLED(OF_LIBFDT))
|
||||
diff --git a/include/fdt_support.h b/include/fdt_support.h
|
||||
index 9684cffe80..963c917445 100644
|
||||
--- a/include/fdt_support.h
|
||||
+++ b/include/fdt_support.h
|
||||
@@ -260,6 +260,20 @@ u64 fdt_translate_address(const void *blob, int node_offset,
|
||||
u64 fdt_translate_dma_address(const void *blob, int node_offset,
|
||||
const __be32 *in_addr);
|
||||
|
||||
+/**
|
||||
+ * Get DMA ranges for a specifc node, this is useful to perform bus->cpu and
|
||||
+ * cpu->bus address translations
|
||||
+ *
|
||||
+ * @param blob Pointer to device tree blob
|
||||
+ * @param node_offset Node DT offset
|
||||
+ * @param cpu Pointer to variable storing the range's cpu address
|
||||
+ * @param bus Pointer to variable storing the range's bus address
|
||||
+ * @param size Pointer to variable storing the range's size
|
||||
+ * @return translated DMA address or OF_BAD_ADDR on error
|
||||
+ */
|
||||
+int fdt_get_dma_range(const void *blob, int node_offset, phys_addr_t *cpu,
|
||||
+ dma_addr_t *bus, u64 *size);
|
||||
+
|
||||
int fdt_node_offset_by_compat_reg(void *blob, const char *compat,
|
||||
phys_addr_t compat_off);
|
||||
int fdt_alloc_phandle(void *blob);
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,78 @@
|
||||
From ea24a497a84cf0d1efb9c4f285d4d29bd69f3ebb Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ea24a497a84cf0d1efb9c4f285d4d29bd69f3ebb.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Thu, 19 Nov 2020 18:48:19 +0100
|
||||
Subject: [PATCH 12/15] dm: Introduce DMA constraints into the core device
|
||||
model
|
||||
|
||||
Calculating the DMA offset between a bus address space and CPU's every
|
||||
time we call phys_to_bus() and bus_to_phys() isn't ideal performance
|
||||
wise. This information is static and available before initializing the
|
||||
devices so parse it before the probe call an provide the DMA offset it
|
||||
in 'struct udevice' for the DMA code to use it.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
---
|
||||
drivers/core/device.c | 24 ++++++++++++++++++++++++
|
||||
include/dm/device.h | 1 +
|
||||
2 files changed, 25 insertions(+)
|
||||
|
||||
diff --git a/drivers/core/device.c b/drivers/core/device.c
|
||||
index 355dbd147a..484852b2ac 100644
|
||||
--- a/drivers/core/device.c
|
||||
+++ b/drivers/core/device.c
|
||||
@@ -402,6 +402,28 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+void device_get_dma_constraints(struct udevice *dev)
|
||||
+{
|
||||
+ phys_addr_t cpu;
|
||||
+ dma_addr_t bus;
|
||||
+ u64 size;
|
||||
+ int ret;
|
||||
+
|
||||
+ if (!dev_of_valid(dev))
|
||||
+ return;
|
||||
+
|
||||
+ ret = dev_get_dma_range(dev, &cpu, &bus, &size);
|
||||
+ if (ret) {
|
||||
+ /* Don't complain if no 'dma-ranges' were found */
|
||||
+ if (ret != -ENODEV)
|
||||
+ dm_warn("%s: failed to get DMA range, %d\n",
|
||||
+ dev->name, ret);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ dev->dma_offset = cpu - bus;
|
||||
+}
|
||||
+
|
||||
int device_probe(struct udevice *dev)
|
||||
{
|
||||
const struct driver *drv;
|
||||
@@ -463,6 +485,8 @@ int device_probe(struct udevice *dev)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ device_get_dma_constraints(dev);
|
||||
+
|
||||
ret = uclass_pre_probe_device(dev);
|
||||
if (ret)
|
||||
goto fail;
|
||||
diff --git a/include/dm/device.h b/include/dm/device.h
|
||||
index 953706cf52..6489f7ae61 100644
|
||||
--- a/include/dm/device.h
|
||||
+++ b/include/dm/device.h
|
||||
@@ -161,6 +161,7 @@ struct udevice {
|
||||
#ifdef CONFIG_DEVRES
|
||||
struct list_head devres_head;
|
||||
#endif
|
||||
+ u64 dma_offset;
|
||||
};
|
||||
|
||||
/* Maximum sequence number supported */
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 3f75e2303ddb7fa6eed6dc288880f613329ce3bb Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <3f75e2303ddb7fa6eed6dc288880f613329ce3bb.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Thu, 19 Nov 2020 18:48:20 +0100
|
||||
Subject: [PATCH 13/15] dm: Introduce dev_phys_to_bus()/dev_bus_to_phys()
|
||||
|
||||
These functions, instead of relying on hard-coded platform-specific
|
||||
address translations, make use of the DMA constraints provided by the DM
|
||||
core. This allows for per-device translations.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
---
|
||||
include/phys2bus.h | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/include/phys2bus.h b/include/phys2bus.h
|
||||
index dc9b8e5a25..a380063af4 100644
|
||||
--- a/include/phys2bus.h
|
||||
+++ b/include/phys2bus.h
|
||||
@@ -21,4 +21,20 @@ static inline unsigned long bus_to_phys(unsigned long bus)
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if CONFIG_IS_ENABLED(DM)
|
||||
+#include <dm/device.h>
|
||||
+
|
||||
+static inline dma_addr_t dev_phys_to_bus(struct udevice *dev,
|
||||
+ phys_addr_t phys)
|
||||
+{
|
||||
+ return phys - dev->dma_offset;
|
||||
+}
|
||||
+
|
||||
+static inline phys_addr_t dev_bus_to_phys(struct udevice *dev,
|
||||
+ dma_addr_t bus)
|
||||
+{
|
||||
+ return bus + dev->dma_offset;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,308 @@
|
||||
From e3c96fd50787aa9ea2e5136593166cc49696d7ea Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <e3c96fd50787aa9ea2e5136593166cc49696d7ea.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Thu, 19 Nov 2020 18:48:21 +0100
|
||||
Subject: [PATCH 14/15] xhci: translate virtual addresses into the bus's
|
||||
address space
|
||||
|
||||
So far we've been content with passing physical addresses when
|
||||
configuring memory addresses into XHCI controllers, but not all
|
||||
platforms have buses with transparent mappings. Specifically the
|
||||
Raspberry Pi 4 might introduce an offset to memory accesses incoming
|
||||
from its PCIe port.
|
||||
|
||||
Introduce xhci_virt_to_bus() and xhci_bus_to_virt() to cater with these
|
||||
limitations and make sure we don't break non DM users.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
---
|
||||
drivers/usb/host/xhci-mem.c | 45 +++++++++++++++++++-----------------
|
||||
drivers/usb/host/xhci-ring.c | 11 +++++----
|
||||
drivers/usb/host/xhci.c | 4 ++--
|
||||
include/usb/xhci.h | 22 +++++++++++++++++-
|
||||
4 files changed, 54 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
|
||||
index b002d6f166..e8d435d644 100644
|
||||
--- a/drivers/usb/host/xhci-mem.c
|
||||
+++ b/drivers/usb/host/xhci-mem.c
|
||||
@@ -110,7 +110,7 @@ static void xhci_scratchpad_free(struct xhci_ctrl *ctrl)
|
||||
|
||||
ctrl->dcbaa->dev_context_ptrs[0] = 0;
|
||||
|
||||
- free((void *)(uintptr_t)le64_to_cpu(ctrl->scratchpad->sp_array[0]));
|
||||
+ free(xhci_bus_to_virt(ctrl, le64_to_cpu(ctrl->scratchpad->sp_array[0])));
|
||||
free(ctrl->scratchpad->sp_array);
|
||||
free(ctrl->scratchpad);
|
||||
ctrl->scratchpad = NULL;
|
||||
@@ -216,8 +216,8 @@ static void *xhci_malloc(unsigned int size)
|
||||
* @param link_trbs flag to indicate whether to link the trbs or NOT
|
||||
* @return none
|
||||
*/
|
||||
-static void xhci_link_segments(struct xhci_segment *prev,
|
||||
- struct xhci_segment *next, bool link_trbs)
|
||||
+static void xhci_link_segments(struct xhci_ctrl *ctrl, struct xhci_segment *prev,
|
||||
+ struct xhci_segment *next, bool link_trbs)
|
||||
{
|
||||
u32 val;
|
||||
u64 val_64 = 0;
|
||||
@@ -226,7 +226,7 @@ static void xhci_link_segments(struct xhci_segment *prev,
|
||||
return;
|
||||
prev->next = next;
|
||||
if (link_trbs) {
|
||||
- val_64 = virt_to_phys(next->trbs);
|
||||
+ val_64 = xhci_virt_to_bus(ctrl, next->trbs);
|
||||
prev->trbs[TRBS_PER_SEGMENT-1].link.segment_ptr =
|
||||
cpu_to_le64(val_64);
|
||||
|
||||
@@ -304,7 +304,8 @@ static struct xhci_segment *xhci_segment_alloc(void)
|
||||
* @param link_trbs flag to indicate whether to link the trbs or NOT
|
||||
* @return pointer to the newly created RING
|
||||
*/
|
||||
-struct xhci_ring *xhci_ring_alloc(unsigned int num_segs, bool link_trbs)
|
||||
+struct xhci_ring *xhci_ring_alloc(struct xhci_ctrl *ctrl, unsigned int num_segs,
|
||||
+ bool link_trbs)
|
||||
{
|
||||
struct xhci_ring *ring;
|
||||
struct xhci_segment *prev;
|
||||
@@ -327,12 +328,12 @@ struct xhci_ring *xhci_ring_alloc(unsigned int num_segs, bool link_trbs)
|
||||
next = xhci_segment_alloc();
|
||||
BUG_ON(!next);
|
||||
|
||||
- xhci_link_segments(prev, next, link_trbs);
|
||||
+ xhci_link_segments(ctrl, prev, next, link_trbs);
|
||||
|
||||
prev = next;
|
||||
num_segs--;
|
||||
}
|
||||
- xhci_link_segments(prev, ring->first_seg, link_trbs);
|
||||
+ xhci_link_segments(ctrl, prev, ring->first_seg, link_trbs);
|
||||
if (link_trbs) {
|
||||
/* See section 4.9.2.1 and 6.4.4.1 */
|
||||
prev->trbs[TRBS_PER_SEGMENT-1].link.control |=
|
||||
@@ -354,6 +355,7 @@ static int xhci_scratchpad_alloc(struct xhci_ctrl *ctrl)
|
||||
struct xhci_hccr *hccr = ctrl->hccr;
|
||||
struct xhci_hcor *hcor = ctrl->hcor;
|
||||
struct xhci_scratchpad *scratchpad;
|
||||
+ uint64_t val_64;
|
||||
int num_sp;
|
||||
uint32_t page_size;
|
||||
void *buf;
|
||||
@@ -371,8 +373,9 @@ static int xhci_scratchpad_alloc(struct xhci_ctrl *ctrl)
|
||||
scratchpad->sp_array = xhci_malloc(num_sp * sizeof(u64));
|
||||
if (!scratchpad->sp_array)
|
||||
goto fail_sp2;
|
||||
- ctrl->dcbaa->dev_context_ptrs[0] =
|
||||
- cpu_to_le64((uintptr_t)scratchpad->sp_array);
|
||||
+
|
||||
+ val_64 = xhci_virt_to_bus(ctrl, scratchpad->sp_array);
|
||||
+ ctrl->dcbaa->dev_context_ptrs[0] = cpu_to_le64((uintptr_t)val_64);
|
||||
|
||||
xhci_flush_cache((uintptr_t)&ctrl->dcbaa->dev_context_ptrs[0],
|
||||
sizeof(ctrl->dcbaa->dev_context_ptrs[0]));
|
||||
@@ -393,8 +396,8 @@ static int xhci_scratchpad_alloc(struct xhci_ctrl *ctrl)
|
||||
xhci_flush_cache((uintptr_t)buf, num_sp * page_size);
|
||||
|
||||
for (i = 0; i < num_sp; i++) {
|
||||
- uintptr_t ptr = (uintptr_t)buf + i * page_size;
|
||||
- scratchpad->sp_array[i] = cpu_to_le64(ptr);
|
||||
+ val_64 = xhci_virt_to_bus(ctrl, buf + i * page_size);
|
||||
+ scratchpad->sp_array[i] = cpu_to_le64(val_64);
|
||||
}
|
||||
|
||||
xhci_flush_cache((uintptr_t)scratchpad->sp_array,
|
||||
@@ -484,9 +487,9 @@ int xhci_alloc_virt_device(struct xhci_ctrl *ctrl, unsigned int slot_id)
|
||||
}
|
||||
|
||||
/* Allocate endpoint 0 ring */
|
||||
- virt_dev->eps[0].ring = xhci_ring_alloc(1, true);
|
||||
+ virt_dev->eps[0].ring = xhci_ring_alloc(ctrl, 1, true);
|
||||
|
||||
- byte_64 = virt_to_phys(virt_dev->out_ctx->bytes);
|
||||
+ byte_64 = xhci_virt_to_bus(ctrl, virt_dev->out_ctx->bytes);
|
||||
|
||||
/* Point to output device context in dcbaa. */
|
||||
ctrl->dcbaa->dev_context_ptrs[slot_id] = cpu_to_le64(byte_64);
|
||||
@@ -522,15 +525,15 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- val_64 = virt_to_phys(ctrl->dcbaa);
|
||||
+ val_64 = xhci_virt_to_bus(ctrl, ctrl->dcbaa);
|
||||
/* Set the pointer in DCBAA register */
|
||||
xhci_writeq(&hcor->or_dcbaap, val_64);
|
||||
|
||||
/* Command ring control pointer register initialization */
|
||||
- ctrl->cmd_ring = xhci_ring_alloc(1, true);
|
||||
+ ctrl->cmd_ring = xhci_ring_alloc(ctrl, 1, true);
|
||||
|
||||
/* Set the address in the Command Ring Control register */
|
||||
- trb_64 = virt_to_phys(ctrl->cmd_ring->first_seg->trbs);
|
||||
+ trb_64 = xhci_virt_to_bus(ctrl, ctrl->cmd_ring->first_seg->trbs);
|
||||
val_64 = xhci_readq(&hcor->or_crcr);
|
||||
val_64 = (val_64 & (u64) CMD_RING_RSVD_BITS) |
|
||||
(trb_64 & (u64) ~CMD_RING_RSVD_BITS) |
|
||||
@@ -551,7 +554,7 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr,
|
||||
ctrl->ir_set = &ctrl->run_regs->ir_set[0];
|
||||
|
||||
/* Event ring does not maintain link TRB */
|
||||
- ctrl->event_ring = xhci_ring_alloc(ERST_NUM_SEGS, false);
|
||||
+ ctrl->event_ring = xhci_ring_alloc(ctrl, ERST_NUM_SEGS, false);
|
||||
ctrl->erst.entries = xhci_malloc(sizeof(struct xhci_erst_entry) *
|
||||
ERST_NUM_SEGS);
|
||||
|
||||
@@ -560,8 +563,8 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr,
|
||||
for (val = 0, seg = ctrl->event_ring->first_seg;
|
||||
val < ERST_NUM_SEGS;
|
||||
val++) {
|
||||
- trb_64 = virt_to_phys(seg->trbs);
|
||||
struct xhci_erst_entry *entry = &ctrl->erst.entries[val];
|
||||
+ trb_64 = xhci_virt_to_bus(ctrl, seg->trbs);
|
||||
entry->seg_addr = cpu_to_le64(trb_64);
|
||||
entry->seg_size = cpu_to_le32(TRBS_PER_SEGMENT);
|
||||
entry->rsvd = 0;
|
||||
@@ -570,7 +573,7 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr,
|
||||
xhci_flush_cache((uintptr_t)ctrl->erst.entries,
|
||||
ERST_NUM_SEGS * sizeof(struct xhci_erst_entry));
|
||||
|
||||
- deq = virt_to_phys(ctrl->event_ring->dequeue);
|
||||
+ deq = xhci_virt_to_bus(ctrl, ctrl->event_ring->dequeue);
|
||||
|
||||
/* Update HC event ring dequeue pointer */
|
||||
xhci_writeq(&ctrl->ir_set->erst_dequeue,
|
||||
@@ -585,7 +588,7 @@ int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr,
|
||||
/* this is the event ring segment table pointer */
|
||||
val_64 = xhci_readq(&ctrl->ir_set->erst_base);
|
||||
val_64 &= ERST_PTR_MASK;
|
||||
- val_64 |= virt_to_phys(ctrl->erst.entries) & ~ERST_PTR_MASK;
|
||||
+ val_64 |= xhci_virt_to_bus(ctrl, ctrl->erst.entries) & ~ERST_PTR_MASK;
|
||||
|
||||
xhci_writeq(&ctrl->ir_set->erst_base, val_64);
|
||||
|
||||
@@ -848,7 +851,7 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl,
|
||||
/* EP 0 can handle "burst" sizes of 1, so Max Burst Size field is 0 */
|
||||
ep0_ctx->ep_info2 |= cpu_to_le32(MAX_BURST(0) | ERROR_COUNT(3));
|
||||
|
||||
- trb_64 = virt_to_phys(virt_dev->eps[0].ring->first_seg->trbs);
|
||||
+ trb_64 = xhci_virt_to_bus(ctrl, virt_dev->eps[0].ring->first_seg->trbs);
|
||||
ep0_ctx->deq = cpu_to_le64(trb_64 | virt_dev->eps[0].ring->cycle_state);
|
||||
|
||||
/*
|
||||
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
|
||||
index a893277c75..74deaabb9b 100644
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -275,10 +275,13 @@ void xhci_queue_command(struct xhci_ctrl *ctrl, u8 *ptr, u32 slot_id,
|
||||
u32 ep_index, trb_type cmd)
|
||||
{
|
||||
u32 fields[4];
|
||||
- u64 val_64 = virt_to_phys(ptr);
|
||||
+ u64 val_64 = 0;
|
||||
|
||||
BUG_ON(prepare_ring(ctrl, ctrl->cmd_ring, EP_STATE_RUNNING));
|
||||
|
||||
+ if (ptr)
|
||||
+ val_64 = xhci_virt_to_bus(ctrl, ptr);
|
||||
+
|
||||
fields[0] = lower_32_bits(val_64);
|
||||
fields[1] = upper_32_bits(val_64);
|
||||
fields[2] = 0;
|
||||
@@ -399,7 +402,7 @@ void xhci_acknowledge_event(struct xhci_ctrl *ctrl)
|
||||
|
||||
/* Inform the hardware */
|
||||
xhci_writeq(&ctrl->ir_set->erst_dequeue,
|
||||
- virt_to_phys(ctrl->event_ring->dequeue) | ERST_EHB);
|
||||
+ xhci_virt_to_bus(ctrl, ctrl->event_ring->dequeue) | ERST_EHB);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -577,7 +580,7 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe,
|
||||
u64 addr;
|
||||
int ret;
|
||||
u32 trb_fields[4];
|
||||
- u64 val_64 = virt_to_phys(buffer);
|
||||
+ u64 val_64 = xhci_virt_to_bus(ctrl, buffer);
|
||||
|
||||
debug("dev=%p, pipe=%lx, buffer=%p, length=%d\n",
|
||||
udev, pipe, buffer, length);
|
||||
@@ -876,7 +879,7 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
|
||||
if (length > 0) {
|
||||
if (req->requesttype & USB_DIR_IN)
|
||||
field |= TRB_DIR_IN;
|
||||
- buf_64 = virt_to_phys(buffer);
|
||||
+ buf_64 = xhci_virt_to_bus(ctrl, buffer);
|
||||
|
||||
trb_fields[0] = lower_32_bits(buf_64);
|
||||
trb_fields[1] = upper_32_bits(buf_64);
|
||||
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
|
||||
index 999ef79173..de2c83c64f 100644
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -606,7 +606,7 @@ static int xhci_set_configuration(struct usb_device *udev)
|
||||
ep_ctx[ep_index] = xhci_get_ep_ctx(ctrl, in_ctx, ep_index);
|
||||
|
||||
/* Allocate the ep rings */
|
||||
- virt_dev->eps[ep_index].ring = xhci_ring_alloc(1, true);
|
||||
+ virt_dev->eps[ep_index].ring = xhci_ring_alloc(ctrl, 1, true);
|
||||
if (!virt_dev->eps[ep_index].ring)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -630,7 +630,7 @@ static int xhci_set_configuration(struct usb_device *udev)
|
||||
cpu_to_le32(MAX_BURST(max_burst) |
|
||||
ERROR_COUNT(err_count));
|
||||
|
||||
- trb_64 = virt_to_phys(virt_dev->eps[ep_index].ring->enqueue);
|
||||
+ trb_64 = xhci_virt_to_bus(ctrl, virt_dev->eps[ep_index].ring->enqueue);
|
||||
ep_ctx[ep_index]->deq = cpu_to_le64(trb_64 |
|
||||
virt_dev->eps[ep_index].ring->cycle_state);
|
||||
|
||||
diff --git a/include/usb/xhci.h b/include/usb/xhci.h
|
||||
index 2e201bcbfa..12e2b3ba80 100644
|
||||
--- a/include/usb/xhci.h
|
||||
+++ b/include/usb/xhci.h
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifndef HOST_XHCI_H_
|
||||
#define HOST_XHCI_H_
|
||||
|
||||
+#include <phys2bus.h>
|
||||
#include <reset.h>
|
||||
#include <asm/types.h>
|
||||
#include <asm/cache.h>
|
||||
@@ -1251,7 +1252,8 @@ int xhci_check_maxpacket(struct usb_device *udev);
|
||||
void xhci_flush_cache(uintptr_t addr, u32 type_len);
|
||||
void xhci_inval_cache(uintptr_t addr, u32 type_len);
|
||||
void xhci_cleanup(struct xhci_ctrl *ctrl);
|
||||
-struct xhci_ring *xhci_ring_alloc(unsigned int num_segs, bool link_trbs);
|
||||
+struct xhci_ring *xhci_ring_alloc(struct xhci_ctrl *ctrl, unsigned int num_segs,
|
||||
+ bool link_trbs);
|
||||
int xhci_alloc_virt_device(struct xhci_ctrl *ctrl, unsigned int slot_id);
|
||||
int xhci_mem_init(struct xhci_ctrl *ctrl, struct xhci_hccr *hccr,
|
||||
struct xhci_hcor *hcor);
|
||||
@@ -1279,4 +1281,22 @@ extern struct dm_usb_ops xhci_usb_ops;
|
||||
|
||||
struct xhci_ctrl *xhci_get_ctrl(struct usb_device *udev);
|
||||
|
||||
+static inline dma_addr_t xhci_virt_to_bus(struct xhci_ctrl *ctrl, void *addr)
|
||||
+{
|
||||
+#if CONFIG_IS_ENABLED(DM_USB)
|
||||
+ return dev_phys_to_bus(ctrl->dev, virt_to_phys(addr));
|
||||
+#else
|
||||
+ return phys_to_bus(virt_to_phys(addr));
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+static inline void *xhci_bus_to_virt(struct xhci_ctrl *ctrl, dma_addr_t addr)
|
||||
+{
|
||||
+#if CONFIG_IS_ENABLED(DM_USB)
|
||||
+ return phys_to_virt(dev_bus_to_phys(ctrl->dev, addr));
|
||||
+#else
|
||||
+ return phys_to_virt(bus_to_phys(addr));
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
#endif /* HOST_XHCI_H_ */
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,78 @@
|
||||
From de9f878b9cc4ab665c6aa4e6bb14193c66f78816 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <de9f878b9cc4ab665c6aa4e6bb14193c66f78816.1606428503.git.stefan@agner.ch>
|
||||
In-Reply-To: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
References: <a04331a6ba7334282836bbaa76e979c4e6be3900.1606428503.git.stefan@agner.ch>
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Thu, 19 Nov 2020 18:48:22 +0100
|
||||
Subject: [PATCH 15/15] mmc: Introduce mmc_phys_to_bus()/mmc_bus_to_phys()
|
||||
|
||||
This will allow us to use DM variants of phys_to_bus()/bus_to_phys()
|
||||
when relevant.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
---
|
||||
drivers/mmc/sdhci.c | 7 ++++---
|
||||
include/mmc.h | 10 ++++++++++
|
||||
2 files changed, 14 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
|
||||
index d549a264d7..a5a6c751e3 100644
|
||||
--- a/drivers/mmc/sdhci.c
|
||||
+++ b/drivers/mmc/sdhci.c
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
-#include <phys2bus.h>
|
||||
|
||||
static void sdhci_reset(struct sdhci_host *host, u8 mask)
|
||||
{
|
||||
@@ -103,7 +102,8 @@ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
|
||||
mmc_get_dma_dir(data));
|
||||
|
||||
if (host->flags & USE_SDMA) {
|
||||
- sdhci_writel(host, phys_to_bus((ulong)host->start_addr),
|
||||
+ sdhci_writel(host,
|
||||
+ mmc_phys_to_bus(host->mmc, (ulong)host->start_addr),
|
||||
SDHCI_DMA_ADDRESS);
|
||||
}
|
||||
#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
|
||||
@@ -162,7 +162,8 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data)
|
||||
start_addr &=
|
||||
~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1);
|
||||
start_addr += SDHCI_DEFAULT_BOUNDARY_SIZE;
|
||||
- sdhci_writel(host, phys_to_bus((ulong)start_addr),
|
||||
+ sdhci_writel(host,
|
||||
+ mmc_phys_to_bus(host->mmc, (ulong)start_addr),
|
||||
SDHCI_DMA_ADDRESS);
|
||||
}
|
||||
}
|
||||
diff --git a/include/mmc.h b/include/mmc.h
|
||||
index 82562193cc..1d5b1f986e 100644
|
||||
--- a/include/mmc.h
|
||||
+++ b/include/mmc.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/dma-direction.h>
|
||||
#include <part.h>
|
||||
+#include <phys2bus.h>
|
||||
|
||||
struct bd_info;
|
||||
|
||||
@@ -938,4 +939,13 @@ static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data)
|
||||
return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
|
||||
}
|
||||
|
||||
+static inline dma_addr_t mmc_phys_to_bus(struct mmc *mmc, phys_addr_t addr)
|
||||
+{
|
||||
+#if CONFIG_IS_ENABLED(DM_MMC)
|
||||
+ return dev_phys_to_bus(mmc->dev, addr);
|
||||
+#else
|
||||
+ return phys_to_bus(addr);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
#endif /* _MMC_H_ */
|
||||
--
|
||||
2.29.2
|
||||
|
@ -37,16 +37,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load ${devtype} ${devnum}:2 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_a} rauc.slot=A"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load ${devtype} ${devnum}:2 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_a} rauc.slot=A"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load ${devtype} ${devnum}:4 ${kernel_addr_r} zImage"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load ${devtype} ${devnum}:4 ${kernel_addr_r} zImage; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@ -62,10 +64,8 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
echo "Starting kernel"
|
||||
bootz ${kernel_addr_r} - ${fdt_org}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
@ -37,16 +37,18 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do
|
||||
elif test "x${BOOT_SLOT}" = "xA"; then
|
||||
if test ${BOOT_A_LEFT} -gt 0; then
|
||||
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
|
||||
echo "Found valid slot A, ${BOOT_A_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load ${devtype} ${devnum}:2 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_a} rauc.slot=A"
|
||||
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load ${devtype} ${devnum}:2 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_a} rauc.slot=A"
|
||||
fi
|
||||
fi
|
||||
elif test "x${BOOT_SLOT}" = "xB"; then
|
||||
if test ${BOOT_B_LEFT} -gt 0; then
|
||||
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
|
||||
echo "Found valid slot B, ${BOOT_B_LEFT} attempts remaining"
|
||||
setenv load_kernel "ext4load ${devtype} ${devnum}:4 ${kernel_addr_r} Image"
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B"
|
||||
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
|
||||
if ext4load ${devtype} ${devnum}:4 ${kernel_addr_r} Image; then
|
||||
setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@ -62,10 +64,8 @@ else
|
||||
reset
|
||||
fi
|
||||
|
||||
echo "Loading kernel"
|
||||
run load_kernel
|
||||
echo " Starting kernel"
|
||||
echo "Starting kernel"
|
||||
booti ${kernel_addr_r} - ${fdt_org}
|
||||
|
||||
echo "Fails on boot"
|
||||
echo "Boot failed, resetting..."
|
||||
reset
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Busybox version: 1.31.1
|
||||
# Fri Apr 17 12:18:50 2020
|
||||
# Busybox version: 1.32.0
|
||||
# Fri Nov 20 14:15:29 2020
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
@ -76,6 +76,7 @@ CONFIG_PREFIX="./_install"
|
||||
# CONFIG_DEBUG_SANITIZE is not set
|
||||
# CONFIG_UNIT_TEST is not set
|
||||
# CONFIG_WERROR is not set
|
||||
# CONFIG_WARN_SIMPLE_MSG is not set
|
||||
CONFIG_NO_DEBUG_LIB=y
|
||||
# CONFIG_DMALLOC is not set
|
||||
# CONFIG_EFENCE is not set
|
||||
@ -462,6 +463,7 @@ CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=256
|
||||
# CONFIG_FEATURE_FIND_PRUNE is not set
|
||||
# CONFIG_FEATURE_FIND_QUIT is not set
|
||||
# CONFIG_FEATURE_FIND_DELETE is not set
|
||||
# CONFIG_FEATURE_FIND_EMPTY is not set
|
||||
# CONFIG_FEATURE_FIND_PATH is not set
|
||||
# CONFIG_FEATURE_FIND_REGEX is not set
|
||||
# CONFIG_FEATURE_FIND_CONTEXT is not set
|
||||
@ -556,12 +558,12 @@ CONFIG_FEATURE_DEFAULT_PASSWD_ALGO=""
|
||||
# CONFIG_MODPROBE_SMALL is not set
|
||||
# CONFIG_DEPMOD is not set
|
||||
# CONFIG_INSMOD is not set
|
||||
CONFIG_LSMOD=y
|
||||
CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
|
||||
CONFIG_MODINFO=y
|
||||
CONFIG_MODPROBE=y
|
||||
CONFIG_FEATURE_MODPROBE_BLACKLIST=y
|
||||
CONFIG_RMMOD=y
|
||||
# CONFIG_LSMOD is not set
|
||||
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
|
||||
# CONFIG_MODINFO is not set
|
||||
# CONFIG_MODPROBE is not set
|
||||
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
|
||||
# CONFIG_RMMOD is not set
|
||||
|
||||
#
|
||||
# Options common to multiple modutils
|
||||
@ -578,8 +580,8 @@ CONFIG_RMMOD=y
|
||||
# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
|
||||
# CONFIG_FEATURE_MODUTILS_ALIAS is not set
|
||||
# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set
|
||||
CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
|
||||
CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
|
||||
CONFIG_DEFAULT_MODULES_DIR=""
|
||||
CONFIG_DEFAULT_DEPMOD_FILE=""
|
||||
|
||||
#
|
||||
# Linux System Utilities
|
||||
@ -692,6 +694,7 @@ CONFIG_FEATURE_SWAPONOFF_LABEL=y
|
||||
CONFIG_SWITCH_ROOT=y
|
||||
CONFIG_TASKSET=y
|
||||
CONFIG_FEATURE_TASKSET_FANCY=y
|
||||
CONFIG_FEATURE_TASKSET_CPULIST=y
|
||||
CONFIG_UEVENT=y
|
||||
CONFIG_UMOUNT=y
|
||||
CONFIG_FEATURE_UMOUNT_ALL=y
|
||||
@ -809,6 +812,7 @@ CONFIG_FEATURE_LESS_MAXLINES=0
|
||||
# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
|
||||
# CONFIG_MAN is not set
|
||||
# CONFIG_MICROCOM is not set
|
||||
CONFIG_MIM=y
|
||||
# CONFIG_MT is not set
|
||||
CONFIG_NANDWRITE=y
|
||||
CONFIG_NANDDUMP=y
|
||||
@ -1095,6 +1099,7 @@ CONFIG_SH_IS_ASH=y
|
||||
CONFIG_BASH_IS_ASH=y
|
||||
# CONFIG_BASH_IS_HUSH is not set
|
||||
# CONFIG_BASH_IS_NONE is not set
|
||||
CONFIG_SHELL_ASH=y
|
||||
CONFIG_ASH=y
|
||||
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_ASH_INTERNAL_GLOB=y
|
||||
@ -1115,6 +1120,7 @@ CONFIG_ASH_GETOPTS=y
|
||||
CONFIG_ASH_CMDCMD=y
|
||||
# CONFIG_CTTYHACK is not set
|
||||
# CONFIG_HUSH is not set
|
||||
# CONFIG_SHELL_HUSH is not set
|
||||
# CONFIG_HUSH_BASH_COMPAT is not set
|
||||
# CONFIG_HUSH_BRACE_EXPANSION is not set
|
||||
# CONFIG_HUSH_LINENO_VAR is not set
|
||||
@ -1177,6 +1183,7 @@ CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS=y
|
||||
# CONFIG_FEATURE_REMOTE_LOG is not set
|
||||
# CONFIG_FEATURE_SYSLOGD_DUP is not set
|
||||
# CONFIG_FEATURE_SYSLOGD_CFG is not set
|
||||
# CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS is not set
|
||||
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
|
||||
# CONFIG_FEATURE_IPC_SYSLOG is not set
|
||||
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
|
||||
|
@ -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.63"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.80"
|
||||
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
|
||||
@ -54,11 +54,6 @@ BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -78,7 +73,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -106,6 +101,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="amd64"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="intel-nuc"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_INTEL_E1000E=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y
|
||||
|
@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-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.9.6"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.9.11"
|
||||
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"
|
||||
@ -46,11 +46,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
@ -69,7 +64,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -87,9 +82,10 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
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_4=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_9=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
@ -99,6 +95,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="aarch64"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="odroid-c2"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_HARDKERNEL_BOOT=y
|
||||
BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C2=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
|
@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.9.6"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.9.11"
|
||||
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"
|
||||
@ -46,11 +46,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
@ -69,7 +64,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -87,9 +82,10 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-c4"
|
||||
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/uboot.config"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_9=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
@ -99,5 +95,6 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="aarch64"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="odroid-c4"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_HARDKERNEL_BOOT=y
|
||||
BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C4=y
|
||||
|
@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.9.6"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.9.11"
|
||||
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 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/kernel.config"
|
||||
@ -46,11 +46,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
@ -69,7 +64,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -87,9 +82,10 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
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_4=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_9=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
@ -99,6 +95,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="aarch64"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="odroid-n2"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_HARDKERNEL_BOOT=y
|
||||
BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_N2=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=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/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.9.6"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.9.11"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="exynos"
|
||||
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
|
||||
@ -48,11 +48,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_DEPRECATED=y
|
||||
@ -71,7 +66,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -91,9 +86,10 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-xu3"
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
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_4=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_9=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
BR2_PACKAGE_HOST_GPTFDISK=y
|
||||
@ -103,6 +99,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="armv7"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="odroid-xu"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_HARDKERNEL_BOOT=y
|
||||
BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_XU4=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=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.63"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.80"
|
||||
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
|
||||
@ -44,11 +44,6 @@ BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -69,7 +64,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -97,5 +92,6 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="amd64"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="qemux86-64"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=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/2ae9829c3da54597a4701285f91985c4d08ee793.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.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_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@ -49,11 +49,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -72,7 +67,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -90,8 +85,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
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_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
@ -102,6 +98,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="armhf"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="raspberrypi"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_BLUETOOTH_BCM43XX=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=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/2ae9829c3da54597a4701285f91985c4d08ee793.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.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_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@ -48,11 +48,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -71,7 +66,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -89,8 +84,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
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_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
@ -101,5 +97,6 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="armv7"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="raspberrypi2"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=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/2ae9829c3da54597a4701285f91985c4d08ee793.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.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_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@ -49,11 +49,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -72,7 +67,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -90,8 +85,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
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_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot64.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
@ -102,6 +98,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="aarch64"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="raspberrypi3-64"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_BLUETOOTH_BCM43XX=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=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/2ae9829c3da54597a4701285f91985c4d08ee793.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.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_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@ -49,11 +49,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -72,7 +67,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -90,8 +85,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
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_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
@ -102,6 +98,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="armv7"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="raspberrypi3"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_BLUETOOTH_BCM43XX=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=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/2ae9829c3da54597a4701285f91985c4d08ee793.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.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_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@ -42,6 +42,7 @@ BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
|
||||
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_EEPROM=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
@ -50,11 +51,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -73,7 +69,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -91,8 +87,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
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_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot64.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
@ -103,6 +100,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="aarch64"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="raspberrypi4-64"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_BLUETOOTH_BCM43XX=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=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/2ae9829c3da54597a4701285f91985c4d08ee793.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.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_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@ -42,6 +42,7 @@ BR2_PACKAGE_SQUASHFS=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
|
||||
BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_EEPROM=y
|
||||
BR2_PACKAGE_CRDA=y
|
||||
BR2_PACKAGE_GPTFDISK=y
|
||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||
@ -50,11 +51,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -73,7 +69,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -91,8 +87,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
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_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
@ -103,6 +100,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="armv7"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="raspberrypi4"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_BLUETOOTH_BCM43XX=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=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/2ae9829c3da54597a4701285f91985c4d08ee793.tar.gz"
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/9797f1a4938c20139b00a25de93cc99efb5c291b.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_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config"
|
||||
BR2_LINUX_KERNEL_LZ4=y
|
||||
@ -48,11 +48,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -71,7 +66,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -89,8 +84,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.10"
|
||||
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_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
@ -101,5 +97,6 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="armhf"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="raspberrypi"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=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.63"
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.80"
|
||||
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"
|
||||
@ -50,11 +50,6 @@ BR2_PACKAGE_CA_CERTIFICATES=y
|
||||
BR2_PACKAGE_LIBDNET=y
|
||||
BR2_PACKAGE_LIBCGROUP=y
|
||||
BR2_PACKAGE_LIBCGROUP_TOOLS=y
|
||||
BR2_PACKAGE_AVAHI=y
|
||||
# BR2_PACKAGE_AVAHI_AUTOIPD is not set
|
||||
BR2_PACKAGE_AVAHI_DAEMON=y
|
||||
BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY=y
|
||||
BR2_PACKAGE_NSS_MDNS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS=y
|
||||
BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
|
||||
BR2_PACKAGE_DHCP=y
|
||||
@ -73,7 +68,7 @@ BR2_PACKAGE_RNG_TOOLS=y
|
||||
# BR2_PACKAGE_SYSTEMD_HWDB is not set
|
||||
# BR2_PACKAGE_SYSTEMD_NETWORKD is not set
|
||||
BR2_PACKAGE_SYSTEMD_RANDOMSEED=y
|
||||
# BR2_PACKAGE_SYSTEMD_RESOLVED is not set
|
||||
BR2_PACKAGE_SYSTEMD_RESOLVED=y
|
||||
BR2_PACKAGE_SYSTEMD_COREDUMP=y
|
||||
BR2_PACKAGE_SYSTEMD_LOGIND=y
|
||||
BR2_PACKAGE_UTIL_LINUX_PARTX=y
|
||||
@ -96,8 +91,9 @@ BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
|
||||
BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
|
||||
BR2_TARGET_UBOOT_SPL=y
|
||||
BR2_TARGET_UBOOT_SPL_NAME="idbloader.img"
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/uboot-boot.ush"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_E2FSPROGS=y
|
||||
@ -108,6 +104,7 @@ BR2_PACKAGE_HASSIO=y
|
||||
BR2_PACKAGE_HASSIO_ARCH="armv7"
|
||||
BR2_PACKAGE_HASSIO_MACHINE="tinker"
|
||||
BR2_PACKAGE_APPARMOR=y
|
||||
BR2_PACKAGE_APPARMOR_PROFILES=y
|
||||
BR2_PACKAGE_BLUETOOTH_RTL8723=y
|
||||
BR2_PACKAGE_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y
|
||||
|
@ -1,5 +1,5 @@
|
||||
VERSION_MAJOR=5
|
||||
VERSION_BUILD=5
|
||||
VERSION_BUILD=6
|
||||
|
||||
HASSOS_NAME="HassOS"
|
||||
HASSOS_ID="hassos"
|
||||
|
@ -1,9 +0,0 @@
|
||||
config BR2_PACKAGE_APPARMOR
|
||||
bool "apparmor"
|
||||
select BR2_PACKAGE_LIBAPPARMOR
|
||||
help
|
||||
AppArmor gives you network application security via mandatory
|
||||
access control for programs, protecting against the exploitation
|
||||
of software flaws and compromised systems.
|
||||
|
||||
http://apparmor.net
|
@ -1,24 +0,0 @@
|
||||
#############################################################
|
||||
#
|
||||
# apparmor
|
||||
#
|
||||
#############################################################
|
||||
APPARMOR_VERSION = v2.13.4
|
||||
APPARMOR_SITE = git://git.launchpad.net/apparmor
|
||||
APPARMOR_LICENSE = GPL-2
|
||||
APPARMOR_LICENSE_FILES = LICENSE
|
||||
APPARMOR_DEPENDENCIES = libapparmor
|
||||
|
||||
define APPARMOR_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) PATH=$(BR_PATH) $(MAKE) -C $(@D)/parser USE_SYSTEM=1 YACC=bison LEX=flex
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/profiles
|
||||
endef
|
||||
|
||||
define APPARMOR_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/parser DESTDIR=$(TARGET_DIR) USE_SYSTEM=1 PREFIX=/usr install
|
||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/profiles DESTDIR=$(TARGET_DIR) PREFIX=/usr install
|
||||
|
||||
rm -rf $(TARGET_DIR)/usr/lib/apparmor
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
echo "Setup the Bluetooth chip"
|
||||
echo 146 > /sys/class/gpio/export
|
||||
|
@ -1,8 +0,0 @@
|
||||
config BR2_PACKAGE_LIBAPPARMOR
|
||||
bool "libapparmor"
|
||||
help
|
||||
AppArmor gives you network application security via mandatory
|
||||
access control for programs, protecting against the exploitation
|
||||
of software flaws and compromised systems.
|
||||
|
||||
http://apparmor.net
|
@ -1,18 +0,0 @@
|
||||
#############################################################
|
||||
#
|
||||
# libapparmor
|
||||
#
|
||||
#############################################################
|
||||
LIBAPPARMOR_VERSION = v2.13.4
|
||||
LIBAPPARMOR_SITE = git://git.launchpad.net/apparmor
|
||||
LIBAPPARMOR_LICENSE = GPL-2
|
||||
LIBAPPARMOR_LICENSE_FILES = LICENSE
|
||||
LIBAPPARMOR_INSTALL_STAGING = YES
|
||||
LIBAPPARMOR_INSTALL_TARGET = NO
|
||||
LIBAPPARMOR_DEPENDENCIES = host-flex
|
||||
LIBAPPARMOR_SUBDIR = libraries/libapparmor
|
||||
LIBAPPARMOR_CONF_ENV = ac_cv_func_reallocarray=no
|
||||
LIBAPPARMOR_AUTORECONF = YES
|
||||
LIBAPPARMOR_CONF_OPTS = --enable-static
|
||||
|
||||
$(eval $(autotools-package))
|
6
buildroot-external/package/rpi-eeprom/Config.in
Normal file
6
buildroot-external/package/rpi-eeprom/Config.in
Normal file
@ -0,0 +1,6 @@
|
||||
config BR2_PACKAGE_RPI_EEPROM
|
||||
bool "rpi-eeprom"
|
||||
help
|
||||
EEPROM bootloader firmware for Raspberry Pi 4
|
||||
|
||||
https://github.com/raspberrypi/rpi-eeprom
|
26
buildroot-external/package/rpi-eeprom/rpi-eeprom.mk
Normal file
26
buildroot-external/package/rpi-eeprom/rpi-eeprom.mk
Normal file
@ -0,0 +1,26 @@
|
||||
#############################################################
|
||||
#
|
||||
# rpi-eeprom
|
||||
#
|
||||
#############################################################
|
||||
RPI_EEPROM_VERSION = 16bb29427f96dc8276a7102c0526154a1084bffd
|
||||
RPI_EEPROM_SITE = $(call github,raspberrypi,rpi-eeprom,$(RPI_EEPROM_VERSION))
|
||||
RPI_EEPROM_LICENSE = BSD-3-Clause
|
||||
RPI_EEPROM_LICENSE_FILES = LICENSE
|
||||
RPI_EEPROM_INSTALL_IMAGES = YES
|
||||
RPI_EEPROM_FIRMWARE_PATH = firmware/beta/pieeprom-2020-10-28.bin
|
||||
|
||||
define RPI_EEPROM_BUILD_CMDS
|
||||
$(@D)/rpi-eeprom-config $(@D)/$(RPI_EEPROM_FIRMWARE_PATH) --out $(@D)/default.conf
|
||||
(cat $(@D)/default.conf | grep -v ^$$; echo HDMI_DELAY=0) > $(@D)/boot.conf
|
||||
$(@D)/rpi-eeprom-config $(@D)/$(RPI_EEPROM_FIRMWARE_PATH) --config $(@D)/boot.conf --out $(@D)/pieeprom.upd
|
||||
sha256sum $(@D)/pieeprom.upd | awk '{ print $$1 }' > $(@D)/pieeprom.sig
|
||||
echo "ts: $$(date -u +%s)" >> $(@D)/pieeprom.sig
|
||||
endef
|
||||
|
||||
define RPI_EEPROM_INSTALL_IMAGES_CMDS
|
||||
$(INSTALL) -D -m 0644 $(@D)/pieeprom.sig $(BINARIES_DIR)/rpi-eeprom/pieeprom.sig
|
||||
$(INSTALL) -D -m 0644 $(@D)/pieeprom.upd $(BINARIES_DIR)/rpi-eeprom/pieeprom.upd
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
@ -1,25 +1,26 @@
|
||||
From 525b60af3320de3cc1f1145fe31a2de07b61faf6 Mon Sep 17 00:00:00 2001
|
||||
From ba87c495c416b65eca1d683ac980c2c8a673fcac Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ba87c495c416b65eca1d683ac980c2c8a673fcac.1605133890.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Sat, 28 Apr 2018 00:20:08 +0200
|
||||
Subject: [PATCH 1/1] Allow hostname on ro
|
||||
Subject: [PATCH 1/2] Allow hostname on ro
|
||||
|
||||
---
|
||||
src/hostname/hostnamed.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
|
||||
index d9ad2fb..87fae35 100644
|
||||
index 7f6607a527..4baccf0b06 100644
|
||||
--- a/src/hostname/hostnamed.c
|
||||
+++ b/src/hostname/hostnamed.c
|
||||
@@ -289,6 +289,7 @@ static int context_update_kernel_hostname(Context *c) {
|
||||
static int context_write_data_static_hostname(Context *c) {
|
||||
@@ -344,6 +344,7 @@ static int context_update_kernel_hostname(
|
||||
|
||||
static int context_write_data_static_hostname(Context *c) {
|
||||
assert(c);
|
||||
+ FILE *f = NULL;
|
||||
|
||||
if (isempty(c->data[PROP_STATIC_HOSTNAME])) {
|
||||
|
||||
@@ -297,7 +298,15 @@ static int context_write_data_static_hostname(Context *c) {
|
||||
@@ -352,7 +353,15 @@ static int context_write_data_static_hostname(Context *c) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -32,10 +33,10 @@ index d9ad2fb..87fae35 100644
|
||||
+ fputs(c->data[PROP_STATIC_HOSTNAME], f);
|
||||
+ fclose(f);
|
||||
+
|
||||
+ return 0;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int context_write_data_machine_info(Context *c) {
|
||||
--
|
||||
2.7.4
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
From 4a4298ef78e943d36f3b8d8e78bfa21b1506961e Mon Sep 17 00:00:00 2001
|
||||
From b5cbe6f17866ce2aa0bd4ad41148df26152dfa22 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <b5cbe6f17866ce2aa0bd4ad41148df26152dfa22.1605133890.git.stefan@agner.ch>
|
||||
In-Reply-To: <ba87c495c416b65eca1d683ac980c2c8a673fcac.1605133890.git.stefan@agner.ch>
|
||||
References: <ba87c495c416b65eca1d683ac980c2c8a673fcac.1605133890.git.stefan@agner.ch>
|
||||
From: Aman Gupta Karmani <aman@tmm1.net>
|
||||
Date: Mon, 12 Oct 2020 13:39:26 -0700
|
||||
Subject: [PATCH] time-wait-sync: log errors trying to watch
|
||||
Subject: [PATCH 2/2] time-wait-sync: log errors trying to watch
|
||||
/run/systemd/timesync
|
||||
|
||||
---
|
||||
@ -9,7 +12,7 @@ Subject: [PATCH] time-wait-sync: log errors trying to watch
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/time-wait-sync/time-wait-sync.c b/src/time-wait-sync/time-wait-sync.c
|
||||
index 96072445f6e..c8ec4850426 100644
|
||||
index e880f9e6b6..6672aea7f6 100644
|
||||
--- a/src/time-wait-sync/time-wait-sync.c
|
||||
+++ b/src/time-wait-sync/time-wait-sync.c
|
||||
@@ -50,7 +50,7 @@ static void clock_state_release(ClockState *sp) {
|
||||
@ -21,3 +24,6 @@ index 96072445f6e..c8ec4850426 100644
|
||||
return sp->run_systemd_timesync_wd;
|
||||
}
|
||||
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,54 +0,0 @@
|
||||
From f6f4f5fe5395a57f10dd446c7266c53f0673eaac Mon Sep 17 00:00:00 2001
|
||||
From: Balaji Punnuru <balaji_punnuru@cable.comcast.com>
|
||||
Date: Thu, 9 Apr 2020 12:21:49 -0400
|
||||
Subject: [PATCH] util: return the correct correct wd from inotify helpers
|
||||
|
||||
We need to propagate the acquired watch descriptors because our callers
|
||||
are counting on them.
|
||||
|
||||
[Lennart: this is split out of #15381 and simplified]
|
||||
---
|
||||
src/basic/fs-util.c | 14 ++++++++------
|
||||
1 file changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c
|
||||
index 558cafbcaf5..ef3b5a51842 100644
|
||||
--- a/src/basic/fs-util.c
|
||||
+++ b/src/basic/fs-util.c
|
||||
@@ -692,28 +692,30 @@ int unlink_or_warn(const char *filename) {
|
||||
|
||||
int inotify_add_watch_fd(int fd, int what, uint32_t mask) {
|
||||
char path[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int) + 1];
|
||||
- int r;
|
||||
+ int wd;
|
||||
|
||||
/* This is like inotify_add_watch(), except that the file to watch is not referenced by a path, but by an fd */
|
||||
xsprintf(path, "/proc/self/fd/%i", what);
|
||||
|
||||
- r = inotify_add_watch(fd, path, mask);
|
||||
- if (r < 0)
|
||||
+ wd = inotify_add_watch(fd, path, mask);
|
||||
+ if (wd < 0)
|
||||
return -errno;
|
||||
|
||||
- return r;
|
||||
+ return wd;
|
||||
}
|
||||
|
||||
int inotify_add_watch_and_warn(int fd, const char *pathname, uint32_t mask) {
|
||||
+ int wd;
|
||||
|
||||
- if (inotify_add_watch(fd, pathname, mask) < 0) {
|
||||
+ wd = inotify_add_watch(fd, pathname, mask);
|
||||
+ if (wd < 0) {
|
||||
if (errno == ENOSPC)
|
||||
return log_error_errno(errno, "Failed to add a watch for %s: inotify watch limit reached", pathname);
|
||||
|
||||
return log_error_errno(errno, "Failed to add a watch for %s: %m", pathname);
|
||||
}
|
||||
|
||||
- return 0;
|
||||
+ return wd;
|
||||
}
|
||||
|
||||
static bool unsafe_transition(const struct stat *a, const struct stat *b) {
|
@ -0,0 +1,49 @@
|
||||
From 63d929a7c6523ca5fcaed4a4d2a2e6643aa4ae44 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <63d929a7c6523ca5fcaed4a4d2a2e6643aa4ae44.1605605643.git.stefan@agner.ch>
|
||||
From: Stefan Agner <stefan@agner.ch>
|
||||
Date: Tue, 17 Nov 2020 10:33:05 +0100
|
||||
Subject: [PATCH] fw_printenv: use /run as default location for lock files
|
||||
|
||||
Use /run as location for lock files. This is the recommended location
|
||||
for lock files. The current location /var/lock is considered legacy by
|
||||
systemd.
|
||||
|
||||
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
||||
---
|
||||
tools/env/fw_env_main.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c
|
||||
index 1d193bd437..0b201b9e62 100644
|
||||
--- a/tools/env/fw_env_main.c
|
||||
+++ b/tools/env/fw_env_main.c
|
||||
@@ -73,7 +73,7 @@ void usage_printenv(void)
|
||||
" -c, --config configuration file, default:" CONFIG_FILE "\n"
|
||||
#endif
|
||||
" -n, --noheader do not repeat variable name in output\n"
|
||||
- " -l, --lock lock node, default:/var/lock\n"
|
||||
+ " -l, --lock lock node, default:/run\n"
|
||||
"\n");
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ void usage_env_set(void)
|
||||
#ifdef CONFIG_FILE
|
||||
" -c, --config configuration file, default:" CONFIG_FILE "\n"
|
||||
#endif
|
||||
- " -l, --lock lock node, default:/var/lock\n"
|
||||
+ " -l, --lock lock node, default:/run\n"
|
||||
" -s, --script batch mode to minimize writes\n"
|
||||
"\n"
|
||||
"Examples:\n"
|
||||
@@ -206,7 +206,7 @@ int parse_setenv_args(int argc, char *argv[])
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
- char *lockname = "/var/lock/" CMD_PRINTENV ".lock";
|
||||
+ char *lockname = "/run/" CMD_PRINTENV ".lock";
|
||||
int lockfd = -1;
|
||||
int retval = EXIT_SUCCESS;
|
||||
char *_cmdname;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -2,6 +2,8 @@
|
||||
id=HassOS default
|
||||
uuid=f62bf7c2-e565-49ff-bbfc-a4cf791e6add
|
||||
type=802-3-ethernet
|
||||
llmnr=2
|
||||
mdns=2
|
||||
|
||||
[ipv4]
|
||||
method=auto
|
||||
|
@ -1,17 +0,0 @@
|
||||
# See avahi-daemon.conf(5) for more information on this configuration
|
||||
# file!
|
||||
|
||||
[server]
|
||||
deny-interfaces=hassio, docker0
|
||||
use-ipv4=yes
|
||||
use-ipv6=yes
|
||||
enable-dbus=yes
|
||||
ratelimit-interval-usec=1000000
|
||||
ratelimit-burst=1000
|
||||
|
||||
[wide-area]
|
||||
enable-wide-area=yes
|
||||
|
||||
[publish]
|
||||
publish-hinfo=no
|
||||
publish-workstation=yes
|
25
buildroot-external/rootfs-overlay/etc/systemd/resolved.conf
Normal file
25
buildroot-external/rootfs-overlay/etc/systemd/resolved.conf
Normal file
@ -0,0 +1,25 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# systemd is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Entries in this file show the compile time defaults.
|
||||
# You can change settings by editing this file.
|
||||
# Defaults can be restored by simply deleting this file.
|
||||
#
|
||||
# See resolved.conf(5) for details
|
||||
|
||||
[Resolve]
|
||||
#DNS=
|
||||
#FallbackDNS=1.1.1.1 8.8.8.8 1.0.0.1 8.8.4.4 2606:4700:4700::1111 2001:4860:4860::8888 2606:4700:4700::1001 2001:4860:4860::8844
|
||||
#Domains=
|
||||
DNSSEC=no
|
||||
#DNSOverTLS=opportunistic
|
||||
#MulticastDNS=yes
|
||||
#LLMNR=yes
|
||||
#Cache=yes
|
||||
DNSStubListener=no
|
||||
#ReadEtcHosts=yes
|
||||
#ResolveUnicastSingleLabel=no
|
@ -0,0 +1,3 @@
|
||||
[Service]
|
||||
Name=%H [%m]
|
||||
Type=_workstation._tcp
|
@ -0,0 +1 @@
|
||||
disable apparmor.service
|
@ -1,23 +1,44 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2039
|
||||
# ==============================================================================
|
||||
# HassOS partition expander
|
||||
# ==============================================================================
|
||||
set -e
|
||||
|
||||
DEVICE_CHILD="$(findfs LABEL="hassos-data")"
|
||||
DEVICE_ROOT="/dev/$(lsblk -no pkname "${DEVICE_CHILD}")"
|
||||
PART_NUM="${DEVICE_CHILD: -1}"
|
||||
DEVICE_CHILD_NAME="$(basename "${DEVICE_CHILD}")"
|
||||
DEVICE_ROOT_NAME="$(lsblk -no pkname "${DEVICE_CHILD}")"
|
||||
DEVICE_ROOT="/dev/${DEVICE_ROOT_NAME}"
|
||||
PART_NUM="$(cat "/sys/class/block/${DEVICE_CHILD_NAME}/partition")"
|
||||
|
||||
# Need resize
|
||||
UNUSED=$(sfdisk -Fq "${DEVICE_ROOT}" | cut -d " " -f 3 | tail -1)
|
||||
if [ -z "${UNUSED}" ] || [ "${UNUSED}" -le "16384" ]; then
|
||||
# Get partition label type
|
||||
PART_TABLE="$(sfdisk -lqJ "${DEVICE_ROOT}")"
|
||||
PART_LABEL="$(echo "${PART_TABLE}" | jq -r '.partitiontable.label')"
|
||||
|
||||
if [ "${PART_LABEL}" = "gpt" ]; then
|
||||
echo "[INFO] Detected GPT partition label"
|
||||
# We cannot use .partitiontable.lastlba from the json output as we might
|
||||
# still have the backup GPT not at the end of the disk. Calculate last
|
||||
# usable LBA using disk size
|
||||
LAST_USABLE_LBA=$(( $(cat "/sys/class/block/${DEVICE_ROOT_NAME}/size") - 34 ))
|
||||
else
|
||||
echo "[INFO] Detected MBR partition label"
|
||||
LAST_USABLE_LBA=$(cat "/sys/class/block/${DEVICE_ROOT_NAME}/size")
|
||||
fi
|
||||
|
||||
# Calculate end of data partition
|
||||
JQ_FILTER=".partitiontable.partitions[] | select ( .node == \"${DEVICE_CHILD}\" ) | .start + .size"
|
||||
DATA_PARTITION_END="$(echo "${PART_TABLE}" | jq "${JQ_FILTER}")"
|
||||
|
||||
# Need resize? Ignore everything less than 8MB since that could be partition
|
||||
# alignment rounding...
|
||||
UNUSED_BLOCKS=$(( LAST_USABLE_LBA - DATA_PARTITION_END ))
|
||||
if [ "${UNUSED_BLOCKS}" -le "16384" ]; then
|
||||
echo "[INFO] No resize of data partition needed"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "[INFO] Update hassos-data partition ${PART_NUM}"
|
||||
if sfdisk -dq "${DEVICE_ROOT}" | grep -q 'label: gpt'; then
|
||||
if [ "${PART_LABEL}" = "gpt" ]; then
|
||||
sgdisk -e "${DEVICE_ROOT}"
|
||||
sgdisk -d "${PART_NUM}" \
|
||||
-n "${PART_NUM}:0:0" \
|
||||
|
@ -312,10 +312,10 @@ function convert_disk_image_virtual() {
|
||||
}
|
||||
|
||||
|
||||
function convert_disk_image_gz() {
|
||||
function convert_disk_image_xz() {
|
||||
local hdd_ext=${1:-img}
|
||||
local hdd_img="$(hassos_image_name "${hdd_ext}")"
|
||||
|
||||
rm -f "${hdd_img}.gz"
|
||||
gzip --best "${hdd_img}"
|
||||
rm -f "${hdd_img}.xz"
|
||||
xz -3 -T0 "${hdd_img}"
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
function hassos_image_name() {
|
||||
echo "${BINARIES_DIR}/${HASSOS_ID}_${BOARD_ID}-${VERSION_MAJOR}.${VERSION_BUILD}.${1}"
|
||||
echo "${BINARIES_DIR}/${HASSOS_ID}_${BOARD_ID}-$(hassos_version).${1}"
|
||||
}
|
||||
|
||||
function hassos_rauc_compatible() {
|
||||
@ -9,7 +9,11 @@ function hassos_rauc_compatible() {
|
||||
}
|
||||
|
||||
function hassos_version() {
|
||||
echo "${VERSION_MAJOR}.${VERSION_BUILD}"
|
||||
if [ -z "${VERSION_DEV}" ]; then
|
||||
echo "${VERSION_MAJOR}.${VERSION_BUILD}"
|
||||
else
|
||||
echo "${VERSION_MAJOR}.${VERSION_BUILD}.${VERSION_DEV}"
|
||||
fi
|
||||
}
|
||||
|
||||
function path_spl_img() {
|
||||
|
@ -22,11 +22,11 @@ install_hassos_cli
|
||||
# shellcheck disable=SC2153
|
||||
(
|
||||
echo "NAME=${HASSOS_NAME}"
|
||||
echo "VERSION=\"${VERSION_MAJOR}.${VERSION_BUILD} (${BOARD_NAME})\""
|
||||
echo "VERSION=\"$(hassos_version) (${BOARD_NAME})\""
|
||||
echo "ID=${HASSOS_ID}"
|
||||
echo "VERSION_ID=${VERSION_MAJOR}.${VERSION_BUILD}"
|
||||
echo "PRETTY_NAME=\"${HASSOS_NAME} ${VERSION_MAJOR}.${VERSION_BUILD}\""
|
||||
echo "CPE_NAME=cpe:2.3:o:home_assistant:${HASSOS_ID}:${VERSION_MAJOR}.${VERSION_BUILD}:*:${DEPLOYMENT}:*:*:*:${BOARD_ID}:*"
|
||||
echo "VERSION_ID=$(hassos_version)"
|
||||
echo "PRETTY_NAME=\"${HASSOS_NAME} $(hassos_version)\""
|
||||
echo "CPE_NAME=cpe:2.3:o:home_assistant:${HASSOS_ID}:$(hassos_version):*:${DEPLOYMENT}:*:*:*:${BOARD_ID}:*"
|
||||
echo "HOME_URL=https://hass.io/"
|
||||
echo "VARIANT=\"${HASSOS_NAME} ${BOARD_NAME}\""
|
||||
echo "VARIANT_ID=${BOARD_ID}"
|
||||
|
@ -16,6 +16,9 @@ function fix_rootfs() {
|
||||
# Cleanup miscs
|
||||
rm -rf "${TARGET_DIR}/usr/lib/modules-load.d"
|
||||
|
||||
# systemd-update-done.service relies on writeable /var and /etc
|
||||
rm -f "${TARGET_DIR}/usr/lib/systemd/system/sysinit.target.wants/systemd-update-done.service"
|
||||
|
||||
# Fix: permission for system connection files
|
||||
chmod 600 "${TARGET_DIR}/etc/NetworkManager/system-connections"/*
|
||||
|
||||
@ -24,6 +27,9 @@ function fix_rootfs() {
|
||||
|
||||
# Fix: Could not generate persistent MAC address
|
||||
sed -i "s/MACAddressPolicy=persistent/MACAddressPolicy=none/g" "${TARGET_DIR}/usr/lib/systemd/network/99-default.link"
|
||||
|
||||
# Use systemd-resolved for Host OS resolve
|
||||
sed -i '/^hosts:/ {/resolve/! s/files/resolve [!UNAVAIL=return] files/}' "${TARGET_DIR}/etc/nsswitch.conf"
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
From a874e0babaeefacd8e3d04a9c056dd6f1121307d Mon Sep 17 00:00:00 2001
|
||||
From 8aa12f1835721959d0d1999fceee632404f28366 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8aa12f1835721959d0d1999fceee632404f28366.1605131156.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Mon, 13 Jan 2020 12:27:06 +0000
|
||||
Subject: [PATCH 1/1] Docker: AppArmor support
|
||||
Subject: [PATCH 1/7] Docker: AppArmor support
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@ -11,7 +12,7 @@ Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
3 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/package/docker-containerd/docker-containerd.mk b/package/docker-containerd/docker-containerd.mk
|
||||
index 69068e44f8..4dc0ef4672 100644
|
||||
index 71f9b4c065..e4a4105018 100644
|
||||
--- a/package/docker-containerd/docker-containerd.mk
|
||||
+++ b/package/docker-containerd/docker-containerd.mk
|
||||
@@ -17,6 +17,7 @@ DOCKER_CONTAINERD_LDFLAGS = \
|
||||
@ -23,7 +24,7 @@ index 69068e44f8..4dc0ef4672 100644
|
||||
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
||||
DOCKER_CONTAINERD_DEPENDENCIES += libseccomp host-pkgconf
|
||||
diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk
|
||||
index 24022f7107..14673f3183 100644
|
||||
index 8cedf307ba..370cfdbaee 100644
|
||||
--- a/package/docker-engine/docker-engine.mk
|
||||
+++ b/package/docker-engine/docker-engine.mk
|
||||
@@ -17,7 +17,7 @@ DOCKER_ENGINE_LDFLAGS = \
|
||||
@ -36,18 +37,18 @@ index 24022f7107..14673f3183 100644
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
||||
diff --git a/package/runc/runc.mk b/package/runc/runc.mk
|
||||
index acf61ab160..3432dd5fe0 100644
|
||||
index 3d177d23d5..d9e953c640 100644
|
||||
--- a/package/runc/runc.mk
|
||||
+++ b/package/runc/runc.mk
|
||||
@@ -13,7 +13,7 @@ RUNC_WORKSPACE = Godeps/_workspace
|
||||
@@ -10,7 +10,7 @@ RUNC_LICENSE = Apache-2.0
|
||||
RUNC_LICENSE_FILES = LICENSE
|
||||
|
||||
RUNC_LDFLAGS = -X main.gitCommit=$(RUNC_VERSION)
|
||||
|
||||
-RUNC_TAGS = cgo static_build
|
||||
+RUNC_TAGS = cgo static_build apparmor
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
||||
RUNC_TAGS += seccomp
|
||||
--
|
||||
2.17.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
From 73246b185df88a6e6d810e9f91fa54bea2bfcb05 Mon Sep 17 00:00:00 2001
|
||||
From 05fa58fbff93719044a9d1bb9e7c82d67068e346 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <05fa58fbff93719044a9d1bb9e7c82d67068e346.1605131156.git.stefan@agner.ch>
|
||||
In-Reply-To: <8aa12f1835721959d0d1999fceee632404f28366.1605131156.git.stefan@agner.ch>
|
||||
References: <8aa12f1835721959d0d1999fceee632404f28366.1605131156.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Thu, 16 Apr 2020 11:51:46 +0000
|
||||
Subject: [PATCH 1/1] rpi-firmware: Bump firmware
|
||||
Subject: [PATCH 2/7] rpi-firmware: Bump firmware
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@ -10,27 +13,27 @@ Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/package/rpi-firmware/rpi-firmware.hash b/package/rpi-firmware/rpi-firmware.hash
|
||||
index 59ab1da0c6..e3ba1bf99c 100644
|
||||
index 8730ec959b..49a600903c 100644
|
||||
--- a/package/rpi-firmware/rpi-firmware.hash
|
||||
+++ b/package/rpi-firmware/rpi-firmware.hash
|
||||
@@ -1,3 +1,3 @@
|
||||
# Locally computed
|
||||
-sha256 31a84340be08be319570a9d1439f25c0e3513fed73065a56aa5dd61dd605d5d9 rpi-firmware-01ecfd2ba2b7cf3a2f4aa75ada895ee4a3e729f5.tar.gz
|
||||
+sha256 30e91cc1b502bb1a8aeddf49e7d9dd3fb4a8c2f3b9154a2fea9ecc9071f54bc7 rpi-firmware-2ba11f2a07760588546821aed578010252c9ecb3.tar.gz
|
||||
sha256 c7283ff51f863d93a275c66e3b4cb08021a5dd4d8c1e7acc47d872fbe52d3d6b boot/LICENCE.broadcom
|
||||
-sha256 c7a8c2b8cfe1977095d62086d340d6c15a383562aba2742e21df7f5f792aeb4b rpi-firmware-358f4c271f2bc10931aae8fe0879ffaded8b9c44.tar.gz
|
||||
+sha256 30e91cc1b502bb1a8aeddf49e7d9dd3fb4a8c2f3b9154a2fea9ecc9071f54bc7 rpi-firmware-2ba11f2a07760588546821aed578010252c9ecb3.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
|
||||
index 8b2b2c7154..fe7a099407 100644
|
||||
--- a/package/rpi-firmware/rpi-firmware.mk
|
||||
+++ b/package/rpi-firmware/rpi-firmware.mk
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
-RPI_FIRMWARE_VERSION = 01ecfd2ba2b7cf3a2f4aa75ada895ee4a3e729f5
|
||||
-RPI_FIRMWARE_VERSION = 358f4c271f2bc10931aae8fe0879ffaded8b9c44
|
||||
+RPI_FIRMWARE_VERSION = 2ba11f2a07760588546821aed578010252c9ecb3
|
||||
RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION))
|
||||
RPI_FIRMWARE_LICENSE = BSD-3-Clause
|
||||
RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom
|
||||
--
|
||||
2.17.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
From 297ba4e3286e590bd1c2d2e6ec778a84748b5807 Mon Sep 17 00:00:00 2001
|
||||
From d1f588ab003b001079b6fab1cfd5d43401989b3b Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <d1f588ab003b001079b6fab1cfd5d43401989b3b.1605131156.git.stefan@agner.ch>
|
||||
In-Reply-To: <8aa12f1835721959d0d1999fceee632404f28366.1605131156.git.stefan@agner.ch>
|
||||
References: <8aa12f1835721959d0d1999fceee632404f28366.1605131156.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Thu, 16 Apr 2020 14:32:45 +0000
|
||||
Subject: [PATCH 1/1] network-manager: wpa_supplicant
|
||||
Subject: [PATCH 3/7] network-manager: wpa_supplicant
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@ -10,7 +13,7 @@ Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in
|
||||
index e6a3f5f04f..accea923af 100644
|
||||
index 7d44768460..218dc860ff 100644
|
||||
--- a/package/network-manager/Config.in
|
||||
+++ b/package/network-manager/Config.in
|
||||
@@ -15,8 +15,9 @@ config BR2_PACKAGE_NETWORK_MANAGER
|
||||
@ -26,7 +29,7 @@ index e6a3f5f04f..accea923af 100644
|
||||
select BR2_PACKAGE_LIBNDP
|
||||
help
|
||||
diff --git a/package/network-manager/network-manager.mk b/package/network-manager/network-manager.mk
|
||||
index 56b768cdef..727cfb98a4 100644
|
||||
index 3dc3188f32..2a04b00cee 100644
|
||||
--- a/package/network-manager/network-manager.mk
|
||||
+++ b/package/network-manager/network-manager.mk
|
||||
@@ -10,7 +10,7 @@ NETWORK_MANAGER_SOURCE = NetworkManager-$(NETWORK_MANAGER_VERSION).tar.xz
|
||||
@ -35,9 +38,9 @@ index 56b768cdef..727cfb98a4 100644
|
||||
NETWORK_MANAGER_DEPENDENCIES = host-pkgconf udev gnutls libglib2 \
|
||||
- libgcrypt wireless_tools util-linux host-intltool readline libndp
|
||||
+ libgcrypt wpa_supplicant util-linux host-intltool readline libndp
|
||||
# Even though the COPYING file only contains the GPL-2.0 text, many
|
||||
# parts of network-manager are under LGPL-2.0. See the "Legal" section
|
||||
# of the CONTRIBUTING file for details.
|
||||
NETWORK_MANAGER_LICENSE = GPL-2.0+ (app), LGPL-2.1+ (libnm)
|
||||
NETWORK_MANAGER_LICENSE_FILES = COPYING COPYING.LGPL CONTRIBUTING
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.29.2
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
From 0e0679ca2ab40de3b6b629901909385c310010b1 Mon Sep 17 00:00:00 2001
|
||||
From fe8fec1b597f65938376451c7cf84a462c492fd9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <fe8fec1b597f65938376451c7cf84a462c492fd9.1605131156.git.stefan@agner.ch>
|
||||
In-Reply-To: <8aa12f1835721959d0d1999fceee632404f28366.1605131156.git.stefan@agner.ch>
|
||||
References: <8aa12f1835721959d0d1999fceee632404f28366.1605131156.git.stefan@agner.ch>
|
||||
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
Date: Thu, 16 Apr 2020 12:01:44 +0000
|
||||
Subject: [PATCH 1/1] Fix dhcp client
|
||||
Subject: [PATCH 4/7] Fix dhcp client
|
||||
|
||||
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
---
|
||||
@ -9,7 +12,7 @@ Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk
|
||||
index 335c631119..518e8a4681 100644
|
||||
index ad59804d3b..f1ffa81d9a 100644
|
||||
--- a/package/dhcp/dhcp.mk
|
||||
+++ b/package/dhcp/dhcp.mk
|
||||
@@ -76,8 +76,7 @@ endif
|
||||
@ -23,5 +26,5 @@ index 335c631119..518e8a4681 100644
|
||||
install-sbinPROGRAMS
|
||||
$(INSTALL) -m 0644 -D package/dhcp/dhclient.conf \
|
||||
--
|
||||
2.17.1
|
||||
2.29.2
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user