mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 09:13:01 +02:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1854bca98b | ||
|
|
00261fb120 | ||
|
|
4a69d1564d |
@@ -1,36 +0,0 @@
|
||||
Checklists for Pull Requests and Releases
|
||||
=========================================
|
||||
|
||||
Maintainer checklists for reviewing pull requests and doing releases.
|
||||
|
||||
|
||||
Pull Requests
|
||||
-------------
|
||||
|
||||
- If applicable, is there a readable ChangeLog entry?
|
||||
- If any LICENSE file has been updated, has the `.hash` file been updated?
|
||||
- If any change to a Finit `.svc` file, does any run/task linger?
|
||||
I.e., is there a runlevel and/or condition defined to prevent them
|
||||
from running outside of their intended runlevel?
|
||||
- If any change to grub or qemu/qeneth setup, has it been tested in GNS3?
|
||||
- If any change to u-boot/buildroot, has it been tested with `<booloader>_defconfig`
|
||||
- If any change to logging, have the resulting logs been audited?
|
||||
- Check for duplicate entries, misspellings
|
||||
- Check for sneaky severity changes, e.g., error vs note, error vs warning
|
||||
- If new subsystem, or major changes to a subsystem, have the docs been updated?
|
||||
- If change to mDNS, has it been tested with netbrowse?
|
||||
- If change to `_defconfig`, verify `local.mk` and sync with other archs
|
||||
- Test manually as well, e.g., CLI changes do not have ha regression tests
|
||||
- Build from distclean, or use artifacts built by build servers, for manual tests
|
||||
|
||||
|
||||
Releases
|
||||
--------
|
||||
|
||||
- Make at least one -betaN release to verify the GitHub workflow well in time release day
|
||||
- Stuff happens, remember kernelkit/infix#735
|
||||
- Make at least one -rcN to flush out any issues in customer repos
|
||||
- Easy to forget adaptations/hacks in customer repos -- may need Infix change/support
|
||||
- Ensure the markdown link for the release diff is updated
|
||||
- Ensure subrepos are tagged (can be automated, see kernelkit/infix#393)
|
||||
- Sync tags for all repo. sync activities
|
||||
+39
-152
@@ -1,189 +1,76 @@
|
||||
Contributing Guidelines
|
||||
=======================
|
||||
Contributing to Infix
|
||||
=====================
|
||||
|
||||
Thank :heart: you for taking the time to read this!
|
||||
We welcome any and all help in the form of bug reports, fixes, patches
|
||||
to add new features -- *preferably as GitHub pull requests*.
|
||||
|
||||
We welcome any help in the form of bug reports, fixes, or patches to add
|
||||
new features. We *prefer* GitHub pull requests, but are open to other
|
||||
forms of collaboration as well. [Let's talk!][support] :handshake:
|
||||
If you are unsure of what to do, or how to implement an idea or bug fix,
|
||||
open an issue with `"[RFC]: Unsure if this is a bug ... ?"`, or use the
|
||||
[GitHub discussions forum](https://github.com/orgs/kernelkit/discussions).
|
||||
Talking about code and problems first is often the best way to get started
|
||||
before submitting a pull request.
|
||||
|
||||
If you are unsure how to start implementing an idea or fix:
|
||||
|
||||
- :bug: open an issue, there are human friendly templates for _bugs_
|
||||
and _feature requests_ at <https://github.com/kernelkit/infix/issues>
|
||||
- :speech_balloon: use the [Q&A Forum][discuss]
|
||||
- :technologist: The [Developer's Guide][devguide] is also a useful start
|
||||
|
||||
> _Talking about code and problems first is often the best way to get
|
||||
> started before submitting a pull request. We have found it always
|
||||
> saves time, yours and ours._
|
||||
|
||||
|
||||
:sparkles: General Guidelines
|
||||
-----------------------------
|
||||
|
||||
When submitting bug reports or patches to bugs, please state which
|
||||
version the change is made against, what it does, and, more importantly
|
||||
*why* -- from your perspective, why is it a bug, why does the code need
|
||||
changing in this way. Start with why.
|
||||
|
||||
- :bug: Bug reports need metadata like Infix version or commit hash
|
||||
- :adhesive_bandage: Bug fixes also need version, and (preferably) a
|
||||
corresponding issue number for the ChangeLog
|
||||
- :new: New features, you need to get approval of the YANG model first!
|
||||
:speech_balloon: Please use the [Forum][discuss], e.g., category:
|
||||
*Ideas*, or open a :pray: feature request issue
|
||||
- :white_check_mark: New features also need new regression tests, this
|
||||
can be basic tests or more complex use-case tests comprising multiple
|
||||
subsystems, see [Testing Changes](#test_tube-testing-changes), below
|
||||
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.
|
||||
|
||||
Please take care to ensure you follow the project coding style and the
|
||||
commit message format. If you follow these recommendations you help
|
||||
the maintainers and make it easier for them to include your code.
|
||||
the maintainer(s) and make it easier for them to include your code.
|
||||
|
||||
|
||||
:woman_technologist: Coding Style
|
||||
---------------------------------
|
||||
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.
|
||||
|
||||
The ChangeLog deserves a separate mention:
|
||||
|
||||
- Releases are listed in reverse chronological order order, so the
|
||||
latest/next release is at the beginning of the file
|
||||
- Only *user-facing bugs and features* are detailed, so code refactor,
|
||||
new tests, etc. are not listed.
|
||||
- Add your changes/features to the Changes section
|
||||
- Add your Fix line in the Fixes section, in numeric order
|
||||
- Changes and fixes without an issue number are listed after all
|
||||
numbered ones
|
||||
- YANG model changes are documented in their respective model, for
|
||||
standard models, e.g., for `ietf-interfaces.yang`, the corresponding
|
||||
`infix-interfaces.yang` detail augments/deviations as revisions.
|
||||
|
||||
A final note, lines of code are allowed to be longer than 72 characters
|
||||
these days, unless you live by PEP-8 (see above). 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][].
|
||||
|
||||
|
||||
:test_tube: Testing Changes
|
||||
---------------------------
|
||||
|
||||
Please test your changes, no matter how trivial or obviously correct
|
||||
they may seem. Nobody is infallible, making mistakes is only human.
|
||||
It is also the best insurance policy for your feature, it ensures your
|
||||
use-case will remain functional as the source base evolves.
|
||||
|
||||
For new functionality we expect new regression tests to be added in
|
||||
the same pull request.
|
||||
|
||||
For help getting started with testing, see the following resources:
|
||||
|
||||
- [Developer's Guide][devguide]
|
||||
- [Regression Testing][testing]
|
||||
|
||||
|
||||
:memo: Commit Messages
|
||||
----------------------
|
||||
Commit Messages
|
||||
---------------
|
||||
|
||||
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:
|
||||
|
||||
<img src="../doc/jack.png" width=70 align="right">
|
||||
git config --global user.name "Jane Doe"
|
||||
git config --global user.email jane.doe@example.com
|
||||
|
||||
$ git config --global user.name "Jacky Linker"
|
||||
$ git config --global user.email jacky.linker@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`:
|
||||
|
||||
Example commit message from one of many [online guides][cbeams]. Use
|
||||
`git commit -s` to automatically add a `Signed-off-by` for proof of
|
||||
origin, see [DCO][] for more info.
|
||||
|
||||
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
|
||||
|
||||
- Typically a hyphen or asterisk is used for the bullet, preceded
|
||||
by a single space, with blank lines in between, but conventions
|
||||
vary here
|
||||
|
||||
If you use an issue tracker, put references to them at the bottom,
|
||||
like this:
|
||||
|
||||
Resolves: #123
|
||||
See also: #456, #789
|
||||
|
||||
Signed-off-by: Jacky Linker <jacky.linker@example.com>
|
||||
|
||||
This is an example of how to [automatically close][closing] an issue
|
||||
when the commit is merged to mainline. Several keywords are available.
|
||||
|
||||
Signed-off-by: Jane Doe <jane.doe@example.com>
|
||||
|
||||
|
||||
:twisted_rightwards_arrows: Pull Requests
|
||||
-----------------------------------------
|
||||
|
||||
> _The git repository is the canonical location for information._
|
||||
|
||||
A pull request should preferably address a single issue or change. This
|
||||
may of course include multiple related changes, but what is important to
|
||||
remember is the bandwidth of the maintainers. A smaller well documented
|
||||
PR is more likely to get attention quicker in some reviewer's busy day.
|
||||
|
||||
Well documented here means that each commit message stands on its own,
|
||||
telling the complete story of the change. In fact each commit should,
|
||||
as much as possible, be independent of other changes. This is very
|
||||
important, not only when digging though logs to understand why a piece
|
||||
of code exists, but also when bisecting a problem -- each single commit
|
||||
should also compile and be possible to run.
|
||||
|
||||
If you've worked on projects that send patches, like the Linux kernel or
|
||||
Buildroot, consider the pull request message body similar to the cover
|
||||
letter for a series of patches -- it's a summary of changes, and it is
|
||||
lost when the changes are merged to the mainline branch.
|
||||
|
||||
|
||||
:balance_scale: Code of Conduct
|
||||
-------------------------------
|
||||
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."*
|
||||
|
||||
[support]: https://github.com/kernelkit/infix/blob/main/.github/SUPPORT.md
|
||||
[discuss]: https://github.com/orgs/kernelkit/discussions
|
||||
[testing]: https://github.com/kernelkit/infix/blob/main/doc/testing.md
|
||||
[devguide]: https://github.com/kernelkit/infix/blob/main/doc/developers-guide.md
|
||||
[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
|
||||
[cbeams]: https://cbea.ms/git-commit/#seven-rules
|
||||
[KNF]: https://en.wikipedia.org/wiki/Kernel_Normal_Form
|
||||
[gitbook]: https://git-scm.com/book/ch5-2.html
|
||||
[conduct]: CODE-OF-CONDUCT.md
|
||||
[DCO]: https://developercertificate.org/
|
||||
[closing]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
|
||||
|
||||
@@ -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,26 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you discover a security vulnerability in Infix, please use GitHub's built-in
|
||||
[Report a Vulnerability](https://github.com/kernelkit/infix/security/advisories/new)
|
||||
feature for a private and secure disclosure.
|
||||
|
||||
When reporting, include:
|
||||
|
||||
- A clear description of the vulnerability.
|
||||
- Steps to reproduce the issue.
|
||||
- Potential impact of the vulnerability.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
We provide security updates only for the main branch.
|
||||
|
||||
Individual support contracts are provided by _Wires_. See
|
||||
[Support](https://github.com/kernelkit/infix/blob/main/.github/SUPPORT.md)
|
||||
for more information.
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
We appreciate the efforts of the security community to help improve the security
|
||||
of Infix. Thank you for your responsible disclosure.
|
||||
+1
-12
@@ -1,12 +1 @@
|
||||
Limited free support is only available using the online resources of the
|
||||
project on GitHub, and Discord, see <https://github.com/kernelkit>:
|
||||
|
||||
:speech_balloon: <https://github.com/orgs/kernelkit/discussions>
|
||||
:bug: <https://github.com/kernelkit/infix/issues>
|
||||
|
||||
Support contracts, development of new features, fast-tracking of reviews
|
||||
and contributions, customer branding of Infix, and even customer specific
|
||||
features for dedicated products is provided by _Wires_.
|
||||
|
||||
:globe_with_meridians: <https://www.wires.se>
|
||||
:e-mail: <mailto:infix@wires.se>
|
||||
Paid support and development provided by Addiva Elektronik <https://addiva.se>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<!--- **Summarize** your changes in the title above -->
|
||||
|
||||
## Description
|
||||
|
||||
<!--
|
||||
@@ -5,9 +7,15 @@
|
||||
-- Remember: assign a reviewer, or use @mentions if org. member.
|
||||
-->
|
||||
|
||||
|
||||
## Other information
|
||||
|
||||
<!-- Other relevant info, e.g., before/after screenshots -->
|
||||
|
||||
|
||||
## Checklist
|
||||
|
||||
Tick *relevant* boxes, this PR is-a or has-a:
|
||||
Tick relevant boxes, this PR is-a or has-a:
|
||||
|
||||
- [ ] Bugfix
|
||||
- [ ] Regression tests
|
||||
@@ -17,12 +25,13 @@ Tick *relevant* boxes, this PR is-a or has-a:
|
||||
- [ ] Regression tests added?
|
||||
- [ ] ChangeLog updates (for next release)
|
||||
- [ ] Documentation added?
|
||||
- [ ] Test changes
|
||||
- [ ] Checked in changed Readme.adoc (make test-spec)
|
||||
- [ ] Added new test to group Readme.adoc and yaml file
|
||||
- [ ] Code style update (formatting, renaming)
|
||||
- [ ] Refactoring (please detail in commit messages)
|
||||
- [ ] Build related changes
|
||||
- [ ] Documentation content changes
|
||||
- [ ] ChangeLog updated (for major changes)
|
||||
- [ ] Other (please describe):
|
||||
|
||||
|
||||
## References
|
||||
|
||||
<!-- Please list references to related issue(s) -->
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
name: Adds all issues to project Infix & C:o
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
add-to-project:
|
||||
name: Add issue to project Infix&co
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/add-to-project@v1.0.2
|
||||
with:
|
||||
project-url: https://github.com/orgs/kernelkit/projects/3
|
||||
github-token: ${{ secrets.ADD_TO_PROJECT }}
|
||||
@@ -1,143 +0,0 @@
|
||||
name: Build Bootloaders
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch to build from'
|
||||
default: 'main'
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ${{ matrix.defconfig }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
defconfig:
|
||||
- fireant_boot
|
||||
- cn9130_crb_boot
|
||||
- aarch64_qemu_boot
|
||||
- rpi4_boot
|
||||
env:
|
||||
MAKEFLAGS: -j5
|
||||
steps:
|
||||
- name: Cleanup Build Folder
|
||||
run: |
|
||||
ls -la ./
|
||||
rm -rf ./* || true
|
||||
rm -rf ./.??* || true
|
||||
ls -la ./
|
||||
|
||||
- name: Checkout infix repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}
|
||||
clean: true
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Set Build Variables
|
||||
id: vars
|
||||
run: |
|
||||
defconfig=${{ matrix.defconfig }}
|
||||
version=$(awk -F'"' '/BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE=/ {print $2}' configs/${defconfig}_defconfig)
|
||||
version=${version:-git}
|
||||
filename=$(echo "${defconfig}" | tr '_' '-')
|
||||
|
||||
# TODO: Replace hardcoded rev with actual revision stepping
|
||||
rev="latest"
|
||||
|
||||
archive="${filename}-${version}-${rev}.tar.gz"
|
||||
dirname="${filename}-${version}-${rev}"
|
||||
|
||||
echo "defconfig=${defconfig}" >> $GITHUB_OUTPUT
|
||||
echo "version=${version}" >> $GITHUB_OUTPUT
|
||||
echo "rev=${rev}" >> $GITHUB_OUTPUT
|
||||
echo "archive=${archive}" >> $GITHUB_OUTPUT
|
||||
echo "dirname=${dirname}" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "Building ${defconfig}_defconfig, version ${version}-${rev}, artifact ${archive} ..."
|
||||
|
||||
- name: Restore Cache of dl/
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: dl/
|
||||
key: dl-boot-${{ hashFiles('.git/modules/buildroot/HEAD', 'configs/*', 'package/*/*.hash') }}
|
||||
restore-keys: |
|
||||
dl-boot-
|
||||
dl-
|
||||
|
||||
- name: Restore Cache of .ccache/
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache/
|
||||
key: ccache-boot-${{ matrix.defconfig }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
||||
restore-keys: |
|
||||
ccache-boot-${{ matrix.defconfig }}-
|
||||
ccache-boot-
|
||||
ccache-
|
||||
|
||||
- name: Configure ${{ matrix.defconfig }}_defconfig
|
||||
run: |
|
||||
make ${{ matrix.defconfig }}_defconfig
|
||||
|
||||
- name: Build ${{ matrix.defconfig }}_defconfig
|
||||
run: |
|
||||
echo "Building ${{ matrix.defconfig }}_defconfig ..."
|
||||
make -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))
|
||||
|
||||
- name: Resulting size of build
|
||||
run: |
|
||||
printf "Size of output/images/: "
|
||||
ls -l output/images/
|
||||
|
||||
- name: Prepare ${{ matrix.defconfig }} Artifact
|
||||
run: |
|
||||
cd output/
|
||||
mv images ${{ steps.vars.outputs.dirname }}
|
||||
tar cfz ${{ steps.vars.outputs.archive }} ${{ steps.vars.outputs.dirname }}/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: output/${{ steps.vars.outputs.archive }}
|
||||
name: artifact-${{ matrix.defconfig }}
|
||||
|
||||
publish:
|
||||
name: Upload Bootloader Artifacts
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- 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
|
||||
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
omitName: true
|
||||
omitBody: true
|
||||
omitBodyDuringUpdate: true
|
||||
prerelease: true
|
||||
tag: "latest-boot"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
artifacts: "*.tar.gz*"
|
||||
|
||||
- name: Summary
|
||||
run: |
|
||||
cat <<EOF >> $GITHUB_STEP_SUMMARY
|
||||
# Bootloader Build Complete! :rocket:
|
||||
|
||||
For the public download links of these bootloader artifacts, please see:
|
||||
<https://github.com/kernelkit/infix/releases/tag/latest-boot>
|
||||
EOF
|
||||
+70
-132
@@ -1,94 +1,37 @@
|
||||
name: Build
|
||||
name: Bob the Builder
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
target:
|
||||
description: "Build target (e.g. aarch64 or aarch64_minimal)"
|
||||
default: "x86_64"
|
||||
type: string
|
||||
parallel:
|
||||
description: 'Massive parallel build of each image'
|
||||
default: true
|
||||
type: boolean
|
||||
name:
|
||||
description: "Name (for spin overrides)"
|
||||
default: "infix"
|
||||
type: string
|
||||
infix_repo:
|
||||
description: 'Repo to checkout (for spin overrides)'
|
||||
default: kernelkit/infix
|
||||
type: string
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
name:
|
||||
required: true
|
||||
type: string
|
||||
infix_repo:
|
||||
required: false
|
||||
type: string
|
||||
default: kernelkit/infix
|
||||
parallel:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
env:
|
||||
NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
|
||||
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
|
||||
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }} ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
|
||||
runs-on: [ self-hosted, latest ]
|
||||
env:
|
||||
PARALLEL: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.parallel == 'true' || github.event_name != 'workflow_dispatch' && inputs.parallel == true }}
|
||||
name: Build Infix ${{ matrix.platform }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [aarch64, x86_64]
|
||||
fail-fast: false
|
||||
outputs:
|
||||
build_id: ${{ steps.vars.outputs.INFIX_BUILD_ID }}
|
||||
steps:
|
||||
- name: Cleanup Build Folder
|
||||
- name: Maintenance
|
||||
run: |
|
||||
ls -la ./
|
||||
rm -rf ./* || true
|
||||
rm -rf ./.??* || true
|
||||
ls -la ./
|
||||
|
||||
- name: Checkout infix repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ env.INFIX_REPO }}
|
||||
ref: ${{ github.ref }}
|
||||
clean: true
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
docker image prune -af
|
||||
docker volume prune -f
|
||||
docker container prune -f
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set Build Variables
|
||||
id: vars
|
||||
run: |
|
||||
if [ -n "${{ github.event.pull_request.head.sha }}" ]; then
|
||||
# Since PRs are built from an internally generated merge
|
||||
# commit, reverse lookups of PRs and/or commits from
|
||||
# image version information are cumbersome. Therefore:
|
||||
# explicitly set a build id that references both the PR
|
||||
# and the commit.
|
||||
printf "INFIX_BUILD_ID=pr%d.%.7s\n" \
|
||||
"${{ github.event.number }}" "${{ github.event.pull_request.head.sha }}" \
|
||||
| tee -a $GITHUB_OUTPUT $GITHUB_ENV
|
||||
target=${{ matrix.platform }}
|
||||
echo "dir=infix-$target" >> $GITHUB_OUTPUT
|
||||
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
|
||||
if [ "$target" = x86_64 ]; then
|
||||
echo "out=$PWD/output" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "out=/mnt/x-$target" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
target=${{ env.TARGET }}
|
||||
name=${{ env.NAME }}
|
||||
echo "dir=${name}-${target}" >> $GITHUB_OUTPUT
|
||||
echo "tgz=${name}-${target}.tar.gz" >> $GITHUB_OUTPUT
|
||||
echo "Building target ${target}_defconfig"
|
||||
|
||||
- name: Restore Cache of dl/
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -96,70 +39,65 @@ 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-${{ env.TARGET }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
||||
key: ccache-${{ matrix.platform }}-${{ hashFiles('.git/modules/buildroot/HEAD', 'package/*/*.hash') }}
|
||||
restore-keys: |
|
||||
ccache-${{ env.TARGET }}-
|
||||
ccache-${{ matrix.platform }}-
|
||||
ccache-
|
||||
|
||||
- name: Configure ${{ env.TARGET }}
|
||||
- name: Configure & Build
|
||||
run: |
|
||||
make ${{ env.TARGET }}_defconfig
|
||||
|
||||
- name: Unit Test ${{ env.TARGET }}
|
||||
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: Prepare Artifact
|
||||
run: |
|
||||
make test-unit
|
||||
|
||||
- name: Prepare parallel build
|
||||
id: parallel
|
||||
run: |
|
||||
|
||||
if [ "$PARALLEL" == "true" ]; then
|
||||
echo "BR2_PER_PACKAGE_DIRECTORIES=y" >> output/.config
|
||||
MAKE="make -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))"
|
||||
echo "Building in parallel with -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))"
|
||||
else
|
||||
echo "Disabling parallel build"
|
||||
MAKE="make"
|
||||
fi
|
||||
echo "MAKE=$MAKE" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build ${{ env.TARGET }}
|
||||
run: |
|
||||
echo "Building ${{ env.TARGET }}_defconfig ..."
|
||||
eval "${{ steps.parallel.outputs.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 ${{ env.TARGET }} Artifact
|
||||
run: |
|
||||
cd output/
|
||||
cd ${{ steps.vars.outputs.out }}
|
||||
mv images ${{ steps.vars.outputs.dir }}
|
||||
ln -s ${{ steps.vars.outputs.dir }} images
|
||||
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
||||
|
||||
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
||||
- name: Test
|
||||
if: matrix.platform == 'x86_64'
|
||||
run: |
|
||||
export O=${{ steps.vars.outputs.out }}
|
||||
make test-qeneth
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: output/${{ steps.vars.outputs.tgz }}
|
||||
name: artifact-${{ env.TARGET }}
|
||||
path: ${{ steps.vars.outputs.out }}/${{ steps.vars.outputs.tgz }}
|
||||
name: artifact-${{ matrix.platform }}
|
||||
release:
|
||||
if: ${{github.repository_owner == 'kernelkit' && github.ref_name == 'main'}}
|
||||
name: Upload Latest Build
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: "artifact-*"
|
||||
merge-multiple: true
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
omitName: true
|
||||
omitBody: true
|
||||
omitBodyDuringUpdate: true
|
||||
prerelease: true
|
||||
tag: "latest"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
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:
|
||||
@@ -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 \
|
||||
libuev-dev
|
||||
|
||||
libaugeas-dev libglib2.0-dev libpcre2-dev \
|
||||
libuev-dev libite-dev
|
||||
- name: Build dependencies
|
||||
run: |
|
||||
git clone https://github.com/CESNET/libyang.git
|
||||
@@ -65,15 +61,11 @@ jobs:
|
||||
git clone https://github.com/sysrepo/sysrepo.git
|
||||
mkdir sysrepo/build
|
||||
(cd sysrepo/build && cmake .. && make all && sudo make install)
|
||||
git clone https://github.com/troglobit/libite.git
|
||||
(cd libite && ./autogen.sh && ./configure && make && 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 }}
|
||||
@@ -86,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:
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
name: User Guide Generator
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- doc
|
||||
- main
|
||||
tags:
|
||||
- 'v*'
|
||||
paths:
|
||||
- 'doc/**'
|
||||
- 'mkdocs.yml'
|
||||
- '.github/workflows/docs.yml'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: "docs-${{ github.ref }}"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pipx install mkdocs
|
||||
pipx inject mkdocs mkdocs-material
|
||||
pipx inject mkdocs pymdown-extensions
|
||||
pipx inject mkdocs mkdocs-callouts
|
||||
pipx inject mkdocs mike
|
||||
pipx inject mkdocs mkdocs-to-pdf
|
||||
# Workaround, if pipx inject fails to install symlink
|
||||
ln -s "$(pipx environment -V PIPX_LOCAL_VENVS)/mkdocs/bin/mike" \
|
||||
"$(pipx environment -V PIPX_BIN_DIR)/mike" || true
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Deploy dev version
|
||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/doc' || github.ref == 'refs/heads/main')
|
||||
run: |
|
||||
mike deploy --push --update-aliases dev latest
|
||||
mike set-default --push latest
|
||||
|
||||
- name: Deploy tagged version
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
TAG=${GITHUB_REF#refs/tags/v}
|
||||
# Extract YEAR.MONTH from tag (e.g., v25.06.0-beta1 -> 25.06)
|
||||
VERSION=$(echo $TAG | sed -E 's/^([0-9]+\.[0-9]+)(\.[0-9]+)?(-.*)?$/\1/')
|
||||
echo "Deploying tag $TAG as docs version $VERSION"
|
||||
mike deploy --push --update-aliases $VERSION latest
|
||||
mike set-default --push latest
|
||||
@@ -1,73 +0,0 @@
|
||||
name: Generic X86 GitHub Build
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository != 'kernelkit/infix'
|
||||
name: Infix x86_64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
bc binutils build-essential bzip2 cpio \
|
||||
diffutils file findutils git gzip \
|
||||
libncurses-dev libssl-dev perl patch \
|
||||
python3 rsync sed tar unzip wget \
|
||||
autopoint bison flex autoconf automake \
|
||||
mtools
|
||||
|
||||
- name: Checkout infix repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.repository }}
|
||||
ref: ${{ github.ref }}
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Set Build Variables
|
||||
id: vars
|
||||
run: |
|
||||
echo "INFIX_BUILD_ID=${{ github.run_id }}" >> $GITHUB_OUTPUT
|
||||
echo "dir=Infix-x86_64" >> $GITHUB_OUTPUT
|
||||
echo "tgz=Infix-x86_64.tar.gz" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Configure x86_64_minimal
|
||||
run: |
|
||||
make x86_64_minimal_defconfig
|
||||
|
||||
- name: Unit Test x86_64
|
||||
run: |
|
||||
make test-unit
|
||||
|
||||
- name: Build x86_64_minimal
|
||||
run: |
|
||||
make
|
||||
|
||||
- name: Check SBOM
|
||||
run: |
|
||||
make legal-info
|
||||
|
||||
- name: Report Build Size
|
||||
run: |
|
||||
du -sh .
|
||||
du -sh output
|
||||
du -sh dl || true
|
||||
ls -l output/images/
|
||||
|
||||
- name: Prepare Artifact
|
||||
run: |
|
||||
cd output/
|
||||
mv images Infix-x86_64
|
||||
ln -s Infix-x86_64 images
|
||||
tar cfz Infix-x86_64.tar.gz Infix-x86_64
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: output/Infix-x86_64.tar.gz
|
||||
name: artifact-x86_64
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
name: Publish latest Infix
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Upload Latest Build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- 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
|
||||
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
replacesArtifacts: true
|
||||
omitName: true
|
||||
omitBody: true
|
||||
omitBodyDuringUpdate: true
|
||||
prerelease: true
|
||||
tag: "latest"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
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
|
||||
@@ -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
|
||||
- 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: ubuntu-latest
|
||||
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,65 +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 cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
||||
|
||||
mv legal-info legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
|
||||
tar cfz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}.tar.gz legal-info-${{ matrix.target }}-${{ steps.vars.outputs.ver }}
|
||||
tar chfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
||||
|
||||
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
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: artifact-disk-image-${{ matrix.target }}
|
||||
path: output/images/*.qcow2
|
||||
|
||||
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: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
discussions: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'true'
|
||||
|
||||
- name: Set Release Variables
|
||||
id: rel
|
||||
run: |
|
||||
@@ -121,57 +106,44 @@ jobs:
|
||||
ver=${GITHUB_REF#refs/tags/}
|
||||
fi
|
||||
echo "ver=${ver}" >> $GITHUB_OUTPUT
|
||||
echo "cat=" >> $GITHUB_OUTPUT
|
||||
if echo $ver | grep -qE 'v[0-9.]+(-alpha|-beta|-rc)[0-9]*'; then
|
||||
echo "pre=true" >> $GITHUB_OUTPUT
|
||||
echo "latest=false" >> $GITHUB_OUTPUT
|
||||
elif echo $ver | grep -qE '^v[0-9.]+\.[0-9.]+(\.[0-9]+)?$'; then
|
||||
echo "pre=false" >> $GITHUB_OUTPUT
|
||||
echo "latest=true" >> $GITHUB_OUTPUT
|
||||
echo "cat=Releases" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "pre=false" >> $GITHUB_OUTPUT
|
||||
echo "latest=false" >> $GITHUB_OUTPUT
|
||||
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
|
||||
if ls *.qcow2 &>/dev/null; then
|
||||
for file in *.qcow2; do
|
||||
sha256sum "$file" > "$file.sha256"
|
||||
done
|
||||
fi
|
||||
|
||||
- name: Extract ChangeLog entry ...
|
||||
run: |
|
||||
awk '/^-----*$/{if (x == 1) exit; x=1;next}x' doc/ChangeLog.md \
|
||||
|head -n -1 > release.md
|
||||
cat release.md
|
||||
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
name: Infix ${{ github.ref_name }}
|
||||
prerelease: ${{ steps.rel.outputs.pre }}
|
||||
makeLatest: ${{ steps.rel.outputs.latest }}
|
||||
discussionCategory: ${{ steps.rel.outputs.cat }}
|
||||
bodyFile: release.md
|
||||
artifacts: "*.tar.gz*,*.qcow2*"
|
||||
|
||||
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
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# To enable automatic sync of your Infix fork every day, or on dispatch,
|
||||
# set the repoistory or organisation variable (not secret):
|
||||
#
|
||||
# SYNC_FORK = true
|
||||
#
|
||||
# You also need a GH_SYNC_REPO token allowed to update workflows. For
|
||||
# more information on variables and secrets, see the GitHub docs.
|
||||
# See https://docs.github.com/en/actions/learn-github-actions/variables
|
||||
name: Synchronize your fork of Infix with upstream
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 42 2 * * *
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync_fork:
|
||||
if: ${{github.repository_owner != 'kernelkit' && vars.SYNC_FORK == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: TobKed/github-forks-sync-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GH_SYNC_REPO }}
|
||||
upstream_repository: KernelKit/infix
|
||||
upstream_branch: main
|
||||
target_branch: main
|
||||
force: false
|
||||
tags: true
|
||||
@@ -1,110 +0,0 @@
|
||||
name: Test Infix
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
infix_repo:
|
||||
description: 'Repo to checkout (for spin overrides)'
|
||||
required: false
|
||||
default: kernelkit/infix
|
||||
type: string
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
name:
|
||||
required: true
|
||||
type: string
|
||||
infix_repo:
|
||||
required: false
|
||||
type: string
|
||||
default: kernelkit/infix
|
||||
ninepm-conf:
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
test-path:
|
||||
required: false
|
||||
type: string
|
||||
default: 'test'
|
||||
|
||||
env:
|
||||
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
|
||||
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
|
||||
NINEPM_CONF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ninepm-conf || inputs.ninepm-conf }}
|
||||
TEST_PATH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.test-path || inputs.test-path }}
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Regression Test ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }} ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
|
||||
runs-on: [ self-hosted, regression ]
|
||||
steps:
|
||||
- name: Checkout infix repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ env.INFIX_REPO }}
|
||||
ref: ${{ github.ref }}
|
||||
clean: true
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Set Build Variables
|
||||
id: vars
|
||||
run: |
|
||||
if [ -n "${{ needs.build.outputs.build_id }}" ]; then
|
||||
echo "INFIX_BUILD_ID=${{ needs.build.outputs.build_id }}" \
|
||||
>>$GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Configure ${{ env.TARGET }}
|
||||
run: |
|
||||
make ${{ env.TARGET }}_defconfig
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: "artifact-*"
|
||||
merge-multiple: true
|
||||
|
||||
- name: Restore ${{ env.TARGET }} output/
|
||||
run: |
|
||||
target=${{ env.TARGET }}
|
||||
name=${{ inputs.name }}
|
||||
|
||||
ls -l
|
||||
mkdir -p output
|
||||
mv ${name}-${target}.tar.gz output/
|
||||
cd output/
|
||||
tar xf ${name}-${target}.tar.gz
|
||||
ln -s ${name}-${target} images
|
||||
|
||||
- name: Regression Test ${{ env.TARGET }}
|
||||
run: |
|
||||
if [ -n "$NINEPM_CONF" ]; then
|
||||
export NINEPM_PROJ_CONFIG="${GITHUB_WORKSPACE}/$NINEPM_CONF"
|
||||
echo "DEBUG: NINEPM_PROJ_CONFIG is '$NINEPM_PROJ_CONFIG'"
|
||||
fi
|
||||
make test
|
||||
|
||||
- name: Publish Test Result for ${{ env.TARGET }}
|
||||
# Ensure this runs even if Regression Test fails
|
||||
if: always()
|
||||
run: cat $TEST_PATH/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Generate Test Report for ${{ env.TARGET }}
|
||||
# Ensure this runs even if Regression Test fails
|
||||
if: always()
|
||||
run: |
|
||||
asciidoctor-pdf \
|
||||
--theme $TEST_PATH/9pm/report/theme.yml \
|
||||
-a pdf-fontsdir=$TEST_PATH/9pm/report/fonts \
|
||||
$TEST_PATH/.log/last/report.adoc \
|
||||
-o $TEST_PATH/.log/last/report.pdf
|
||||
|
||||
- name: Upload Test Report as Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-report
|
||||
path: ${{ env.TEST_PATH }}/.log/last/report.pdf
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
name: Kernelkit Trigger
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- ci-work
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-x86_64:
|
||||
if: startsWith(github.repository, 'kernelkit/')
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
name: "infix"
|
||||
target: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci:main') && 'x86_64_minimal' || 'x86_64' }}
|
||||
|
||||
build-aarch64:
|
||||
if: startsWith(github.repository, 'kernelkit/')
|
||||
uses: ./.github/workflows/build.yml
|
||||
with:
|
||||
name: "infix"
|
||||
target: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci:main') && 'aarch64_minimal' || 'aarch64' }}
|
||||
|
||||
test-run-x86_64:
|
||||
if: startsWith(github.repository, 'kernelkit/')
|
||||
needs: build-x86_64
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
target: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci:main') && 'x86_64_minimal' || 'x86_64' }}
|
||||
name: "infix"
|
||||
|
||||
test-publish-x86_64:
|
||||
if: startsWith(github.repository, 'kernelkit/')
|
||||
needs: test-run-x86_64
|
||||
uses: ./.github/workflows/publish.yml
|
||||
@@ -8,4 +8,3 @@
|
||||
/test/.venv
|
||||
/test/.log
|
||||
/local.mk
|
||||
/test/spec/Readme.adoc
|
||||
|
||||
@@ -52,20 +52,9 @@ config INFIX_IMAGE_ID
|
||||
Mandatory. When INFIX_RELEASE is set, this string is appended to
|
||||
the IMAGE_ID with a '-' separator.
|
||||
|
||||
config INFIX_COMPATIBLE
|
||||
string "Operating system compatible string"
|
||||
default "${INFIX_IMAGE_ID}"
|
||||
help
|
||||
A lower-case string (no spaces or other characters outside of 0–9,
|
||||
a–z, ".", "_" and "-"), used for image identification at upgrade.
|
||||
E.g., the RAUC [system] compatible string.
|
||||
|
||||
Mandatory. Defaults to $INFIX_IMAGE_ID, which in turn is composed
|
||||
of $INFIX_ID-$BR2_ARCH.
|
||||
|
||||
config INFIX_TAGLINE
|
||||
string "Operating system tagline"
|
||||
default "Infix OS — Immutable.Friendly.Secure"
|
||||
default "Infix -- a Network Operating System"
|
||||
help
|
||||
Mandatory. Used for identifying the OS, e.g. as PRETTY_NAME in
|
||||
/etc/os-release and description in the GNS3 appliance.
|
||||
@@ -123,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
|
||||
|
||||
@@ -2,69 +2,55 @@
|
||||
|
||||
<img align="right" src="doc/logo.png" alt="Infix - Linux <3 NETCONF" width=480 border=10>
|
||||
|
||||
Turn any ARM or x86 device into a powerful, manageable network appliance
|
||||
in minutes. From $35 Raspberry Pi boards to enterprise switches — deploy
|
||||
routers, IoT gateways, edge devices, or custom network solutions that
|
||||
just work.
|
||||
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[^1] or the built-in command
|
||||
line interface (CLI) from a console or SSH login.
|
||||
|
||||
## Our Values
|
||||
> Click the **▶ Example CLI Session** foldout below for an example, or
|
||||
> head on over to the [Infix Documentation](doc/README.md) for more
|
||||
> information on how to set up the system.
|
||||
|
||||
**🔒 Immutable**
|
||||
Your system never breaks. Read-only filesystem with atomic upgrades
|
||||
means no configuration drift, no corrupted updates, and instant rollback
|
||||
if something goes wrong. Deploy once, trust forever.
|
||||
Although primarily focused on switches and routers, the core values
|
||||
may be appealing for other use-cases as well:
|
||||
|
||||
**🤝 Friendly**
|
||||
Actually easy to use. Auto-generated CLI from standard YANG models comes
|
||||
with built-in help for every command — just hit `?` or TAB for
|
||||
context-aware assistance. Familiar NETCONF/RESTCONF APIs and
|
||||
[comprehensive documentation][4] mean you're never stuck. Whether
|
||||
you're learning networking or managing enterprise infrastructure.
|
||||
- Runs from a squashfs image on a read-only partition
|
||||
- Single configuration file on a separate partition
|
||||
- Built around YANG with standard IETF models
|
||||
- Linux switchdev provides open switch APIs
|
||||
- Atomic upgrades to secondary partition
|
||||
- Highly security focused
|
||||
|
||||
**🛡️ Secure**
|
||||
Built with security as a foundation, not an afterthought. Minimal
|
||||
attack surface, separation between system and data, and container
|
||||
isolation. Sleep better knowing your infrastructure is protected.
|
||||
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.
|
||||
|
||||
## Why Choose Infix
|
||||
In itself Infix is perfectly suited for dedicated networking tasks and
|
||||
native support for Docker containers provides a versatile platform that
|
||||
can easily be adapted to any customer need. Be it legacy applications,
|
||||
network protocols, process monitoring, or edge data analysis, it can run
|
||||
close to end equipment. Either directly connected on dedicated Ethernet
|
||||
ports or indirectly using virtual network cables to exist on the same
|
||||
LAN as other connected equipment.
|
||||
|
||||
**Hardware Flexibility**: Start with a $35 Raspberry Pi, scale to
|
||||
enterprise switching hardware. Same OS, same tools, same reliability.
|
||||
The simple design of Infix provides complete control over both system
|
||||
and data, minimal cognitive burden, and makes it incredibly easy to get
|
||||
started.
|
||||
|
||||
**Standards-Based**: Built around YANG models and IETF standards. Learn
|
||||
once, use everywhere - no vendor lock-in.
|
||||
<details><summary><b>Example CLI Session</b></summary>
|
||||
|
||||
**Container Ready**: Run your applications alongside networking
|
||||
functions. GPIO access, dedicated Ethernet ports, custom protocols —
|
||||
your device, your rules.
|
||||
The CLI configure context is automatically generated from the loaded
|
||||
YANG models and their corresponding [sysrepo][2] plugins. The following
|
||||
is brief example of how to set the IP address of an interface:
|
||||
|
||||
## Use Cases
|
||||
|
||||
1. **Home Labs & Hobbyists**:
|
||||
Transform a Raspberry Pi into a full-featured router with WiFi
|
||||
1. **IoT & Edge Computing**:
|
||||
Bridge devices to the cloud with reliable, updatable gateways
|
||||
1. **Small Business Networks**:
|
||||
Enterprise-grade features without the complexity or cost
|
||||
1. **Developers & Makers**:
|
||||
Test networking concepts, prototype IoT solutions, or build custom
|
||||
appliances
|
||||
1. **Network Professionals**:
|
||||
Consistent tooling from development to production deployment.
|
||||
How about a digital twin using raw Qemu or [GNS3](https://gns3.com/infix)!
|
||||
|
||||
## See It In Action
|
||||
|
||||
Configure an interface in seconds - the CLI guides you with built-in help:
|
||||
|
||||
<details><summary><b>Click Here for an example CLI Session</b></summary>
|
||||
|
||||
```bash
|
||||
```
|
||||
admin@infix-12-34-56:/> configure
|
||||
admin@infix-12-34-56:/config/> edit interface eth0
|
||||
admin@infix-12-34-56:/config/interface/eth0/> set ipv4 <TAB>
|
||||
address autoconf bind-ni-name enabled
|
||||
forwarding mtu neighbor
|
||||
forwarding mtu neighbor
|
||||
admin@infix-12-34-56:/config/interface/eth0/> set ipv4 address 192.168.2.200 prefix-length 24
|
||||
admin@infix-12-34-56:/config/interface/eth0/> show
|
||||
type ethernet;
|
||||
@@ -73,6 +59,7 @@ ipv4 {
|
||||
prefix-length 24;
|
||||
}
|
||||
}
|
||||
ipv6
|
||||
admin@infix-12-34-56:/config/interface/eth0/> diff
|
||||
interfaces {
|
||||
interface eth0 {
|
||||
@@ -95,65 +82,40 @@ lo ethernet UP 00:00:00:00:00:00
|
||||
admin@infix-12-34-56:/> copy running-config startup-config
|
||||
```
|
||||
|
||||
Notice how TAB completion shows available options, `show` displays
|
||||
current config, and `diff` shows exactly what changed before you
|
||||
commit your changes with the `leave` command.
|
||||
|
||||
[Click here][3] for more details.
|
||||
</details>
|
||||
|
||||
> [Full CLI documentation →][3]
|
||||
Infix can run on many different types of architectures and boards, much
|
||||
thanks to Linux and Buildroot. Currently the focus is on 64-bit ARM
|
||||
devices, optionally with switching fabric supported by Linux switchdev.
|
||||
The [following boards](board/aarch64/README.md) are fully supported:
|
||||
|
||||
## Get Started
|
||||
- Marvell CN9130 CRB
|
||||
- Marvell EspressoBIN
|
||||
- Microchip SparX-5i PCB135 (eMMC)
|
||||
- NanoPi R2S
|
||||
|
||||
Get [pre-built images][5] for your hardware. Use the CLI, web
|
||||
interface, or standard NETCONF/RESTCONF tools, e.g., `curl`. Add
|
||||
containers for any custom functionality you need.
|
||||
An x86_64 build is also available, primarily intended for development
|
||||
and testing, but can also be used for evaluation and demo purposes. For
|
||||
more information, see: [Infix in Virtual Environments](doc/virtual.md).
|
||||
|
||||
### Supported Platforms
|
||||
> See the [GitHub Releases](https://github.com/kernelkit/infix/releases)
|
||||
> 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.
|
||||
|
||||
- **Raspberry Pi 4B** - Perfect for home labs, learning, and prototyping
|
||||
- **NanoPi R2S** - Compact dual-port router in a tiny package
|
||||
- **x86_64** - Run in VMs or on mini PCs for development and testing
|
||||
- **Marvell CN9130 CRB, EspressoBIN** - High-performance ARM platforms
|
||||
- **Microchip SparX-5i, NXP i.MX8MP EVK** - Enterprise switching capabilities
|
||||
- **StarFive VisionFive2** - RISC-V architecture support
|
||||
[^1]: NETCONF or RESTCONF, <https://datatracker.ietf.org/doc/html/rfc8040>
|
||||
|
||||
*Why start with Raspberry Pi?* It's affordable, widely available, has
|
||||
built-in WiFi + Ethernet, and runs the exact same Infix OS you'd deploy
|
||||
in production. Perfect for learning, prototyping, or even small-scale
|
||||
deployments.
|
||||
[^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/>.
|
||||
|
||||
> 📖 **[Complete documentation][4]** • 💬 **[Join our Discord][discord-url]**
|
||||
|
||||
## Technical Details
|
||||
|
||||
Built on proven open-source foundations ([Buildroot][1] + [sysrepo][2])
|
||||
for reliability you can trust:
|
||||
|
||||
- **Immutable OS**: Read-only filesystem, atomic updates, instant rollback
|
||||
- **YANG Configuration**: Industry-standard models with auto-generated tooling
|
||||
- **Hardware Acceleration**: Linux switchdev support for wire-speed packet processing
|
||||
- **Container Integration**: Docker support with flexible network and hardware access
|
||||
- **Memory Efficient**: Runs comfortably on devices with as little as 256 MB RAM
|
||||
|
||||
Perfect for everything from resource-constrained edge devices to
|
||||
high-throughput network appliances.
|
||||
|
||||
> Check the *[Latest Build][]* for bleeding-edge features.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<a href="https://github.com/wires-se"><img src="https://raw.githubusercontent.com/wires-se/.github/main/profile/play.svg" width=300></a>
|
||||
<br />Infix development is sponsored by <a href="https://wires.se">Wires</a>
|
||||
</div>
|
||||
|
||||
[1]: https://buildroot.org/ "Buildroot Homepage"
|
||||
[2]: https://www.sysrepo.org/ "Sysrepo Homepage"
|
||||
[3]: https://kernelkit.org/infix/latest/cli/introduction/
|
||||
[4]: https://kernelkit.org/infix/
|
||||
[5]: https://github.com/kernelkit/infix/releases
|
||||
[Latest Build]: https://github.com/kernelkit/infix/releases/tag/latest "Latest build"
|
||||
[1]: https://buildroot.org/
|
||||
[2]: https://www.sysrepo.org/
|
||||
[3]: doc/cli/introduction.md
|
||||
[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/
|
||||
|
||||
+54
-41
@@ -1,54 +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/)
|
||||
- [Raspberry Pi 4 b](#raspberry-pi-4-b)
|
||||
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:
|
||||
|
||||
# Raspberry Pi 4 b
|
||||
make board-enable-sparx-fit
|
||||
|
||||
## Support level
|
||||
Full support for base board but not any extension board on the
|
||||
GPIOs.
|
||||
### Unbricking
|
||||
|
||||
### Touch screen
|
||||
The [Raspberry Pi touch display v1][RPI-TOUCH] is supported, including
|
||||
touch functionality. There are multiple touchscreens on the market for
|
||||
Raspberry Pi, but only the official (first version with 800x480
|
||||
resolution) is currently supported. Infix supplies all drivers
|
||||
required to utilize the hardware, but you need to add the actual
|
||||
graphical application in a container.
|
||||
1. Don't load a corrupt bootloader to begin with
|
||||
2. Done
|
||||
|
||||
There are some important considerations you need to know about when
|
||||
using Infix for graphical applications. The container needs access to
|
||||
/dev/dri/ to be able to access the graphics card, and it also needs
|
||||
access to /run/udev to be able to find the input devices.
|
||||
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.
|
||||
|
||||
Example of running Doom in Infix:
|
||||
|
||||
```cli
|
||||
admin@example:/> configure
|
||||
admin@example:/config/> edit container doom
|
||||
admin@example:/config/container/doom/> set image docker://mattiaswal/alpine-doom:latest
|
||||
admin@example:/config/container/doom/> set privileged
|
||||
admin@example:/config/container/doom/> edit mount udev
|
||||
admin@example:/config/container/doom/mount/udev/> set type bind
|
||||
admin@example:/config/container/doom/mount/udev/> set target /run/udev/
|
||||
admin@example:/config/container/doom/mount/udev/> set source /run/udev/
|
||||
admin@example:/config/container/doom/mount/udev/> end
|
||||
admin@example:/config/container/doom/mount/xorg.conf/> set content U2VjdGlvbiAiT3V0cHV0Q2xhc3MiCiAgSWRlbnRpZmllciAidmM0IgogIE1hdGNoRHJpdmVyICJ2YzQiCiAgRHJpdmVyICJtb2Rlc2V0dGluZyIKICBPcHRpb24gIlByaW1hcnlHUFUiICJ0cnVlIgpFbmRTZWN0aW9uCg==
|
||||
admin@example:/config/container/doom/mount/xorg.conf/> set target /etc/X11/xorg.conf
|
||||
admin@example:/config/container/doom/mount/xorg.conf/> end
|
||||
admin@example:/config/container/doom/> edit volume var
|
||||
admin@example:/config/container/doom/volume/var/> set target /var
|
||||
admin@example:/config/container/doom/volume/var/> leave
|
||||
admin@example:/>
|
||||
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` |
|
||||
|
||||
[RPI-TOUCH]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
|
||||
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,136 +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.
|
||||
|
||||
## Console Port
|
||||
|
||||
The console port runs at 115200 baud, 8N1.
|
||||
|
||||
[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
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
|
||||
#include "alder-mpp.h"
|
||||
|
||||
&ap_crit {
|
||||
temperature = <115000>;
|
||||
};
|
||||
|
||||
/ {
|
||||
model = "Alder";
|
||||
compatible = "alder,alder",
|
||||
@@ -354,7 +358,6 @@
|
||||
#define XSWP(_n, _label, _mac_offs, _phy) \
|
||||
port@_n { \
|
||||
SWP_COMMON(_n, _label, _mac_offs, "usxgmii", _phy); \
|
||||
managed = "in-band-status"; \
|
||||
}
|
||||
|
||||
#define GSWP(_n, _label, _mac_offs, _phy) \
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include <arm64/marvell/cn9130.dtsi>
|
||||
#include "cn9130.dtsi"
|
||||
|
||||
&cp0_syscon0 {
|
||||
cp0_pinctrl: pinctrl {
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <arm64/microchip/sparx5_pcb135_emmc.dts>
|
||||
#include "sparx5_pcb135_emmc.dts"
|
||||
|
||||
&cpu0 {
|
||||
enable-method = "spin-table";
|
||||
+3
-3
@@ -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"
|
||||
+111
-85
@@ -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";
|
||||
@@ -33,14 +36,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* RTC has no valid bit, and this board does not connect any
|
||||
* backup power (e.g. supercap) to it, so it returns garbage
|
||||
* after every cold reset.
|
||||
*/
|
||||
&cp0_rtc {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/* UART0 (Console) */
|
||||
|
||||
@@ -97,7 +92,7 @@
|
||||
compatible = "atmel,24c256";
|
||||
reg = <0x50>;
|
||||
|
||||
infix,board = "product";
|
||||
infix,board = "cpu";
|
||||
infix,trusted;
|
||||
|
||||
nvmem-layout {
|
||||
@@ -265,43 +260,25 @@
|
||||
};
|
||||
};
|
||||
|
||||
#define SWP_LED \
|
||||
#define SWP_LED(_func) \
|
||||
leds { \
|
||||
#address-cells = <1>; \
|
||||
#size-cells = <0>; \
|
||||
\
|
||||
led@0 { \
|
||||
reg = <0>; \
|
||||
function = "tp"; \
|
||||
function = _func; \
|
||||
color = <LED_COLOR_ID_GREEN>; \
|
||||
default-state = "keep"; \
|
||||
}; \
|
||||
led@1 { \
|
||||
reg = <1>; \
|
||||
function = "aux"; \
|
||||
color = <LED_COLOR_ID_GREEN>; \
|
||||
function = _func; \
|
||||
color = <LED_COLOR_ID_YELLOW>; \
|
||||
default-state = "off"; \
|
||||
}; \
|
||||
}
|
||||
|
||||
/* SFP LEDs
|
||||
* Rev A. LEDs do not work at all
|
||||
* Rev B. only outer-most (green) LEDs work
|
||||
*/
|
||||
|
||||
#define SFP_LED \
|
||||
leds { \
|
||||
#address-cells = <1>; \
|
||||
#size-cells = <0>; \
|
||||
\
|
||||
led@0 { \
|
||||
reg = <0>; \
|
||||
function = "sfp"; \
|
||||
color = <LED_COLOR_ID_GREEN>; \
|
||||
default-state = "keep"; \
|
||||
}; \
|
||||
}
|
||||
|
||||
#define XSWP(_n, _label, _mac_offs, _sfp) \
|
||||
port@_n { \
|
||||
reg = <0x ## _n>; \
|
||||
@@ -310,31 +287,8 @@
|
||||
nvmem-cell-names = "mac-address"; \
|
||||
phy-mode = "10gbase-r"; \
|
||||
managed = "in-band-status"; \
|
||||
sfp = <_sfp>; \
|
||||
SFP_LED; \
|
||||
}
|
||||
|
||||
#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; \
|
||||
}; \
|
||||
sfp = <&_sfp>; \
|
||||
SWP_LED("sfp"); \
|
||||
}
|
||||
|
||||
#define GSWP(_n, _label, _mac_offs, _phy) \
|
||||
@@ -344,8 +298,8 @@
|
||||
nvmem-cells = <&base_mac _mac_offs>; \
|
||||
nvmem-cell-names = "mac-address"; \
|
||||
phy-mode = "gmii"; \
|
||||
phy-handle = <_phy>; \
|
||||
SWP_LED; \
|
||||
phy-handle = <&_phy>; \
|
||||
SWP_LED("tp"); \
|
||||
}
|
||||
|
||||
#define GPHY(_n) \
|
||||
@@ -378,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 {
|
||||
@@ -420,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 {
|
||||
@@ -462,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 {
|
||||
@@ -34,10 +34,6 @@ CONFIG_PROFILING=y
|
||||
CONFIG_ARCH_SPARX5=y
|
||||
CONFIG_ARCH_MVEBU=y
|
||||
CONFIG_ARCH_VEXPRESS=y
|
||||
CONFIG_ARM64_ERRATUM_2441007=y
|
||||
CONFIG_ARM64_ERRATUM_1286807=y
|
||||
CONFIG_ARM64_ERRATUM_1542419=y
|
||||
CONFIG_ARM64_ERRATUM_2441009=y
|
||||
CONFIG_ARM64_VA_BITS_48=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_NR_CPUS=64
|
||||
@@ -61,7 +57,6 @@ CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_KSM=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_AREAS=7
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_XDP_SOCKETS=y
|
||||
@@ -170,6 +165,7 @@ CONFIG_BRIDGE_EBT_REDIRECT=m
|
||||
CONFIG_BRIDGE_EBT_SNAT=m
|
||||
CONFIG_BRIDGE_EBT_LOG=m
|
||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
||||
CONFIG_BPFILTER=y
|
||||
CONFIG_BRIDGE=y
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
CONFIG_BRIDGE_MRP=y
|
||||
@@ -179,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
|
||||
@@ -231,7 +221,6 @@ CONFIG_SCSI_SAS_ATA=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_SATA_AHCI=y
|
||||
CONFIG_SATA_MOBILE_LPM_POLICY=0
|
||||
CONFIG_SATA_AHCI_PLATFORM=y
|
||||
CONFIG_AHCI_MVEBU=y
|
||||
CONFIG_PATA_OF_PLATFORM=y
|
||||
@@ -287,7 +276,6 @@ CONFIG_NET_DSA_MV88E6XXX_PTP=y
|
||||
CONFIG_MVNETA=m
|
||||
CONFIG_MVPP2=m
|
||||
# CONFIG_NET_VENDOR_MELLANOX is not set
|
||||
# CONFIG_NET_VENDOR_META is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
CONFIG_SPARX5_SWITCH=y
|
||||
# CONFIG_NET_VENDOR_MICROSEMI is not set
|
||||
@@ -359,14 +347,13 @@ CONFIG_SERIAL_XILINX_PS_UART=y
|
||||
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
|
||||
CONFIG_SERIAL_MVEBU_UART=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
CONFIG_HW_RANDOM_CN10K=m
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_MUX=y
|
||||
CONFIG_I2C_MUX_GPIO=y
|
||||
CONFIG_I2C_MUX_PCA954x=y
|
||||
CONFIG_I2C_MUX_PINCTRL=y
|
||||
CONFIG_I2C_DESIGNWARE_CORE=y
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
CONFIG_I2C_MV64XXX=y
|
||||
CONFIG_I2C_SLAVE=y
|
||||
CONFIG_SPI=y
|
||||
@@ -502,7 +489,6 @@ CONFIG_EXTCON_USB_GPIO=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_TI_ADC081C=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_RESET_GPIO=y
|
||||
CONFIG_PHY_MVEBU_CP110_COMPHY=y
|
||||
CONFIG_PHY_MVEBU_CP110_UTMI=y
|
||||
CONFIG_PHY_SAMSUNG_USB2=y
|
||||
@@ -520,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
|
||||
@@ -531,13 +516,13 @@ CONFIG_9P_FS=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,bpf"
|
||||
CONFIG_CRYPTO_CCM=m
|
||||
CONFIG_CRYPTO_ECHAINIV=y
|
||||
CONFIG_CRYPTO_ANSI_CPRNG=y
|
||||
CONFIG_CRYPTO_GHASH_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA1_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_CMA_SIZE_MBYTES=0
|
||||
@@ -547,8 +532,6 @@ CONFIG_DEBUG_KERNEL=y
|
||||
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_PANIC_ON_OOPS=y
|
||||
CONFIG_PANIC_TIMEOUT=20
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
# CONFIG_RCU_TRACE is not set
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# QEMU-specific U-Boot config
|
||||
# Enable PCI MMC for QEMU virtualized environment
|
||||
CONFIG_MMC_PCI=y
|
||||
@@ -1,172 +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.
|
||||
|
||||
|
||||
Console Port
|
||||
------------
|
||||
|
||||
Unlike many other boards, the NanoPi R2S console, and in fact all
|
||||
Rockchip family chipsets, runs 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 use the `custom-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
|
||||
@@ -245,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
|
||||
@@ -260,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
|
||||
@@ -281,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
|
||||
@@ -289,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
|
||||
@@ -379,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
|
||||
@@ -392,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
|
||||
@@ -400,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
|
||||
@@ -448,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
|
||||
@@ -480,6 +385,7 @@ CONFIG_I2C=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_MUX=y
|
||||
CONFIG_I2C_MUX_PCA954x=y
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
CONFIG_I2C_GPIO=m
|
||||
CONFIG_I2C_RK3X=y
|
||||
CONFIG_I2C_SLAVE=y
|
||||
@@ -498,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
|
||||
@@ -537,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
|
||||
@@ -546,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
|
||||
@@ -553,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
|
||||
@@ -569,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
|
||||
@@ -580,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
|
||||
@@ -598,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
|
||||
@@ -613,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
|
||||
@@ -636,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
|
||||
@@ -648,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
|
||||
@@ -661,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
|
||||
@@ -672,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
|
||||
@@ -722,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,206 +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": {
|
||||
"enable-nacm": true,
|
||||
"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."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "default-deny-all",
|
||||
"group": [
|
||||
"*"
|
||||
],
|
||||
"rule": [
|
||||
{
|
||||
"name": "deny-password-read",
|
||||
"module-name": "ietf-system",
|
||||
"path": "/ietf-system:system/authentication/user/password",
|
||||
"access-operations": "*",
|
||||
"action": "deny"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"iburst": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"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.2"
|
||||
},
|
||||
"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,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
|
||||
+1
-26
@@ -18,27 +18,7 @@ endchoice
|
||||
config SIGN_KEY
|
||||
string "Signing key"
|
||||
depends on SIGN_ENABLED
|
||||
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development" if SIGN_SRC_DIR
|
||||
|
||||
menuconfig TRUSTED_KEYS
|
||||
bool "Trusted keys for image"
|
||||
depends on SIGN_ENABLED
|
||||
help
|
||||
Keys that will be accepted for this image
|
||||
|
||||
|
||||
config TRUSTED_KEYS_DEVELOPMENT
|
||||
bool "Development key"
|
||||
depends on TRUSTED_KEYS
|
||||
|
||||
config TRUSTED_KEYS_DEVELOPMENT_PATH
|
||||
string
|
||||
depends on TRUSTED_KEYS_DEVELOPMENT
|
||||
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development/infix.crt"
|
||||
|
||||
config TRUSTED_KEYS_EXTRA_PATH
|
||||
string "Path to extra keys to include in image"
|
||||
depends on TRUSTED_KEYS
|
||||
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/dev-key" if SIGN_SRC_DIR
|
||||
|
||||
menuconfig DISK_IMAGE
|
||||
bool "Disk image"
|
||||
@@ -161,8 +141,3 @@ 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 OS — Immutable.Friendly.Secure v24.09.0-rc1 (hvc0)
|
||||
infix-00-00-00 login: admin
|
||||
Password:
|
||||
.-------.
|
||||
| . . | Infix OS — Immutable.Friendly.Secure
|
||||
|-. 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 operating system built around
|
||||
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,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Busybox version: 1.36.1
|
||||
# Sun Feb 9 12:25:37 2025
|
||||
# Busybox version: 1.36.0
|
||||
# Thu Feb 8 08:22:32 2024
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
@@ -17,7 +17,7 @@ CONFIG_SHOW_USAGE=y
|
||||
CONFIG_FEATURE_VERBOSE_USAGE=y
|
||||
# CONFIG_FEATURE_COMPRESS_USAGE is not set
|
||||
CONFIG_LFS=y
|
||||
CONFIG_PAM=y
|
||||
# CONFIG_PAM is not set
|
||||
CONFIG_FEATURE_DEVPTS=y
|
||||
CONFIG_FEATURE_UTMP=y
|
||||
CONFIG_FEATURE_WTMP=y
|
||||
@@ -325,7 +325,7 @@ CONFIG_FEATURE_STAT_FILESYSTEM=y
|
||||
CONFIG_STTY=y
|
||||
CONFIG_SUM=y
|
||||
CONFIG_SYNC=y
|
||||
CONFIG_FEATURE_SYNC_FANCY=y
|
||||
# CONFIG_FEATURE_SYNC_FANCY is not set
|
||||
CONFIG_FSYNC=y
|
||||
# CONFIG_TAC is not set
|
||||
CONFIG_TAIL=y
|
||||
@@ -336,7 +336,7 @@ CONFIG_TEST=y
|
||||
CONFIG_TEST1=y
|
||||
CONFIG_TEST2=y
|
||||
CONFIG_FEATURE_TEST_64=y
|
||||
CONFIG_TIMEOUT=y
|
||||
# CONFIG_TIMEOUT is not set
|
||||
CONFIG_TOUCH=y
|
||||
CONFIG_FEATURE_TOUCH_SUSV3=y
|
||||
CONFIG_TR=y
|
||||
@@ -357,7 +357,7 @@ CONFIG_BASE32=y
|
||||
CONFIG_BASE64=y
|
||||
CONFIG_UUENCODE=y
|
||||
CONFIG_WC=y
|
||||
CONFIG_FEATURE_WC_LARGE=y
|
||||
# CONFIG_FEATURE_WC_LARGE is not set
|
||||
CONFIG_WHO=y
|
||||
CONFIG_W=y
|
||||
CONFIG_USERS=y
|
||||
@@ -957,10 +957,10 @@ CONFIG_FEATURE_NETSTAT_PRG=y
|
||||
CONFIG_NSLOOKUP=y
|
||||
CONFIG_FEATURE_NSLOOKUP_BIG=y
|
||||
CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=y
|
||||
# CONFIG_NTPD is not set
|
||||
# CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
# CONFIG_FEATURE_NTPD_CONF is not set
|
||||
# CONFIG_FEATURE_NTP_AUTH is not set
|
||||
CONFIG_NTPD=y
|
||||
CONFIG_FEATURE_NTPD_SERVER=y
|
||||
CONFIG_FEATURE_NTPD_CONF=y
|
||||
CONFIG_FEATURE_NTP_AUTH=y
|
||||
CONFIG_PING=y
|
||||
CONFIG_PING6=y
|
||||
CONFIG_FEATURE_FANCY_PING=y
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
ifeq ($(SIGN_ENABLED),y)
|
||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/uboot.mk
|
||||
|
||||
TRUSTED_KEYS=$(TRUSTED_KEYS_DEVELOPMENT_PATH) $(TRUSTED_KEYS_EXTRA_PATH)
|
||||
define RAUC_POST_BUILD_INSTALL_CERT
|
||||
@$(call IXMSG,"Installing signing cert for RAUC")
|
||||
mkdir -p $(TARGET_DIR)/etc/rauc/keys
|
||||
$(foreach crt,$(shell ls $(TRUSTED_KEYS)), \
|
||||
$(foreach crt,$(shell ls $(SIGN_KEY)/*.crt), \
|
||||
cp $(crt) $(TARGET_DIR)/etc/rauc/keys/$(shell openssl x509 -hash -noout <$(crt)).0;)
|
||||
|
||||
endef
|
||||
RAUC_POST_BUILD_HOOKS += RAUC_POST_BUILD_INSTALL_CERT
|
||||
endif
|
||||
|
||||
@@ -44,19 +44,16 @@ image @DISKIMG@ {
|
||||
partition aux {
|
||||
offset = @AUXOFFS@
|
||||
image = "aux.ext4"
|
||||
partition-uuid = @AUXUUID@
|
||||
}
|
||||
|
||||
partition primary {
|
||||
image = "rootfs.squashfs"
|
||||
size = @IMGSIZE@
|
||||
partition-uuid = @PRIMARYUUID@
|
||||
}
|
||||
|
||||
partition secondary {
|
||||
image = "rootfs.squashfs"
|
||||
size = @IMGSIZE@
|
||||
partition-uuid = @SECONDARYUUID@
|
||||
}
|
||||
|
||||
partition cfg {
|
||||
|
||||
+2
-11
@@ -16,22 +16,13 @@ die()
|
||||
# DISK_IMAGE_SIZE="512"
|
||||
# etc.
|
||||
#
|
||||
# Nested variables, like INFIX_COMPATIBLE="${INFIX_IMAGE_ID}"
|
||||
# are handled by sourcing the file in a subshell.
|
||||
#
|
||||
# shellcheck disable=SC1090
|
||||
load_cfg()
|
||||
{
|
||||
tmp=$(mktemp -p /tmp)
|
||||
(
|
||||
. "$BR2_CONFIG" 2>/dev/null
|
||||
|
||||
# Set *all* matching variables
|
||||
set | grep -E "^${1}[^=]*=" | while IFS= read -r line; do
|
||||
echo "$line"
|
||||
done
|
||||
) > "$tmp"
|
||||
|
||||
grep -E "${1}.*=" "$BR2_CONFIG" >"$tmp"
|
||||
. "$tmp"
|
||||
|
||||
rm "$tmp"
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
+4
-14
@@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
. $BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/etc/partition-uuid
|
||||
set -e
|
||||
|
||||
K=10
|
||||
M=20
|
||||
@@ -127,7 +126,7 @@ bootdata=
|
||||
diskimg=disk.img
|
||||
bootimg=
|
||||
bootpart=
|
||||
tmpimage=$(mktemp)
|
||||
|
||||
while getopts "a:b:B:n:s:" opt; do
|
||||
case ${opt} in
|
||||
a)
|
||||
@@ -158,15 +157,12 @@ genboot
|
||||
# Use awk over sed because replacement text may contain newlines,
|
||||
# which sed does not approve of.
|
||||
awk \
|
||||
-vauxuuid=$AUX_UUID \
|
||||
-vprimaryuuid=$PRIMARY_UUID \
|
||||
-vsecondaryuuid=$SECONDARY_UUID \
|
||||
-vtotal=$total \
|
||||
-vauxsize=$auxsize -vauxoffs=$auxoffs \
|
||||
-vimgsize=$imgsize \
|
||||
-vcfgsize=$cfgsize \
|
||||
-vvarsize=$varsize \
|
||||
-vdiskimg=$tmpimage \
|
||||
-vdiskimg=$diskimg \
|
||||
-vbootimg="$bootimg" -vbootpart="$bootpart" \
|
||||
'{
|
||||
sub(/@TOTALSIZE@/, total);
|
||||
@@ -178,10 +174,6 @@ awk \
|
||||
sub(/@DISKIMG@/, diskimg);
|
||||
sub(/@BOOTIMG@/, bootimg);
|
||||
sub(/@BOOTPART@/, bootpart);
|
||||
sub(/@AUXUUID@/, auxuuid);
|
||||
sub(/@PRIMARYUUID@/, primaryuuid);
|
||||
sub(/@SECONDARYUUID@/, secondaryuuid);
|
||||
|
||||
}1' \
|
||||
< $common/genimage.cfg.in >$root/genimage.cfg
|
||||
|
||||
@@ -211,7 +203,5 @@ genimage \
|
||||
--rootpath "$root" \
|
||||
--tmppath "$tmp" \
|
||||
--inputpath "$BINARIES_DIR" \
|
||||
--outputpath "$BINARIES_DIR" \
|
||||
--config "$root/genimage.cfg"
|
||||
|
||||
qemu-img convert -c -O qcow2 "$tmpimage" "$BINARIES_DIR/$diskimg"
|
||||
rm "$tmpimage"
|
||||
|
||||
+14
-12
@@ -2,29 +2,31 @@
|
||||
|
||||
set -e
|
||||
|
||||
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}
|
||||
version=${INFIX_VERSION}
|
||||
compatible=infix-${arch}
|
||||
version=${GIT_VERSION}
|
||||
|
||||
[bundle]
|
||||
format=verity
|
||||
@@ -37,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
|
||||
|
||||
+17
-60
@@ -4,49 +4,24 @@ 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
|
||||
|
||||
if [ -n "$INFIX_IMAGE_ID" ]; then
|
||||
NAME="$INFIX_IMAGE_ID"
|
||||
else
|
||||
NAME="$INFIX_ID"-$(echo "$BR2_ARCH" | tr _ - | sed 's/x86-64/x86_64/')
|
||||
if [ -z "$GIT_VERSION" ]; then
|
||||
infix_path="$BR2_EXTERNAL_INFIX_PATH"
|
||||
if [ -n "$INFIX_OEM_PATH" ]; then
|
||||
# Use version from br2-external OEM:ing Infix
|
||||
infix_path="$INFIX_OEM_PATH"
|
||||
fi
|
||||
GIT_VERSION=$(git -C "$infix_path" describe --always --dirty --tags)
|
||||
fi
|
||||
|
||||
if [ -f "$TARGET_DIR/etc/rauc/system.conf" ]; then
|
||||
sed -i "s/compatible=.*/compatible=$INFIX_COMPATIBLE/" "$TARGET_DIR/etc/rauc/system.conf"
|
||||
# Override VERSION in /etc/os-release and filenames for release builds
|
||||
if [ -n "$INFIX_RELEASE" ]; then
|
||||
VERSION="$INFIX_RELEASE"
|
||||
else
|
||||
VERSION=$GIT_VERSION
|
||||
fi
|
||||
|
||||
# This is a symlink to /usr/lib/os-release, so we remove this to keep
|
||||
@@ -55,12 +30,12 @@ rm -f "$TARGET_DIR/etc/os-release"
|
||||
{
|
||||
echo "NAME=\"$INFIX_NAME\""
|
||||
echo "ID=$INFIX_ID"
|
||||
echo "PRETTY_NAME=\"$INFIX_TAGLINE $INFIX_VERSION\""
|
||||
echo "PRETTY_NAME=\"$INFIX_TAGLINE $VERSION\""
|
||||
echo "ID_LIKE=\"${ID}\""
|
||||
echo "DEFAULT_HOSTNAME=$BR2_TARGET_GENERIC_HOSTNAME"
|
||||
echo "VERSION=\"${INFIX_VERSION}\""
|
||||
echo "VERSION_ID=${INFIX_VERSION}"
|
||||
echo "BUILD_ID=\"${INFIX_BUILD_ID}\""
|
||||
echo "VERSION=\"${VERSION}\""
|
||||
echo "VERSION_ID=${VERSION}"
|
||||
echo "BUILD_ID=\"${GIT_VERSION}\""
|
||||
if [ -n "$INFIX_IMAGE_ID" ]; then
|
||||
echo "IMAGE_ID=\"$INFIX_IMAGE_ID\""
|
||||
fi
|
||||
@@ -86,11 +61,7 @@ rm -f "$TARGET_DIR/etc/os-release"
|
||||
fi
|
||||
} > "$TARGET_DIR/etc/os-release"
|
||||
|
||||
echo "$INFIX_TAGLINE $INFIX_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"
|
||||
echo "$INFIX_TAGLINE $VERSION -- $(date +"%b %e %H:%M %Z %Y")" > "$TARGET_DIR/etc/version"
|
||||
|
||||
# Drop Buildroot default symlink to /tmp
|
||||
if [ -L "$TARGET_DIR/var/lib/avahi-autoipd" ]; then
|
||||
@@ -98,9 +69,6 @@ if [ -L "$TARGET_DIR/var/lib/avahi-autoipd" ]; then
|
||||
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
|
||||
@@ -114,17 +82,6 @@ grep -qsE '^/bin/true$$' "$TARGET_DIR/etc/shells" \
|
||||
grep -qsE '^/bin/false$$' "$TARGET_DIR/etc/shells" \
|
||||
|| echo "/bin/false" >> "$TARGET_DIR/etc/shells"
|
||||
|
||||
boards=$(${BR2_EXTERNAL_INFIX_PATH}/board/common/selected-boards.sh ${BR2_EXTERNAL_INFIX_PATH} ${O})
|
||||
|
||||
for board in $boards; do
|
||||
[ ! -f "${BR2_EXTERNAL_INFIX_PATH}/src/board/${board}/post-build.sh" ] && continue
|
||||
${BR2_EXTERNAL_INFIX_PATH}/src/board/${board}/post-build.sh
|
||||
done
|
||||
# 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
|
||||
|
||||
+17
-36
@@ -7,23 +7,17 @@ common=$(dirname "$(readlink -f "$0")")
|
||||
# shellcheck disable=SC1091
|
||||
. "$TARGET_DIR/etc/os-release"
|
||||
|
||||
# The INFIX_* variables may be composed from BR2_* variables,
|
||||
# so we source them last.
|
||||
load_cfg INFIX_ID
|
||||
load_cfg BR2_ARCH
|
||||
load_cfg BR2_DEFCONFIG
|
||||
load_cfg BR2_EXTERNAL_INFIX_PATH
|
||||
load_cfg BR2_TARGET_ROOTFS
|
||||
load_cfg INFIX_ID
|
||||
load_cfg INFIX_COMPATIBLE
|
||||
|
||||
# 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
|
||||
NAME="$INFIX_ID"-$(echo "$BR2_ARCH" | tr _ - | sed 's/x86-64/x86_64/')
|
||||
fi
|
||||
diskimg=disk.qcow2
|
||||
diskimg=disk.img
|
||||
|
||||
ver()
|
||||
{
|
||||
@@ -42,13 +36,13 @@ if [ "$SIGN_ENABLED" = "y" ]; then
|
||||
$common/sign.sh $BR2_ARCH $SIGN_KEY
|
||||
|
||||
ixmsg "Creating RAUC Update Bundle"
|
||||
$common/mkrauc.sh "$NAME$(ver)" $INFIX_COMPATIBLE $SIGN_KEY
|
||||
$common/mkrauc.sh "$NAME$(ver)" $BR2_ARCH $SIGN_KEY
|
||||
fi
|
||||
|
||||
load_cfg DISK_IMAGE
|
||||
if [ "$DISK_IMAGE" = "y" ]; then
|
||||
ixmsg "Creating Disk Image"
|
||||
diskimg="${NAME}-disk$(ver).qcow2"
|
||||
diskimg="${NAME}-disk$(ver).img"
|
||||
bootcfg=
|
||||
if [ "$DISK_IMAGE_BOOT_DATA" ]; then
|
||||
bootcfg="-b $DISK_IMAGE_BOOT_DATA -B $DISK_IMAGE_BOOT_OFFSET"
|
||||
@@ -66,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"
|
||||
@@ -86,27 +72,22 @@ if [ "$FIT_IMAGE" = "y" ]; then
|
||||
$common/mkfit.sh
|
||||
fi
|
||||
|
||||
# Only for regular builds, not bootloader-only builds
|
||||
if [ "$BR2_TARGET_ROOTFS_SQUASHFS" = "y" ]; then
|
||||
rel=$(ver)
|
||||
ln -sf rootfs.squashfs "$BINARIES_DIR/${NAME}${rel}.img"
|
||||
if [ -n "$rel" ]; then
|
||||
ln -sf "${NAME}${rel}.img" "$BINARIES_DIR/${NAME}.img"
|
||||
ln -sf "$BINARIES_DIR/${NAME}${rel}.img" "$BINARIES_DIR/${NAME}.img"
|
||||
fi
|
||||
|
||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/usr/bin/onieprom" "$BINARIES_DIR/"
|
||||
|
||||
# Menuconfig support for modifying Qemu args in release tarballs
|
||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/qemu.sh" "$BINARIES_DIR/"
|
||||
sed -e "s/@ARCH@/QEMU_$BR2_ARCH/" \
|
||||
-e "s/@DISK_IMG@/$diskimg/" \
|
||||
< "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/Config.in.in" \
|
||||
> "$BINARIES_DIR/Config.in"
|
||||
rm -f "$BINARIES_DIR/qemu.cfg"
|
||||
CONFIG_="CONFIG_" BR2_CONFIG="$BINARIES_DIR/qemu.cfg" \
|
||||
"$O/build/buildroot-config/conf" --olddefconfig "$BINARIES_DIR/Config.in"
|
||||
rm -f "$BINARIES_DIR/qemu.cfg.old" "$BINARIES_DIR/.config.old"
|
||||
|
||||
# Quick intro for beginners, with links to more information
|
||||
cp "$BR2_EXTERNAL_INFIX_PATH/board/common/README.txt" "$BINARIES_DIR/"
|
||||
fi
|
||||
|
||||
# Menuconfig support for modifying Qemu args in release tarballs
|
||||
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/" \
|
||||
< "$BR2_EXTERNAL_INFIX_PATH/board/common/qemu/Config.in.in" \
|
||||
> "$BINARIES_DIR/Config.in"
|
||||
rm -f "$BINARIES_DIR/qemu.cfg"
|
||||
CONFIG_="CONFIG_" BR2_CONFIG="$BINARIES_DIR/qemu.cfg" \
|
||||
"$O/build/buildroot-config/conf" --olddefconfig "$BINARIES_DIR/Config.in"
|
||||
rm -f "$BINARIES_DIR/qemu.cfg.old" "$BINARIES_DIR/.config.old"
|
||||
|
||||
@@ -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
|
||||
@@ -58,15 +54,16 @@ choice
|
||||
|
||||
config QEMU_CONSOLE_VIRTIO
|
||||
bool "Virtio (hvc0)"
|
||||
depends on QEMU_LOADER_KERNEL
|
||||
|
||||
config QEMU_CONSOLE_SERIAL
|
||||
bool "Serial (ttyS0/ttyAMA0)"
|
||||
depends on !QEMU_LOADER_OVMF
|
||||
|
||||
endchoice
|
||||
|
||||
config QEMU_MACHINE
|
||||
string "Select emulated machine"
|
||||
default "qemu-system-aarch64 -M virt,accel=kvm:tcg -cpu max,pauth-impdef=on" if QEMU_aarch64
|
||||
default "qemu-system-aarch64 -M virt,accel=kvm:tcg -cpu max" if QEMU_aarch64
|
||||
default "qemu-system-x86_64 -M pc,accel=kvm:tcg -cpu max" if QEMU_x86_64
|
||||
help
|
||||
You should not have to change this setting, although you may
|
||||
@@ -78,7 +75,7 @@ config QEMU_MACHINE
|
||||
|
||||
config QEMU_MACHINE_RAM
|
||||
string "RAM size (k/M/G)"
|
||||
default "448M"
|
||||
default "384M"
|
||||
help
|
||||
The default, 384 MiB, works for most configurations. However,
|
||||
if you get kernel panic with: "System is deadlocked on memory",
|
||||
@@ -106,27 +103,21 @@ config QEMU_DTB_EXTEND
|
||||
depends on QEMU_LOADER_UBOOT
|
||||
default y if QEMU_aarch64
|
||||
|
||||
if QEMU_ROOTFS_INITRD
|
||||
|
||||
config QEMU_RW
|
||||
string "Writable /cfg layer"
|
||||
depends on QEMU_ROOTFS_INITRD
|
||||
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"
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
config QEMU_VPD
|
||||
bool "Emulate a Vital Product Data (VPD) Memory"
|
||||
|
||||
@@ -141,55 +132,10 @@ config QEMU_APPEND
|
||||
config QEMU_EXTRA
|
||||
string "Extra QEMU options"
|
||||
|
||||
|
||||
comment "RTC"
|
||||
|
||||
choice
|
||||
prompt "Mode"
|
||||
default QEMU_RTC_UTC
|
||||
|
||||
config QEMU_RTC_UTC
|
||||
bool "UTC"
|
||||
|
||||
config QEMU_RTC_LOCAL
|
||||
bool "Local time"
|
||||
|
||||
config QEMU_RTC_RANDOM
|
||||
bool "Random"
|
||||
|
||||
endchoice
|
||||
|
||||
choice
|
||||
prompt "Clock"
|
||||
default QEMU_CLOCK_HOST
|
||||
|
||||
config QEMU_CLOCK_HOST
|
||||
bool "Host clock"
|
||||
|
||||
config QEMU_CLOCK_RT
|
||||
bool "Independent (monotonic)"
|
||||
|
||||
config QEMU_CLOCK_VM
|
||||
bool "Virtual"
|
||||
|
||||
endchoice
|
||||
|
||||
config QEMU_RTC
|
||||
string
|
||||
default "utc" if QEMU_RTC_UTC
|
||||
default "localtime" if QEMU_RTC_LOCAL
|
||||
default "random" if QEMU_RTC_RANDOM
|
||||
|
||||
config QEMU_CLOCK
|
||||
string
|
||||
default "host" if QEMU_CLOCK_HOST
|
||||
default "rt" if QEMU_CLOCK_RT
|
||||
default "vm" if QEMU_CLOCK_VM
|
||||
|
||||
comment "Networking"
|
||||
|
||||
choice
|
||||
prompt "Network Mode"
|
||||
prompt "Mode"
|
||||
default QEMU_NET_USER
|
||||
|
||||
config QEMU_NET_NONE
|
||||
@@ -204,9 +150,6 @@ config QEMU_NET_USER
|
||||
config QEMU_NET_TAP
|
||||
bool "TAP"
|
||||
|
||||
config QEMU_NET_ROCKER
|
||||
bool "Rocker"
|
||||
|
||||
endchoice
|
||||
|
||||
config QEMU_NET_MODEL
|
||||
@@ -232,8 +175,3 @@ config QEMU_NET_TAP_N
|
||||
int "Number of TAPs"
|
||||
depends on QEMU_NET_TAP
|
||||
default 1
|
||||
|
||||
config QEMU_NET_PORTS
|
||||
int "Number of Rocker switch ports"
|
||||
depends on QEMU_NET_ROCKER
|
||||
default 10
|
||||
|
||||
+39
-131
@@ -17,10 +17,9 @@
|
||||
#
|
||||
# ./qemu.sh -h
|
||||
#
|
||||
# shellcheck disable=SC3037
|
||||
|
||||
# Local variables
|
||||
imgdir=$(readlink -f "$(dirname "$0")")
|
||||
imgdir=$(readlink -f $(dirname "$0"))
|
||||
prognm=$(basename "$0")
|
||||
|
||||
usage()
|
||||
@@ -31,7 +30,6 @@ usage()
|
||||
echo "Options:"
|
||||
echo " -c Run menuconfig to change Qemu settings"
|
||||
echo " -h This help text"
|
||||
echo " -k Keep generated qemu.run script (name shown at end)"
|
||||
echo
|
||||
echo "Arguments:"
|
||||
echo " ARGS1 Args before the '--' separator are for kernel space"
|
||||
@@ -56,20 +54,19 @@ die()
|
||||
|
||||
load_qemucfg()
|
||||
{
|
||||
tmp=$(mktemp -p /tmp)
|
||||
local tmp=$(mktemp -p /tmp)
|
||||
|
||||
grep ^CONFIG_QEMU_ "$1" >"$tmp"
|
||||
# shellcheck disable=SC1090
|
||||
. "$tmp"
|
||||
rm "$tmp"
|
||||
grep ^CONFIG_QEMU_ $1 >$tmp
|
||||
. $tmp
|
||||
rm $tmp
|
||||
|
||||
[ "$CONFIG_QEMU_MACHINE" ] || die "Missing QEMU_MACHINE"
|
||||
[ "$CONFIG_QEMU_ROOTFS" ] || die "Missing QEMU_ROOTFS"
|
||||
|
||||
[ -n "$CONFIG_QEMU_KERNEL" ] && [ -n "$CONFIG_QEMU_BIOS" ] \
|
||||
[ "$CONFIG_QEMU_KERNEL" -a "$CONFIG_QEMU_BIOS" ] \
|
||||
&& die "QEMU_KERNEL conflicts with QEMU_BIOS"
|
||||
|
||||
[ -z "$CONFIG_QEMU_KERNEL" ] && [ -z "$CONFIG_QEMU_BIOS" ] \
|
||||
[ ! "$CONFIG_QEMU_KERNEL" -a ! "$CONFIG_QEMU_BIOS" ] \
|
||||
&& die "QEMU_KERNEL or QEMU_BIOS must be set"
|
||||
}
|
||||
|
||||
@@ -96,7 +93,7 @@ append_args()
|
||||
|
||||
if [ "$CONFIG_QEMU_ROOTFS_INITRD" = "y" ]; then
|
||||
# Size of initrd, rounded up to nearest kb
|
||||
size=$((($(stat -c %s "$CONFIG_QEMU_ROOTFS") + 1023) >> 10))
|
||||
local size=$((($(stat -c %s $CONFIG_QEMU_ROOTFS) + 1023) >> 10))
|
||||
echo -n "root=/dev/ram0 ramdisk_size=${size} "
|
||||
elif [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
||||
echo -n "root=PARTLABEL=primary "
|
||||
@@ -120,7 +117,7 @@ rootfs_args()
|
||||
echo -n "-device sd-card,drive=mmc "
|
||||
echo -n "-drive id=mmc,file=$CONFIG_QEMU_ROOTFS,if=none,format=raw "
|
||||
elif [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
||||
echo -n "-drive file=qemu.qcow2,if=virtio,format=qcow2,bus=0,unit=0 "
|
||||
echo -n "-drive file=$CONFIG_QEMU_ROOTFS,if=virtio,format=raw,bus=0,unit=0 "
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -149,31 +146,16 @@ 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 "-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 "
|
||||
[ "$CONFIG_QEMU_RW" ] || return
|
||||
|
||||
if ! [ -f "$CONFIG_QEMU_RW" ]; then
|
||||
dd if=/dev/zero of="$CONFIG_QEMU_RW" bs=16M count=1 >/dev/null 2>&1
|
||||
@@ -184,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
|
||||
|
||||
@@ -201,24 +183,13 @@ host_args()
|
||||
|
||||
net_dev_args()
|
||||
{
|
||||
name="e$1"
|
||||
mac=$(printf "02:00:00:00:00:%02x" "$1")
|
||||
local name="e$1"
|
||||
local mac=$(printf "02:00:00:00:00:%02x" $1)
|
||||
|
||||
echo -n "-device $CONFIG_QEMU_NET_MODEL,netdev=$name,mac=$mac "
|
||||
echo "$name $mac" >>"$mactab"
|
||||
}
|
||||
|
||||
rocker_port_args()
|
||||
{
|
||||
sw=$1
|
||||
port=$2
|
||||
name="sw${sw}p${port}"
|
||||
mac=$(printf "02:00:00:00:%02x:%02x" "$sw" "$port")
|
||||
|
||||
echo -n "-netdev tap,id=$name,ifname=$name,script=no,downscript=no "
|
||||
echo "$name $mac" >> "$mactab"
|
||||
}
|
||||
|
||||
net_args()
|
||||
{
|
||||
# Infix will pick up this file via fwcfg and install it to /etc
|
||||
@@ -227,30 +198,19 @@ 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
|
||||
elif [ "$CONFIG_QEMU_NET_ROCKER" = "y" ]; then
|
||||
sw=sw0 # Only single switch support atm.
|
||||
echo -n "-device '{\"driver\":\"rocker\", \"name\":\"${sw}\", "
|
||||
echo -n "\"fp_start_macaddr\":\"02:00:00:00:00:01\", "
|
||||
echo -n "\"ports\":["
|
||||
for i in $(seq 1 "$CONFIG_QEMU_NET_PORTS"); do
|
||||
[ "$i" -gt 1 ] && echo -n ", "
|
||||
echo -n "\"${sw}p${i}\""
|
||||
done
|
||||
echo -n "]}' "
|
||||
for i in $(seq 1 "$CONFIG_QEMU_NET_PORTS"); do
|
||||
rocker_port_args 0 "$i"
|
||||
net_dev_args $i
|
||||
done
|
||||
elif [ "$CONFIG_QEMU_NET_USER" = "y" ]; then
|
||||
local useropts=
|
||||
[ "$CONFIG_QEMU_NET_USER_OPTS" ] && useropts=",$CONFIG_QEMU_NET_USER_OPTS"
|
||||
echo -n "-netdev user,id=e1${useropts} "
|
||||
net_dev_args 1
|
||||
|
||||
echo -n "-netdev user,id=e0${useropts} "
|
||||
net_dev_args 0
|
||||
else
|
||||
echo -n "-nic none"
|
||||
fi
|
||||
@@ -286,48 +246,14 @@ EOF
|
||||
|
||||
wdt_args()
|
||||
{
|
||||
echo -n "-device i6300esb "
|
||||
}
|
||||
|
||||
random_date()
|
||||
{
|
||||
rand=$(($(date +%_s) * $$ + $(date +%N | sed 's/^0*//')))
|
||||
when=$((rand % 7258118400)) # 1970 - 2200
|
||||
date -d "@$when" +"%Y-%m-%dT%H:%M:%S"
|
||||
}
|
||||
|
||||
rtc_args()
|
||||
{
|
||||
rtc="${CONFIG_QEMU_RTC:-utc}"
|
||||
clock="${CONFIG_QEMU_CLOCK:-host}"
|
||||
if [ "$rtc" = "random" ]; then
|
||||
rtc=$(random_date)
|
||||
fi
|
||||
|
||||
echo -n "-rtc base=$rtc,clock=$clock"
|
||||
}
|
||||
|
||||
gdb_args()
|
||||
{
|
||||
echo -n "-chardev socket,id=gdbqemu,path=gdbqemu.sock,server=on,wait=off "
|
||||
echo -n "-gdb chardev:gdbqemu"
|
||||
echo -n "-device i6300esb -rtc clock=host"
|
||||
}
|
||||
|
||||
run_qemu()
|
||||
{
|
||||
if [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
||||
if ! qemu-img check "qemu.qcow2"; then
|
||||
rm -f "qemu.qcow2"
|
||||
fi
|
||||
if [ ! -f "qemu.qcow2" ]; then
|
||||
echo "Creating qcow2 disk image for Qemu ..."
|
||||
qemu-img create -f qcow2 -o backing_file="$CONFIG_QEMU_ROOTFS" \
|
||||
-F qcow2 "qemu.qcow2" > /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
read -r qemu <<EOF
|
||||
$CONFIG_QEMU_MACHINE -nodefaults -m $CONFIG_QEMU_MACHINE_RAM \
|
||||
local qemu
|
||||
read qemu <<EOF
|
||||
$CONFIG_QEMU_MACHINE -m $CONFIG_QEMU_MACHINE_RAM \
|
||||
$(loader_args) \
|
||||
$(rootfs_args) \
|
||||
$(serial_args) \
|
||||
@@ -336,32 +262,14 @@ run_qemu()
|
||||
$(host_args) \
|
||||
$(net_args) \
|
||||
$(wdt_args) \
|
||||
$(rtc_args) \
|
||||
$(vpd_args) \
|
||||
$(gdb_args) \
|
||||
$CONFIG_QEMU_EXTRA
|
||||
EOF
|
||||
# Save resulting command to a script, because I cannot for the life
|
||||
# of me figure out how to embed the JSON snippet for Rocker and run
|
||||
# it here without issues, spent way too much time on it -- Joachim
|
||||
run=$(mktemp -t run.qemu.XXX)
|
||||
echo "#!/bin/sh" > "$run"
|
||||
if [ "$CONFIG_QEMU_KERNEL" ]; then
|
||||
echo "$qemu -append \"$(append_args)\" $*" >> "$run"
|
||||
else
|
||||
echo "$qemu $*" >> "$run"
|
||||
fi
|
||||
chmod +x "$run"
|
||||
|
||||
echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor"
|
||||
line=$(stty -g)
|
||||
stty raw
|
||||
$run
|
||||
stty "$line"
|
||||
if [ -n "$keep" ]; then
|
||||
echo "Keeping generated qemu.run script: $run"
|
||||
if [ "$CONFIG_QEMU_KERNEL" ]; then
|
||||
$qemu -append "$(append_args)" "$@"
|
||||
else
|
||||
rm "$run"
|
||||
$qemu "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -395,10 +303,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;"
|
||||
@@ -438,8 +346,7 @@ menuconfig()
|
||||
exec kconfig-mconf Config.in
|
||||
}
|
||||
|
||||
scriptdir=$(dirname "$(readlink -f "$0")")
|
||||
cd "$scriptdir" || (echo "Failed cd to $scriptdir"; exit 1)
|
||||
cd $(dirname $(readlink -f "$0"))
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
@@ -449,9 +356,6 @@ while [ "$1" != "" ]; do
|
||||
-h)
|
||||
usage
|
||||
;;
|
||||
-k)
|
||||
keep=true
|
||||
;;
|
||||
*)
|
||||
break
|
||||
esac
|
||||
@@ -472,4 +376,8 @@ fi
|
||||
|
||||
generate_dot
|
||||
|
||||
echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor"
|
||||
line=$(stty -g)
|
||||
stty raw
|
||||
run_qemu $(dtb_args)
|
||||
stty "$line"
|
||||
|
||||
@@ -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
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
sleep 30
|
||||
|
||||
stress-ng --cpu 8 --io 4 --vm 2 --vm-bytes 128M --fork 4 -t 0
|
||||
Executable
+76
@@ -0,0 +1,76 @@
|
||||
#!/bin/sh
|
||||
|
||||
tstamp()
|
||||
{
|
||||
if [ "$1" = "head" ]; then
|
||||
printf '%9s' time
|
||||
else
|
||||
printf '%9s' $(date +%T)
|
||||
fi
|
||||
}
|
||||
|
||||
thermal()
|
||||
{
|
||||
for th in /sys/class/thermal/thermal_zone*; do
|
||||
if [ "$1" = "head" ]; then
|
||||
printf '%5s' $(cat $th/type | \
|
||||
sed -e 's/-thermal//' -e 's/ap-cpu/cpu/' -e 's/-ic//')
|
||||
else
|
||||
printf '%5d' \
|
||||
$((($(cat $th/temp) + 500) / 1000))
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
hwmon()
|
||||
{
|
||||
for hw in /sys/class/hwmon/*; do
|
||||
[ -f $hw/temp1_input ] || continue
|
||||
|
||||
if [ "$1" = "head" ]; then
|
||||
printf '%5s' \
|
||||
$(cat $hw/name | sed -e 's/cp0configspacef2000000mdio12a200switch0mdio0/p/' -e 's/f212a600mdiomii0/xp/')
|
||||
else
|
||||
printf '%5d' \
|
||||
$((($(cat $hw/temp1_input) + 500) / 1000))
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
xphys()
|
||||
{
|
||||
for xphy in 4 5; do
|
||||
mdio f212a6* $xphy:31 0xf08a 0x4d00
|
||||
|
||||
if [ "$1" = "head" ]; then
|
||||
printf '%5s' \
|
||||
p$((xphy + 5))
|
||||
else
|
||||
printf '%5d' \
|
||||
$(($(mdio f212a6* $xphy:31 0xf08a) & 0xff - 75))
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$1" != "-H" ]; then
|
||||
# tstamp head
|
||||
thermal head
|
||||
hwmon head
|
||||
# xphys head
|
||||
echo
|
||||
fi
|
||||
|
||||
while :; do
|
||||
# tstamp
|
||||
thermal
|
||||
hwmon
|
||||
# xphys
|
||||
echo
|
||||
|
||||
if [ "$1" == "-n" ]; then
|
||||
sleep ${2:-10}
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -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
|
||||
@@ -10,27 +30,59 @@
|
||||
|
||||
PATH="$PATH:/usr/bin:/usr/sbin:/bin:/sbin"
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
log "set ipv4ll $3 on iface $2"
|
||||
;;
|
||||
METRIC=$((1000 + `cat "/sys/class/net/$2/ifindex" 2>/dev/null || echo 0`))
|
||||
|
||||
CONFLICT|UNBIND|STOP)
|
||||
ip addr flush dev "$2" proto random
|
||||
log "clr ipv4ll on iface $2"
|
||||
;;
|
||||
if [ -x /bin/ip -o -x /sbin/ip ] ; then
|
||||
|
||||
*)
|
||||
log "Unknown event $1 on iface $2"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
# 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
|
||||
|
||||
elif [ -x /bin/ifconfig -o -x /sbin/ifconfig ] ; then
|
||||
|
||||
# We have the old ifconfig tool
|
||||
|
||||
case "$1" in
|
||||
BIND)
|
||||
ifconfig "$2:avahi" inet "$3" netmask 255.255.0.0 broadcast 169.254.255.255 up
|
||||
route add default dev "$2:avahi" metric "$METRIC" ||:
|
||||
;;
|
||||
|
||||
CONFLICT|STOP|UNBIND)
|
||||
route del default dev "$2:avahi" metric "$METRIC" ||:
|
||||
ifconfig "$2:avahi" down
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown event $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
echo "No network configuration tool found." >&2
|
||||
exit 1
|
||||
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -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,2 +0,0 @@
|
||||
# --log-level debug
|
||||
OSPFD_ARGS="-A 127.0.0.1 -u frr -g frr -f /etc/frr/ospfd.conf --log syslog"
|
||||
@@ -1 +0,0 @@
|
||||
RAUC_ARGS="-s"
|
||||
@@ -1,2 +0,0 @@
|
||||
# --log-level debug
|
||||
ZEBRA_ARGS="-A 127.0.0.1 -u frr -g frr --log syslog "
|
||||
@@ -3,19 +3,16 @@
|
||||
# and similar events feed servers and configuration to dnsmasq.
|
||||
domain-needed
|
||||
|
||||
# Allow configuration and cache clear over D-Bus
|
||||
enable-dbus
|
||||
# Only listen to loopback (local system)
|
||||
interface=lo
|
||||
bind-dynamic
|
||||
#listen-address=127.0.0.1,::1
|
||||
|
||||
# Disable the following dnsmasq default DHCP options
|
||||
#dhcp-option=option:netmask
|
||||
#dhcp-option=28 # option:broadcast
|
||||
#dhcp-option=option:domain-name
|
||||
dhcp-option=option:router
|
||||
dhcp-option=option:dns-server
|
||||
dhcp-option=12 # option:hostname
|
||||
enable-dbus
|
||||
|
||||
# Generated by openresolv
|
||||
resolv-file=/var/lib/misc/resolv.conf
|
||||
|
||||
# Include all files in a directory which end in .conf
|
||||
conf-dir=/etc/dnsmasq.d/,*.conf
|
||||
|
||||
|
||||
@@ -1,3 +1,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,7 +1,4 @@
|
||||
# Start a container instance (%i) and redirect logs to /log/container
|
||||
# Give podman enough time to properly shut down the container, kill:30
|
||||
# The pre:script, which is responsibe for fetching a remote image, must
|
||||
# not have a timeout. The cleanup should take no longer than a minute.
|
||||
sysv log:prio:local1,tag:%i kill:30 pid:!/run/container:%i.pid \
|
||||
pre:0,/usr/sbin/container cleanup:60,/usr/sbin/container \
|
||||
[2345] <!> :%i container -n %i -- container %i
|
||||
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> 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,9 +0,0 @@
|
||||
# A single mstpd instance can manage multiple bridges, which are
|
||||
# dynamically added/removed by the kernel via the /sbin/bridge-stp
|
||||
# usermode helper. We use a manual service so that confd can
|
||||
# enable/disable it without an initctl barrier, since it needs to
|
||||
# already be running when a bridge interface with spanning tree
|
||||
# enabled is created.
|
||||
|
||||
service env:-/etc/default/mstpd manual:yes \
|
||||
[S0123456789] mstpd $MSTPD_ARGS -- Spanning Tree daemon
|
||||
@@ -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,4 +0,0 @@
|
||||
# Use <pid/syslogd> as barrier for other system tasks and service that
|
||||
# rely on modules, firmware, and device nodes to be ready.
|
||||
service if:udevd nowarn env:-/etc/default/sysklogd <run/udevadm:post/success> \
|
||||
[S0123456789] syslogd -F $SYSLOGD_ARGS -- System log daemon
|
||||
@@ -0,0 +1,3 @@
|
||||
service [2345789] log:/var/log/temp.log /bin/temp.sh -n 10 -- Temperature monitor
|
||||
service [2345789] log:/var/log/load.log /bin/load.sh -- CPU load generator
|
||||
service [2345789] log:/var/log/memtester.log /usr/bin/memtester 1G -- Memory load generator
|
||||
@@ -1 +1 @@
|
||||
service [2345] <!> ttyd -i lo -W -p 8001 login -- Web terminal daemon (ttyd)
|
||||
service [2345] <!> ttyd -i lo -p 8001 login -- Web terminal daemon (ttyd)
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
service name:wpa_supplicant :%i \
|
||||
[2345] wpa_supplicant -s -i %i -c /etc/wpa_supplicant-%i.conf -P/var/run/wpa_supplicant-%i.pid \
|
||||
-- WPA supplicant @%i
|
||||
|
||||
task name:wifi-scanner :%i [2345] <pid/wpa_supplicant:%i> /usr/libexec/infix/wifi-scanner %i -- Start scanning for SSID @ %i
|
||||
@@ -1 +0,0 @@
|
||||
../available/mstpd.conf
|
||||
@@ -0,0 +1 @@
|
||||
../available/temp.conf
|
||||
@@ -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 +0,0 @@
|
||||
/var/lib/dbus/machine-id
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user