mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 09:13:01 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76ddbc77a4 |
+20
-36
@@ -11,7 +11,7 @@ Talking about code and problems first is often the best way to get started
|
||||
before submitting a pull request.
|
||||
|
||||
When submitting a bug report, patch, or pull request, please 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
|
||||
commit message format. If you follow these recommendations you help
|
||||
@@ -21,28 +21,13 @@ the maintainer(s) and make it easier for them to include your code.
|
||||
Coding Style
|
||||
------------
|
||||
|
||||
Before jumping into code, remember to **document new features** and bug
|
||||
fixes. Both the manual and ChangeLog are in the `doc/` sub-directory
|
||||
and it is expected that you provide a human-readable summary for the
|
||||
release notes (ChangeLog) and at least a configuration example in the
|
||||
manual for new features.
|
||||
> **Tip:** Always submit code that follows the style of surrounding code!
|
||||
|
||||
> **Tip:** consider ["Readme driven development"][RDD] for new features.
|
||||
> It is amazing how many flaws in your own bright ideas come to bare
|
||||
> when you suddenly have to explain them to someone else!
|
||||
First of all, lines are allowed to be longer than 72 characters these
|
||||
days. In fact, there exist no enforced maximum, but keeping it around
|
||||
100 chars is OK.
|
||||
|
||||
We expect code contributions for:
|
||||
|
||||
- C code in [Linux Coding Style][Linux]
|
||||
- Python code should follow [PEP-8][]
|
||||
|
||||
> **However,** always submit code that follows the style of surrounding
|
||||
> code! Legacy takes precedence, and remember, we read code a lot more
|
||||
> than write it, so legibility is important.
|
||||
|
||||
As a final note, lines are allowed to be longer than 72 characters these
|
||||
days. There is no enforced maximum, but the team usually keep it around
|
||||
100 characters for both C and Python.
|
||||
The coding style itself is otherwise strictly Linux [KNF][].
|
||||
|
||||
|
||||
Commit Messages
|
||||
@@ -52,21 +37,22 @@ Commit messages exist to track *why* a change was made. Try to be as
|
||||
clear and concise as possible in your commit messages, and always, be
|
||||
proud of your work and set up a proper GIT identity for your commits:
|
||||
|
||||
$ git config --global user.name "Jacky Linker"
|
||||
$ git config --global user.email jacky.linker@example.com
|
||||
git config --global user.name "Jane Doe"
|
||||
git config --global user.email jane.doe@example.com
|
||||
|
||||
Example commit message from the [Pro Git][gitbook] online book, notice
|
||||
how `git commit -s` is used to automatically add a `Signed-off-by`:
|
||||
|
||||
subsystem: brief, but clear and concise summary of changes
|
||||
Brief, but clear and concise summary of changes
|
||||
|
||||
More detailed explanatory text, if necessary. Wrap it to about 72
|
||||
characters or so. In some contexts, the first line is treated as
|
||||
the subject of an email and the rest of the text as the body. The
|
||||
empty line separating summary from body is critical. Tools like
|
||||
rebase can get confused if the empty line is missing.
|
||||
blank line separating the ummary from the body is critical (unless
|
||||
you omit the body entirely); tools like rebase can get confused if
|
||||
you run the two together.
|
||||
|
||||
Further paragraphs should be separated with empty lines.
|
||||
Further paragraphs come after blank lines.
|
||||
|
||||
- Bullet points are okay, too
|
||||
|
||||
@@ -74,19 +60,17 @@ how `git commit -s` is used to automatically add a `Signed-off-by`:
|
||||
by a single space, with blank lines in between, but conventions
|
||||
vary here
|
||||
|
||||
Signed-off-by: Jacky Linker <jacky.linker@example.com>
|
||||
Signed-off-by: Jane Doe <jane.doe@example.com>
|
||||
|
||||
|
||||
Code of Conduct
|
||||
---------------
|
||||
|
||||
It is expected of everyone to respect the [Code of Conduct][conduct].
|
||||
The *"maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, discussion forum threads, issues, and
|
||||
other contributions that are not aligned to this Code of Conduct."*
|
||||
The *"maintainers have the right and responsibility to remove, edit,
|
||||
or reject comments, commits, code, wiki edits, issues, and other
|
||||
contributions that are not aligned to this Code of Conduct."*
|
||||
|
||||
[Linux]: https://www.kernel.org/doc/html/v6.9/process/coding-style.html
|
||||
[PEP-8]: https://peps.python.org/pep-0008/
|
||||
[RDD]: https://tom.preston-werner.com/2010/08/23/readme-driven-development
|
||||
[gitbook]: https://git-scm.com/book/ch5-2.html
|
||||
[conduct]: CODE-OF-CONDUCT.md
|
||||
[KNF]: https://en.wikipedia.org/wiki/Kernel_Normal_Form
|
||||
[gitbook]: https://git-scm.com/book/ch5-2.html
|
||||
[conduct]: CODE-OF-CONDUCT.md
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
||||
name: "\U0001F41E Bug report"
|
||||
description: Create a bug report
|
||||
labels:
|
||||
- "bug"
|
||||
- "triage"
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Thank :heart: you for taking the time to fill out this bug report!**
|
||||
|
||||
We kindly ask that you search to see if an issue [already exists](https://github.com/kernelkit/infix/issues?q=is%3Aissue+sort%3Acreated-desc+) for the bug you encountered.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Current Behavior
|
||||
description: |
|
||||
A clear and concise description of the issue you're experiencing.
|
||||
value: |
|
||||
For code snippets, logs, commands, etc., please use triple backticks:
|
||||
```
|
||||
admin@infix-c0-ff-ee:/> show log
|
||||
May 15 07:21:02 infix-00-00-00 container[3192]: Failed creating container test from curios-httpd-v24.03.0
|
||||
- (press h for help or q to quit)
|
||||
```
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: |
|
||||
A clear and concise description of what you expected to happen.
|
||||
value: |
|
||||
```
|
||||
admin@infix-c0-ff-ee:/> show log
|
||||
May 15 07:21:02 infix-c0-ff-ee container[3192]: Successfully created container test from curios-httpd-v24.03.0
|
||||
- (press h for help or q to quit)
|
||||
```
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: |
|
||||
Steps to reproduce the issue. For example:
|
||||
|
||||
1. Built from source
|
||||
2. Upgrade to latest release, vYY.MM.P
|
||||
3. Factory reset
|
||||
4. Enable feature
|
||||
5. Check the logs/show command/operational status
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional information
|
||||
description: |
|
||||
- Relevant parts of `startup-config`
|
||||
- Output from `show interfaces`, if applicable
|
||||
- Other observations, screenshots, log files ...
|
||||
|
||||
**Tip:** You can attach images or log files by clicking this area to highlight it and then dragging files in.
|
||||
validations:
|
||||
required: false
|
||||
@@ -1,7 +0,0 @@
|
||||
contact_links:
|
||||
- name: "🔍 Look for my Issue"
|
||||
url: https://github.com/kernelkit/infix/issues?q=is%3Aissue+sort%3Acreated-desc+
|
||||
about: Thank ❤️ you for your time! We kindly ask that you first check if an issue already exists.
|
||||
- name: "💬 Discussions and Q&A"
|
||||
url: https://github.com/kernelkit/infix/discussions
|
||||
about: Discussions are perfect for quick questions, bouncing ideas, and things that may be a bug.
|
||||
@@ -1,45 +0,0 @@
|
||||
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
|
||||
name: "\U0001F6E0️ Feature request"
|
||||
description: Suggest a new feature, idea or improvement of the OS
|
||||
labels:
|
||||
- "feature"
|
||||
- "triage"
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Thank :heart: you for taking the time to fill out this feature request!**
|
||||
|
||||
We kindly ask that you search to see if an issue [already exists](https://github.com/kernelkit/infix/issues?q=is%3Aissue+sort%3Acreated-desc+) for your feature. We are also happy to accept contributions from our users. For details see [CONTRIBUTING](https://github.com/kernelkit/infix/blob/master/.github/CONTRIBUTING.md).
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: |
|
||||
A clear and concise description of the problem or missing feature.
|
||||
**Example:** *I'm always frustrated when [...]*, or *I'd like to see support for [...]*
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Information
|
||||
description: |
|
||||
Any other related information, e.g. existing YANG model(s), or possibly screenshots about the feature request here.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: General Information
|
||||
description: |
|
||||
Appended to all feature requests for future readers.
|
||||
value: |
|
||||
Anyone can help out by [sponsoring][1] development of new features or [contributing][2] pull requests.
|
||||
Please use this issue for discussions related to the feature.
|
||||
|
||||
[1]: https://github.com/kernelkit/infix/blob/main/.github/SUPPORT.md
|
||||
[2]: https://github.com/kernelkit/infix/blob/main/.github/CONTRIBUTING.md
|
||||
validations:
|
||||
required: true
|
||||
@@ -1,3 +1,5 @@
|
||||
<!--- **Summarize** your changes in the title above -->
|
||||
|
||||
## Description
|
||||
|
||||
<!--
|
||||
@@ -13,7 +15,7 @@
|
||||
|
||||
## Checklist
|
||||
|
||||
Tick *relevant* boxes, this PR is-a or has-a:
|
||||
Tick relevant boxes, this PR is-a or has-a:
|
||||
|
||||
- [ ] Bugfix
|
||||
- [ ] Regression tests
|
||||
@@ -29,3 +31,7 @@ Tick *relevant* boxes, this PR is-a or has-a:
|
||||
- [ ] Documentation content changes
|
||||
- [ ] Other (please describe):
|
||||
|
||||
|
||||
## References
|
||||
|
||||
<!-- Please list references to related issue(s) -->
|
||||
|
||||
+24
-136
@@ -1,63 +1,32 @@
|
||||
name: Bob the Builder
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
minimal:
|
||||
description: 'Build minimal defconfigs'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Infix ${{ matrix.target }}
|
||||
runs-on: [ self-hosted, latest ]
|
||||
name: Build Infix ${{ matrix.platform }}
|
||||
runs-on: self-hosted
|
||||
strategy:
|
||||
matrix:
|
||||
target: [aarch64, x86_64]
|
||||
platform: [aarch64, x86_64]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Cleanup Build Folder
|
||||
- name: Maintenance
|
||||
run: |
|
||||
ls -la ./
|
||||
rm -rf ./* || true
|
||||
rm -rf ./.??* || true
|
||||
ls -la ./
|
||||
|
||||
docker image prune -af
|
||||
docker volume prune -f
|
||||
docker container prune -f
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
clean: true
|
||||
submodules: recursive
|
||||
|
||||
- name: Set Build Variables
|
||||
id: vars
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||
if [ "${{ github.event.inputs.minimal }}" == "true" ]; then
|
||||
flavor="_minimal"
|
||||
fi
|
||||
else
|
||||
# Ensure 'release' job get the proper image when building main
|
||||
if [ "$GITHUB_REF_NAME" != "main" ]; then
|
||||
flavor="_minimal"
|
||||
else
|
||||
flavor=""
|
||||
fi
|
||||
if ${{ contains(github.event.pull_request.labels.*.name, 'ci:main') }}; then
|
||||
flavor=""
|
||||
fi
|
||||
fi
|
||||
target=${{ matrix.target }}
|
||||
target=${{ matrix.platform }}
|
||||
echo "dir=infix-$target" >> $GITHUB_OUTPUT
|
||||
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
|
||||
echo "flv=$flavor" >> $GITHUB_OUTPUT
|
||||
echo "Building target ${target}${flavor}_defconfig"
|
||||
- name: Restore Cache of dl/
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -65,112 +34,39 @@ jobs:
|
||||
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
|
||||
restore-keys: |
|
||||
dl-
|
||||
|
||||
- name: Restore Cache of .ccache/
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache/
|
||||
key: ccache-${{ matrix.target }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
||||
key: ccache-${{ matrix.platform }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
||||
restore-keys: |
|
||||
ccache-${{ matrix.target }}-
|
||||
ccache-${{ matrix.platform }}-
|
||||
ccache-
|
||||
|
||||
- name: Configure ${{ matrix.target }}${{ steps.vars.outputs.flv }}
|
||||
- name: Configure & Build
|
||||
run: |
|
||||
make ${{ matrix.target }}${{ steps.vars.outputs.flv }}_defconfig
|
||||
|
||||
- name: Unit Test ${{ matrix.target }}
|
||||
run: |
|
||||
make test-unit
|
||||
|
||||
- name: Build ${{ matrix.target }}${{ steps.vars.outputs.flv }}
|
||||
run: |
|
||||
echo "Building ${{ matrix.target }}${{ steps.vars.outputs.flv }}_defconfig ..."
|
||||
target=${{ matrix.platform }}_defconfig
|
||||
echo "Building $target ..."
|
||||
make $target
|
||||
make
|
||||
|
||||
- name: Check SBOM from Build
|
||||
run: |
|
||||
make legal-info
|
||||
|
||||
- name: Build test specification
|
||||
run: |
|
||||
make test-spec
|
||||
|
||||
- name: Resulting size of build
|
||||
run: |
|
||||
printf "Size of complete tree : "
|
||||
du -sh .
|
||||
printf "Size of output/ : "
|
||||
du -sh output
|
||||
printf "Size of dl/ : "
|
||||
du -sh dl
|
||||
printf "Size of output/images/: "
|
||||
ls -l output/images/
|
||||
|
||||
- name: Prepare ${{ matrix.target }} Artifact
|
||||
- name: Prepare Artifact
|
||||
run: |
|
||||
cd output/
|
||||
mv images ${{ steps.vars.outputs.dir }}
|
||||
ln -s ${{ steps.vars.outputs.dir }} images
|
||||
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
||||
|
||||
- name: Test
|
||||
if: matrix.platform == 'x86_64'
|
||||
run: |
|
||||
make test
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: output/${{ steps.vars.outputs.tgz }}
|
||||
name: artifact-${{ matrix.target }}
|
||||
|
||||
test:
|
||||
name: Regression Test of Infix x86_64
|
||||
needs: build
|
||||
runs-on: [ self-hosted, regression ]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
clean: true
|
||||
submodules: recursive
|
||||
|
||||
- name: Set Build Variables
|
||||
id: vars
|
||||
run: |
|
||||
if [ "$GITHUB_REF_NAME" != "main" ]; then
|
||||
flavor="_minimal"
|
||||
else
|
||||
flavor=""
|
||||
fi
|
||||
echo "flv=$flavor" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Configure x86_64${{ steps.vars.outputs.flv }}
|
||||
run: |
|
||||
make x86_64${{ steps.vars.outputs.flv }}_defconfig
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: "artifact-*"
|
||||
merge-multiple: true
|
||||
|
||||
- name: Restore x86-64${{ steps.vars.outputs.flv }} output/
|
||||
run: |
|
||||
ls -l
|
||||
mkdir -p output
|
||||
mv infix-x86_64.tar.gz output/
|
||||
cd output/
|
||||
tar xf infix-x86_64.tar.gz
|
||||
ln -s infix-x86_64 images
|
||||
|
||||
- name: Regression Test x86_64${{ steps.vars.outputs.flv }}
|
||||
run: |
|
||||
make test
|
||||
|
||||
- name: Publish Test Result for x86_64${{ steps.vars.outputs.flv }}
|
||||
# Ensure this runs even if Regression Test fails
|
||||
if: always()
|
||||
run: cat test/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
name: artifact-${{ matrix.platform }}
|
||||
release:
|
||||
if: ${{github.repository_owner == 'kernelkit' && github.ref_name == 'main'}}
|
||||
name: Upload Latest Build
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
runs-on: self-hosted
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
@@ -178,13 +74,6 @@ jobs:
|
||||
with:
|
||||
pattern: "artifact-*"
|
||||
merge-multiple: true
|
||||
|
||||
- name: Create checksums ...
|
||||
run: |
|
||||
for file in *.tar.gz; do
|
||||
sha256sum $file > $file.sha256
|
||||
done
|
||||
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
@@ -194,13 +83,12 @@ jobs:
|
||||
prerelease: true
|
||||
tag: "latest"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
artifacts: "*.tar.gz*"
|
||||
|
||||
artifacts: "*.tar.gz"
|
||||
- name: Summary
|
||||
run: |
|
||||
cat <<EOF >> $GITHUB_STEP_SUMMARY
|
||||
# Latest Build Complete! :rocket:
|
||||
|
||||
|
||||
For the public download links of these build artifacts, please see:
|
||||
<https://github.com/kernelkit/infix/releases/tag/latest>
|
||||
EOF
|
||||
|
||||
@@ -2,7 +2,7 @@ name: Coverity Scan
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '5 0 * * 6'
|
||||
- cron: '5 0 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
@@ -12,7 +12,7 @@ env:
|
||||
jobs:
|
||||
coverity:
|
||||
if: ${{github.repository_owner == 'kernelkit'}}
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Fetch latest Coverity Scan MD5
|
||||
@@ -24,7 +24,6 @@ jobs:
|
||||
--post-data "token=$TOKEN&project=${PROJECT_NAME}&md5=1" \
|
||||
-O coverity-latest.tar.gz.md5
|
||||
echo "md5=$(cat coverity-latest.tar.gz.md5)" | tee -a $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: cache
|
||||
with:
|
||||
@@ -34,7 +33,6 @@ jobs:
|
||||
${{ runner.os }}-coverity-${{ steps.var.outputs.md5 }}
|
||||
${{ runner.os }}-coverity-
|
||||
${{ runner.os }}-coverity
|
||||
|
||||
- name: Download Coverity Scan
|
||||
env:
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
@@ -49,14 +47,12 @@ jobs:
|
||||
fi
|
||||
mkdir coverity
|
||||
tar xzf coverity-latest.tar.gz --strip 1 -C coverity
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install pkg-config libjansson-dev libev-dev \
|
||||
libcrypt-dev libglib2.0-dev libpcre2-dev \
|
||||
libaugeas-dev libglib2.0-dev libpcre2-dev \
|
||||
libuev-dev libite-dev
|
||||
|
||||
- name: Build dependencies
|
||||
run: |
|
||||
git clone https://github.com/CESNET/libyang.git
|
||||
@@ -66,12 +62,10 @@ jobs:
|
||||
mkdir sysrepo/build
|
||||
(cd sysrepo/build && cmake .. && make all && sudo make install)
|
||||
make dep
|
||||
|
||||
- name: Check applications
|
||||
run: |
|
||||
export PATH=`pwd`/coverity/bin:$PATH
|
||||
cov-build --dir cov-int make check
|
||||
|
||||
- name: Submit results to Coverity Scan
|
||||
env:
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
@@ -84,7 +78,6 @@ jobs:
|
||||
--form version=$(git rev-parse HEAD) \
|
||||
--form description="${PROJECT_NAME} $(git rev-parse HEAD)" \
|
||||
https://scan.coverity.com/builds?project=${PROJECT_NAME}
|
||||
|
||||
- name: Upload build.log
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
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:
|
||||
name: Regression Testing
|
||||
runs-on: self-hosted
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: Clean up cruft ...
|
||||
run: |
|
||||
./test/env -c
|
||||
- name: Set Build Variables
|
||||
id: vars
|
||||
run: |
|
||||
target=x86_64
|
||||
echo "dir=infix-$target" >> $GITHUB_OUTPUT
|
||||
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
|
||||
- name: Restore Cache of dl/
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dl/
|
||||
key: dl-netconf-${{ hashFiles('.git/modules/buildroot/refs/heads/master', 'package/*/*.hash') }}
|
||||
restore-keys: |
|
||||
dl-netconf-
|
||||
dl-
|
||||
- name: Restore Cache of .ccache/
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache/
|
||||
key: ccache-x86_64-${{ hashFiles('.git/modules/buildroot/refs/head/master', 'package/*/*.hash') }}
|
||||
restore-keys: |
|
||||
ccache-x86_64-
|
||||
ccache-
|
||||
- name: Configure NETCONF
|
||||
run: |
|
||||
make x86_64_defconfig
|
||||
|
||||
- name: Unit Test
|
||||
run: make test-unit
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
make -j
|
||||
- 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@v4
|
||||
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
|
||||
@@ -20,18 +20,19 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository == 'kernelkit/infix' && startsWith(github.ref, 'refs/tags/')
|
||||
name: Build Infix ${{ github.ref_name }} [${{ matrix.target }}]
|
||||
runs-on: [ self-hosted, release ]
|
||||
name: Build Infix ${{ github.ref_name }} [${{ matrix.platform }}]
|
||||
runs-on: self-hosted
|
||||
strategy:
|
||||
matrix:
|
||||
target: [aarch64, x86_64]
|
||||
platform: [aarch64, x86_64]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Maintenance
|
||||
run: |
|
||||
docker image prune -af
|
||||
docker volume prune -f
|
||||
docker container prune -f
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
clean: true
|
||||
submodules: recursive
|
||||
|
||||
- name: Set Release Variables
|
||||
id: vars
|
||||
run: |
|
||||
@@ -42,10 +43,10 @@ jobs:
|
||||
fi
|
||||
echo "ver=${ver}" >> $GITHUB_OUTPUT
|
||||
fver=${ver#v}
|
||||
target=${{ matrix.target }}-${fver}
|
||||
target=${{ matrix.platform }}-${fver}
|
||||
echo "dir=infix-$target" >> $GITHUB_OUTPUT
|
||||
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "out=/mnt/x-$target" >> $GITHUB_OUTPUT
|
||||
- name: Restore Cache of dl/
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -53,59 +54,49 @@ jobs:
|
||||
key: dl-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
|
||||
restore-keys: |
|
||||
dl-
|
||||
|
||||
- name: Restore Cache of .ccache/
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache/
|
||||
key: ccache-${{ matrix.target }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
||||
key: ccache-${{ matrix.platform }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
||||
restore-keys: |
|
||||
ccache-${{ matrix.target }}-
|
||||
ccache-${{ matrix.platform }}-
|
||||
ccache-
|
||||
|
||||
- name: Configure & Build
|
||||
env:
|
||||
INFIX_RELEASE: ${{ steps.vars.outputs.ver }}
|
||||
run: |
|
||||
target=${{ matrix.target }}_defconfig
|
||||
target=${{ matrix.platform }}_defconfig
|
||||
echo "Building $target ..."
|
||||
sudo mkdir ${{ steps.vars.outputs.out }}
|
||||
sudo chown $(id -un):$(id -gn) ${{ steps.vars.outputs.out }}
|
||||
export O=${{ steps.vars.outputs.out }}
|
||||
make $target
|
||||
make
|
||||
|
||||
- name: Generate SBOM from Build
|
||||
run: |
|
||||
make legal-info
|
||||
|
||||
- name: Build test specification
|
||||
run: |
|
||||
make test-spec
|
||||
|
||||
- name: Prepare Artifacts
|
||||
run: |
|
||||
cd output/
|
||||
cd ${{ steps.vars.outputs.out }}
|
||||
mv images ${{ steps.vars.outputs.dir }}
|
||||
ln -s ${{ steps.vars.outputs.dir }} images
|
||||
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
||||
|
||||
mv legal-info legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
|
||||
tar chfz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}.tar.gz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
|
||||
|
||||
mv legal-info legal-info-$target
|
||||
tar chfz legal-info-$target.tar.gz legal-info-$target
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: artifact-${{ matrix.target }}
|
||||
path: output/*.tar.gz
|
||||
|
||||
name: artifact-${{ matrix.platform }}
|
||||
path: ${{ steps.vars.outputs.out }}/*.tar.gz
|
||||
release:
|
||||
name: Release Infix ${{ github.ref_name }}
|
||||
needs: build
|
||||
runs-on: [ self-hosted, release ]
|
||||
runs-on: self-hosted
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'true'
|
||||
|
||||
- name: Set Release Variables
|
||||
id: rel
|
||||
run: |
|
||||
@@ -127,24 +118,20 @@ jobs:
|
||||
fi
|
||||
echo "pre=${{ steps.rel.outputs.pre }}"
|
||||
echo "latest=${{ steps.rel.outputs.latest }}"
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: "artifact-*"
|
||||
merge-multiple: true
|
||||
|
||||
- name: Create checksums ...
|
||||
run: |
|
||||
for file in *.tar.gz; do
|
||||
sha256sum $file > $file.sha256
|
||||
done
|
||||
|
||||
- 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 }}
|
||||
@@ -152,12 +139,11 @@ jobs:
|
||||
makeLatest: ${{ steps.rel.outputs.latest }}
|
||||
bodyFile: release.md
|
||||
artifacts: "*.tar.gz*"
|
||||
|
||||
- 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
|
||||
|
||||
@@ -112,6 +112,10 @@ config INFIX_ARCH
|
||||
default "riscv64" if BR2_riscv
|
||||
default "x86_64" if BR2_x86_64
|
||||
|
||||
menu "Packages"
|
||||
|
||||
source "$BR2_EXTERNAL_INFIX_PATH/package/Config.in"
|
||||
source "$BR2_EXTERNAL_INFIX_PATH/package/Config.in.host"
|
||||
|
||||
endmenu
|
||||
|
||||
source "$BR2_EXTERNAL_INFIX_PATH/board/common/Config.in"
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
export BR2_EXTERNAL ?= $(CURDIR)
|
||||
export BR2_EXTERNAL := $(CURDIR)
|
||||
export PATH := $(CURDIR)/bin:$(PATH)
|
||||
|
||||
ARCH ?= $(shell uname -m)
|
||||
O ?= output
|
||||
|
||||
# If a relative output path is specified, we have to translate it to
|
||||
# an absolute one before handing over control to Buildroot, which will
|
||||
# otherwise treat it as relative to ./buildroot.
|
||||
override O := $(if $(filter /%,$O),$O,$(CURDIR)/$O)
|
||||
O ?= $(CURDIR)/output
|
||||
|
||||
config := $(O)/.config
|
||||
bmake = $(MAKE) -C buildroot O=$(O) $1
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
Infix is a free, Linux based, immutable Network Operating System (NOS)
|
||||
built on [Buildroot][1], and [sysrepo][2]. A powerful mix that ease
|
||||
porting to different platforms, simplify long-term maintenance, and
|
||||
provide made-easy management using NETCONF, RESTCONF[^2], or the
|
||||
built-in command line interface (CLI) from a console or SSH login.
|
||||
provide made-easy management using NETCONF[^1] or the built-in command
|
||||
line interface (CLI) from a console or SSH login.
|
||||
|
||||
> Click the **▶ Example CLI Session** foldout below for an example, or
|
||||
> head on over to the [Infix Documentation](doc/README.md) for more
|
||||
@@ -22,7 +22,7 @@ may be appealing for other use-cases as well:
|
||||
- Atomic upgrades to secondary partition
|
||||
- Highly security focused
|
||||
|
||||
An immutable[^1] operating system enhances security and inherently makes
|
||||
An immutable[^2] operating system enhances security and inherently makes
|
||||
it maintenance-free. Configuration and data, e.g, containers, is stored
|
||||
on separate partitions to ensure complete separation from system files
|
||||
and allow for seamless backup, restore, and provisioning.
|
||||
@@ -93,7 +93,6 @@ The [following boards](board/aarch64/README.md) are fully supported:
|
||||
- Marvell CN9130 CRB
|
||||
- Marvell EspressoBIN
|
||||
- Microchip SparX-5i PCB135 (eMMC)
|
||||
- StarFive VisionFive2
|
||||
- NanoPi R2S
|
||||
|
||||
An x86_64 build is also available, primarily intended for development
|
||||
@@ -101,24 +100,22 @@ 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)
|
||||
> page for our pre-built images. The *[Latest Build][]* has bleeding
|
||||
> page for our pre-built images. The *Latest Build* has the bleeding
|
||||
> edge images, if possible we recommend using a versioned release.
|
||||
>
|
||||
> For *customer specific builds* of Infix, see your product repository.
|
||||
|
||||
[^1]: An immutable operating system is one with read-only file systems,
|
||||
[^1]: NETCONF or RESTCONF, <https://datatracker.ietf.org/doc/html/rfc8040>
|
||||
|
||||
[^2]: An immutable operating system is one with read-only file systems,
|
||||
atomic updates, rollbacks, declarative configuration, and workload
|
||||
isolation. All to improve reliability, scalability, and security.
|
||||
For more information, see <https://ceur-ws.org/Vol-3386/paper9.pdf>
|
||||
and <https://www.zdnet.com/article/what-is-immutable-linux-heres-why-youd-run-an-immutable-linux-distro/>.
|
||||
|
||||
[^2]: Partial RESTCONF support, features like HTTP PATCH, OPTIONS, HEAD,
|
||||
and copying between datastores are still missing.
|
||||
|
||||
[1]: https://buildroot.org/
|
||||
[2]: https://www.sysrepo.org/
|
||||
[3]: doc/cli/introduction.md
|
||||
[Latest Build]: https://github.com/kernelkit/infix/releases/tag/latest
|
||||
[License]: https://en.wikipedia.org/wiki/GPL_license
|
||||
[License Badge]: https://img.shields.io/badge/License-GPL%20v2-blue.svg
|
||||
[GitHub]: https://github.com/kernelkit/infix/actions/workflows/build.yml/
|
||||
|
||||
+63
-5
@@ -1,9 +1,67 @@
|
||||
aarch64
|
||||
=======
|
||||
|
||||
Board Specific Documentation
|
||||
----------------------------
|
||||
Microchip SparX-5i PCB135 (eMMC)
|
||||
--------------------------------
|
||||
|
||||
- [Marvell CN9130-CRB](cn9130-crb/)
|
||||
- [Microchip SparX-5i PCB135 (eMMC)](sparx5-pcb135/)
|
||||
- [NanoPi R2S](r2s/)
|
||||
At present, only FIT images are supported via the SparX-5i eval
|
||||
board's U-Boot, which must contain a valid load address. If you are
|
||||
using this board, after selecting your base configuration, run the
|
||||
following command to supplement the existing config with the required
|
||||
FIT options:
|
||||
|
||||
make board-enable-sparx-fit
|
||||
|
||||
### Unbricking
|
||||
|
||||
1. Don't load a corrupt bootloader to begin with
|
||||
2. Done
|
||||
|
||||
If, for some reason, you didn't manage to follow step 1, you can use
|
||||
the `FLASH_PROG`(`J4`) connector on the board to access the SPI flash
|
||||
directly.
|
||||
|
||||
Using a [Bus Blaster][BB3] in combination with [dangerspi][dangerspi],
|
||||
you can load a new bootloader. The schematic below details how to
|
||||
connect the Bus Blaster to the board, but the concept should be
|
||||
portable to any debugger/device based around an FTDI2232 chip.
|
||||
|
||||
```
|
||||
Bus Blaster: FLASH_PROG (J4):
|
||||
.---. .---.
|
||||
VTG >o o| VTG SCK >o o| GND
|
||||
TRST |o o| GND MISO |o o| #RESET_FLASH
|
||||
TDI |o o| GND o o| 3V3
|
||||
TMS |o o| GND #CS |o o| #SYSRESET
|
||||
TCK o o| GND MOSI |o o| GND
|
||||
RTCK o o| GND '---'
|
||||
TDO |o o| GND
|
||||
TSRST |o o| GND
|
||||
DBGRQ |o o| GND
|
||||
DBGACK |o o| GND
|
||||
'---'
|
||||
```
|
||||
|
||||
| Bus Blaster | FLASH_PROG |
|
||||
|-------------|----------------|
|
||||
| `VTG` | `3V3` |
|
||||
| `GND` | `GND` |
|
||||
| | |
|
||||
| `VTG` | `#RESET_FLASH` |
|
||||
| `GND` | `#SYSRESET` |
|
||||
| | |
|
||||
| `TDI` | `MOSI` |
|
||||
| `TMS` | `#CS` |
|
||||
| `TCK` | `SCK` |
|
||||
| `TDO` | `MISO` |
|
||||
|
||||
With the cable in place, build U-Boot with the correct configuration:
|
||||
|
||||
make fireant_boot_defconfig && make
|
||||
|
||||
To flash it to the board, connect the cable to `J4` and run:
|
||||
|
||||
make board-sparx-flash-uboot
|
||||
|
||||
[BB3]: http://dangerousprototypes.com/docs/Bus_Blaster#Bus_Blaster_v3
|
||||
[dangerspi]: https://github.com/wkz/dangerspi
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
Marvell CN9130-CRB
|
||||
==================
|
||||
|
||||
## Build instructions
|
||||
|
||||
### Bootloader
|
||||
|
||||
Build the bootloader from the supplied `defconfig`. It might be useful
|
||||
to build in a separate output directory if you want to build Infix
|
||||
from the same working tree later:
|
||||
|
||||
make O=$(pwd)/x-cn9130-boot cn9130_crb_boot_defconfig
|
||||
cd x-cn9130-boot
|
||||
make
|
||||
|
||||
The artifact of interest is called `flash-image.bin`, which will be
|
||||
located in the `images/` directory once the build completes.
|
||||
|
||||
|
||||
### Infix
|
||||
|
||||
> If you do not want to build Infix from source, feel free to use a pre-built [release]
|
||||
|
||||
The standard `aarch64_defconfig` is compatible with this board:
|
||||
|
||||
make O=$(pwd)/x-aarch64 aarch64_defconfig
|
||||
cd x-aarch64
|
||||
make
|
||||
|
||||
Two artifacts from the `images/` directory of this build are required
|
||||
to provision a new board:
|
||||
|
||||
- `rootfs.itb`: Netbootable image
|
||||
- `infix-aarch64.pkg`: Standard upgrade bundle
|
||||
|
||||
## Provisioning
|
||||
|
||||
The overall provisioning flow, in which each step in described in
|
||||
details in the following sections, is as follows:
|
||||
|
||||
- Strap board to boot from SPI FLASH
|
||||
- Load `flash-image.bin` over UART
|
||||
- Burn `flash-image.bin` to SPI FLASH
|
||||
- Netboot `rootfs.itb`
|
||||
- Run Infix's built-in provisioning script
|
||||
- Reboot, now booting from the primary partition of the SD-card
|
||||
|
||||
#### Strap Board to Boot from SPI FLASH
|
||||
|
||||
By default, the board is strapped to boot from eMMC. However, Infix
|
||||
assumes that the board will boot from SPI FLASH. Therefore we have to
|
||||
ensure that the DIP switches of `SW2` on the board selects a
|
||||
`BOOT_MODE` of `0x32`, meaning that the switches on positions 4, 3,
|
||||
and 1 should be enabled (i.e. these need to be tied to ground):
|
||||
|
||||
```
|
||||
.-----. .-----. .-----.
|
||||
| | | | | PWR |
|
||||
| SIM | | uSD | | |
|
||||
| | | | '-----'
|
||||
'-----' '-----'
|
||||
|
||||
|
|
||||
v
|
||||
.-----. .-----.
|
||||
| SW1 | | SW2 |
|
||||
'-----' '-----'
|
||||
.--------------------------.
|
||||
| |
|
||||
| |
|
||||
| CN9130 |
|
||||
```
|
||||
|
||||
#### UART Boot U-Boot
|
||||
|
||||
Make sure that:
|
||||
- [mvebu64boot] is installed and available in your shell's `$PATH`
|
||||
- No other program is attached to `ttyUSB0`
|
||||
- No power is applied to the board
|
||||
|
||||
1. Start `mvebu64boot`:
|
||||
|
||||
mvebu64boot -b /path/to/flash-image.bin /dev/ttyUSB0
|
||||
|
||||
2. Apply power
|
||||
|
||||
As soon as `mvebu64boot` completes, attach to the serial port,
|
||||
e.g. using `screen(1)`, or `console(1)` and stop the normal boot
|
||||
process by hitting any key.
|
||||
|
||||
#### Burn U-Boot to SPI FLASH
|
||||
|
||||
Make sure that:
|
||||
- `eth1` is connected to a machine which serves `flash-image.bin` over
|
||||
TFTP
|
||||
- U-Boot can reach the TFTP server. If the neighboring machine is also
|
||||
set up as a DHCP server, simply run the command `dhcp -`
|
||||
|
||||
To burn the bootloader to SPI FLASH, run the `bubt` command:
|
||||
|
||||
bubt flash-image.bin
|
||||
|
||||
Once the command completes, reset the board to verify that it can now
|
||||
boot unassisted:
|
||||
|
||||
reset
|
||||
|
||||
#### Boot up `rootfs.itb`
|
||||
|
||||
U-Boot will automatically fallback to netboot since the SD-card is
|
||||
still blank. Make sure that the PC provides the path to `rootfs.itb`
|
||||
in DHCP option 67 ("bootfile").
|
||||
|
||||
#### Install Firmware
|
||||
|
||||
Login as `admin`/`admin`, setup networking to the PC, ensure that the date on
|
||||
the device is reasonably correct, and run the provisioning script:
|
||||
|
||||
admin@infix:~$ sudo -i
|
||||
root@infix:~$ udhcpc -i e28
|
||||
root@infix:~$ date -us YYYY-MM-DD
|
||||
root@infix:~$ /usr/libexec/infix/prod/provision tftp://<PC-IP>/infix-aarch64.pkg /dev/mmcblk0
|
||||
|
||||
After successful completion, the device is fully provisioned. On the
|
||||
next boot, the device will boot of its own accord from the primary
|
||||
SD-card partition.
|
||||
|
||||
> If possible, serve `infix-aarch64.pkg` over HTTP instead, as
|
||||
> libcurl's TFTP implementation is quite slow.
|
||||
|
||||
[release]: https://github.com/kernelkit/infix/releases
|
||||
[mvebu64boot]: https://github.com/addiva-elektronik/mvebu64boot
|
||||
@@ -17,11 +17,35 @@ run ixboot
|
||||
boot_targets = "mmc1";
|
||||
ethprime = "eth1";
|
||||
|
||||
/* This is a development platform, keep
|
||||
* developer mode statically enabled.
|
||||
/* 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`.
|
||||
*/
|
||||
ixbtn-devmode = "setenv dev_mode yes; echo Enabled";
|
||||
ixbtn-factory = "echo \"No button available, use bootmenu\"";
|
||||
/* 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,6 +1,4 @@
|
||||
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi cn9130-crb-env.dtsi"
|
||||
CONFIG_SYS_PROMPT="(cn9130-crb) "
|
||||
|
||||
CONFIG_ENV_IS_NOWHERE=y
|
||||
# CONFIG_ENV_IS_IN_MMC is not set
|
||||
CONFIG_MVEBU_SPI_BOOT=y
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2020 Marvell International Ltd.
|
||||
*/
|
||||
|
||||
#include "cn9130-crb.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Marvell Armada CN9130-CRB-A";
|
||||
|
||||
chosen {
|
||||
infix {
|
||||
/* "admin" */
|
||||
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
|
||||
usb-ports = <&cp0_usb3_1>;
|
||||
usb-port-names = "USB";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&cp0_pcie0 {
|
||||
status = "okay";
|
||||
num-lanes = <4>;
|
||||
num-viewport = <8>;
|
||||
/* Generic PHY, providing serdes lanes */
|
||||
phys = <&cp0_comphy0 0
|
||||
&cp0_comphy1 0
|
||||
&cp0_comphy2 0
|
||||
&cp0_comphy3 0>;
|
||||
iommu-map =
|
||||
<0x0 &smmu 0x480 0x20>,
|
||||
<0x100 &smmu 0x4a0 0x20>,
|
||||
<0x200 &smmu 0x4c0 0x20>;
|
||||
iommu-map-mask = <0x031f>;
|
||||
};
|
||||
|
||||
&cp0_usb3_0 {
|
||||
status = "okay";
|
||||
usb-phy = <&cp0_usb3_0_phy0>;
|
||||
phy-names = "usb";
|
||||
};
|
||||
|
||||
&cp0_usb3_1 {
|
||||
status = "okay";
|
||||
usb-phy = <&cp0_usb3_0_phy1>;
|
||||
phy-names = "usb";
|
||||
};
|
||||
|
||||
&cp0_eth2 {
|
||||
status = "okay";
|
||||
phy-mode = "2500base-x";
|
||||
};
|
||||
|
||||
&cp0_pinctrl {
|
||||
cp0_expander0_pins: cp0-expander-pins-0 {
|
||||
marvell,pins = "mpp39";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&expander0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&cp0_expander0_pins>;
|
||||
interrupt-parent = <&cp0_gpio2>;
|
||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells=<2>;
|
||||
microchip,irq-mirror;
|
||||
};
|
||||
@@ -1,61 +0,0 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (C) 2021 Marvell International Ltd.
|
||||
* Copyright (C) 2024 Addiva Elektronik AB
|
||||
*
|
||||
* Device tree for revision A of DCP-SC-28P
|
||||
*/
|
||||
|
||||
#include "dcp-sc-28p.dtsi"
|
||||
/ {
|
||||
compatible = "styx,dcp-sc-28p-a",
|
||||
"styx,dcp-sc-28p",
|
||||
"marvell,armada-ap807-quad",
|
||||
"marvell,armada-ap807";
|
||||
};
|
||||
|
||||
&sw3 {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/* Can't use XSWP macro as port 0 does not have
|
||||
* any LEDs attached to it. LEDs for port 10 seem
|
||||
* to be wired to the corresponding SFP cage. Maybe
|
||||
* we can apply a static workaround by binding port
|
||||
* 10's green LED to "Special LED 1", so we can at
|
||||
* least see link/act.
|
||||
*/
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "e16";
|
||||
nvmem-cells = <&base_mac 16>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
phy-mode = "10gbase-r";
|
||||
managed = "in-band-status";
|
||||
sfp = <&sfp3>;
|
||||
};
|
||||
XSWCPU(9, &cp0_eth0);
|
||||
sw3p10: XSWLINK(a, &sw2p10 &sw1p0);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&sw2 {
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
sw2p0: XSWLINK(0, &sw1p0);
|
||||
XSWP(9, "e15", 15, &sfp2);
|
||||
sw2p10: XSWLINK(a, &sw3p10);
|
||||
};
|
||||
};
|
||||
|
||||
&sw1 {
|
||||
ports {
|
||||
sw1p0: XSWLINK(0, &sw2p0 &sw3p10);
|
||||
XSWP(9, "e14", 14, &sfp1);
|
||||
XSWP(a, "e13", 13, &sfp0);
|
||||
};
|
||||
};
|
||||
@@ -1,39 +0,0 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (C) 2021 Marvell International Ltd.
|
||||
* Copyright (C) 2024 Addiva Elektronik AB
|
||||
*
|
||||
* Device tree for revision B of DCP-SC-28P
|
||||
*/
|
||||
|
||||
#include "dcp-sc-28p.dtsi"
|
||||
/ {
|
||||
compatible = "styx,dcp-sc-28p-b",
|
||||
"styx,dcp-sc-28p",
|
||||
"marvell,armada-ap807-quad",
|
||||
"marvell,armada-ap807";
|
||||
};
|
||||
|
||||
&sw3 {
|
||||
ports {
|
||||
XSWCPU(0, &cp0_eth0);
|
||||
sw3p9: XSWLINK(9, &sw2p0 &sw1p0);
|
||||
XSWP(a, "e16", 16, &sfp3);
|
||||
};
|
||||
};
|
||||
|
||||
&sw2 {
|
||||
ports {
|
||||
sw2p0: XSWLINK(0, &sw3p9);
|
||||
XSWP(9, "e15", 15, &sfp2);
|
||||
sw2p10: XSWLINK(a, &sw1p0);
|
||||
};
|
||||
};
|
||||
|
||||
&sw1 {
|
||||
ports {
|
||||
sw1p0: XSWLINK(0, &sw2p10 &sw3p9);
|
||||
XSWP(9, "e14", 14, &sfp1);
|
||||
XSWP(a, "e13", 13, &sfp0);
|
||||
};
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef _DCP_SC_28P_MPP_H
|
||||
#define _DCP_SC_28P_MPP_H
|
||||
#ifndef _STYX_MPP_H
|
||||
#define _STYX_MPP_H
|
||||
|
||||
#define SFP0_TX_DISABLE(X) X( "mpp0", cp0_gpio1, 0, GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)
|
||||
#define SFP1_TX_DISABLE(X) X( "mpp1", cp0_gpio1, 1, GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)
|
||||
@@ -73,4 +73,4 @@
|
||||
#define MPP_GPIO_REF_NO_CHIP(_mpp, _chip, _no, _flags) <_no (_flags)>
|
||||
#define MPP_IRQ_REF(_mpp, _chip, _no, _flags) <&_chip _no (_flags)>
|
||||
|
||||
#endif /* _DCP_SC_28P_MPP_H */
|
||||
#endif /* _STYX_MPP_H */
|
||||
@@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
/*
|
||||
* Copyright (C) 2021 Marvell International Ltd.
|
||||
* Copyright (C) 2023 Addiva Elektronik AB
|
||||
*
|
||||
* Device tree for Styx board
|
||||
*/
|
||||
|
||||
#include "styx.dtsi"
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2021 Marvell International Ltd.
|
||||
* Copyright (C) 2023 Addiva Elektronik AB
|
||||
*
|
||||
* Device tree base for DCP-SC-28P
|
||||
* Device tree for Styx board
|
||||
*/
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
@@ -12,10 +12,13 @@
|
||||
|
||||
#include "../marvell/cn9130-patched.dtsi"
|
||||
|
||||
#include "dcp-sc-28p-mpp.h"
|
||||
#include "styx-mpp.h"
|
||||
|
||||
/ {
|
||||
model = "DCP-SC-28P";
|
||||
model = "Styx";
|
||||
compatible = "styx,styx",
|
||||
"marvell,armada-ap807-quad",
|
||||
"marvell,armada-ap807";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
@@ -89,7 +92,7 @@
|
||||
compatible = "atmel,24c256";
|
||||
reg = <0x50>;
|
||||
|
||||
infix,board = "product";
|
||||
infix,board = "cpu";
|
||||
infix,trusted;
|
||||
|
||||
nvmem-layout {
|
||||
@@ -268,6 +271,12 @@
|
||||
color = <LED_COLOR_ID_GREEN>; \
|
||||
default-state = "keep"; \
|
||||
}; \
|
||||
led@1 { \
|
||||
reg = <1>; \
|
||||
function = _func; \
|
||||
color = <LED_COLOR_ID_YELLOW>; \
|
||||
default-state = "off"; \
|
||||
}; \
|
||||
}
|
||||
|
||||
#define XSWP(_n, _label, _mac_offs, _sfp) \
|
||||
@@ -278,33 +287,10 @@
|
||||
nvmem-cell-names = "mac-address"; \
|
||||
phy-mode = "10gbase-r"; \
|
||||
managed = "in-band-status"; \
|
||||
sfp = <_sfp>; \
|
||||
sfp = <&_sfp>; \
|
||||
SWP_LED("sfp"); \
|
||||
}
|
||||
|
||||
#define XSWCPU(_n, _eth) \
|
||||
port@_n { \
|
||||
reg = <0x ## _n>; \
|
||||
label = "cpu"; \
|
||||
ethernet = <_eth>; \
|
||||
phy-mode = "10gbase-r"; \
|
||||
fixed-link { \
|
||||
speed = <10000>; \
|
||||
full-duplex; \
|
||||
}; \
|
||||
}
|
||||
|
||||
#define XSWLINK(_n, _link) \
|
||||
port@_n { \
|
||||
reg = <0x ## _n>; \
|
||||
link = <_link>; \
|
||||
phy-mode = "10gbase-r"; \
|
||||
fixed-link { \
|
||||
speed = <10000>; \
|
||||
full-duplex; \
|
||||
}; \
|
||||
}
|
||||
|
||||
#define GSWP(_n, _label, _mac_offs, _phy) \
|
||||
port@_n { \
|
||||
reg = <0x ## _n>; \
|
||||
@@ -312,7 +298,7 @@
|
||||
nvmem-cells = <&base_mac _mac_offs>; \
|
||||
nvmem-cell-names = "mac-address"; \
|
||||
phy-mode = "gmii"; \
|
||||
phy-handle = <_phy>; \
|
||||
phy-handle = <&_phy>; \
|
||||
SWP_LED("tp"); \
|
||||
}
|
||||
|
||||
@@ -346,14 +332,52 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
GSWP(1, "e22", 22, &sw3phy1);
|
||||
GSWP(2, "e21", 21, &sw3phy2);
|
||||
GSWP(3, "e24", 24, &sw3phy3);
|
||||
GSWP(4, "e23", 23, &sw3phy4);
|
||||
GSWP(5, "e26", 26, &sw3phy5);
|
||||
GSWP(6, "e25", 25, &sw3phy6);
|
||||
GSWP(7, "e28", 28, &sw3phy7);
|
||||
GSWP(8, "e27", 27, &sw3phy8);
|
||||
port@9 {
|
||||
reg = <0x9>;
|
||||
label = "cpu";
|
||||
ethernet = <&cp0_eth0>;
|
||||
phy-mode = "10gbase-r";
|
||||
fixed-link {
|
||||
speed = <10000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
sw3p10: port@a {
|
||||
reg = <0xa>;
|
||||
link = <&sw2p10 &sw1p0>;
|
||||
phy-mode = "10gbase-r";
|
||||
fixed-link {
|
||||
speed = <10000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
/* Can't use XSWP macro as port 0 does not have
|
||||
* any LEDs attached to it. LEDs for port 10 seem
|
||||
* to be wired to the corresponding SFP cage. Maybe
|
||||
* we can apply a static workaround by binding port
|
||||
* 10's green LED to "Special LED 1", so we can at
|
||||
* least see link/act.
|
||||
*/
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "e16";
|
||||
nvmem-cells = <&base_mac 16>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
phy-mode = "10gbase-r";
|
||||
managed = "in-band-status";
|
||||
sfp = <&sfp3>;
|
||||
};
|
||||
|
||||
GSWP(1, "e22", 22, sw3phy1);
|
||||
GSWP(2, "e21", 21, sw3phy2);
|
||||
GSWP(3, "e24", 24, sw3phy3);
|
||||
GSWP(4, "e23", 23, sw3phy4);
|
||||
GSWP(5, "e26", 26, sw3phy5);
|
||||
GSWP(6, "e25", 25, sw3phy6);
|
||||
GSWP(7, "e28", 28, sw3phy7);
|
||||
GSWP(8, "e27", 27, sw3phy8);
|
||||
};
|
||||
|
||||
mdio {
|
||||
@@ -388,14 +412,36 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
GSWP(1, "e10", 10, &sw2phy1);
|
||||
GSWP(2, "e9", 9, &sw2phy2);
|
||||
GSWP(3, "e12", 12, &sw2phy3);
|
||||
GSWP(4, "e11", 11, &sw2phy4);
|
||||
GSWP(5, "e18", 18, &sw2phy5);
|
||||
GSWP(6, "e17", 17, &sw2phy6);
|
||||
GSWP(7, "e20", 20, &sw2phy7);
|
||||
GSWP(8, "e19", 19, &sw2phy8);
|
||||
sw2p0: port@0 {
|
||||
reg = <0x0>;
|
||||
link = <&sw1p0>;
|
||||
phy-mode = "10gbase-r";
|
||||
fixed-link {
|
||||
speed = <10000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
sw2p10: port@a {
|
||||
reg = <0xa>;
|
||||
link = <&sw3p10>;
|
||||
phy-mode = "10gbase-r";
|
||||
fixed-link {
|
||||
speed = <10000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
GSWP(1, "e10", 10, sw2phy1);
|
||||
GSWP(2, "e9", 9, sw2phy2);
|
||||
GSWP(3, "e12", 12, sw2phy3);
|
||||
GSWP(4, "e11", 11, sw2phy4);
|
||||
GSWP(5, "e18", 18, sw2phy5);
|
||||
GSWP(6, "e17", 17, sw2phy6);
|
||||
GSWP(7, "e20", 20, sw2phy7);
|
||||
GSWP(8, "e19", 19, sw2phy8);
|
||||
XSWP(9, "e15", 15, sfp2);
|
||||
};
|
||||
|
||||
mdio {
|
||||
@@ -430,14 +476,26 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
GSWP(1, "e2", 2, &sw1phy1);
|
||||
GSWP(2, "e1", 1, &sw1phy2);
|
||||
GSWP(3, "e4", 4, &sw1phy3);
|
||||
GSWP(4, "e3", 3, &sw1phy4);
|
||||
GSWP(5, "e6", 6, &sw1phy5);
|
||||
GSWP(6, "e5", 5, &sw1phy6);
|
||||
GSWP(7, "e8", 8, &sw1phy7);
|
||||
GSWP(8, "e7", 7, &sw1phy8);
|
||||
sw1p0: port@0 {
|
||||
reg = <0x0>;
|
||||
link = <&sw2p0 &sw3p10>;
|
||||
phy-mode = "10gbase-r";
|
||||
fixed-link {
|
||||
speed = <10000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
|
||||
GSWP(1, "e2", 2, sw1phy1);
|
||||
GSWP(2, "e1", 1, sw1phy2);
|
||||
GSWP(3, "e4", 4, sw1phy3);
|
||||
GSWP(4, "e3", 3, sw1phy4);
|
||||
GSWP(5, "e6", 6, sw1phy5);
|
||||
GSWP(6, "e5", 5, sw1phy6);
|
||||
GSWP(7, "e8", 8, sw1phy7);
|
||||
GSWP(8, "e7", 7, sw1phy8);
|
||||
XSWP(9, "e14", 14, sfp1);
|
||||
XSWP(a, "e13", 13, sfp0);
|
||||
};
|
||||
|
||||
mdio {
|
||||
@@ -175,15 +175,9 @@ CONFIG_VLAN_8021Q=y
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_VLAN_8021Q_MVRP=y
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_MQPRIO=y
|
||||
CONFIG_NET_CLS_BASIC=y
|
||||
CONFIG_NET_CLS_BPF=y
|
||||
CONFIG_NET_CLS_FLOWER=y
|
||||
CONFIG_NET_CLS_ACT=y
|
||||
CONFIG_NET_ACT_GACT=y
|
||||
CONFIG_NET_ACT_MIRRED=y
|
||||
CONFIG_NET_ACT_SKBEDIT=y
|
||||
CONFIG_DCB=y
|
||||
CONFIG_NETLINK_DIAG=y
|
||||
CONFIG_MPLS=y
|
||||
CONFIG_NET_MPLS_GSO=y
|
||||
@@ -512,7 +506,6 @@ CONFIG_FUSE_FS=y
|
||||
CONFIG_VIRTIO_FS=y
|
||||
CONFIG_OVERLAY_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_SQUASHFS=y
|
||||
|
||||
@@ -1,165 +0,0 @@
|
||||
FriendlyELC NanoPi R2S
|
||||
======================
|
||||
|
||||
The [NanoPi R2S][1] is a very low-cost 64-bit ARM min router, powered by
|
||||
the Rockchip RK3328, quad-core Cortex-A53.
|
||||
|
||||
The R2S does not have any onboard eMMC, so the only way to boot Infix on
|
||||
it is using and SD card.
|
||||
|
||||
|
||||
LEDs
|
||||
----
|
||||
|
||||
The front system LEDs work as follows in Infix:
|
||||
|
||||
| **Stage** | **SYS** | **LAN** | **WAN** |
|
||||
|----------------|---------|---------|---------|
|
||||
| Power-on | dimmed | off | off |
|
||||
| Factory reset | on | on | on |
|
||||
| Linux loading | on | off | off |
|
||||
| System loading | 1 Hz | off | off |
|
||||
| System up | off | on | off |
|
||||
| WAN address | off | on | on |
|
||||
| Locate | 1 Hz | 1 Hz | 1 Hz |
|
||||
| Fail safe | 5 Hz | off | off |
|
||||
| Panic | 5 Hz | 5 Hz | 5 Hz |
|
||||
|
||||
Powering on the device the SYS LED is turned on faintly (dimmed). It
|
||||
remains dimmed while U-Boot loads the kernel, and turns bright red when
|
||||
the kernel starts. It remains steady on until the system has started
|
||||
the LED daemon, `iitod`, which sets it blinking at 1 Hz while the rest
|
||||
of the system starts up. When the system has come up successfully, the
|
||||
SYS LED is turned off and the green LAN LED turns on. The WAN LED will
|
||||
turn on (green) when the WAN interface is up and has an IP address.
|
||||
|
||||
> Compared to the `x86_64` Qemu target, it takes a while to parse all
|
||||
> YANG models and load `startup-config`, but the whole process should
|
||||
> not take more than 60 seconds, and usually a lot less.
|
||||
|
||||
If a "find my device" function exists, it will blink all LEDs at 1 Hz.
|
||||
|
||||
If `startup-config` fails to load Ínfix reverts to `failure-config`,
|
||||
putting the device in fail safe (or fail secure) mode. Indicated by
|
||||
the SYS LED blinking at 5 Hz instead of turning off.
|
||||
|
||||
If Infix for some reason also fails to load `failure-config`, then all
|
||||
LEDs will blink at 5 Hz to clearly indicate something is very wrong.
|
||||
|
||||
In all error cases the console shows the problem.
|
||||
|
||||
|
||||
Factory Reset
|
||||
-------------
|
||||
|
||||
The reset button on the side can be used not only to safely reboot the
|
||||
device, but can also be used to trigger a factory reset at power on.
|
||||
|
||||
At power-on, keep the reset button pressed for 10 seconds. The system
|
||||
LEDs (SYS, WAN, LAN) will all blink at 1 Hz, to help you count down the
|
||||
seconds. When the 10 seconds have passed all LEDs are turned off before
|
||||
loading Linux.
|
||||
|
||||
When Linux boots up it confirms the factory reset by lighting up the
|
||||
LEDs again, no blinking this time. The LEDs stay on until all files and
|
||||
directories on read/writable partitions (`/cfg` and `/var`) have been
|
||||
safely erased.
|
||||
|
||||
The system then continues loading, turning off all LEDs except SYS,
|
||||
which blinks calmly at 1 Hz as usual until the system has completed
|
||||
loading, this time with a `startup-config` freshly restored from the
|
||||
device's `factory-config`.
|
||||
|
||||
|
||||
How to Build
|
||||
------------
|
||||
|
||||
```
|
||||
$ make r2s_defconfig
|
||||
$ make
|
||||
```
|
||||
|
||||
Once the build has finished you will have `output/images/sdcard.img`
|
||||
which you can flash to an SD card.
|
||||
|
||||
```
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=1M status=progress oflag=direct
|
||||
```
|
||||
|
||||
> **WARNING:** ensure `/dev/mmcblk0` really is the correct device for
|
||||
> your SD card, and not used by the system!
|
||||
|
||||
|
||||
Booting the Board
|
||||
-----------------
|
||||
|
||||
1. Connect a TTL cable to three UART pins, GND is closest to the edge
|
||||
2. Insert the flashed SD card
|
||||
3. Power-up the board using an USB-C cable (ensure good power source!)
|
||||
|
||||
Worth noting, unlike many other boards, the Rockchip family of chipsets
|
||||
runs the UART at 1500000 bps (1.5 Mbps) 8N1.
|
||||
|
||||
|
||||
Secure Boot
|
||||
-----------
|
||||
|
||||
Like other Infix builds, the R2S enjoys secure boot. Please note,
|
||||
however that the default signing keys are the public!
|
||||
|
||||
Also, default builds allow modifying and saving the U-Boot environment
|
||||
(see below), which you may want to disable to secure the device. The
|
||||
device also runs in *developer mode*, allowing full U-Boot shell access,
|
||||
which you may also want to disable in a full production setting.
|
||||
|
||||
|
||||
Caveat
|
||||
------
|
||||
|
||||
Most (all?) of these boards do not have any Vital Product Data (VPD)
|
||||
EEPROM mounted. This means they do not come with unique MAC addresses
|
||||
allocated to the two Ethernet ports.
|
||||
|
||||
The bootloader (U-Boot) default environment for the board is usually
|
||||
what provides a default, the same default MAC addresses to Linux:
|
||||
|
||||
- 4a:dc:d8:20:0d:84
|
||||
- 4a:dc:d8:20:0d:85
|
||||
|
||||
This is important in case you want to run multiple R2S devices on the
|
||||
same LAN. Meaning you either have to change the MAC address in the
|
||||
U-Boot environment (below), or modify your `phys-address` setting in
|
||||
Infix for the interface(s).
|
||||
|
||||
Break into U-Boot using Ctrl-C at power-on, preferably when the text
|
||||
`Press Ctrl-C NOW to enter boot menu` is displayed. Exit the menu to
|
||||
get to the prompt:
|
||||
|
||||
```
|
||||
(r2s) printenv
|
||||
...
|
||||
eth1addr=4a:dc:d8:20:0d:84
|
||||
ethact=ethernet@ff540000
|
||||
ethaddr=4a:dc:d8:20:0d:85
|
||||
ethprime=eth0
|
||||
...
|
||||
```
|
||||
|
||||
Here we change both addresses, using the *Locally Administered* bit:
|
||||
|
||||
```
|
||||
(r2s) setenv eth1addr 02:00:c0:ff:ee:01
|
||||
(r2s) setenv ethaddr 02:00:c0:ff:ee:00
|
||||
(r2s) saveenv
|
||||
```
|
||||
|
||||
Boot the system, log into Linux, and inspect the MAC addresses:
|
||||
|
||||
```
|
||||
admin@infix-00-00-00:~$ ip -br l
|
||||
lo UP 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
|
||||
eth0 UP 02:00:c0:ff:ee:00 <BROADCAST,MULTICAST,UP,LOWER_UP>
|
||||
eth1 UP 02:00:c0:ff:ee:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
|
||||
```
|
||||
|
||||
[1]: https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R2S
|
||||
@@ -0,0 +1,4 @@
|
||||
label Infix on NanoPi R2S
|
||||
kernel /boot/Image
|
||||
devicetree /boot/rk3328-nanopi-r2s.dtb
|
||||
append root=/dev/mmcblk0p1 rw rootwait bonding.max_bonds=0 dummy.numdummies=0 fb_tunnels=none quiet
|
||||
@@ -1,70 +1,37 @@
|
||||
image cfg.ext4 {
|
||||
empty = true
|
||||
temporary = true
|
||||
size = 16M
|
||||
|
||||
ext4 {
|
||||
label = "cfg"
|
||||
}
|
||||
}
|
||||
|
||||
image var.ext4 {
|
||||
empty = true
|
||||
temporary = true
|
||||
size = 512M
|
||||
|
||||
ext4 {
|
||||
label = "var"
|
||||
use-mke2fs = true
|
||||
}
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
partition-table-type = "gpt"
|
||||
}
|
||||
|
||||
partition u-boot-tpl-spl-dtb {
|
||||
in-partition-table = "no"
|
||||
offset = 32K
|
||||
image = "idbloader.img"
|
||||
offset = 32K
|
||||
}
|
||||
|
||||
partition u-boot-dtb {
|
||||
in-partition-table = "no"
|
||||
offset = 8M
|
||||
image = "u-boot.itb"
|
||||
offset = 8M
|
||||
}
|
||||
|
||||
partition aux {
|
||||
partition-uuid = D4EF35A0-0652-45A1-B3DE-D63339C82035
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
offset = 16M
|
||||
image = "aux.ext4"
|
||||
}
|
||||
|
||||
partition primary {
|
||||
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
|
||||
bootable = true
|
||||
size = 200M
|
||||
image = "rootfs.squashfs"
|
||||
}
|
||||
|
||||
partition secondary {
|
||||
partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4
|
||||
bootable = true
|
||||
size = 200M
|
||||
image = "rootfs.squashfs"
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
|
||||
partition cfg {
|
||||
partition-uuid = 7aa497f0-73b5-47e5-b2ab-8752d8a48105
|
||||
partition-type = 0x83
|
||||
image = "cfg.ext4"
|
||||
}
|
||||
|
||||
partition var {
|
||||
partition-uuid = 8046A06A-E45A-4A14-A6AD-6684704A393F
|
||||
image = "var.ext4"
|
||||
}
|
||||
}
|
||||
|
||||
# Silence genimage warnings
|
||||
|
||||
@@ -3,31 +3,22 @@ CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_AUDIT=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_TASK_DELAY_ACCT=y
|
||||
CONFIG_TASK_XACCT=y
|
||||
CONFIG_PSI=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_BUF_SHIFT=18
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_CFS_BANDWIDTH=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CGROUP_HUGETLB=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_PERF=y
|
||||
CONFIG_CGROUP_BPF=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
@@ -36,14 +27,19 @@ CONFIG_EXPERT=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_KEXEC_FILE=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_ARCH_ACTIONS=y
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
CONFIG_ARCH_VEXPRESS=y
|
||||
CONFIG_ARM64_VA_BITS_48=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_RANDOMIZE_BASE=y
|
||||
# CONFIG_SUSPEND is not set
|
||||
CONFIG_HIBERNATION=y
|
||||
CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
|
||||
CONFIG_ENERGY_MODEL=y
|
||||
CONFIG_ARM_PSCI_CPUIDLE=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
@@ -52,8 +48,8 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_ARM_SCMI_CPUFREQ=y
|
||||
CONFIG_ACPI_CPPC_CPUFREQ=m
|
||||
CONFIG_ARM_SCMI_CPUFREQ=y
|
||||
CONFIG_ACPI=y
|
||||
CONFIG_ACPI_APEI=y
|
||||
CONFIG_ACPI_APEI_GHES=y
|
||||
@@ -61,7 +57,6 @@ CONFIG_ACPI_APEI_MEMORY_FAILURE=y
|
||||
CONFIG_ACPI_APEI_EINJ=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_KVM=y
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
# CONFIG_GCC_PLUGINS is not set
|
||||
CONFIG_MODULES=y
|
||||
@@ -72,11 +67,8 @@ CONFIG_KSM=y
|
||||
CONFIG_MEMORY_FAILURE=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_AREAS=20
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_XDP_SOCKETS=y
|
||||
CONFIG_XDP_SOCKETS_DIAG=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_MULTIPLE_TABLES=y
|
||||
@@ -84,66 +76,24 @@ CONFIG_IP_ROUTE_MULTIPATH=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_IP_PNP_BOOTP=y
|
||||
CONFIG_NET_IPIP=m
|
||||
CONFIG_NET_IPGRE_DEMUX=m
|
||||
CONFIG_NET_IPIP=y
|
||||
CONFIG_NET_IPGRE_DEMUX=y
|
||||
CONFIG_NET_IPGRE=m
|
||||
CONFIG_NET_IPGRE_BROADCAST=y
|
||||
CONFIG_IP_MROUTE=y
|
||||
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
|
||||
CONFIG_IP_PIMSM_V1=y
|
||||
CONFIG_IP_PIMSM_V2=y
|
||||
CONFIG_SYN_COOKIES=y
|
||||
CONFIG_IPV6_SIT=m
|
||||
CONFIG_IPV6_GRE=m
|
||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||
CONFIG_IPV6_SUBTREES=y
|
||||
CONFIG_IPV6_MROUTE=y
|
||||
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
|
||||
CONFIG_IPV6_PIMSM_V2=y
|
||||
CONFIG_NETWORK_PHY_TIMESTAMPING=y
|
||||
CONFIG_IPV6=m
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_BRIDGE_NETFILTER=y
|
||||
CONFIG_NETFILTER_NETLINK_QUEUE=y
|
||||
CONFIG_NETFILTER_NETLINK_LOG=y
|
||||
CONFIG_NF_CONNTRACK=y
|
||||
CONFIG_NF_CONNTRACK=m
|
||||
CONFIG_NF_CONNTRACK_EVENTS=y
|
||||
CONFIG_NF_CONNTRACK_FTP=y
|
||||
CONFIG_NF_TABLES=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_QUEUE=m
|
||||
CONFIG_NFT_REJECT=m
|
||||
CONFIG_NFT_COMPAT=m
|
||||
CONFIG_NFT_HASH=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_LOG=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_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_FILTER=m
|
||||
CONFIG_IP_NF_TARGET_REJECT=m
|
||||
@@ -151,46 +101,17 @@ CONFIG_IP_NF_NAT=m
|
||||
CONFIG_IP_NF_TARGET_MASQUERADE=m
|
||||
CONFIG_IP_NF_MANGLE=m
|
||||
CONFIG_IP6_NF_IPTABLES=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_MANGLE=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_NFT_BRIDGE_REJECT=m
|
||||
CONFIG_NF_CONNTRACK_BRIDGE=y
|
||||
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_AMONG=m
|
||||
CONFIG_BRIDGE_EBT_ARP=m
|
||||
CONFIG_BRIDGE_EBT_IP=m
|
||||
CONFIG_BRIDGE_EBT_IP6=m
|
||||
CONFIG_BRIDGE_EBT_LIMIT=m
|
||||
CONFIG_BRIDGE_EBT_MARK=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_MARK_T=m
|
||||
CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_BRIDGE=y
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
CONFIG_BRIDGE_MRP=y
|
||||
CONFIG_BRIDGE_CFM=y
|
||||
CONFIG_VLAN_8021Q=y
|
||||
CONFIG_NET_DSA=m
|
||||
CONFIG_NET_DSA_TAG_OCELOT=m
|
||||
CONFIG_NET_DSA_TAG_OCELOT_8021Q=m
|
||||
CONFIG_VLAN_8021Q=m
|
||||
CONFIG_VLAN_8021Q_GVRP=y
|
||||
CONFIG_VLAN_8021Q_MVRP=y
|
||||
CONFIG_NET_SCHED=y
|
||||
@@ -200,22 +121,13 @@ CONFIG_NET_SCH_TAPRIO=m
|
||||
CONFIG_NET_SCH_MQPRIO=m
|
||||
CONFIG_NET_SCH_INGRESS=m
|
||||
CONFIG_NET_CLS_BASIC=m
|
||||
CONFIG_NET_CLS_BPF=m
|
||||
CONFIG_NET_CLS_FLOWER=m
|
||||
CONFIG_NET_CLS_ACT=y
|
||||
CONFIG_NET_ACT_GACT=y
|
||||
CONFIG_NET_ACT_MIRRED=y
|
||||
CONFIG_NET_ACT_NAT=y
|
||||
CONFIG_NET_ACT_SKBEDIT=y
|
||||
CONFIG_NET_ACT_VLAN=y
|
||||
CONFIG_NET_ACT_BPF=y
|
||||
CONFIG_DCB=y
|
||||
CONFIG_NETLINK_DIAG=y
|
||||
CONFIG_MPLS=y
|
||||
CONFIG_NET_MPLS_GSO=y
|
||||
CONFIG_MPLS_ROUTING=m
|
||||
CONFIG_NET_PKTGEN=y
|
||||
CONFIG_NET_ACT_GACT=m
|
||||
CONFIG_NET_ACT_MIRRED=m
|
||||
CONFIG_NET_ACT_GATE=m
|
||||
CONFIG_BT=m
|
||||
CONFIG_BT_HIDP=m
|
||||
# CONFIG_BT_LE is not set
|
||||
CONFIG_BT_LEDS=y
|
||||
# CONFIG_BT_DEBUGFS is not set
|
||||
@@ -230,7 +142,6 @@ CONFIG_MAC80211_LEDS=y
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_NET_9P=y
|
||||
CONFIG_NET_9P_VIRTIO=y
|
||||
# CONFIG_ETHTOOL_NETLINK is not set
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIEPORTBUS=y
|
||||
CONFIG_PCI_IOV=y
|
||||
@@ -246,7 +157,6 @@ CONFIG_PCI_EPF_TEST=m
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_FW_LOADER_USER_HELPER=y
|
||||
CONFIG_VEXPRESS_CONFIG=y
|
||||
CONFIG_ARM_SCMI_PROTOCOL=y
|
||||
CONFIG_ARM_SCPI_PROTOCOL=y
|
||||
CONFIG_EFI_CAPSULE_LOADER=y
|
||||
@@ -261,7 +171,6 @@ CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_PHYSMAP_OF=y
|
||||
CONFIG_MTD_DATAFLASH=y
|
||||
CONFIG_MTD_SST25L=y
|
||||
CONFIG_MTD_BLOCK2MTD=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_NAND_DENALI_DT=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
@@ -282,7 +191,6 @@ CONFIG_SCSI_HISI_SAS=y
|
||||
CONFIG_SCSI_HISI_SAS_PCI=y
|
||||
CONFIG_MEGARAID_SAS=y
|
||||
CONFIG_SCSI_MPT3SAS=m
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_SATA_AHCI=y
|
||||
CONFIG_SATA_AHCI_PLATFORM=y
|
||||
@@ -290,29 +198,24 @@ CONFIG_AHCI_CEVA=y
|
||||
CONFIG_SATA_SIL24=y
|
||||
CONFIG_PATA_OF_PLATFORM=y
|
||||
CONFIG_MD=y
|
||||
# CONFIG_MD_BITMAP_FILE is not set
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
CONFIG_DM_INIT=y
|
||||
CONFIG_DM_VERITY=y
|
||||
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y
|
||||
CONFIG_BLK_DEV_MD=m
|
||||
CONFIG_BLK_DEV_DM=m
|
||||
CONFIG_DM_MIRROR=m
|
||||
CONFIG_DM_ZERO=m
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_BONDING=m
|
||||
CONFIG_DUMMY=m
|
||||
CONFIG_DUMMY=y
|
||||
CONFIG_WIREGUARD=m
|
||||
CONFIG_MACVLAN=m
|
||||
CONFIG_MACVTAP=m
|
||||
CONFIG_IPVLAN=m
|
||||
CONFIG_IPVTAP=m
|
||||
CONFIG_VXLAN=m
|
||||
CONFIG_VXLAN=y
|
||||
CONFIG_GENEVE=m
|
||||
CONFIG_BAREUDP=m
|
||||
CONFIG_MACSEC=m
|
||||
CONFIG_TUN=m
|
||||
CONFIG_TUN=y
|
||||
CONFIG_VETH=m
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_NLMON=y
|
||||
CONFIG_NET_VRF=y
|
||||
CONFIG_VIRTIO_NET=m
|
||||
# CONFIG_NET_VENDOR_3COM is not set
|
||||
# CONFIG_NET_VENDOR_ACTIONS is not set
|
||||
# CONFIG_NET_VENDOR_ADAPTEC is not set
|
||||
# CONFIG_NET_VENDOR_AGERE is not set
|
||||
# CONFIG_NET_VENDOR_ALACRITECH is not set
|
||||
@@ -380,12 +283,15 @@ CONFIG_STMMAC_ETH=y
|
||||
# CONFIG_NET_VENDOR_VIA is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
# CONFIG_NET_VENDOR_XILINX is not set
|
||||
CONFIG_LED_TRIGGER_PHY=y
|
||||
CONFIG_AX88796B_PHY=y
|
||||
CONFIG_DAVICOM_PHY=m
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MICROSEMI_PHY=y
|
||||
CONFIG_AT803X_PHY=m
|
||||
CONFIG_REALTEK_PHY=y
|
||||
CONFIG_ROCKCHIP_PHY=y
|
||||
CONFIG_MDIO_BITBANG=y
|
||||
CONFIG_MDIO_BCM_UNIMAC=m
|
||||
CONFIG_MDIO_THUNDER=y
|
||||
CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y
|
||||
CONFIG_MDIO_BUS_MUX_MMIOREG=y
|
||||
CONFIG_USB_RTL8150=m
|
||||
@@ -393,7 +299,6 @@ CONFIG_USB_RTL8152=m
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_USB_NET_AX8817X=m
|
||||
CONFIG_USB_NET_AX88179_178A=m
|
||||
CONFIG_USB_NET_CDC_NCM=m
|
||||
CONFIG_USB_NET_DM9601=m
|
||||
CONFIG_USB_NET_SMSC75XX=m
|
||||
CONFIG_USB_NET_SMSC95XX=m
|
||||
@@ -401,12 +306,13 @@ CONFIG_USB_NET_NET1080=m
|
||||
CONFIG_USB_NET_PLUSB=m
|
||||
CONFIG_USB_NET_MCS7830=m
|
||||
CONFIG_USB_NET_CDC_SUBSET=m
|
||||
# CONFIG_USB_NET_ZAURUS is not set
|
||||
CONFIG_USB_NET_ZAURUS=m
|
||||
CONFIG_ATH10K=m
|
||||
CONFIG_ATH10K_PCI=m
|
||||
CONFIG_WCN36XX=m
|
||||
# CONFIG_WLAN_VENDOR_ATMEL is not set
|
||||
# CONFIG_WLAN_VENDOR_BROADCOM is not set
|
||||
# CONFIG_WLAN_VENDOR_CISCO is not set
|
||||
# CONFIG_WLAN_VENDOR_INTEL is not set
|
||||
# CONFIG_WLAN_VENDOR_INTERSIL is not set
|
||||
# CONFIG_WLAN_VENDOR_MARVELL is not set
|
||||
@@ -449,11 +355,9 @@ CONFIG_RTW89_DEBUGMSG=y
|
||||
# CONFIG_WLAN_VENDOR_TI is not set
|
||||
# CONFIG_WLAN_VENDOR_ZYDAS is not set
|
||||
# CONFIG_WLAN_VENDOR_QUANTENNA is not set
|
||||
CONFIG_NET_FAILOVER=y
|
||||
CONFIG_INPUT_FF_MEMLESS=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_EVBUG=y
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_KEYBOARD_GPIO_POLLED=y
|
||||
# CONFIG_INPUT_KEYBOARD is not set
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_RK805_PWRKEY=y
|
||||
@@ -500,38 +404,47 @@ CONFIG_PPS=y
|
||||
CONFIG_DEBUG_PINCTRL=y
|
||||
CONFIG_PINCTRL_RK805=y
|
||||
CONFIG_PINCTRL_SINGLE=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
CONFIG_GPIO_ALTERA=m
|
||||
CONFIG_GPIO_DWAPB=y
|
||||
CONFIG_GPIO_MB86S7X=y
|
||||
CONFIG_GPIO_PL061=y
|
||||
CONFIG_GPIO_XGENE=y
|
||||
CONFIG_GPIO_MAX732X=y
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
CONFIG_GPIO_PCA953X_IRQ=y
|
||||
CONFIG_POWER_RESET_GPIO_RESTART=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_SYSCON_REBOOT_MODE=y
|
||||
CONFIG_CHARGER_RK817=y
|
||||
CONFIG_BATTERY_SBS=m
|
||||
CONFIG_BATTERY_BQ27XXX=y
|
||||
CONFIG_BATTERY_MAX17042=m
|
||||
CONFIG_CHARGER_BQ25890=m
|
||||
CONFIG_CHARGER_BQ25980=m
|
||||
CONFIG_SENSORS_ARM_SCMI=y
|
||||
CONFIG_SENSORS_ARM_SCPI=y
|
||||
CONFIG_SENSORS_LM90=m
|
||||
CONFIG_SENSORS_PWM_FAN=m
|
||||
CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_THERMAL_EMULATION=y
|
||||
CONFIG_ROCKCHIP_THERMAL=m
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_WATCHDOG_SYSFS=y
|
||||
CONFIG_SOFT_WATCHDOG=y
|
||||
CONFIG_ARM_SP805_WATCHDOG=y
|
||||
CONFIG_ARM_SBSA_WATCHDOG=y
|
||||
CONFIG_DW_WATCHDOG=y
|
||||
CONFIG_ARM_SMC_WATCHDOG=y
|
||||
CONFIG_MFD_RK8XX_I2C=y
|
||||
CONFIG_MFD_RK8XX_SPI=y
|
||||
# CONFIG_MFD_VEXPRESS_SYSREG is not set
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_MFD_STMFX=y
|
||||
CONFIG_REGULATOR_DEBUG=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_USERSPACE_CONSUMER=y
|
||||
CONFIG_REGULATOR_NETLINK_EVENTS=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
CONFIG_REGULATOR_PWM=y
|
||||
CONFIG_REGULATOR_RK808=y
|
||||
CONFIG_REGULATOR_VCTRL=y
|
||||
# CONFIG_HID_SUPPORT is not set
|
||||
CONFIG_USB_ULPI_BUS=y
|
||||
CONFIG_REGULATOR_VEXPRESS=m
|
||||
# CONFIG_HID_GENERIC is not set
|
||||
# CONFIG_USB_HID is not set
|
||||
CONFIG_USB_CONN_GPIO=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
@@ -539,7 +452,6 @@ CONFIG_USB_DYNAMIC_MINORS=y
|
||||
CONFIG_USB_OTG=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_ROOT_HUB_TT=y
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
@@ -548,6 +460,10 @@ CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_MUSB_HDRC=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_CHIPIDEA=y
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_ISP1760=y
|
||||
CONFIG_USB_SERIAL=m
|
||||
CONFIG_USB_SERIAL_GENERIC=y
|
||||
CONFIG_USB_SERIAL_SIMPLE=m
|
||||
@@ -555,6 +471,7 @@ CONFIG_USB_SERIAL_CP210X=m
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=m
|
||||
CONFIG_USB_SERIAL_PL2303=m
|
||||
CONFIG_USB_SERIAL_OPTION=m
|
||||
CONFIG_USB_HSIC_USB3503=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_USB_ULPI=y
|
||||
CONFIG_USB_GADGET=y
|
||||
@@ -571,6 +488,12 @@ CONFIG_USB_CONFIGFS_RNDIS=y
|
||||
CONFIG_USB_CONFIGFS_EEM=y
|
||||
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
|
||||
CONFIG_USB_CONFIGFS_F_FS=y
|
||||
CONFIG_TYPEC=m
|
||||
CONFIG_TYPEC_TCPM=m
|
||||
CONFIG_TYPEC_TCPCI=m
|
||||
CONFIG_TYPEC_FUSB302=m
|
||||
CONFIG_TYPEC_TPS6598X=m
|
||||
CONFIG_TYPEC_HD3SS3220=m
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_ARMMMCI=y
|
||||
@@ -582,9 +505,13 @@ CONFIG_MMC_SDHCI_CADENCE=y
|
||||
CONFIG_MMC_SDHCI_F_SDH30=y
|
||||
CONFIG_MMC_SPI=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_EXYNOS=y
|
||||
CONFIG_MMC_DW_HI3798CV200=y
|
||||
CONFIG_MMC_DW_K3=y
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_MMC_MTK=y
|
||||
CONFIG_MMC_SDHCI_XENON=y
|
||||
CONFIG_MMC_SDHCI_AM654=y
|
||||
CONFIG_SCSI_UFSHCD=y
|
||||
CONFIG_SCSI_UFSHCD_PLATFORM=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
@@ -600,7 +527,6 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
CONFIG_LEDS_TRIGGER_PANIC=y
|
||||
CONFIG_LEDS_TRIGGER_NETDEV=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_RK808=y
|
||||
CONFIG_RTC_DRV_EFI=y
|
||||
@@ -615,6 +541,7 @@ CONFIG_VIRTIO_INPUT=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
# CONFIG_VHOST_MENU is not set
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_PRISM2_USB=m
|
||||
CONFIG_RTLLIB=m
|
||||
CONFIG_RTL8192E=m
|
||||
CONFIG_RTL8723BS=m
|
||||
@@ -638,6 +565,7 @@ CONFIG_ROCKCHIP_IODOMAIN=y
|
||||
CONFIG_ROCKCHIP_DTPM=m
|
||||
CONFIG_ROCKCHIP_PM_DOMAINS=y
|
||||
CONFIG_DEVFREQ_GOV_USERSPACE=m
|
||||
CONFIG_EXTCON_PTN5150=m
|
||||
CONFIG_EXTCON_USB_GPIO=y
|
||||
CONFIG_MEMORY=y
|
||||
CONFIG_IIO=y
|
||||
@@ -650,7 +578,6 @@ CONFIG_IIO_ST_MAGN_3AXIS=m
|
||||
CONFIG_MPL3115=m
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_ROCKCHIP=y
|
||||
CONFIG_RESET_GPIO=y
|
||||
CONFIG_PHY_ROCKCHIP_DPHY_RX0=m
|
||||
CONFIG_PHY_ROCKCHIP_EMMC=y
|
||||
CONFIG_PHY_ROCKCHIP_INNO_HDMI=m
|
||||
@@ -663,6 +590,8 @@ CONFIG_PHY_ROCKCHIP_USB=m
|
||||
CONFIG_POWERCAP=y
|
||||
CONFIG_ARM_SCMI_POWERCAP=y
|
||||
CONFIG_DTPM=y
|
||||
CONFIG_DTPM_CPU=y
|
||||
CONFIG_DTPM_DEVFREQ=y
|
||||
CONFIG_ARM_SMMU_V3_PMU=m
|
||||
CONFIG_NVMEM_RMEM=m
|
||||
CONFIG_NVMEM_ROCKCHIP_EFUSE=m
|
||||
@@ -674,48 +603,30 @@ CONFIG_INTERCONNECT=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_BTRFS_FS=y
|
||||
CONFIG_BTRFS_FS_POSIX_ACL=y
|
||||
CONFIG_FANOTIFY=y
|
||||
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
|
||||
CONFIG_QUOTA=y
|
||||
CONFIG_AUTOFS_FS=y
|
||||
CONFIG_FUSE_FS=y
|
||||
CONFIG_VIRTIO_FS=y
|
||||
CONFIG_OVERLAY_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_OVERLAY_FS=m
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_FAT_DEFAULT_UTF8=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_PROC_CHILDREN=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_HUGETLBFS=y
|
||||
CONFIG_EFIVAR_FS=y
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_XATTR=y
|
||||
CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_LZO=y
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
CONFIG_SQUASHFS_ZSTD=y
|
||||
CONFIG_NFS_FS=y
|
||||
CONFIG_NFS_V4=y
|
||||
CONFIG_NFS_V4_1=y
|
||||
CONFIG_NFS_V4_2=y
|
||||
CONFIG_ROOT_NFS=y
|
||||
CONFIG_9P_FS=y
|
||||
CONFIG_NLS_DEFAULT="iso8859-15"
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_NLS_ISO8859_15=y
|
||||
CONFIG_NLS_UTF8=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_CRYPTO_DH=m
|
||||
CONFIG_CRYPTO_CURVE25519=m
|
||||
CONFIG_CRYPTO_ECHAINIV=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CRYPTO_BLAKE2B=m
|
||||
CONFIG_CRYPTO_XXHASH=m
|
||||
CONFIG_CRYPTO_ANSI_CPRNG=y
|
||||
CONFIG_CRYPTO_USER_API_RNG=m
|
||||
CONFIG_CRYPTO_GHASH_ARM64_CE=y
|
||||
@@ -724,22 +635,20 @@ CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA512_ARM64_CE=m
|
||||
CONFIG_CRYPTO_SHA3_ARM64=m
|
||||
CONFIG_CRYPTO_SM3_ARM64_CE=m
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_BS=m
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=m
|
||||
CONFIG_CRYPTO_DEV_ROCKCHIP=y
|
||||
CONFIG_CRYPTO_DEV_CCREE=m
|
||||
CONFIG_PACKING=y
|
||||
CONFIG_INDIRECT_PIO=y
|
||||
CONFIG_CRC_CCITT=m
|
||||
CONFIG_CRC8=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_CMA_SIZE_MBYTES=32
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
CONFIG_FUNCTION_TRACER=y
|
||||
# CONFIG_FTRACE is not set
|
||||
CONFIG_MEMTEST=y
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
{
|
||||
"ieee802-dot1ab-lldp:lldp": {
|
||||
"infix-lldp:enabled": true
|
||||
},
|
||||
"ietf-interfaces:interfaces": {
|
||||
"interface": [
|
||||
{
|
||||
"name": "lo",
|
||||
"type": "infix-if-type:loopback",
|
||||
"ietf-ip:ipv4": {
|
||||
"address": [
|
||||
{
|
||||
"ip": "127.0.0.1",
|
||||
"prefix-length": 8
|
||||
}
|
||||
]
|
||||
},
|
||||
"ietf-ip:ipv6": {
|
||||
"address": [
|
||||
{
|
||||
"ip": "::1",
|
||||
"prefix-length": 128
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "lan",
|
||||
"type": "infix-if-type:ethernet",
|
||||
"ietf-ip:ipv4": {
|
||||
"address": [
|
||||
{
|
||||
"ip": "192.168.2.1",
|
||||
"prefix-length": 24
|
||||
}
|
||||
]
|
||||
},
|
||||
"ietf-ip:ipv6": {}
|
||||
},
|
||||
{
|
||||
"name": "wan",
|
||||
"type": "infix-if-type:ethernet"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ietf-keystore:keystore": {
|
||||
"asymmetric-keys": {
|
||||
"asymmetric-key": [
|
||||
{
|
||||
"name": "genkey",
|
||||
"public-key-format": "ietf-crypto-types:ssh-public-key-format",
|
||||
"public-key": "",
|
||||
"private-key-format": "ietf-crypto-types:rsa-private-key-format",
|
||||
"cleartext-private-key": "",
|
||||
"certificates": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"ietf-netconf-acm:nacm": {
|
||||
"groups": {
|
||||
"group": [
|
||||
{
|
||||
"name": "admin",
|
||||
"user-name": [
|
||||
"admin"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"rule-list": [
|
||||
{
|
||||
"name": "admin-acl",
|
||||
"group": [
|
||||
"admin"
|
||||
],
|
||||
"rule": [
|
||||
{
|
||||
"name": "permit-all",
|
||||
"module-name": "*",
|
||||
"access-operations": "*",
|
||||
"action": "permit",
|
||||
"comment": "Allow 'admin' group complete access to all operations and data."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ietf-netconf-server:netconf-server": {
|
||||
"listen": {
|
||||
"endpoints": {
|
||||
"endpoint": [
|
||||
{
|
||||
"name": "default-ssh",
|
||||
"ssh": {
|
||||
"tcp-server-parameters": {
|
||||
"local-address": "::"
|
||||
},
|
||||
"ssh-server-parameters": {
|
||||
"server-identity": {
|
||||
"host-key": [
|
||||
{
|
||||
"name": "default-key",
|
||||
"public-key": {
|
||||
"central-keystore-reference": "genkey"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"ietf-system:system": {
|
||||
"hostname": "r2s",
|
||||
"ntp": {
|
||||
"enabled": true,
|
||||
"server": [
|
||||
{
|
||||
"name": "ntp.org",
|
||||
"udp": {
|
||||
"address": "pool.ntp.org"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"authentication": {
|
||||
"user": [
|
||||
{
|
||||
"name": "admin",
|
||||
"password": "$factory$",
|
||||
"infix-system:shell": "bash"
|
||||
}
|
||||
]
|
||||
},
|
||||
"infix-system:motd-banner": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCAtLSBhIE5ldHdvcmsgT3BlcmF0aW5nIFN5c3RlbQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQuZ2l0aHViLmlvCictJy0tLSctJwo="
|
||||
},
|
||||
"infix-dhcp-client:dhcp-client": {
|
||||
"client-if": [
|
||||
{
|
||||
"if-name": "wan",
|
||||
"option": [
|
||||
{
|
||||
"name": "broadcast"
|
||||
},
|
||||
{
|
||||
"name": "dns"
|
||||
},
|
||||
{
|
||||
"name": "domain"
|
||||
},
|
||||
{
|
||||
"name": "hostname"
|
||||
},
|
||||
{
|
||||
"name": "ntpsrv"
|
||||
},
|
||||
{
|
||||
"name": "router"
|
||||
},
|
||||
{
|
||||
"name": "subnet"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"infix-meta:meta": {
|
||||
"infix-meta:version": "1.0"
|
||||
},
|
||||
"infix-services:mdns": {
|
||||
"enabled": true
|
||||
},
|
||||
"infix-services:web": {
|
||||
"enabled": true,
|
||||
"console": {
|
||||
"enabled": true
|
||||
},
|
||||
"netbrowse": {
|
||||
"enabled": true
|
||||
},
|
||||
"restconf": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
../available/input-event-daemon.conf
|
||||
@@ -1 +0,0 @@
|
||||
service [12345789] log wan-monitor.sh -- WAN Health monitor
|
||||
@@ -1,91 +0,0 @@
|
||||
{
|
||||
"input": {
|
||||
"path": {
|
||||
"locate": { "path": "/run/led/locate" },
|
||||
|
||||
"status-prime": { "path": "/run/led/status-prime" },
|
||||
"status-ok": { "path": "/run/led/status-ok" },
|
||||
"status-err": { "path": "/run/led/status-err" },
|
||||
"status-crit": { "path": "/run/led/status-crit" },
|
||||
|
||||
"fault-prime": { "path": "/run/led/fault-prime" },
|
||||
"fault-ok": { "path": "/run/led/fault-ok" },
|
||||
"fault-err": { "path": "/run/led/fault-err" },
|
||||
"fault-crit": { "path": "/run/led/fault-crit" },
|
||||
|
||||
"wan-up": { "path": "/run/led/wan-up" },
|
||||
|
||||
"startup": { "path": "/run/finit/cond/run/startup/success" },
|
||||
"fail-safe": { "path": "/run/finit/cond/run/failure/success" },
|
||||
"panic": { "path": "/run/finit/cond/run/failure/failure" }
|
||||
},
|
||||
"udev": {
|
||||
"power-a": { "subsystem": "power_supply" },
|
||||
"power-b": { "subsystem": "power_supply" }
|
||||
}
|
||||
},
|
||||
|
||||
"output": {
|
||||
"led-group": {
|
||||
"port-link-act": {
|
||||
"match": ["*:green:tp", "*:green:sfp", "*:green:port" ],
|
||||
|
||||
"rules": [
|
||||
{ "if": "true", "then": { "trigger": "netdev", "link": 1, "rx": 1, "tx": 1 } }
|
||||
]
|
||||
},
|
||||
"port-alarm": {
|
||||
"match": ["*:yellow:tp", "*:yellow:sfp", "*:yellow:port" ],
|
||||
|
||||
"rules": [
|
||||
]
|
||||
}
|
||||
},
|
||||
"led": {
|
||||
"nanopi-r2s:red:sys": {
|
||||
"rules": [
|
||||
{ "if": "locate", "then": "@blink-1hz" },
|
||||
{ "if": "panic", "then": "@blink-5hz" },
|
||||
{ "if": "fail-safe", "then": "@blink-5hz" },
|
||||
{ "if": "startup", "then": "@off" },
|
||||
{ "if": "true", "then": "@blink-1hz" }
|
||||
]
|
||||
},
|
||||
|
||||
"nanopi-r2s:green:lan": {
|
||||
"rules": [
|
||||
{ "if": "locate", "then": "@blink-1hz" },
|
||||
{ "if": "panic", "then": "@blink-5hz" },
|
||||
{ "if": "startup", "then": "@on" }
|
||||
]
|
||||
},
|
||||
|
||||
"nanopi-r2s:green:wan": {
|
||||
"rules": [
|
||||
{ "if": "locate", "then": "@blink-1hz" },
|
||||
{ "if": "panic", "then": "@blink-5hz" },
|
||||
{ "if": "wan-up", "then": "@on" }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"aliases": {
|
||||
"on": {
|
||||
"brightness": true
|
||||
},
|
||||
"off": {
|
||||
"brightness": false
|
||||
},
|
||||
"blink-1hz": {
|
||||
"trigger": "timer",
|
||||
"delay_on": 500,
|
||||
"delay_off": 500
|
||||
},
|
||||
"blink-5hz": {
|
||||
"trigger": "timer",
|
||||
"delay_on": 100,
|
||||
"delay_off": 100
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
[Global]
|
||||
listen = /dev/input/event1
|
||||
|
||||
[Keys]
|
||||
RESTART = reboot
|
||||
@@ -1,2 +0,0 @@
|
||||
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/ff540000.ethernet/net/eth0", NAME="wan"
|
||||
ACTION=="add", SUBSYSTEM=="net", DEVPATH=="/devices/platform/ff600000.usb/xhci-hcd.0.auto/usb3/3-1/3-1:1.0/net/*", NAME="lan"
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Background WAN interface monitor. Lights up WAN LED
|
||||
# while the interface has a DHCP address.
|
||||
|
||||
LED_FILE="/run/led/wan-up"
|
||||
PID_FILE="/run/$(basename "$0").pid"
|
||||
|
||||
check_wan()
|
||||
{
|
||||
ip_info=$(ip a show wan)
|
||||
|
||||
if echo "$ip_info" | grep -q "inet .* proto dhcp"; then
|
||||
[ ! -f "$LED_FILE" ] && touch "$LED_FILE"
|
||||
else
|
||||
[ -f "$LED_FILE" ] && rm "$LED_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup()
|
||||
{
|
||||
rm -f "$LED_FILE"
|
||||
rm -f "$PID_FILE"
|
||||
exit 0
|
||||
}
|
||||
|
||||
trap 'cleanup' TERM INT HUP QUIT
|
||||
echo $$ > "$PID_FILE"
|
||||
|
||||
remaining_time=$((1800 - $(awk '{print int($1)}' /proc/uptime)))
|
||||
[ "$remaining_time" -lt 0 ] && remaining_time=0
|
||||
|
||||
while [ "$remaining_time" -gt 0 ]; do
|
||||
check_wan
|
||||
sleep 1
|
||||
remaining_time=$((remaining_time - 1))
|
||||
done
|
||||
|
||||
while :; do
|
||||
check_wan
|
||||
sleep 5
|
||||
done
|
||||
@@ -1,16 +0,0 @@
|
||||
CONFIG_BUTTON=y
|
||||
CONFIG_BUTTON_GPIO=y
|
||||
|
||||
CONFIG_LED=y
|
||||
CONFIG_LED_GPIO=y
|
||||
|
||||
# CONFIG_MMC_PCI is not set
|
||||
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi r2s-env.dtsi"
|
||||
CONFIG_SYS_PROMPT="(r2s) "
|
||||
|
||||
CONFIG_ENV_OVERWRITE=y
|
||||
# CONFIG_ENV_IS_NOWHERE is not set
|
||||
CONFIG_ENV_IS_IN_EXT4=y
|
||||
# CONFIG_ENV_IS_IN_MMC is not set
|
||||
CONFIG_ENV_EXT4_INTERFACE="mmc"
|
||||
CONFIG_ENV_EXT4_DEVICE_AND_PART="1:1"
|
||||
@@ -1,47 +0,0 @@
|
||||
/ {
|
||||
config {
|
||||
environment {
|
||||
boot_targets = "mmc1";
|
||||
ethprime = "eth0";
|
||||
|
||||
/* This is a development platform, hard code developer mode */
|
||||
ixbtn-devmode = "setenv dev_mode yes; echo Enabled";
|
||||
|
||||
/* Override default definitiion to add LED feedback */
|
||||
ixbtn-factory = "
|
||||
if button factory-reset; then
|
||||
echo \"Keep button pressed for 10 seconds to engage factory reset ...\"
|
||||
|
||||
for tick in . . . . . . . . . .; do
|
||||
led nanopi-r2s:red:sys on
|
||||
led nanopi-r2s:green:lan on
|
||||
led nanopi-r2s:green:wan on
|
||||
sleep 0.5
|
||||
led nanopi-r2s:red:sys off
|
||||
led nanopi-r2s:green:lan off
|
||||
led nanopi-r2s:green:wan off
|
||||
sleep 0.5
|
||||
echo -n \"Checking button: \"
|
||||
button factory-reset || exit
|
||||
done
|
||||
|
||||
echo -n \"Final button check: \"
|
||||
if button factory-reset; then
|
||||
setenv factory_reset yes
|
||||
echo \"FACTORY RESET ENGAGED\"
|
||||
fi
|
||||
fi
|
||||
";
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
factory-reset {
|
||||
gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_POWER>;
|
||||
label = "factory-reset";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
dcp-sc-28p-b.dtb
|
||||
@@ -1 +0,0 @@
|
||||
dcp-sc-28p-a.dtb
|
||||
@@ -1,64 +0,0 @@
|
||||
Microchip SparX-5i PCB135 (eMMC)
|
||||
================================
|
||||
|
||||
At present, only FIT images are supported via the SparX-5i eval
|
||||
board's U-Boot, which must contain a valid load address. If you are
|
||||
using this board, after selecting your base configuration, run the
|
||||
following command to supplement the existing config with the required
|
||||
FIT options:
|
||||
|
||||
make board-enable-sparx-fit
|
||||
|
||||
## Unbricking
|
||||
|
||||
1. Don't load a corrupt bootloader to begin with
|
||||
2. Done
|
||||
|
||||
If, for some reason, you didn't manage to follow step 1, you can use
|
||||
the `FLASH_PROG`(`J4`) connector on the board to access the SPI flash
|
||||
directly.
|
||||
|
||||
Using a [Bus Blaster][BB3] in combination with [dangerspi][dangerspi],
|
||||
you can load a new bootloader. The schematic below details how to
|
||||
connect the Bus Blaster to the board, but the concept should be
|
||||
portable to any debugger/device based around an FTDI2232 chip.
|
||||
|
||||
```
|
||||
Bus Blaster: FLASH_PROG (J4):
|
||||
.---. .---.
|
||||
VTG >o o| VTG SCK >o o| GND
|
||||
TRST |o o| GND MISO |o o| #RESET_FLASH
|
||||
TDI |o o| GND o o| 3V3
|
||||
TMS |o o| GND #CS |o o| #SYSRESET
|
||||
TCK o o| GND MOSI |o o| GND
|
||||
RTCK o o| GND '---'
|
||||
TDO |o o| GND
|
||||
TSRST |o o| GND
|
||||
DBGRQ |o o| GND
|
||||
DBGACK |o o| GND
|
||||
'---'
|
||||
```
|
||||
|
||||
| Bus Blaster | FLASH_PROG |
|
||||
|-------------|----------------|
|
||||
| `VTG` | `3V3` |
|
||||
| `GND` | `GND` |
|
||||
| | |
|
||||
| `VTG` | `#RESET_FLASH` |
|
||||
| `GND` | `#SYSRESET` |
|
||||
| | |
|
||||
| `TDI` | `MOSI` |
|
||||
| `TMS` | `#CS` |
|
||||
| `TCK` | `SCK` |
|
||||
| `TDO` | `MISO` |
|
||||
|
||||
With the cable in place, build U-Boot with the correct configuration:
|
||||
|
||||
make fireant_boot_defconfig && make
|
||||
|
||||
To flash it to the board, connect the cable to `J4` and run:
|
||||
|
||||
make board-sparx-flash-uboot
|
||||
|
||||
[BB3]: http://dangerousprototypes.com/docs/Bus_Blaster#Bus_Blaster_v3
|
||||
[dangerspi]: https://github.com/wkz/dangerspi
|
||||
@@ -160,9 +160,3 @@ config FIT_ARCH
|
||||
config FIT_KERNEL_LOAD_ADDR
|
||||
string "Kernel load address"
|
||||
depends on FIT_IMAGE
|
||||
|
||||
config SDCARD_AUX
|
||||
bool "Create SD-card aux partition"
|
||||
help
|
||||
Create and populate aux.ext4 with rootfs.itbh and rauc.status
|
||||
For use with a static genimage.cfg for, e.g., SD-cards.
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
Welcome to Infix!
|
||||
=================
|
||||
|
||||
Nice to meet ❤️ you! If you are reading this then you have possibly
|
||||
just downloaded and unpacked a release build and are curious about how
|
||||
to proceed from here.
|
||||
|
||||
To test Infix You need a Linux 🐧 system with Qemu or GNS3 installed.
|
||||
We recommend Debian based systems, like Ubuntu and Linux Mint.
|
||||
|
||||
> For a pain-free experience we recommend enabling CPU virtualization in
|
||||
> your BIOS/UEFI, which for many computers is disabled by default.
|
||||
|
||||
From this point we assume you have your x86_64/AMD64 based Linux system
|
||||
up and running. Time to start your favorite terminal application! 😃
|
||||
|
||||
|
||||
Installing Qemu
|
||||
---------------
|
||||
|
||||
This README focus on getting you started with Qemu. From a terminal,
|
||||
install (at least) the x86/x86_64 emulator. The 'virt-manager' is a
|
||||
package that helps pull in other dependencies you may need:
|
||||
|
||||
$ sudo apt install qemu-system-x86 virt-manager
|
||||
|
||||
That's it.
|
||||
|
||||
|
||||
Running Infix in Qemu
|
||||
---------------------
|
||||
|
||||
Depending on how your Linux installation is set up, the following may
|
||||
require being run with superuser privileges, i.e., you may need to
|
||||
repend the command with 'sudo'.
|
||||
|
||||
$ ./qemu.sh
|
||||
|
||||
You should now see the Infix init system booting up. When the final
|
||||
"Please press Enter to activate this console." is shown, press Enter
|
||||
and the login: prompt is displayed.
|
||||
|
||||
The default credentials for the demo builds is
|
||||
|
||||
login: admin
|
||||
password: admin
|
||||
|
||||
Infix -- a Network Operating System v24.09.0-rc1 (hvc0)
|
||||
infix-00-00-00 login: admin
|
||||
Password:
|
||||
.-------.
|
||||
| . . | Infix -- a Network Operating System
|
||||
|-. v .-| https://kernelkit.org
|
||||
'-'---'-'
|
||||
|
||||
Run the command 'cli' for interactive OAM
|
||||
|
||||
admin@infix-00-00-00:~$
|
||||
|
||||
You're in! Play around in your sandbox as much as you like, if you
|
||||
run into problems or have questions, please see the documentation,
|
||||
and don't hesitate to get in touch with us! 😃
|
||||
|
||||
- https://github.com/kernelkit/infix/tree/main/doc
|
||||
|
||||
|
||||
Customizing your "Hardware"
|
||||
---------------------------
|
||||
|
||||
For more Ethernet ports in your emulated system you need to change the
|
||||
Qemu configuration used for Infix. This can be done using a menuconfig
|
||||
interface, which requires the following extra package:
|
||||
|
||||
$ sudo apt install kconfig-frontends
|
||||
|
||||
We can now enter the configuration:
|
||||
|
||||
$ ./qemu.sh -c
|
||||
|
||||
Go down to *Networking*, select *TAP*, now you can change the *Number of
|
||||
TAPs*, e.g. to 10. Exit and save the configuration, then you can start
|
||||
Qemu again:
|
||||
|
||||
./qemu.sh
|
||||
|
||||
> Make sure to do a factory reset from the CLI, otherwise you will be
|
||||
> stuck with that single interface from before.
|
||||
|
||||
|
||||
Errors on Console
|
||||
-----------------
|
||||
|
||||
If you see the following line printed one or more times, don't panic.
|
||||
|
||||
LABEL=var: Can't lookup blockdev
|
||||
|
||||
See the Customizing section above. To silence the error you need to
|
||||
create another writable partition for Infix to store logs, container
|
||||
images, etc. Look for the 'var' keyword, you can adjust the size of
|
||||
the partition.
|
||||
|
||||
|
||||
Graphical Network Simulator 3 (GNS3)
|
||||
------------------------------------
|
||||
|
||||
GNS3 is a very powerful front-end to Qemu which takes care of creating
|
||||
virtual links between network devices running in Qemu. This README is
|
||||
only link to the material you need. This directory holds the appliance
|
||||
file, .gns3a, that references image files also in this directory, that
|
||||
you need to load into GNS3.
|
||||
|
||||
The necessary extra packages are available through the offical PPA. If
|
||||
you don't know what a PPA is, read up on that first:
|
||||
|
||||
- https://launchpad.net/~gns3/+archive/ubuntu/ppa
|
||||
|
||||
There's a lot of tutorials and guides online, start here:
|
||||
|
||||
- https://docs.gns3.com/docs/
|
||||
|
||||
|
||||
About
|
||||
-----
|
||||
|
||||
Infix is a free, Linux based, immutable Network Operating System (NOS)
|
||||
built on Buildroot, and sysrepo. A powerful mix that ease porting to
|
||||
different platforms, simplify long-term maintenance, and provide easy
|
||||
management using NETCONF, RESTCONF, or the built-in command line
|
||||
interface (CLI) from a console or SSH login.
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
rootdir=$BUILD_DIR/genimage.root
|
||||
tempdir=$BUILD_DIR/genimage.tmp
|
||||
|
||||
cat <<EOF > /tmp/mkaux.cfg
|
||||
image aux.ext4 {
|
||||
mountpoint = "/aux"
|
||||
size = 16M
|
||||
|
||||
ext4 {
|
||||
label = "aux"
|
||||
use-mke2fs = true
|
||||
features = "^metadata_csum,^metadata_csum_seed"
|
||||
}
|
||||
}
|
||||
|
||||
# Silence genimage warnings
|
||||
config {}
|
||||
EOF
|
||||
|
||||
rm -rf "$rootdir/aux"
|
||||
mkdir -p "$rootdir/aux"
|
||||
cp -f "$BINARIES_DIR/rootfs.itbh" "$rootdir/aux/primary.itbh"
|
||||
cp -f "$BINARIES_DIR/rootfs.itbh" "$rootdir/aux/secondary.itbh"
|
||||
cp -f "$BINARIES_DIR/rauc.status" "$rootdir/aux/rauc.status"
|
||||
|
||||
mkenvimage -s 0x4000 -o "$rootdir/aux/uboot.env" \
|
||||
"$BR2_EXTERNAL_INFIX_PATH/board/common/uboot/aux-env.txt"
|
||||
|
||||
rm -rf "$BINARIES_DIR/aux.ext4"
|
||||
rm -rf "$tempdir"
|
||||
|
||||
genimage \
|
||||
--rootpath "$rootdir" \
|
||||
--tmppath "$tempdir" \
|
||||
--inputpath "$BINARIES_DIR" \
|
||||
--outputpath "$BINARIES_DIR" \
|
||||
--config "/tmp/mkaux.cfg"
|
||||
+12
-12
@@ -2,30 +2,30 @@
|
||||
|
||||
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
|
||||
compat=$2
|
||||
arch=$2
|
||||
sign=$3
|
||||
|
||||
crt=$(ls $sign/*.crt)
|
||||
key=$(ls $sign/*.key)
|
||||
|
||||
common=$(dirname "$(readlink -f "$0")")
|
||||
common=$(dirname $(readlink -f "$0"))
|
||||
|
||||
work=$BUILD_DIR/mkrauc
|
||||
mkdir -p "$work"
|
||||
mkdir -p $work
|
||||
|
||||
cp -f "$common/rauc-hooks.sh" "$work/hooks.sh"
|
||||
cp -f $common/rauc-hooks.sh $work/hooks.sh
|
||||
|
||||
# RAUC internally uses the file extension to find a suitable install
|
||||
# handler, hence the name must be .img
|
||||
cp -f "$BINARIES_DIR/rootfs.squashfs" "$work/rootfs.img"
|
||||
cp -f "$BINARIES_DIR/rootfs.itbh" "$work/rootfs.itbh"
|
||||
cp -f $BINARIES_DIR/rootfs.squashfs $work/rootfs.img
|
||||
cp -f $BINARIES_DIR/rootfs.itbh $work/rootfs.itbh
|
||||
|
||||
cat >"$work/manifest.raucm" <<EOF
|
||||
cat >$work/manifest.raucm <<EOF
|
||||
[update]
|
||||
compatible=${compat}
|
||||
compatible=infix-${arch}
|
||||
version=${GIT_VERSION}
|
||||
|
||||
[bundle]
|
||||
@@ -39,7 +39,7 @@ filename=rootfs.img
|
||||
hooks=post-install
|
||||
EOF
|
||||
|
||||
rm -f "$BINARIES_DIR/$name.pkg"
|
||||
rm -f $BINARIES_DIR/$name.pkg
|
||||
|
||||
rauc --cert="$crt" --key="$key" \
|
||||
bundle "$work" "$BINARIES_DIR/$name.pkg"
|
||||
rauc --cert=$crt --key=$key \
|
||||
bundle $work $BINARIES_DIR/$name.pkg
|
||||
|
||||
@@ -4,37 +4,6 @@ common=$(dirname "$(readlink -f "$0")")
|
||||
. "$BR2_CONFIG" 2>/dev/null
|
||||
. "$TARGET_DIR/usr/lib/os-release"
|
||||
|
||||
# Extract list of loaded YANG modules and their features for yangdoc.html
|
||||
mkyangdoc()
|
||||
{
|
||||
cmd="yangdoc -o $1 -p $TARGET_DIR/usr/share/yang"
|
||||
|
||||
# shellcheck disable=SC2155
|
||||
export SYSREPO_SHM_PREFIX="yangdoc"
|
||||
while IFS= read -r line; do
|
||||
if echo "$line" | grep -q '^[a-z]'; then
|
||||
module=$(echo "$line" | awk '{print $1}')
|
||||
cmd="$cmd -m $module"
|
||||
feature=$(echo "$line" | awk -F'|' '{print $8}' | sed 's/^ *//;s/ *$//')
|
||||
if [ -n "$feature" ]; then
|
||||
feature_list=$(echo "$feature" | tr ' ' '\n')
|
||||
for feat in $feature_list; do
|
||||
cmd="$cmd -e $feat"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done <<EOF
|
||||
$(sysrepoctl -l; rm -f /dev/shm/${SYSREPO_SHM_PREFIX}*)
|
||||
EOF
|
||||
|
||||
# Ignore a few top-level oddballs not used by core Infix
|
||||
cmd="$cmd -x supported-algorithms"
|
||||
|
||||
# Execute the command
|
||||
echo "Calling: $cmd"
|
||||
$cmd
|
||||
}
|
||||
|
||||
if [ -n "${ID_LIKE}" ]; then
|
||||
ID="${ID} ${ID_LIKE}"
|
||||
fi
|
||||
@@ -55,16 +24,6 @@ else
|
||||
VERSION=$GIT_VERSION
|
||||
fi
|
||||
|
||||
if [ -n "$INFIX_IMAGE_ID" ]; then
|
||||
NAME="$INFIX_IMAGE_ID"
|
||||
else
|
||||
NAME="$INFIX_ID"-$(echo "$BR2_ARCH" | tr _ - | sed 's/x86-64/x86_64/')
|
||||
fi
|
||||
|
||||
if [ -f "$TARGET_DIR/etc/rauc/system.conf" ]; then
|
||||
sed -i "s/compatible=.*/compatible=$NAME/" "$TARGET_DIR/etc/rauc/system.conf"
|
||||
fi
|
||||
|
||||
# This is a symlink to /usr/lib/os-release, so we remove this to keep
|
||||
# original Buildroot information.
|
||||
rm -f "$TARGET_DIR/etc/os-release"
|
||||
@@ -104,19 +63,12 @@ rm -f "$TARGET_DIR/etc/os-release"
|
||||
|
||||
echo "$INFIX_TAGLINE $VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version"
|
||||
|
||||
# In case of ambguities, this is what the image was built from
|
||||
cp "$BR2_CONFIG" "$TARGET_DIR/usr/share/infix/config"
|
||||
gzip -f "$TARGET_DIR/usr/share/infix/config"
|
||||
|
||||
# Drop Buildroot default symlink to /tmp
|
||||
if [ -L "$TARGET_DIR/var/lib/avahi-autoipd" ]; then
|
||||
rm "$TARGET_DIR/var/lib/avahi-autoipd"
|
||||
mkdir "$TARGET_DIR/var/lib/avahi-autoipd"
|
||||
fi
|
||||
|
||||
# Drop Buildroot default pam_lastlog.so from login chain
|
||||
sed -i '/^[^#]*pam_lastlog.so/s/^/# /' "$TARGET_DIR/etc/pam.d/login"
|
||||
|
||||
# Allow pdmenu (setup) and bash to be login shells, bash is added
|
||||
# automatically when selected in menuyconfig, but not when BusyBox
|
||||
# provides a symlink (for ash). The /bin/{true,false} are old UNIX
|
||||
@@ -133,8 +85,3 @@ grep -qsE '^/bin/false$$' "$TARGET_DIR/etc/shells" \
|
||||
# Allow clish (symlink to /usr/bin/klish) to be a login shell
|
||||
grep -qsE '^/bin/clish$$' "$TARGET_DIR/etc/shells" \
|
||||
|| echo "/bin/clish" >> "$TARGET_DIR/etc/shells"
|
||||
|
||||
# Create YANG documentation
|
||||
if [ "$BR2_PACKAGE_HOST_PYTHON_YANGDOC" = "y" ]; then
|
||||
mkyangdoc "$BINARIES_DIR/yangdoc.html"
|
||||
fi
|
||||
|
||||
@@ -12,9 +12,6 @@ load_cfg BR2_ARCH
|
||||
load_cfg BR2_DEFCONFIG
|
||||
load_cfg BR2_EXTERNAL_INFIX_PATH
|
||||
load_cfg BR2_TARGET_ROOTFS
|
||||
|
||||
# The default IMAGE_ID is infix-$BR2_ARCH but can be overridden
|
||||
# for imaage names, and compat strings, like infix-r2s
|
||||
if [ -n "$IMAGE_ID" ]; then
|
||||
NAME="$IMAGE_ID"
|
||||
else
|
||||
@@ -39,7 +36,7 @@ if [ "$SIGN_ENABLED" = "y" ]; then
|
||||
$common/sign.sh $BR2_ARCH $SIGN_KEY
|
||||
|
||||
ixmsg "Creating RAUC Update Bundle"
|
||||
$common/mkrauc.sh "$NAME$(ver)" $NAME $SIGN_KEY
|
||||
$common/mkrauc.sh "$NAME$(ver)" $BR2_ARCH $SIGN_KEY
|
||||
fi
|
||||
|
||||
load_cfg DISK_IMAGE
|
||||
@@ -63,14 +60,6 @@ if [ "$DISK_IMAGE" = "y" ]; then
|
||||
$common/mkdisk.sh -a $BR2_ARCH -n $diskimg -s $DISK_IMAGE_SIZE $bootcfg
|
||||
fi
|
||||
|
||||
load_cfg SDCARD_AUX
|
||||
if [ "$SDCARD_AUX" = "y" ]; then
|
||||
ixmsg "Creating initial rauc.status"
|
||||
$common/mkrauc-status.sh "$BINARIES_DIR/${NAME}.pkg" >"$BINARIES_DIR/rauc.status"
|
||||
ixmsg "Creating aux.ext4 for sdcard.img"
|
||||
$common/mkaux.sh
|
||||
fi
|
||||
|
||||
load_cfg GNS3_APPLIANCE
|
||||
if [ "$GNS3_APPLIANCE" = "y" ]; then
|
||||
ixmsg "Creating GNS3 Appliance, $GNS3_APPLIANCE_RAM MiB with $GNS3_APPLIANCE_IFNUM ports"
|
||||
@@ -92,7 +81,7 @@ if [ "$BR2_TARGET_ROOTFS_SQUASHFS" = "y" ]; then
|
||||
fi
|
||||
|
||||
# Menuconfig support for modifying Qemu args in release tarballs
|
||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/usr/bin/onieprom" "$BINARIES_DIR/"
|
||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/bin/onieprom" "$BINARIES_DIR/"
|
||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/qemu.sh" "$BINARIES_DIR/"
|
||||
sed -e "s/@ARCH@/QEMU_$BR2_ARCH/" \
|
||||
-e "s/@DISK_IMG@/$diskimg/" \
|
||||
@@ -102,6 +91,3 @@ 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"
|
||||
|
||||
# Quick intro for beginners, with links to more information
|
||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/README.txt" "$BINARIES_DIR/"
|
||||
|
||||
@@ -4,10 +4,6 @@ choice
|
||||
prompt "Target Architecture"
|
||||
default @ARCH@
|
||||
|
||||
config QEMU_riscv64
|
||||
bool "risv64"
|
||||
select QEMU_ARCH_IS_64
|
||||
|
||||
config QEMU_x86_64
|
||||
bool "x86_64"
|
||||
select QEMU_ARCH_IS_64
|
||||
@@ -112,12 +108,10 @@ config QEMU_RW
|
||||
default "cfg.ext4"
|
||||
|
||||
config QEMU_RW_VAR_OPT
|
||||
bool "Separate writable /var"
|
||||
bool "Separate writable /var (256MB)"
|
||||
|
||||
if QEMU_RW_VAR_OPT
|
||||
config QEMU_RW_VAR_SIZE
|
||||
string "Size of /var"
|
||||
default "256M"
|
||||
|
||||
config QEMU_RW_VAR
|
||||
string "Writable /var layer"
|
||||
default "var.ext4"
|
||||
|
||||
+11
-33
@@ -146,32 +146,17 @@ usb_args()
|
||||
USBSTICK="usb.vfat"
|
||||
if ! [ -f $USBSTICK ]; then
|
||||
dd if=/dev/zero of=${USBSTICK} bs=8M count=1 >/dev/null 2>&1
|
||||
|
||||
if command -v mkfs.vfat >/dev/null; then
|
||||
mkfs.vfat -n "log" $USBSTICK >/dev/null 2>&1
|
||||
else
|
||||
if command -v mkfs.exfat >/dev/null; then
|
||||
mkfs.exfat -L "log" $USBSTICK >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
mkfs.vfat $USBSTICK >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
echo -n "-drive if=none,id=usbstick,format=raw,file=$USBSTICK "
|
||||
echo -n "-usb "
|
||||
echo -n "-device usb-ehci,id=ehci "
|
||||
echo -n "-device usb-storage,bus=ehci.0,drive=usbstick "
|
||||
}
|
||||
|
||||
rw_args()
|
||||
{
|
||||
[ "$CONFIG_QEMU_RW" ] || return
|
||||
|
||||
if ! [ -f "aux.ext4" ]; then
|
||||
dd if=/dev/zero of="aux.ext4" bs=1M count=1 >/dev/null 2>&1
|
||||
mkfs.ext4 -L aux "aux.ext4" >/dev/null 2>&1
|
||||
fi
|
||||
echo -n "-drive file=aux.ext4,if=virtio,format=raw,bus=0,unit=3 "
|
||||
|
||||
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
|
||||
@@ -181,7 +166,7 @@ rw_args()
|
||||
|
||||
if [ "$CONFIG_QEMU_RW_VAR_OPT" ]; then
|
||||
if ! [ -f "$CONFIG_QEMU_RW_VAR" ]; then
|
||||
dd if=/dev/zero of="$CONFIG_QEMU_RW_VAR" bs=$CONFIG_QEMU_RW_VAR_SIZE count=1 >/dev/null 2>&1
|
||||
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
|
||||
|
||||
@@ -213,10 +198,10 @@ net_args()
|
||||
echo -n "-fw_cfg name=opt/mactab,file=$mactab "
|
||||
|
||||
if [ "$CONFIG_QEMU_NET_BRIDGE" = "y" ]; then
|
||||
echo -n "-netdev bridge,id=e1,br=$CONFIG_QEMU_NET_BRIDGE_DEV "
|
||||
net_dev_args 1
|
||||
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 1 $(($CONFIG_QEMU_NET_TAP_N))); do
|
||||
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
|
||||
@@ -224,8 +209,8 @@ net_args()
|
||||
local useropts=
|
||||
[ "$CONFIG_QEMU_NET_USER_OPTS" ] && useropts=",$CONFIG_QEMU_NET_USER_OPTS"
|
||||
|
||||
echo -n "-netdev user,id=e1${useropts} "
|
||||
net_dev_args 1
|
||||
echo -n "-netdev user,id=e0${useropts} "
|
||||
net_dev_args 0
|
||||
else
|
||||
echo -n "-nic none"
|
||||
fi
|
||||
@@ -264,12 +249,6 @@ wdt_args()
|
||||
echo -n "-device i6300esb -rtc clock=host"
|
||||
}
|
||||
|
||||
gdb_args()
|
||||
{
|
||||
echo -n "-chardev socket,id=gdbqemu,path=gdbqemu.sock,server=on,wait=off "
|
||||
echo -n "-gdb chardev:gdbqemu"
|
||||
}
|
||||
|
||||
run_qemu()
|
||||
{
|
||||
if [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
||||
@@ -287,7 +266,6 @@ run_qemu()
|
||||
$(net_args) \
|
||||
$(wdt_args) \
|
||||
$(vpd_args) \
|
||||
$(gdb_args) \
|
||||
$CONFIG_QEMU_EXTRA
|
||||
EOF
|
||||
|
||||
@@ -328,10 +306,10 @@ generate_dot()
|
||||
{
|
||||
[ "$CONFIG_QEMU_NET_TAP" = "y" ] || return
|
||||
|
||||
hostports="<qtap1> qtap1"
|
||||
targetports="<e1> e1"
|
||||
edges="host:qtap1 -- target:e1 [kind=mgmt];"
|
||||
for tap in $(seq 2 $(($CONFIG_QEMU_NET_TAP_N - 1))); do
|
||||
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;"
|
||||
|
||||
@@ -19,5 +19,5 @@ if [ -z "$OUTPUT" ]; then
|
||||
fi
|
||||
|
||||
umask 0177
|
||||
echo "$password" | mkpasswd -s > "$OUTPUT"
|
||||
echo "$password" | mkpasswd > "$OUTPUT"
|
||||
exit 0
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env python3
|
||||
# Generate a self signed certificate with unlimited expire time
|
||||
|
||||
import argparse
|
||||
|
||||
from cryptography import x509
|
||||
from cryptography.x509.oid import NameOID
|
||||
from cryptography.hazmat.primitives import hashes, serialization
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
# Generate private key
|
||||
private_key = rsa.generate_private_key(
|
||||
public_exponent=65537,
|
||||
key_size=2048,
|
||||
backend=default_backend()
|
||||
|
||||
)
|
||||
|
||||
parser = argparse.ArgumentParser(description="Generate a self signed certificate")
|
||||
parser.add_argument('--country', required=True, help="Set country")
|
||||
parser.add_argument('--state', required=True, help="Set state or province name")
|
||||
parser.add_argument('--city', required=True, help="Set city name")
|
||||
parser.add_argument('--organisation', required=True, help="Set organisation name")
|
||||
parser.add_argument('--organisation-unit', required=True, help="Set organisation unit name")
|
||||
parser.add_argument('--common-name', required=True, help="Set common name")
|
||||
parser.add_argument('--out-certificate', required=True, help="Output certificate")
|
||||
parser.add_argument('--out-key', required=True, help="Output key")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Builder for certificate
|
||||
subject = issuer = x509.Name([
|
||||
x509.NameAttribute(NameOID.COUNTRY_NAME, args.country),
|
||||
x509.NameAttribute(NameOID.STATE_OR_PROVINCE_NAME, args.state),
|
||||
x509.NameAttribute(NameOID.LOCALITY_NAME, args.city),
|
||||
x509.NameAttribute(NameOID.ORGANIZATION_NAME, args.organisation),
|
||||
x509.NameAttribute(NameOID.ORGANIZATIONAL_UNIT_NAME, args.organisation_unit),
|
||||
x509.NameAttribute(NameOID.COMMON_NAME, args.common_name),
|
||||
])
|
||||
certificate = x509.CertificateBuilder().subject_name(
|
||||
subject
|
||||
).issuer_name(
|
||||
issuer
|
||||
).public_key(
|
||||
private_key.public_key()
|
||||
).serial_number(
|
||||
x509.random_serial_number()
|
||||
).not_valid_before(
|
||||
datetime(2000, 1, 1)
|
||||
).not_valid_after(
|
||||
datetime(9999, 1, 1)
|
||||
).add_extension(
|
||||
x509.SubjectAlternativeName([x509.DNSName(args.common_name)]),
|
||||
critical=False,
|
||||
).sign(private_key, hashes.SHA256(), default_backend())
|
||||
|
||||
# Serialize certificate and private key
|
||||
with open(args.out_certificate, "wb") as f:
|
||||
f.write(certificate.public_bytes(serialization.Encoding.PEM))
|
||||
with open(args.out_key, "wb") as f:
|
||||
f.write(private_key.private_bytes(
|
||||
encoding=serialization.Encoding.PEM,
|
||||
format=serialization.PrivateFormat.PKCS8,
|
||||
encryption_algorithm=serialization.NoEncryption()
|
||||
))
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
/sbin/ip
|
||||
@@ -1,4 +1,24 @@
|
||||
#!/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
|
||||
@@ -9,54 +29,60 @@
|
||||
# $3 IP adddress
|
||||
|
||||
PATH="$PATH:/usr/bin:/usr/sbin:/bin:/sbin"
|
||||
NAME="/etc/frr/static.d/$2-zeroconf.conf"
|
||||
NEXT="${NAME}+"
|
||||
|
||||
log()
|
||||
{
|
||||
logger -I $$ -t zeroconf -p user.notice "$*"
|
||||
}
|
||||
# Use a different metric for each interface, so that we can set
|
||||
# identical routes to multiple interfaces.
|
||||
|
||||
# Reduce changes needed by comparing with previous route(s)
|
||||
act()
|
||||
{
|
||||
case $1 in
|
||||
add)
|
||||
echo "! Generated by avahi-autoipd" > "$NEXT"
|
||||
echo "ip route 0.0.0.0/0 $2 254" >> "$NEXT"
|
||||
cmp -s "$NAME" "$NEXT" && return
|
||||
mv "$NEXT" "$NAME"
|
||||
;;
|
||||
del)
|
||||
[ -f "$NAME" ] || return
|
||||
rm "$NAME"
|
||||
;;
|
||||
*)
|
||||
return
|
||||
;;
|
||||
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 proto zeroconf ||:
|
||||
;;
|
||||
|
||||
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
|
||||
|
||||
initctl -nbq restart staticd
|
||||
}
|
||||
elif [ -x /bin/ifconfig -o -x /sbin/ifconfig ] ; then
|
||||
|
||||
case "$1" in
|
||||
BIND)
|
||||
ip addr flush dev "$2" proto random
|
||||
ip addr add "$3"/16 brd 169.254.255.255 scope link dev "$2" proto random
|
||||
act add "$2"
|
||||
log "set ipv4ll $3 on iface $2"
|
||||
;;
|
||||
# We have the old ifconfig tool
|
||||
|
||||
CONFLICT|UNBIND|STOP)
|
||||
act del "$2"
|
||||
ip addr flush dev "$2" proto random
|
||||
log "clr ipv4ll on iface $2"
|
||||
;;
|
||||
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" ||:
|
||||
;;
|
||||
|
||||
*)
|
||||
log "Unknown event $1 on iface $2"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
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
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Hey Emacs, this is -*-sh-*-
|
||||
# System-wide .bashrc file for interactive bash(1) shells.
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
@@ -14,30 +13,3 @@ 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
|
||||
|
||||
log()
|
||||
{
|
||||
local fn="/var/log/syslog"
|
||||
[ -n "$1" ] && fn="/var/log/$1"
|
||||
less +G "$fn"
|
||||
}
|
||||
|
||||
follow()
|
||||
{
|
||||
local fn="/var/log/syslog"
|
||||
[ -n "$1" ] && fn="/var/log/$1"
|
||||
tail -F "$fn"
|
||||
}
|
||||
|
||||
_logfile_completions()
|
||||
{
|
||||
local cur=${COMP_WORDS[COMP_CWORD]}
|
||||
local files=$(compgen -f -- "/var/log/$cur")
|
||||
COMPREPLY=()
|
||||
for file in $files; do
|
||||
[ -f "$file" ] && COMPREPLY+=("$(basename "$file")")
|
||||
done
|
||||
}
|
||||
|
||||
complete -F _logfile_completions log
|
||||
complete -F _logfile_completions follow
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
CONFD_TIMEOUT=60
|
||||
@@ -1,3 +1,3 @@
|
||||
task name:ixinit log:tag:ixinit [S] <pid/syslogd> \
|
||||
/usr/libexec/finit/runparts -bp /usr/libexec/infix/init.d \
|
||||
-- Probing system
|
||||
run [S] log:console /libexec/infix/probe -- Probing system information
|
||||
run [S] <pid/syslogd> /libexec/infix/sysctl-sync-ip-conf --
|
||||
run [S] <pid/syslogd> /libexec/infix/nameif -- Probing network interfaces
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
service :%i pid:!/run/k8s-logger-%i.pid <usr/container:%i> \
|
||||
[2345] k8s-logger -cni %i -f local1 /run/containers/%i.fifo -- Logger for container %i
|
||||
sysv :%i pid:!/run/container:%i.pid <pid/k8s-logger:%i> log kill:10 \
|
||||
sysv :%i pid:!/run/container:%i.pid <pid/k8s-logger:%i> kill:10 \
|
||||
[2345] container -n %i -- container %i
|
||||
|
||||
@@ -1 +1 @@
|
||||
task [S] <service/confd/ready> /usr/libexec/infix/mkcert -- Verifying self-signed https certificate
|
||||
task [S] <service/confd/ready> /libexec/infix/mkcert -- Verifying self-signed https certificate
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
service name:rousette notify:none log <pid/confd> env:/etc/default/confd \
|
||||
[12345] rousette --syslog -t $CONFD_TIMEOUT \
|
||||
-- RESTCONF server
|
||||
@@ -1,9 +0,0 @@
|
||||
! Default settings for staticd, used for both
|
||||
! confd generated routes, udhcpc and zeroconf
|
||||
frr defaults traditional
|
||||
hostname Router
|
||||
password zebra
|
||||
enable password zebra
|
||||
no log unique-id
|
||||
log syslog informational
|
||||
log facility local2
|
||||
@@ -7,17 +7,16 @@ tmpfs /dev/shm tmpfs mode=0777 0 0
|
||||
proc /proc proc defaults 0 0
|
||||
tmpfs /tmp tmpfs mode=1777,nosuid,nodev 0 0
|
||||
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
|
||||
tmpfs /media tmpfs mode=1755,nosuid,nodev 0 0
|
||||
sysfs /sys sysfs defaults 0 0
|
||||
debugfs /sys/kernel/debug debugfs nofail 0 0
|
||||
cfgfs /config configfs nofail,noauto 0 0
|
||||
|
||||
# The chosen backing storage for the overlays placed on /cfg, /etc,
|
||||
# /home, /root, and /var, are determined dynamically by /usr/libexec/infix/mnt
|
||||
# /home, /root, and /var, are determined dynamically by /libexec/infix/mnt
|
||||
# depending on the available devices.
|
||||
mnttmp /mnt/tmp tmpfs defaults 0 0
|
||||
LABEL=aux /mnt/aux auto noatime,nodiratime,noauto 0 0
|
||||
LABEL=var /mnt/var auto noatime,nodiratime,noauto 0 0
|
||||
LABEL=cfg /mnt/cfg auto noatime,nodiratime,noauto 0 0
|
||||
hostfs /mnt/host 9p cache=none,msize=16384,noauto 0 0
|
||||
/usr/libexec/infix/mnt# /cfg helper none 0 0
|
||||
/libexec/infix/mnt# /cfg helper none 0 0
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
0 unspec
|
||||
1 kernel_lo
|
||||
2 kernel_ra
|
||||
3 kernel_ll
|
||||
4 static
|
||||
5 dhcp
|
||||
6 random
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
configure ports dsa0 lldp status disabled
|
||||
@@ -1,6 +1 @@
|
||||
# Micro GNU Emacs default configuration file
|
||||
auto-indent-mode
|
||||
auto-fill-mode
|
||||
make-backup-files 0
|
||||
require-final-newline T
|
||||
set-fill-column 72
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.-------.
|
||||
| . . | Infix -- a Network Operating System
|
||||
|-. v .-| https://kernelkit.org
|
||||
|-. v .-| https://kernelkit.github.io
|
||||
'-'---'-'
|
||||
|
||||
@@ -24,6 +24,4 @@ server {
|
||||
root html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
include /etc/nginx/app/*.conf;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,14 @@ server {
|
||||
include ssl.conf;
|
||||
|
||||
location / {
|
||||
include /etc/nginx/netbrowse.conf;
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
location /netbrowse/ {
|
||||
return 301 /netbrowse;
|
||||
}
|
||||
location /netbrowse {
|
||||
include /etc/nginx/netbrowse.conf;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_redirect off;
|
||||
@@ -1,8 +0,0 @@
|
||||
# /telemetry/optics is for streaming (not used atm)
|
||||
location ~ ^/(restconf|yang|.well-known)/ {
|
||||
grpc_pass grpc://[::1]:10080;
|
||||
grpc_set_header Host $host;
|
||||
grpc_set_header X-Real-IP $remote_addr;
|
||||
grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
grpc_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
#%PAM-1.0
|
||||
auth requisite pam_nologin.so
|
||||
auth [success=1 default=ignore] pam_unix.so nullok
|
||||
auth requisite pam_deny.so
|
||||
auth required pam_permit.so
|
||||
|
||||
account requisite pam_nologin.so
|
||||
account [success=1 default=ignore] pam_unix.so
|
||||
account requisite pam_deny.so
|
||||
account required pam_permit.so
|
||||
|
||||
password [success=1 default=ignore] pam_unix.so
|
||||
password requisite pam_deny.so
|
||||
password required pam_permit.so
|
||||
|
||||
session required pam_loginuid.so
|
||||
session include common-session
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_motd.so
|
||||
@@ -1,19 +0,0 @@
|
||||
#%PAM-1.0
|
||||
auth requisite pam_nologin.so
|
||||
auth [success=1 default=ignore] pam_unix.so nullok
|
||||
auth requisite pam_deny.so
|
||||
auth required pam_permit.so
|
||||
|
||||
account requisite pam_nologin.so
|
||||
account [success=1 default=ignore] pam_unix.so
|
||||
account requisite pam_deny.so
|
||||
account required pam_permit.so
|
||||
|
||||
password [success=1 default=ignore] pam_unix.so
|
||||
password requisite pam_deny.so
|
||||
password required pam_permit.so
|
||||
|
||||
session required pam_loginuid.so
|
||||
session include common-session
|
||||
session optional pam_keyinit.so force revoke
|
||||
session optional pam_motd.so
|
||||
@@ -6,7 +6,6 @@ alias ls='ls --color=auto'
|
||||
export EDITOR=/usr/bin/edit
|
||||
export VISUAL=/usr/bin/edit
|
||||
export LESS="-P %f (press h for help or q to quit)"
|
||||
export LESSOPEN="|/usr/bin/lesspipe.sh %s"
|
||||
alias vim='vi'
|
||||
alias view='vi -R'
|
||||
alias emacs='mg'
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
# Allow client to pass locale environment
|
||||
AcceptEnv LANG LC_*
|
||||
|
||||
Include /etc/ssh/sshd_config.d/*.conf
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
UsePAM yes
|
||||
@@ -0,0 +1 @@
|
||||
Subsystem cli /usr/bin/klish
|
||||
@@ -1 +0,0 @@
|
||||
Subsystem sftp /usr/libexec/sftp-server
|
||||
@@ -1,3 +1,2 @@
|
||||
net.ipv4.ip_forward=1
|
||||
net.ipv4.ip_forward_update_priority=0
|
||||
net.ipv6.conf.all.forwarding=1
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
# /etc/syslog.conf - Configuration file for syslogd(8)
|
||||
#
|
||||
# For information about the format of this file, see syslog.conf(5)
|
||||
#
|
||||
|
||||
#
|
||||
# First some standard log files. Log by facility.
|
||||
#
|
||||
auth,authpriv.* /var/log/auth.log
|
||||
#*.*;auth,authpriv.none -/var/log/syslog
|
||||
|
||||
#cron.* /var/log/cron.log
|
||||
#daemon.* -/var/log/daemon.log
|
||||
kern.* -/var/log/kern.log
|
||||
#lpr.* -/var/log/lpr.log
|
||||
mail.* -/var/log/mail.log
|
||||
#user.* -/var/log/user.log
|
||||
|
||||
#
|
||||
# Logging for the mail system. Split it up so that
|
||||
# it is easy to write scripts to parse these files.
|
||||
#
|
||||
#mail.info -/var/log/mail.info
|
||||
#mail.warn -/var/log/mail.warn
|
||||
mail.err /var/log/mail.err
|
||||
#mail.*;mail.!=info -/var/log/mail
|
||||
#mail,news.=info -/var/log/info
|
||||
|
||||
# The tcp wrapper loggs with mail.info, we display all
|
||||
# the connections on tty12
|
||||
#
|
||||
#mail.=info /dev/tty12
|
||||
|
||||
#
|
||||
# Some "catch-all" log files.
|
||||
#
|
||||
#*.=debug;\
|
||||
# auth,authpriv.none;\
|
||||
# news.none;mail.none -/var/log/debug
|
||||
*.=info;*.=notice;*.=warn;\
|
||||
auth,authpriv.none;\
|
||||
cron,daemon.none;\
|
||||
mail,news.none -/var/log/messages
|
||||
|
||||
#
|
||||
# Store all critical events, except kernel logs, in critical RFC5424 format.
|
||||
# Overide global log rotation settings, rotate every 10MiB, keep 5 old logs,
|
||||
#
|
||||
#*.=crit;kern.none /var/log/critical ;rotate=10M:5,RFC5424
|
||||
|
||||
# Example of sending events to remote syslog server.
|
||||
# All events from notice and above, except auth, authpriv
|
||||
# and any kernel message are sent to server finlandia in
|
||||
# RFC5424 formatted output.
|
||||
#
|
||||
#*.notice;auth,authpriv.none;
|
||||
# kern.none\ @finlandia ;RFC5424
|
||||
|
||||
# Emergencies are sent to anyone logged in
|
||||
#
|
||||
*.=emerg *
|
||||
|
||||
# Priority alert and above are sent to the operator
|
||||
#
|
||||
#*.alert root,joey
|
||||
|
||||
#
|
||||
# Secure mode, same as -s, none(0), on(1), full(2). When enabled
|
||||
# only logging to remote syslog server possible, with full secure
|
||||
# mode, not even that is possible. We default to prevent syslogd
|
||||
# from opening UDP/514 and receving messages from other systems.
|
||||
#
|
||||
secure_mode 1
|
||||
|
||||
#
|
||||
# Global log rotation, same as -r SIZE:COUNT, command line wins.
|
||||
#
|
||||
#rotate_size 1M
|
||||
#rotate_count 5
|
||||
|
||||
#
|
||||
# Include all config files in /etc/syslog.d/
|
||||
#
|
||||
include /etc/syslog.d/*.conf
|
||||
@@ -1,2 +0,0 @@
|
||||
rotate_size 1M
|
||||
rotate_count 10
|
||||
@@ -1,2 +0,0 @@
|
||||
# Log critical and above to console, system likely unusable.
|
||||
*.=crit;*.=alert;*.=emerg /dev/console
|
||||
@@ -1,10 +0,0 @@
|
||||
Reserved facilities for logging in various subsystems:
|
||||
|
||||
- local0: rauc
|
||||
- local1: containers
|
||||
- local2: routing (frr)
|
||||
- local3:
|
||||
- local5:
|
||||
- local6: reserved
|
||||
- local7: nginx
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
local2.* -/var/log/routing
|
||||
@@ -1,3 +0,0 @@
|
||||
# Skip debug level messages in our /var/log/syslog, we have a dedicate
|
||||
# debug log instead, as well as facility specific logs, e.g., routing
|
||||
*.info;auth,authpriv.none -/var/log/syslog
|
||||
@@ -1,5 +0,0 @@
|
||||
KERNEL=="sd[a-z]", SUBSYSTEMS=="usb", ACTION=="add|change", RUN+="/usr/libexec/infix/media add %k"
|
||||
KERNEL=="sd[a-z]", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="/usr/libexec/infix/media del %k"
|
||||
|
||||
KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="usb", ACTION=="add|change", RUN+="/usr/libexec/infix/media add %k"
|
||||
KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="/usr/libexec/infix/media del %k"
|
||||
@@ -33,26 +33,18 @@ check_factory()
|
||||
fi
|
||||
|
||||
# Add to your br2-external to extend factory-reset check
|
||||
if [ ! -x /usr/libexec/infix/check-factory ]; then
|
||||
if [ ! -x /libexec/infix/check-factory ]; then
|
||||
return 1;
|
||||
fi
|
||||
|
||||
/usr/libexec/infix/check-factory
|
||||
/libexec/infix/check-factory
|
||||
}
|
||||
|
||||
factory_reset()
|
||||
{
|
||||
find /sys/class/leds/ -type l -exec sh -c 'echo 100 > $0/brightness' {} \;
|
||||
# XXX: flash LEDs to confirm factory-reset in progress
|
||||
logger $opt -p user.crit -t "$nm" "Resetting to factory defaults."
|
||||
|
||||
# Shred all files to prevent restoring contents
|
||||
find /mnt/cfg -type f -exec shred -zu {} \;
|
||||
find /mnt/var -type f -exec shred -zu {} \;
|
||||
|
||||
# Remove any lingering directories and symlinks as well
|
||||
rm -rf /mnt/cfg/* /mnt/var/*
|
||||
|
||||
logger $opt -p user.crit -t "$nm" "Factory reset complete."
|
||||
sync
|
||||
}
|
||||
|
||||
+7
-42
@@ -3,13 +3,12 @@
|
||||
import importlib.machinery
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import struct
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
onieprom = importlib.machinery.SourceFileLoader("onieprom","/bin/onieprom").load_module()
|
||||
SYSTEM_JSON = "/run/system.json"
|
||||
|
||||
KKIT_IANA_PEM = 61046
|
||||
|
||||
class DTSystem:
|
||||
@@ -234,36 +233,8 @@ def vpd_inject(out, vpds):
|
||||
out["factory-password-hash"] = pwhash
|
||||
break
|
||||
|
||||
def qemu_base_mac():
|
||||
"""Find MAC address of first non-loopback interface, subtract with 1"""
|
||||
base_path = '/sys/class/net'
|
||||
interfaces = []
|
||||
|
||||
for iface in os.listdir(base_path):
|
||||
if iface == 'lo':
|
||||
continue
|
||||
try:
|
||||
# pylint: disable=invalid-name
|
||||
with open(os.path.join(base_path, iface, 'address'), 'r', encoding='ascii') as f:
|
||||
mac = f.read().strip()
|
||||
interfaces.append((mac, iface))
|
||||
except FileNotFoundError:
|
||||
continue
|
||||
|
||||
if interfaces:
|
||||
interfaces.sort()
|
||||
mac = interfaces[0][0]
|
||||
mac = int(mac.replace(':', ''), 16)
|
||||
mac -= 1
|
||||
mac %= 1 << 48
|
||||
mac = ':'.join(f"{(mac >> 8 * i) & 0xff:02x}" for i in range(5, -1, -1))
|
||||
return mac
|
||||
|
||||
return None
|
||||
|
||||
def probe_qemusystem(out):
|
||||
"""Probe Qemu based test systems and 'make run'"""
|
||||
admin_hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A"
|
||||
ADMINHASH = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A"
|
||||
|
||||
qsys = QEMUSystem()
|
||||
vpds = qsys.vpds()
|
||||
@@ -273,7 +244,6 @@ def probe_qemusystem(out):
|
||||
for (attr, default) in (
|
||||
("vendor", "QEMU"),
|
||||
("product-name", "VM"),
|
||||
("mac-address", qemu_base_mac()),
|
||||
):
|
||||
if not out[attr]:
|
||||
out[attr] = default
|
||||
@@ -282,14 +252,13 @@ def probe_qemusystem(out):
|
||||
not out["vpd"]["product"]["available"]:
|
||||
# Virtual instance without VPD emulation, fallback to
|
||||
# admin/admin
|
||||
out["factory-password-hash"] = admin_hash
|
||||
out["factory-password-hash"] = ADMINHASH
|
||||
|
||||
# Let others react to the fact that we are running in QEMU
|
||||
subprocess.run("initctl -nbq cond set qemu".split(), check=False)
|
||||
subprocess.run("initctl -nbq cond set qemu".split())
|
||||
return 0
|
||||
|
||||
def probe_dtsystem(out):
|
||||
"""Probe DTS based system, expects a VPD in ONIE PROM format."""
|
||||
dtsys = DTSystem()
|
||||
vpds = dtsys.infix_vpds()
|
||||
dtsys.infix_usb_devices(out)
|
||||
@@ -327,15 +296,11 @@ def main():
|
||||
return err
|
||||
|
||||
if not out["factory-password-hash"]:
|
||||
sys.stdout.write("\n\n\033[31mCRITICAL BOOTSTRAP ERROR\n" +
|
||||
"NO FACTORY PASSWORD FOUND\033[0m\n\n")
|
||||
sys.stdout.write("\n\n\033[31mCRITICAL BOOTSTRAP ERROR\nNO FACTORY PASSWORD FOUND\033[0m\n\n")
|
||||
err = 1
|
||||
|
||||
os.umask(0o337)
|
||||
# pylint: disable=invalid-name
|
||||
with open(SYSTEM_JSON, "w", encoding="ascii") as f:
|
||||
json.dump(out, f)
|
||||
shutil.chown(SYSTEM_JSON, user="root", group="wheel")
|
||||
json.dump(out, open("/run/system.json", "w"))
|
||||
os.chmod("/run/system.json", 0o444)
|
||||
return err
|
||||
|
||||
if __name__ == "__main__":
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
. /etc/partition-uuid
|
||||
. /etc/partion-uuid
|
||||
|
||||
disk=$1
|
||||
bootoffs=$2
|
||||
@@ -28,11 +28,11 @@ else
|
||||
fi
|
||||
|
||||
sgdisk \
|
||||
-Z \
|
||||
-o \
|
||||
-n1:${bootoffs}:+${bootsize} -t1:8301 -c1:boot \
|
||||
-n2::+${auxsize} -t2:8301 -c2:aux -u2:${AUX_UUID} \
|
||||
-n2::+${auxsize} -t2:8301 -c2:aux -u2:${AUX_UUID}\
|
||||
-n3::+${imgsize} -t3:8300 -c3:primary -u3:${PRIMARY_UUID} \
|
||||
-n4::+${imgsize} -t4:8300 -c4:secondary -u4:${SECONDARY_UUID} \
|
||||
-n4::+${imgsize} -t4:8300 -c4:secondary -u4:${SECONDARY_UUID}\
|
||||
-n5::+${cfgsize} -t5:8302 -c5:cfg \
|
||||
-n6:: -t6:8310 -c6:var \
|
||||
-p \
|
||||
+1
-1
@@ -63,7 +63,7 @@ ok
|
||||
|
||||
step "Formatting $blk"
|
||||
[ -b $blk ] || { echo "$blk is not a block device" >&2; err; }
|
||||
/usr/libexec/infix/prod/fdisk $blk || err
|
||||
/libexec/infix/prod/fdisk $blk || err
|
||||
sleep 1
|
||||
ok
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#!/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
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
# We can't use bash's time, as it prints the timing information of the
|
||||
# entire pipeline, meaning we can't redirect it to the log file.
|
||||
TIME=$(which time)
|
||||
TIMEFMT="\"time\": { \"real\": %e, \"user\": %U, \"sys\": %S },"
|
||||
|
||||
inform()
|
||||
{
|
||||
local level="$1"
|
||||
@@ -40,7 +35,6 @@ action_exec()
|
||||
local actdir="$2/action/$1"
|
||||
local orderfile="$actdir/order"
|
||||
local code=0
|
||||
local meta=
|
||||
|
||||
generate_order "$2"
|
||||
|
||||
@@ -56,29 +50,9 @@ action_exec()
|
||||
|
||||
for node in $order; do
|
||||
for work in $(find "$actdir/$node" -type f -executable 2>/dev/null | sort); do
|
||||
meta=$work-meta.json
|
||||
$work >>"$work.log" 2>&1 || code=$?
|
||||
echo "[exit:$code]" >>"$work.log"
|
||||
|
||||
cat >$meta <<EOF
|
||||
{
|
||||
"generation": $(basename $2),
|
||||
"action": "$1",
|
||||
"node": "$node",
|
||||
"work": "$(basename $work)",
|
||||
EOF
|
||||
$TIME -f "$TIMEFMT" -o $meta.time $work >>"$work.log" 2>&1 || code=$?
|
||||
|
||||
echo -ne "\t" >>$meta
|
||||
# busybox's time(1) will happily write "Command exited
|
||||
# with non-zero status" and similar messages to the
|
||||
# output, even when -f is used. Work around that by only
|
||||
# grabbing the last line, which holds the requested
|
||||
# output.
|
||||
tail -n1 $meta.time >>$meta
|
||||
|
||||
cat >>$meta <<EOF
|
||||
"exitcode": $code
|
||||
}
|
||||
EOF
|
||||
[ $code -eq 0 ] || abort "$work failed with exitcode $code"
|
||||
done
|
||||
done
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
dir()
|
||||
{
|
||||
path=$1
|
||||
|
||||
if [ -z "$COLUMS" ]; then
|
||||
TTY=$(resize)
|
||||
eval "$TTY"
|
||||
fi
|
||||
|
||||
printf "\033[7m%-*s\033[0m\n" "$COLUMNS" "$path directory"
|
||||
if [ -d "$path" ]; then
|
||||
ls -p "$path/"
|
||||
else
|
||||
echo "Directory $path does not exist."
|
||||
fi
|
||||
echo
|
||||
}
|
||||
|
||||
if [ -d "$1" ]; then
|
||||
dir "$1"
|
||||
else
|
||||
dir "$HOME"
|
||||
dir "/cfg"
|
||||
dir "/log"
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Silly wrapper around sudo to prevent it from printing an error for
|
||||
# unprivileged users: sudo: a password is required
|
||||
|
||||
id -nG "$LOGNAME" | grep -qw wheel && sudo -n "$@"
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
*.gz)
|
||||
zcat "$1"
|
||||
;;
|
||||
*)
|
||||
cat "$1"
|
||||
;;
|
||||
esac
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user