mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 15:43:02 +02:00
Compare commits
1
Commits
latest
..
wkz/native
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bdf44ad7a |
@@ -2,15 +2,16 @@ Contributing to Infix
|
|||||||
=====================
|
=====================
|
||||||
|
|
||||||
We welcome any and all help in the form of bug reports, fixes, patches
|
We welcome any and all help in the form of bug reports, fixes, patches
|
||||||
to add new features -- *preferably as GitHub pull requests*.
|
to add new features -- *preferably as GitHub pull requests*. Other
|
||||||
|
methods are of course also possible: emailing the [maintainers][] a
|
||||||
|
patch or even a raw file, a feature request or an alert of a problem.
|
||||||
|
|
||||||
If you are unsure of what to do, or how to implement an idea or bug fix,
|
If you are unsure of what to do, or how to implement an idea or bugfix,
|
||||||
open an issue with `"[RFC]: Unsure if this is a bug ... ?"`, or use the
|
open an issue with `"[RFC: Unsure if this is a bug ... ?"`, or use the
|
||||||
[GitHub discussions forum](https://github.com/orgs/kernelkit/discussions).
|
GitHub discussions forum, so we can discuss it. Talking about the code
|
||||||
Talking about code and problems first is often the best way to get started
|
first is the best way to get started before submitting a pull request.
|
||||||
before submitting a pull request.
|
|
||||||
|
|
||||||
When submitting a bug report, patch, or pull request, please start by
|
Either way, when sending an email, patch, or pull request, start by
|
||||||
stating the version the change is made against, what it does, and why.
|
stating the version the change is made against, what it does, and why.
|
||||||
|
|
||||||
Please take care to ensure you follow the project coding style and the
|
Please take care to ensure you follow the project coding style and the
|
||||||
@@ -71,6 +72,7 @@ The *"maintainers have the right and responsibility to remove, edit,
|
|||||||
or reject comments, commits, code, wiki edits, issues, and other
|
or reject comments, commits, code, wiki edits, issues, and other
|
||||||
contributions that are not aligned to this Code of Conduct."*
|
contributions that are not aligned to this Code of Conduct."*
|
||||||
|
|
||||||
|
[1]: ../doc/MAINTAINERS
|
||||||
[KNF]: https://en.wikipedia.org/wiki/Kernel_Normal_Form
|
[KNF]: https://en.wikipedia.org/wiki/Kernel_Normal_Form
|
||||||
[gitbook]: https://git-scm.com/book/ch5-2.html
|
[gitbook]: https://git-scm.com/book/ch5-2.html
|
||||||
[conduct]: CODE-OF-CONDUCT.md
|
[conduct]: CODE-OF-CONDUCT.md
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
Paid support and development provided by Addiva Elektronik <https://addiva.se>
|
|
||||||
+20
-41
@@ -1,82 +1,61 @@
|
|||||||
# To enable this workflow of your Infix fork, set the repoistory or
|
|
||||||
# organisation variable (not secret):
|
|
||||||
#
|
|
||||||
# LATEST_BUILD = true
|
|
||||||
#
|
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-a-repository
|
|
||||||
name: Bob the Builder
|
name: Bob the Builder
|
||||||
|
|
||||||
|
# Consider switching to 'on: workflow_dispatch' when activity increases.
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- '*'
|
||||||
workflow_dispatch:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: ${{ vars.LATEST_BUILD == 'true' }}
|
name: Build ${{ matrix.platform }}
|
||||||
name: Build ${{ matrix.platform }} ${{ matrix.variant }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [aarch64, x86_64]
|
platform: [aarch64, amd64]
|
||||||
variant: [netconf, classic]
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set Build Variables
|
- name: Set Build Variables
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ matrix.variant }}" = "netconf" ]; then
|
echo "dir=infix-${{ matrix.platform }}" >> $GITHUB_OUTPUT
|
||||||
target=${{ matrix.platform }}
|
echo "tgz=infix-${{ matrix.platform }}.tar.gz" >> $GITHUB_OUTPUT
|
||||||
else
|
|
||||||
target=${{ matrix.platform }}-${{ matrix.variant }}
|
|
||||||
fi
|
|
||||||
echo "dir=infix-$target" >> $GITHUB_OUTPUT
|
|
||||||
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
|
|
||||||
- name: Restore Cache of dl/
|
- name: Restore Cache of dl/
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: dl/
|
path: dl/
|
||||||
key: dl-${{ matrix.platform }}-${{ matrix.variant }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
|
key: dl-${{ matrix.platform }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
dl-${{ matrix.platform }}-${{ matrix.variant }}-
|
|
||||||
dl-${{ matrix.platform }}-
|
dl-${{ matrix.platform }}-
|
||||||
dl-
|
dl-
|
||||||
- name: Restore Cache of .ccache/
|
- name: Restore Cache of .ccache/
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: .ccache/
|
path: .buildroot-ccache/
|
||||||
key: ccache-${{ matrix.platform }}-${{ matrix.variant }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
key: ccache-${{ matrix.board }}-os-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
ccache-${{ matrix.platform }}-${{ matrix.variant }}-
|
ccache-${{ matrix.board }}-os-
|
||||||
ccache-${{ matrix.platform }}-
|
ccache-${{ matrix.board }}-
|
||||||
ccache-
|
ccache--os-
|
||||||
- name: Configure & Build
|
- name: Configure & Build
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ matrix.variant }}" = "netconf" ]; then
|
make ${{ matrix.platform }}_defconfig
|
||||||
target=${{ matrix.platform }}_defconfig
|
|
||||||
else
|
|
||||||
target=${{ matrix.platform }}_${{ matrix.variant }}_defconfig
|
|
||||||
fi
|
|
||||||
echo "Buildring $target ..."
|
|
||||||
make $target
|
|
||||||
make
|
make
|
||||||
- name: Prepare Artifact
|
- name: Prepare Artifact
|
||||||
run: |
|
run: |
|
||||||
cd output
|
cd output
|
||||||
mv images ${{ steps.vars.outputs.dir }}
|
mv images ${{ steps.vars.outputs.dir }}
|
||||||
ln -s ${{ steps.vars.outputs.dir }} images
|
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
||||||
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
ls -l
|
||||||
- name: Test
|
ls -l ${{ steps.vars.outputs.dir }}
|
||||||
if: matrix.platform == 'x86_64' && matrix.variant == 'netconf'
|
|
||||||
run: |
|
|
||||||
make test-qeneth
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: output/${{ steps.vars.outputs.tgz }}
|
path: output/${{ steps.vars.outputs.tgz }}
|
||||||
release:
|
release:
|
||||||
if: ${{github.repository_owner == 'kernelkit' && github.ref_name == 'main'}}
|
|
||||||
name: Upload Latest Build
|
name: Upload Latest Build
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -85,7 +64,7 @@ jobs:
|
|||||||
- uses: pyTooling/Actions/releaser@main
|
- uses: pyTooling/Actions/releaser@main
|
||||||
with:
|
with:
|
||||||
tag: latest
|
tag: latest
|
||||||
rm: false
|
rm: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: artifact/*
|
files: artifact/*
|
||||||
- name: Summary
|
- name: Summary
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
# To enable this workflow of your Infix fork, set the repoistory or
|
|
||||||
# organisation variable (not secret):
|
|
||||||
#
|
|
||||||
# REGRESSION_TEST = true
|
|
||||||
#
|
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-a-repository
|
|
||||||
name: Reggie Regression
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: ${{ vars.REGRESSION_TEST == 'true' }}
|
|
||||||
name: Regression Testing
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: 'true'
|
|
||||||
- name: Set Build Variables
|
|
||||||
id: vars
|
|
||||||
run: |
|
|
||||||
target=x86_64-minimal
|
|
||||||
echo "dir=infix-$target" >> $GITHUB_OUTPUT
|
|
||||||
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
|
|
||||||
- name: Restore Cache of dl/
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: dl/
|
|
||||||
key: dl-x86_64-netconf-${{ hashFiles('.git/modules/buildroot/refs/heads/master', 'package/*/*.hash') }}
|
|
||||||
restore-keys: |
|
|
||||||
dl-x86_64-netconf-
|
|
||||||
dl-x86_64-
|
|
||||||
dl-
|
|
||||||
- name: Restore Cache of .ccache/
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: .ccache/
|
|
||||||
key: ccache-x86_64-netconf-${{ hashFiles('.git/modules/buildroot/refs/head/master', 'package/*/*.hash') }}
|
|
||||||
restore-keys: |
|
|
||||||
ccache-x86_64-netconf-
|
|
||||||
ccache-x86_64-
|
|
||||||
ccache-
|
|
||||||
- name: Configure Minimal NETCONF
|
|
||||||
run: |
|
|
||||||
make x86_64_minimal_defconfig
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
make
|
|
||||||
- name: Prepare Artifact
|
|
||||||
run: |
|
|
||||||
cd output
|
|
||||||
mv images ${{ steps.vars.outputs.dir }}
|
|
||||||
ln -s ${{ steps.vars.outputs.dir }} images
|
|
||||||
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
path: output/${{ steps.vars.outputs.tgz }}
|
|
||||||
|
|
||||||
- name: Regression Test
|
|
||||||
run: make test-qeneth
|
|
||||||
|
|
||||||
- name: Publish Test Result
|
|
||||||
# Ensure this runs even if Regression Test fails
|
|
||||||
if: always()
|
|
||||||
run: cat test/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
name: Release General
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 'v[0-9]*.*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: github.repository == 'kernelkit/infix' && startsWith(github.ref, 'refs/tags/')
|
|
||||||
name: Build Infix ${{ github.ref_name }} [${{ matrix.platform }}-${{ matrix.variant }}]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [aarch64, x86_64]
|
|
||||||
variant: [netconf, classic]
|
|
||||||
fail-fast: false
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Set Release Variables
|
|
||||||
id: build
|
|
||||||
run: |
|
|
||||||
ver=${GITHUB_REF#refs/tags/v}
|
|
||||||
echo "ver=${ver}" >> $GITHUB_OUTPUT
|
|
||||||
if echo $ver | grep -qE '[0-9.]+(-alpha|-beta|-rc)[0-9]*'; then
|
|
||||||
echo "pre=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "pre=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
if [ "${{ matrix.variant }}" = "netconf" ]; then
|
|
||||||
target=${{ matrix.platform }}-${ver}
|
|
||||||
else
|
|
||||||
target=${{ matrix.platform }}-${{ matrix.variant }}-${ver}
|
|
||||||
fi
|
|
||||||
echo "dir=infix-$target" >> $GITHUB_OUTPUT
|
|
||||||
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
|
|
||||||
- name: Restore Cache of dl/
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: dl/
|
|
||||||
key: dl-${{ matrix.platform }}-${{ matrix.variant }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
|
|
||||||
restore-keys: |
|
|
||||||
dl-${{ matrix.platform }}-${{ matrix.variant }}-
|
|
||||||
dl-${{ matrix.platform }}-
|
|
||||||
dl-
|
|
||||||
- name: Restore Cache of .ccache/
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: .ccache/
|
|
||||||
key: ccache-${{ matrix.platform }}-${{ matrix.variant }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
|
||||||
restore-keys: |
|
|
||||||
ccache-${{ matrix.platform }}-${{ matrix.variant }}-
|
|
||||||
ccache-${{ matrix.platform }}-
|
|
||||||
ccache-
|
|
||||||
- name: Configure & Build
|
|
||||||
env:
|
|
||||||
INFIX_RELEASE: ${{ steps.build.outputs.ver }}
|
|
||||||
run: |
|
|
||||||
if [ "${{ matrix.variant }}" = "netconf" ]; then
|
|
||||||
target=${{ matrix.platform }}_defconfig
|
|
||||||
else
|
|
||||||
target=${{ matrix.platform }}_${{ matrix.variant }}_defconfig
|
|
||||||
fi
|
|
||||||
echo "Buildring $target ..."
|
|
||||||
make $target
|
|
||||||
make
|
|
||||||
- name: Prepare Artifact
|
|
||||||
run: |
|
|
||||||
cd output
|
|
||||||
mv images ${{ steps.build.outputs.dir }}
|
|
||||||
ln -s ${{ steps.build.outputs.dir }} images
|
|
||||||
tar chfz ${{ steps.build.outputs.tgz }} ${{ steps.build.outputs.dir }}
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
path: output/${{ steps.build.outputs.tgz }}
|
|
||||||
release:
|
|
||||||
name: Release Infix ${{ github.ref_name }}
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
- name: Extract ChangeLog entry ...
|
|
||||||
run: |
|
|
||||||
awk '/-----*/{if (x == 1) exit; x=1;next}x' doc/ChangeLog.md \
|
|
||||||
|head -n -1 > release.md
|
|
||||||
cat release.md
|
|
||||||
- uses: ncipollo/release-action@v1
|
|
||||||
with:
|
|
||||||
name: Infix ${{ github.ref_name }}
|
|
||||||
prerelease: ${{ needs.build.outputs.pre }}
|
|
||||||
bodyFile: release.md
|
|
||||||
artifacts: artifact/*
|
|
||||||
- name: Summary
|
|
||||||
run: |
|
|
||||||
cat <<EOF >> $GITHUB_STEP_SUMMARY
|
|
||||||
# Infix ${{ github.ref_name }} Released! :rocket:
|
|
||||||
|
|
||||||
For the public download links of this release, please see:
|
|
||||||
<https://github.com/kernelkit/infix/releases/tag/${{ github.ref_name }}>
|
|
||||||
EOF
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# To enable automatic sync of your Infix fork every day, or on dispatch,
|
|
||||||
# set the repoistory or organisation variable (not secret):
|
|
||||||
#
|
|
||||||
# SYNC_FORK = true
|
|
||||||
#
|
|
||||||
# You also need a GH_SYNC_REPO token allowed to update workflows. For
|
|
||||||
# more information on variables and secrets, see the GitHub docs.
|
|
||||||
# See https://docs.github.com/en/actions/learn-github-actions/variables
|
|
||||||
name: Synchronize your fork of Infix with upstream
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: 42 2 * * *
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
sync_fork:
|
|
||||||
if: ${{github.repository_owner != 'kernelkit' && vars.SYNC_FORK == 'true' }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: TobKed/github-forks-sync-action@master
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GH_SYNC_REPO }}
|
|
||||||
upstream_repository: KernelKit/infix
|
|
||||||
upstream_branch: main
|
|
||||||
target_branch: main
|
|
||||||
force: false
|
|
||||||
tags: true
|
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
*~
|
*~
|
||||||
.gdb_history
|
.gdb_history
|
||||||
/.backup
|
|
||||||
/.ccache
|
/.ccache
|
||||||
/dl
|
/dl
|
||||||
/output*
|
/output*
|
||||||
/x-*
|
|
||||||
/test/.venv
|
|
||||||
/test/.log
|
|
||||||
/local.mk
|
/local.mk
|
||||||
|
|||||||
+1
-7
@@ -1,9 +1,3 @@
|
|||||||
[submodule "buildroot"]
|
[submodule "buildroot"]
|
||||||
path = buildroot
|
path = buildroot
|
||||||
url = ../buildroot.git
|
url = https://github.com/buildroot/buildroot.git
|
||||||
[submodule "9pm"]
|
|
||||||
path = 9pm
|
|
||||||
url = ../9pm
|
|
||||||
[submodule "qeneth"]
|
|
||||||
path = qeneth
|
|
||||||
url = ../qeneth.git
|
|
||||||
|
|||||||
-1
Submodule 9pm deleted from d80f8cfc7d
@@ -1,140 +1,13 @@
|
|||||||
menu "Branding"
|
|
||||||
|
|
||||||
config INFIX_VENDOR
|
|
||||||
string "Vendor name"
|
|
||||||
default "KernelKit"
|
|
||||||
help
|
|
||||||
The name of the operating system vendor. This is the name of the
|
|
||||||
organization or company which produces the OS.
|
|
||||||
|
|
||||||
This name is intended to be exposed in "About this system" UIs or
|
|
||||||
software update UIs when needed to distinguish the OS vendor from
|
|
||||||
the OS itself. It is intended to be human readable.
|
|
||||||
|
|
||||||
Used for VENDOR_NAME in /etc/os-release and GNS3 appliance files.
|
|
||||||
|
|
||||||
config INFIX_VENDOR_HOME
|
|
||||||
string "Vendor URL"
|
|
||||||
help
|
|
||||||
The homepage of the OS vendor. The value should be in RFC3986
|
|
||||||
format, and should be "http:" or "https:" URLs. Only one URL shall
|
|
||||||
be listed in the setting.
|
|
||||||
|
|
||||||
Optional, used for VENDOR_HOME in /etc/os-release
|
|
||||||
|
|
||||||
config INFIX_NAME
|
|
||||||
string "Operating system name"
|
|
||||||
default "Infix"
|
|
||||||
help
|
|
||||||
Mandatory. Used for identifying the OS as NAME in /etc/os-release
|
|
||||||
and product_name in GNS3 appliance files.
|
|
||||||
|
|
||||||
config INFIX_ID
|
|
||||||
string "Operating system identifier"
|
|
||||||
default "infix"
|
|
||||||
help
|
|
||||||
A lower-case string (no spaces or other characters outside of 0–9,
|
|
||||||
a–z, '.', '_' and '-') identifying the operating system, excluding
|
|
||||||
any version information and suitable for processing by scripts or
|
|
||||||
usage in generated filenames.
|
|
||||||
|
|
||||||
Mandatory. Used for identifying the OS as ID in /etc/os-release and
|
|
||||||
in the generated image name: ID-ARCH-VERSION.img
|
|
||||||
|
|
||||||
config INFIX_IMAGE_ID
|
|
||||||
string "Operating system image name"
|
|
||||||
default "${INFIX_ID}-${BR2_ARCH}"
|
|
||||||
help
|
|
||||||
A lower-case string (no spaces or other characters outside of 0–9,
|
|
||||||
a–z, ".", "_" and "-"), for naming critical image files, directories
|
|
||||||
and archives containting the operating system.
|
|
||||||
|
|
||||||
Mandatory. When INFIX_RELEASE is set, this string is appended to
|
|
||||||
the IMAGE_ID with a '-' separator.
|
|
||||||
|
|
||||||
config INFIX_TAGLINE
|
|
||||||
string "Operating system tagline"
|
|
||||||
default "Infix — a Network Operating System"
|
|
||||||
help
|
|
||||||
Mandatory. Used for identifying the OS, e.g. as PRETTY_NAME in
|
|
||||||
/etc/os-release and description in the GNS3 appliance.
|
|
||||||
|
|
||||||
This is also show at boot when the system init process starts.
|
|
||||||
|
|
||||||
config INFIX_DESC
|
|
||||||
string "Operating system description"
|
|
||||||
help
|
|
||||||
Optional. Used for long description texts about the OS. E.g.,
|
|
||||||
the GNS3 appliance file description field. Saved in the file
|
|
||||||
/etc/os-release as INFIX_DESC.
|
|
||||||
|
|
||||||
config INFIX_HOME
|
|
||||||
string "Operating system URL"
|
|
||||||
help
|
|
||||||
Used for identifying the OS, e.g. as HOME_URL in /etc/os-release
|
|
||||||
|
|
||||||
config INFIX_DOC
|
|
||||||
string "Operating system docs"
|
|
||||||
help
|
|
||||||
Optional. Main documentation URL, will be shown in /etc/os-release
|
|
||||||
as DOCUMENTATION_URL.
|
|
||||||
|
|
||||||
config INFIX_SUPPORT
|
|
||||||
string "Operating system support"
|
|
||||||
help
|
|
||||||
Main support page for the operating system, if there is any. This
|
|
||||||
is primarily intended for operating systems which vendors provide
|
|
||||||
support for. May be a http:, https:, or mailto: URI.
|
|
||||||
|
|
||||||
Optional. Shown, e.g., as SUPPORT_URL in /etc/os-release or
|
|
||||||
maintainer_email in .gns3a.
|
|
||||||
|
|
||||||
config INFIX_OEM_PATH
|
|
||||||
string "Path to OEM br2-external"
|
|
||||||
help
|
|
||||||
A br2-external using Infix will likely want to version the branded
|
|
||||||
OS using their own GIT tags. Set this variable to point to the base
|
|
||||||
directory (absolute path) and the Infix post-build.sh will call `git
|
|
||||||
describe -C $INFIX_OEM_PATH`.
|
|
||||||
|
|
||||||
Note: for release builds the global variable INFIX_RELEASE overrides
|
|
||||||
the version information derived from `git describe`. However, the
|
|
||||||
GIT version is always saved as the BUILD_ID in /etc/os-releases.
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
# For /etc/os-release, uses CondtionArchitechture= from systemd.unit(5)
|
|
||||||
config INFIX_ARCH
|
|
||||||
string
|
|
||||||
default "arm" if BR2_arm
|
|
||||||
default "arm64" if BR2_aarch64
|
|
||||||
default "mips64" if BR2_mips64
|
|
||||||
default "riscv64" if BR2_riscv
|
|
||||||
default "x86_64" if BR2_x86_64
|
|
||||||
|
|
||||||
# For /etc/os-release, VARIANT & VARIANT_ID used, e.g., in mnt script
|
|
||||||
choice
|
|
||||||
prompt "Select variant/flavor"
|
|
||||||
default INFIX_VARIANT_NETCONF
|
|
||||||
|
|
||||||
config INFIX_VARIANT_NETCONF
|
|
||||||
bool "NETCONF"
|
|
||||||
help
|
|
||||||
Managed NETCONF mode, /etc is a ramdisk, all configuration is
|
|
||||||
generated by sysrepo plugins using NETCONF (xml) or RESTCONF.
|
|
||||||
|
|
||||||
config INFIX_VARIANT_CLASSIC
|
|
||||||
bool "Classic /etc mode"
|
|
||||||
help
|
|
||||||
User managed mode, read-write configuration files in /etc that
|
|
||||||
is saved across reboots.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
menu "Packages"
|
menu "Packages"
|
||||||
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/package/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/package/Config.in"
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
menu "QEMU Virtualization"
|
||||||
|
|
||||||
|
source "$BR2_EXTERNAL_INFIX_PATH/qemu/Config.in"
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/common/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/board/common/Config.in"
|
||||||
|
|||||||
@@ -1,88 +1,96 @@
|
|||||||
<img align="right" src="doc/logo.png" alt="Infix - Linux <3 NETCONF" width=480>
|
<img align="right" src="doc/text3134.png" alt="Infix Linux Networking Made Easy">
|
||||||
<details><summary><b>Documentation</b></summary>
|
|
||||||
|
|
||||||
- **Infix In-Depth**
|
Infix is an embedded Linux Network Operating System (NOS) based on
|
||||||
- [Infix Variants](doc/variant.md)
|
[Buildroot][1], [Finit][2], [ifupdown-ng][3], and [Clixon][6].
|
||||||
- [Boot Procedure](doc/boot.md)
|
Providing an easy-to-maintain and easy-to-port Open Source base for
|
||||||
- [Containers in Infix](doc/container.md)
|
networked equipment.
|
||||||
- [Developer's Guide](doc/developers-guide.md)
|
|
||||||
- [Discover Your Device](doc/discovery.md)
|
|
||||||
- [Virtual Environments](doc/virtual.md)
|
|
||||||
- [Origin & Licensing](doc/license.md)
|
|
||||||
- **CLI Topics**
|
|
||||||
- [Introduction to the CLI](doc/cli/introduction.md)
|
|
||||||
- [CLI User's Guide](doc/cli/tutorial.md)
|
|
||||||
- [Quick Overview](doc/cli/quick.md)
|
|
||||||
|
|
||||||
</details>
|
See the [GitHub Releases](https://github.com/kernelkit/infix/releases)
|
||||||
|
page for out pre-built images. The *Latest Build* has the bleeding edge
|
||||||
|
images, if possible we recommend using a versioned release.
|
||||||
|
|
||||||
Infix is a Linux Network Operating System (NOS) based on [Buildroot][1],
|
> Login with user 'root', no password by default on plain builds. See
|
||||||
and [sysrepo][2]. A powerful mix that ease porting to different
|
> the online `help` command for an introduction to the system.
|
||||||
platforms, simplify long-term maintenance, and provide made-easy
|
|
||||||
management using NETCONF[^1] (remote) or the built-in [CLI][3].
|
|
||||||
|
|
||||||
<details><summary><b>Example CLI Session</b></summary>
|
|
||||||
|
|
||||||
The CLI configure context is automatically generated from the loaded
|
Hardware
|
||||||
YANG models and their corresponding [sysrepo][2] plugins. The following
|
--------
|
||||||
is brief example of how to set the IP address of an interface:
|
|
||||||
|
|
||||||
```
|
### aarch64
|
||||||
admin@infix-12-34-56:/> configure
|
|
||||||
admin@infix-12-34-56:/config/> edit interfaces interface eth0
|
|
||||||
admin@infix-12-34-56:/config/interfaces/interface/eth0/> set ipv4 <TAB>
|
|
||||||
address autoconf bind-ni-name enabled
|
|
||||||
forwarding mtu neighbor
|
|
||||||
admin@infix-12-34-56:/config/interfaces/interface/eth0/> set ipv4 address 192.168.2.200 prefix-length 24
|
|
||||||
admin@infix-12-34-56:/config/interfaces/interface/eth0/> show
|
|
||||||
type ethernetCsmacd;
|
|
||||||
ipv4 address 192.168.2.200 prefix-length 24;
|
|
||||||
ipv6 enabled true;
|
|
||||||
admin@infix-12-34-56:/config/interfaces/interface/eth0/> diff
|
|
||||||
interfaces {
|
|
||||||
interface eth0 {
|
|
||||||
+ ipv4 {
|
|
||||||
+ address 192.168.2.200 {
|
|
||||||
+ prefix-length 24;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
admin@infix-12-34-56:/config/interfaces/interface/eth0/> leave
|
|
||||||
admin@infix-12-34-56:/> show interfaces brief
|
|
||||||
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
|
|
||||||
eth0 UP 52:54:00:12:34:56 <BROADCAST,MULTICAST,UP,LOWER_UP>
|
|
||||||
admin@infix-12-34-56:/> show ip brief
|
|
||||||
lo UNKNOWN 127.0.0.1/8 ::1/128
|
|
||||||
eth0 UP 192.168.2.200/24 fe80::5054:ff:fe12:3456/64
|
|
||||||
admin@infix-12-34-56:/> copy running-config startup-config
|
|
||||||
```
|
|
||||||
|
|
||||||
[Click here][3] for more details.
|
By default, Infix builds with support for the following boards (you
|
||||||
</details>
|
may enable additional boards in the config, of course):
|
||||||
|
|
||||||
Infix can run on many different types of architectures and boards, much
|
- Marvell CN9130 CRB
|
||||||
thanks to Linux and Buildroot. Currently the focus is on 64-bit ARM
|
- Marvell EspressoBIN
|
||||||
devices, optionally with switching fabric supported by Linux switchdev.
|
- Microchip SparX-5i PCB135 (eMMC)
|
||||||
The [following boards](board/aarch64/README.md) are fully supported:
|
|
||||||
|
|
||||||
- Marvell CN9130 CRB
|
See the aarch64 specific [documentation](board/aarch64/README.md) for more
|
||||||
- Marvell EspressoBIN
|
information.
|
||||||
- Microchip SparX-5i PCB135 (eMMC)
|
|
||||||
|
|
||||||
An x86_64 build is also available, primarily intended for development
|
### amd64
|
||||||
and testing, but can also be used for evaluation and demo purposes. For
|
|
||||||
more information, see: [Infix in Virtual Environments](doc/virtual.md).
|
|
||||||
|
|
||||||
> See the [GitHub Releases](https://github.com/kernelkit/infix/releases)
|
Primarily intended to be run under [QEMU][] for development & test as
|
||||||
> page for our pre-built images. The *Latest Build* has the bleeding
|
well as evaluation, demo and [training][] purposes, e.g. using [GNS3][]
|
||||||
> edge images, if possible we recommend using a versioned release.
|
or [Qeneth][7].
|
||||||
>
|
|
||||||
> For *customer specific builds* of Infix, see your product repository.
|
|
||||||
|
|
||||||
[^1]: NETCONF or RESTCONF, <https://datatracker.ietf.org/doc/html/rfc8040>,
|
|
||||||
for more information, see [Infix Variants](doc/variant.md).
|
|
||||||
|
|
||||||
|
QEMU
|
||||||
|
----
|
||||||
|
|
||||||
|
A virtualized instance can easily be launched from a Linux system, with
|
||||||
|
Qemu installed, by issuing `make run`.
|
||||||
|
|
||||||
|
Some settings, e.g. networking, can be configured via `make menuconfig`
|
||||||
|
under `External options -> QEMU virtualization`.
|
||||||
|
|
||||||
|
|
||||||
|
GNS3
|
||||||
|
----
|
||||||
|
|
||||||
|
Download the [latest build][0] of amd64, unpack in a dedicated directory
|
||||||
|
and use ["Import Appliance"][9] to install the `.gns3a` file into GNS3.
|
||||||
|
Infix will show up in the "Router" category, it has 10 interfaces
|
||||||
|
available by default for use as switch ports or routing.
|
||||||
|
|
||||||
|
|
||||||
|
Origin & Licensing
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Infix is entirely built on Open Source components (packages). Most of
|
||||||
|
them, as well as the build system with its helper scripts and tools, is
|
||||||
|
from [Buiildroot][1], which is distributed under the terms of the GNU
|
||||||
|
General Public License (GPL). See the file COPYING for details.
|
||||||
|
|
||||||
|
Some files in Buildroot contain a different license statement. Those
|
||||||
|
files are licensed under the license contained in the file itself.
|
||||||
|
|
||||||
|
Buildroot and Infix also bundle patch files, which are applied to the
|
||||||
|
sources of the various packages. Those patches are not covered by the
|
||||||
|
license of Buildroot or Infix. Instead, they are covered by the license
|
||||||
|
of the software to which the patches are applied. When said software is
|
||||||
|
available under multiple licenses, the patches are only provided under
|
||||||
|
the publicly accessible licenses.
|
||||||
|
|
||||||
|
Infix releases include the license information covering all Open Source
|
||||||
|
packages. This is extracted automatically at build time using the tool
|
||||||
|
`make legal-info`. Any proprietary software built on top of Infix, or
|
||||||
|
Buildroot, would need separate auditing to ensure it does not link with
|
||||||
|
any GPL[^1] licensed library.
|
||||||
|
|
||||||
|
[^1]: Infix image builds use GNU libc (GLIBC) which is covered by the
|
||||||
|
[LGPL][4]. The LGPL *does allow* proprietary software, as long as
|
||||||
|
said software is linking dynamically, [not statically][5], to GLIBC.
|
||||||
|
|
||||||
|
[0]: https://github.com/kernelkit/infix/releases/tag/latest
|
||||||
[1]: https://buildroot.org/
|
[1]: https://buildroot.org/
|
||||||
[2]: https://www.sysrepo.org/
|
[2]: https://github.com/troglobit/finit
|
||||||
[3]: doc/cli/introduction.md
|
[3]: https://github.com/ifupdown-ng/ifupdown-ng
|
||||||
|
[4]: https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License
|
||||||
|
[5]: https://lwn.net/Articles/117972/
|
||||||
|
[6]: https://github.com/clicon/clixon
|
||||||
|
[7]: https://github.com/wkz/qeneth
|
||||||
|
[9]: https://docs.gns3.com/docs/using-gns3/beginners/import-gns3-appliance/
|
||||||
|
[QEMU]: https://www.qemu.org/
|
||||||
|
[GNS3]: https://gns3.com/
|
||||||
|
[training]: https://addiva-elektronik.github.io/
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
* TODO doc: User Guide
|
* TODO doc: User Guide
|
||||||
|
|
||||||
- Feature set and scope, e.g.
|
- Feature set and scope, e.g.
|
||||||
- Device discovery: LLDP, mDNS-SD how do they work, interfacing with Windows/macOS/Linux
|
- Device discovery: SSDP, LLDP, mDNS-SD how do they work, interfacing with Windows/macOS/Linux
|
||||||
- Network redundancy protocols: STP/RSTP, MRP
|
- Network redundancy protocols: STP/RSTP, MRP
|
||||||
- Configuring the system; using ifupdown2, enabling/disabling services
|
- Configuring the system; using ifupdown2, enabling/disabling services
|
||||||
- Diagnosing the system; using rmon, port mirroring, debugging services, searching logs
|
- Diagnosing the system; using rmon, port mirroring, debugging services, searching logs
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
/ {
|
|
||||||
config {
|
|
||||||
environment {
|
|
||||||
/* After the MMC driver has enabled bus power,
|
|
||||||
* the controller seems to sometimes detect a
|
|
||||||
* card removal state , which causes it to
|
|
||||||
* disable power again. This hack re-enables the
|
|
||||||
* bus power in those cases.
|
|
||||||
*/
|
|
||||||
bootcmd = "
|
|
||||||
setexpr.b pwrctl *0xf2780029
|
|
||||||
setexpr pwrctl ${pwrctl} \"|\" 1
|
|
||||||
mw.b 0xf2780029 ${pwrctl}
|
|
||||||
|
|
||||||
run ixboot
|
|
||||||
";
|
|
||||||
boot_targets = "mmc1";
|
|
||||||
ethprime = "eth1";
|
|
||||||
|
|
||||||
/* Uncomment this if you're debugging U-Boot
|
|
||||||
*
|
|
||||||
* This will allow you to break out of the
|
|
||||||
* normal boot flow and into the interactive
|
|
||||||
* console.
|
|
||||||
*
|
|
||||||
* To upgrade U-Boot itself, simply set the
|
|
||||||
* `bootfile` variable to the path of
|
|
||||||
* `flash-image.bin` on your TFTP server, then
|
|
||||||
* issue `run ixupgradeboot`.
|
|
||||||
*/
|
|
||||||
/* bootdelay = "2"; */
|
|
||||||
/* ixupgradeboot = " */
|
|
||||||
/* dhcp */
|
|
||||||
/* setexpr fileblks ${filesize} + 0x1ff */
|
|
||||||
/* setexpr fileblks ${fileblks} / 0x200 */
|
|
||||||
|
|
||||||
/* mmc dev 1 */
|
|
||||||
/* part start mmc 1 boot bootstart */
|
|
||||||
/* part size mmc 1 boot bootsize */
|
|
||||||
|
|
||||||
|
|
||||||
/* mmc erase ${bootstart} ${bootsize} */
|
|
||||||
/* mmc write ${fileaddr} ${bootstart} ${fileblks} */
|
|
||||||
/* "; */
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/* &cp0_eth0 { */
|
|
||||||
/* phy-mode = "10gbase-r"; */
|
|
||||||
/* }; */
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi cn9130-crb-env.dtsi"
|
|
||||||
|
|
||||||
CONFIG_ENV_IS_NOWHERE=y
|
|
||||||
# CONFIG_ENV_IS_IN_MMC is not set
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
#ifndef _ALDER_MPP_H
|
|
||||||
#define _ALDER_MPP_H
|
|
||||||
|
|
||||||
#define CP_SMI_MDIO(X) X( "mpp0", none, 0, 0)
|
|
||||||
#define CP_SMI_MDC(X) X( "mpp1", none, 0, 0)
|
|
||||||
#define CP_XSMI_MDIO(X) X( "mpp2", none, 0, 0)
|
|
||||||
#define CP_XSMI_MDC(X) X( "mpp3", none, 0, 0)
|
|
||||||
/* mpp4: Unused */
|
|
||||||
/* mpp5: Unused */
|
|
||||||
/* mpp6: Unused */
|
|
||||||
#define SFP9_TX_FAULT(X) X( "mpp7", cp0_gpio1, 7, GPIO_ACTIVE_HIGH)
|
|
||||||
#define SFP9_TX_DISABLE(X) X( "mpp8", cp0_gpio1, 8, GPIO_ACTIVE_HIGH)
|
|
||||||
#define SFP9_MOD_ABS(X) X( "mpp9", cp0_gpio1, 9, GPIO_ACTIVE_LOW)
|
|
||||||
#define SW_RESETn(X) X("mpp10", cp0_gpio1, 10, GPIO_ACTIVE_LOW)
|
|
||||||
#define SFP9_RS0(X) X("mpp11", cp0_gpio1, 11, GPIO_ACTIVE_HIGH)
|
|
||||||
/* mpp12: Unused */
|
|
||||||
#define CP_SPI1_MISO(X) X("mpp13", none, 0, 0)
|
|
||||||
#define CP_SPI1_CS0(X) X("mpp14", none, 0, 0)
|
|
||||||
#define CP_SPI1_MOSI(X) X("mpp15", none, 0, 0)
|
|
||||||
#define CP_SPI1_SCK(X) X("mpp16", none, 0, 0)
|
|
||||||
#define WDT_TICKLE(X) X("mpp17", cp0_gpio1, 17, GPIO_ACTIVE_HIGH)
|
|
||||||
/* mpp18: Unused */
|
|
||||||
/* mpp19: Unused */
|
|
||||||
/* mpp20: Unused */
|
|
||||||
/* mpp21: Unused */
|
|
||||||
/* mpp22: Unused */
|
|
||||||
/* mpp23: Unused */
|
|
||||||
#define SFP9_RX_LOS(X) X("mpp24", cp0_gpio1, 24, GPIO_ACTIVE_HIGH)
|
|
||||||
#define ETH9_RESETn(X) X("mpp25", cp0_gpio1, 25, GPIO_ACTIVE_LOW)
|
|
||||||
#define SW_INTn(X) X("mpp26", cp0_gpio1, 26, IRQ_TYPE_LEVEL_LOW)
|
|
||||||
#define SFP9_RS1(X) X("mpp27", cp0_gpio1, 27, GPIO_ACTIVE_HIGH)
|
|
||||||
#define SFP10_TX_FAULT(X) X("mpp28", cp0_gpio1, 28, GPIO_ACTIVE_HIGH)
|
|
||||||
#define CP_UA0_RXD(X) X("mpp29", none, 0, 0)
|
|
||||||
#define CP_UA0_TXD(X) X("mpp30", none, 0, 0)
|
|
||||||
#define SFP10_TX_DISABLE(X) X("mpp31", cp0_gpio1, 31, GPIO_ACTIVE_HIGH)
|
|
||||||
#define SFP10_MOD_ABS(X) X("mpp32", cp0_gpio2, 0, GPIO_ACTIVE_LOW)
|
|
||||||
#define I2C_IRQ(X) X("mpp33", cp0_gpio2, 1, GPIO_ACTIVE_HIGH)
|
|
||||||
#define SFP10_RS0(X) X("mpp34", cp0_gpio2, 2, GPIO_ACTIVE_HIGH)
|
|
||||||
#define CP_I2C1_SDA(X) X("mpp35", none, 0, 0)
|
|
||||||
#define CP_I2C1_SCK(X) X("mpp36", none, 0, 0)
|
|
||||||
#define CP_I2C0_SCK(X) X("mpp37", none, 0, 0)
|
|
||||||
#define CP_I2C0_SDA(X) X("mpp38", none, 0, 0)
|
|
||||||
#define SFP10_RX_LOS(X) X("mpp39", cp0_gpio2, 7, GPIO_ACTIVE_HIGH)
|
|
||||||
#define SFP10_RS1(X) X("mpp40", cp0_gpio2, 8, GPIO_ACTIVE_HIGH)
|
|
||||||
#define CP_SD_CRD_PWR_OFF(X) X("mpp41", none, 0, 0)
|
|
||||||
#define CP_SD_HST_18_EN(X) X("mpp42", none, 0, 0)
|
|
||||||
#define CP_SD_CRD_DT(X) X("mpp43", none, 0, 0)
|
|
||||||
#define ETH9_INTn(X) X("mpp44", cp0_gpio2, 12, GPIO_ACTIVE_LOW)
|
|
||||||
/* mpp45: Unused */
|
|
||||||
#define ETH10_RESETn(X) X("mpp46", cp0_gpio2, 14, GPIO_ACTIVE_LOW)
|
|
||||||
#define I2C_RESETn(X) X("mpp47", cp0_gpio2, 15, GPIO_ACTIVE_LOW)
|
|
||||||
#define ETH10_INTn(X) X("mpp48", cp0_gpio2, 16, GPIO_ACTIVE_LOW)
|
|
||||||
#define DEV_MODEn(X) X("mpp49", cp0_gpio2, 17, GPIO_ACTIVE_LOW)
|
|
||||||
#define USB1_VBUS_ENABLE(X) X("mpp50", cp0_gpio2, 18, GPIO_ACTIVE_HIGH)
|
|
||||||
#define USB1_VBUS_ERROR_OC(X) X("mpp51", cp0_gpio2, 19, GPIO_ACTIVE_HIGH)
|
|
||||||
/* mpp52: Unused */
|
|
||||||
/* mpp53: Unused */
|
|
||||||
/* mpp54: Unused */
|
|
||||||
#define CP_SD_LED(X) X("mpp55", none, 0, 0)
|
|
||||||
#define CP_SD_CLK(X) X("mpp56", none, 0, 0)
|
|
||||||
#define CP_SD_CMD(X) X("mpp57", none, 0, 0)
|
|
||||||
#define CP_SD_D0(X) X("mpp58", none, 0, 0)
|
|
||||||
#define CP_SD_D1(X) X("mpp59", none, 0, 0)
|
|
||||||
#define CP_SD_D2(X) X("mpp60", none, 0, 0)
|
|
||||||
#define CP_SD_D3(X) X("mpp61", none, 0, 0)
|
|
||||||
#define DDR_TEN(X) X("mpp62", cp0_gpio2, 30 GPIO_ACTIVE_HIGH)
|
|
||||||
|
|
||||||
/* Macros to extract MPP info in different formats */
|
|
||||||
#define MPP_ID(_mpp, _chip, _no, _flags) _mpp
|
|
||||||
#define MPP_GPIO_CHIP(_mpp, _chip, _no, _flags) _chip
|
|
||||||
|
|
||||||
#define MPP_GPIO_REF(_mpp, _chip, _no, _flags) <&_chip _no _flags>
|
|
||||||
#define MPP_GPIO_REF_NO_CHIP(_mpp, _chip, _no, _flags) <_no _flags>
|
|
||||||
#define MPP_IRQ_REF(_mpp, _chip, _no, _flags) <&_chip _no _flags>
|
|
||||||
|
|
||||||
#endif /* _ALDER_MPP_H */
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2021 Marvell International Ltd.
|
|
||||||
* Copyright (C) 2023 Addiva Elektronik AB
|
|
||||||
*
|
|
||||||
* Device tree for Alder board
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "alder.dtsi"
|
|
||||||
@@ -1,611 +0,0 @@
|
|||||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2021 Marvell International Ltd.
|
|
||||||
* Copyright (C) 2023 Addiva Elektronik AB
|
|
||||||
*
|
|
||||||
* Device tree for Alder board
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <dt-bindings/gpio/gpio.h>
|
|
||||||
#include <dt-bindings/leds/common.h>
|
|
||||||
|
|
||||||
#include "../marvell/cn9130-patched.dtsi"
|
|
||||||
|
|
||||||
#include "alder-mpp.h"
|
|
||||||
|
|
||||||
/ {
|
|
||||||
model = "Alder";
|
|
||||||
compatible = "alder,alder",
|
|
||||||
"marvell,armada-ap807-quad",
|
|
||||||
"marvell,armada-ap807";
|
|
||||||
|
|
||||||
chosen {
|
|
||||||
stdout-path = "serial0:115200n8";
|
|
||||||
};
|
|
||||||
|
|
||||||
memory@0 {
|
|
||||||
device_type = "memory";
|
|
||||||
reg = <0x0 0x0 0x0 0x80000000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* UART0 (Console) */
|
|
||||||
|
|
||||||
&cp0_pinctrl {
|
|
||||||
cp0_uart0_pins: cp0-uart0-pins {
|
|
||||||
marvell,pins = CP_UA0_RXD(MPP_ID), CP_UA0_TXD(MPP_ID);
|
|
||||||
marvell,function = "uart0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&uart0 {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&cp0_uart0_pins>;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* GPIO */
|
|
||||||
|
|
||||||
&cp0_gpio1 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_gpio2 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* I2C0 (EEPROM) */
|
|
||||||
|
|
||||||
&cp0_pinctrl {
|
|
||||||
cp0_i2c0_pins: cp0-i2c0-pins {
|
|
||||||
marvell,pins = CP_I2C0_SCK(MPP_ID), CP_I2C0_SDA(MPP_ID);
|
|
||||||
marvell,function = "i2c0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_i2c0 {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&cp0_i2c0_pins>;
|
|
||||||
|
|
||||||
eeprom@50 {
|
|
||||||
// AT24C256C-MAHL-T
|
|
||||||
compatible = "atmel,24c256";
|
|
||||||
reg = <0x50>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* I2C1 (Mux) */
|
|
||||||
|
|
||||||
&cp0_pinctrl {
|
|
||||||
cp0_i2c1_pins: cp0-i2c1-pins {
|
|
||||||
marvell,pins = CP_I2C1_SCK(MPP_ID), CP_I2C1_SDA(MPP_ID);
|
|
||||||
marvell,function = "i2c1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_i2c1 {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&cp0_i2c1_pins>;
|
|
||||||
|
|
||||||
i2cmux@70 {
|
|
||||||
compatible = "nxp,pca9548";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <0x70>;
|
|
||||||
|
|
||||||
reset-gpios = I2C_RESETn(MPP_GPIO_REF);
|
|
||||||
|
|
||||||
i2c_sysmgmt: i2c@0 {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <0>;
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c_pwr: i2c@1 {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <1>;
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c_sw: i2c@2 {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <2>;
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c_sfp9: i2c@3 {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <3>;
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c_sfpa: i2c@4 {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <4>;
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c@5 {
|
|
||||||
status = "disabled";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <5>;
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c@6 {
|
|
||||||
status = "disabled";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <6>;
|
|
||||||
};
|
|
||||||
|
|
||||||
i2c@7 {
|
|
||||||
status = "disabled";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <7>;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* System Management */
|
|
||||||
|
|
||||||
&i2c_sysmgmt {
|
|
||||||
eeprom@b {
|
|
||||||
label = "vpd";
|
|
||||||
reg = <0x0b>;
|
|
||||||
compatible = "atmel,24c02";
|
|
||||||
read-only;
|
|
||||||
|
|
||||||
nvmem-layout {
|
|
||||||
compatible = "onie,tlv-layout";
|
|
||||||
|
|
||||||
base_mac: mac-address {
|
|
||||||
#nvmem-cell-cells = <1>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/* AP SDHCI (eMMC) */
|
|
||||||
|
|
||||||
&ap_sdhci0 {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-names = "default";
|
|
||||||
/* pinctrl-0 = <&ap_emmc_pins>; No pinctrl in Linux? */
|
|
||||||
bus-width = <8>;
|
|
||||||
mmc-ddr-1_8v;
|
|
||||||
mmc-hs400-1_8v;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* CP SDHCI (Micro-SD) */
|
|
||||||
|
|
||||||
/ {
|
|
||||||
cp0_reg_sd_vccq: cp0_sd_vccq@0 {
|
|
||||||
compatible = "regulator-gpio";
|
|
||||||
regulator-name = "cp0_sd_vccq";
|
|
||||||
regulator-min-microvolt = <1800000>;
|
|
||||||
regulator-max-microvolt = <3300000>;
|
|
||||||
/* gpios = <&CP_SD_HST_18_EN>; */
|
|
||||||
states = <1800000 0x1
|
|
||||||
3300000 0x0>;
|
|
||||||
};
|
|
||||||
|
|
||||||
cp0_reg_sd_vcc: cp0_sd_vcc@0 {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "cp0_sd_vcc";
|
|
||||||
regulator-min-microvolt = <3300000>;
|
|
||||||
regulator-max-microvolt = <3300000>;
|
|
||||||
/* gpio = <&CP_SD_CRD_PWR_OFF>; */
|
|
||||||
enable-active-high;
|
|
||||||
regulator-always-on;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_pinctrl {
|
|
||||||
cp0_sdhci_pins: cp0-sdhi-pins-0 {
|
|
||||||
marvell,pins = \
|
|
||||||
CP_SD_CRD_PWR_OFF(MPP_ID), CP_SD_HST_18_EN(MPP_ID), \
|
|
||||||
CP_SD_CRD_DT(MPP_ID), CP_SD_LED(MPP_ID), \
|
|
||||||
CP_SD_CLK(MPP_ID), CP_SD_CMD(MPP_ID), \
|
|
||||||
CP_SD_D0(MPP_ID), CP_SD_D1(MPP_ID), \
|
|
||||||
CP_SD_D2(MPP_ID), CP_SD_D3(MPP_ID);
|
|
||||||
marvell,function = "sdio";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_sdhci0 {
|
|
||||||
status = "disabled";
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&cp0_sdhci_pins>;
|
|
||||||
bus-width = <4>;
|
|
||||||
/* cd-gpios = <&CP_SD_CRD_DT>; */
|
|
||||||
vqmmc-supply = <&cp0_reg_sd_vccq>;
|
|
||||||
vmmc-supply = <&cp0_reg_sd_vcc>;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* SPI1 (Boot FLASH) */
|
|
||||||
|
|
||||||
&cp0_pinctrl {
|
|
||||||
cp0_spi1_pins: cp0-spi-pins-0 {
|
|
||||||
marvell,pins = \
|
|
||||||
CP_SPI1_MISO(MPP_ID), CP_SPI1_CS0(MPP_ID), \
|
|
||||||
CP_SPI1_MOSI(MPP_ID), CP_SPI1_SCK(MPP_ID);
|
|
||||||
marvell,function = "spi1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_spi1 {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&cp0_spi1_pins>;
|
|
||||||
|
|
||||||
/* Boot flash */
|
|
||||||
spi-flash@0 {
|
|
||||||
#address-cells = <0x1>;
|
|
||||||
#size-cells = <0x1>;
|
|
||||||
compatible = "jedec,spi-nor", "spi-flash";
|
|
||||||
reg = <0x0>;
|
|
||||||
/* On-board MUX does not allow higher frequencies */
|
|
||||||
spi-max-frequency = <40000000>;
|
|
||||||
|
|
||||||
partitions {
|
|
||||||
compatible = "fixed-partitions";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
|
|
||||||
boot0@0 {
|
|
||||||
label = "boot0";
|
|
||||||
reg = <0x0 0x200000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot1@200000 {
|
|
||||||
label = "boot1";
|
|
||||||
reg = <0x200000 0x200000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* USB1 */
|
|
||||||
|
|
||||||
/ {
|
|
||||||
cp0_usb3_0_phy1: cp0_usb3_phy {
|
|
||||||
compatible = "usb-nop-xceiv";
|
|
||||||
vcc-supply = <®_cp0_usb3_vbus1>;
|
|
||||||
};
|
|
||||||
|
|
||||||
reg_cp0_usb3_vbus1: reg_cp0_usb3_vbus1 {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "cp0-xhci1-vbus";
|
|
||||||
regulator-min-microvolt = <5000000>;
|
|
||||||
regulator-max-microvolt = <5000000>;
|
|
||||||
enable-active-high;
|
|
||||||
gpio = USB1_VBUS_ENABLE(MPP_GPIO_REF);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_utmi {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_utmi1 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_usb3_1 {
|
|
||||||
status = "disabled";
|
|
||||||
usb-phy = <&cp0_usb3_0_phy1>;
|
|
||||||
phys = <&cp0_utmi1>, <&cp0_comphy3 1>;
|
|
||||||
phy-names = "usb", "usb3";
|
|
||||||
dr_mode = "host";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ETH0 (DSA connection to switch) */
|
|
||||||
|
|
||||||
&cp0_crypto {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_ethernet {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_eth0 {
|
|
||||||
status = "okay";
|
|
||||||
phy-mode = "10gbase-r";
|
|
||||||
phys = <&cp0_comphy4 0>;
|
|
||||||
managed = "in-band-status";
|
|
||||||
|
|
||||||
nvmem-cells = <&base_mac 0>;
|
|
||||||
nvmem-cell-names = "mac-address";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* MDIO (Switch) */
|
|
||||||
|
|
||||||
&cp0_pinctrl {
|
|
||||||
cp0_mdio_pins: cp0-mdio-pins-0 {
|
|
||||||
marvell,pins = CP_SMI_MDIO(MPP_ID), CP_SMI_MDC(MPP_ID);
|
|
||||||
marvell,function = "ge";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_mdio {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&cp0_mdio_pins>;
|
|
||||||
|
|
||||||
sw: switch@0 {
|
|
||||||
compatible = "marvell,mv88e6190";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <0>;
|
|
||||||
|
|
||||||
reset-gpios = SW_RESETn(MPP_GPIO_REF);
|
|
||||||
|
|
||||||
interrupts-extended = SW_INTn(MPP_IRQ_REF);
|
|
||||||
interrupt-controller;
|
|
||||||
|
|
||||||
dsa,member = <0 0>;
|
|
||||||
|
|
||||||
ports {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
port@0 {
|
|
||||||
reg = <0x0>;
|
|
||||||
label = "cpu";
|
|
||||||
ethernet = <&cp0_eth0>;
|
|
||||||
phy-mode = "10gbase-r";
|
|
||||||
fixed-link {
|
|
||||||
speed = <10000>;
|
|
||||||
full-duplex;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#define SWP(_n, _label, _mac_offs, _phymode, _phy) \
|
|
||||||
port@_n { \
|
|
||||||
reg = <0x ## _n>; \
|
|
||||||
label = _label; \
|
|
||||||
phy-mode = _phymode; \
|
|
||||||
phy-handle = <&_phy>; \
|
|
||||||
\
|
|
||||||
nvmem-cells = <&base_mac _mac_offs>; \
|
|
||||||
nvmem-cell-names = "mac-address"; \
|
|
||||||
}
|
|
||||||
|
|
||||||
SWP(9, "x1", 1, "usxgmii", xphy9);
|
|
||||||
SWP(a, "x2", 2, "usxgmii", xphya);
|
|
||||||
|
|
||||||
SWP(8, "x3", 3, "gmii", swphy8);
|
|
||||||
SWP(7, "x4", 4, "gmii", swphy7);
|
|
||||||
SWP(6, "x5", 5, "gmii", swphy6);
|
|
||||||
SWP(5, "x6", 6, "gmii", swphy5);
|
|
||||||
SWP(4, "x7", 7, "gmii", swphy4);
|
|
||||||
SWP(3, "x8", 8, "gmii", swphy3);
|
|
||||||
SWP(2, "x9", 9, "gmii", swphy2);
|
|
||||||
SWP(1, "x10", 10, "gmii", swphy1);
|
|
||||||
#undef SWP
|
|
||||||
};
|
|
||||||
|
|
||||||
mdio {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
swphy1: ethernet-phy@1 { reg = <0x1>; };
|
|
||||||
swphy2: ethernet-phy@2 { reg = <0x2>; };
|
|
||||||
swphy3: ethernet-phy@3 { reg = <0x3>; };
|
|
||||||
swphy4: ethernet-phy@4 { reg = <0x4>; };
|
|
||||||
swphy5: ethernet-phy@5 { reg = <0x5>; };
|
|
||||||
swphy6: ethernet-phy@6 { reg = <0x6>; };
|
|
||||||
swphy7: ethernet-phy@7 { reg = <0x7>; };
|
|
||||||
swphy8: ethernet-phy@8 { reg = <0x8>; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* XMDIO (88X3310P 10G PHYs) */
|
|
||||||
|
|
||||||
&cp0_pinctrl {
|
|
||||||
cp0_xmdio_pins: cp0-xmdio-pins-0 {
|
|
||||||
marvell,pins = CP_XSMI_MDIO(MPP_ID), CP_XSMI_MDC(MPP_ID);
|
|
||||||
marvell,function = "xg";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
Ð9_RESETn(MPP_GPIO_CHIP) {
|
|
||||||
xphy9-reset-hog {
|
|
||||||
gpio-hog;
|
|
||||||
gpios = ETH9_RESETn(MPP_GPIO_REF_NO_CHIP);
|
|
||||||
output-low;
|
|
||||||
line-name = "x1-phy-reset";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
Ð10_RESETn(MPP_GPIO_CHIP) {
|
|
||||||
xphya-reset-hog {
|
|
||||||
gpio-hog;
|
|
||||||
gpios = ETH10_RESETn(MPP_GPIO_REF_NO_CHIP);
|
|
||||||
output-low;
|
|
||||||
line-name = "x2-phy-reset";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&cp0_xmdio {
|
|
||||||
status = "okay";
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&cp0_xmdio_pins>;
|
|
||||||
|
|
||||||
/* 88X3310 specifices 35ns minimum MDC period (28.57 MHz). */
|
|
||||||
clock-frequency = <28571428>;
|
|
||||||
|
|
||||||
xphy9: ethernet-phy@4 {
|
|
||||||
compatible = "ethernet-phy-ieee802.3-c45";
|
|
||||||
reg = <4>;
|
|
||||||
sfp = <&sfp9>;
|
|
||||||
};
|
|
||||||
|
|
||||||
xphya: ethernet-phy@5 {
|
|
||||||
compatible = "ethernet-phy-ieee802.3-c45";
|
|
||||||
reg = <5>;
|
|
||||||
sfp = <&sfpa>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/ {
|
|
||||||
sfp9: sfp@9 {
|
|
||||||
compatible = "sff,sfp";
|
|
||||||
i2c-bus = <&i2c_sfp9>;
|
|
||||||
mod-def0-gpios = SFP9_MOD_ABS(MPP_GPIO_REF);
|
|
||||||
los-gpios = SFP9_RX_LOS(MPP_GPIO_REF);
|
|
||||||
tx-disable-gpios = SFP9_TX_DISABLE(MPP_GPIO_REF);
|
|
||||||
tx-fault-gpios = SFP9_TX_FAULT(MPP_GPIO_REF);
|
|
||||||
rate-select0-gpios = SFP9_RS0(MPP_GPIO_REF);
|
|
||||||
rate-select1-gpios = SFP9_RS1(MPP_GPIO_REF);
|
|
||||||
maximum-power-milliwatt = <3000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
sfpa: sfp@a {
|
|
||||||
compatible = "sff,sfp";
|
|
||||||
i2c-bus = <&i2c_sfpa>;
|
|
||||||
mod-def0-gpios = SFP10_MOD_ABS(MPP_GPIO_REF);
|
|
||||||
los-gpios = SFP10_RX_LOS(MPP_GPIO_REF);
|
|
||||||
tx-disable-gpios = SFP10_TX_DISABLE(MPP_GPIO_REF);
|
|
||||||
tx-fault-gpios = SFP10_TX_FAULT(MPP_GPIO_REF);
|
|
||||||
rate-select0-gpios = SFP10_RS0(MPP_GPIO_REF);
|
|
||||||
rate-select1-gpios = SFP10_RS1(MPP_GPIO_REF);
|
|
||||||
maximum-power-milliwatt = <3000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Power Board */
|
|
||||||
|
|
||||||
&i2c_pwr {
|
|
||||||
// Shared IRQ on I2C_IRQ
|
|
||||||
|
|
||||||
// 0x26 U13 PCF8574 GPIO I/O
|
|
||||||
gpio_pwr1: gpio@26 {
|
|
||||||
compatible = "nxp,pcf8574a";
|
|
||||||
#gpio-cells = <2>;
|
|
||||||
gpio-controller;
|
|
||||||
reg = <0x26>;
|
|
||||||
#define GPIO_PWR1_UNUSED0 gpio_pwr1 0 GPIO_ACTIVE_HIGH
|
|
||||||
#define GPIO_PWR1_UNUSED1 gpio_pwr1 1 GPIO_ACTIVE_HIGH
|
|
||||||
#define GPIO_POE_PGOOD gpio_pwr1 2 GPIO_ACTIVE_HIGH
|
|
||||||
#define GPIO_RESET_BUTTON gpio_pwr1 3 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_VIN1_PGOOD gpio_pwr1 4 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_LED_VIN1_ALERT gpio_pwr1 5 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_VIN2_PGOOD gpio_pwr1 6 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_LED_VIN2_ALERT gpio_pwr1 7 GPIO_ACTIVE_LOW
|
|
||||||
};
|
|
||||||
|
|
||||||
//0x27 U3 PCF8574 GPIO LED
|
|
||||||
gpio_pwr2: gpio@27 {
|
|
||||||
compatible = "nxp,pcf8574a";
|
|
||||||
#gpio-cells = <2>;
|
|
||||||
gpio-controller;
|
|
||||||
reg = <0x27>;
|
|
||||||
#define GPIO_LED2G gpio_pwr2 0 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_LED2R gpio_pwr2 1 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_LED1G gpio_pwr2 2 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_LED1R gpio_pwr2 3 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_LED4G gpio_pwr2 4 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_LED4R gpio_pwr2 5 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_LED3G gpio_pwr2 6 GPIO_ACTIVE_LOW
|
|
||||||
#define GPIO_LED3R gpio_pwr2 7 GPIO_ACTIVE_LOW
|
|
||||||
};
|
|
||||||
|
|
||||||
//0x28* U5 TPS23861PWR PoE Controller
|
|
||||||
//0x30 U5 TPS23861PWR PoE Controller broadcast
|
|
||||||
|
|
||||||
//0x50 U15 AT24C256C EEPROM
|
|
||||||
eeprom@50 {
|
|
||||||
// AT24C256C-MAHL-T
|
|
||||||
compatible = "atmel,24c256";
|
|
||||||
reg = <0x50>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* System LEDs */
|
|
||||||
|
|
||||||
/ {
|
|
||||||
leds: leds {
|
|
||||||
compatible = "gpio-leds";
|
|
||||||
|
|
||||||
led-statg {
|
|
||||||
function = LED_FUNCTION_STATUS;
|
|
||||||
color = <LED_COLOR_ID_GREEN>;
|
|
||||||
gpios = <&GPIO_LED1G>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led-statr {
|
|
||||||
function = LED_FUNCTION_STATUS;
|
|
||||||
color = <LED_COLOR_ID_RED>;
|
|
||||||
gpios = <&GPIO_LED1R>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led-faultg {
|
|
||||||
function = LED_FUNCTION_FAULT;
|
|
||||||
color = <LED_COLOR_ID_GREEN>;
|
|
||||||
gpios = <&GPIO_LED2G>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led-faultr {
|
|
||||||
function = LED_FUNCTION_FAULT;
|
|
||||||
color = <LED_COLOR_ID_RED>;
|
|
||||||
gpios = <&GPIO_LED2R>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led-lang {
|
|
||||||
function = LED_FUNCTION_LAN;
|
|
||||||
color = <LED_COLOR_ID_GREEN>;
|
|
||||||
gpios = <&GPIO_LED3G>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led-lanr {
|
|
||||||
function = LED_FUNCTION_LAN;
|
|
||||||
color = <LED_COLOR_ID_RED>;
|
|
||||||
gpios = <&GPIO_LED3R>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led-dbgg {
|
|
||||||
function = LED_FUNCTION_DEBUG;
|
|
||||||
color = <LED_COLOR_ID_GREEN>;
|
|
||||||
gpios = <&GPIO_LED4G>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led-dbgr {
|
|
||||||
function = LED_FUNCTION_DEBUG;
|
|
||||||
color = <LED_COLOR_ID_RED>;
|
|
||||||
gpios = <&GPIO_LED4R>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led-vin1_alert {
|
|
||||||
function = "power-1";
|
|
||||||
color = <LED_COLOR_ID_RED>;
|
|
||||||
gpios = <&GPIO_LED_VIN1_ALERT>;
|
|
||||||
};
|
|
||||||
|
|
||||||
led-vin2_alert {
|
|
||||||
function = "power-2";
|
|
||||||
color = <LED_COLOR_ID_RED>;
|
|
||||||
gpios = <&GPIO_LED_VIN2_ALERT>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#include "cn9130.dtsi"
|
|
||||||
|
|
||||||
&cp0_syscon0 {
|
|
||||||
cp0_pinctrl: pinctrl {
|
|
||||||
/* For some reason, this is missing from cn9130.dtsi */
|
|
||||||
compatible = "marvell,cp115-standalone-pinctrl";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include "sparx5_pcb135_emmc.dts"
|
#include "microchip/sparx5_pcb135_emmc.dts"
|
||||||
|
|
||||||
&cpu0 {
|
&cpu0 {
|
||||||
enable-method = "spin-table";
|
enable-method = "spin-table";
|
||||||
|
|||||||
+30
-120
@@ -26,7 +26,6 @@ CONFIG_CPUSETS=y
|
|||||||
CONFIG_CGROUP_DEVICE=y
|
CONFIG_CGROUP_DEVICE=y
|
||||||
CONFIG_CGROUP_CPUACCT=y
|
CONFIG_CGROUP_CPUACCT=y
|
||||||
CONFIG_CGROUP_PERF=y
|
CONFIG_CGROUP_PERF=y
|
||||||
CONFIG_CGROUP_BPF=y
|
|
||||||
CONFIG_USER_NS=y
|
CONFIG_USER_NS=y
|
||||||
CONFIG_SCHED_AUTOGROUP=y
|
CONFIG_SCHED_AUTOGROUP=y
|
||||||
CONFIG_BLK_DEV_INITRD=y
|
CONFIG_BLK_DEV_INITRD=y
|
||||||
@@ -68,32 +67,28 @@ CONFIG_CMA=y
|
|||||||
CONFIG_NET=y
|
CONFIG_NET=y
|
||||||
CONFIG_PACKET=y
|
CONFIG_PACKET=y
|
||||||
CONFIG_UNIX=y
|
CONFIG_UNIX=y
|
||||||
CONFIG_XDP_SOCKETS=y
|
|
||||||
CONFIG_XDP_SOCKETS_DIAG=y
|
|
||||||
CONFIG_INET=y
|
CONFIG_INET=y
|
||||||
CONFIG_IP_MULTICAST=y
|
CONFIG_IP_MULTICAST=y
|
||||||
CONFIG_IP_ADVANCED_ROUTER=y
|
CONFIG_IP_ADVANCED_ROUTER=y
|
||||||
CONFIG_IP_MULTIPLE_TABLES=y
|
CONFIG_IP_MULTIPLE_TABLES=y
|
||||||
CONFIG_IP_ROUTE_MULTIPATH=y
|
CONFIG_IP_ROUTE_MULTIPATH=y
|
||||||
CONFIG_NET_IPIP=m
|
CONFIG_IP_PNP=y
|
||||||
CONFIG_NET_IPGRE_DEMUX=m
|
CONFIG_IP_PNP_DHCP=y
|
||||||
CONFIG_NET_IPGRE=m
|
CONFIG_IP_PNP_BOOTP=y
|
||||||
|
CONFIG_NET_IPIP=y
|
||||||
|
CONFIG_NET_IPGRE_DEMUX=y
|
||||||
|
CONFIG_NET_IPGRE=y
|
||||||
CONFIG_NET_IPGRE_BROADCAST=y
|
CONFIG_NET_IPGRE_BROADCAST=y
|
||||||
CONFIG_IP_MROUTE=y
|
CONFIG_IP_MROUTE=y
|
||||||
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
|
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
|
||||||
CONFIG_IP_PIMSM_V1=y
|
CONFIG_IP_PIMSM_V1=y
|
||||||
CONFIG_IP_PIMSM_V2=y
|
CONFIG_IP_PIMSM_V2=y
|
||||||
CONFIG_SYN_COOKIES=y
|
CONFIG_NET_IPVTI=y
|
||||||
CONFIG_NET_IPVTI=m
|
|
||||||
CONFIG_NET_FOU_IP_TUNNELS=y
|
|
||||||
CONFIG_IPV6_SIT=m
|
|
||||||
CONFIG_IPV6_GRE=m
|
|
||||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||||
CONFIG_IPV6_SUBTREES=y
|
CONFIG_IPV6_SUBTREES=y
|
||||||
CONFIG_IPV6_MROUTE=y
|
CONFIG_IPV6_MROUTE=y
|
||||||
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
|
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
|
||||||
CONFIG_IPV6_PIMSM_V2=y
|
CONFIG_IPV6_PIMSM_V2=y
|
||||||
CONFIG_NETWORK_PHY_TIMESTAMPING=y
|
|
||||||
CONFIG_NETFILTER=y
|
CONFIG_NETFILTER=y
|
||||||
CONFIG_BRIDGE_NETFILTER=y
|
CONFIG_BRIDGE_NETFILTER=y
|
||||||
CONFIG_NETFILTER_NETLINK_QUEUE=y
|
CONFIG_NETFILTER_NETLINK_QUEUE=y
|
||||||
@@ -103,80 +98,17 @@ CONFIG_NF_CONNTRACK_EVENTS=y
|
|||||||
CONFIG_NF_CONNTRACK_FTP=y
|
CONFIG_NF_CONNTRACK_FTP=y
|
||||||
CONFIG_NF_TABLES=y
|
CONFIG_NF_TABLES=y
|
||||||
CONFIG_NF_TABLES_INET=y
|
CONFIG_NF_TABLES_INET=y
|
||||||
CONFIG_NF_TABLES_NETDEV=y
|
|
||||||
CONFIG_NFT_CT=m
|
|
||||||
CONFIG_NFT_CONNLIMIT=m
|
|
||||||
CONFIG_NFT_LOG=m
|
|
||||||
CONFIG_NFT_LIMIT=m
|
|
||||||
CONFIG_NFT_MASQ=m
|
|
||||||
CONFIG_NFT_REDIR=m
|
|
||||||
CONFIG_NFT_NAT=m
|
|
||||||
CONFIG_NFT_TUNNEL=m
|
|
||||||
CONFIG_NFT_OBJREF=m
|
|
||||||
CONFIG_NFT_QUEUE=m
|
|
||||||
CONFIG_NFT_REJECT=m
|
|
||||||
CONFIG_NFT_COMPAT=m
|
|
||||||
CONFIG_NFT_HASH=m
|
|
||||||
CONFIG_NFT_XFRM=m
|
|
||||||
CONFIG_NFT_SOCKET=m
|
|
||||||
CONFIG_NFT_OSF=m
|
|
||||||
CONFIG_NFT_DUP_NETDEV=m
|
|
||||||
CONFIG_NFT_FWD_NETDEV=m
|
|
||||||
CONFIG_NFT_REJECT_NETDEV=m
|
|
||||||
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
|
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
|
||||||
CONFIG_NETFILTER_XT_TARGET_LOG=m
|
CONFIG_NETFILTER_XT_TARGET_LOG=m
|
||||||
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
|
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
|
||||||
CONFIG_NETFILTER_XT_MATCH_BPF=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_CGROUP=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
|
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
|
||||||
CONFIG_NETFILTER_XT_MATCH_DSCP=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_HELPER=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_MAC=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_MARK=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
|
|
||||||
CONFIG_IP_NF_IPTABLES=m
|
CONFIG_IP_NF_IPTABLES=m
|
||||||
CONFIG_IP_NF_FILTER=m
|
CONFIG_IP_NF_FILTER=m
|
||||||
CONFIG_IP_NF_TARGET_REJECT=m
|
CONFIG_IP_NF_TARGET_REJECT=m
|
||||||
CONFIG_IP_NF_NAT=m
|
CONFIG_IP_NF_NAT=m
|
||||||
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||||
CONFIG_IP_NF_MANGLE=m
|
CONFIG_IP_NF_MANGLE=m
|
||||||
CONFIG_IP6_NF_IPTABLES=m
|
CONFIG_NF_LOG_IPV6=m
|
||||||
CONFIG_IP6_NF_MATCH_AH=m
|
|
||||||
CONFIG_IP6_NF_MATCH_EUI64=m
|
|
||||||
CONFIG_IP6_NF_MATCH_IPV6HEADER=m
|
|
||||||
CONFIG_IP6_NF_FILTER=m
|
|
||||||
CONFIG_IP6_NF_TARGET_REJECT=m
|
|
||||||
CONFIG_IP6_NF_RAW=m
|
|
||||||
CONFIG_IP6_NF_NAT=m
|
|
||||||
CONFIG_IP6_NF_TARGET_MASQUERADE=m
|
|
||||||
CONFIG_IP6_NF_TARGET_NPT=m
|
|
||||||
CONFIG_NF_TABLES_BRIDGE=m
|
|
||||||
CONFIG_NFT_BRIDGE_META=m
|
|
||||||
CONFIG_NF_CONNTRACK_BRIDGE=m
|
|
||||||
CONFIG_BRIDGE_NF_EBTABLES=m
|
|
||||||
CONFIG_BRIDGE_EBT_BROUTE=m
|
|
||||||
CONFIG_BRIDGE_EBT_T_FILTER=m
|
|
||||||
CONFIG_BRIDGE_EBT_T_NAT=m
|
|
||||||
CONFIG_BRIDGE_EBT_802_3=m
|
|
||||||
CONFIG_BRIDGE_EBT_ARP=m
|
|
||||||
CONFIG_BRIDGE_EBT_IP=m
|
|
||||||
CONFIG_BRIDGE_EBT_IP6=m
|
|
||||||
CONFIG_BRIDGE_EBT_LIMIT=m
|
|
||||||
CONFIG_BRIDGE_EBT_PKTTYPE=m
|
|
||||||
CONFIG_BRIDGE_EBT_STP=m
|
|
||||||
CONFIG_BRIDGE_EBT_VLAN=m
|
|
||||||
CONFIG_BRIDGE_EBT_ARPREPLY=m
|
|
||||||
CONFIG_BRIDGE_EBT_DNAT=m
|
|
||||||
CONFIG_BRIDGE_EBT_REDIRECT=m
|
|
||||||
CONFIG_BRIDGE_EBT_SNAT=m
|
|
||||||
CONFIG_BRIDGE_EBT_LOG=m
|
|
||||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
|
||||||
CONFIG_BPFILTER=y
|
|
||||||
CONFIG_BRIDGE=y
|
CONFIG_BRIDGE=y
|
||||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||||
CONFIG_BRIDGE_MRP=y
|
CONFIG_BRIDGE_MRP=y
|
||||||
@@ -185,22 +117,9 @@ CONFIG_NET_DSA=y
|
|||||||
CONFIG_VLAN_8021Q=y
|
CONFIG_VLAN_8021Q=y
|
||||||
CONFIG_VLAN_8021Q_GVRP=y
|
CONFIG_VLAN_8021Q_GVRP=y
|
||||||
CONFIG_VLAN_8021Q_MVRP=y
|
CONFIG_VLAN_8021Q_MVRP=y
|
||||||
CONFIG_NET_SCHED=y
|
CONFIG_NET_L3_MASTER_DEV=y
|
||||||
CONFIG_NET_SCH_CBQ=y
|
|
||||||
CONFIG_NET_CLS_BASIC=y
|
|
||||||
CONFIG_NET_CLS_TCINDEX=y
|
|
||||||
CONFIG_NET_CLS_BPF=y
|
|
||||||
CONFIG_NET_CLS_FLOWER=y
|
|
||||||
CONFIG_NETLINK_DIAG=y
|
|
||||||
CONFIG_MPLS=y
|
|
||||||
CONFIG_NET_MPLS_GSO=y
|
|
||||||
CONFIG_MPLS_ROUTING=m
|
|
||||||
CONFIG_MPLS_IPTUNNEL=m
|
|
||||||
CONFIG_NET_PKTGEN=y
|
|
||||||
# CONFIG_WIRELESS is not set
|
|
||||||
CONFIG_NET_9P=y
|
CONFIG_NET_9P=y
|
||||||
CONFIG_NET_9P_VIRTIO=y
|
CONFIG_NET_9P_VIRTIO=y
|
||||||
CONFIG_LWTUNNEL=y
|
|
||||||
CONFIG_PCI=y
|
CONFIG_PCI=y
|
||||||
CONFIG_PCIEPORTBUS=y
|
CONFIG_PCIEPORTBUS=y
|
||||||
CONFIG_PCI_IOV=y
|
CONFIG_PCI_IOV=y
|
||||||
@@ -222,6 +141,7 @@ CONFIG_MTD_SPI_NOR=y
|
|||||||
CONFIG_OF_OVERLAY=y
|
CONFIG_OF_OVERLAY=y
|
||||||
CONFIG_BLK_DEV_NULL_BLK=y
|
CONFIG_BLK_DEV_NULL_BLK=y
|
||||||
CONFIG_BLK_DEV_LOOP=y
|
CONFIG_BLK_DEV_LOOP=y
|
||||||
|
CONFIG_BLK_DEV_NBD=y
|
||||||
CONFIG_BLK_DEV_RAM=y
|
CONFIG_BLK_DEV_RAM=y
|
||||||
CONFIG_VIRTIO_BLK=y
|
CONFIG_VIRTIO_BLK=y
|
||||||
CONFIG_BLK_DEV_NVME=y
|
CONFIG_BLK_DEV_NVME=y
|
||||||
@@ -244,25 +164,25 @@ CONFIG_DM_INIT=y
|
|||||||
CONFIG_DM_VERITY=y
|
CONFIG_DM_VERITY=y
|
||||||
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y
|
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y
|
||||||
CONFIG_NETDEVICES=y
|
CONFIG_NETDEVICES=y
|
||||||
CONFIG_BONDING=m
|
CONFIG_BONDING=y
|
||||||
CONFIG_DUMMY=m
|
CONFIG_DUMMY=y
|
||||||
CONFIG_NET_TEAM=m
|
CONFIG_NET_TEAM=y
|
||||||
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
|
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=y
|
||||||
CONFIG_NET_TEAM_MODE_LOADBALANCE=m
|
CONFIG_NET_TEAM_MODE_LOADBALANCE=y
|
||||||
CONFIG_MACVLAN=m
|
CONFIG_MACVLAN=y
|
||||||
CONFIG_MACVTAP=m
|
CONFIG_MACVTAP=y
|
||||||
CONFIG_IPVLAN=m
|
CONFIG_IPVLAN=y
|
||||||
CONFIG_IPVTAP=m
|
CONFIG_IPVTAP=y
|
||||||
CONFIG_VXLAN=m
|
CONFIG_VXLAN=y
|
||||||
CONFIG_GENEVE=m
|
CONFIG_GENEVE=y
|
||||||
CONFIG_BAREUDP=m
|
CONFIG_BAREUDP=y
|
||||||
CONFIG_MACSEC=m
|
CONFIG_MACSEC=y
|
||||||
CONFIG_TUN=m
|
CONFIG_TUN=y
|
||||||
CONFIG_VETH=m
|
CONFIG_VETH=y
|
||||||
CONFIG_VIRTIO_NET=y
|
CONFIG_VIRTIO_NET=y
|
||||||
CONFIG_NLMON=y
|
CONFIG_NLMON=y
|
||||||
CONFIG_NET_VRF=y
|
CONFIG_NET_VRF=y
|
||||||
CONFIG_NET_DSA_MV88E6XXX=m
|
CONFIG_NET_DSA_MV88E6XXX=y
|
||||||
CONFIG_NET_DSA_MV88E6XXX_PTP=y
|
CONFIG_NET_DSA_MV88E6XXX_PTP=y
|
||||||
# CONFIG_NET_VENDOR_3COM is not set
|
# CONFIG_NET_VENDOR_3COM is not set
|
||||||
# CONFIG_NET_VENDOR_ADAPTEC is not set
|
# CONFIG_NET_VENDOR_ADAPTEC is not set
|
||||||
@@ -287,8 +207,8 @@ CONFIG_NET_DSA_MV88E6XXX_PTP=y
|
|||||||
# CONFIG_NET_VENDOR_GOOGLE is not set
|
# CONFIG_NET_VENDOR_GOOGLE is not set
|
||||||
# CONFIG_NET_VENDOR_HISILICON is not set
|
# CONFIG_NET_VENDOR_HISILICON is not set
|
||||||
# CONFIG_NET_VENDOR_HUAWEI is not set
|
# CONFIG_NET_VENDOR_HUAWEI is not set
|
||||||
CONFIG_MVNETA=m
|
CONFIG_MVNETA=y
|
||||||
CONFIG_MVPP2=m
|
CONFIG_MVPP2=y
|
||||||
# CONFIG_NET_VENDOR_MELLANOX is not set
|
# CONFIG_NET_VENDOR_MELLANOX is not set
|
||||||
# CONFIG_NET_VENDOR_MICREL is not set
|
# CONFIG_NET_VENDOR_MICREL is not set
|
||||||
CONFIG_SPARX5_SWITCH=y
|
CONFIG_SPARX5_SWITCH=y
|
||||||
@@ -326,16 +246,15 @@ CONFIG_8139CP=y
|
|||||||
# CONFIG_NET_VENDOR_XILINX is not set
|
# CONFIG_NET_VENDOR_XILINX is not set
|
||||||
CONFIG_SFP=y
|
CONFIG_SFP=y
|
||||||
CONFIG_MARVELL_PHY=y
|
CONFIG_MARVELL_PHY=y
|
||||||
CONFIG_MARVELL_10G_PHY=m
|
CONFIG_MARVELL_10G_PHY=y
|
||||||
CONFIG_MICREL_PHY=y
|
CONFIG_MICREL_PHY=y
|
||||||
CONFIG_MICROCHIP_PHY=y
|
CONFIG_MICROCHIP_PHY=y
|
||||||
CONFIG_MICROCHIP_T1_PHY=y
|
CONFIG_MICROCHIP_T1_PHY=y
|
||||||
CONFIG_MICROSEMI_PHY=m
|
CONFIG_MICROSEMI_PHY=y
|
||||||
CONFIG_MDIO_BITBANG=y
|
CONFIG_MDIO_BITBANG=y
|
||||||
CONFIG_MDIO_MVUSB=y
|
CONFIG_MDIO_MVUSB=y
|
||||||
CONFIG_MDIO_MSCC_MIIM=y
|
CONFIG_MDIO_MSCC_MIIM=y
|
||||||
CONFIG_MDIO_BUS_MUX_MMIOREG=y
|
CONFIG_MDIO_BUS_MUX_MMIOREG=y
|
||||||
CONFIG_USB_RTL8152=y
|
|
||||||
CONFIG_USB_USBNET=y
|
CONFIG_USB_USBNET=y
|
||||||
CONFIG_USB_NET_CDC_EEM=y
|
CONFIG_USB_NET_CDC_EEM=y
|
||||||
# CONFIG_USB_NET_CDC_NCM is not set
|
# CONFIG_USB_NET_CDC_NCM is not set
|
||||||
@@ -372,7 +291,6 @@ CONFIG_I2C_SLAVE=y
|
|||||||
CONFIG_SPI=y
|
CONFIG_SPI=y
|
||||||
CONFIG_SPI_ARMADA_3700=y
|
CONFIG_SPI_ARMADA_3700=y
|
||||||
CONFIG_SPI_NXP_FLEXSPI=y
|
CONFIG_SPI_NXP_FLEXSPI=y
|
||||||
CONFIG_SPI_ORION=y
|
|
||||||
CONFIG_SPI_PL022=y
|
CONFIG_SPI_PL022=y
|
||||||
CONFIG_SPI_MUX=y
|
CONFIG_SPI_MUX=y
|
||||||
CONFIG_SPI_SPIDEV=m
|
CONFIG_SPI_SPIDEV=m
|
||||||
@@ -394,7 +312,6 @@ CONFIG_SENSORS_SPARX5=y
|
|||||||
CONFIG_SENSORS_JC42=y
|
CONFIG_SENSORS_JC42=y
|
||||||
CONFIG_SENSORS_LM90=m
|
CONFIG_SENSORS_LM90=m
|
||||||
CONFIG_SENSORS_INA2XX=m
|
CONFIG_SENSORS_INA2XX=m
|
||||||
CONFIG_CPU_THERMAL=y
|
|
||||||
CONFIG_THERMAL_EMULATION=y
|
CONFIG_THERMAL_EMULATION=y
|
||||||
CONFIG_ARMADA_THERMAL=y
|
CONFIG_ARMADA_THERMAL=y
|
||||||
CONFIG_WATCHDOG=y
|
CONFIG_WATCHDOG=y
|
||||||
@@ -460,7 +377,6 @@ CONFIG_MMC_SPI=y
|
|||||||
CONFIG_MMC_DW=y
|
CONFIG_MMC_DW=y
|
||||||
CONFIG_MMC_DW_EXYNOS=y
|
CONFIG_MMC_DW_EXYNOS=y
|
||||||
CONFIG_MMC_DW_K3=y
|
CONFIG_MMC_DW_K3=y
|
||||||
CONFIG_MMC_CQHCI=y
|
|
||||||
CONFIG_MMC_SDHCI_XENON=y
|
CONFIG_MMC_SDHCI_XENON=y
|
||||||
CONFIG_SCSI_UFSHCD=y
|
CONFIG_SCSI_UFSHCD=y
|
||||||
CONFIG_SCSI_UFSHCD_PLATFORM=y
|
CONFIG_SCSI_UFSHCD_PLATFORM=y
|
||||||
@@ -501,16 +417,11 @@ CONFIG_TI_ADC081C=y
|
|||||||
CONFIG_PWM=y
|
CONFIG_PWM=y
|
||||||
CONFIG_PHY_XGENE=y
|
CONFIG_PHY_XGENE=y
|
||||||
CONFIG_PHY_MVEBU_CP110_COMPHY=y
|
CONFIG_PHY_MVEBU_CP110_COMPHY=y
|
||||||
CONFIG_PHY_MVEBU_CP110_UTMI=y
|
|
||||||
CONFIG_PHY_SAMSUNG_USB2=y
|
CONFIG_PHY_SAMSUNG_USB2=y
|
||||||
CONFIG_NVMEM_LAYOUT_ONIE_TLV=y
|
|
||||||
CONFIG_MUX_MMIO=y
|
CONFIG_MUX_MMIO=y
|
||||||
CONFIG_EXT2_FS=y
|
CONFIG_EXT2_FS=y
|
||||||
CONFIG_EXT3_FS=y
|
CONFIG_EXT3_FS=y
|
||||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||||
CONFIG_EXT4_FS=y
|
|
||||||
CONFIG_BTRFS_FS=y
|
|
||||||
CONFIG_BTRFS_FS_POSIX_ACL=y
|
|
||||||
CONFIG_FANOTIFY=y
|
CONFIG_FANOTIFY=y
|
||||||
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
|
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
|
||||||
CONFIG_QUOTA=y
|
CONFIG_QUOTA=y
|
||||||
@@ -538,7 +449,6 @@ CONFIG_IRQ_POLL=y
|
|||||||
CONFIG_PRINTK_TIME=y
|
CONFIG_PRINTK_TIME=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
|
|
||||||
CONFIG_DEBUG_FS=y
|
CONFIG_DEBUG_FS=y
|
||||||
CONFIG_DETECT_HUNG_TASK=y
|
CONFIG_DETECT_HUNG_TASK=y
|
||||||
# CONFIG_SCHED_DEBUG is not set
|
# CONFIG_SCHED_DEBUG is not set
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
label Infix (aarch64)
|
label Infix (aarch64)
|
||||||
kernel /boot/Image
|
kernel /boot/Image
|
||||||
fdtdir /boot
|
|
||||||
append ${bootargs_root} ${bootargs_rauc} ${bootargs_log}
|
append ${bootargs_root} ${bootargs_rauc} ${bootargs_log}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
[system]
|
[system]
|
||||||
compatible=infix-aarch64
|
compatible=infix-aarch64
|
||||||
bootloader=uboot
|
bootloader=uboot
|
||||||
statusfile=/mnt/aux/rauc.status
|
statusfile=/var/lib/rauc/status
|
||||||
mountprefix=/var/lib/rauc/mnt
|
mountprefix=/var/lib/rauc/mnt
|
||||||
bundle-formats=-plain
|
bundle-formats=-plain
|
||||||
max-bundle-download-size=1073741824
|
|
||||||
|
|
||||||
[keyring]
|
[keyring]
|
||||||
directory=/etc/rauc/keys
|
directory=/etc/rauc/keys
|
||||||
@@ -18,5 +17,5 @@ device=/dev/disk/by-partlabel/secondary
|
|||||||
bootname=secondary
|
bootname=secondary
|
||||||
|
|
||||||
[slot.net.0]
|
[slot.net.0]
|
||||||
device=/dev/ram0
|
device=/dev/ram
|
||||||
bootname=net
|
bootname=net
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
x33x0fw_0_3_11_0_11832.hdr
|
|
||||||
Binary file not shown.
@@ -0,0 +1,29 @@
|
|||||||
|
set timeout="1"
|
||||||
|
|
||||||
|
set default="primary"
|
||||||
|
set log="loglevel=4"
|
||||||
|
|
||||||
|
load_env ORDER DEBUG
|
||||||
|
|
||||||
|
for slot in $ORDER; do
|
||||||
|
set default="$slot"
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$DEBUG" ]; then
|
||||||
|
set log="debug"
|
||||||
|
fi
|
||||||
|
|
||||||
|
submenu "primary" "$log" {
|
||||||
|
set slot="$1"
|
||||||
|
set append="$2"
|
||||||
|
set root=(hd0,gpt3)
|
||||||
|
source /boot/grub/grub.cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
submenu "secondary" "$log" {
|
||||||
|
set slot="$1"
|
||||||
|
set append="$2"
|
||||||
|
set root=(hd0,gpt4)
|
||||||
|
source /boot/grub/grub.cfg
|
||||||
|
}
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
# GRUB Environment Block
|
# GRUB Environment Block
|
||||||
# WARNING: Do not edit this file by tools other than grub-editenv!!!
|
# WARNING: Do not edit this file by tools other than grub-editenv!!!
|
||||||
ORDER=primary secondary net
|
ORDER=primary secondary
|
||||||
primary_OK=1
|
primary_OK=1
|
||||||
secondary_OK=1
|
secondary_OK=1
|
||||||
net_OK=1
|
|
||||||
primary_TRY=0
|
primary_TRY=0
|
||||||
secondary_TRY=0
|
secondary_TRY=0
|
||||||
net_TRY=0
|
################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
||||||
#########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
|
||||||
@@ -25,7 +25,6 @@ CONFIG_CPUSETS=y
|
|||||||
CONFIG_CGROUP_DEVICE=y
|
CONFIG_CGROUP_DEVICE=y
|
||||||
CONFIG_CGROUP_CPUACCT=y
|
CONFIG_CGROUP_CPUACCT=y
|
||||||
CONFIG_CGROUP_PERF=y
|
CONFIG_CGROUP_PERF=y
|
||||||
CONFIG_CGROUP_BPF=y
|
|
||||||
CONFIG_USER_NS=y
|
CONFIG_USER_NS=y
|
||||||
CONFIG_SCHED_AUTOGROUP=y
|
CONFIG_SCHED_AUTOGROUP=y
|
||||||
CONFIG_BLK_DEV_INITRD=y
|
CONFIG_BLK_DEV_INITRD=y
|
||||||
@@ -39,32 +38,25 @@ CONFIG_MODULE_UNLOAD=y
|
|||||||
CONFIG_NET=y
|
CONFIG_NET=y
|
||||||
CONFIG_PACKET=y
|
CONFIG_PACKET=y
|
||||||
CONFIG_UNIX=y
|
CONFIG_UNIX=y
|
||||||
CONFIG_XDP_SOCKETS=y
|
|
||||||
CONFIG_XDP_SOCKETS_DIAG=y
|
|
||||||
CONFIG_INET=y
|
CONFIG_INET=y
|
||||||
CONFIG_IP_MULTICAST=y
|
CONFIG_IP_MULTICAST=y
|
||||||
CONFIG_IP_ADVANCED_ROUTER=y
|
CONFIG_IP_ADVANCED_ROUTER=y
|
||||||
CONFIG_IP_MULTIPLE_TABLES=y
|
CONFIG_IP_MULTIPLE_TABLES=y
|
||||||
CONFIG_IP_ROUTE_MULTIPATH=y
|
CONFIG_IP_ROUTE_MULTIPATH=y
|
||||||
CONFIG_NET_IPIP=m
|
CONFIG_NET_IPIP=y
|
||||||
CONFIG_NET_IPGRE_DEMUX=m
|
CONFIG_NET_IPGRE_DEMUX=y
|
||||||
CONFIG_NET_IPGRE=m
|
CONFIG_NET_IPGRE=y
|
||||||
CONFIG_NET_IPGRE_BROADCAST=y
|
CONFIG_NET_IPGRE_BROADCAST=y
|
||||||
CONFIG_IP_MROUTE=y
|
CONFIG_IP_MROUTE=y
|
||||||
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
|
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
|
||||||
CONFIG_IP_PIMSM_V1=y
|
CONFIG_IP_PIMSM_V1=y
|
||||||
CONFIG_IP_PIMSM_V2=y
|
CONFIG_IP_PIMSM_V2=y
|
||||||
CONFIG_SYN_COOKIES=y
|
CONFIG_NET_IPVTI=y
|
||||||
CONFIG_NET_IPVTI=m
|
|
||||||
CONFIG_NET_FOU_IP_TUNNELS=y
|
|
||||||
CONFIG_IPV6_SIT=m
|
|
||||||
CONFIG_IPV6_GRE=m
|
|
||||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||||
CONFIG_IPV6_SUBTREES=y
|
CONFIG_IPV6_SUBTREES=y
|
||||||
CONFIG_IPV6_MROUTE=y
|
CONFIG_IPV6_MROUTE=y
|
||||||
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
|
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
|
||||||
CONFIG_IPV6_PIMSM_V2=y
|
CONFIG_IPV6_PIMSM_V2=y
|
||||||
CONFIG_NETWORK_PHY_TIMESTAMPING=y
|
|
||||||
CONFIG_NETFILTER=y
|
CONFIG_NETFILTER=y
|
||||||
CONFIG_BRIDGE_NETFILTER=y
|
CONFIG_BRIDGE_NETFILTER=y
|
||||||
CONFIG_NETFILTER_NETLINK_QUEUE=y
|
CONFIG_NETFILTER_NETLINK_QUEUE=y
|
||||||
@@ -74,80 +66,17 @@ CONFIG_NF_CONNTRACK_EVENTS=y
|
|||||||
CONFIG_NF_CONNTRACK_FTP=y
|
CONFIG_NF_CONNTRACK_FTP=y
|
||||||
CONFIG_NF_TABLES=y
|
CONFIG_NF_TABLES=y
|
||||||
CONFIG_NF_TABLES_INET=y
|
CONFIG_NF_TABLES_INET=y
|
||||||
CONFIG_NF_TABLES_NETDEV=y
|
|
||||||
CONFIG_NFT_CT=m
|
|
||||||
CONFIG_NFT_CONNLIMIT=m
|
|
||||||
CONFIG_NFT_LOG=m
|
|
||||||
CONFIG_NFT_LIMIT=m
|
|
||||||
CONFIG_NFT_MASQ=m
|
|
||||||
CONFIG_NFT_REDIR=m
|
|
||||||
CONFIG_NFT_NAT=m
|
|
||||||
CONFIG_NFT_TUNNEL=m
|
|
||||||
CONFIG_NFT_OBJREF=m
|
|
||||||
CONFIG_NFT_QUEUE=m
|
|
||||||
CONFIG_NFT_REJECT=m
|
|
||||||
CONFIG_NFT_COMPAT=m
|
|
||||||
CONFIG_NFT_HASH=m
|
|
||||||
CONFIG_NFT_XFRM=m
|
|
||||||
CONFIG_NFT_SOCKET=m
|
|
||||||
CONFIG_NFT_OSF=m
|
|
||||||
CONFIG_NFT_DUP_NETDEV=m
|
|
||||||
CONFIG_NFT_FWD_NETDEV=m
|
|
||||||
CONFIG_NFT_REJECT_NETDEV=m
|
|
||||||
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
|
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
|
||||||
CONFIG_NETFILTER_XT_TARGET_LOG=m
|
CONFIG_NETFILTER_XT_TARGET_LOG=m
|
||||||
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
|
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
|
||||||
CONFIG_NETFILTER_XT_MATCH_BPF=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_CGROUP=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
|
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
|
||||||
CONFIG_NETFILTER_XT_MATCH_DSCP=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_HELPER=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_MAC=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_MARK=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
|
|
||||||
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
|
|
||||||
CONFIG_IP_NF_IPTABLES=m
|
CONFIG_IP_NF_IPTABLES=m
|
||||||
CONFIG_IP_NF_FILTER=m
|
CONFIG_IP_NF_FILTER=m
|
||||||
CONFIG_IP_NF_TARGET_REJECT=m
|
CONFIG_IP_NF_TARGET_REJECT=m
|
||||||
CONFIG_IP_NF_NAT=m
|
CONFIG_IP_NF_NAT=m
|
||||||
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||||
CONFIG_IP_NF_MANGLE=m
|
CONFIG_IP_NF_MANGLE=m
|
||||||
CONFIG_IP6_NF_IPTABLES=m
|
CONFIG_NF_LOG_IPV6=m
|
||||||
CONFIG_IP6_NF_MATCH_AH=m
|
|
||||||
CONFIG_IP6_NF_MATCH_EUI64=m
|
|
||||||
CONFIG_IP6_NF_MATCH_IPV6HEADER=m
|
|
||||||
CONFIG_IP6_NF_FILTER=m
|
|
||||||
CONFIG_IP6_NF_TARGET_REJECT=m
|
|
||||||
CONFIG_IP6_NF_RAW=m
|
|
||||||
CONFIG_IP6_NF_NAT=m
|
|
||||||
CONFIG_IP6_NF_TARGET_MASQUERADE=m
|
|
||||||
CONFIG_IP6_NF_TARGET_NPT=m
|
|
||||||
CONFIG_NF_TABLES_BRIDGE=m
|
|
||||||
CONFIG_NFT_BRIDGE_META=m
|
|
||||||
CONFIG_NF_CONNTRACK_BRIDGE=m
|
|
||||||
CONFIG_BRIDGE_NF_EBTABLES=m
|
|
||||||
CONFIG_BRIDGE_EBT_BROUTE=m
|
|
||||||
CONFIG_BRIDGE_EBT_T_FILTER=m
|
|
||||||
CONFIG_BRIDGE_EBT_T_NAT=m
|
|
||||||
CONFIG_BRIDGE_EBT_802_3=m
|
|
||||||
CONFIG_BRIDGE_EBT_ARP=m
|
|
||||||
CONFIG_BRIDGE_EBT_IP=m
|
|
||||||
CONFIG_BRIDGE_EBT_IP6=m
|
|
||||||
CONFIG_BRIDGE_EBT_LIMIT=m
|
|
||||||
CONFIG_BRIDGE_EBT_PKTTYPE=m
|
|
||||||
CONFIG_BRIDGE_EBT_STP=m
|
|
||||||
CONFIG_BRIDGE_EBT_VLAN=m
|
|
||||||
CONFIG_BRIDGE_EBT_ARPREPLY=m
|
|
||||||
CONFIG_BRIDGE_EBT_DNAT=m
|
|
||||||
CONFIG_BRIDGE_EBT_REDIRECT=m
|
|
||||||
CONFIG_BRIDGE_EBT_SNAT=m
|
|
||||||
CONFIG_BRIDGE_EBT_LOG=m
|
|
||||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
|
||||||
CONFIG_BPFILTER=y
|
|
||||||
CONFIG_BRIDGE=y
|
CONFIG_BRIDGE=y
|
||||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||||
CONFIG_BRIDGE_MRP=y
|
CONFIG_BRIDGE_MRP=y
|
||||||
@@ -155,22 +84,8 @@ CONFIG_BRIDGE_CFM=y
|
|||||||
CONFIG_VLAN_8021Q=y
|
CONFIG_VLAN_8021Q=y
|
||||||
CONFIG_VLAN_8021Q_GVRP=y
|
CONFIG_VLAN_8021Q_GVRP=y
|
||||||
CONFIG_VLAN_8021Q_MVRP=y
|
CONFIG_VLAN_8021Q_MVRP=y
|
||||||
CONFIG_NET_SCHED=y
|
|
||||||
CONFIG_NET_SCH_CBQ=y
|
|
||||||
CONFIG_NET_CLS_BASIC=y
|
|
||||||
CONFIG_NET_CLS_TCINDEX=y
|
|
||||||
CONFIG_NET_CLS_BPF=y
|
|
||||||
CONFIG_NET_CLS_FLOWER=y
|
|
||||||
CONFIG_NETLINK_DIAG=y
|
|
||||||
CONFIG_MPLS=y
|
|
||||||
CONFIG_NET_MPLS_GSO=y
|
|
||||||
CONFIG_MPLS_ROUTING=m
|
|
||||||
CONFIG_MPLS_IPTUNNEL=m
|
|
||||||
CONFIG_NET_PKTGEN=y
|
|
||||||
# CONFIG_WIRELESS is not set
|
|
||||||
CONFIG_NET_9P=y
|
CONFIG_NET_9P=y
|
||||||
CONFIG_NET_9P_VIRTIO=y
|
CONFIG_NET_9P_VIRTIO=y
|
||||||
CONFIG_LWTUNNEL=y
|
|
||||||
CONFIG_PCI=y
|
CONFIG_PCI=y
|
||||||
CONFIG_UEVENT_HELPER=y
|
CONFIG_UEVENT_HELPER=y
|
||||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||||
@@ -180,6 +95,7 @@ CONFIG_FW_CFG_SYSFS=y
|
|||||||
CONFIG_FW_CFG_SYSFS_CMDLINE=y
|
CONFIG_FW_CFG_SYSFS_CMDLINE=y
|
||||||
CONFIG_BLK_DEV_NULL_BLK=y
|
CONFIG_BLK_DEV_NULL_BLK=y
|
||||||
CONFIG_BLK_DEV_LOOP=y
|
CONFIG_BLK_DEV_LOOP=y
|
||||||
|
CONFIG_BLK_DEV_NBD=y
|
||||||
CONFIG_BLK_DEV_RAM=y
|
CONFIG_BLK_DEV_RAM=y
|
||||||
CONFIG_VIRTIO_BLK=y
|
CONFIG_VIRTIO_BLK=y
|
||||||
CONFIG_BLK_DEV_SD=y
|
CONFIG_BLK_DEV_SD=y
|
||||||
@@ -192,21 +108,21 @@ CONFIG_BLK_DEV_DM=y
|
|||||||
CONFIG_DM_VERITY=y
|
CONFIG_DM_VERITY=y
|
||||||
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y
|
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y
|
||||||
CONFIG_NETDEVICES=y
|
CONFIG_NETDEVICES=y
|
||||||
CONFIG_BONDING=m
|
CONFIG_BONDING=y
|
||||||
CONFIG_DUMMY=m
|
CONFIG_DUMMY=y
|
||||||
CONFIG_NET_TEAM=m
|
CONFIG_NET_TEAM=y
|
||||||
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m
|
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=y
|
||||||
CONFIG_NET_TEAM_MODE_LOADBALANCE=m
|
CONFIG_NET_TEAM_MODE_LOADBALANCE=y
|
||||||
CONFIG_MACVLAN=m
|
CONFIG_MACVLAN=y
|
||||||
CONFIG_MACVTAP=m
|
CONFIG_MACVTAP=y
|
||||||
CONFIG_IPVLAN=m
|
CONFIG_IPVLAN=y
|
||||||
CONFIG_IPVTAP=m
|
CONFIG_IPVTAP=y
|
||||||
CONFIG_VXLAN=m
|
CONFIG_VXLAN=y
|
||||||
CONFIG_GENEVE=m
|
CONFIG_GENEVE=y
|
||||||
CONFIG_BAREUDP=m
|
CONFIG_BAREUDP=y
|
||||||
CONFIG_MACSEC=m
|
CONFIG_MACSEC=y
|
||||||
CONFIG_TUN=m
|
CONFIG_TUN=y
|
||||||
CONFIG_VETH=m
|
CONFIG_VETH=y
|
||||||
CONFIG_VIRTIO_NET=y
|
CONFIG_VIRTIO_NET=y
|
||||||
CONFIG_NLMON=y
|
CONFIG_NLMON=y
|
||||||
CONFIG_NET_VRF=y
|
CONFIG_NET_VRF=y
|
||||||
@@ -219,26 +135,30 @@ CONFIG_SERIAL_8250=y
|
|||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_VIRTIO_CONSOLE=y
|
CONFIG_VIRTIO_CONSOLE=y
|
||||||
CONFIG_HW_RANDOM_VIRTIO=m
|
CONFIG_HW_RANDOM_VIRTIO=m
|
||||||
CONFIG_I2C=y
|
|
||||||
CONFIG_WATCHDOG=y
|
CONFIG_WATCHDOG=y
|
||||||
CONFIG_WATCHDOG_SYSFS=y
|
CONFIG_WATCHDOG_SYSFS=y
|
||||||
CONFIG_SOFT_WATCHDOG=y
|
CONFIG_SOFT_WATCHDOG=y
|
||||||
CONFIG_I6300ESB_WDT=y
|
CONFIG_I6300ESB_WDT=y
|
||||||
|
CONFIG_DRM=y
|
||||||
|
CONFIG_DRM_QXL=y
|
||||||
|
CONFIG_DRM_VIRTIO_GPU=y
|
||||||
|
CONFIG_DRM_BOCHS=y
|
||||||
|
CONFIG_SOUND=y
|
||||||
|
CONFIG_SND=y
|
||||||
|
CONFIG_SND_HDA_INTEL=y
|
||||||
|
CONFIG_SND_HDA_GENERIC=y
|
||||||
CONFIG_USB=y
|
CONFIG_USB=y
|
||||||
CONFIG_USB_XHCI_HCD=y
|
CONFIG_USB_XHCI_HCD=y
|
||||||
CONFIG_USB_EHCI_HCD=y
|
CONFIG_USB_EHCI_HCD=y
|
||||||
CONFIG_USB_UHCI_HCD=y
|
CONFIG_USB_UHCI_HCD=y
|
||||||
CONFIG_USB_STORAGE=y
|
CONFIG_USB_STORAGE=y
|
||||||
CONFIG_RTC_CLASS=y
|
CONFIG_RTC_CLASS=y
|
||||||
CONFIG_SYNC_FILE=y
|
|
||||||
CONFIG_VIRTIO_PCI=y
|
CONFIG_VIRTIO_PCI=y
|
||||||
CONFIG_VIRTIO_BALLOON=y
|
CONFIG_VIRTIO_BALLOON=y
|
||||||
CONFIG_VIRTIO_INPUT=y
|
CONFIG_VIRTIO_INPUT=y
|
||||||
CONFIG_VIRTIO_MMIO=y
|
CONFIG_VIRTIO_MMIO=y
|
||||||
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
||||||
CONFIG_EXT4_FS=y
|
CONFIG_EXT4_FS=y
|
||||||
CONFIG_BTRFS_FS=y
|
|
||||||
CONFIG_BTRFS_FS_POSIX_ACL=y
|
|
||||||
CONFIG_AUTOFS4_FS=y
|
CONFIG_AUTOFS4_FS=y
|
||||||
CONFIG_FUSE_FS=y
|
CONFIG_FUSE_FS=y
|
||||||
CONFIG_VIRTIO_FS=y
|
CONFIG_VIRTIO_FS=y
|
||||||
@@ -253,8 +173,7 @@ CONFIG_SQUASHFS_ZSTD=y
|
|||||||
CONFIG_9P_FS=y
|
CONFIG_9P_FS=y
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
CONFIG_NLS_ISO8859_1=y
|
CONFIG_NLS_ISO8859_1=y
|
||||||
CONFIG_CRYPTO_GCM=y
|
CONFIG_CRYPTO_SHA256=y
|
||||||
CONFIG_CRYPTO_AES=y
|
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
CONFIG_DEBUG_FS=y
|
CONFIG_DEBUG_FS=y
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
menuentry "Infix" --id infix {
|
||||||
|
linux /boot/bzImage root=PARTLABEL=$slot rauc.slot=$slot console=ttyS0 $append nokaslr
|
||||||
|
}
|
||||||
@@ -2,10 +2,9 @@
|
|||||||
compatible=infix-x86_64
|
compatible=infix-x86_64
|
||||||
bootloader=grub
|
bootloader=grub
|
||||||
grubenv=/mnt/aux/grub/grubenv
|
grubenv=/mnt/aux/grub/grubenv
|
||||||
statusfile=/mnt/aux/rauc.status
|
statusfile=/var/lib/rauc/status
|
||||||
mountprefix=/var/lib/rauc/mnt
|
mountprefix=/var/lib/rauc/mnt
|
||||||
bundle-formats=-plain
|
bundle-formats=-plain
|
||||||
max-bundle-download-size=1073741824
|
|
||||||
|
|
||||||
[keyring]
|
[keyring]
|
||||||
directory=/etc/rauc/keys
|
directory=/etc/rauc/keys
|
||||||
@@ -17,7 +16,3 @@ bootname=primary
|
|||||||
[slot.rootfs.1]
|
[slot.rootfs.1]
|
||||||
device=/dev/disk/by-partlabel/secondary
|
device=/dev/disk/by-partlabel/secondary
|
||||||
bootname=secondary
|
bootname=secondary
|
||||||
|
|
||||||
[slot.net.0]
|
|
||||||
device=/dev/ram0
|
|
||||||
bootname=net
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
. "$BR2_CONFIG"
|
|
||||||
|
|
||||||
# Prevent regen of host key at every boot, /etc is saved across reboots
|
|
||||||
if [ -L "$TARGET_DIR/etc/dropbear" ]; then
|
|
||||||
rm "$TARGET_DIR/etc/dropbear"
|
|
||||||
mkdir "$TARGET_DIR/etc/dropbear"
|
|
||||||
fi
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
pdmenu
|
|
||||||
clear
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# System-wide .bashrc file for interactive bash(1) shells.
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
|
||||||
[ -z "$PS1" ] && return
|
|
||||||
|
|
||||||
# Reevaluate for each line, in case hostname changes
|
|
||||||
function prompt_command
|
|
||||||
{
|
|
||||||
PS1="\u@$(hostname):\w\$ "
|
|
||||||
}
|
|
||||||
export PROMPT_COMMAND=prompt_command
|
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
|
||||||
# update the values of LINES and COLUMNS.
|
|
||||||
shopt -s checkwinsize
|
|
||||||
|
|
||||||
# Disble built-ins
|
|
||||||
enable -n help
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
run [S] /lib/infix/swup --
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Factory default:
|
|
||||||
# 1) all switch ports in VLAN 1 of br0
|
|
||||||
# 2) no switch ports => DHCP on eth0
|
|
||||||
# 3) no eth0
|
|
||||||
|
|
||||||
create_bridge()
|
|
||||||
{
|
|
||||||
nm=$1
|
|
||||||
shift
|
|
||||||
ports=$@
|
|
||||||
|
|
||||||
touch "/etc/network/interfaces.d/$nm"
|
|
||||||
for port in $ports; do
|
|
||||||
cat <<-EOF >>"/etc/network/interfaces.d/$nm"
|
|
||||||
iface $port
|
|
||||||
bridge-access 1
|
|
||||||
post-up ip link set $port group port
|
|
||||||
EOF
|
|
||||||
done
|
|
||||||
cat <<-EOF >> "/etc/network/interfaces.d/$nm"
|
|
||||||
|
|
||||||
auto $nm
|
|
||||||
iface $nm
|
|
||||||
bridge-ports $ports
|
|
||||||
bridge-vlan-aware yes
|
|
||||||
bridge-stp on
|
|
||||||
bridge-vids 1
|
|
||||||
|
|
||||||
auto vlan1
|
|
||||||
iface vlan1 inet dhcp
|
|
||||||
vlan-id 1
|
|
||||||
vlan-raw-device $nm
|
|
||||||
post-up ip link set vlan1 group iface
|
|
||||||
EOF
|
|
||||||
ip link set vlan1 group iface
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check if already set up
|
|
||||||
[ -z "$(ls -A /etc/network/interfaces.d/)" ] || exit 0
|
|
||||||
|
|
||||||
# Check for custom hostname from Qemu/Qeneth
|
|
||||||
nm=$(cat /sys/firmware/qemu_fw_cfg/by_name/opt/hostname/raw)
|
|
||||||
if [ -n "$nm" ]; then
|
|
||||||
hostnm "$nm"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# need to check for 'length > 0' because ip command
|
|
||||||
# outputs empty json objects for non-port group ifs
|
|
||||||
ports=$(ip -json link show group port | jq -r '.[].ifname | select(length > 0)' | tr "\n" " ")
|
|
||||||
if [ -n "$ports" ]; then
|
|
||||||
create_bridge br0 $ports
|
|
||||||
else
|
|
||||||
ifaces=$(ip -json addr show |jq -r '.[] | select(.link_type=="ether").ifname')
|
|
||||||
for iface in $ifaces; do
|
|
||||||
cat <<-EOF > "/etc/network/interfaces.d/$iface"
|
|
||||||
auto $iface
|
|
||||||
iface $iface inet dhcp
|
|
||||||
pre-up ip link set $iface group iface
|
|
||||||
EOF
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
+9
-82
@@ -1,10 +1,7 @@
|
|||||||
menuconfig SIGN_ENABLED
|
comment "Image Signing"
|
||||||
bool "Image Signing"
|
|
||||||
default y
|
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Signing key source"
|
prompt "Signing key source"
|
||||||
depends on SIGN_ENABLED
|
|
||||||
default SIGN_SRC_DIR
|
default SIGN_SRC_DIR
|
||||||
|
|
||||||
config SIGN_SRC_DIR
|
config SIGN_SRC_DIR
|
||||||
@@ -17,9 +14,10 @@ endchoice
|
|||||||
|
|
||||||
config SIGN_KEY
|
config SIGN_KEY
|
||||||
string "Signing key"
|
string "Signing key"
|
||||||
depends on SIGN_ENABLED
|
|
||||||
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/dev-key" if SIGN_SRC_DIR
|
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/dev-key" if SIGN_SRC_DIR
|
||||||
|
|
||||||
|
comment "Additional Artifacts"
|
||||||
|
|
||||||
menuconfig DISK_IMAGE
|
menuconfig DISK_IMAGE
|
||||||
bool "Disk image"
|
bool "Disk image"
|
||||||
help
|
help
|
||||||
@@ -31,96 +29,25 @@ menuconfig DISK_IMAGE
|
|||||||
- Creating a GNS3 appliance
|
- Creating a GNS3 appliance
|
||||||
- Developing/debugging issues in the boot process in QEMU
|
- Developing/debugging issues in the boot process in QEMU
|
||||||
|
|
||||||
menuconfig DISK_IMAGE_SIZE
|
config DISK_IMAGE_SIZE
|
||||||
string "Image size"
|
string "Image size"
|
||||||
depends on DISK_IMAGE
|
depends on DISK_IMAGE
|
||||||
default "512M"
|
default "512M"
|
||||||
help
|
help
|
||||||
Create a disk image of this size. A K/M/G suffix may be used
|
Create a disk image of this size. Suffixes like K/M/G may be
|
||||||
to multiply by powers of 1024. Suffixes like KB/MB/GB may be
|
used to multiply by powers of 1024. Suffixes like KB/MB/GB may
|
||||||
used to multiply by powers of 1000. The image will be split
|
be used to multiply by powers of 1000.
|
||||||
proportionally to fit the two rootfs, a kernel, a writable
|
|
||||||
/cfg and /var partiotions.
|
|
||||||
|
|
||||||
Minimum supported size is 512M.
|
Minimum supported size is 512M.
|
||||||
|
|
||||||
choice
|
config GNS3_APPLIANCE
|
||||||
prompt "Bootloader"
|
|
||||||
depends on DISK_IMAGE
|
|
||||||
default DISK_IMAGE_BOOT_EFI if BR2_x86_64
|
|
||||||
default DISK_IMAGE_BOOT_NONE
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_NONE
|
|
||||||
bool "None"
|
|
||||||
help
|
|
||||||
Do not create any bootloader partition in the disk image.
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_EFI
|
|
||||||
bool "EFI"
|
|
||||||
help
|
|
||||||
Create a boot partition from a directory containing an EFI
|
|
||||||
boot application, e.g. GRUB.
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_BIN
|
|
||||||
bool "Binary"
|
|
||||||
help
|
|
||||||
Create a boot partition from a raw image containing the boot
|
|
||||||
application, e.g. U-Boot.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_DATA
|
|
||||||
string "Bootloader data"
|
|
||||||
depends on DISK_IMAGE
|
|
||||||
depends on DISK_IMAGE_BOOT_EFI || DISK_IMAGE_BOOT_BIN
|
|
||||||
default "${BINARIES_DIR}/efi-part/EFI" if BR2_x86_64
|
|
||||||
help
|
|
||||||
Path to the directory or file holding the bootloader data.
|
|
||||||
|
|
||||||
config DISK_IMAGE_BOOT_OFFSET
|
|
||||||
hex "Bootloader offset"
|
|
||||||
depends on DISK_IMAGE
|
|
||||||
depends on DISK_IMAGE_BOOT_EFI || DISK_IMAGE_BOOT_BIN
|
|
||||||
default 0x8000
|
|
||||||
help
|
|
||||||
Offset at which the bootloader partition is placed. Remember
|
|
||||||
to make sure that the GPT still fits at the start of the
|
|
||||||
image.
|
|
||||||
|
|
||||||
config DISK_IMAGE_RELEASE_URL
|
|
||||||
string "Infix URL"
|
|
||||||
depends on DISK_IMAGE
|
|
||||||
depends on !BR2_TARGET_ROOTFS_SQUASHFS
|
|
||||||
default "https://github.com/kernelkit/infix/releases/download/latest/infix-${BR2_ARCH}.tar.gz"
|
|
||||||
help
|
|
||||||
In situations where Infix itself is not being built, but a
|
|
||||||
disk image is, i.e. when building a bootloader: place this
|
|
||||||
Infix release in the primary and secondary partitions.
|
|
||||||
|
|
||||||
menuconfig GNS3_APPLIANCE
|
|
||||||
bool "GNS3 Appliance"
|
bool "GNS3 Appliance"
|
||||||
select DISK_IMAGE
|
select DISK_IMAGE
|
||||||
default y
|
default y if BR2_x86_64
|
||||||
help
|
help
|
||||||
Create a GNS3 appliance description that, together with the
|
Create a GNS3 appliance description that, together with the
|
||||||
disk image, can be imported into GNS3.
|
disk image, can be imported into GNS3.
|
||||||
|
|
||||||
config GNS3_APPLIANCE_RAM
|
|
||||||
int "Reserved RAM (MiB)"
|
|
||||||
depends on GNS3_APPLIANCE
|
|
||||||
default "192"
|
|
||||||
help
|
|
||||||
Amount of host RAM reserved for an appliance instance.
|
|
||||||
|
|
||||||
Minimum supported size is 192M.
|
|
||||||
|
|
||||||
config GNS3_APPLIANCE_IFNUM
|
|
||||||
int "Number of interfaces"
|
|
||||||
depends on GNS3_APPLIANCE
|
|
||||||
default "1"
|
|
||||||
help
|
|
||||||
Number of Ethernet interfaces to create for an appliance instance.
|
|
||||||
|
|
||||||
menuconfig FIT_IMAGE
|
menuconfig FIT_IMAGE
|
||||||
bool "Traditional FIT image"
|
bool "Traditional FIT image"
|
||||||
help
|
help
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Automatically generated make config: don't edit
|
# Automatically generated make config: don't edit
|
||||||
# Busybox version: 1.36.0
|
# Busybox version: 1.35.0
|
||||||
# Tue Oct 3 18:00:40 2023
|
# Mon Dec 12 13:47:01 2022
|
||||||
#
|
#
|
||||||
CONFIG_HAVE_DOT_CONFIG=y
|
CONFIG_HAVE_DOT_CONFIG=y
|
||||||
|
|
||||||
@@ -93,9 +93,6 @@ CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
|
|||||||
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
|
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
|
||||||
CONFIG_PASSWORD_MINLEN=6
|
CONFIG_PASSWORD_MINLEN=6
|
||||||
CONFIG_MD5_SMALL=1
|
CONFIG_MD5_SMALL=1
|
||||||
CONFIG_SHA1_SMALL=3
|
|
||||||
CONFIG_SHA1_HWACCEL=y
|
|
||||||
CONFIG_SHA256_HWACCEL=y
|
|
||||||
CONFIG_SHA3_SMALL=1
|
CONFIG_SHA3_SMALL=1
|
||||||
CONFIG_FEATURE_NON_POSIX_CP=y
|
CONFIG_FEATURE_NON_POSIX_CP=y
|
||||||
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
|
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
|
||||||
@@ -126,9 +123,6 @@ CONFIG_LAST_SUPPORTED_WCHAR=0
|
|||||||
# CONFIG_UNICODE_BIDI_SUPPORT is not set
|
# CONFIG_UNICODE_BIDI_SUPPORT is not set
|
||||||
# CONFIG_UNICODE_NEUTRAL_TABLE is not set
|
# CONFIG_UNICODE_NEUTRAL_TABLE is not set
|
||||||
# CONFIG_UNICODE_PRESERVE_BROKEN is not set
|
# CONFIG_UNICODE_PRESERVE_BROKEN is not set
|
||||||
# CONFIG_LOOP_CONFIGURE is not set
|
|
||||||
# CONFIG_NO_LOOP_CONFIGURE is not set
|
|
||||||
CONFIG_TRY_LOOP_CONFIGURE=y
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Applets
|
# Applets
|
||||||
@@ -344,7 +338,6 @@ CONFIG_FEATURE_TR_CLASSES=y
|
|||||||
CONFIG_FEATURE_TR_EQUIV=y
|
CONFIG_FEATURE_TR_EQUIV=y
|
||||||
CONFIG_TRUE=y
|
CONFIG_TRUE=y
|
||||||
CONFIG_TRUNCATE=y
|
CONFIG_TRUNCATE=y
|
||||||
CONFIG_TSORT=y
|
|
||||||
CONFIG_TTY=y
|
CONFIG_TTY=y
|
||||||
CONFIG_UNAME=y
|
CONFIG_UNAME=y
|
||||||
CONFIG_UNAME_OSNAME="GNU/Linux"
|
CONFIG_UNAME_OSNAME="GNU/Linux"
|
||||||
@@ -533,13 +526,13 @@ CONFIG_USE_BB_CRYPT_SHA=y
|
|||||||
CONFIG_ADDGROUP=y
|
CONFIG_ADDGROUP=y
|
||||||
CONFIG_FEATURE_ADDUSER_TO_GROUP=y
|
CONFIG_FEATURE_ADDUSER_TO_GROUP=y
|
||||||
CONFIG_ADDUSER=y
|
CONFIG_ADDUSER=y
|
||||||
CONFIG_FEATURE_CHECK_NAMES=y
|
# CONFIG_FEATURE_CHECK_NAMES is not set
|
||||||
CONFIG_LAST_ID=60000
|
CONFIG_LAST_ID=60000
|
||||||
CONFIG_FIRST_SYSTEM_ID=100
|
CONFIG_FIRST_SYSTEM_ID=100
|
||||||
CONFIG_LAST_SYSTEM_ID=999
|
CONFIG_LAST_SYSTEM_ID=999
|
||||||
# CONFIG_CHPASSWD is not set
|
# CONFIG_CHPASSWD is not set
|
||||||
CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="sha512"
|
CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="md5"
|
||||||
CONFIG_CRYPTPW=y
|
# CONFIG_CRYPTPW is not set
|
||||||
CONFIG_MKPASSWD=y
|
CONFIG_MKPASSWD=y
|
||||||
CONFIG_DELUSER=y
|
CONFIG_DELUSER=y
|
||||||
CONFIG_DELGROUP=y
|
CONFIG_DELGROUP=y
|
||||||
@@ -556,7 +549,7 @@ CONFIG_SU=y
|
|||||||
CONFIG_FEATURE_SU_SYSLOG=y
|
CONFIG_FEATURE_SU_SYSLOG=y
|
||||||
CONFIG_FEATURE_SU_CHECKS_SHELLS=y
|
CONFIG_FEATURE_SU_CHECKS_SHELLS=y
|
||||||
# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set
|
# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set
|
||||||
# CONFIG_SULOGIN is not set
|
CONFIG_SULOGIN=y
|
||||||
CONFIG_VLOCK=y
|
CONFIG_VLOCK=y
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -838,12 +831,10 @@ CONFIG_READAHEAD=y
|
|||||||
CONFIG_RFKILL=y
|
CONFIG_RFKILL=y
|
||||||
CONFIG_RUNLEVEL=y
|
CONFIG_RUNLEVEL=y
|
||||||
CONFIG_RX=y
|
CONFIG_RX=y
|
||||||
CONFIG_SEEDRNG=y
|
|
||||||
CONFIG_SETFATTR=y
|
CONFIG_SETFATTR=y
|
||||||
CONFIG_SETSERIAL=y
|
CONFIG_SETSERIAL=y
|
||||||
CONFIG_STRINGS=y
|
CONFIG_STRINGS=y
|
||||||
CONFIG_TIME=y
|
CONFIG_TIME=y
|
||||||
CONFIG_TREE=y
|
|
||||||
CONFIG_TS=y
|
CONFIG_TS=y
|
||||||
CONFIG_TTYSIZE=y
|
CONFIG_TTYSIZE=y
|
||||||
CONFIG_UBIATTACH=y
|
CONFIG_UBIATTACH=y
|
||||||
@@ -1016,7 +1007,6 @@ CONFIG_UDHCPC=y
|
|||||||
CONFIG_FEATURE_UDHCPC_ARPING=y
|
CONFIG_FEATURE_UDHCPC_ARPING=y
|
||||||
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
|
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
|
||||||
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
|
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
|
||||||
CONFIG_UDHCPC6_DEFAULT_SCRIPT="/usr/share/udhcpc/default6.script"
|
|
||||||
CONFIG_UDHCPC6=y
|
CONFIG_UDHCPC6=y
|
||||||
CONFIG_FEATURE_UDHCPC6_RFC3646=y
|
CONFIG_FEATURE_UDHCPC6_RFC3646=y
|
||||||
CONFIG_FEATURE_UDHCPC6_RFC4704=y
|
CONFIG_FEATURE_UDHCPC6_RFC4704=y
|
||||||
@@ -1151,7 +1141,6 @@ CONFIG_ASH_IDLE_TIMEOUT=y
|
|||||||
CONFIG_ASH_ECHO=y
|
CONFIG_ASH_ECHO=y
|
||||||
CONFIG_ASH_PRINTF=y
|
CONFIG_ASH_PRINTF=y
|
||||||
CONFIG_ASH_TEST=y
|
CONFIG_ASH_TEST=y
|
||||||
CONFIG_ASH_SLEEP=y
|
|
||||||
CONFIG_ASH_HELP=y
|
CONFIG_ASH_HELP=y
|
||||||
CONFIG_ASH_GETOPTS=y
|
CONFIG_ASH_GETOPTS=y
|
||||||
CONFIG_ASH_CMDCMD=y
|
CONFIG_ASH_CMDCMD=y
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ image var.ext4 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
image @DISKIMG@ {
|
image disk.img {
|
||||||
size = @TOTALSIZE@
|
size = @TOTALSIZE@
|
||||||
hdimage {
|
hdimage {
|
||||||
partition-table-type = "gpt"
|
partition-table-type = "gpt"
|
||||||
|
|||||||
+4
-13
@@ -9,20 +9,11 @@ die()
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find all matching key=value assignments in output/.config
|
|
||||||
# E.g., load_cfg DISK_IMAGE sets the following variables:
|
|
||||||
#
|
|
||||||
# DISK_IMAGE=y
|
|
||||||
# DISK_IMAGE_SIZE="512"
|
|
||||||
# etc.
|
|
||||||
#
|
|
||||||
# shellcheck disable=SC1090
|
|
||||||
load_cfg()
|
load_cfg()
|
||||||
{
|
{
|
||||||
tmp=$(mktemp -p /tmp)
|
local tmp=$(mktemp -p /tmp)
|
||||||
|
|
||||||
grep -E "${1}.*=" "$BR2_CONFIG" >"$tmp"
|
grep "$1" $BR2_CONFIG >$tmp
|
||||||
. "$tmp"
|
. $tmp
|
||||||
|
rm $tmp
|
||||||
rm "$tmp"
|
|
||||||
}
|
}
|
||||||
|
|||||||
+21
-44
@@ -17,6 +17,7 @@ size2int()
|
|||||||
|
|
||||||
dimension()
|
dimension()
|
||||||
{
|
{
|
||||||
|
|
||||||
if [ $total -ge $((4 << G)) ]; then
|
if [ $total -ge $((4 << G)) ]; then
|
||||||
bootsize=$(( 8 << M))
|
bootsize=$(( 8 << M))
|
||||||
auxsize=$(( 8 << M))
|
auxsize=$(( 8 << M))
|
||||||
@@ -30,14 +31,14 @@ dimension()
|
|||||||
cfgsize=$((256 << M))
|
cfgsize=$((256 << M))
|
||||||
# var is at least ~1.75G
|
# var is at least ~1.75G
|
||||||
elif [ $total -ge $((1 << G)) ]; then
|
elif [ $total -ge $((1 << G)) ]; then
|
||||||
bootsize=$(( 8 << M))
|
bootsize=$(( 4 << M))
|
||||||
auxsize=$(( 8 << M))
|
auxsize=$(( 4 << M))
|
||||||
imgsize=$((256 << M))
|
imgsize=$((256 << M))
|
||||||
cfgsize=$(( 64 << M))
|
cfgsize=$(( 64 << M))
|
||||||
# var is at least ~0.5G
|
# var is at least ~0.5G
|
||||||
elif [ $total -ge $((512 << M)) ]; then
|
elif [ $total -ge $((512 << M)) ]; then
|
||||||
bootsize=$(( 8 << M))
|
bootsize=$(( 4 << M))
|
||||||
auxsize=$(( 8 << M))
|
auxsize=$(( 4 << M))
|
||||||
imgsize=$((192 << M))
|
imgsize=$((192 << M))
|
||||||
cfgsize=$(( 16 << M))
|
cfgsize=$(( 16 << M))
|
||||||
# var is at least ~100M
|
# var is at least ~100M
|
||||||
@@ -80,7 +81,7 @@ probeboot()
|
|||||||
|
|
||||||
genboot()
|
genboot()
|
||||||
{
|
{
|
||||||
if [ -d "$bootdata" ]; then
|
if [ -d $BINARIES_DIR/efi-part/EFI ]; then
|
||||||
bootimg=$(cat <<EOF
|
bootimg=$(cat <<EOF
|
||||||
image efi-part.vfat {
|
image efi-part.vfat {
|
||||||
size = $bootsize
|
size = $bootsize
|
||||||
@@ -102,17 +103,6 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
elif [ -f "$bootdata" ]; then
|
|
||||||
bootpart=$(cat <<EOF
|
|
||||||
partition boot {
|
|
||||||
offset = $bootoffs
|
|
||||||
partition-type-uuid = U
|
|
||||||
bootable = true
|
|
||||||
image = $bootdata
|
|
||||||
size = $bootsize
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,26 +111,15 @@ root=$BUILD_DIR/genimage.root
|
|||||||
tmp=$BUILD_DIR/genimage.tmp
|
tmp=$BUILD_DIR/genimage.tmp
|
||||||
|
|
||||||
total=$((512 << M))
|
total=$((512 << M))
|
||||||
bootoffs=$((32 << K))
|
bootoffs=
|
||||||
bootdata=
|
|
||||||
diskimg=disk.img
|
|
||||||
bootimg=
|
bootimg=
|
||||||
bootpart=
|
bootpart=
|
||||||
|
|
||||||
while getopts "a:b:B:n:s:" opt; do
|
while getopts "a:s:" opt; do
|
||||||
case ${opt} in
|
case ${opt} in
|
||||||
a)
|
a)
|
||||||
arch=$OPTARG
|
arch=$OPTARG
|
||||||
;;
|
;;
|
||||||
b)
|
|
||||||
bootdata=$OPTARG
|
|
||||||
;;
|
|
||||||
B)
|
|
||||||
bootoffs=$(($OPTARG))
|
|
||||||
;;
|
|
||||||
n)
|
|
||||||
diskimg=${OPTARG}
|
|
||||||
;;
|
|
||||||
s)
|
s)
|
||||||
total=$(size2int $OPTARG)
|
total=$(size2int $OPTARG)
|
||||||
;;
|
;;
|
||||||
@@ -162,7 +141,6 @@ awk \
|
|||||||
-vimgsize=$imgsize \
|
-vimgsize=$imgsize \
|
||||||
-vcfgsize=$cfgsize \
|
-vcfgsize=$cfgsize \
|
||||||
-vvarsize=$varsize \
|
-vvarsize=$varsize \
|
||||||
-vdiskimg=$diskimg \
|
|
||||||
-vbootimg="$bootimg" -vbootpart="$bootpart" \
|
-vbootimg="$bootimg" -vbootpart="$bootpart" \
|
||||||
'{
|
'{
|
||||||
sub(/@TOTALSIZE@/, total);
|
sub(/@TOTALSIZE@/, total);
|
||||||
@@ -171,7 +149,7 @@ awk \
|
|||||||
sub(/@IMGSIZE@/, imgsize);
|
sub(/@IMGSIZE@/, imgsize);
|
||||||
sub(/@CFGSIZE@/, cfgsize);
|
sub(/@CFGSIZE@/, cfgsize);
|
||||||
sub(/@VARSIZE@/, varsize);
|
sub(/@VARSIZE@/, varsize);
|
||||||
sub(/@DISKIMG@/, diskimg);
|
|
||||||
sub(/@BOOTIMG@/, bootimg);
|
sub(/@BOOTIMG@/, bootimg);
|
||||||
sub(/@BOOTPART@/, bootpart);
|
sub(/@BOOTPART@/, bootpart);
|
||||||
}1' \
|
}1' \
|
||||||
@@ -180,28 +158,27 @@ awk \
|
|||||||
mkdir -p $root/aux
|
mkdir -p $root/aux
|
||||||
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/primary.itbh
|
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/primary.itbh
|
||||||
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/secondary.itbh
|
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/secondary.itbh
|
||||||
cp -f $BINARIES_DIR/rauc.status $root/aux/rauc.status
|
|
||||||
|
|
||||||
case "$arch" in
|
case "$arch" in
|
||||||
aarch64)
|
aarch64)
|
||||||
mkenvimage -s 0x4000 -o "$root/aux/uboot.env" \
|
mkenvimage -s 0x4000 -o $root/aux/uboot.env \
|
||||||
"$BR2_EXTERNAL_INFIX_PATH/board/common/uboot/aux-env.txt"
|
$BR2_EXTERNAL_INFIX_PATH/board/common/uboot/aux-env.txt
|
||||||
;;
|
;;
|
||||||
x86_64)
|
x86_64)
|
||||||
mkdir -p "$root/aux/grub"
|
mkdir -p $root/aux/grub
|
||||||
cp -f "$BR2_EXTERNAL_INFIX_PATH/board/$arch/grub.cfg" \
|
cp -f $BR2_EXTERNAL_INFIX_PATH/board/amd64/grub.cfg \
|
||||||
"$BR2_EXTERNAL_INFIX_PATH/board/$arch/grubenv" \
|
$BR2_EXTERNAL_INFIX_PATH/board/amd64/grubenv \
|
||||||
"$root/aux/grub/"
|
$root/aux/grub/
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
rm -rf "$tmp"
|
rm -rf $tmp
|
||||||
|
|
||||||
genimage \
|
genimage \
|
||||||
--rootpath "$root" \
|
--rootpath $root \
|
||||||
--tmppath "$tmp" \
|
--tmppath $tmp \
|
||||||
--inputpath "$BINARIES_DIR" \
|
--inputpath $BINARIES_DIR \
|
||||||
--outputpath "$BINARIES_DIR" \
|
--outputpath $BINARIES_DIR \
|
||||||
--config "$root/genimage.cfg"
|
--config $root/genimage.cfg
|
||||||
|
|||||||
+2
-12
@@ -18,22 +18,12 @@ load_cfg()
|
|||||||
load_cfg
|
load_cfg
|
||||||
[ "$FIT_IMAGE" = "y" ] || exit 0
|
[ "$FIT_IMAGE" = "y" ] || exit 0
|
||||||
|
|
||||||
work=$BUILD_DIR/fit-image-local
|
work=$(pwd)/build/fit-image-local
|
||||||
dtbs=$(find $BINARIES_DIR -name '*.dtb')
|
dtbs=$(find $BINARIES_DIR -name '*.dtb')
|
||||||
kernel=$(find $BINARIES_DIR -name '*Image' | head -n1)
|
kernel=$(find $BINARIES_DIR -name '*Image' | head -n1)
|
||||||
squash=$BINARIES_DIR/rootfs.squashfs
|
squash=$BINARIES_DIR/rootfs.squashfs
|
||||||
|
|
||||||
mkdir -p $work
|
mkdir -p $work
|
||||||
gzip <$kernel >$work/Image.gz
|
|
||||||
kernel=$work/Image.gz
|
|
||||||
|
|
||||||
rm -rf $work/rootfs
|
|
||||||
unsquashfs -f -d $work/rootfs $squash
|
|
||||||
rm -f $work/rootfs/boot/*Image
|
|
||||||
|
|
||||||
squash=$work/rootfs-no-kernel.squashfs
|
|
||||||
rm -f $squash
|
|
||||||
mksquashfs $work/rootfs $squash
|
|
||||||
|
|
||||||
# mkimage will only align images to 4 bytes, but U-Boot will leave
|
# mkimage will only align images to 4 bytes, but U-Boot will leave
|
||||||
# both DTB and ramdisk in place when starting the kernel. So we pad
|
# both DTB and ramdisk in place when starting the kernel. So we pad
|
||||||
@@ -89,7 +79,7 @@ cat <<EOF >$work/infix.its
|
|||||||
arch = "$FIT_ARCH";
|
arch = "$FIT_ARCH";
|
||||||
os = "linux";
|
os = "linux";
|
||||||
$(cat $work/kernel-load.itsi)
|
$(cat $work/kernel-load.itsi)
|
||||||
compression = "gzip";
|
compression = "none";
|
||||||
data = /incbin/("$kernel");
|
data = /incbin/("$kernel");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+21
-72
@@ -1,92 +1,41 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. "$TARGET_DIR/etc/os-release"
|
|
||||||
|
|
||||||
if [ -n "$INFIX_RELEASE" ]; then
|
cat <<EOF >"$BINARIES_DIR/infix.gns3a"
|
||||||
rel="-${INFIX_RELEASE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ARCH=$1
|
|
||||||
NM="${2:-custom}${rel}"
|
|
||||||
DISK=$3
|
|
||||||
RAM=${4:-512}
|
|
||||||
IFNUM=${5:-1}
|
|
||||||
|
|
||||||
# The aarch64 build currently has no "loader" but instead starts Linux
|
|
||||||
# directly, so we need to add a basic cmdline.
|
|
||||||
loader_args()
|
|
||||||
{
|
{
|
||||||
if [ "$ARCH" = "aarch64" ]; then
|
"name": "infix",
|
||||||
cat <<EOF
|
|
||||||
"kernel_command_line": "console=ttyAMA0 root=PARTLABEL=primary quiet",
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
loader_img()
|
|
||||||
{
|
|
||||||
if [ "$ARCH" = "x86_64" ]; then
|
|
||||||
cat <<EOF
|
|
||||||
"bios_image": "$loader",
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
cat <<EOF
|
|
||||||
"kernel_image": "$loader",
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$ARCH" = "x86_64" ]; then
|
|
||||||
loader=OVMF.fd
|
|
||||||
accel=allow
|
|
||||||
opts=
|
|
||||||
else
|
|
||||||
loader=Image
|
|
||||||
accel=disable
|
|
||||||
opts="-M virt -cpu cortex-a72"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ">> Disk image MD5: $(md5sum "$BINARIES_DIR/$DISK" | awk '{print $1}')"
|
|
||||||
|
|
||||||
cat <<EOF >"$BINARIES_DIR/${NM}.gns3a"
|
|
||||||
{
|
|
||||||
"name": "$NM",
|
|
||||||
"category": "router",
|
"category": "router",
|
||||||
"description": "$INFIX_DESC",
|
"description": "Infix is a Network Operating System based on Linux. It can be set up both as a switch, with offloading using switchdev, and a router with firewalling.",
|
||||||
"vendor_name": "$VENDOR_NAME",
|
"vendor_name": "KernelKit",
|
||||||
"vendor_url": "$VENDOR_HOME",
|
"vendor_url": "https://github.com/kernelkit/",
|
||||||
"product_name": "$NAME",
|
"product_name": "Infix",
|
||||||
"registry_version": 6,
|
"registry_version": 6,
|
||||||
"status": "stable",
|
"status": "stable",
|
||||||
"maintainer": "$VENDOR_NAME",
|
"maintainer": "KernelKit",
|
||||||
"maintainer_email": "${SUPPORT_URL#mailto:}",
|
"maintainer_email": "kernelkit@googlegroups.com",
|
||||||
"usage": "Default login, user/pass: admin/admin\n\nType 'help' for an overview of commands and relevant configuration files.\n\nFor Classic builds the following applies: the /etc directory is writable, use the passwd tool after login as part of your set up.\nFor networking, classify interfaces as switchports with /etc/mactab, syntax: 'MAC-address eN', where N is the port number (1-MAX).\nTo set up bridging and management interfaces, use /etc/network/interfaces, and /etc/network/interfaces.d/",
|
"usage": "Default login is 'root', no password.\n\nType 'help' for an overview of commands and relevant configuration files.\n\nThe /etc directory is writable, use the passwd tool after login as part of your set up.\nFor networking, classify interfaces as switchports with /etc/mactab, syntax: 'MAC-address eN', where N is the port number (1-MAX).\nTo set up bridging and management interfaces, use /etc/network/interfaces, and /etc/network/interfaces.d/",
|
||||||
"port_name_format": "eth{0}",
|
"port_name_format": "eth{0}",
|
||||||
"linked_clone": true,
|
"linked_clone": true,
|
||||||
"qemu": {
|
"qemu": {
|
||||||
"adapter_type": "virtio-net-pci",
|
"adapter_type": "virtio-net-pci",
|
||||||
"adapters": ${IFNUM},
|
"adapters": 10,
|
||||||
"ram": ${RAM},
|
"ram": 512,
|
||||||
"cpus": 1,
|
"cpus": 1,
|
||||||
"hda_disk_interface": "virtio",
|
"hda_disk_interface": "virtio",
|
||||||
"arch": "$ARCH",
|
"arch": "x86_64",
|
||||||
"console_type": "telnet",
|
"console_type": "telnet",
|
||||||
$(loader_img)
|
"kvm": "allow"
|
||||||
$(loader_args)
|
|
||||||
"kvm": "$accel",
|
|
||||||
"options": "$opts"
|
|
||||||
},
|
},
|
||||||
"images": [
|
"images": [
|
||||||
{
|
{
|
||||||
"filename": "$loader",
|
"filename": "OVMF.fd",
|
||||||
"filesize": $(stat --printf='%s' "$BINARIES_DIR/$loader"),
|
"filesize": $(stat --printf='%s' "$BINARIES_DIR/OVMF.fd"),
|
||||||
"md5sum": "$(md5sum "$BINARIES_DIR/$loader" | awk '{print $1}')",
|
"md5sum": "$(md5sum "$BINARIES_DIR/OVMF.fd" | awk '{print $1}')",
|
||||||
"version": "0.0"
|
"version": "0.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename": "$DISK",
|
"filename": "disk.img",
|
||||||
"filesize": $(stat --printf='%s' "$BINARIES_DIR/$DISK"),
|
"filesize": $(stat --printf='%s' "$BINARIES_DIR/disk.img"),
|
||||||
"md5sum": "$(md5sum "$BINARIES_DIR/$DISK" | awk '{print $1}')",
|
"md5sum": "$(md5sum "$BINARIES_DIR/disk.img" | awk '{print $1}')",
|
||||||
"version": "0.0"
|
"version": "0.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -94,8 +43,8 @@ cat <<EOF >"$BINARIES_DIR/${NM}.gns3a"
|
|||||||
{
|
{
|
||||||
"name": "0.0",
|
"name": "0.0",
|
||||||
"images": {
|
"images": {
|
||||||
$(loader_img)
|
"bios_image": "OVMF.fd",
|
||||||
"hda_disk_image": "$DISK"
|
"hda_disk_image": "disk.img"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Bootstrap a RAUC status file showing the newly created image
|
|
||||||
# installed to both the primary and secondary slots. This then bundled
|
|
||||||
# in the aux partition in mkdisk.sh, so that RAUC (on the target) can
|
|
||||||
# always report the installed versions.
|
|
||||||
rauc info --no-verify --output-format=shell $1 >/tmp/rauc-$$.info
|
|
||||||
. /tmp/rauc-$$.info
|
|
||||||
rm /tmp/rauc-$$.info
|
|
||||||
tstamp=$(date -u +%FT%TZ)
|
|
||||||
cat <<EOF
|
|
||||||
[slot.rootfs.0]
|
|
||||||
bundle.compatible=$RAUC_MF_COMPATIBLE
|
|
||||||
bundle.version=$RAUC_MF_VERSION
|
|
||||||
status=ok
|
|
||||||
sha256=$RAUC_IMAGE_DIGEST_0
|
|
||||||
size=$RAUC_IMAGE_SIZE_0
|
|
||||||
installed.timestamp=$tstamp
|
|
||||||
installed.count=1
|
|
||||||
activated.timestamp=$tstamp
|
|
||||||
activated.count=1
|
|
||||||
|
|
||||||
[slot.rootfs.1]
|
|
||||||
bundle.compatible=$RAUC_MF_COMPATIBLE
|
|
||||||
bundle.version=$RAUC_MF_VERSION
|
|
||||||
status=ok
|
|
||||||
sha256=$RAUC_IMAGE_DIGEST_0
|
|
||||||
size=$RAUC_IMAGE_SIZE_0
|
|
||||||
installed.timestamp=$tstamp
|
|
||||||
installed.count=1
|
|
||||||
activated.timestamp=$tstamp
|
|
||||||
activated.count=1
|
|
||||||
EOF
|
|
||||||
@@ -4,9 +4,8 @@ set -e
|
|||||||
|
|
||||||
GIT_VERSION=$(git -C $BR2_EXTERNAL_INFIX_PATH describe --always --dirty --tags)
|
GIT_VERSION=$(git -C $BR2_EXTERNAL_INFIX_PATH describe --always --dirty --tags)
|
||||||
|
|
||||||
name=$1
|
arch=$1
|
||||||
arch=$2
|
sign=$2
|
||||||
sign=$3
|
|
||||||
|
|
||||||
crt=$(ls $sign/*.crt)
|
crt=$(ls $sign/*.crt)
|
||||||
key=$(ls $sign/*.key)
|
key=$(ls $sign/*.key)
|
||||||
@@ -39,7 +38,7 @@ filename=rootfs.img
|
|||||||
hooks=post-install
|
hooks=post-install
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
rm -f $BINARIES_DIR/$name.pkg
|
rm -f $BINARIES_DIR/infix-$arch.pkg
|
||||||
|
|
||||||
rauc --cert=$crt --key=$key \
|
rauc --cert=$crt --key=$key \
|
||||||
bundle $work $BINARIES_DIR/$name.pkg
|
bundle $work $BINARIES_DIR/infix-$arch.pkg
|
||||||
|
|||||||
+10
-71
@@ -1,82 +1,21 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# shellcheck disable=SC1090,SC1091
|
|
||||||
. "$BR2_CONFIG" 2>/dev/null
|
|
||||||
. "$TARGET_DIR/usr/lib/os-release"
|
|
||||||
|
|
||||||
if [ -n "${ID_LIKE}" ]; then
|
GIT_VERSION=$(git -C $BR2_EXTERNAL_INFIX_PATH describe --always --dirty --tags)
|
||||||
ID="${ID} ${ID_LIKE}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$GIT_VERSION" ]; then
|
|
||||||
infix_path="$BR2_EXTERNAL_INFIX_PATH"
|
|
||||||
if [ -n "$INFIX_OEM_PATH" ]; then
|
|
||||||
# Use version from br2-external OEM:ing Infix
|
|
||||||
infix_path="$INFIX_OEM_PATH"
|
|
||||||
fi
|
|
||||||
GIT_VERSION=$(git -C "$infix_path" describe --always --dirty --tags)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Override VERSION in /etc/os-release and filenames for release builds
|
|
||||||
if [ -n "$INFIX_RELEASE" ]; then
|
|
||||||
VERSION="$INFIX_RELEASE"
|
|
||||||
else
|
|
||||||
VERSION=$GIT_VERSION
|
|
||||||
fi
|
|
||||||
|
|
||||||
# This is a symlink to /usr/lib/os-release, so we remove this to keep
|
# This is a symlink to /usr/lib/os-release, so we remove this to keep
|
||||||
# original Buildroot information.
|
# original Buildroot information.
|
||||||
rm -f "$TARGET_DIR/etc/os-release"
|
rm "$TARGET_DIR/etc/os-release"
|
||||||
{
|
{
|
||||||
echo "NAME=\"$INFIX_NAME\""
|
echo "NAME=\"Infix\""
|
||||||
echo "ID=$INFIX_ID"
|
echo "VERSION=${GIT_VERSION}"
|
||||||
echo "PRETTY_NAME=\"$INFIX_TAGLINE\""
|
echo "ID=infix"
|
||||||
echo "ID_LIKE=\"${ID}\""
|
echo "VERSION_ID=${GIT_VERSION}"
|
||||||
echo "VERSION=\"${VERSION}\""
|
echo "PRETTY_NAME=\"Infix by KernelKit\""
|
||||||
echo "VERSION_ID=${VERSION}"
|
echo "HOME_URL=https://github.com/KernelKit"
|
||||||
echo "BUILD_ID=\"${GIT_VERSION}\""
|
|
||||||
if [ -n "$INFIX_IMAGE_ID" ]; then
|
|
||||||
echo "IMAGE_ID=\"$INFIX_IMAGE_ID\""
|
|
||||||
fi
|
|
||||||
if [ -n "$INFIX_RELEASE" ]; then
|
|
||||||
echo "IMAGE_VERSION=\"$INFIX_RELEASE\""
|
|
||||||
fi
|
|
||||||
if [ "$INFIX_VARIANT_NETCONF" = "y" ]; then
|
|
||||||
echo "VARIANT=\"Managed NETCONF\""
|
|
||||||
echo "VARIANT_ID=netconf"
|
|
||||||
else
|
|
||||||
echo "VARIANT=\"Classic, writable /etc\""
|
|
||||||
echo "VARIANT_ID=classic"
|
|
||||||
fi
|
|
||||||
echo "ARCHITECTURE=\"${INFIX_ARCH}\""
|
|
||||||
echo "HOME_URL=$INFIX_HOME"
|
|
||||||
if [ -n "$INFIX_VENDOR" ]; then
|
|
||||||
echo "VENDOR_NAME=\"$INFIX_VENDOR\""
|
|
||||||
fi
|
|
||||||
if [ -n "$INFIX_VENDOR_HOME" ]; then
|
|
||||||
echo "VENDOR_HOME=\"$INFIX_VENDOR_HOME\""
|
|
||||||
fi
|
|
||||||
if [ -n "$INFIX_DOC" ]; then
|
|
||||||
echo "DOCUMENTATION_URL=\"$INFIX_DOC\""
|
|
||||||
fi
|
|
||||||
if [ -n "$INFIX_SUPPORT" ]; then
|
|
||||||
echo "SUPPORT_URL=\"$INFIX_SUPPORT\""
|
|
||||||
fi
|
|
||||||
if [ -n "$INFIX_DESC" ]; then
|
|
||||||
echo "INFIX_DESC=\"$INFIX_DESC\""
|
|
||||||
fi
|
|
||||||
} > "$TARGET_DIR/etc/os-release"
|
} > "$TARGET_DIR/etc/os-release"
|
||||||
|
|
||||||
echo "$INFIX_TAGLINE $VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version"
|
echo "Infix by KernelKit $GIT_VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version"
|
||||||
|
|
||||||
# Allow pdmenu (setup) and bash to be login shells, bash is added
|
# Allow pdmenu (setup) to be a login shell
|
||||||
# automatically when selected in menuyconfig, but not when BusyBox
|
|
||||||
# provides a symlink (for ash). The /bin/{true,false} are old UNIX
|
|
||||||
# beart means of disabling a user.
|
|
||||||
grep -qsE '^/usr/bin/pdmenu$$' "$TARGET_DIR/etc/shells" \
|
grep -qsE '^/usr/bin/pdmenu$$' "$TARGET_DIR/etc/shells" \
|
||||||
|| echo "/usr/bin/pdmenu" >> "$TARGET_DIR/etc/shells"
|
|| echo "/usr/bin/pdmenu" >> "$TARGET_DIR/etc/shells"
|
||||||
grep -qsE '^/bin/bash$$' "$TARGET_DIR/etc/shells" \
|
|
||||||
|| echo "/bin/bash" >> "$TARGET_DIR/etc/shells"
|
|
||||||
grep -qsE '^/bin/true$$' "$TARGET_DIR/etc/shells" \
|
|
||||||
|| echo "/bin/true" >> "$TARGET_DIR/etc/shells"
|
|
||||||
grep -qsE '^/bin/false$$' "$TARGET_DIR/etc/shells" \
|
|
||||||
|| echo "/bin/false" >> "$TARGET_DIR/etc/shells"
|
|
||||||
|
|||||||
+10
-73
@@ -1,69 +1,29 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# shellcheck disable=SC2086
|
|
||||||
|
|
||||||
common=$(dirname "$(readlink -f "$0")")
|
common=$(dirname "$(readlink -f "$0")")
|
||||||
. "$common/lib.sh"
|
. $common/lib.sh
|
||||||
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. "$TARGET_DIR/etc/os-release"
|
|
||||||
|
|
||||||
load_cfg INFIX_ID
|
|
||||||
load_cfg BR2_ARCH
|
|
||||||
load_cfg BR2_DEFCONFIG
|
|
||||||
load_cfg BR2_EXTERNAL_INFIX_PATH
|
load_cfg BR2_EXTERNAL_INFIX_PATH
|
||||||
load_cfg BR2_TARGET_ROOTFS
|
|
||||||
if [ -n "$IMAGE_ID" ]; then
|
|
||||||
NAME="$IMAGE_ID"
|
|
||||||
else
|
|
||||||
NAME="$INFIX_ID"-$(echo "$BR2_ARCH" | tr _ - | sed 's/x86-64/x86_64/')
|
|
||||||
fi
|
|
||||||
diskimg=disk.img
|
|
||||||
|
|
||||||
ver()
|
load_cfg BR2_ARCH
|
||||||
{
|
load_cfg SIGN_KEY
|
||||||
if [ -n "$INFIX_RELEASE" ]; then
|
|
||||||
printf -- "-%s" "$INFIX_RELEASE"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
load_cfg SIGN_ENABLED
|
ixmsg "Signing SquashFS Image"
|
||||||
if [ "$SIGN_ENABLED" = "y" ]; then
|
$common/sign.sh $BR2_ARCH $SIGN_KEY
|
||||||
load_cfg BR2_ARCH
|
|
||||||
load_cfg SIGN_KEY
|
|
||||||
|
|
||||||
ixmsg "Signing SquashFS Image"
|
ixmsg "Creating RAUC Update Bundle"
|
||||||
$common/sign.sh $BR2_ARCH $SIGN_KEY
|
$common/mkrauc.sh $BR2_ARCH $SIGN_KEY
|
||||||
|
|
||||||
ixmsg "Creating RAUC Update Bundle"
|
|
||||||
$common/mkrauc.sh "$NAME$(ver)" $BR2_ARCH $SIGN_KEY
|
|
||||||
fi
|
|
||||||
|
|
||||||
load_cfg DISK_IMAGE
|
load_cfg DISK_IMAGE
|
||||||
if [ "$DISK_IMAGE" = "y" ]; then
|
if [ "$DISK_IMAGE" = "y" ]; then
|
||||||
ixmsg "Creating Disk Image"
|
ixmsg "Creating Disk Image"
|
||||||
diskimg="${NAME}-disk.img"
|
$common/mkdisk.sh -a $BR2_ARCH
|
||||||
bootcfg=
|
|
||||||
if [ "$DISK_IMAGE_BOOT_DATA" ]; then
|
|
||||||
bootcfg="-b $DISK_IMAGE_BOOT_DATA -B $DISK_IMAGE_BOOT_OFFSET"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$BR2_TARGET_ROOTFS_SQUASHFS" != "y" ] && \
|
|
||||||
[ ! -f "$BINARIES_DIR/rootfs.squashfs" ]; then
|
|
||||||
ixmsg " Injecting $DISK_IMAGE_RELEASE_URL"
|
|
||||||
archive="$BINARIES_DIR/$(basename $DISK_IMAGE_RELEASE_URL)"
|
|
||||||
[ -f "$archive" ] || wget -O"$archive" "$DISK_IMAGE_RELEASE_URL"
|
|
||||||
tar -xa --strip-components=1 -C "$BINARIES_DIR" -f "$archive"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$common/mkrauc-status.sh "$BINARIES_DIR/${NAME}.pkg" >"$BINARIES_DIR/rauc.status"
|
|
||||||
$common/mkdisk.sh -a $BR2_ARCH -n $diskimg -s $DISK_IMAGE_SIZE $bootcfg
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
load_cfg GNS3_APPLIANCE
|
load_cfg GNS3_APPLIANCE
|
||||||
if [ "$GNS3_APPLIANCE" = "y" ]; then
|
if [ "$GNS3_APPLIANCE" = "y" ]; then
|
||||||
ixmsg "Creating GNS3 Appliance, $GNS3_APPLIANCE_RAM MiB with $GNS3_APPLIANCE_IFNUM ports"
|
ixmsg "Creating GNS3 Appliance"
|
||||||
$common/mkgns3a.sh $BR2_ARCH $NAME $diskimg $GNS3_APPLIANCE_RAM $GNS3_APPLIANCE_IFNUM
|
$common/mkgns3a.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
load_cfg FIT_IMAGE
|
load_cfg FIT_IMAGE
|
||||||
@@ -71,26 +31,3 @@ if [ "$FIT_IMAGE" = "y" ]; then
|
|||||||
ixmsg "Creating Traditional FIT Image"
|
ixmsg "Creating Traditional FIT Image"
|
||||||
$common/mkfit.sh
|
$common/mkfit.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BR2_TARGET_ROOTFS_SQUASHFS" = "y" ]; then
|
|
||||||
if [ -z "${NAME##*minimal*}" ]; then
|
|
||||||
NAME=$(echo "$NAME" | sed 's/-minimal//')
|
|
||||||
fi
|
|
||||||
|
|
||||||
rel=$(ver)
|
|
||||||
ln -sf rootfs.squashfs "$BINARIES_DIR/${NAME}${rel}.img"
|
|
||||||
if [ -n "$rel" ]; then
|
|
||||||
ln -sf "$BINARIES_DIR/${NAME}${rel}.img" "$BINARIES_DIR/${NAME}.img"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Menuconfig support for modifying Qemu args in release tarballs
|
|
||||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/qemu.sh" "$BINARIES_DIR/"
|
|
||||||
sed -e "s/@ARCH@/QEMU_$BR2_ARCH/" \
|
|
||||||
-e "s/@DISK_IMG@/$diskimg/" \
|
|
||||||
< "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/Config.in.in" \
|
|
||||||
> "$BINARIES_DIR/Config.in"
|
|
||||||
rm -f "$BINARIES_DIR/qemu.cfg"
|
|
||||||
CONFIG_="CONFIG_" BR2_CONFIG="$BINARIES_DIR/qemu.cfg" \
|
|
||||||
"$O/build/buildroot-config/conf" --olddefconfig "$BINARIES_DIR/Config.in"
|
|
||||||
rm -f "$BINARIES_DIR/qemu.cfg.old" "$BINARIES_DIR/.config.old"
|
|
||||||
|
|||||||
@@ -1,326 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# This script can be used to start an Infix OS image in Qemu. It reads
|
|
||||||
# either a .config, generated from Config.in, or qemu.cfg from a release
|
|
||||||
# tarball, for the required configuration data.
|
|
||||||
#
|
|
||||||
# Debian/Ubuntu users can change the configuration post-release, install
|
|
||||||
# the kconfig-frontends package:
|
|
||||||
#
|
|
||||||
# sudo apt install kconfig-frontends
|
|
||||||
#
|
|
||||||
# and then call this script with:
|
|
||||||
#
|
|
||||||
# ./qemu.sh -c
|
|
||||||
#
|
|
||||||
# To bring up a menuconfig dialog. Select `Exit` and save the changes.
|
|
||||||
# For more help, see:_
|
|
||||||
#
|
|
||||||
# ./qemu.sh -h
|
|
||||||
#
|
|
||||||
|
|
||||||
# Local variables
|
|
||||||
prognm=$(basename "$0")
|
|
||||||
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
echo "usage: $prognm [opts]"
|
|
||||||
echo
|
|
||||||
echo " -c Run menuconfig to change Qemu settings"
|
|
||||||
echo " -h This help text"
|
|
||||||
echo
|
|
||||||
echo "Note: 'kconfig-frontends' package (Debian/Ubuntu) must be installed"
|
|
||||||
echo " for -c to work: sudo apt install kconfig-frontents"
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
die()
|
|
||||||
{
|
|
||||||
echo "$@" >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
load_qemucfg()
|
|
||||||
{
|
|
||||||
local tmp=$(mktemp -p /tmp)
|
|
||||||
|
|
||||||
grep ^CONFIG_QEMU_ $1 >$tmp
|
|
||||||
. $tmp
|
|
||||||
rm $tmp
|
|
||||||
|
|
||||||
[ "$CONFIG_QEMU_MACHINE" ] || die "Missing QEMU_MACHINE"
|
|
||||||
[ "$CONFIG_QEMU_ROOTFS" ] || die "Missing QEMU_ROOTFS"
|
|
||||||
|
|
||||||
[ "$CONFIG_QEMU_KERNEL" -a "$CONFIG_QEMU_BIOS" ] \
|
|
||||||
&& die "QEMU_KERNEL conflicts with QEMU_BIOS"
|
|
||||||
|
|
||||||
[ ! "$CONFIG_QEMU_KERNEL" -a ! "$CONFIG_QEMU_BIOS" ] \
|
|
||||||
&& die "QEMU_KERNEL or QEMU_BIOS must be set"
|
|
||||||
}
|
|
||||||
|
|
||||||
loader_args()
|
|
||||||
{
|
|
||||||
if [ "$CONFIG_QEMU_BIOS" ]; then
|
|
||||||
echo -n "-bios $CONFIG_QEMU_BIOS "
|
|
||||||
elif [ "$CONFIG_QEMU_KERNEL" ]; then
|
|
||||||
echo -n "-kernel $CONFIG_QEMU_KERNEL "
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
append_args()
|
|
||||||
{
|
|
||||||
if [ "$CONFIG_QEMU_CONSOLE_VIRTIO" ]; then
|
|
||||||
echo -n "console=hvc0 "
|
|
||||||
elif [ "$CONFIG_QEMU_x86_64" ]; then
|
|
||||||
echo -n "console=ttyS0 "
|
|
||||||
elif [ "$CONFIG_QEMU_aarch64" ]; then
|
|
||||||
echo -n "console=ttyAMA0 "
|
|
||||||
else
|
|
||||||
die "Unknown console"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$CONFIG_QEMU_ROOTFS_INITRD" = "y" ]; then
|
|
||||||
# Size of initrd, rounded up to nearest kb
|
|
||||||
local size=$((($(stat -c %s $CONFIG_QEMU_ROOTFS) + 1023) >> 10))
|
|
||||||
echo -n "root=/dev/ram0 ramdisk_size=${size} "
|
|
||||||
elif [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
|
||||||
echo -n "root=PARTLABEL=primary "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$V" != "1" ]; then
|
|
||||||
echo -n "quiet "
|
|
||||||
else
|
|
||||||
echo -n "debug "
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n "${QEMU_APPEND} ${QEMU_EXTRA_APPEND} "
|
|
||||||
}
|
|
||||||
|
|
||||||
rootfs_args()
|
|
||||||
{
|
|
||||||
if [ "$CONFIG_QEMU_ROOTFS_INITRD" = "y" ]; then
|
|
||||||
echo -n "-initrd $CONFIG_QEMU_ROOTFS "
|
|
||||||
elif [ "$CONFIG_QEMU_ROOTFS_MMC" = "y" ]; then
|
|
||||||
echo -n "-device sdhci-pci "
|
|
||||||
echo -n "-device sd-card,drive=mmc "
|
|
||||||
echo -n "-drive id=mmc,file=$CONFIG_QEMU_ROOTFS,if=none,format=raw "
|
|
||||||
elif [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
|
||||||
echo -n "-drive file=$CONFIG_QEMU_ROOTFS,if=virtio,format=raw,bus=0,unit=0 "
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
serial_args()
|
|
||||||
{
|
|
||||||
echo -n "-display none "
|
|
||||||
echo -n "-device virtio-serial "
|
|
||||||
|
|
||||||
echo -n "-chardev stdio,id=console0,mux=on "
|
|
||||||
echo -n "-mon chardev=console0 "
|
|
||||||
|
|
||||||
if [ "$CONFIG_QEMU_CONSOLE_VIRTIO" ]; then
|
|
||||||
echo -n "-device virtconsole,nr=0,name=console,chardev=console0 "
|
|
||||||
elif [ "$CONFIG_QEMU_CONSOLE_SERIAL" ]; then
|
|
||||||
echo -n "-serial chardev:console0 "
|
|
||||||
else
|
|
||||||
die "Unknown console"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n "-chardev socket,id=gdbserver,path=gdbserver.sock,server=on,wait=off "
|
|
||||||
echo -n "-device virtconsole,nr=1,name=gdbserver,chardev=gdbserver "
|
|
||||||
}
|
|
||||||
|
|
||||||
rw_args()
|
|
||||||
{
|
|
||||||
[ "$CONFIG_QEMU_RW" ] || return
|
|
||||||
|
|
||||||
if ! [ -f "$CONFIG_QEMU_RW" ]; then
|
|
||||||
dd if=/dev/zero of="$CONFIG_QEMU_RW" bs=16M count=1 >/dev/null 2>&1
|
|
||||||
mkfs.ext4 -L cfg "$CONFIG_QEMU_RW" >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n "-drive file=$CONFIG_QEMU_RW,if=virtio,format=raw,bus=0,unit=1 "
|
|
||||||
|
|
||||||
if [ "$CONFIG_QEMU_RW_VAR_OPT" ]; then
|
|
||||||
if ! [ -f "$CONFIG_QEMU_RW_VAR" ]; then
|
|
||||||
dd if=/dev/zero of="$CONFIG_QEMU_RW_VAR" bs=256M count=1 >/dev/null 2>&1
|
|
||||||
mkfs.ext4 -L var "$CONFIG_QEMU_RW_VAR" >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n "-drive file=$CONFIG_QEMU_RW_VAR,if=virtio,format=raw,bus=0,unit=2 "
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
host_args()
|
|
||||||
{
|
|
||||||
[ "$CONFIG_QEMU_HOST" ] || return
|
|
||||||
|
|
||||||
echo -n "-virtfs local,path=$CONFIG_QEMU_HOST,security_model=none,writeout=immediate,mount_tag=hostfs "
|
|
||||||
}
|
|
||||||
|
|
||||||
net_dev_args()
|
|
||||||
{
|
|
||||||
local name="e$1"
|
|
||||||
local mac=$(printf "02:00:00:00:00:%02x" $1)
|
|
||||||
|
|
||||||
echo -n "-device $CONFIG_QEMU_NET_MODEL,netdev=$name,mac=$mac "
|
|
||||||
echo "$name $mac" >>"$mactab"
|
|
||||||
}
|
|
||||||
|
|
||||||
net_args()
|
|
||||||
{
|
|
||||||
# Infix will pick up this file via fwcfg and install it to /etc
|
|
||||||
mactab=$(dirname "$CONFIG_QEMU_ROOTFS")/mactab
|
|
||||||
:> "$mactab"
|
|
||||||
echo -n "-fw_cfg name=opt/mactab,file=$mactab "
|
|
||||||
|
|
||||||
if [ "$CONFIG_QEMU_NET_BRIDGE" = "y" ]; then
|
|
||||||
echo -n "-netdev bridge,id=e0,br=$CONFIG_QEMU_NET_BRIDGE_DEV "
|
|
||||||
net_dev_args 0
|
|
||||||
elif [ "$CONFIG_QEMU_NET_TAP" = "y" ]; then
|
|
||||||
for i in $(seq 0 $(($CONFIG_QEMU_NET_TAP_N - 1))); do
|
|
||||||
echo -n "-netdev tap,id=e$i,ifname=qtap$i "
|
|
||||||
net_dev_args $i
|
|
||||||
done
|
|
||||||
elif [ "$CONFIG_QEMU_NET_USER" = "y" ]; then
|
|
||||||
local useropts=
|
|
||||||
[ "$CONFIG_QEMU_NET_USER_OPTS" ] && useropts=",$CONFIG_QEMU_NET_USER_OPTS"
|
|
||||||
|
|
||||||
echo -n "-netdev user,id=e0${useropts} "
|
|
||||||
net_dev_args 0
|
|
||||||
else
|
|
||||||
echo -n "-nic none"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
wdt_args()
|
|
||||||
{
|
|
||||||
echo -n "-device i6300esb -rtc clock=host"
|
|
||||||
}
|
|
||||||
|
|
||||||
run_qemu()
|
|
||||||
{
|
|
||||||
local qemu
|
|
||||||
read qemu <<EOF
|
|
||||||
$CONFIG_QEMU_MACHINE \
|
|
||||||
$(loader_args) \
|
|
||||||
$(rootfs_args) \
|
|
||||||
$(serial_args) \
|
|
||||||
$(rw_args) \
|
|
||||||
$(host_args) \
|
|
||||||
$(net_args) \
|
|
||||||
$(wdt_args) \
|
|
||||||
$CONFIG_QEMU_EXTRA
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ "$CONFIG_QEMU_KERNEL" ]; then
|
|
||||||
$qemu -append "$(append_args)" "$@"
|
|
||||||
else
|
|
||||||
$qemu "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
dtb_args()
|
|
||||||
{
|
|
||||||
[ "$CONFIG_QEMU_LOADER_UBOOT" ] || return
|
|
||||||
|
|
||||||
if [ "$CONFIG_QEMU_DTB_EXTEND" ]; then
|
|
||||||
# On the current architecture, QEMU will generate an internal
|
|
||||||
# DT based on the system configuration.
|
|
||||||
|
|
||||||
# So we extract a copy of that
|
|
||||||
run_qemu -M dumpdtb=qemu.dtb >/dev/null 2>&1
|
|
||||||
|
|
||||||
# Extend it with the environment and signing information in
|
|
||||||
# u-boot.dtb.
|
|
||||||
echo "qemu.dtb u-boot.dtb" | \
|
|
||||||
xargs -n 1 dtc -I dtb -O dts | \
|
|
||||||
{ echo "/dts-v1/;"; sed -e 's:/dts-v[0-9]\+/;::'; } | \
|
|
||||||
dtc >qemu-extended.dtb 2>/dev/null
|
|
||||||
|
|
||||||
# And use the combined result to start the instance
|
|
||||||
echo -n "-dtb qemu-extended.dtb "
|
|
||||||
else
|
|
||||||
# Otherwise we just use the unmodified one
|
|
||||||
echo -n "-dtb u-boot.dtb "
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
generate_dot()
|
|
||||||
{
|
|
||||||
[ "$CONFIG_QEMU_NET_TAP" = "y" ] || return
|
|
||||||
|
|
||||||
hostports="<qtap0> qtap0"
|
|
||||||
targetports="<e0> e0"
|
|
||||||
edges="host:qtap0 -- target:e0 [kind=mgmt];"
|
|
||||||
for tap in $(seq 1 $(($CONFIG_QEMU_NET_TAP_N - 1))); do
|
|
||||||
hostports="$hostports | <qtap$tap> qtap$tap "
|
|
||||||
targetports="$targetports | <e$tap> e$tap "
|
|
||||||
edges="$edges host:qtap$tap -- target:e$tap;"
|
|
||||||
done
|
|
||||||
cat >qemu.dot <<EOF
|
|
||||||
graph "qemu" {
|
|
||||||
layout="neato";
|
|
||||||
overlap="false";
|
|
||||||
esep="+20";
|
|
||||||
|
|
||||||
node [shape=record, fontname="monospace"];
|
|
||||||
edge [color="cornflowerblue", penwidth="2"];
|
|
||||||
|
|
||||||
host [
|
|
||||||
label="host | { $hostports }"
|
|
||||||
pos="0,0!",
|
|
||||||
|
|
||||||
kind="controller",
|
|
||||||
];
|
|
||||||
|
|
||||||
target [
|
|
||||||
label="{ $targetports } | target",
|
|
||||||
pos="10,0!",
|
|
||||||
|
|
||||||
kind="infix",
|
|
||||||
];
|
|
||||||
|
|
||||||
$edges
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
menuconfig()
|
|
||||||
{
|
|
||||||
grep -q QEMU_MACHINE Config.in || die "$prognm: must be run from the output/images directory"
|
|
||||||
command -v kconfig-mconf >/dev/null || die "$prognm: cannot find kconfig-mconf for menuconfig"
|
|
||||||
exec kconfig-mconf Config.in
|
|
||||||
}
|
|
||||||
|
|
||||||
cd $(dirname $(readlink -f "$0"))
|
|
||||||
|
|
||||||
while [ "$1" != "" ]; do
|
|
||||||
case $1 in
|
|
||||||
-c)
|
|
||||||
menuconfig
|
|
||||||
;;
|
|
||||||
-h)
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
break
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -f .config ]; then
|
|
||||||
# Customized settings from 'qemu.sh -c'
|
|
||||||
load_qemucfg .config
|
|
||||||
else
|
|
||||||
# Shipped defaults from release tarball
|
|
||||||
load_qemucfg qemu.cfg
|
|
||||||
fi
|
|
||||||
|
|
||||||
generate_dot
|
|
||||||
|
|
||||||
echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor"
|
|
||||||
line=$(stty -g)
|
|
||||||
stty raw
|
|
||||||
run_qemu $(dtb_args)
|
|
||||||
stty "$line"
|
|
||||||
|
|
||||||
Executable
+116
@@ -0,0 +1,116 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
mode=/mnt/cfg/infix/.use_etc
|
||||||
|
boot=/tmp/.boot_mode
|
||||||
|
if [ -f $boot ]; then
|
||||||
|
current=$(cat $boot)
|
||||||
|
else
|
||||||
|
current="unknown"
|
||||||
|
fi
|
||||||
|
m=on
|
||||||
|
n=off
|
||||||
|
p=off
|
||||||
|
|
||||||
|
select_mode()
|
||||||
|
{
|
||||||
|
if [ -f $mode ]; then
|
||||||
|
m=off
|
||||||
|
if grep -qi profinet $boot; then
|
||||||
|
n=off
|
||||||
|
p=on
|
||||||
|
else
|
||||||
|
n=on
|
||||||
|
p=off
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec 3>&1
|
||||||
|
selection=$(dialog --erase-on-exit --no-tags \
|
||||||
|
--hline "Arrow keys + space to select, enter to confirm" \
|
||||||
|
--backtitle "Select Operating Mode" \
|
||||||
|
--title "Select Operating Mode" \
|
||||||
|
--radiolist "System currently runs in: $current mode" 13 60 1 \
|
||||||
|
"1" "Managed NETCONF, XML datastore" "$m" \
|
||||||
|
"2" "Native Linux, /etc datastore" "$n" \
|
||||||
|
"3" "PROFINET, /etc variant" "$p" \
|
||||||
|
2>&1 1>&3)
|
||||||
|
exit_status=$?
|
||||||
|
exec 3>&-
|
||||||
|
case $exit_status in
|
||||||
|
1) # cancel
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
255) # escape
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
usage:
|
||||||
|
chom [-h] [etc | netconf]
|
||||||
|
|
||||||
|
options:
|
||||||
|
-h Show this help text
|
||||||
|
|
||||||
|
arguments:
|
||||||
|
etc Change to Linux native mode, /etc
|
||||||
|
netconf Change to NETCONF mode, XML
|
||||||
|
profinet Change to PROFINET mode, /etc variant
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
-h)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
net* | xml)
|
||||||
|
selection=1
|
||||||
|
;;
|
||||||
|
nat* | etc*)
|
||||||
|
selection=2
|
||||||
|
;;
|
||||||
|
profinet)
|
||||||
|
selection=3
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$selection" ]; then
|
||||||
|
use_dialog=1
|
||||||
|
select_mode
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $selection in
|
||||||
|
1)
|
||||||
|
rm -f $mode 2>/dev/null
|
||||||
|
grep -qi netconf $boot 2>/dev/null && exit 0
|
||||||
|
result="Manageed NETCONF"
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
echo "native /etc" > $mode
|
||||||
|
grep -qi native $boot 2>/dev/null && exit 0
|
||||||
|
result="Native Linux, /etc"
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
echo "PROFINET" > $mode
|
||||||
|
grep -qi profinet $boot 2>/dev/null && exit 0
|
||||||
|
result="PROFINET"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -n "$use_dialog" ]; then
|
||||||
|
dialog --erase-on-exit --cr-wrap --title "Activate Mode Change?" --yesno "\n Reboot to $result mode now?" 8 50
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Remember to reboot later to activate the change."
|
||||||
|
exit 0
|
||||||
@@ -415,11 +415,17 @@ a printer can publish IPP records with meta data on the printer type and model
|
|||||||
or donwload URL for drivers. Switches and routers usually publish how they
|
or donwload URL for drivers. Switches and routers usually publish how they
|
||||||
can be reached: HTTP/HTTPS and SSH.
|
can be reached: HTTP/HTTPS and SSH.
|
||||||
|
|
||||||
mDNS is supported in this product and should be enabled by default. To
|
Note: there are other mechanisms for device discovery. Microsoft have been
|
||||||
verify that it works, in Windows, macOS, or Linux, open your web browser
|
slow to adopt mDNS, having relied on their own SSDP protocol. For the
|
||||||
and point it to <https://hostname-01-02-03.local>. This is the hostname
|
full experince Apple's "Bonjour" can be installed in Windows.
|
||||||
and three last octets of the device's base MAC address. You can also use
|
|
||||||
mDNS browsers or command line tools like mdns-scan
|
mDNS is supported in this product and should be enabled by default. To
|
||||||
|
verify it works, open the Windows File Explorer (Win+E) and scroll to
|
||||||
|
Network in the left-hand menu. An icon with a matching hostname can be
|
||||||
|
found there which, when clicked, opens up the device's Web Interface.
|
||||||
|
macOS users have mDNS fully integrated by default. Linux users can use
|
||||||
|
'mdns-scan' or Avahi, as shown above. The latter two can also just set
|
||||||
|
their web browsers to https://hostname-01-02-03.local
|
||||||
|
|
||||||
|
|
||||||
$(h2 "VLAN Interfaces")
|
$(h2 "VLAN Interfaces")
|
||||||
@@ -215,10 +215,10 @@ system()
|
|||||||
{
|
{
|
||||||
h1 "SYSTEM INFORMATION"
|
h1 "SYSTEM INFORMATION"
|
||||||
echo "System Name : $(uname -n)"
|
echo "System Name : $(uname -n)"
|
||||||
echo "System Variant : $VARIANT"
|
echo "System Boot Mode : $(cat /tmp/.boot_mode)"
|
||||||
echo "System Description : $PRETTY_NAME"
|
echo "System Description : $PRETTY_NAME"
|
||||||
echo "System Contact : $HOME_URL"
|
echo "System Contact : $HOME_URL"
|
||||||
echo "System Timezone : $(cat /etc/timezone)"
|
echo "System Timezone : $TZ"
|
||||||
echo "System Type : $NAME"
|
echo "System Type : $NAME"
|
||||||
echo "System Version : $(cat /etc/version)"
|
echo "System Version : $(cat /etc/version)"
|
||||||
echo "System Arch : $(uname -m)"
|
echo "System Arch : $(uname -m)"
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This file is part of avahi.
|
|
||||||
#
|
|
||||||
# avahi 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 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# avahi is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
||||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
|
||||||
# License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with avahi; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
||||||
# USA.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Command line arguments:
|
|
||||||
# $1 event that happened:
|
|
||||||
# BIND: Successfully claimed address
|
|
||||||
# CONFLICT: An IP address conflict happened
|
|
||||||
# UNBIND: The IP address is no longer needed
|
|
||||||
# STOP: The daemon is terminating
|
|
||||||
# $2 interface name
|
|
||||||
# $3 IP adddress
|
|
||||||
|
|
||||||
PATH="$PATH:/usr/bin:/usr/sbin:/bin:/sbin"
|
|
||||||
|
|
||||||
# Use a different metric for each interface, so that we can set
|
|
||||||
# identical routes to multiple interfaces.
|
|
||||||
|
|
||||||
METRIC=$((1000 + `cat "/sys/class/net/$2/ifindex" 2>/dev/null || echo 0`))
|
|
||||||
|
|
||||||
if [ -x /bin/ip -o -x /sbin/ip ] ; then
|
|
||||||
|
|
||||||
# We have the Linux ip tool from the iproute package
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
BIND)
|
|
||||||
ip addr flush dev "$2" label "$2:avahi"
|
|
||||||
ip addr add "$3"/16 brd 169.254.255.255 label "$2:avahi" scope link dev "$2" proto 6
|
|
||||||
ip route add default dev "$2" metric "$METRIC" scope link ||:
|
|
||||||
;;
|
|
||||||
|
|
||||||
CONFLICT|UNBIND|STOP)
|
|
||||||
ip route del default dev "$2" metric "$METRIC" scope link ||:
|
|
||||||
ip addr del "$3"/16 brd 169.254.255.255 label "$2:avahi" scope link dev "$2"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "Unknown event $1" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
elif [ -x /bin/ifconfig -o -x /sbin/ifconfig ] ; then
|
|
||||||
|
|
||||||
# We have the old ifconfig tool
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
BIND)
|
|
||||||
ifconfig "$2:avahi" inet "$3" netmask 255.255.0.0 broadcast 169.254.255.255 up
|
|
||||||
route add default dev "$2:avahi" metric "$METRIC" ||:
|
|
||||||
;;
|
|
||||||
|
|
||||||
CONFLICT|STOP|UNBIND)
|
|
||||||
route del default dev "$2:avahi" metric "$METRIC" ||:
|
|
||||||
ifconfig "$2:avahi" down
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "Unknown event $1" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
echo "No network configuration tool found." >&2
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@@ -3,13 +3,9 @@
|
|||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[ -z "$PS1" ] && return
|
[ -z "$PS1" ] && return
|
||||||
|
|
||||||
# Reevaluate for each line, in case hostname changes
|
|
||||||
function prompt_command
|
|
||||||
{
|
|
||||||
PS1="\u@$(hostname):\w\$ "
|
|
||||||
}
|
|
||||||
export PROMPT_COMMAND=prompt_command
|
|
||||||
|
|
||||||
# check the window size after each command and, if necessary,
|
# check the window size after each command and, if necessary,
|
||||||
# update the values of LINES and COLUMNS.
|
# update the values of LINES and COLUMNS.
|
||||||
shopt -s checkwinsize
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# Disble built-ins
|
||||||
|
enable -n help
|
||||||
|
|||||||
@@ -1,141 +0,0 @@
|
|||||||
_cond()
|
|
||||||
{
|
|
||||||
initctl -pt cond dump | awk '{print $4}' | sed 's/<\(.*\)>/\1/'
|
|
||||||
}
|
|
||||||
|
|
||||||
_ident()
|
|
||||||
{
|
|
||||||
if [ -n "$1" ]; then
|
|
||||||
initctl ident | grep -q $1
|
|
||||||
else
|
|
||||||
initctl ident
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_svc()
|
|
||||||
{
|
|
||||||
initctl ls -pt | grep $1 | sed "s/.*\/\(.*\)/\1/g" | sort -u
|
|
||||||
}
|
|
||||||
|
|
||||||
_enabled()
|
|
||||||
{
|
|
||||||
echo "$(_svc enabled)"
|
|
||||||
}
|
|
||||||
|
|
||||||
_available()
|
|
||||||
{
|
|
||||||
all=$(mktemp)
|
|
||||||
ena=$(mktemp)
|
|
||||||
echo "$(_svc available)" >$all
|
|
||||||
echo "$(_svc enabled)" >$ena
|
|
||||||
grep -v -f $ena $all
|
|
||||||
rm $all $ena
|
|
||||||
}
|
|
||||||
|
|
||||||
# Determine first non-option word. Usually the command
|
|
||||||
_firstword() {
|
|
||||||
local firstword i
|
|
||||||
|
|
||||||
firstword=
|
|
||||||
for ((i = 1; i < ${#COMP_WORDS[@]}; ++i)); do
|
|
||||||
if [[ ${COMP_WORDS[i]} != -* ]]; then
|
|
||||||
firstword=${COMP_WORDS[i]}
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo $firstword
|
|
||||||
}
|
|
||||||
|
|
||||||
# Determine last non-option word. Uusally a sub-command
|
|
||||||
_lastword() {
|
|
||||||
local lastword i
|
|
||||||
|
|
||||||
lastword=
|
|
||||||
for ((i = 1; i < ${#COMP_WORDS[@]}; ++i)); do
|
|
||||||
if [[ ${COMP_WORDS[i]} != -* ]] && [[ -n ${COMP_WORDS[i]} ]] && [[ ${COMP_WORDS[i]} != $cur ]]; then
|
|
||||||
lastword=${COMP_WORDS[i]}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo $lastword
|
|
||||||
}
|
|
||||||
|
|
||||||
_initctl()
|
|
||||||
{
|
|
||||||
local cur command
|
|
||||||
|
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
|
||||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
||||||
firstword=$(_firstword)
|
|
||||||
lastword=$(_lastword)
|
|
||||||
|
|
||||||
commands="status cond debug help kill ls log version list enable \
|
|
||||||
disable touch show cat edit create delete reload start \
|
|
||||||
stop restart signal cgroup ps top plugins runlevel reboot \
|
|
||||||
halt poweroff suspend utmp"
|
|
||||||
cond_cmds="set get clear status dump"
|
|
||||||
cond_types="hook net pid service task usr"
|
|
||||||
signals="int term hup stop tstp cont usr1 usr2 pwr"
|
|
||||||
options="-b --batch \
|
|
||||||
-c --create \
|
|
||||||
-d --debug \
|
|
||||||
-f --force \
|
|
||||||
-h --help \
|
|
||||||
-j --json \
|
|
||||||
-n --noerr \
|
|
||||||
-1 --once \
|
|
||||||
-p --plain \
|
|
||||||
-q --quiet \
|
|
||||||
-t --no-heading \
|
|
||||||
-v --verbose \
|
|
||||||
-V --version"
|
|
||||||
|
|
||||||
case "${firstword}" in
|
|
||||||
enable)
|
|
||||||
COMPREPLY=($(compgen -W "$(_available)" -- $cur))
|
|
||||||
;;
|
|
||||||
disable|touch)
|
|
||||||
COMPREPLY=($(compgen -W "$(_enabled)" -- $cur))
|
|
||||||
;;
|
|
||||||
show|cat|edit|delete)
|
|
||||||
COMPREPLY=($(compgen -W "$(_svc .)" -- $cur))
|
|
||||||
;;
|
|
||||||
start|stop|restart|log|status)
|
|
||||||
COMPREPLY=($(compgen -W "$(_ident)" -- $cur))
|
|
||||||
;;
|
|
||||||
signal|kill)
|
|
||||||
if $(_ident "${prev}"); then
|
|
||||||
COMPREPLY=($(compgen -W "$signals" -- $cur))
|
|
||||||
else
|
|
||||||
COMPREPLY=($(compgen -W "$(_ident)" -- $cur))
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
cond)
|
|
||||||
case "${lastword}" in
|
|
||||||
set|clear)
|
|
||||||
compopt -o nospace
|
|
||||||
COMPREPLY=($(compgen -W "usr/" -- $cur))
|
|
||||||
;;
|
|
||||||
get)
|
|
||||||
COMPREPLY=($(compgen -W "$(_cond)" -- $cur))
|
|
||||||
;;
|
|
||||||
dump)
|
|
||||||
COMPREPLY=($(compgen -W "$cond_types" -- $cur))
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
COMPREPLY=($(compgen -W "$cond_cmds" -- $cur))
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
COMPREPLY=($(compgen -W "$commands" -- $cur))
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ $cur == -* ]]; then
|
|
||||||
COMPREPLY=($(compgen -W "$options" -- $cur))
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
complete -F _initctl initctl
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
# For more information on this configuration file, see containers-registries.conf(5).
|
|
||||||
#
|
|
||||||
# NOTE: RISK OF USING UNQUALIFIED IMAGE NAMES
|
|
||||||
# We recommend always using fully qualified image names including the registry
|
|
||||||
# server (full dns name), namespace, image name, and tag
|
|
||||||
# (e.g., registry.redhat.io/ubi8/ubi:latest). Pulling by digest (i.e.,
|
|
||||||
# quay.io/repository/name@digest) further eliminates the ambiguity of tags.
|
|
||||||
# When using short names, there is always an inherent risk that the image being
|
|
||||||
# pulled could be spoofed. For example, a user wants to pull an image named
|
|
||||||
# `foobar` from a registry and expects it to come from myregistry.com. If
|
|
||||||
# myregistry.com is not first in the search list, an attacker could place a
|
|
||||||
# different `foobar` image at a registry earlier in the search list. The user
|
|
||||||
# would accidentally pull and run the attacker's image and code rather than the
|
|
||||||
# intended content. We recommend only adding registries which are completely
|
|
||||||
# trusted (i.e., registries which don't allow unknown or anonymous users to
|
|
||||||
# create accounts with arbitrary names). This will prevent an image from being
|
|
||||||
# spoofed, squatted or otherwise made insecure. If it is necessary to use one
|
|
||||||
# of these registries, it should be added at the end of the list.
|
|
||||||
#
|
|
||||||
# # An array of host[:port] registries to try when pulling an unqualified image, in order.
|
|
||||||
# unqualified-search-registries = ["example.com"]
|
|
||||||
#
|
|
||||||
# [[registry]]
|
|
||||||
# # The "prefix" field is used to choose the relevant [[registry]] TOML table;
|
|
||||||
# # (only) the TOML table with the longest match for the input image name
|
|
||||||
# # (taking into account namespace/repo/tag/digest separators) is used.
|
|
||||||
# #
|
|
||||||
# # The prefix can also be of the form: *.example.com for wildcard subdomain
|
|
||||||
# # matching.
|
|
||||||
# #
|
|
||||||
# # If the prefix field is missing, it defaults to be the same as the "location" field.
|
|
||||||
# prefix = "example.com/foo"
|
|
||||||
#
|
|
||||||
# # If true, unencrypted HTTP as well as TLS connections with untrusted
|
|
||||||
# # certificates are allowed.
|
|
||||||
# insecure = false
|
|
||||||
#
|
|
||||||
# # If true, pulling images with matching names is forbidden.
|
|
||||||
# blocked = false
|
|
||||||
#
|
|
||||||
# # The physical location of the "prefix"-rooted namespace.
|
|
||||||
# #
|
|
||||||
# # By default, this is equal to "prefix" (in which case "prefix" can be omitted
|
|
||||||
# # and the [[registry]] TOML table can only specify "location").
|
|
||||||
# #
|
|
||||||
# # Example: Given
|
|
||||||
# # prefix = "example.com/foo"
|
|
||||||
# # location = "internal-registry-for-example.net/bar"
|
|
||||||
# # requests for the image example.com/foo/myimage:latest will actually work with the
|
|
||||||
# # internal-registry-for-example.net/bar/myimage:latest image.
|
|
||||||
#
|
|
||||||
# # The location can be empty iff prefix is in a
|
|
||||||
# # wildcarded format: "*.example.com". In this case, the input reference will
|
|
||||||
# # be used as-is without any rewrite.
|
|
||||||
# location = internal-registry-for-example.com/bar"
|
|
||||||
#
|
|
||||||
# # (Possibly-partial) mirrors for the "prefix"-rooted namespace.
|
|
||||||
# #
|
|
||||||
# # The mirrors are attempted in the specified order; the first one that can be
|
|
||||||
# # contacted and contains the image will be used (and if none of the mirrors contains the image,
|
|
||||||
# # the primary location specified by the "registry.location" field, or using the unmodified
|
|
||||||
# # user-specified reference, is tried last).
|
|
||||||
# #
|
|
||||||
# # Each TOML table in the "mirror" array can contain the following fields, with the same semantics
|
|
||||||
# # as if specified in the [[registry]] TOML table directly:
|
|
||||||
# # - location
|
|
||||||
# # - insecure
|
|
||||||
# [[registry.mirror]]
|
|
||||||
# location = "example-mirror-0.local/mirror-for-foo"
|
|
||||||
# [[registry.mirror]]
|
|
||||||
# location = "example-mirror-1.local/mirrors/foo"
|
|
||||||
# insecure = true
|
|
||||||
# # Given the above, a pull of example.com/foo/image:latest will try:
|
|
||||||
# # 1. example-mirror-0.local/mirror-for-foo/image:latest
|
|
||||||
# # 2. example-mirror-1.local/mirrors/foo/image:latest
|
|
||||||
# # 3. internal-registry-for-example.net/bar/image:latest
|
|
||||||
# # in order, and use the first one that exists.
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
[aliases]
|
|
||||||
# almalinux
|
|
||||||
"almalinux" = "docker.io/library/almalinux"
|
|
||||||
"almalinux-minimal" = "docker.io/library/almalinux-minimal"
|
|
||||||
# centos
|
|
||||||
"centos" = "quay.io/centos/centos"
|
|
||||||
# containers
|
|
||||||
"skopeo" = "quay.io/skopeo/stable"
|
|
||||||
"buildah" = "quay.io/buildah/stable"
|
|
||||||
"podman" = "quay.io/podman/stable"
|
|
||||||
# docker
|
|
||||||
"alpine" = "docker.io/library/alpine"
|
|
||||||
"docker" = "docker.io/library/docker"
|
|
||||||
"registry" = "docker.io/library/registry"
|
|
||||||
"hello-world" = "docker.io/library/hello-world"
|
|
||||||
"swarm" = "docker.io/library/swarm"
|
|
||||||
# Fedora
|
|
||||||
"fedora-minimal" = "registry.fedoraproject.org/fedora-minimal"
|
|
||||||
"fedora" = "registry.fedoraproject.org/fedora"
|
|
||||||
# openSUSE
|
|
||||||
"opensuse/tumbleweed" = "registry.opensuse.org/opensuse/tumbleweed"
|
|
||||||
"opensuse/tumbleweed-dnf" = "registry.opensuse.org/opensuse/tumbleweed-dnf"
|
|
||||||
"opensuse/tumbleweed-microdnf" = "registry.opensuse.org/opensuse/tumbleweed-microdnf"
|
|
||||||
"opensuse/leap" = "registry.opensuse.org/opensuse/leap"
|
|
||||||
"opensuse/busybox" = "registry.opensuse.org/opensuse/busybox"
|
|
||||||
"tumbleweed" = "registry.opensuse.org/opensuse/tumbleweed"
|
|
||||||
"tumbleweed-dnf" = "registry.opensuse.org/opensuse/tumbleweed-dnf"
|
|
||||||
"tumbleweed-microdnf" = "registry.opensuse.org/opensuse/tumbleweed-microdnf"
|
|
||||||
"leap" = "registry.opensuse.org/opensuse/leap"
|
|
||||||
"leap-dnf" = "registry.opensuse.org/opensuse/leap-dnf"
|
|
||||||
"leap-microdnf" = "registry.opensuse.org/opensuse/leap-microdnf"
|
|
||||||
"tw-busybox" = "registry.opensuse.org/opensuse/busybox"
|
|
||||||
# SUSE
|
|
||||||
"suse/sle15" = "registry.suse.com/suse/sle15"
|
|
||||||
"suse/sles12sp5" = "registry.suse.com/suse/sles12sp5"
|
|
||||||
"suse/sles12sp4" = "registry.suse.com/suse/sles12sp4"
|
|
||||||
"suse/sles12sp3" = "registry.suse.com/suse/sles12sp3"
|
|
||||||
"sle15" = "registry.suse.com/suse/sle15"
|
|
||||||
"sles12sp5" = "registry.suse.com/suse/sles12sp5"
|
|
||||||
"sles12sp4" = "registry.suse.com/suse/sles12sp4"
|
|
||||||
"sles12sp3" = "registry.suse.com/suse/sles12sp3"
|
|
||||||
# Red Hat Enterprise Linux
|
|
||||||
"rhel" = "registry.access.redhat.com/rhel"
|
|
||||||
"rhel6" = "registry.access.redhat.com/rhel6"
|
|
||||||
"rhel7" = "registry.access.redhat.com/rhel7"
|
|
||||||
"ubi7" = "registry.access.redhat.com/ubi7"
|
|
||||||
"ubi7-init" = "registry.access.redhat.com/ubi7-init"
|
|
||||||
"ubi7-minimal" = "registry.access.redhat.com/ubi7-minimal"
|
|
||||||
"ubi8" = "registry.access.redhat.com/ubi8"
|
|
||||||
"ubi8-minimal" = "registry.access.redhat.com/ubi8-minimal"
|
|
||||||
"ubi8-init" = "registry.access.redhat.com/ubi8-init"
|
|
||||||
"ubi8-micro" = "registry.access.redhat.com/ubi8-micro"
|
|
||||||
"ubi8/ubi" = "registry.access.redhat.com/ubi8/ubi"
|
|
||||||
"ubi8/ubi-minimal" = "registry.access.redhat.com/ubi8-minimal"
|
|
||||||
"ubi8/ubi-init" = "registry.access.redhat.com/ubi8-init"
|
|
||||||
"ubi8/ubi-micro" = "registry.access.redhat.com/ubi8-micro"
|
|
||||||
# Rocky Linux
|
|
||||||
"rockylinux" = "docker.io/library/rockylinux"
|
|
||||||
# Debian
|
|
||||||
"debian" = "docker.io/library/debian"
|
|
||||||
# Kali Linux
|
|
||||||
"kali-bleeding-edge" = "docker.io/kalilinux/kali-bleeding-edge"
|
|
||||||
"kali-dev" = "docker.io/kalilinux/kali-dev"
|
|
||||||
"kali-experimental" = "docker.io/kalilinux/kali-experimental"
|
|
||||||
"kali-last-release" = "docker.io/kalilinux/kali-last-release"
|
|
||||||
"kali-rolling" = "docker.io/kalilinux/kali-rolling"
|
|
||||||
# Ubuntu
|
|
||||||
"ubuntu" = "docker.io/library/ubuntu"
|
|
||||||
# Oracle Linux
|
|
||||||
"oraclelinux" = "container-registry.oracle.com/os/oraclelinux"
|
|
||||||
# busybox
|
|
||||||
"busybox" = "docker.io/library/busybox"
|
|
||||||
# php
|
|
||||||
"php" = "docker.io/library/php"
|
|
||||||
# python
|
|
||||||
"python" = "docker.io/library/python"
|
|
||||||
# node
|
|
||||||
"node" = "docker.io/library/node"
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# dnsmasq is the system resolver, the file /etc/resolv.conf is
|
|
||||||
# managed by openresolv. DHCP lease, VPN tunnel establishment,
|
|
||||||
# and similar events feed servers and configuration to dnsmasq.
|
|
||||||
domain-needed
|
|
||||||
#interface=lo
|
|
||||||
listen-address=127.0.0.1
|
|
||||||
enable-dbus
|
|
||||||
|
|
||||||
# Generated by openresolv
|
|
||||||
resolv-file=/var/lib/misc/resolv.conf
|
|
||||||
|
|
||||||
# Include all files in a directory which end in .conf
|
|
||||||
conf-dir=/etc/dnsmasq.d/,*.conf
|
|
||||||
|
|
||||||
@@ -1,3 +1,2 @@
|
|||||||
run [S] /lib/infix/probe -- Probing system information
|
run [S] /lib/infix/nameif -- Probing network interfaces
|
||||||
run [S] <pid/syslogd> /lib/infix/sysctl-sync-ip-conf --
|
run if:<!boot/netconf> [S] /lib/infix/swup --
|
||||||
run [S] <pid/syslogd> /lib/infix/nameif -- Probing network interfaces
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
service [2345789] log:prio:user.notice rauc service -- Software update service
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
task [S] /lib/infix/ssh-hostkeys --
|
||||||
|
service [2345789] <usr/ssh-hostkeys> /usr/sbin/sshd -D -- OpenSSH daemon
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Override Finit plugin
|
|
||||||
service cgroup.system name:dbus pid:!/run/messagebus.pid <pid/syslogd> \
|
|
||||||
[S123456789] /usr/bin/dbus-daemon --nofork --system --syslog-only \
|
|
||||||
-- D-Bus message bus daemon
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../available/rauc.conf
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../available/sshd.conf
|
||||||
@@ -11,6 +11,9 @@ sysfs /sys sysfs defaults 0 0
|
|||||||
debugfs /sys/kernel/debug debugfs nofail 0 0
|
debugfs /sys/kernel/debug debugfs nofail 0 0
|
||||||
cfgfs /config configfs nofail,noauto 0 0
|
cfgfs /config configfs nofail,noauto 0 0
|
||||||
|
|
||||||
|
# Optional host share when running in Qemu
|
||||||
|
hostfs /host 9p nofail,cache=none,msize=16384 0 0
|
||||||
|
|
||||||
# The chosen backing storage for the overlays placed on /cfg, /etc,
|
# The chosen backing storage for the overlays placed on /cfg, /etc,
|
||||||
# /home, /root, and /var, are determined dynamically by /lib/infix/mnt
|
# /home, /root, and /var, are determined dynamically by /lib/infix/mnt
|
||||||
# depending on the available devices.
|
# depending on the available devices.
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
1 port
|
1 port
|
||||||
2 iface
|
2 iface
|
||||||
3 internal
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
4 static
|
|
||||||
5 dhcp
|
|
||||||
6 random
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
options bonding max_bonds=0
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
options dummy numdummies=0
|
|
||||||
|
|
||||||
@@ -60,7 +60,8 @@ menu:system:System:System Settings
|
|||||||
exec:_Enable service:edit:initctl enable ~Enter name of service (filename) to enable:~
|
exec:_Enable service:edit:initctl enable ~Enter name of service (filename) to enable:~
|
||||||
exec:_Disable service:edit:initctl disable ~Enter name of service (filename) to disable:~
|
exec:_Disable service:edit:initctl disable ~Enter name of service (filename) to disable:~
|
||||||
nop
|
nop
|
||||||
exec:_Factory Reset::yorn "Factory reset device (reboots), are you sure?" factory -y
|
exec:_Change Operating Mode::chom
|
||||||
|
exec:_Factory Reset::yorn "Reboot and factory reset device, are you sure?" factory -y
|
||||||
nop
|
nop
|
||||||
exit:_Main menu..
|
exit:_Main menu..
|
||||||
|
|
||||||
@@ -4,21 +4,16 @@ alias ll='ls -alF'
|
|||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
|
|
||||||
export EDITOR=/usr/bin/edit
|
export EDITOR=/usr/bin/edit
|
||||||
export VISUAL=/usr/bin/edit
|
|
||||||
export LESS="-P %f (press h for help or q to quit)"
|
|
||||||
alias vim='vi'
|
alias vim='vi'
|
||||||
alias view='vi -R'
|
alias view='vi -R'
|
||||||
alias emacs='mg'
|
alias emacs='mg'
|
||||||
alias sensible-editor=edit
|
alias sensible-editor=edit
|
||||||
alias sensible-pager=pager
|
alias sensible-pager=pager
|
||||||
alias hd="hexdump -C"
|
|
||||||
|
|
||||||
alias ip='ip --color=auto'
|
alias ip='ip --color=auto'
|
||||||
alias ipb='ip -br'
|
alias ipb='ip -br'
|
||||||
alias ipaddr='ip addr'
|
alias ipaddr='ip addr'
|
||||||
alias iplink='ip link'
|
alias iplink='ip link'
|
||||||
alias bridge='bridge --color=auto'
|
alias bridge='bridge --color=auto'
|
||||||
|
alias setup='pdmenu; clear'
|
||||||
alias llping='ping -L ff02::1 -I'
|
alias cli='clixon_cli'
|
||||||
|
|
||||||
alias docker=podman
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
# dnsmasq is the system resolver
|
|
||||||
name_servers="127.0.0.1"
|
|
||||||
|
|
||||||
resolv_conf=/etc/resolv.conf
|
|
||||||
resolv_conf_options="edns0 trust-ad"
|
|
||||||
|
|
||||||
# dnsmasq specific settings and list of
|
|
||||||
# nameservers in non-standard locations
|
|
||||||
dnsmasq_conf=/etc/dnsmasq.d/resolvconf.conf
|
|
||||||
dnsmasq_resolv=/var/lib/misc/resolv.conf
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
lo
|
|
||||||
@@ -1,361 +0,0 @@
|
|||||||
# Network services, Internet style
|
|
||||||
#
|
|
||||||
# Updated from https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml .
|
|
||||||
#
|
|
||||||
# New ports will be added on request if they have been officially assigned
|
|
||||||
# by IANA and used in the real-world or are needed by a debian package.
|
|
||||||
# If you need a huge list of used numbers please install the nmap package.
|
|
||||||
|
|
||||||
tcpmux 1/tcp # TCP port service multiplexer
|
|
||||||
echo 7/tcp
|
|
||||||
echo 7/udp
|
|
||||||
discard 9/tcp sink null
|
|
||||||
discard 9/udp sink null
|
|
||||||
systat 11/tcp users
|
|
||||||
daytime 13/tcp
|
|
||||||
daytime 13/udp
|
|
||||||
netstat 15/tcp
|
|
||||||
qotd 17/tcp quote
|
|
||||||
chargen 19/tcp ttytst source
|
|
||||||
chargen 19/udp ttytst source
|
|
||||||
ftp-data 20/tcp
|
|
||||||
ftp 21/tcp
|
|
||||||
fsp 21/udp fspd
|
|
||||||
ssh 22/tcp # SSH Remote Login Protocol
|
|
||||||
telnet 23/tcp
|
|
||||||
smtp 25/tcp mail
|
|
||||||
time 37/tcp timserver
|
|
||||||
time 37/udp timserver
|
|
||||||
whois 43/tcp nicname
|
|
||||||
tacacs 49/tcp # Login Host Protocol (TACACS)
|
|
||||||
tacacs 49/udp
|
|
||||||
domain 53/tcp # Domain Name Server
|
|
||||||
domain 53/udp
|
|
||||||
bootps 67/udp
|
|
||||||
bootpc 68/udp
|
|
||||||
tftp 69/udp
|
|
||||||
gopher 70/tcp # Internet Gopher
|
|
||||||
finger 79/tcp
|
|
||||||
http 80/tcp www # WorldWideWeb HTTP
|
|
||||||
kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5
|
|
||||||
kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5
|
|
||||||
iso-tsap 102/tcp tsap # part of ISODE
|
|
||||||
acr-nema 104/tcp dicom # Digital Imag. & Comm. 300
|
|
||||||
pop3 110/tcp pop-3 # POP version 3
|
|
||||||
sunrpc 111/tcp portmapper # RPC 4.0 portmapper
|
|
||||||
sunrpc 111/udp portmapper
|
|
||||||
auth 113/tcp authentication tap ident
|
|
||||||
nntp 119/tcp readnews untp # USENET News Transfer Protocol
|
|
||||||
ntp 123/udp # Network Time Protocol
|
|
||||||
epmap 135/tcp loc-srv # DCE endpoint resolution
|
|
||||||
netbios-ns 137/udp # NETBIOS Name Service
|
|
||||||
netbios-dgm 138/udp # NETBIOS Datagram Service
|
|
||||||
netbios-ssn 139/tcp # NETBIOS session service
|
|
||||||
imap2 143/tcp imap # Interim Mail Access P 2 and 4
|
|
||||||
snmp 161/tcp # Simple Net Mgmt Protocol
|
|
||||||
snmp 161/udp
|
|
||||||
snmp-trap 162/tcp snmptrap # Traps for SNMP
|
|
||||||
snmp-trap 162/udp snmptrap
|
|
||||||
cmip-man 163/tcp # ISO mgmt over IP (CMOT)
|
|
||||||
cmip-man 163/udp
|
|
||||||
cmip-agent 164/tcp
|
|
||||||
cmip-agent 164/udp
|
|
||||||
mailq 174/tcp # Mailer transport queue for Zmailer
|
|
||||||
xdmcp 177/udp # X Display Manager Control Protocol
|
|
||||||
bgp 179/tcp # Border Gateway Protocol
|
|
||||||
smux 199/tcp # SNMP Unix Multiplexer
|
|
||||||
qmtp 209/tcp # Quick Mail Transfer Protocol
|
|
||||||
z3950 210/tcp wais # NISO Z39.50 database
|
|
||||||
ipx 213/udp # IPX [RFC1234]
|
|
||||||
ptp-event 319/udp
|
|
||||||
ptp-general 320/udp
|
|
||||||
pawserv 345/tcp # Perf Analysis Workbench
|
|
||||||
zserv 346/tcp # Zebra server
|
|
||||||
rpc2portmap 369/tcp
|
|
||||||
rpc2portmap 369/udp # Coda portmapper
|
|
||||||
codaauth2 370/tcp
|
|
||||||
codaauth2 370/udp # Coda authentication server
|
|
||||||
clearcase 371/udp Clearcase
|
|
||||||
ldap 389/tcp # Lightweight Directory Access Protocol
|
|
||||||
ldap 389/udp
|
|
||||||
svrloc 427/tcp # Server Location
|
|
||||||
svrloc 427/udp
|
|
||||||
https 443/tcp # http protocol over TLS/SSL
|
|
||||||
https 443/udp # HTTP/3
|
|
||||||
snpp 444/tcp # Simple Network Paging Protocol
|
|
||||||
microsoft-ds 445/tcp # Microsoft Naked CIFS
|
|
||||||
kpasswd 464/tcp
|
|
||||||
kpasswd 464/udp
|
|
||||||
submissions 465/tcp ssmtp smtps urd # Submission over TLS [RFC8314]
|
|
||||||
saft 487/tcp # Simple Asynchronous File Transfer
|
|
||||||
isakmp 500/udp # IPSEC key management
|
|
||||||
rtsp 554/tcp # Real Time Stream Control Protocol
|
|
||||||
rtsp 554/udp
|
|
||||||
nqs 607/tcp # Network Queuing system
|
|
||||||
asf-rmcp 623/udp # ASF Remote Management and Control Protocol
|
|
||||||
qmqp 628/tcp
|
|
||||||
ipp 631/tcp # Internet Printing Protocol
|
|
||||||
ldp 646/tcp # Label Distribution Protocol
|
|
||||||
ldp 646/udp
|
|
||||||
#
|
|
||||||
# UNIX specific services
|
|
||||||
#
|
|
||||||
exec 512/tcp
|
|
||||||
biff 512/udp comsat
|
|
||||||
login 513/tcp
|
|
||||||
who 513/udp whod
|
|
||||||
shell 514/tcp cmd syslog # no passwords used
|
|
||||||
syslog 514/udp
|
|
||||||
printer 515/tcp spooler # line printer spooler
|
|
||||||
talk 517/udp
|
|
||||||
ntalk 518/udp
|
|
||||||
route 520/udp router routed # RIP
|
|
||||||
gdomap 538/tcp # GNUstep distributed objects
|
|
||||||
gdomap 538/udp
|
|
||||||
uucp 540/tcp uucpd # uucp daemon
|
|
||||||
klogin 543/tcp # Kerberized `rlogin' (v5)
|
|
||||||
kshell 544/tcp krcmd # Kerberized `rsh' (v5)
|
|
||||||
dhcpv6-client 546/udp
|
|
||||||
dhcpv6-server 547/udp
|
|
||||||
afpovertcp 548/tcp # AFP over TCP
|
|
||||||
nntps 563/tcp snntp # NNTP over SSL
|
|
||||||
submission 587/tcp # Submission [RFC4409]
|
|
||||||
ldaps 636/tcp # LDAP over SSL
|
|
||||||
ldaps 636/udp
|
|
||||||
tinc 655/tcp # tinc control port
|
|
||||||
tinc 655/udp
|
|
||||||
silc 706/tcp
|
|
||||||
kerberos-adm 749/tcp # Kerberos `kadmin' (v5)
|
|
||||||
#
|
|
||||||
domain-s 853/tcp # DNS over TLS [RFC7858]
|
|
||||||
domain-s 853/udp # DNS over DTLS [RFC8094]
|
|
||||||
rsync 873/tcp
|
|
||||||
ftps-data 989/tcp # FTP over SSL (data)
|
|
||||||
ftps 990/tcp
|
|
||||||
telnets 992/tcp # Telnet over SSL
|
|
||||||
imaps 993/tcp # IMAP over SSL
|
|
||||||
pop3s 995/tcp # POP-3 over SSL
|
|
||||||
#
|
|
||||||
# From ``Assigned Numbers'':
|
|
||||||
#
|
|
||||||
#> The Registered Ports are not controlled by the IANA and on most systems
|
|
||||||
#> can be used by ordinary user processes or programs executed by ordinary
|
|
||||||
#> users.
|
|
||||||
#
|
|
||||||
#> Ports are used in the TCP [45,106] to name the ends of logical
|
|
||||||
#> connections which carry long term conversations. For the purpose of
|
|
||||||
#> providing services to unknown callers, a service contact port is
|
|
||||||
#> defined. This list specifies the port used by the server process as its
|
|
||||||
#> contact port. While the IANA can not control uses of these ports it
|
|
||||||
#> does register or list uses of these ports as a convienence to the
|
|
||||||
#> community.
|
|
||||||
#
|
|
||||||
socks 1080/tcp # socks proxy server
|
|
||||||
proofd 1093/tcp
|
|
||||||
rootd 1094/tcp
|
|
||||||
openvpn 1194/tcp
|
|
||||||
openvpn 1194/udp
|
|
||||||
rmiregistry 1099/tcp # Java RMI Registry
|
|
||||||
lotusnote 1352/tcp lotusnotes # Lotus Note
|
|
||||||
ms-sql-s 1433/tcp # Microsoft SQL Server
|
|
||||||
ms-sql-m 1434/udp # Microsoft SQL Monitor
|
|
||||||
ingreslock 1524/tcp
|
|
||||||
datametrics 1645/tcp old-radius
|
|
||||||
datametrics 1645/udp old-radius
|
|
||||||
sa-msg-port 1646/tcp old-radacct
|
|
||||||
sa-msg-port 1646/udp old-radacct
|
|
||||||
kermit 1649/tcp
|
|
||||||
groupwise 1677/tcp
|
|
||||||
l2f 1701/udp l2tp
|
|
||||||
radius 1812/tcp
|
|
||||||
radius 1812/udp
|
|
||||||
radius-acct 1813/tcp radacct # Radius Accounting
|
|
||||||
radius-acct 1813/udp radacct
|
|
||||||
cisco-sccp 2000/tcp # Cisco SCCP
|
|
||||||
nfs 2049/tcp # Network File System
|
|
||||||
nfs 2049/udp # Network File System
|
|
||||||
gnunet 2086/tcp
|
|
||||||
gnunet 2086/udp
|
|
||||||
rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99
|
|
||||||
rtcm-sc104 2101/udp
|
|
||||||
gsigatekeeper 2119/tcp
|
|
||||||
gris 2135/tcp # Grid Resource Information Server
|
|
||||||
cvspserver 2401/tcp # CVS client/server operations
|
|
||||||
venus 2430/tcp # codacon port
|
|
||||||
venus 2430/udp # Venus callback/wbc interface
|
|
||||||
venus-se 2431/tcp # tcp side effects
|
|
||||||
venus-se 2431/udp # udp sftp side effect
|
|
||||||
codasrv 2432/tcp # not used
|
|
||||||
codasrv 2432/udp # server port
|
|
||||||
codasrv-se 2433/tcp # tcp side effects
|
|
||||||
codasrv-se 2433/udp # udp sftp side effect
|
|
||||||
mon 2583/tcp # MON traps
|
|
||||||
mon 2583/udp
|
|
||||||
dict 2628/tcp # Dictionary server
|
|
||||||
f5-globalsite 2792/tcp
|
|
||||||
gsiftp 2811/tcp
|
|
||||||
gpsd 2947/tcp
|
|
||||||
gds-db 3050/tcp gds_db # InterBase server
|
|
||||||
icpv2 3130/udp icp # Internet Cache Protocol
|
|
||||||
isns 3205/tcp # iSNS Server Port
|
|
||||||
isns 3205/udp # iSNS Server Port
|
|
||||||
iscsi-target 3260/tcp
|
|
||||||
mysql 3306/tcp
|
|
||||||
ms-wbt-server 3389/tcp
|
|
||||||
nut 3493/tcp # Network UPS Tools
|
|
||||||
nut 3493/udp
|
|
||||||
distcc 3632/tcp # distributed compiler
|
|
||||||
daap 3689/tcp # Digital Audio Access Protocol
|
|
||||||
svn 3690/tcp subversion # Subversion protocol
|
|
||||||
suucp 4031/tcp # UUCP over SSL
|
|
||||||
sysrqd 4094/tcp # sysrq daemon
|
|
||||||
sieve 4190/tcp # ManageSieve Protocol
|
|
||||||
epmd 4369/tcp # Erlang Port Mapper Daemon
|
|
||||||
remctl 4373/tcp # Remote Authenticated Command Service
|
|
||||||
f5-iquery 4353/tcp # F5 iQuery
|
|
||||||
ntske 4460/tcp # Network Time Security Key Establishment
|
|
||||||
ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947]
|
|
||||||
iax 4569/udp # Inter-Asterisk eXchange
|
|
||||||
mtn 4691/tcp # monotone Netsync Protocol
|
|
||||||
radmin-port 4899/tcp # RAdmin Port
|
|
||||||
sip 5060/tcp # Session Initiation Protocol
|
|
||||||
sip 5060/udp
|
|
||||||
sip-tls 5061/tcp
|
|
||||||
sip-tls 5061/udp
|
|
||||||
xmpp-client 5222/tcp jabber-client # Jabber Client Connection
|
|
||||||
xmpp-server 5269/tcp jabber-server # Jabber Server Connection
|
|
||||||
cfengine 5308/tcp
|
|
||||||
mdns 5353/udp # Multicast DNS
|
|
||||||
postgresql 5432/tcp postgres # PostgreSQL Database
|
|
||||||
freeciv 5556/tcp rptp # Freeciv gameplay
|
|
||||||
amqps 5671/tcp # AMQP protocol over TLS/SSL
|
|
||||||
amqp 5672/tcp
|
|
||||||
amqp 5672/sctp
|
|
||||||
x11 6000/tcp x11-0 # X Window System
|
|
||||||
x11-1 6001/tcp
|
|
||||||
x11-2 6002/tcp
|
|
||||||
x11-3 6003/tcp
|
|
||||||
x11-4 6004/tcp
|
|
||||||
x11-5 6005/tcp
|
|
||||||
x11-6 6006/tcp
|
|
||||||
x11-7 6007/tcp
|
|
||||||
gnutella-svc 6346/tcp # gnutella
|
|
||||||
gnutella-svc 6346/udp
|
|
||||||
gnutella-rtr 6347/tcp # gnutella
|
|
||||||
gnutella-rtr 6347/udp
|
|
||||||
redis 6379/tcp
|
|
||||||
sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service
|
|
||||||
sge-execd 6445/tcp sge_execd # Grid Engine Execution Service
|
|
||||||
mysql-proxy 6446/tcp # MySQL Proxy
|
|
||||||
babel 6696/udp # Babel Routing Protocol
|
|
||||||
ircs-u 6697/tcp # Internet Relay Chat via TLS/SSL
|
|
||||||
bbs 7000/tcp
|
|
||||||
afs3-fileserver 7000/udp
|
|
||||||
afs3-callback 7001/udp # callbacks to cache managers
|
|
||||||
afs3-prserver 7002/udp # users & groups database
|
|
||||||
afs3-vlserver 7003/udp # volume location database
|
|
||||||
afs3-kaserver 7004/udp # AFS/Kerberos authentication
|
|
||||||
afs3-volser 7005/udp # volume managment server
|
|
||||||
afs3-bos 7007/udp # basic overseer process
|
|
||||||
afs3-update 7008/udp # server-to-server updater
|
|
||||||
afs3-rmtsys 7009/udp # remote cache manager service
|
|
||||||
font-service 7100/tcp xfs # X Font Service
|
|
||||||
http-alt 8080/tcp webcache # WWW caching service
|
|
||||||
puppet 8140/tcp # The Puppet master service
|
|
||||||
bacula-dir 9101/tcp # Bacula Director
|
|
||||||
bacula-fd 9102/tcp # Bacula File Daemon
|
|
||||||
bacula-sd 9103/tcp # Bacula Storage Daemon
|
|
||||||
xmms2 9667/tcp # Cross-platform Music Multiplexing System
|
|
||||||
nbd 10809/tcp # Linux Network Block Device
|
|
||||||
zabbix-agent 10050/tcp # Zabbix Agent
|
|
||||||
zabbix-trapper 10051/tcp # Zabbix Trapper
|
|
||||||
amanda 10080/tcp # amanda backup services
|
|
||||||
dicom 11112/tcp
|
|
||||||
hkp 11371/tcp # OpenPGP HTTP Keyserver
|
|
||||||
db-lsp 17500/tcp # Dropbox LanSync Protocol
|
|
||||||
dcap 22125/tcp # dCache Access Protocol
|
|
||||||
gsidcap 22128/tcp # GSI dCache Access Protocol
|
|
||||||
wnn6 22273/tcp # wnn6
|
|
||||||
|
|
||||||
#
|
|
||||||
# Datagram Delivery Protocol services
|
|
||||||
#
|
|
||||||
rtmp 1/ddp # Routing Table Maintenance Protocol
|
|
||||||
nbp 2/ddp # Name Binding Protocol
|
|
||||||
echo 4/ddp # AppleTalk Echo Protocol
|
|
||||||
zip 6/ddp # Zone Information Protocol
|
|
||||||
|
|
||||||
#=========================================================================
|
|
||||||
# The remaining port numbers are not as allocated by IANA.
|
|
||||||
#=========================================================================
|
|
||||||
|
|
||||||
# Kerberos (Project Athena/MIT) services
|
|
||||||
kerberos4 750/udp kerberos-iv kdc # Kerberos (server)
|
|
||||||
kerberos4 750/tcp kerberos-iv kdc
|
|
||||||
kerberos-master 751/udp kerberos_master # Kerberos authentication
|
|
||||||
kerberos-master 751/tcp
|
|
||||||
passwd-server 752/udp passwd_server # Kerberos passwd server
|
|
||||||
krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation
|
|
||||||
zephyr-srv 2102/udp # Zephyr server
|
|
||||||
zephyr-clt 2103/udp # Zephyr serv-hm connection
|
|
||||||
zephyr-hm 2104/udp # Zephyr hostmanager
|
|
||||||
iprop 2121/tcp # incremental propagation
|
|
||||||
supfilesrv 871/tcp # Software Upgrade Protocol server
|
|
||||||
supfiledbg 1127/tcp # Software Upgrade Protocol debugging
|
|
||||||
|
|
||||||
#
|
|
||||||
# Services added for the Debian GNU/Linux distribution
|
|
||||||
#
|
|
||||||
poppassd 106/tcp # Eudora
|
|
||||||
moira-db 775/tcp moira_db # Moira database
|
|
||||||
moira-update 777/tcp moira_update # Moira update protocol
|
|
||||||
moira-ureg 779/udp moira_ureg # Moira user registration
|
|
||||||
spamd 783/tcp # spamassassin daemon
|
|
||||||
skkserv 1178/tcp # skk jisho server port
|
|
||||||
predict 1210/udp # predict -- satellite tracking
|
|
||||||
rmtcfg 1236/tcp # Gracilis Packeten remote config server
|
|
||||||
xtel 1313/tcp # french minitel
|
|
||||||
xtelw 1314/tcp # french minitel
|
|
||||||
zebrasrv 2600/tcp # zebra service
|
|
||||||
zebra 2601/tcp # zebra vty
|
|
||||||
ripd 2602/tcp # ripd vty (zebra)
|
|
||||||
ripngd 2603/tcp # ripngd vty (zebra)
|
|
||||||
ospfd 2604/tcp # ospfd vty (zebra)
|
|
||||||
bgpd 2605/tcp # bgpd vty (zebra)
|
|
||||||
ospf6d 2606/tcp # ospf6d vty (zebra)
|
|
||||||
ospfapi 2607/tcp # OSPF-API
|
|
||||||
isisd 2608/tcp # ISISd vty (zebra)
|
|
||||||
fax 4557/tcp # FAX transmission service (old)
|
|
||||||
hylafax 4559/tcp # HylaFAX client-server protocol (new)
|
|
||||||
munin 4949/tcp lrrd # Munin
|
|
||||||
rplay 5555/udp # RPlay audio service
|
|
||||||
nrpe 5666/tcp # Nagios Remote Plugin Executor
|
|
||||||
nsca 5667/tcp # Nagios Agent - NSCA
|
|
||||||
canna 5680/tcp # cannaserver
|
|
||||||
syslog-tls 6514/tcp # Syslog over TLS [RFC5425]
|
|
||||||
sane-port 6566/tcp sane saned # SANE network scanner daemon
|
|
||||||
ircd 6667/tcp # Internet Relay Chat
|
|
||||||
zope-ftp 8021/tcp # zope management by ftp
|
|
||||||
tproxy 8081/tcp # Transparent Proxy
|
|
||||||
omniorb 8088/tcp # OmniORB
|
|
||||||
clc-build-daemon 8990/tcp # Common lisp build daemon
|
|
||||||
xinetd 9098/tcp
|
|
||||||
git 9418/tcp # Git Version Control System
|
|
||||||
zope 9673/tcp # zope server
|
|
||||||
webmin 10000/tcp
|
|
||||||
kamanda 10081/tcp # amanda backup services (Kerberos)
|
|
||||||
amandaidx 10082/tcp # amanda backup services
|
|
||||||
amidxtape 10083/tcp # amanda backup services
|
|
||||||
sgi-cmsd 17001/udp # Cluster membership services daemon
|
|
||||||
sgi-crsd 17002/udp
|
|
||||||
sgi-gcd 17003/udp # SGI Group membership daemon
|
|
||||||
sgi-cad 17004/tcp # Cluster Admin daemon
|
|
||||||
binkp 24554/tcp # binkp fidonet protocol
|
|
||||||
asp 27374/tcp # Address Search Protocol
|
|
||||||
asp 27374/udp
|
|
||||||
csync2 30865/tcp # cluster synchronization tool
|
|
||||||
dircproxy 57000/tcp # Detachable IRC Proxy
|
|
||||||
tfido 60177/tcp # fidonet EMSI over telnet
|
|
||||||
fido 60179/tcp # fidonet EMSI over TCP
|
|
||||||
|
|
||||||
# Local services
|
|
||||||
@@ -1 +1 @@
|
|||||||
Subsystem cli /usr/bin/klish
|
Subsystem cli /usr/bin/clixon_cli
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
# https://addiva-elektronik.github.io/2023/03/29/bridge-firewalling/
|
|
||||||
net.bridge.bridge-nf-call-ip6tables = 0
|
|
||||||
net.bridge.bridge-nf-call-iptables = 0
|
|
||||||
net.bridge.bridge-nf-call-arptables = 0
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
net.ipv4.ip_forward=1
|
|
||||||
net.ipv6.conf.all.forwarding=1
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
net.core.fb_tunnels_only_for_init_net=2
|
|
||||||
net.core.rmem_max=1000000
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
local7.* -/var/log/profinet.log
|
||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This is an unmanaged node, leave /etc as-is
|
||||||
|
/lib/infix/use-etc && exit 0
|
||||||
|
|
||||||
|
# This is a managed node, ignore all default configuration ...
|
||||||
|
# ... except for some core services
|
||||||
|
reserved()
|
||||||
|
{
|
||||||
|
for svc in clixon getty lldpd nginx sysklogd; do
|
||||||
|
[ "$1" = "${svc}.conf" ] && return 0
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
for file in /etc/finit.d/enabled/*.conf; do
|
||||||
|
reserved "$(basename "$file")" && continue
|
||||||
|
rm "$file"
|
||||||
|
done
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Called from /etc/fstab to ensure we have something writable mounted
|
# Called from /etc/fstab to ensure we have something writable mounted
|
||||||
# at /cfg, /etc, /home, /root, and /var.
|
# at /cfg, /etc, /home, /root, and /var.
|
||||||
#
|
#
|
||||||
# /mnt/cfg is used to store device modifications made to /etc, /home,
|
# /mnt/cfg is used to store device modifications made to /etc, /home,
|
||||||
# /root.
|
# /root.
|
||||||
#
|
#
|
||||||
# /mnt/var is used as the backing store for /var. If /mnt/var isn't
|
# /mnt/var is used as the backins store for /var. If /mnt/var is not
|
||||||
# available, /mnt/cfg will still be be used to persist /var/lib.
|
# available, /mnt/cfg will still be be used to persist /var/lib.
|
||||||
#
|
#
|
||||||
# If a disk partiion with the corresponding label ("cfg"/"var") is
|
# If a disk partiion with the corresponding label ("cfg"/"var") is
|
||||||
@@ -13,7 +14,6 @@
|
|||||||
# directories. Otherwise fall back to a tmpfs based RAM disk. This
|
# directories. Otherwise fall back to a tmpfs based RAM disk. This
|
||||||
# effectively brings up the system with the default configuration, but
|
# effectively brings up the system with the default configuration, but
|
||||||
# obviously any subsequent configuration is ephemeral.
|
# obviously any subsequent configuration is ephemeral.
|
||||||
. /etc/os-release
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -32,21 +32,6 @@ mount_rw()
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Bind mount /var or /var/lib to ensure applications like podman can set
|
|
||||||
# up overlay mounts for containers. Overlays cannot sit on top of other
|
|
||||||
# overlays. We always copy the contents of /var or /var/lib from the
|
|
||||||
# rootfs to get updates, e.g., new packages added in an upgrade.
|
|
||||||
mount_bind()
|
|
||||||
{
|
|
||||||
src="$1"
|
|
||||||
dst="$2"
|
|
||||||
|
|
||||||
mkdir -p "$src"
|
|
||||||
cp -af "$dst/." "$src/" ||:
|
|
||||||
|
|
||||||
mount -o bind "$src" "$dst"
|
|
||||||
}
|
|
||||||
|
|
||||||
# mkdir -p -m 0755 only applies to the deepest directory
|
# mkdir -p -m 0755 only applies to the deepest directory
|
||||||
# shellcheck disable=SC2174
|
# shellcheck disable=SC2174
|
||||||
mount_overlay()
|
mount_overlay()
|
||||||
@@ -79,11 +64,7 @@ if ! mount_rw var >/dev/null 2>&1; then
|
|||||||
logger $opt -p user.warn -t "$nm" \
|
logger $opt -p user.warn -t "$nm" \
|
||||||
"No persistent storage found for /var, only /var/lib is persisted."
|
"No persistent storage found for /var, only /var/lib is persisted."
|
||||||
varsrc=/mnt/tmp
|
varsrc=/mnt/tmp
|
||||||
vlibsrc=/mnt/cfg/vlib
|
vlibsrc=/mnt/cfg
|
||||||
else
|
|
||||||
mount_bind "$varsrc" /var
|
|
||||||
varsrc=
|
|
||||||
vlibsrc=
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cfgsrc=/mnt/cfg
|
cfgsrc=/mnt/cfg
|
||||||
@@ -107,8 +88,7 @@ else
|
|||||||
sync
|
sync
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check build: NETCONF or Classic
|
if /lib/infix/use-etc; then
|
||||||
if [ "$VARIANT_ID" != "netconf" ]; then
|
|
||||||
etcsrc=/mnt/cfg
|
etcsrc=/mnt/cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -121,9 +101,9 @@ mount_overlay cfg $cfgsrc /cfg
|
|||||||
mount_overlay etc $etcsrc /etc
|
mount_overlay etc $etcsrc /etc
|
||||||
mount_overlay home $cfgsrc /home
|
mount_overlay home $cfgsrc /home
|
||||||
mount_overlay root $cfgsrc /root
|
mount_overlay root $cfgsrc /root
|
||||||
|
mount_overlay var $varsrc /var
|
||||||
|
|
||||||
[ "$varsrc" ] && mount_overlay var "$varsrc" /var
|
[ "$vlibsrc" ] && mount_overlay vlib "$vlibsrc" /var/lib
|
||||||
[ "$vlibsrc" ] && mount_bind "$vlibsrc" /var/lib
|
|
||||||
|
|
||||||
# Keep transient configs in a ramdisk and symlink out to /cfg for
|
# Keep transient configs in a ramdisk and symlink out to /cfg for
|
||||||
# startup.
|
# startup.
|
||||||
|
|||||||
@@ -25,14 +25,19 @@ for netif in /sys/class/net/*; do
|
|||||||
|
|
||||||
dsa="dsa$num"
|
dsa="dsa$num"
|
||||||
logger -k -p user.notice -t "$ident" "Found DSA interface, renaming $iface -> $dsa"
|
logger -k -p user.notice -t "$ident" "Found DSA interface, renaming $iface -> $dsa"
|
||||||
ip link set dev "$iface" name $dsa group internal
|
ip link set dev "$iface" name $dsa
|
||||||
num=$((num + 1))
|
num=$((num + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
# Find and mark all switch ports
|
# Find and mark all switch ports
|
||||||
ports=$(devlink -j port | jq -r '.port[]
|
ports=$(devlink port 2>/dev/null | awk '/flavour physical/{print $5}')
|
||||||
| select(.flavour == "physical")
|
for iface in $ports; do
|
||||||
| .netdev')
|
ip link set "$iface" group port
|
||||||
|
done
|
||||||
|
|
||||||
|
# Testing, e.g., using /etc/mactab may use TAP devices to create
|
||||||
|
# emulated switch ports, make sure to mark them as well
|
||||||
|
ports=$(ip -json link | jq -r '.[].ifname | match("^e[[:digit:]]+").string')
|
||||||
for iface in $ports; do
|
for iface in $ports; do
|
||||||
ip link set "$iface" group port
|
ip link set "$iface" group port
|
||||||
done
|
done
|
||||||
|
|||||||
Executable
+19
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
FACTORY=/mnt/tmp/infix/db/factory_db
|
||||||
|
|
||||||
|
# TODO: Maybe copy in a proper factory config from
|
||||||
|
# /usr/share/vendor/<hardware-id>_db or similar.
|
||||||
|
# Right now we generate one from probed data.
|
||||||
|
cat <<EOF >$FACTORY
|
||||||
|
<config>
|
||||||
|
<restconf xmlns="http://clicon.org/restconf">
|
||||||
|
<enable>true</enable>
|
||||||
|
<auth-type>none</auth-type>
|
||||||
|
<fcgi-socket>/run/clixon/restconf.sock</fcgi-socket>
|
||||||
|
</restconf>
|
||||||
|
</config>
|
||||||
|
EOF
|
||||||
|
|
||||||
|
[ -f /cfg/startup_db ] || cp "$FACTORY" /cfg/startup_db
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Probe for various types of harware features
|
|
||||||
|
|
||||||
if dmesg |grep -q QEMU || test -d /sys/module/qemu_fw_cfg; then
|
|
||||||
initctl cond set qemu
|
|
||||||
fi
|
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for type in ecdsa ed25519 rsa; do
|
||||||
|
[ -f /var/lib/ssh/ssh_host_${type}_key ] \
|
||||||
|
|| ssh-keygen -N "" -t $type -f /var/lib/ssh/ssh_host_${type}_key \
|
||||||
|
|| exit 1
|
||||||
|
done
|
||||||
|
|
||||||
|
initctl cond set ssh-hostkeys
|
||||||
Executable
+38
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Only runs in native /etc and PROFINET nodes.
|
||||||
|
|
||||||
|
if initctl cond get boot/profinet; then
|
||||||
|
initctl enable snmpd
|
||||||
|
initctl disable lldpd
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Factory default: all switch ports in VLAN 1 of br0
|
||||||
|
# need to check for 'length > 0' because ip command
|
||||||
|
# outputs empty json objects for non-port group ifs
|
||||||
|
ports=$(ip -json link show group port | jq -r '.[].ifname | select(length > 0)' | tr "\n" " ")
|
||||||
|
[ -f /etc/network/interfaces.d/br0 ] || [ -z "$ports" ] && exit 0
|
||||||
|
|
||||||
|
touch /etc/network/interfaces.d/br0
|
||||||
|
for port in $ports; do
|
||||||
|
cat <<-EOF >>/etc/network/interfaces.d/br0
|
||||||
|
iface $port
|
||||||
|
bridge-access 1
|
||||||
|
post-up ip link set $port group port
|
||||||
|
EOF
|
||||||
|
done
|
||||||
|
cat <<-EOF >>/etc/network/interfaces.d/br0
|
||||||
|
|
||||||
|
auto br0
|
||||||
|
iface br0
|
||||||
|
bridge-ports $ports
|
||||||
|
bridge-vlan-aware yes
|
||||||
|
bridge-stp on
|
||||||
|
bridge-vids 1
|
||||||
|
|
||||||
|
auto vlan1
|
||||||
|
iface vlan1 inet dhcp
|
||||||
|
vlan-id 1
|
||||||
|
vlan-raw-device br0
|
||||||
|
post-up ip link set vlan1 group iface
|
||||||
|
EOF
|
||||||
|
ip link set vlan1 group iface
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# When changing default IPv4/6 settings, this does not apply to
|
|
||||||
# existing interfaces. This syncs the default settings to all known
|
|
||||||
# interfaces at boot, such that physical interfaces will start from
|
|
||||||
# the same point as virtual ones.
|
|
||||||
tmp=$(mktemp)
|
|
||||||
|
|
||||||
sysctl net.ipv4.conf.default >$tmp
|
|
||||||
sysctl net.ipv6.conf.default >>$tmp
|
|
||||||
|
|
||||||
for iface in $(ip -j link show | jq -r .[].ifname); do
|
|
||||||
sed -e "s/.default./.${iface}./g" $tmp | sysctl -p -
|
|
||||||
done
|
|
||||||
|
|
||||||
rm $tmp
|
|
||||||
|
|
||||||
Executable
+21
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -f /mnt/cfg/infix/.use_etc ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Finit's condition system may not yet be bootstrapped when this script
|
||||||
|
# is called, e.g., when /etc/fstab is parsed, so we have to manually
|
||||||
|
# check for the boot/etc condition.
|
||||||
|
awk '
|
||||||
|
$0 == "finit.cond" {
|
||||||
|
cond=1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
cond == 1 {
|
||||||
|
use_etc = index($0, "etc") != 0;
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
exit(use_etc ? 0 : 1);
|
||||||
|
}
|
||||||
|
' /proc/1/cmdline
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Override boot mode based on user input from setup tool
|
||||||
|
|
||||||
|
set_cond()
|
||||||
|
{
|
||||||
|
mkdir -p /run/finit/cond/boot
|
||||||
|
ln -s /run/finit/cond/reconf "/run/finit/cond/boot/$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Report to the setup and show tools the current boot mode
|
||||||
|
if /lib/infix/use-etc; then
|
||||||
|
if [ -f /mnt/cfg/infix/.use_etc ]; then
|
||||||
|
cat /mnt/cfg/infix/.use_etc > /tmp/.boot_mode
|
||||||
|
if grep -qi profinet /mnt/cfg/infix/.use_etc; then
|
||||||
|
set_cond profinet
|
||||||
|
else
|
||||||
|
set_cond etc
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "native /etc" > /tmp/.boot_mode
|
||||||
|
set_cond etc
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "NETCONF" > /tmp/.boot_mode
|
||||||
|
set_cond netconf
|
||||||
|
fi
|
||||||
@@ -1,181 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
inform()
|
|
||||||
{
|
|
||||||
local level="$1"
|
|
||||||
shift
|
|
||||||
|
|
||||||
logger -p "daemon.$level" -t dagger -c $LOGGER_STDOUT "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
abort()
|
|
||||||
{
|
|
||||||
inform err "Aborting: $*"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
generate_order()
|
|
||||||
{
|
|
||||||
[ -f "$1/bottom-up-order" ] && [ -f "$1/top-down-order" ] && return
|
|
||||||
|
|
||||||
# The bottom-up order corresponds to a DFS through the DAG, with
|
|
||||||
# duplicates removed
|
|
||||||
find -L "$1/dag" -depth -mindepth 1 -exec basename {} \; \
|
|
||||||
| awk '!seen[$0]++' \
|
|
||||||
>"$1/bottom-up-order"
|
|
||||||
|
|
||||||
# The reverse is a valid top-down order
|
|
||||||
sed '1!G;h;$!d' "$1/bottom-up-order" >"$1/top-down-order"
|
|
||||||
}
|
|
||||||
|
|
||||||
action_exec()
|
|
||||||
{
|
|
||||||
local actdir="$2/action/$1"
|
|
||||||
local orderfile="$actdir/order"
|
|
||||||
local code=0
|
|
||||||
|
|
||||||
generate_order "$2"
|
|
||||||
|
|
||||||
if [ ! -r "$orderfile" ]; then
|
|
||||||
orderfile="$2/bottom-up-order"
|
|
||||||
inform warn "No order defined for $actdir, falling back to bottom-up"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local order=$(cat "$orderfile")
|
|
||||||
|
|
||||||
[ -d "$actdir/@pre" ] && order="@pre $order"
|
|
||||||
[ -d "$actdir/@post" ] && order="$order @post"
|
|
||||||
|
|
||||||
for node in $order; do
|
|
||||||
for work in $(find "$actdir/$node" -type f -executable 2>/dev/null | sort); do
|
|
||||||
$work >>"$work.log" 2>&1 || code=$?
|
|
||||||
echo "[exit:$code]" >>"$work.log"
|
|
||||||
|
|
||||||
[ $code -eq 0 ] || abort "$work failed with exitcode $code"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
do_exec()
|
|
||||||
{
|
|
||||||
local action="$1"
|
|
||||||
local current=
|
|
||||||
|
|
||||||
current=$([ -f "$basedir/current" ] && cat "$basedir/current")
|
|
||||||
[ "$current" ] && [ -d "$basedir/$current" ] \
|
|
||||||
|| abort "Current generation does not exist"
|
|
||||||
|
|
||||||
action_exec "$1" "$basedir/$current"
|
|
||||||
}
|
|
||||||
|
|
||||||
do_abandon()
|
|
||||||
{
|
|
||||||
local next=
|
|
||||||
|
|
||||||
next=$([ -f "$basedir/next" ] && cat "$basedir/next" || true)
|
|
||||||
[ "$next" ] && [ -d "$basedir/$next" ] \
|
|
||||||
|| abort "Next generation does not exist"
|
|
||||||
|
|
||||||
mv "$basedir/$next" "$basedir/$next-ABANDONED-$(date +%F-%T)"
|
|
||||||
rm "$basedir/next"
|
|
||||||
inform info "Abandoned generation $next"
|
|
||||||
}
|
|
||||||
|
|
||||||
do_evolve()
|
|
||||||
{
|
|
||||||
local current=
|
|
||||||
local next=
|
|
||||||
|
|
||||||
current=$([ -f "$basedir/current" ] && cat "$basedir/current" || true)
|
|
||||||
[ ! "$current" ] || [ -d "$basedir/$current" ] \
|
|
||||||
|| abort "Current generation does not exist"
|
|
||||||
|
|
||||||
next=$([ -f "$basedir/next" ] && cat "$basedir/next" || true)
|
|
||||||
[ "$next" ] && [ -d "$basedir/$next" ] \
|
|
||||||
|| abort "Next generation does not exist"
|
|
||||||
|
|
||||||
[ "$current" ] && action_exec exit "$basedir/$current"
|
|
||||||
|
|
||||||
action_exec init "$basedir/$next"
|
|
||||||
|
|
||||||
mv "$basedir/next" "$basedir/current"
|
|
||||||
inform info "Evolved to generation $next"
|
|
||||||
}
|
|
||||||
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
cat <<EOF
|
|
||||||
usage: dagger [-d] [-C <root>] <command> [<args>]
|
|
||||||
|
|
||||||
Directed Acyclic Graph Generational Execution Runner
|
|
||||||
|
|
||||||
Global options:
|
|
||||||
|
|
||||||
-d
|
|
||||||
In addition to the system log, also log messages to stderr.
|
|
||||||
|
|
||||||
-C <root>
|
|
||||||
Instead of the current working directory, use <root> as the dagger
|
|
||||||
root directory.
|
|
||||||
|
|
||||||
Commands:
|
|
||||||
|
|
||||||
abandon
|
|
||||||
Abandon a prepared, but not yet applied, next generation.
|
|
||||||
|
|
||||||
evolve
|
|
||||||
Run the exit action of the current generation, followed by the
|
|
||||||
init action of the next generation.
|
|
||||||
|
|
||||||
exec <action>
|
|
||||||
Run the specified action of the current generation.
|
|
||||||
|
|
||||||
help
|
|
||||||
Show this message.
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
basedir=$(pwd)
|
|
||||||
|
|
||||||
# Global options
|
|
||||||
while getopts "dC:" opt; do
|
|
||||||
case $opt in
|
|
||||||
d)
|
|
||||||
LOGGER_STDOUT=-s
|
|
||||||
;;
|
|
||||||
C)
|
|
||||||
basedir=$OPTARG
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
usage && exit 1
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
shift $((OPTIND - 1))
|
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
|
||||||
usage && exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmd=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
case $cmd in
|
|
||||||
"help")
|
|
||||||
usage && exit 0
|
|
||||||
;;
|
|
||||||
"abandon")
|
|
||||||
do_abandon
|
|
||||||
;;
|
|
||||||
"evolve")
|
|
||||||
do_evolve
|
|
||||||
;;
|
|
||||||
"exec")
|
|
||||||
do_exec "$@"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
usage && exit 1
|
|
||||||
esac
|
|
||||||
@@ -1 +1 @@
|
|||||||
mg
|
nano
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user