mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-02 22:03:01 +02:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
226ea49e7c | ||
|
|
cb633a78d6 | ||
|
|
d2e55eadf8 | ||
|
|
70d51420c9 | ||
|
|
1e80b20856 | ||
|
|
918353dcc7 | ||
|
|
d53a35b867 | ||
|
|
331f60be64 |
+29
-27
@@ -3,39 +3,41 @@ Checklists for Pull Requests and Releases
|
|||||||
|
|
||||||
Maintainer checklists for reviewing pull requests and doing releases.
|
Maintainer checklists for reviewing pull requests and doing releases.
|
||||||
|
|
||||||
|
|
||||||
Pull Requests
|
Pull Requests
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
- If applicable, is there a readable ChangeLog entry?
|
- If applicable, is there a readable ChangeLog entry?
|
||||||
- If any LICENSE file has been updated, has the `.hash` file been updated?
|
- 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?
|
- 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
|
I.e., is there a runlevel and/or condition defined to prevent them
|
||||||
from running outside of their intended runlevel?
|
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 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 u-boot/buildroot, has it been tested with `<booloader>_defconfig`
|
||||||
- If any change to logging, have the resulting logs been audited?
|
- If any change to logging, have the resulting logs been audited?
|
||||||
- Check for duplicate entries, misspellings
|
- Check for duplicate entries, misspellings
|
||||||
- Check for sneaky severity changes, e.g., error vs note, error vs warning
|
- 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 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 mDNS, has it been tested with netbrowse?
|
||||||
- If change to `_defconfig`, verify `local.mk` and sync with other archs
|
- 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
|
- 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
|
- Build from distclean, or use artifacts built by build servers, for manual tests
|
||||||
|
|
||||||
|
|
||||||
Releases
|
Releases
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Recommended checkpoints, use at your own discretion:
|
Recommended checkpoints, use at your own discretion:
|
||||||
|
|
||||||
- Make at least one -betaN release to verify the GitHub workflow well in time release day
|
- Make at least one -betaN release to verify the GitHub workflow well in time release day
|
||||||
- Stuff happens, remember kernelkit/infix#735
|
- Stuff happens, remember kernelkit/infix#735
|
||||||
- Make at least one -rcN to flush out any issues in customer repos
|
- 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
|
- Easy to forget adaptations/hacks in customer repos -- may need Infix change/support
|
||||||
- Verify release artifacts (checksums, completeness, no corrupted files)
|
- Verify release artifacts (checksums, completeness, no corrupted files)
|
||||||
- Test on actual hardware for at least one architecture
|
- Test on actual hardware for at least one architecture
|
||||||
- Review ChangeLog for completeness
|
- Review ChangeLog for completeness
|
||||||
- Check for release-blocking issues
|
- Check for release-blocking issues
|
||||||
- Verify generated GNS3 appliance, no marketplace update on -rc builds
|
- Verify generated GNS3 appliance, no marketplace update on -rc builds
|
||||||
- Ensure the markdown link for the release diff is updated
|
- Ensure the markdown link for the release diff is updated
|
||||||
- Ensure subrepos are tagged (can be automated, see kernelkit/infix#393)
|
- Ensure subrepos are tagged (can be automated, see kernelkit/infix#393)
|
||||||
- Sync tags for all repo. sync activities
|
- Sync tags for all repo. sync activities
|
||||||
|
|||||||
+64
-154
@@ -9,15 +9,15 @@ forms of collaboration as well. [Let's talk!][support] :handshake:
|
|||||||
|
|
||||||
If you are unsure how to start implementing an idea or fix:
|
If you are unsure how to start implementing an idea or fix:
|
||||||
|
|
||||||
- :bug: open an issue, there are human friendly templates for _bugs_
|
- :bug: open an issue, there are human friendly templates for _bugs_
|
||||||
and _feature requests_ at <https://github.com/kernelkit/infix/issues>
|
and _feature requests_ at <https://github.com/kernelkit/infix/issues>
|
||||||
- :speech_balloon: use the [Q&A Forum][discuss]
|
- :speech_balloon: use the [Q&A Forum][discuss]
|
||||||
- :technologist: The [Developer's Guide][devguide] is also a useful start
|
- :technologist: The [Developer's Guide][devguide] is also a useful start
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> _Talking about code and problems first is often the best way to get
|
||||||
> Talking about code and problems first is often the best way to get
|
|
||||||
> started before submitting a pull request. We have found it always
|
> started before submitting a pull request. We have found it always
|
||||||
> saves time, yours and ours.
|
> saves time, yours and ours._
|
||||||
|
|
||||||
|
|
||||||
:sparkles: General Guidelines
|
:sparkles: General Guidelines
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@@ -27,20 +27,21 @@ 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
|
*why* -- from your perspective, why is it a bug, why does the code need
|
||||||
changing in this way. Start with why.
|
changing in this way. Start with why.
|
||||||
|
|
||||||
- :bug: Bug reports need metadata like Infix version or commit hash
|
- :bug: Bug reports need metadata like Infix version or commit hash
|
||||||
- :adhesive_bandage: Bug fixes also need version, and (preferably) a
|
- :adhesive_bandage: Bug fixes also need version, and (preferably) a
|
||||||
corresponding issue number for the ChangeLog
|
corresponding issue number for the ChangeLog
|
||||||
- :new: New features, you need to get approval of the YANG model first!
|
- :new: New features, you need to get approval of the YANG model first!
|
||||||
:speech_balloon: Please use the [Forum][discuss], e.g., category:
|
:speech_balloon: Please use the [Forum][discuss], e.g., category:
|
||||||
*Ideas*, or open a :pray: feature request issue
|
*Ideas*, or open a :pray: feature request issue
|
||||||
- :white_check_mark: New features also need new regression tests, this
|
- :white_check_mark: New features also need new regression tests, this
|
||||||
can be basic tests or more complex use-case tests comprising multiple
|
can be basic tests or more complex use-case tests comprising multiple
|
||||||
subsystems, see [Testing Changes](#test_tube-testing-changes), below
|
subsystems, see [Testing Changes](#test_tube-testing-changes), below
|
||||||
|
|
||||||
Please take care to ensure you follow the project coding style and the
|
Please take care to ensure you follow the project coding style and the
|
||||||
commit message format. If you follow these recommendations you help
|
commit message format. If you follow these recommendations you help
|
||||||
the maintainers and make it easier for them to include your code.
|
the maintainers and make it easier for them to include your code.
|
||||||
|
|
||||||
|
|
||||||
:woman_technologist: Coding Style
|
:woman_technologist: Coding Style
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
@@ -50,40 +51,39 @@ and it is expected that you provide a human-readable summary for the
|
|||||||
release notes (ChangeLog) and at least a configuration example in the
|
release notes (ChangeLog) and at least a configuration example in the
|
||||||
manual for new features.
|
manual for new features.
|
||||||
|
|
||||||
> [!TIP]
|
> **Tip:** consider ["Readme driven development"][RDD] for new features.
|
||||||
> Consider ["Readme driven development"][RDD] for new features. It is
|
> It is amazing how many flaws in your own bright ideas come to bare
|
||||||
> amazing how many flaws in your own bright ideas come to bare when you
|
> when you suddenly have to explain them to someone else!
|
||||||
> suddenly have to explain them to someone else!
|
|
||||||
|
|
||||||
We expect code contributions for:
|
We expect code contributions for:
|
||||||
|
|
||||||
- C code in [Linux Coding Style][Linux]
|
- C code in [Linux Coding Style][Linux]
|
||||||
- Python code should follow [PEP-8][]
|
- Python code should follow [PEP-8][]
|
||||||
|
|
||||||
> [!IMPORTANT]
|
|
||||||
> **However,** always submit code that follows the style of surrounding
|
> **However,** always submit code that follows the style of surrounding
|
||||||
> code! Legacy takes precedence, and remember, we read code a lot more
|
> code! Legacy takes precedence, and remember, we read code a lot more
|
||||||
> than write it, so legibility is important.
|
> than write it, so legibility is important.
|
||||||
|
|
||||||
The ChangeLog deserves a separate mention:
|
The ChangeLog deserves a separate mention:
|
||||||
|
|
||||||
- Releases are listed in reverse chronological order order, so the
|
- Releases are listed in reverse chronological order order, so the
|
||||||
latest/next release is at the beginning of the file
|
latest/next release is at the beginning of the file
|
||||||
- Only *user-facing bugs and features* are detailed, so code refactor,
|
- Only *user-facing bugs and features* are detailed, so code refactor,
|
||||||
new tests, etc. are not listed.
|
new tests, etc. are not listed.
|
||||||
- Add your changes/features to the Changes section
|
- Add your changes/features to the Changes section
|
||||||
- Add your Fix line in the Fixes section, in numeric order
|
- Add your Fix line in the Fixes section, in numeric order
|
||||||
- Changes and fixes without an issue number are listed after all
|
- Changes and fixes without an issue number are listed after all
|
||||||
numbered ones
|
numbered ones
|
||||||
- YANG model changes are documented in their respective model, for
|
- YANG model changes are documented in their respective model, for
|
||||||
standard models, e.g., for `ietf-interfaces.yang`, the corresponding
|
standard models, e.g., for `ietf-interfaces.yang`, the corresponding
|
||||||
`infix-interfaces.yang` detail augments/deviations as revisions.
|
`infix-interfaces.yang` detail augments/deviations as revisions.
|
||||||
|
|
||||||
A final note, lines of code are allowed to be longer than 72 characters
|
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
|
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
|
maximum, but the team usually keep it around 100 characters for both C
|
||||||
and Python.
|
and Python.
|
||||||
|
|
||||||
|
|
||||||
:test_tube: Testing Changes
|
:test_tube: Testing Changes
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
@@ -97,8 +97,9 @@ the same pull request.
|
|||||||
|
|
||||||
For help getting started with testing, see the following resources:
|
For help getting started with testing, see the following resources:
|
||||||
|
|
||||||
- [Developer's Guide][devguide]
|
- [Developer's Guide][devguide]
|
||||||
- [Regression Testing][testing]
|
- [Regression Testing][testing]
|
||||||
|
|
||||||
|
|
||||||
:memo: Commit Messages
|
:memo: Commit Messages
|
||||||
----------------------
|
----------------------
|
||||||
@@ -109,135 +110,45 @@ proud of your work and set up a proper GIT identity for your commits:
|
|||||||
|
|
||||||
<img src="../doc/jack.png" width=70 align="right">
|
<img src="../doc/jack.png" width=70 align="right">
|
||||||
|
|
||||||
```bash
|
$ git config --global user.name "Jacky Linker"
|
||||||
$ git config --global user.name "Jacky Linker"
|
$ git config --global user.email jacky.linker@example.com
|
||||||
$ git config --global user.email jacky.linker@example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
Example commit message from one of many [online guides][cbeams]. Use
|
Example commit message from one of many [online guides][cbeams]. Use
|
||||||
`git commit -s` to automatically add a `Signed-off-by` for proof of
|
`git commit -s` to automatically add a `Signed-off-by` for proof of
|
||||||
origin, see [DCO][] for more info.
|
origin, see [DCO][] for more info.
|
||||||
|
|
||||||
```text
|
subsystem: brief, but clear and concise summary of changes
|
||||||
subsystem: 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.
|
||||||
|
|
||||||
|
Further paragraphs should be separated with empty 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
|
||||||
|
|
||||||
More detailed explanatory text, if necessary. Wrap it to about 72
|
If you use an issue tracker, put references to them at the bottom,
|
||||||
characters or so. In some contexts, the first line is treated as
|
like this:
|
||||||
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.
|
|
||||||
|
|
||||||
Further paragraphs should be separated with empty lines.
|
Resolves: #123
|
||||||
|
See also: #456, #789
|
||||||
|
|
||||||
- Bullet points are okay, too
|
Signed-off-by: Jacky Linker <jacky.linker@example.com>
|
||||||
|
|
||||||
- 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
|
This is an example of how to [automatically close][closing] an issue
|
||||||
when the commit is merged to mainline. Several keywords are available.
|
when the commit is merged to mainline. Several keywords are available.
|
||||||
|
|
||||||
:lock_with_ink_pen: Signing Commits with GPG
|
|
||||||
---------------------------------------------
|
|
||||||
|
|
||||||
To ensure the authenticity and integrity of your contributions, we
|
|
||||||
**require** all commits to be signed with GPG. This cryptographically
|
|
||||||
verifies that commits come from a trusted source.
|
|
||||||
|
|
||||||
### Generating a GPG Key
|
|
||||||
|
|
||||||
If you don't already have a GPG key, generate one:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ gpg --full-generate-key
|
|
||||||
```
|
|
||||||
|
|
||||||
When prompted, choose:
|
|
||||||
- Key type: `RSA and RSA` (default)
|
|
||||||
- Key size: `4096` bits (recommended for security)
|
|
||||||
- Expiration: `0` (key does not expire)
|
|
||||||
- Real name and email: Use the same email as your Git configuration
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> We recommend keys that do not expire for signing commits. Expiration
|
|
||||||
> creates a "usability time bomb" without providing meaningful security
|
|
||||||
> benefits for code signing. See [this article][pgpfan] for details.
|
|
||||||
|
|
||||||
### Configuring Git to Sign Commits
|
|
||||||
|
|
||||||
First, find your GPG key ID:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ gpg --list-secret-keys --keyid-format=long
|
|
||||||
```
|
|
||||||
|
|
||||||
Look for the line starting with `sec`, the key ID is the part after the `/`.
|
|
||||||
For example, in `sec rsa4096/ABCD1234EFGH5678`, the key ID is `ABCD1234EFGH5678`.
|
|
||||||
|
|
||||||
Configure Git to use your GPG key:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ git config --global user.signingkey ABCD1234EFGH5678
|
|
||||||
$ git config --global commit.gpgsign true
|
|
||||||
```
|
|
||||||
|
|
||||||
The second command enables automatic signing for all commits. Alternatively,
|
|
||||||
you can sign individual commits with `git commit -S`.
|
|
||||||
|
|
||||||
### Publishing Your Public Key
|
|
||||||
|
|
||||||
To allow others to verify your signatures, publish your public key to a
|
|
||||||
keyserver:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ gpg --keyserver hkps://keys.openpgp.org --send-keys ABCD1234EFGH5678
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!IMPORTANT]
|
|
||||||
> The keyserver will send a verification email to the address associated
|
|
||||||
> with your key. You **must** click the link in that email to confirm
|
|
||||||
> ownership before your key becomes searchable by email address.
|
|
||||||
|
|
||||||
Alternative keyservers you can use:
|
|
||||||
- `hkps://keyserver.ubuntu.com`
|
|
||||||
- `hkps://pgp.mit.edu`
|
|
||||||
|
|
||||||
### Adding Your GPG Key to GitHub
|
|
||||||
|
|
||||||
For GitHub to show your commits as "Verified", you need to add your public
|
|
||||||
key to your account:
|
|
||||||
|
|
||||||
1. Export your public key:
|
|
||||||
```bash
|
|
||||||
$ gpg --armor --export ABCD1234EFGH5678
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Copy the entire output, including the `-----BEGIN PGP PUBLIC KEY BLOCK-----`
|
|
||||||
and `-----END PGP PUBLIC KEY BLOCK-----` lines.
|
|
||||||
|
|
||||||
3. Go to [GitHub Settings → SSH and GPG keys](https://github.com/settings/keys)
|
|
||||||
|
|
||||||
4. Click **New GPG key** and paste your public key.
|
|
||||||
|
|
||||||
Now your signed commits will display a "Verified" badge on GitHub! :white_check_mark:
|
|
||||||
|
|
||||||
For more details, see GitHub's [official documentation on commit signature verification][gpg-verify].
|
|
||||||
|
|
||||||
:twisted_rightwards_arrows: Pull Requests
|
:twisted_rightwards_arrows: Pull Requests
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
> [!NOTE]
|
> _The git repository is the canonical location for information._
|
||||||
> _The git repository is the canonical location for all information._
|
|
||||||
|
|
||||||
A pull request should preferably address a single issue or change. This
|
A pull request should preferably address a single issue or change. This
|
||||||
may of course include multiple related changes, but what is important to
|
may of course include multiple related changes, but what is important to
|
||||||
@@ -256,6 +167,7 @@ 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
|
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.
|
lost when the changes are merged to the mainline branch.
|
||||||
|
|
||||||
|
|
||||||
:balance_scale: Code of Conduct
|
:balance_scale: Code of Conduct
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
@@ -272,8 +184,6 @@ other contributions that are not aligned to this Code of Conduct."*
|
|||||||
[PEP-8]: https://peps.python.org/pep-0008/
|
[PEP-8]: https://peps.python.org/pep-0008/
|
||||||
[RDD]: https://tom.preston-werner.com/2010/08/23/readme-driven-development
|
[RDD]: https://tom.preston-werner.com/2010/08/23/readme-driven-development
|
||||||
[cbeams]: https://cbea.ms/git-commit/#seven-rules
|
[cbeams]: https://cbea.ms/git-commit/#seven-rules
|
||||||
[conduct]: CODE-OF-CONDUCT.md
|
[conduct]: CODE-OF-CONDUCT.md
|
||||||
[DCO]: https://developercertificate.org/
|
[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
|
[closing]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
|
||||||
[gpg-verify]: https://docs.github.com/en/authentication/managing-commit-signature-verification
|
|
||||||
[pgpfan]: https://articles.59.ca/doku.php?id=pgpfan:expire
|
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
defconfig:
|
defconfig:
|
||||||
- aarch64_qemu_boot
|
- aarch64_qemu_boot
|
||||||
- bpi_r3_sd_boot
|
- bpi_r3_boot
|
||||||
- bpi_r3_emmc_boot
|
|
||||||
- cn9130_crb_boot
|
- cn9130_crb_boot
|
||||||
- fireant_boot
|
- fireant_boot
|
||||||
- nanopi_r2s_boot
|
- nanopi_r2s_boot
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Create SD Card & eMMC Images
|
name: Create SD Card Images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -56,33 +56,21 @@ jobs:
|
|||||||
raspberrypi-rpi64)
|
raspberrypi-rpi64)
|
||||||
echo "BOOTLOADER=rpi64_boot" >> $GITHUB_ENV
|
echo "BOOTLOADER=rpi64_boot" >> $GITHUB_ENV
|
||||||
echo "TARGET=aarch64" >> $GITHUB_ENV
|
echo "TARGET=aarch64" >> $GITHUB_ENV
|
||||||
echo "BUILD_EMMC=false" >> $GITHUB_ENV
|
|
||||||
;;
|
;;
|
||||||
bananapi-bpi-r3)
|
bananapi-bpi-r3)
|
||||||
echo "BOOTLOADER_SD=bpi_r3_sd_boot" >> $GITHUB_ENV
|
echo "BOOTLOADER=bpi_r3_boot" >> $GITHUB_ENV
|
||||||
echo "BOOTLOADER_EMMC=bpi_r3_emmc_boot" >> $GITHUB_ENV
|
|
||||||
echo "TARGET=aarch64" >> $GITHUB_ENV
|
echo "TARGET=aarch64" >> $GITHUB_ENV
|
||||||
echo "BUILD_EMMC=true" >> $GITHUB_ENV
|
|
||||||
;;
|
;;
|
||||||
friendlyarm-nanopi-r2s)
|
friendlyarm-nanopi-r2s)
|
||||||
echo "BOOTLOADER=nanopi_r2s_boot" >> $GITHUB_ENV
|
echo "BOOTLOADER=nanopi_r2s_boot" >> $GITHUB_ENV
|
||||||
echo "TARGET=aarch64" >> $GITHUB_ENV
|
echo "TARGET=aarch64" >> $GITHUB_ENV
|
||||||
echo "BUILD_EMMC=false" >> $GITHUB_ENV
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Error: Unknown board ${{ inputs.board }}"
|
echo "Error: Unknown board ${{ inputs.board }}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo "Target: $TARGET for board: ${{ inputs.board }}"
|
echo "Using bootloader: $BOOTLOADER and target: $TARGET for board: ${{ inputs.board }}"
|
||||||
if [ "$BUILD_EMMC" = "true" ]; then
|
|
||||||
echo "Building both SD and eMMC images"
|
|
||||||
echo "SD Bootloader: $BOOTLOADER_SD"
|
|
||||||
echo "eMMC Bootloader: $BOOTLOADER_EMMC"
|
|
||||||
else
|
|
||||||
echo "Building SD image only"
|
|
||||||
echo "Bootloader: $BOOTLOADER"
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Download bootloader artifacts
|
- name: Download bootloader artifacts
|
||||||
if: ${{ !inputs.use_latest_release }}
|
if: ${{ !inputs.use_latest_release }}
|
||||||
@@ -91,41 +79,16 @@ jobs:
|
|||||||
gh run list --workflow=build-boot.yml --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_boot_run_id
|
gh run list --workflow=build-boot.yml --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_boot_run_id
|
||||||
BOOT_RUN_ID=$(cat latest_boot_run_id)
|
BOOT_RUN_ID=$(cat latest_boot_run_id)
|
||||||
|
|
||||||
if [ "$BUILD_EMMC" = "true" ]; then
|
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER} --dir temp_bootloader/
|
||||||
# Download both SD and eMMC bootloaders for boards that support both
|
|
||||||
echo "Downloading SD bootloader: ${BOOTLOADER_SD}"
|
|
||||||
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER_SD} --dir temp_bootloader_sd/
|
|
||||||
mkdir -p output_sd/images
|
|
||||||
cd temp_bootloader_sd/
|
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
|
|
||||||
cd ../
|
|
||||||
rm -rf temp_bootloader_sd/
|
|
||||||
|
|
||||||
echo "Downloading eMMC bootloader: ${BOOTLOADER_EMMC}"
|
# Extract bootloader directly to output/images
|
||||||
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER_EMMC} --dir temp_bootloader_emmc/
|
cd temp_bootloader/
|
||||||
mkdir -p output_emmc/images
|
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
||||||
cd temp_bootloader_emmc/
|
cd ../
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
|
rm -rf temp_bootloader/
|
||||||
cd ../
|
|
||||||
rm -rf temp_bootloader_emmc/
|
|
||||||
|
|
||||||
echo "SD bootloader files:"
|
echo "Bootloader files extracted to output/images:"
|
||||||
ls -la output_sd/images/
|
ls -la output/images/
|
||||||
echo "eMMC bootloader files:"
|
|
||||||
ls -la output_emmc/images/
|
|
||||||
else
|
|
||||||
# Single bootloader for boards that only support SD
|
|
||||||
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER} --dir temp_bootloader/
|
|
||||||
|
|
||||||
# Extract bootloader directly to output/images
|
|
||||||
cd temp_bootloader/
|
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
|
||||||
cd ../
|
|
||||||
rm -rf temp_bootloader/
|
|
||||||
|
|
||||||
echo "Bootloader files extracted to output/images:"
|
|
||||||
ls -la output/images/
|
|
||||||
fi
|
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
@@ -136,193 +99,90 @@ jobs:
|
|||||||
gh run list --workflow=164295764 --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_infix_run_id
|
gh run list --workflow=164295764 --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_infix_run_id
|
||||||
INFIX_RUN_ID=$(cat latest_infix_run_id)
|
INFIX_RUN_ID=$(cat latest_infix_run_id)
|
||||||
|
|
||||||
if [ "$BUILD_EMMC" = "true" ]; then
|
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
|
||||||
# Copy Infix artifacts to both SD and eMMC output directories
|
|
||||||
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
|
|
||||||
|
|
||||||
cd temp_infix/
|
# Extract Infix directly to output/images
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
|
cd temp_infix/
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
|
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
||||||
cd ../
|
cd ../
|
||||||
rm -rf temp_infix/
|
rm -rf temp_infix/
|
||||||
|
|
||||||
echo "Infix files extracted to output_sd/images:"
|
echo "Infix files extracted to output/images:"
|
||||||
ls -la output_sd/images/
|
ls -la output/images/
|
||||||
echo "Infix files extracted to output_emmc/images:"
|
|
||||||
ls -la output_emmc/images/
|
|
||||||
else
|
|
||||||
# Single output directory for SD-only boards
|
|
||||||
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
|
|
||||||
|
|
||||||
# Extract Infix directly to output/images
|
|
||||||
cd temp_infix/
|
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
|
||||||
cd ../
|
|
||||||
rm -rf temp_infix/
|
|
||||||
|
|
||||||
echo "Infix files extracted to output/images:"
|
|
||||||
ls -la output/images/
|
|
||||||
fi
|
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Download from latest releases
|
- name: Download from latest releases
|
||||||
if: ${{ inputs.use_latest_release }}
|
if: ${{ inputs.use_latest_release }}
|
||||||
run: |
|
run: |
|
||||||
if [ "$BUILD_EMMC" = "true" ]; then
|
# Download latest bootloader release
|
||||||
# Download both SD and eMMC bootloaders
|
gh release download latest-boot --pattern "*${BOOTLOADER}*" --dir temp_bootloader/
|
||||||
gh release download latest-boot --pattern "*${BOOTLOADER_SD}*" --dir temp_bootloader_sd/
|
cd temp_bootloader/
|
||||||
mkdir -p output_sd/images
|
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
||||||
cd temp_bootloader_sd/
|
cd ../
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
|
rm -rf temp_bootloader/
|
||||||
cd ../
|
|
||||||
rm -rf temp_bootloader_sd/
|
|
||||||
|
|
||||||
gh release download latest-boot --pattern "*${BOOTLOADER_EMMC}*" --dir temp_bootloader_emmc/
|
# Download latest Infix release
|
||||||
mkdir -p output_emmc/images
|
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
|
||||||
cd temp_bootloader_emmc/
|
cd temp_infix/
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
|
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
||||||
cd ../
|
cd ../
|
||||||
rm -rf temp_bootloader_emmc/
|
rm -rf temp_infix/
|
||||||
|
|
||||||
# Download Infix once and extract to both directories
|
echo "All files extracted to output/images:"
|
||||||
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
|
ls -la output/images/
|
||||||
cd temp_infix/
|
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output_sd/images/
|
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output_emmc/images/
|
|
||||||
cd ../
|
|
||||||
rm -rf temp_infix/
|
|
||||||
|
|
||||||
echo "SD files extracted to output_sd/images:"
|
|
||||||
ls -la output_sd/images/
|
|
||||||
echo "eMMC files extracted to output_emmc/images:"
|
|
||||||
ls -la output_emmc/images/
|
|
||||||
else
|
|
||||||
# Download latest bootloader release
|
|
||||||
gh release download latest-boot --pattern "*${BOOTLOADER}*" --dir temp_bootloader/
|
|
||||||
cd temp_bootloader/
|
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
|
||||||
cd ../
|
|
||||||
rm -rf temp_bootloader/
|
|
||||||
|
|
||||||
# Download latest Infix release
|
|
||||||
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
|
|
||||||
cd temp_infix/
|
|
||||||
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
|
||||||
cd ../
|
|
||||||
rm -rf temp_infix/
|
|
||||||
|
|
||||||
echo "All files extracted to output/images:"
|
|
||||||
ls -la output/images/
|
|
||||||
fi
|
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Verify extracted files
|
- name: Verify extracted files
|
||||||
run: |
|
run: |
|
||||||
if [ "$BUILD_EMMC" = "true" ]; then
|
echo "Files available for mkimage.sh:"
|
||||||
echo "Files available for SD image:"
|
ls -la output/images/
|
||||||
ls -la output_sd/images/
|
echo ""
|
||||||
echo ""
|
echo "File types:"
|
||||||
echo "Files available for eMMC image:"
|
file output/images/* || true
|
||||||
ls -la output_emmc/images/
|
|
||||||
else
|
|
||||||
echo "Files available for mkimage.sh:"
|
|
||||||
ls -la output/images/
|
|
||||||
echo ""
|
|
||||||
echo "File types:"
|
|
||||||
file output/images/* || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create SD card image
|
- name: Create SD card image
|
||||||
run: |
|
run: |
|
||||||
if [ "$BUILD_EMMC" = "true" ]; then
|
export BINARIES_DIR=$PWD/output/images
|
||||||
export BINARIES_DIR=$PWD/output_sd/images
|
|
||||||
export BUILD_DIR=$PWD/build
|
|
||||||
export BR2_EXTERNAL_INFIX_PATH=$PWD
|
|
||||||
export RELEASE=""
|
|
||||||
export INFIX_ID="infix"
|
|
||||||
./utils/mkimage.sh -t sdcard ${{ inputs.board }}
|
|
||||||
else
|
|
||||||
export BINARIES_DIR=$PWD/output/images
|
|
||||||
export BUILD_DIR=$PWD/build
|
|
||||||
export BR2_EXTERNAL_INFIX_PATH=$PWD
|
|
||||||
export RELEASE=""
|
|
||||||
export INFIX_ID="infix"
|
|
||||||
./utils/mkimage.sh ${{ inputs.board }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Create eMMC image
|
|
||||||
if: ${{ env.BUILD_EMMC == 'true' }}
|
|
||||||
run: |
|
|
||||||
export BINARIES_DIR=$PWD/output_emmc/images
|
|
||||||
export BUILD_DIR=$PWD/build
|
export BUILD_DIR=$PWD/build
|
||||||
export BR2_EXTERNAL_INFIX_PATH=$PWD
|
export BR2_EXTERNAL_INFIX_PATH=$PWD
|
||||||
export RELEASE=""
|
export RELEASE=""
|
||||||
export INFIX_ID="infix"
|
export INFIX_ID="infix"
|
||||||
./utils/mkimage.sh -t emmc ${{ inputs.board }}
|
./utils/mkimage.sh ${{ inputs.board }}
|
||||||
|
|
||||||
- name: Verify created images
|
- name: Verify created image
|
||||||
run: |
|
run: |
|
||||||
if [ "$BUILD_EMMC" = "true" ]; then
|
echo "Contents of output/images after mkimage.sh:"
|
||||||
echo "SD card image:"
|
ls -lh output/images/
|
||||||
ls -lh output_sd/images/*-sdcard.img* 2>/dev/null || true
|
|
||||||
if ls output_sd/images/*-sdcard.img 1> /dev/null 2>&1; then
|
|
||||||
for img in output_sd/images/*-sdcard.img; do
|
|
||||||
echo "- $(basename $img)"
|
|
||||||
file "$img"
|
|
||||||
fdisk -l "$img" 2>/dev/null | head -20
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
# Look for SD card image with pattern: *-sdcard.img
|
||||||
echo "eMMC image:"
|
if ls output/images/*-sdcard.img 1> /dev/null 2>&1; then
|
||||||
ls -lh output_emmc/images/*-emmc.img* 2>/dev/null || true
|
echo "Found SD card image(s):"
|
||||||
if ls output_emmc/images/*-emmc.img 1> /dev/null 2>&1; then
|
for img in output/images/*-sdcard.img; do
|
||||||
for img in output_emmc/images/*-emmc.img; do
|
echo "- $(basename $img)"
|
||||||
echo "- $(basename $img)"
|
file "$img"
|
||||||
file "$img"
|
fdisk -l "$img" 2>/dev/null || true
|
||||||
fdisk -l "$img" 2>/dev/null | head -20
|
done
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Copy both images to output/images for artifact upload
|
|
||||||
mkdir -p output/images
|
|
||||||
cp output_sd/images/*-sdcard.img* output/images/ 2>/dev/null || true
|
|
||||||
cp output_emmc/images/*-emmc.img* output/images/ 2>/dev/null || true
|
|
||||||
else
|
else
|
||||||
echo "Contents of output/images after mkimage.sh:"
|
echo "No SD card image found matching pattern: *-sdcard.img"
|
||||||
ls -lh output/images/
|
echo "Available files:"
|
||||||
|
ls -la output/images/
|
||||||
# Look for SD card image with pattern: *-sdcard.img
|
exit 1
|
||||||
if ls output/images/*-sdcard.img 1> /dev/null 2>&1; then
|
|
||||||
echo "Found SD card image(s):"
|
|
||||||
for img in output/images/*-sdcard.img; do
|
|
||||||
echo "- $(basename $img)"
|
|
||||||
file "$img"
|
|
||||||
fdisk -l "$img" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
else
|
|
||||||
echo "No SD card image found matching pattern: *-sdcard.img"
|
|
||||||
echo "Available files:"
|
|
||||||
ls -la output/images/
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload images as artifacts
|
- name: Upload SD card image
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: images-${{ inputs.board }}
|
name: sdcard-image-${{ inputs.board }}-${{ env.BOOTLOADER }}
|
||||||
path: |
|
path: |
|
||||||
output/images/*-sdcard.img*
|
output/images/*-sdcard.img*
|
||||||
output/images/*-emmc.img*
|
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Create checksums
|
- name: Create checksums
|
||||||
run: |
|
run: |
|
||||||
cd output/images/
|
cd output/images/
|
||||||
for file in *-sdcard.img *-emmc.img; do
|
for file in *-sdcard.img; do
|
||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
sha256sum "$file" > "$file.sha256"
|
sha256sum "$file" > "$file.sha256"
|
||||||
fi
|
fi
|
||||||
@@ -338,28 +198,11 @@ jobs:
|
|||||||
prerelease: true
|
prerelease: true
|
||||||
tag: "latest-boot"
|
tag: "latest-boot"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
artifacts: "output/images/*-sdcard.img*,output/images/*-emmc.img*"
|
artifacts: "output/images/*-sdcard.img*"
|
||||||
|
|
||||||
- name: Generate summary
|
- name: Generate summary
|
||||||
run: |
|
run: |
|
||||||
if [ "$BUILD_EMMC" = "true" ]; then
|
cat <<EOF >> $GITHUB_STEP_SUMMARY
|
||||||
cat <<EOF >> $GITHUB_STEP_SUMMARY
|
|
||||||
# SD Card & eMMC Image Build Complete! 🚀
|
|
||||||
|
|
||||||
**Board:** ${{ inputs.board }}
|
|
||||||
**Target:** ${{ env.TARGET }}
|
|
||||||
**SD Bootloader:** ${{ env.BOOTLOADER_SD }}
|
|
||||||
**eMMC Bootloader:** ${{ env.BOOTLOADER_EMMC }}
|
|
||||||
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
|
|
||||||
|
|
||||||
## Created Images
|
|
||||||
$(find output/images/ -name "*.img" -o -name "*.img.bmap" | xargs ls -lh 2>/dev/null | awk '{print "- " $9 " (" $5 ")"}' || echo "- No images found")
|
|
||||||
|
|
||||||
## Download
|
|
||||||
Both SD card and eMMC images are available as workflow artifacts above and in the latest-boot release.
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
cat <<EOF >> $GITHUB_STEP_SUMMARY
|
|
||||||
# SD Card Image Build Complete! 🚀
|
# SD Card Image Build Complete! 🚀
|
||||||
|
|
||||||
**Board:** ${{ inputs.board }}
|
**Board:** ${{ inputs.board }}
|
||||||
@@ -368,9 +211,8 @@ jobs:
|
|||||||
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
|
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
|
||||||
|
|
||||||
## Created Images
|
## Created Images
|
||||||
$(find output/images/ -name "*.img" -o -name "*.img.bmap" | xargs ls -lh 2>/dev/null | awk '{print "- " $9 " (" $5 ")"}' || echo "- No images found")
|
$(find output/images/ -name "*.img*" -o -name "*.qcow2" -o -name "*.raw" | xargs ls -lh 2>/dev/null | sed 's/^/- /' || echo "- No images found")
|
||||||
|
|
||||||
## Download
|
## Download
|
||||||
The SD card image is available as a workflow artifact above.
|
The SD card image is available as a workflow artifact above.
|
||||||
EOF
|
EOF
|
||||||
fi
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
# Needed for make pkg-stats
|
|
||||||
# sudo apt install python3-aiohttp
|
|
||||||
---
|
|
||||||
name: Build Release
|
name: Build Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -78,12 +75,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate SBOM from Build
|
- name: Generate SBOM from Build
|
||||||
run: |
|
run: |
|
||||||
# Generate manifest files in CSV format for CycloneDX
|
|
||||||
make legal-info
|
make legal-info
|
||||||
# Generate cpe.json for CycloneDX
|
|
||||||
make -s show-info > output/cpe.json
|
|
||||||
# Generate pkg-stats.{json,html} for humans
|
|
||||||
make pkg-stats
|
|
||||||
|
|
||||||
- name: Build test specification
|
- name: Build test specification
|
||||||
run: |
|
run: |
|
||||||
@@ -92,22 +84,13 @@ jobs:
|
|||||||
- name: Prepare Artifacts
|
- name: Prepare Artifacts
|
||||||
run: |
|
run: |
|
||||||
cd output/
|
cd output/
|
||||||
|
|
||||||
# Collect relevant files for SBOM and CPE info. for more info, see:
|
|
||||||
# https://github.com/CycloneDX/cyclonedx-buildroot
|
|
||||||
mkdir images/sbom
|
|
||||||
mv pkg-stats.* images/sbom/
|
|
||||||
mv cpe.json images/sbom/
|
|
||||||
mv legal-info/*.csv images/sbom/
|
|
||||||
|
|
||||||
# Remove rootfs.squashfs from release (can be extracted from rootfs.itb)
|
|
||||||
# Saves ~131MB per architecture. See issue #858
|
|
||||||
rm -f images/rootfs.squashfs
|
|
||||||
|
|
||||||
mv images ${{ steps.vars.outputs.dir }}
|
mv images ${{ steps.vars.outputs.dir }}
|
||||||
ln -s ${{ steps.vars.outputs.dir }} images
|
ln -s ${{ steps.vars.outputs.dir }} images
|
||||||
tar cfz ${{ steps.vars.outputs.tgz }} ${{ steps.vars.outputs.dir }}
|
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 }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: artifact-${{ matrix.target }}
|
name: artifact-${{ matrix.target }}
|
||||||
|
|||||||
@@ -19,10 +19,6 @@ on:
|
|||||||
description: 'Repo to checkout (for spin overrides)'
|
description: 'Repo to checkout (for spin overrides)'
|
||||||
default: kernelkit/infix
|
default: kernelkit/infix
|
||||||
type: string
|
type: string
|
||||||
infix_branch:
|
|
||||||
description: 'Branch/tag/commit to checkout (for spin overrides)'
|
|
||||||
default: ''
|
|
||||||
type: string
|
|
||||||
|
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -36,30 +32,15 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: kernelkit/infix
|
default: kernelkit/infix
|
||||||
infix_branch:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: ''
|
|
||||||
description: 'Branch/tag/commit to checkout (for spin overrides). Defaults to github.ref if not specified'
|
|
||||||
parallel:
|
parallel:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
pre_build_script:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: ''
|
|
||||||
description: 'Optional script to run after checkout (for spin customization)'
|
|
||||||
secrets:
|
|
||||||
CHECKOUT_TOKEN:
|
|
||||||
required: false
|
|
||||||
description: 'Token for cross-repository access'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
|
NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
|
||||||
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
|
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 }}
|
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
|
||||||
INFIX_BRANCH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_branch || inputs.infix_branch }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -92,20 +73,10 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.INFIX_REPO }}
|
repository: ${{ env.INFIX_REPO }}
|
||||||
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
|
ref: ${{ github.ref }}
|
||||||
clean: true
|
clean: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
|
|
||||||
|
|
||||||
- name: Run pre-build script
|
|
||||||
if: ${{ inputs.pre_build_script != '' }}
|
|
||||||
run: |
|
|
||||||
cat > ./pre-build.sh << 'EOF'
|
|
||||||
${{ inputs.pre_build_script }}
|
|
||||||
EOF
|
|
||||||
chmod +x ./pre-build.sh
|
|
||||||
bash ./pre-build.sh
|
|
||||||
|
|
||||||
- name: Set Build Variables
|
- name: Set Build Variables
|
||||||
id: vars
|
id: vars
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
name: Check Kernel 6.12 Release
|
name: Check Kernel 6.12 Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
workflow_dispatch: # Allow manual triggering
|
||||||
- cron: '0 3 * * *'
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-kernel:
|
check-kernel:
|
||||||
if: github.repository == 'kernelkit/infix'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -17,6 +14,14 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
|
token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
|
||||||
|
|
||||||
|
- name: Check out linux repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: kernelkit/linux
|
||||||
|
path: linux
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
|
||||||
|
|
||||||
- name: Fetch kernel.org and check for 6.12 release
|
- name: Fetch kernel.org and check for 6.12 release
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
@@ -32,52 +37,22 @@ jobs:
|
|||||||
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "Current 6.12 kernel version: $CURRENT_VERSION"
|
echo "Current 6.12 kernel version: $CURRENT_VERSION"
|
||||||
|
|
||||||
# Get the version from infix defconfig
|
# Get the latest tag from our linux tree
|
||||||
INFIX_VERSION=$(grep 'BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE=' configs/aarch64_defconfig | cut -d'"' -f2)
|
cd linux
|
||||||
|
git fetch origin
|
||||||
|
LATEST_TAG=$(git tag -l "v6.12.*" | sort -V | tail -n1 | sed 's/^v//')
|
||||||
|
cd ..
|
||||||
|
|
||||||
echo "infix_version=$INFIX_VERSION" >> $GITHUB_OUTPUT
|
echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
|
||||||
echo "Infix kernel version: $INFIX_VERSION"
|
echo "Latest tag in our tree: $LATEST_TAG"
|
||||||
|
|
||||||
if [ "$CURRENT_VERSION" != "$INFIX_VERSION" ]; then
|
if [ "$CURRENT_VERSION" != "$LATEST_TAG" ]; then
|
||||||
# Check if there's already an open PR for this version
|
echo "new_release=true" >> $GITHUB_OUTPUT
|
||||||
PR_EXISTS=$(gh pr list --state open --search "Upgrade to kernel $CURRENT_VERSION in:title" --json number --jq 'length')
|
echo "🎉 New 6.12 kernel released: $CURRENT_VERSION (our version: $LATEST_TAG)"
|
||||||
|
|
||||||
if [ "$PR_EXISTS" -gt 0 ]; then
|
|
||||||
echo "new_release=false" >> $GITHUB_OUTPUT
|
|
||||||
echo "PR already exists for kernel $CURRENT_VERSION, skipping"
|
|
||||||
else
|
|
||||||
echo "new_release=true" >> $GITHUB_OUTPUT
|
|
||||||
echo "🎉 New 6.12 kernel released: $CURRENT_VERSION (infix version: $INFIX_VERSION)"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "new_release=false" >> $GITHUB_OUTPUT
|
echo "new_release=false" >> $GITHUB_OUTPUT
|
||||||
echo "No change - still at $CURRENT_VERSION"
|
echo "No change - still at $CURRENT_VERSION"
|
||||||
fi
|
fi
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.KERNEL_UPDATE_TOKEN }}
|
|
||||||
|
|
||||||
- name: Generate branch name
|
|
||||||
if: steps.check.outputs.new_release == 'true'
|
|
||||||
id: branch
|
|
||||||
run: |
|
|
||||||
BRANCH_NAME="kernel-upgrade-$(uuidgen | tr '[:upper:]' '[:lower:]')"
|
|
||||||
echo "name=$BRANCH_NAME" >> $GITHUB_OUTPUT
|
|
||||||
echo "Branch name: $BRANCH_NAME"
|
|
||||||
|
|
||||||
- name: Import GPG key
|
|
||||||
if: steps.check.outputs.new_release == 'true'
|
|
||||||
run: |
|
|
||||||
# Import the GPG key
|
|
||||||
echo "${{ secrets.AEL_BOT_GPG_PRIVATE_KEY }}" | gpg --batch --import
|
|
||||||
|
|
||||||
# Get the key ID
|
|
||||||
GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format=long | grep '^sec' | head -1 | awk '{print $2}' | cut -d'/' -f2)
|
|
||||||
echo "GPG_KEY_ID=$GPG_KEY_ID" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
# Configure GPG agent for non-interactive use
|
|
||||||
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
|
|
||||||
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
|
|
||||||
gpg-connect-agent reloadagent /bye || true
|
|
||||||
|
|
||||||
- name: Set up git credentials
|
- name: Set up git credentials
|
||||||
if: steps.check.outputs.new_release == 'true'
|
if: steps.check.outputs.new_release == 'true'
|
||||||
@@ -85,8 +60,6 @@ jobs:
|
|||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
git config --global user.email "ael-bot@users.noreply.github.com"
|
git config --global user.email "ael-bot@users.noreply.github.com"
|
||||||
git config --global user.name "ael-bot"
|
git config --global user.name "ael-bot"
|
||||||
git config --global commit.gpgsign true
|
|
||||||
git config --global user.signingkey ${{ env.GPG_KEY_ID }}
|
|
||||||
|
|
||||||
# Configure git to use the token for HTTPS operations
|
# Configure git to use the token for HTTPS operations
|
||||||
git config --global url."https://ael-bot:${{ secrets.KERNEL_UPDATE_TOKEN }}@github.com/".insteadOf "git@github.com:"
|
git config --global url."https://ael-bot:${{ secrets.KERNEL_UPDATE_TOKEN }}@github.com/".insteadOf "git@github.com:"
|
||||||
@@ -96,10 +69,9 @@ jobs:
|
|||||||
if: steps.check.outputs.new_release == 'true'
|
if: steps.check.outputs.new_release == 'true'
|
||||||
env:
|
env:
|
||||||
GIT_TERMINAL_PROMPT: 0
|
GIT_TERMINAL_PROMPT: 0
|
||||||
BRANCH_NAME: ${{ steps.branch.outputs.name }}
|
|
||||||
run: |
|
run: |
|
||||||
set -e -o pipefail
|
set -e -o pipefail
|
||||||
./utils/kernel-upgrade.sh linux "$BRANCH_NAME"
|
./utils/kernel-upgrade.sh linux
|
||||||
|
|
||||||
- name: Create pull request
|
- name: Create pull request
|
||||||
if: steps.check.outputs.new_release == 'true'
|
if: steps.check.outputs.new_release == 'true'
|
||||||
@@ -107,6 +79,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
|
github-token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
|
||||||
script: |
|
script: |
|
||||||
|
// Check if PR already exists
|
||||||
const { data: pulls } = await github.rest.pulls.list({
|
const { data: pulls } = await github.rest.pulls.list({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
@@ -119,11 +92,12 @@ jobs:
|
|||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
title: `Upgrade to kernel ${{ steps.check.outputs.current_version }}`,
|
title: `Upgrade to kernel ${{ steps.check.outputs.current_version }}`,
|
||||||
head: '${{ steps.branch.outputs.name }}',
|
head: 'kernel-upgrade',
|
||||||
base: 'main',
|
base: 'main',
|
||||||
body: `Automated kernel upgrade to version ${{ steps.check.outputs.current_version }}.\n\n**Previous version:** ${{ steps.check.outputs.infix_version }}\n**New version:** ${{ steps.check.outputs.current_version }}\n**Source:** https://www.kernel.org/\n\nThis PR was automatically created by the kernel release monitoring workflow.`
|
body: `Automated kernel upgrade to version ${{ steps.check.outputs.current_version }}.\n\n**Previous version:** ${{ steps.check.outputs.latest_tag }}\n**New version:** ${{ steps.check.outputs.current_version }}\n**Source:** https://www.kernel.org/\n\nThis PR was automatically created by the kernel release monitoring workflow.`
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add label
|
||||||
await github.rest.issues.addLabels({
|
await github.rest.issues.addLabels({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
@@ -131,6 +105,7 @@ jobs:
|
|||||||
labels: ['ci:main']
|
labels: ['ci:main']
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Request reviews
|
||||||
await github.rest.pulls.requestReviewers({
|
await github.rest.pulls.requestReviewers({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
|
|||||||
@@ -69,10 +69,10 @@ jobs:
|
|||||||
(cd libite && ./autogen.sh && ./configure && make && sudo make install)
|
(cd libite && ./autogen.sh && ./configure && make && sudo make install)
|
||||||
make dep
|
make dep
|
||||||
|
|
||||||
- name: Build applications for Coverity
|
- name: Check applications
|
||||||
run: |
|
run: |
|
||||||
export PATH=`pwd`/coverity/bin:$PATH
|
export PATH=`pwd`/coverity/bin:$PATH
|
||||||
cov-build --dir cov-int make coverity
|
cov-build --dir cov-int make check
|
||||||
|
|
||||||
- name: Submit results to Coverity Scan
|
- name: Submit results to Coverity Scan
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ jobs:
|
|||||||
if echo $ver | grep -qE 'v[0-9.]+(-alpha|-beta|-rc)[0-9]*'; then
|
if echo $ver | grep -qE 'v[0-9.]+(-alpha|-beta|-rc)[0-9]*'; then
|
||||||
echo "pre=true" >> $GITHUB_OUTPUT
|
echo "pre=true" >> $GITHUB_OUTPUT
|
||||||
echo "latest=false" >> $GITHUB_OUTPUT
|
echo "latest=false" >> $GITHUB_OUTPUT
|
||||||
elif echo $ver | grep -qE '^v[0-9]+\.[0-9]+(\.0)?$'; then
|
elif echo $ver | grep -qE '^v[0-9.]+\.[0-9.]+(\.[0-9]+)?$'; then
|
||||||
echo "pre=false" >> $GITHUB_OUTPUT
|
echo "pre=false" >> $GITHUB_OUTPUT
|
||||||
echo "latest=true" >> $GITHUB_OUTPUT
|
echo "latest=true" >> $GITHUB_OUTPUT
|
||||||
echo "cat=Releases" >> $GITHUB_OUTPUT
|
echo "cat=Releases" >> $GITHUB_OUTPUT
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
prerelease: ${{ steps.rel.outputs.pre }}
|
prerelease: ${{ steps.rel.outputs.pre }}
|
||||||
makeLatest: ${{ steps.rel.outputs.latest }}
|
makeLatest: ${{ steps.rel.outputs.latest }}
|
||||||
discussionCategory: ${{ steps.rel.outputs.cat }}
|
discussionCategory: ${{ steps.rel.outputs.cat }}
|
||||||
bodyFile: release.md
|
bodyFile: release.md
|
||||||
artifacts: "*.tar.gz*,*.qcow2*"
|
artifacts: "*.tar.gz*,*.qcow2*"
|
||||||
|
|
||||||
- name: Summary
|
- name: Summary
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: kernelkit/infix
|
default: kernelkit/infix
|
||||||
type: string
|
type: string
|
||||||
infix_branch:
|
|
||||||
description: 'Branch/tag/commit to checkout (for spin overrides)'
|
|
||||||
default: ''
|
|
||||||
type: string
|
|
||||||
|
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -25,11 +21,6 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: kernelkit/infix
|
default: kernelkit/infix
|
||||||
infix_branch:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: ''
|
|
||||||
description: 'Branch/tag/commit to checkout (for spin overrides). Defaults to github.ref if not specified'
|
|
||||||
ninepm-conf:
|
ninepm-conf:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@@ -38,20 +29,10 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: 'test'
|
default: 'test'
|
||||||
pre_test_script:
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
default: ''
|
|
||||||
description: 'Optional script to run after checkout (for spin customization)'
|
|
||||||
secrets:
|
|
||||||
CHECKOUT_TOKEN:
|
|
||||||
required: false
|
|
||||||
description: 'Token for cross-repository access'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
|
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 }}
|
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
|
||||||
INFIX_BRANCH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_branch || inputs.infix_branch }}
|
|
||||||
NINEPM_CONF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ninepm-conf || inputs.ninepm-conf }}
|
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 }}
|
TEST_PATH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.test-path || inputs.test-path }}
|
||||||
|
|
||||||
@@ -74,20 +55,10 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.INFIX_REPO }}
|
repository: ${{ env.INFIX_REPO }}
|
||||||
ref: ${{ env.INFIX_BRANCH != '' && env.INFIX_BRANCH || github.ref }}
|
ref: ${{ github.ref }}
|
||||||
clean: true
|
clean: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
token: ${{ secrets.CHECKOUT_TOKEN || github.token }}
|
|
||||||
|
|
||||||
- name: Run pre-test script
|
|
||||||
if: ${{ inputs.pre_test_script != '' }}
|
|
||||||
run: |
|
|
||||||
cat > ./pre-test.sh << 'EOF'
|
|
||||||
${{ inputs.pre_test_script }}
|
|
||||||
EOF
|
|
||||||
chmod +x ./pre-test.sh
|
|
||||||
bash ./pre-test.sh
|
|
||||||
|
|
||||||
- name: Set Build Variables
|
- name: Set Build Variables
|
||||||
id: vars
|
id: vars
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
*~
|
*~
|
||||||
.claude
|
|
||||||
.gdb_history
|
.gdb_history
|
||||||
/.backup
|
/.backup
|
||||||
/.ccache
|
/.ccache
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ bmake = $(MAKE) -C buildroot O=$(O) $1
|
|||||||
all: $(config) buildroot/Makefile
|
all: $(config) buildroot/Makefile
|
||||||
@+$(call bmake,$@)
|
@+$(call bmake,$@)
|
||||||
|
|
||||||
check dep coverity:
|
check dep:
|
||||||
|
@echo "Starting local check, stage $@ ..."
|
||||||
@make -C src $@
|
@make -C src $@
|
||||||
|
|
||||||
$(config):
|
$(config):
|
||||||
@@ -32,11 +33,6 @@ $(config):
|
|||||||
legal-info: | buildroot/Makefile
|
legal-info: | buildroot/Makefile
|
||||||
$(call bmake,legal-info LINUX_LICENSE_FILES=COPYING)
|
$(call bmake,legal-info LINUX_LICENSE_FILES=COPYING)
|
||||||
|
|
||||||
cyclonedx: | buildroot/Makefile
|
|
||||||
@echo "Generating package information..."
|
|
||||||
@$(MAKE) --no-print-directory -C buildroot O=$(O) show-info | ./buildroot/utils/generate-cyclonedx > $(O)/cyclonedx-sbom.json
|
|
||||||
@echo "CycloneDX SBOM generated: $(O)/cyclonedx-sbom.json"
|
|
||||||
|
|
||||||
# Workaround, see board/x86_64/board.mk
|
# Workaround, see board/x86_64/board.mk
|
||||||
test:
|
test:
|
||||||
@+$(call bmake,$@)
|
@+$(call bmake,$@)
|
||||||
@@ -44,4 +40,4 @@ test:
|
|||||||
buildroot/Makefile:
|
buildroot/Makefile:
|
||||||
@git submodule update --init
|
@git submodule update --init
|
||||||
|
|
||||||
.PHONY: all check coverity dep test cyclonedx
|
.PHONY: all check test
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
menu "Board Support"
|
menu "Board Support"
|
||||||
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch32/Config.in"
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch64/Config.in"
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/riscv64/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/board/riscv64/Config.in"
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/x86_64/Config.in"
|
source "$BR2_EXTERNAL_INFIX_PATH/board/x86_64/Config.in"
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
if BR2_arm
|
|
||||||
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/aarch32/raspberrypi-rpi2/Config.in"
|
|
||||||
|
|
||||||
endif
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
aarch32
|
|
||||||
=======
|
|
||||||
|
|
||||||
Board Specific Documentation
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
- [Raspberry Pi 2 Model B (32-bit)](raspberrypi-rpi2/)
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
blkmap get boot dev devnum
|
|
||||||
load blkmap ${devnum} ${kernel_addr_r} /boot/zImage
|
|
||||||
#TODO: LOAD FDT
|
|
||||||
|
|
||||||
setenv bootargs "${bootargs_root} ${bootargs_rauc} ${bootargs_log}"
|
|
||||||
|
|
||||||
bootz ${kernel_addr_r} ${ramdisk} ${fdt_addr}
|
|
||||||
@@ -1,395 +0,0 @@
|
|||||||
CONFIG_SYSVIPC=y
|
|
||||||
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_BSD_PROCESS_ACCT=y
|
|
||||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
|
||||||
CONFIG_TASKSTATS=y
|
|
||||||
CONFIG_TASK_DELAY_ACCT=y
|
|
||||||
CONFIG_TASK_XACCT=y
|
|
||||||
CONFIG_TASK_IO_ACCOUNTING=y
|
|
||||||
CONFIG_IKCONFIG=y
|
|
||||||
CONFIG_IKCONFIG_PROC=y
|
|
||||||
CONFIG_LOG_BUF_SHIFT=18
|
|
||||||
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_CPUSETS=y
|
|
||||||
CONFIG_CGROUP_DEVICE=y
|
|
||||||
CONFIG_CGROUP_CPUACCT=y
|
|
||||||
CONFIG_CGROUP_PERF=y
|
|
||||||
CONFIG_CGROUP_BPF=y
|
|
||||||
CONFIG_USER_NS=y
|
|
||||||
CONFIG_SCHED_AUTOGROUP=y
|
|
||||||
CONFIG_BLK_DEV_INITRD=y
|
|
||||||
CONFIG_KALLSYMS_ALL=y
|
|
||||||
CONFIG_PROFILING=y
|
|
||||||
CONFIG_KEXEC=y
|
|
||||||
CONFIG_ARCH_MULTI_V6=y
|
|
||||||
CONFIG_ARCH_MULTI_V7=y
|
|
||||||
CONFIG_ARCH_VIRT=y
|
|
||||||
CONFIG_ARCH_BCM=y
|
|
||||||
CONFIG_ARCH_BCM2835=y
|
|
||||||
CONFIG_SMP=y
|
|
||||||
CONFIG_NR_CPUS=4
|
|
||||||
CONFIG_CPU_FREQ=y
|
|
||||||
CONFIG_CPU_FREQ_STAT=y
|
|
||||||
CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
|
|
||||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
|
||||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
|
||||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
|
||||||
CONFIG_CPUFREQ_DT=y
|
|
||||||
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
|
|
||||||
CONFIG_AEABI=y
|
|
||||||
CONFIG_VFP=y
|
|
||||||
CONFIG_NEON=y
|
|
||||||
CONFIG_KERNEL_MODE_NEON=y
|
|
||||||
# CONFIG_SUSPEND is not set
|
|
||||||
CONFIG_PM=y
|
|
||||||
CONFIG_JUMP_LABEL=y
|
|
||||||
# CONFIG_GCC_PLUGINS is not set
|
|
||||||
CONFIG_MODULES=y
|
|
||||||
CONFIG_MODULE_UNLOAD=y
|
|
||||||
CONFIG_PARTITION_ADVANCED=y
|
|
||||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
|
||||||
# CONFIG_COMPAT_BRK is not set
|
|
||||||
CONFIG_KSM=y
|
|
||||||
CONFIG_CMA=y
|
|
||||||
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
|
|
||||||
CONFIG_IP_ROUTE_MULTIPATH=y
|
|
||||||
CONFIG_NET_IPIP=m
|
|
||||||
CONFIG_NET_IPGRE_DEMUX=m
|
|
||||||
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_NET_IPVTI=m
|
|
||||||
CONFIG_NET_FOU_IP_TUNNELS=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_NETFILTER=y
|
|
||||||
CONFIG_BRIDGE_NETFILTER=y
|
|
||||||
CONFIG_NETFILTER_NETLINK_QUEUE=y
|
|
||||||
CONFIG_NETFILTER_NETLINK_LOG=y
|
|
||||||
CONFIG_NF_CONNTRACK=y
|
|
||||||
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_XFRM=m
|
|
||||||
CONFIG_NFT_SOCKET=m
|
|
||||||
CONFIG_NFT_OSF=m
|
|
||||||
CONFIG_NFT_DUP_NETDEV=m
|
|
||||||
CONFIG_NFT_FWD_NETDEV=m
|
|
||||||
CONFIG_NFT_REJECT_NETDEV=m
|
|
||||||
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
|
|
||||||
CONFIG_NETFILTER_XT_TARGET_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
|
|
||||||
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_RAW=m
|
|
||||||
CONFIG_IP6_NF_NAT=m
|
|
||||||
CONFIG_IP6_NF_TARGET_MASQUERADE=m
|
|
||||||
CONFIG_IP6_NF_TARGET_NPT=m
|
|
||||||
CONFIG_NF_TABLES_BRIDGE=m
|
|
||||||
CONFIG_NFT_BRIDGE_META=m
|
|
||||||
CONFIG_NF_CONNTRACK_BRIDGE=m
|
|
||||||
CONFIG_BRIDGE_NF_EBTABLES=m
|
|
||||||
CONFIG_BRIDGE_EBT_BROUTE=m
|
|
||||||
CONFIG_BRIDGE_EBT_T_FILTER=m
|
|
||||||
CONFIG_BRIDGE_EBT_T_NAT=m
|
|
||||||
CONFIG_BRIDGE_EBT_802_3=m
|
|
||||||
CONFIG_BRIDGE_EBT_ARP=m
|
|
||||||
CONFIG_BRIDGE_EBT_IP=m
|
|
||||||
CONFIG_BRIDGE_EBT_IP6=m
|
|
||||||
CONFIG_BRIDGE_EBT_LIMIT=m
|
|
||||||
CONFIG_BRIDGE_EBT_PKTTYPE=m
|
|
||||||
CONFIG_BRIDGE_EBT_STP=m
|
|
||||||
CONFIG_BRIDGE_EBT_VLAN=m
|
|
||||||
CONFIG_BRIDGE_EBT_ARPREPLY=m
|
|
||||||
CONFIG_BRIDGE_EBT_DNAT=m
|
|
||||||
CONFIG_BRIDGE_EBT_REDIRECT=m
|
|
||||||
CONFIG_BRIDGE_EBT_SNAT=m
|
|
||||||
CONFIG_BRIDGE_EBT_LOG=m
|
|
||||||
CONFIG_BRIDGE_EBT_NFLOG=m
|
|
||||||
CONFIG_BRIDGE=y
|
|
||||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
|
||||||
CONFIG_BRIDGE_MRP=y
|
|
||||||
CONFIG_BRIDGE_CFM=y
|
|
||||||
CONFIG_NET_DSA=y
|
|
||||||
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
|
|
||||||
CONFIG_MPLS_ROUTING=m
|
|
||||||
CONFIG_MPLS_IPTUNNEL=m
|
|
||||||
CONFIG_NET_PKTGEN=y
|
|
||||||
# CONFIG_WIRELESS is not set
|
|
||||||
CONFIG_NET_9P=y
|
|
||||||
CONFIG_NET_9P_VIRTIO=y
|
|
||||||
CONFIG_LWTUNNEL=y
|
|
||||||
CONFIG_PCI=y
|
|
||||||
CONFIG_PCIEPORTBUS=y
|
|
||||||
CONFIG_PCI_IOV=y
|
|
||||||
CONFIG_PCI_AARDVARK=y
|
|
||||||
CONFIG_PCI_HOST_GENERIC=y
|
|
||||||
CONFIG_PCIE_ARMADA_8K=y
|
|
||||||
CONFIG_UEVENT_HELPER=y
|
|
||||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
|
||||||
CONFIG_DEVTMPFS=y
|
|
||||||
CONFIG_DEVTMPFS_MOUNT=y
|
|
||||||
# CONFIG_STANDALONE is not set
|
|
||||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
|
||||||
CONFIG_FW_CFG_SYSFS=y
|
|
||||||
CONFIG_FW_CFG_SYSFS_CMDLINE=y
|
|
||||||
CONFIG_OF_OVERLAY=y
|
|
||||||
CONFIG_BLK_DEV_NULL_BLK=y
|
|
||||||
CONFIG_BLK_DEV_LOOP=y
|
|
||||||
CONFIG_BLK_DEV_RAM=y
|
|
||||||
CONFIG_VIRTIO_BLK=y
|
|
||||||
CONFIG_BLK_DEV_NVME=y
|
|
||||||
CONFIG_SRAM=y
|
|
||||||
CONFIG_EEPROM_AT24=y
|
|
||||||
# CONFIG_SCSI_PROC_FS is not set
|
|
||||||
CONFIG_SCSI=y
|
|
||||||
CONFIG_BLK_DEV_SD=y
|
|
||||||
CONFIG_SCSI_SAS_LIBSAS=y
|
|
||||||
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
|
|
||||||
CONFIG_MD=y
|
|
||||||
CONFIG_BLK_DEV_DM=y
|
|
||||||
CONFIG_DM_INIT=y
|
|
||||||
CONFIG_DM_VERITY=y
|
|
||||||
CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y
|
|
||||||
CONFIG_NETDEVICES=y
|
|
||||||
CONFIG_BONDING=m
|
|
||||||
CONFIG_DUMMY=m
|
|
||||||
CONFIG_MACVLAN=m
|
|
||||||
CONFIG_MACVTAP=m
|
|
||||||
CONFIG_IPVLAN=m
|
|
||||||
CONFIG_IPVTAP=m
|
|
||||||
CONFIG_VXLAN=m
|
|
||||||
CONFIG_GENEVE=m
|
|
||||||
CONFIG_BAREUDP=m
|
|
||||||
CONFIG_MACSEC=m
|
|
||||||
CONFIG_TUN=m
|
|
||||||
CONFIG_VETH=m
|
|
||||||
CONFIG_VIRTIO_NET=y
|
|
||||||
CONFIG_NLMON=y
|
|
||||||
CONFIG_NET_VRF=y
|
|
||||||
CONFIG_BCMGENET=y
|
|
||||||
CONFIG_SMSC911X=y
|
|
||||||
CONFIG_USB_LAN78XX=y
|
|
||||||
CONFIG_USB_USBNET=y
|
|
||||||
CONFIG_USB_NET_SMSC95XX=y
|
|
||||||
CONFIG_BRCMFMAC=m
|
|
||||||
CONFIG_ZD1211RW=m
|
|
||||||
CONFIG_INPUT_MOUSEDEV=m
|
|
||||||
CONFIG_INPUT_EVDEV=y
|
|
||||||
CONFIG_INPUT_TOUCHSCREEN=y
|
|
||||||
CONFIG_TOUCHSCREEN_EDT_FT5X06=m
|
|
||||||
# CONFIG_LEGACY_PTYS is not set
|
|
||||||
CONFIG_SERIAL_8250=y
|
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
|
||||||
CONFIG_SERIAL_8250_EXTENDED=y
|
|
||||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
|
||||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
|
||||||
CONFIG_SERIAL_AMBA_PL011=y
|
|
||||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
|
||||||
CONFIG_SERIAL_DEV_BUS=y
|
|
||||||
CONFIG_TTY_PRINTK=y
|
|
||||||
CONFIG_HVC_DRIVER=y
|
|
||||||
CONFIG_VIRTIO_CONSOLE=y
|
|
||||||
CONFIG_I2C_CHARDEV=y
|
|
||||||
CONFIG_I2C_BCM2835=m
|
|
||||||
CONFIG_SPI=y
|
|
||||||
CONFIG_SPI_BCM2835=y
|
|
||||||
CONFIG_SPI_BCM2835AUX=y
|
|
||||||
CONFIG_GPIO_SYSFS=y
|
|
||||||
CONFIG_SENSORS_RASPBERRYPI_HWMON=m
|
|
||||||
CONFIG_THERMAL=y
|
|
||||||
CONFIG_BCM2711_THERMAL=y
|
|
||||||
CONFIG_BCM2835_THERMAL=m
|
|
||||||
CONFIG_WATCHDOG=y
|
|
||||||
CONFIG_BCM2835_WDT=y
|
|
||||||
CONFIG_I6300ESB_WDT=y
|
|
||||||
CONFIG_MFD_SYSCON=y
|
|
||||||
CONFIG_REGULATOR=y
|
|
||||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
|
||||||
CONFIG_REGULATOR_GPIO=y
|
|
||||||
CONFIG_MEDIA_SUPPORT=y
|
|
||||||
CONFIG_DRM=y
|
|
||||||
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
|
|
||||||
CONFIG_DRM_PANEL_SIMPLE=m
|
|
||||||
CONFIG_DRM_TOSHIBA_TC358762=m
|
|
||||||
CONFIG_DRM_V3D=m
|
|
||||||
CONFIG_DRM_VC4=m
|
|
||||||
CONFIG_DRM_VC4_HDMI_CEC=y
|
|
||||||
CONFIG_DRM_SIMPLEDRM=y
|
|
||||||
CONFIG_FB=y
|
|
||||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
|
||||||
CONFIG_SOUND=y
|
|
||||||
CONFIG_SND=y
|
|
||||||
CONFIG_SND_SOC=y
|
|
||||||
CONFIG_SND_BCM2835_SOC_I2S=y
|
|
||||||
CONFIG_HID_GENERIC=m
|
|
||||||
CONFIG_USB=y
|
|
||||||
CONFIG_USB_OTG=y
|
|
||||||
CONFIG_USB_STORAGE=y
|
|
||||||
CONFIG_USB_DWC2=y
|
|
||||||
CONFIG_NOP_USB_XCEIV=y
|
|
||||||
CONFIG_USB_GADGET=y
|
|
||||||
CONFIG_USB_ETH=m
|
|
||||||
CONFIG_USB_ETH_EEM=y
|
|
||||||
CONFIG_USB_G_SERIAL=m
|
|
||||||
CONFIG_MMC=y
|
|
||||||
CONFIG_MMC_SDHCI=y
|
|
||||||
CONFIG_MMC_SDHCI_PLTFM=y
|
|
||||||
CONFIG_MMC_SDHCI_IPROC=y
|
|
||||||
CONFIG_MMC_BCM2835=y
|
|
||||||
CONFIG_NEW_LEDS=y
|
|
||||||
CONFIG_LEDS_CLASS=y
|
|
||||||
CONFIG_LEDS_GPIO=y
|
|
||||||
CONFIG_LEDS_TRIGGERS=y
|
|
||||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
|
||||||
CONFIG_LEDS_TRIGGER_ONESHOT=y
|
|
||||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
|
||||||
CONFIG_LEDS_TRIGGER_CPU=y
|
|
||||||
CONFIG_LEDS_TRIGGER_GPIO=y
|
|
||||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
|
||||||
CONFIG_LEDS_TRIGGER_TRANSIENT=y
|
|
||||||
CONFIG_LEDS_TRIGGER_CAMERA=y
|
|
||||||
CONFIG_DMADEVICES=y
|
|
||||||
CONFIG_DMA_BCM2835=y
|
|
||||||
CONFIG_VIRTIO_PCI=y
|
|
||||||
CONFIG_VIRTIO_BALLOON=y
|
|
||||||
CONFIG_VIRTIO_INPUT=y
|
|
||||||
CONFIG_VIRTIO_MMIO=y
|
|
||||||
CONFIG_STAGING=y
|
|
||||||
CONFIG_SND_BCM2835=m
|
|
||||||
CONFIG_VIDEO_BCM2835=m
|
|
||||||
CONFIG_CLK_RASPBERRYPI=y
|
|
||||||
CONFIG_MAILBOX=y
|
|
||||||
CONFIG_BCM2835_MBOX=y
|
|
||||||
# CONFIG_IOMMU_SUPPORT is not set
|
|
||||||
CONFIG_RASPBERRYPI_POWER=y
|
|
||||||
CONFIG_PWM=y
|
|
||||||
CONFIG_PWM_BCM2835=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_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
|
|
||||||
CONFIG_SQUASHFS_LZO=y
|
|
||||||
CONFIG_SQUASHFS_XZ=y
|
|
||||||
CONFIG_SQUASHFS_ZSTD=y
|
|
||||||
CONFIG_9P_FS=y
|
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
|
||||||
CONFIG_NLS_ISO8859_1=y
|
|
||||||
CONFIG_NLS_UTF8=y
|
|
||||||
CONFIG_CRYPTO_CCM=y
|
|
||||||
CONFIG_CRYPTO_GCM=y
|
|
||||||
# CONFIG_XZ_DEC_ARM is not set
|
|
||||||
# CONFIG_XZ_DEC_ARMTHUMB is not set
|
|
||||||
CONFIG_DMA_CMA=y
|
|
||||||
CONFIG_CMA_SIZE_MBYTES=32
|
|
||||||
CONFIG_PRINTK_TIME=y
|
|
||||||
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
|
|
||||||
CONFIG_FUNCTION_TRACER=y
|
|
||||||
# CONFIG_STRICT_DEVMEM is not set
|
|
||||||
CONFIG_MEMTEST=y
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
config BR2_PACKAGE_RASPBERRYPI_RPI2
|
|
||||||
bool "Raspberry Pi 2 Model B (32-bit ARMv7)"
|
|
||||||
depends on BR2_arm
|
|
||||||
select SDCARD_AUX
|
|
||||||
select BR2_PACKAGE_FEATURE_WIFI
|
|
||||||
select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI
|
|
||||||
select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI_WIFI
|
|
||||||
|
|
||||||
help
|
|
||||||
Support for the 32-bit ARMv7 Raspberry Pi 2B single-board computer
|
|
||||||
(SBC) with BCM2836 quad-core Cortex-A7 processor.
|
|
||||||
|
|
||||||
This was the only Raspberry Pi model with the BCM2836 and the 2B
|
|
||||||
actually got a BCM2837 (Cortex-A53) underclocked an w/o wifi in
|
|
||||||
the v1.2 board revision.
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
Copyright (c) 2025 The KernelKit Authors
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted, provided that the above
|
|
||||||
copyright notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
||||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
||||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
Raspberry Pi 2 Model B
|
|
||||||
======================
|
|
||||||
|
|
||||||
The [Raspberry Pi 2 Model B][1] is a 32-bit ARM single-board computer,
|
|
||||||
powered by the Broadcom BCM2836 quad-core Cortex-A7 processor @ 900 MHz
|
|
||||||
with 1 GB RAM.
|
|
||||||
|
|
||||||
The board features:
|
|
||||||
|
|
||||||
- 4x USB 2.0 ports
|
|
||||||
- Fast Ethernet (100 Mbps)
|
|
||||||
- microSD card slot for storage
|
|
||||||
- HDMI port
|
|
||||||
- GPIO header (40-pin)
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Revision 1.2 of the Pi 2B actually uses a BCM2837 (Cortex-A53) underclocked
|
|
||||||
> and without WiFi, making it very similar to the Pi 3B hardware-wise but
|
|
||||||
> running in 32-bit mode. This revision is not supported.
|
|
||||||
|
|
||||||
How to Build
|
|
||||||
------------
|
|
||||||
|
|
||||||
Since there are no pre-built images for ARM32, you need to build both Infix
|
|
||||||
and the bootloader from source.
|
|
||||||
|
|
||||||
|
|
||||||
1. Clone the repository
|
|
||||||
|
|
||||||
git clone https://github.com/kernelkit/infix.git
|
|
||||||
cd infix
|
|
||||||
|
|
||||||
2. Build the bootloader (in separate tree)
|
|
||||||
|
|
||||||
make O=x-boot rpi2_boot_defconfig
|
|
||||||
make O=x-boot
|
|
||||||
|
|
||||||
3. Build Infix (in another tree)
|
|
||||||
|
|
||||||
make O=x-arm32 aarch32_defconfig
|
|
||||||
make O=x-arm32
|
|
||||||
|
|
||||||
4. Create the SD card image
|
|
||||||
|
|
||||||
./utils/mkimage.sh -b x-boot -r x-arm32 raspberrypi-rpi2
|
|
||||||
|
|
||||||
The resulting image can be found in `x-boot/images/infix-arm-sdcard.img`
|
|
||||||
|
|
||||||
Flashing to SD Card
|
|
||||||
-------------------
|
|
||||||
|
|
||||||
[Flash the image][0] to a microSD card (at least 4 GB):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo dd if=x-boot/images/infix-arm-sdcard.img of=/dev/mmcblk0 \
|
|
||||||
bs=1M status=progress oflag=direct
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also use `bmaptool`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo bmaptool copy x-boot/images/infix-rpi2-sdcard.img /dev/mmcblk0
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> Ensure `/dev/mmcblk0` is the correct device for your SD card and not used by
|
|
||||||
> the host system! Use `lsblk` to verify.
|
|
||||||
|
|
||||||
Booting the Board
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
1. Insert the flashed SD card into the Raspberry Pi
|
|
||||||
2. Connect an Ethernet cable (DHCP will be used to get an IP address)
|
|
||||||
3. Power up the board using a 5V/2.5A micro-USB power supply
|
|
||||||
|
|
||||||
The board will boot and obtain an IP address via DHCP on the Ethernet port.
|
|
||||||
Find the assigned IP and SSH in with the default login credentials, user/pass:
|
|
||||||
`admin` / `admin`.
|
|
||||||
|
|
||||||
Console Port (Optional)
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
A serial console can be useful for debugging. Connect a USB-to-TTL
|
|
||||||
serial adapter (3.3V) to GPIO pins:
|
|
||||||
|
|
||||||
- GND → Pin 6, ground
|
|
||||||
- TxD → Pin 8, GPIO 14
|
|
||||||
- RxD → Pin 10, GPIO 15
|
|
||||||
|
|
||||||
Serial settings: 115200 8N1
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> Use only 3.3V serial adapters. 5V adapters will damage your Raspberry Pi!
|
|
||||||
|
|
||||||
[0]: https://kernelkit.org/posts/flashing-sdcard/
|
|
||||||
[1]: https://www.raspberrypi.com/products/raspberry-pi-2-model-b/
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
mkdir /mnt/primary
|
|
||||||
mount /dev/disk0.primary /mnt/primary
|
|
||||||
|
|
||||||
global.bootm.image="/mnt/primary/boot/zImage"
|
|
||||||
global.bootm.oftree="/mnt/primary/boot/broadcom/bcm2836-rpi-2-b.dtb"
|
|
||||||
global.linux.bootargs.base="quiet console=ttyAMA0,115200 console=tty1 rauc.slot=primary"
|
|
||||||
global.linux.bootargs.dyn.root="root=PARTLABEL=primary rootwait ro"
|
|
||||||
|
|
||||||
bootm
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Barebox configuration for Raspberry Pi 2
|
|
||||||
|
|
||||||
# Boot timeout (seconds)
|
|
||||||
global autoboot_timeout=3
|
|
||||||
|
|
||||||
# Default boot order
|
|
||||||
global boot.default="mmc net"
|
|
||||||
|
|
||||||
# Enable colored output if supported
|
|
||||||
global allow_color=true
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Automount MMC partitions
|
|
||||||
mkdir -p /mnt/mmc
|
|
||||||
automount /mnt/mmc 'mci0.probe=1 && mount /dev/disk0.0 /mnt/mmc'
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Set boot order: try mmc first, then network
|
|
||||||
global.boot.default="mmc net"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Minimal Barebox configuration for Raspberry Pi 2
|
|
||||||
# Basic boot only - A/B partitioning and secure boot to be added later
|
|
||||||
|
|
||||||
# Enable custom embedded environment
|
|
||||||
CONFIG_DEFAULT_ENVIRONMENT=y
|
|
||||||
CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
|
|
||||||
|
|
||||||
# Enable GPT partition table support for hybrid partition tables
|
|
||||||
CONFIG_PARTITION_DISK_EFI=y
|
|
||||||
|
|
||||||
# Enable SquashFS support for reading rootfs
|
|
||||||
CONFIG_FS_SQUASHFS=y
|
|
||||||
CONFIG_FS_SQUASHFS_LZ4=y
|
|
||||||
CONFIG_FS_SQUASHFS_LZO=y
|
|
||||||
CONFIG_FS_SQUASHFS_XZ=y
|
|
||||||
CONFIG_FS_SQUASHFS_ZLIB=y
|
|
||||||
CONFIG_FS_SQUASHFS_ZSTD=y
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Raspberry Pi bootloader (start.elf) configuration
|
|
||||||
#
|
|
||||||
# uart_2ndstage=1 - Enable early boot debug output from the bootloader
|
|
||||||
# Useful for debugging boot failures before Barebox starts
|
|
||||||
# Comment out for production to reduce boot noise
|
|
||||||
|
|
||||||
[all]
|
|
||||||
kernel=barebox-raspberry-pi-2.img
|
|
||||||
|
|
||||||
disable_overscan=1
|
|
||||||
|
|
||||||
enable_uart=1
|
|
||||||
#uart_2ndstage=1
|
|
||||||
|
|
||||||
[pi2]
|
|
||||||
start_file=start.elf
|
|
||||||
fixup_file=fixup.dat
|
|
||||||
|
|
||||||
gpu_mem=100
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
dtb-y += broadcom/bcm2836-rpi-2-b.dtb
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# Placeholder - dtb-y is defined in parent Makefile
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#include <arm/broadcom/bcm2836-rpi-2-b.dts>
|
|
||||||
#include "infix.dtsi"
|
|
||||||
|
|
||||||
/ {
|
|
||||||
/* CMA pool for GPU and video */
|
|
||||||
reserved-memory {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
ranges;
|
|
||||||
|
|
||||||
cma-reserved {
|
|
||||||
compatible = "shared-dma-pool";
|
|
||||||
size = <0x4000000>; /* 64MB */
|
|
||||||
alignment = <0x1000000>; /* 16MB aligned */
|
|
||||||
linux,cma-default;
|
|
||||||
reusable;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0
|
|
||||||
/*
|
|
||||||
* Common Infix OS defaults
|
|
||||||
*/
|
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
infix {
|
|
||||||
/* Default admin user password: 'admin' */
|
|
||||||
factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
image boot.vfat {
|
|
||||||
vfat {
|
|
||||||
files = {
|
|
||||||
#BOOT_FILES#
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
size = 32M
|
|
||||||
}
|
|
||||||
|
|
||||||
image cfg.ext4 {
|
|
||||||
empty = true
|
|
||||||
temporary = true
|
|
||||||
size = 16M
|
|
||||||
|
|
||||||
ext4 {
|
|
||||||
label = "cfg"
|
|
||||||
use-mke2fs = true
|
|
||||||
features = "uninit_bg"
|
|
||||||
extraargs = "-m 0 -i 4096"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# The /var partition will be expanded automatically at first boot
|
|
||||||
# to use the full size of the SD-card or eMMC media.
|
|
||||||
image var.ext4 {
|
|
||||||
empty = true
|
|
||||||
temporary = true
|
|
||||||
size = 128M
|
|
||||||
|
|
||||||
ext4 {
|
|
||||||
label = "var"
|
|
||||||
use-mke2fs = true
|
|
||||||
features = "uninit_bg"
|
|
||||||
extraargs = "-m 0 -i 4096"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
image #INFIX_ID##VERSION#-rpi2-sdcard.img {
|
|
||||||
hdimage {
|
|
||||||
partition-table-type = "hybrid"
|
|
||||||
}
|
|
||||||
|
|
||||||
partition boot {
|
|
||||||
partition-type = 0xc
|
|
||||||
bootable = "true"
|
|
||||||
image = "boot.vfat"
|
|
||||||
}
|
|
||||||
|
|
||||||
partition aux {
|
|
||||||
partition-type-uuid = srv
|
|
||||||
image = "aux.ext4"
|
|
||||||
}
|
|
||||||
|
|
||||||
partition primary {
|
|
||||||
partition-type-uuid = linux
|
|
||||||
bootable = "true"
|
|
||||||
size = 250M
|
|
||||||
image = "rootfs.squashfs"
|
|
||||||
}
|
|
||||||
|
|
||||||
partition secondary {
|
|
||||||
partition-type-uuid = linux
|
|
||||||
bootable = "true"
|
|
||||||
size = 250M
|
|
||||||
image = "rootfs.squashfs"
|
|
||||||
}
|
|
||||||
|
|
||||||
partition cfg {
|
|
||||||
partition-type-uuid = srv
|
|
||||||
image = "cfg.ext4"
|
|
||||||
}
|
|
||||||
|
|
||||||
partition var {
|
|
||||||
partition-type-uuid = var
|
|
||||||
image = "var.ext4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
# Raspberry Pi 2 Model B specific kernel configuration
|
|
||||||
define RASPBERRYPI_RPI2_LINUX_CONFIG_FIXUPS
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SOUND)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SND)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SND_SOC)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_MOUSE)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_KEYBOARD)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_INPUT_TOUCHSCREEN)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_INPUT_MOUSEDEV,m)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_HID_GENERIC,m)
|
|
||||||
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_BCM)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_ARCH_BCM2835)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_BCM2835_MBOX,y)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BCM2835_WDT)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DMA_BCM2835)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_RASPBERRYPI_FIRMWARE)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_PINCTRL_BCM2835)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_GPIO_BCM2835)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_BRCMFMAC,m)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BRCMFMAC_SDIO)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_I2C_BCM2835,m)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_BCM2835_THERMAL,m)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_MMC_BCM2835)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_RASPBERRYPI_POWER)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_CONSOLE)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_BCM2835AUX)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_EXTENDED)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_8250_SHARE_IRQ)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_VENDOR_BROADCOM)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_SMSC911X,y)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_REGULATOR_GPIO,y)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_COMMON_CLK_BCM2835)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CLK_RASPBERRYPI)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_KMS_HELPER)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_DRM_V3D,m)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_DRM_VC4,m)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_STAGING,y)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_SND_BCM2835,m)
|
|
||||||
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_VC4_HDMI_CEC)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_LOAD_EDID_FIRMWARE)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_PANEL_BRIDGE)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_BRIDGE)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_DRM_TOSHIBA_TC358762,m)
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_DRM_PANEL_SIMPLE,m)
|
|
||||||
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FB)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FRAMEBUFFER_CONSOLE)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY)
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DRM_FBDEV_EMULATION)
|
|
||||||
|
|
||||||
$(call KCONFIG_SET_OPT,CONFIG_TOUCHSCREEN_EDT_FT5X06,m)
|
|
||||||
|
|
||||||
$(call KCONFIG_ENABLE_OPT,CONFIG_BACKLIGHT_CLASS_DEVICE)
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(ix-board))
|
|
||||||
$(eval $(generic-package))
|
|
||||||
-206
@@ -1,206 +0,0 @@
|
|||||||
{
|
|
||||||
"ieee802-dot1ab-lldp:lldp": {
|
|
||||||
"infix-lldp:enabled": true
|
|
||||||
},
|
|
||||||
"ietf-hardware:hardware": {
|
|
||||||
"component": [
|
|
||||||
{
|
|
||||||
"name": "USB",
|
|
||||||
"class": "infix-hardware:usb",
|
|
||||||
"state": {
|
|
||||||
"admin-state": "unlocked"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"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": "eth0",
|
|
||||||
"type": "infix-if-type:ethernet",
|
|
||||||
"ietf-ip:ipv4": {
|
|
||||||
"infix-dhcp-client:dhcp": {
|
|
||||||
"option": [
|
|
||||||
{"id": "netmask"},
|
|
||||||
{"id": "broadcast"},
|
|
||||||
{"id": "router"},
|
|
||||||
{"id": "domain"},
|
|
||||||
{"id": "hostname"},
|
|
||||||
{"id": "dns-server"},
|
|
||||||
{"id": "ntp-server"},
|
|
||||||
{"id": "vendor-class", "value": "Raspberry Pi 2 Model B"}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"ietf-keystore:keystore": {
|
|
||||||
"asymmetric-keys": {
|
|
||||||
"asymmetric-key": [
|
|
||||||
{
|
|
||||||
"name": "genkey",
|
|
||||||
"public-key-format": "infix-crypto-types:ssh-public-key-format",
|
|
||||||
"public-key": "",
|
|
||||||
"private-key-format": "infix-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": "rpi-%m",
|
|
||||||
"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": "Li0tLS0tLS0uCnwgIC4gLiAgfCBJbmZpeCBPUyDigJQgSW1tdXRhYmxlLkZyaWVuZGx5LlNlY3VyZQp8LS4gdiAuLXwgaHR0cHM6Ly9rZXJuZWxraXQub3JnCictJy0tLSctJwo="
|
|
||||||
},
|
|
||||||
"infix-meta:meta": {
|
|
||||||
"version": "1.6"
|
|
||||||
},
|
|
||||||
"infix-services:mdns": {
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
"infix-services:web": {
|
|
||||||
"enabled": true,
|
|
||||||
"console": {
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
"netbrowse": {
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
"restconf": {
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"infix-services:ssh": {
|
|
||||||
"enabled": true,
|
|
||||||
"hostkey": [
|
|
||||||
"genkey"
|
|
||||||
],
|
|
||||||
"listen": [
|
|
||||||
{
|
|
||||||
"name": "ipv4",
|
|
||||||
"address": "0.0.0.0",
|
|
||||||
"port": 22
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "ipv6",
|
|
||||||
"address": "::",
|
|
||||||
"port": 22
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-8
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"eth0": {
|
|
||||||
"phy-detached-when-down": true
|
|
||||||
},
|
|
||||||
"@ethtool:driver=smsc95xx": {
|
|
||||||
"broken-flow-control": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# CONFIG_MMC_PCI is not set
|
|
||||||
CONFIG_OF_OVERLAY_LIST="rpi-env infix-key"
|
|
||||||
# CONFIG_ENV_IS_IN_FAT is not set
|
|
||||||
|
|
||||||
# Increase early malloc heap to handle DTB with embedded scripts
|
|
||||||
CONFIG_SYS_MALLOC_F_LEN=0x2000
|
|
||||||
|
|
||||||
# Compression support needed for SquashFS
|
|
||||||
CONFIG_LZ4=y
|
|
||||||
CONFIG_LZMA=y
|
|
||||||
CONFIG_CMD_LZMADEC=y
|
|
||||||
CONFIG_CMD_UNLZ4=y
|
|
||||||
CONFIG_CMD_UNZIP=y
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
/dts-v1/;
|
|
||||||
/plugin/;
|
|
||||||
|
|
||||||
&{/} {
|
|
||||||
config {
|
|
||||||
environment {
|
|
||||||
vendor = "infix";
|
|
||||||
preboot = "run ixpreboot";
|
|
||||||
ixbootdelay = "0.5";
|
|
||||||
bootdelay = "-2";
|
|
||||||
bootmenu_delay = "10";
|
|
||||||
boot_targets = "mmc0";
|
|
||||||
ethprime = "eth0";
|
|
||||||
bootcmd = "run ixboot";
|
|
||||||
|
|
||||||
ixpreboot = /incbin/("scripts/ixpreboot.sh");
|
|
||||||
ixbtn-devmode = "setenv dev_mode yes; echo Enabled";
|
|
||||||
ixbtn-factory = "echo \"No button available, use bootmenu\"";
|
|
||||||
ixfactory = /incbin/("scripts/ixfactory.sh");
|
|
||||||
|
|
||||||
ixboot = /incbin/("scripts/ixboot.sh");
|
|
||||||
ixbootslot = /incbin/("scripts/ixbootslot.sh");
|
|
||||||
ixprepblk = /incbin/("scripts/ixprepblk.sh");
|
|
||||||
ixprepdhcp = /incbin/("scripts/ixprepdhcp.sh");
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,229 +1,27 @@
|
|||||||
# Banana Pi BPI-R3
|
# Banana Pi R3
|
||||||
|
|
||||||
|
## Support level
|
||||||
|
Full support for all Infix enabled features including switched ethernet ports, WiFi,
|
||||||
|
and SFP interfaces. The board includes comprehensive hardware support for
|
||||||
|
MediaTek MT7986 SoC features.
|
||||||
|
|
||||||
|
### Hardware features
|
||||||
|
The Banana Pi R3 is a high-performance networking board featuring:
|
||||||
|
- MediaTek MT7986 ARM Cortex-A53 quad-core processor
|
||||||
|
- 4x Gigabit LAN ports (lan1-lan4)
|
||||||
|
- 1x Gigabit WAN port
|
||||||
|
- 2x SFP ports (sfp1, sfp2) for fiber connectivity
|
||||||
|
- Dual WiFi interfaces (wifi0 for 2.4GHz, wifi1 for 5GHz)
|
||||||
|
- USB support
|
||||||
|
- SD card boot support
|
||||||
|
|
||||||
|
### Network configuration
|
||||||
|
The board comes preconfigured with:
|
||||||
|
- 4 switched LAN ports for internal networking
|
||||||
|
- Dedicated WAN port with DHCP client enabled
|
||||||
|
- SFP ports for high-speed fiber connections
|
||||||
|
- Dual WiFi interfaces for wireless connectivity
|
||||||
|
|
||||||
|
### Pre-built images
|
||||||
|
SD card image: [infix-bpi-r3-sdcard.img](https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r3-sdcard.img)
|
||||||
|
|
||||||
<img src="bananapi-bpi-r3.webp" alt="The board" width=800 padding=10>
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
The Banana Pi R3 is a high-performance networking board with full Infix
|
|
||||||
support for all enabled features including switched Ethernet ports, WiFi,
|
|
||||||
and SFP interfaces.
|
|
||||||
|
|
||||||
### Hardware Features
|
|
||||||
|
|
||||||
- MediaTek MT7986 ARM Cortex-A53 quad-core processor @ 2.0 GHz
|
|
||||||
- 2 GB DDR4 RAM
|
|
||||||
- 8 GB eMMC storage + microSD card slot
|
|
||||||
- 5x Gigabit Ethernet ports (4x LAN, 1x WAN)
|
|
||||||
- 2x SFP cages for fiber connectivity (1G/2.5G)
|
|
||||||
- Dual-band WiFi (2.4 GHz + 5 GHz)
|
|
||||||
- USB 3.0 port
|
|
||||||
- Mini PCIe slot
|
|
||||||
|
|
||||||
### Default Network Configuration
|
|
||||||
|
|
||||||
Infix comes preconfigured with:
|
|
||||||
|
|
||||||
- **LAN ports** (lan1-lan4): Bridged for internal networking
|
|
||||||
- **WAN port**: DHCP client enabled for internet connectivity
|
|
||||||
- **SFP ports** (sfp1, sfp2): Available for configuration
|
|
||||||
- **WiFi interfaces** (wifi0, wifi1): Available for configuration
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
### Quick Start with SD Card
|
|
||||||
|
|
||||||
The easiest way to get started is using an SD card:
|
|
||||||
|
|
||||||
1. **Download the SD card image:** [infix-bpi-r3-sdcard.img][2]
|
|
||||||
2. **Flash the image to an SD card:** see [this guide][0]
|
|
||||||
3. **Set boot switches:**
|
|
||||||
- Set DIP switches to **0000** (SD card boot mode)
|
|
||||||
- Switch positions are on the underside of the board near the SD slot
|
|
||||||
4. **Boot the board:**
|
|
||||||
- Insert the SD card
|
|
||||||
- Connect power
|
|
||||||
- Connect to LAN port or console (115200 8N1)
|
|
||||||
- Default login: `admin` / `admin`
|
|
||||||
|
|
||||||
### Boot Switch Reference
|
|
||||||
|
|
||||||
The BPI-R3 has a 4-position DIP switch that controls boot media:
|
|
||||||
|
|
||||||
<img align="right" src="bootstrap-switch.webp" alt="DIP switches" width=200 padding=10>
|
|
||||||
|
|
||||||
| Position | Mode | Description |
|
|
||||||
|----------|-------------|---------------------------------------|
|
|
||||||
| 0000 | SD card | Boot from microSD card (recommended) |
|
|
||||||
| 0110 | eMMC | Boot from internal eMMC storage |
|
|
||||||
| 1010 | SPI NAND | Boot from SPI NAND (advanced users) |
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Switch position is read from left to right: "0" = OFF, "1" = ON.
|
|
||||||
> When the DIP switch is in the "UP" position it is OFF(0).
|
|
||||||
|
|
||||||
## Advanced: Installing to eMMC
|
|
||||||
|
|
||||||
For production deployments or better performance, you can install Infix
|
|
||||||
to the internal eMMC storage. This is more complex but provides faster
|
|
||||||
boot times and eliminates the external SD card.
|
|
||||||
|
|
||||||
### Why Use eMMC?
|
|
||||||
|
|
||||||
**Advantages:**
|
|
||||||
|
|
||||||
- Faster boot and better performance
|
|
||||||
- No external SD card to manage
|
|
||||||
- More robust for industrial/embedded deployments
|
|
||||||
|
|
||||||
**Disadvantages:**
|
|
||||||
|
|
||||||
- More complex installation process
|
|
||||||
- Requires intermediate NAND boot step
|
|
||||||
- Harder to recover from errors
|
|
||||||
|
|
||||||
### Prerequisites
|
|
||||||
|
|
||||||
- FTDI USB-to-serial cable (3.3V) for console access
|
|
||||||
- microSD card with Infix (for initial boot)
|
|
||||||
- USB flash drive (FAT32 formatted)
|
|
||||||
- Downloaded files (see below)
|
|
||||||
|
|
||||||
### Required Files
|
|
||||||
|
|
||||||
Download and place these files on a FAT32-formatted USB drive:
|
|
||||||
|
|
||||||
1. **Intermediate NAND bootloader** (from Frank-W's U-Boot):
|
|
||||||
- [bpi-r3_spim-nand_bl2.img][5] (BL2 loader)
|
|
||||||
- [bpi-r3_spim-nand_fip.bin][6] (FIP image)
|
|
||||||
2. **Infix eMMC image:**
|
|
||||||
- [infix-bpi-r3-emmc.img][3] (Complete system image)
|
|
||||||
3. **eMMC bootloader** (extracted from):
|
|
||||||
- [bpi-r3-emmc-boot-2025.01-latest.tar.gz][4]
|
|
||||||
- Extract `bl2.img` from the tarball to your USB drive
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> The following process involves multiple boot mode changes. Take your
|
|
||||||
> time verify each step carefully.
|
|
||||||
|
|
||||||
### Installation Steps
|
|
||||||
|
|
||||||
#### Step 1: Boot from SD card
|
|
||||||
|
|
||||||
1. Set boot switches to **0000** (SD card mode)
|
|
||||||
2. Insert SD card with Infix
|
|
||||||
3. Power on and break into U-Boot (press Ctrl-C during boot)
|
|
||||||
|
|
||||||
#### Step 2: Flash intermediate NAND bootloader
|
|
||||||
|
|
||||||
This step installs a temporary bootloader to NAND that will help us
|
|
||||||
flash the eMMC. From the U-Boot prompt:
|
|
||||||
|
|
||||||
```
|
|
||||||
usb start
|
|
||||||
mtd erase spi-nand0
|
|
||||||
fatload usb 0:1 0x50000000 bpi-r3_spim-nand_bl2.img
|
|
||||||
mtd write spi-nand0 0x50000000 0x0 0x100000
|
|
||||||
fatload usb 0:1 0x50000000 bpi-r3_spim-nand_fip.bin
|
|
||||||
mtd write spi-nand0 0x50000000 0x380000 0x200000
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Step 3: Boot from NAND
|
|
||||||
|
|
||||||
1. Power off the board
|
|
||||||
2. Set boot switches to **1010** (NAND mode)
|
|
||||||
3. Power on - you should boot into U-Boot again
|
|
||||||
|
|
||||||
#### Step 4: Write Infix image to eMMC
|
|
||||||
|
|
||||||
From the U-Boot prompt:
|
|
||||||
|
|
||||||
```
|
|
||||||
usb start
|
|
||||||
fatload usb 0:1 0x50000000 infix-bpi-r3-emmc.img
|
|
||||||
setexpr blocks ${filesize} / 0x200
|
|
||||||
mmc write 0x50000000 0x0 ${blocks}
|
|
||||||
```
|
|
||||||
|
|
||||||
This writes the complete Infix system (partitions, rootfs, etc.) to eMMC.
|
|
||||||
|
|
||||||
#### Step 5: Configure eMMC boot
|
|
||||||
|
|
||||||
Now configure the eMMC boot partition and write the bootloader:
|
|
||||||
|
|
||||||
```
|
|
||||||
mmc partconf 0 1 1 1
|
|
||||||
mmc erase 0x0 0x400
|
|
||||||
fatload usb 0:1 0x50000000 bl2.img
|
|
||||||
mmc write 0x50000000 0x0 0x400
|
|
||||||
mmc partconf 0 1 1 0
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Step 6: Boot from eMMC
|
|
||||||
|
|
||||||
1. Power off the board
|
|
||||||
2. Set boot switches to **0110** (eMMC mode)
|
|
||||||
3. Remove SD card (optional, but recommended to verify eMMC boot)
|
|
||||||
4. Power on
|
|
||||||
|
|
||||||
Your BPI-R3 should now boot Infix from internal eMMC storage!
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
### Board won't boot
|
|
||||||
|
|
||||||
- Verify boot switch positions (check twice!)
|
|
||||||
- Ensure power supply provides adequate current (12V/2A recommended)
|
|
||||||
- Try booting from SD card with switches at **0000**
|
|
||||||
|
|
||||||
### Can't break into U-Boot
|
|
||||||
|
|
||||||
- Ensure serial console is connected properly (115200 8N1, 3.3V)
|
|
||||||
- Press Ctrl-C immediately when you see boot messages
|
|
||||||
- Try power cycling and pressing Ctrl-C repeatedly
|
|
||||||
|
|
||||||
### eMMC boot fails after installation
|
|
||||||
|
|
||||||
- Boot from NAND (**1010**) and verify eMMC image was written
|
|
||||||
- Check USB drive contents - ensure all files are present
|
|
||||||
- Re-run Step 5 (eMMC boot configuration)
|
|
||||||
|
|
||||||
### Reverting to SD card
|
|
||||||
|
|
||||||
Simply set boot switches back to **0000** and boot from SD card. The
|
|
||||||
eMMC installation does not affect SD card functionality.
|
|
||||||
|
|
||||||
## Additional Resources
|
|
||||||
|
|
||||||
- [Infix Documentation][1]
|
|
||||||
- [Official BPI-R3 Wiki][7]
|
|
||||||
- [Release Downloads][8]
|
|
||||||
|
|
||||||
## Building Custom Images
|
|
||||||
|
|
||||||
See the main Infix documentation for building from source. To build both
|
|
||||||
SD card and eMMC images locally:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build bootloaders for both SD and eMMC
|
|
||||||
make x-bpi-r3-sd-boot
|
|
||||||
make x-bpi-r3-emmc-boot
|
|
||||||
|
|
||||||
# Build main system
|
|
||||||
make aarch64
|
|
||||||
|
|
||||||
# Create SD card image
|
|
||||||
./utils/mkimage.sh -od bananapi-bpi-r3
|
|
||||||
|
|
||||||
# Create eMMC image
|
|
||||||
./utils/mkimage.sh -odt emmc bananapi-bpi-r3
|
|
||||||
```
|
|
||||||
|
|
||||||
[0]: https://kernelkit.org/posts/flashing-sdcard/
|
|
||||||
[1]: https://kernelkit.org/infix/latest/
|
|
||||||
[2]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r3-sdcard.img
|
|
||||||
[3]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-bpi-r3-emmc.img
|
|
||||||
[4]: https://github.com/kernelkit/infix/releases/download/latest-boot/bpi-r3-emmc-boot-2025.01-latest.tar.gz
|
|
||||||
[5]: https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-10-bpi-2025.10-2025-10-13_1032/bpi-r3_spim-nand_bl2.img
|
|
||||||
[6]: https://github.com/frank-w/u-boot/releases/download/CI-BUILD-2025-10-bpi-2025.10-2025-10-13_1032/bpi-r3_spim-nand_fip.bin
|
|
||||||
[7]: https://wiki.banana-pi.org/Banana_Pi_BPI-R3
|
|
||||||
[8]: https://github.com/kernelkit/infix/releases/tag/latest-boot
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 108 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB |
@@ -1 +1 @@
|
|||||||
dtb-y += mediatek/mt7986a-bananapi-bpi-r3-sd.dtb mediatek/mt7986a-bananapi-bpi-r3-emmc.dtb
|
dtb-y += mediatek/mt7986a-bananapi-bpi-r3-sd.dtb
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
#include "mt7986a-bananapi-bpi-r3.dtsi"
|
|
||||||
#include "mt7986a-bananapi-bpi-r3-emmc.dtsi"
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2021 MediaTek Inc.
|
|
||||||
* Author: Sam.Shih <sam.shih@mediatek.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
This is copied from linux where it is an overlay, unfortunatly it is not
|
|
||||||
possible to use dtbo in sysboot unless present in syslinux.conf
|
|
||||||
*/
|
|
||||||
&{/soc/mmc@11230000} {
|
|
||||||
bus-width = <8>;
|
|
||||||
max-frequency = <200000000>;
|
|
||||||
cap-mmc-highspeed;
|
|
||||||
mmc-hs200-1_8v;
|
|
||||||
mmc-hs400-1_8v;
|
|
||||||
hs400-ds-delay = <0x14014>;
|
|
||||||
non-removable;
|
|
||||||
no-sd;
|
|
||||||
no-sdio;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
@@ -24,7 +24,7 @@ image var.ext4 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
image #INFIX_ID##VERSION#-bpi-r3-#TARGET#.img {
|
image #INFIX_ID##VERSION#-bpi-r3-sdcard.img {
|
||||||
hdimage {
|
hdimage {
|
||||||
partition-table-type = "gpt"
|
partition-table-type = "gpt"
|
||||||
|
|
||||||
|
|||||||
+2
-13
@@ -99,6 +99,7 @@
|
|||||||
{
|
{
|
||||||
"name": "wan",
|
"name": "wan",
|
||||||
"type": "infix-if-type:ethernet",
|
"type": "infix-if-type:ethernet",
|
||||||
|
"ietf-ip:ipv6": {},
|
||||||
"ietf-ip:ipv4": {
|
"ietf-ip:ipv4": {
|
||||||
"infix-dhcp-client:dhcp": {
|
"infix-dhcp-client:dhcp": {
|
||||||
"option": [
|
"option": [
|
||||||
@@ -108,18 +109,7 @@
|
|||||||
{"id": "hostname"},
|
{"id": "hostname"},
|
||||||
{"id": "dns-server"},
|
{"id": "dns-server"},
|
||||||
{"id": "router"},
|
{"id": "router"},
|
||||||
{"id": "netmask"},
|
{"id": "netmask"}
|
||||||
{"id": "vendor-class", "value": "Banana Pi BPI-R3"}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ietf-ip:ipv6": {
|
|
||||||
"infix-dhcpv6-client:dhcp": {
|
|
||||||
"option": [
|
|
||||||
{"id": "ntp-server"},
|
|
||||||
{"id": "client-fqdn"},
|
|
||||||
{"id": "domain-search"},
|
|
||||||
{"id": "dns-server"}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -293,7 +283,6 @@
|
|||||||
"policy": [
|
"policy": [
|
||||||
{
|
{
|
||||||
"name": "lan-to-wan",
|
"name": "lan-to-wan",
|
||||||
"action": "accept",
|
|
||||||
"ingress": [
|
"ingress": [
|
||||||
"lan"
|
"lan"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
CONFIG_DEVICE_TREE_INCLUDES="infix-env.dtsi infix-key.dtsi mt7986-emmc-env.dtsi"
|
|
||||||
BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="BOOT_DEVICE=emmc DRAM_USE_DDR4=1 USE_MKIMAGE=1 MKIMAGE=$(HOST_DIR)/bin/mkimage"
|
|
||||||
CONFIG_SUPPORT_EMMC_BOOT=y
|
|
||||||
@@ -7,27 +7,6 @@ CONFIG_USB=y
|
|||||||
CONFIG_USB_XHCI_HCD=y
|
CONFIG_USB_XHCI_HCD=y
|
||||||
CONFIG_USB_XHCI_MTK=y
|
CONFIG_USB_XHCI_MTK=y
|
||||||
CONFIG_USB_MTU3=y
|
CONFIG_USB_MTU3=y
|
||||||
|
CONFIG_CMD_USB=y
|
||||||
CONFIG_PHY=y
|
CONFIG_PHY=y
|
||||||
CONFIG_PHY_MTK_TPHY=y
|
CONFIG_PHY_MTK_TPHY=y
|
||||||
|
|
||||||
CONFIG_MTK_SPIM=y
|
|
||||||
CONFIG_SPI=y
|
|
||||||
CONFIG_DM_SPI=y
|
|
||||||
CONFIG_SPI_FLASH=y
|
|
||||||
CONFIG_DM_SPI_FLASH=y
|
|
||||||
CONFIG_SPI_FLASH_MTD=y
|
|
||||||
CONFIG_SPI_FLASH_MACRONIX=y
|
|
||||||
CONFIG_SPI_FLASH_WINBOND=y
|
|
||||||
CONFIG_SPI_FLASH_GIGADEVICE=y
|
|
||||||
CONFIG_MTD=y
|
|
||||||
CONFIG_DM_MTD=y
|
|
||||||
CONFIG_MTD_PARTITIONS=y
|
|
||||||
CONFIG_MTD_SPI_NAND=y
|
|
||||||
CONFIG_MTK_SPIM=y
|
|
||||||
CONFIG_MTK_SNOR=y
|
|
||||||
|
|
||||||
CONFIG_CMD_SF=y
|
|
||||||
CONFIG_CMD_USB=y
|
|
||||||
CONFIG_CMD_MTD=y
|
|
||||||
CONFIG_CMD_MTDPARTS=y
|
|
||||||
CONFIG_CMD_DM=y
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
#include <mt7986-env.dtsi>
|
|
||||||
|
|
||||||
&env {
|
|
||||||
fdtfile = "mediatek/mt7986a-bananapi-bpi-r3-emmc.dtb";
|
|
||||||
};
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/board/aarch64/*/*.mk))
|
|
||||||
|
|
||||||
.PHONY: board-enable-qemu-uboot
|
.PHONY: board-enable-qemu-uboot
|
||||||
board-enable-qemu-uboot:
|
board-enable-qemu-uboot:
|
||||||
@@ -20,6 +19,13 @@ board-enable-qemu-uboot:
|
|||||||
'$$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config' \
|
'$$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/extras.config' \
|
||||||
--enable TARGET_UBOOT_FORMAT_DTB
|
--enable TARGET_UBOOT_FORMAT_DTB
|
||||||
|
|
||||||
|
.PHONY: board-enable-sparx-fit
|
||||||
|
board-enable-sparx-fit:
|
||||||
|
@$(call IXMSG,"Enabling SparX-5i compatible FIT options")
|
||||||
|
@BR2_PREFIX= ./utils/config --file $(BR2_CONFIG) \
|
||||||
|
--enable FIT_IMAGE \
|
||||||
|
--set-str FIT_KERNEL_LOAD_ADDR "0x7 0x00000000"
|
||||||
|
|
||||||
.PHONY: board-sparx-flash-uboot
|
.PHONY: board-sparx-flash-uboot
|
||||||
board-sparx-flash-uboot: $(BINARIES_DIR)/u-boot.bin
|
board-sparx-flash-uboot: $(BINARIES_DIR)/u-boot.bin
|
||||||
@grep -q 'BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mscc_fireant_pcb135_emmc"' $(BR2_CONFIG) || \
|
@grep -q 'BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mscc_fireant_pcb135_emmc"' $(BR2_CONFIG) || \
|
||||||
|
|||||||
+2
-13
@@ -58,6 +58,7 @@
|
|||||||
{
|
{
|
||||||
"name": "wan",
|
"name": "wan",
|
||||||
"type": "infix-if-type:ethernet",
|
"type": "infix-if-type:ethernet",
|
||||||
|
"ietf-ip:ipv6": {},
|
||||||
"ietf-ip:ipv4": {
|
"ietf-ip:ipv4": {
|
||||||
"infix-dhcp-client:dhcp": {
|
"infix-dhcp-client:dhcp": {
|
||||||
"option": [
|
"option": [
|
||||||
@@ -67,18 +68,7 @@
|
|||||||
{"id": "hostname"},
|
{"id": "hostname"},
|
||||||
{"id": "dns-server"},
|
{"id": "dns-server"},
|
||||||
{"id": "router"},
|
{"id": "router"},
|
||||||
{"id": "netmask"},
|
{"id": "netmask"}
|
||||||
{"id": "vendor-class", "value": "NanoPi R2S"}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ietf-ip:ipv6": {
|
|
||||||
"infix-dhcpv6-client:dhcp": {
|
|
||||||
"option": [
|
|
||||||
{"id": "ntp-server"},
|
|
||||||
{"id": "client-fqdn"},
|
|
||||||
{"id": "domain-search"},
|
|
||||||
{"id": "dns-server"}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -244,7 +234,6 @@
|
|||||||
"policy": [
|
"policy": [
|
||||||
{
|
{
|
||||||
"name": "lan-to-wan",
|
"name": "lan-to-wan",
|
||||||
"action": "accept",
|
|
||||||
"ingress": [
|
"ingress": [
|
||||||
"lan"
|
"lan"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,322 +1,59 @@
|
|||||||
# Raspberry Pi 3B/4B/CM4
|
# Raspberry Pi 3B/4B
|
||||||
|
|
||||||
## Overview
|
## Support level
|
||||||
|
|
||||||
The Raspberry Pi is one of the most popular single-board computers with full
|
Full support for base board but not any extension board on the GPIOs.
|
||||||
Infix support for networking features, making it an excellent platform for
|
Other RPi boards of the same generation may work as well, but may need
|
||||||
learning, prototyping, and lightweight network applications.
|
some additional testing/work. A few CM4 variants have been tested and
|
||||||
|
seem to work as expected, but YMMV as always.
|
||||||
|
|
||||||
### Hardware Features
|
### Touch screen
|
||||||
|
|
||||||
**Raspberry Pi 3B:**
|
The [Raspberry Pi touch display v1][0] is supported on the 4B, including
|
||||||
|
touch functionality. There are multiple touchscreens on the market for
|
||||||
|
Raspberry Pi, but currently only the official first version with 800x480
|
||||||
|
resolution is supported. Infix supplies all drivers required to utilize
|
||||||
|
the hardware, but you need to add the actual graphical application in a
|
||||||
|
container.
|
||||||
|
|
||||||
- Broadcom BCM2837B0 ARM Cortex-A53 quad-core processor @ 1.4 GHz
|
There are some important considerations you need to know about when
|
||||||
- 1 GB LPDDR2 RAM
|
using Infix for graphical applications. The container needs access to
|
||||||
- microSD card slot for storage
|
`/dev/dri/` to be able to access the graphics card, it also need access
|
||||||
- 4x USB 2.0 ports
|
to `/run/udev` to be able to find the input devices.
|
||||||
- Fast Ethernet (100 Mbps)
|
|
||||||
- Dual-band WiFi (2.4 GHz + 5 GHz) and Bluetooth 4.2
|
|
||||||
- HDMI port
|
|
||||||
- GPIO header (40-pin)
|
|
||||||
|
|
||||||
**Raspberry Pi 4B:**
|
Example of running Doom in Infix:
|
||||||
|
|
||||||
- Broadcom BCM2711 ARM Cortex-A72 quad-core processor @ 1.5 GHz
|
|
||||||
- 1 GB, 2 GB, 4 GB, or 8 GB LPDDR4 RAM (depending on model)
|
|
||||||
- microSD card slot for storage
|
|
||||||
- 2x USB 3.0 + 2x USB 2.0 ports
|
|
||||||
- Gigabit Ethernet
|
|
||||||
- Dual-band WiFi (2.4 GHz + 5 GHz) and Bluetooth 5.0
|
|
||||||
- 2x micro-HDMI ports (up to 4K output)
|
|
||||||
- GPIO header (40-pin)
|
|
||||||
- PoE support (with add-on HAT)
|
|
||||||
|
|
||||||
**Compute Module 4 (CM4):**
|
|
||||||
|
|
||||||
- Same processor as Pi 4B
|
|
||||||
- Compact form factor for embedded applications
|
|
||||||
- Optional eMMC storage (0 GB, 8 GB, 16 GB, or 32 GB)
|
|
||||||
- Requires carrier board for I/O connectivity
|
|
||||||
- Various configurations tested and working
|
|
||||||
|
|
||||||
### Default Network Configuration
|
|
||||||
|
|
||||||
Infix comes preconfigured with:
|
|
||||||
|
|
||||||
- **Ethernet port**: DHCP client enabled for internet connectivity
|
|
||||||
- **WiFi interfaces** (wlan0, wlan1): Available for configuration as AP or client
|
|
||||||
- **GPIO**: Available but extension boards not currently supported
|
|
||||||
|
|
||||||
### Support Level
|
|
||||||
|
|
||||||
Full support for base board networking and core functionality. GPIO extension
|
|
||||||
boards (HATs) are not currently supported. Other Raspberry Pi boards of the
|
|
||||||
same generation may work but may require additional testing.
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
### Quick Start with SD Card
|
|
||||||
|
|
||||||
The easiest way to get started is using a microSD card:
|
|
||||||
|
|
||||||
1. **Download the SD card image:** [infix-rpi64-sdcard.img][2]
|
|
||||||
2. **Flash the image to a microSD card:** see [this guide][0]
|
|
||||||
3. **Boot the board:**
|
|
||||||
- Insert the microSD card into your Raspberry Pi
|
|
||||||
- Connect an Ethernet cable to your network
|
|
||||||
- Connect power (see [Power Supply Requirements](#power-supply-requirements))
|
|
||||||
- The board will boot automatically
|
|
||||||
4. **Connect and login:**
|
|
||||||
- SSH to the DHCP-assigned IP address
|
|
||||||
- Default login: `admin` / `admin`
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Raspberry Pi 3B and 4B boot with a factory configuration (`factory-config.cfg`)
|
|
||||||
> that enables DHCP client on the Ethernet port. This means you can access
|
|
||||||
> the device over the network without needing a serial console. Simply find
|
|
||||||
> the assigned IP address and SSH in!
|
|
||||||
>
|
|
||||||
> **Compute Module 4 (CM4)** and some other variants do not have this factory
|
|
||||||
> configuration, so you'll need to use a serial console for initial setup or
|
|
||||||
> configure the carrier board accordingly.
|
|
||||||
|
|
||||||
### First Boot Notes
|
|
||||||
|
|
||||||
On first boot, Infix will:
|
|
||||||
|
|
||||||
- Obtain an IP address via DHCP on the Ethernet port
|
|
||||||
- Generate unique SSH host keys
|
|
||||||
- Initialize the configuration system
|
|
||||||
|
|
||||||
You can find the assigned IP address by:
|
|
||||||
|
|
||||||
- Checking your DHCP server/router's client list
|
|
||||||
- Using network scanning tools like `nmap` or `arp-scan`
|
|
||||||
- Connecting via serial console and running `ip addr` (if needed)
|
|
||||||
|
|
||||||
## Hardware-Specific Features
|
|
||||||
|
|
||||||
### WiFi Configuration
|
|
||||||
|
|
||||||
Both Pi 3B and Pi 4B include dual-band WiFi that can be configured as a
|
|
||||||
client (station mode). See the [Infix WiFi documentation][9] for detailed
|
|
||||||
configuration examples.
|
|
||||||
|
|
||||||
To configure WiFi as a client, first store your WiFi password in the keystore:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
admin@infix:/> configure
|
admin@example:/> configure
|
||||||
admin@infix:/config/> edit keystore symmetric-key mywifi
|
admin@example:/config/> edit container doom
|
||||||
admin@infix:/config/keystore/…/mywifi/> set key-format wifi-preshared-key-format
|
admin@example:/config/container/doom/> set image docker://mattiaswal/alpine-doom:latest
|
||||||
admin@infix:/config/keystore/…/mywifi/> set cleartext-key YourWiFiPassword
|
admin@example:/config/container/doom/> set privileged
|
||||||
admin@infix:/config/keystore/…/mywifi/> leave
|
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/
|
||||||
Then configure the WiFi interface using the keystore reference:
|
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@infix:/> configure
|
admin@example:/config/container/doom/mount/xorg.conf/> set target /etc/X11/xorg.conf
|
||||||
admin@infix:/config/> edit interface wifi0
|
admin@example:/config/container/doom/mount/xorg.conf/> end
|
||||||
admin@infix:/config/interface/wifi0/> set ipv4 dhcp-client
|
admin@example:/config/container/doom/> edit volume var
|
||||||
admin@infix:/config/interface/wifi0/> set wifi ssid YourNetworkName
|
admin@example:/config/container/doom/volume/var/> set target /var
|
||||||
admin@infix:/config/interface/wifi0/> set wifi secret mywifi
|
admin@example:/config/container/doom/volume/var/> leave
|
||||||
admin@infix:/config/interface/wifi0/> set wifi country-code US
|
admin@example:/>
|
||||||
admin@infix:/config/interface/wifi0/> leave
|
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> The WiFi password (8-63 characters) is stored securely in the keystore as
|
> The `xorg.conf` [content mount][2] is a nifty detail of Infix that
|
||||||
> `mywifi` (or any name you choose), which is then referenced in the WiFi
|
> allows you to keep all the relevant configuration in a single file.
|
||||||
> configuration. The country-code must match your location for regulatory
|
> The deta is "simply" `base64` encoded, so you do not really need the
|
||||||
> compliance (e.g., US, SE, DE, JP).
|
> features of the Infix CLI, everything can be set up remotely [using
|
||||||
|
> `curl`][3] if you like.
|
||||||
|
|
||||||
### Touch Screen Support
|
### Pre-built images
|
||||||
|
|
||||||
The [Raspberry Pi Touch Display v1][10] (800x480 resolution) is supported on
|
Pre-built SD card images are available here: [infix-rpi64-sdcard.img][sdcard]
|
||||||
the Pi 4B, including touch functionality. To use graphical applications with
|
|
||||||
the touch screen, you need to run them in a container with proper device
|
|
||||||
access.
|
|
||||||
|
|
||||||
#### Requirements for Graphical Applications
|
[0]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
|
||||||
|
[1]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-rpi64-sdcard.img
|
||||||
Containers need:
|
[2]: https://kernelkit.org/infix/latest/container/#content-mounts
|
||||||
- Access to `/dev/dri/` for graphics card access
|
[3]: https://kernelkit.org/infix/latest/scripting-restconf/
|
||||||
- Access to `/run/udev` for input device detection
|
|
||||||
- Privileged mode or specific capabilities
|
|
||||||
|
|
||||||
#### Example: Running Doom with Touch Screen
|
|
||||||
|
|
||||||
```
|
|
||||||
admin@infix:/> configure
|
|
||||||
admin@infix:/config/> edit container doom
|
|
||||||
admin@infix:/config/container/doom/> set image docker://mattiaswal/alpine-doom:latest
|
|
||||||
admin@infix:/config/container/doom/> set privileged
|
|
||||||
admin@infix:/config/container/doom/> edit mount udev
|
|
||||||
admin@infix:/config/container/…/udev/> set type bind
|
|
||||||
admin@infix:/config/container/…/udev/> set target /run/udev/
|
|
||||||
admin@infix:/config/container/…/udev/> set source /run/udev/
|
|
||||||
admin@infix:/config/container/…/udev/> end
|
|
||||||
admin@infix:/config/container/doom/> edit mount xorg.conf
|
|
||||||
admin@infix:/config/container/…/xorg.conf/> set content U2VjdGlvbiAiT3V0cHV0Q2xhc3MiCiAgSWRlbnRpZmllciAidmM0IgogIE1hdGNoRHJpdmVyICJ2YzQiCiAgRHJpdmVyICJtb2Rlc2V0dGluZyIKICBPcHRpb24gIlByaW1hcnlHUFUiICJ0cnVlIgpFbmRTZWN0aW9uCg==
|
|
||||||
admin@infix:/config/container/…/xorg.conf/> set target /etc/X11/xorg.conf
|
|
||||||
admin@infix:/config/container/…/xorg.conf/> end
|
|
||||||
admin@infix:/config/container/doom/> edit volume var
|
|
||||||
admin@infix:/config/container/…/var/> set target /var
|
|
||||||
admin@infix:/config/container/…/var/> leave
|
|
||||||
```
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> The `xorg.conf` [content mount][3] is a useful Infix feature that allows you
|
|
||||||
> to keep all configuration in a single file. The data is base64 encoded, and
|
|
||||||
> everything can be set up remotely [using `curl`][4] if preferred.
|
|
||||||
|
|
||||||
### Power Supply Requirements
|
|
||||||
|
|
||||||
Proper power supply is critical for stable operation:
|
|
||||||
|
|
||||||
- **Raspberry Pi 4B:** 5V/3A USB-C power supply (official recommended)
|
|
||||||
- **Raspberry Pi 3B:** 5V/2.5A micro-USB power supply
|
|
||||||
- **Compute Module 4:** Power requirements depend on carrier board
|
|
||||||
|
|
||||||
Inadequate power can cause:
|
|
||||||
- Random reboots or crashes
|
|
||||||
- USB device failures
|
|
||||||
- Network disconnections
|
|
||||||
- Corrupted storage
|
|
||||||
|
|
||||||
<img align="right" src="gpio-pinout.png" alt="GPIO Pinout" width=300 padding=10>
|
|
||||||
|
|
||||||
### Serial Console Access (Optional)
|
|
||||||
|
|
||||||
A serial console is useful for debugging but not required for Pi 3B/4B, since
|
|
||||||
the factory configuration enables network access via DHCP. For CM4 and other
|
|
||||||
variants without factory configuration, serial console access is required for
|
|
||||||
initial setup.
|
|
||||||
|
|
||||||
To connect via serial:
|
|
||||||
|
|
||||||
1. Connect a USB-to-TTL serial adapter (3.3V) to GPIO pins:
|
|
||||||
- GND (black wire) → Pin 6 (Ground)
|
|
||||||
- TX → Pin 8 (GPIO 14, RXD)
|
|
||||||
- RX → Pin 10 (GPIO 15, TXD)
|
|
||||||
- **VCC (red wire) → Leave disconnected** (Pi has its own power supply)
|
|
||||||
2. Use 115200 baud, 8 data bits, no parity, 1 stop bit (115200 8N1)
|
|
||||||
3. Connect using `screen`, `minicom`, or similar terminal emulator
|
|
||||||
|
|
||||||
The image shows the standard 40-pin GPIO header pinout. For serial console:
|
|
||||||
- **Pin 6** (black) = Ground
|
|
||||||
- **Pin 8** (orange) = TxD (UART) - connect to RX on your adapter
|
|
||||||
- **Pin 10** (orange) = RxD (UART) - connect to TX on your adapter
|
|
||||||
|
|
||||||
> [!WARNING]
|
|
||||||
> Use only 3.3V serial adapters. 5V adapters will damage your Raspberry Pi!
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
### Board won't boot
|
|
||||||
|
|
||||||
- Verify the power supply meets requirements (see [Power Supply Requirements](#power-supply-requirements))
|
|
||||||
- Check that the SD card is properly seated
|
|
||||||
- Try re-flashing the SD card image
|
|
||||||
- Look for the green LED activity indicator (should flash during boot)
|
|
||||||
- Connect via serial console to see boot messages if needed
|
|
||||||
|
|
||||||
### Can't find IP address
|
|
||||||
|
|
||||||
- Ensure Ethernet cable is properly connected (look for link LED activity)
|
|
||||||
- Verify your DHCP server is running and has available addresses
|
|
||||||
- Check your router/DHCP server's client list for new devices
|
|
||||||
- Use `nmap` or `arp-scan` to scan your network
|
|
||||||
- Connect via serial console and run `ip addr` to see the assigned address
|
|
||||||
|
|
||||||
### WiFi not working
|
|
||||||
|
|
||||||
- Verify WiFi regulatory domain is set correctly
|
|
||||||
- Check that SSID and password are correct
|
|
||||||
- Ensure WiFi channel is supported in your region
|
|
||||||
- Try connecting to a 2.4 GHz network first (better compatibility)
|
|
||||||
|
|
||||||
### SD card corruption
|
|
||||||
|
|
||||||
If the system becomes unresponsive or won't boot:
|
|
||||||
|
|
||||||
- Always use proper shutdown procedures (don't just pull power)
|
|
||||||
- Use a quality SD card (Class 10, A1, or better recommended)
|
|
||||||
- Consider using a UPS or battery backup for critical deployments
|
|
||||||
- Verify power supply meets requirements (see [Power Supply Requirements](#power-supply-requirements))
|
|
||||||
|
|
||||||
### Container/Docker issues
|
|
||||||
|
|
||||||
- Verify adequate RAM is available (check with `free -h`)
|
|
||||||
- Ensure sufficient SD card space (check with `df -h`)
|
|
||||||
- For Pi 3B, consider using lighter containers due to limited RAM
|
|
||||||
|
|
||||||
## Additional Resources
|
|
||||||
|
|
||||||
- [Infix Documentation][1]
|
|
||||||
- [Flashing SD Card Guide][0]
|
|
||||||
- [Infix Container Documentation][3]
|
|
||||||
- [Scripting with RESTCONF][4]
|
|
||||||
- [Release Downloads][8]
|
|
||||||
- [Official Raspberry Pi Documentation][11]
|
|
||||||
|
|
||||||
## Building Custom Images
|
|
||||||
|
|
||||||
See the main Infix documentation for building from source. To build a custom
|
|
||||||
Raspberry Pi image:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build the bootloader (only needed once or when bootloader changes)
|
|
||||||
make O=x-boot rpi64_boot_defconfig
|
|
||||||
make O=x-boot
|
|
||||||
|
|
||||||
# Build main system
|
|
||||||
make aarch64_defconfig
|
|
||||||
make
|
|
||||||
|
|
||||||
# Create SD card image
|
|
||||||
./utils/mkimage.sh -od raspberrypi-rpi64
|
|
||||||
```
|
|
||||||
|
|
||||||
The resulting image will be in `output/images/infix-rpi64-sdcard.img`.
|
|
||||||
|
|
||||||
### Customizing the Build
|
|
||||||
|
|
||||||
You can customize the build by:
|
|
||||||
- Modifying `board/aarch64/raspberrypi-rpi64/config.txt` for boot configuration
|
|
||||||
- Adding packages to the Buildroot configuration
|
|
||||||
- Customizing the device tree in `board/aarch64/raspberrypi-rpi64/dts/`
|
|
||||||
|
|
||||||
## Performance Notes
|
|
||||||
|
|
||||||
### Raspberry Pi 4B vs 3B
|
|
||||||
|
|
||||||
The Pi 4B offers significant improvements over the 3B:
|
|
||||||
- 3x faster processor
|
|
||||||
- Up to 8x more RAM
|
|
||||||
- Gigabit Ethernet (vs 100 Mbps)
|
|
||||||
- USB 3.0 for faster storage and peripherals
|
|
||||||
- Better thermal performance
|
|
||||||
|
|
||||||
For network-intensive applications, the Pi 4B is strongly recommended.
|
|
||||||
|
|
||||||
### Raspberry Pi as a Router
|
|
||||||
|
|
||||||
While capable of basic routing tasks, be aware of limitations:
|
|
||||||
- Single Ethernet port (consider USB Ethernet adapters for multi-port setups)
|
|
||||||
- CPU-based packet processing (no hardware offload)
|
|
||||||
- Best suited for home/lab use rather than high-throughput production
|
|
||||||
|
|
||||||
For applications requiring multiple ports or high performance, consider
|
|
||||||
dedicated networking hardware like the [Banana Pi R3][12].
|
|
||||||
|
|
||||||
[0]: https://kernelkit.org/posts/flashing-sdcard/
|
|
||||||
[1]: https://kernelkit.org/infix/latest/
|
|
||||||
[2]: https://github.com/kernelkit/infix/releases/download/latest-boot/infix-rpi64-sdcard.img
|
|
||||||
[3]: https://kernelkit.org/infix/latest/container/#content-mounts
|
|
||||||
[4]: https://kernelkit.org/infix/latest/scripting-restconf/
|
|
||||||
[8]: https://github.com/kernelkit/infix/releases/tag/latest-boot
|
|
||||||
[9]: https://kernelkit.org/infix/latest/networking/#wifi
|
|
||||||
[10]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
|
|
||||||
[11]: https://www.raspberrypi.com/documentation/
|
|
||||||
[12]: https://kernelkit.org/infix/latest/hardware/#banana-pi-bpi-r3
|
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
# Raspberry Pi bootloader (start.elf) configuration
|
|
||||||
#
|
|
||||||
# uart_2ndstage=1 - Enable early boot debug output from the bootloader
|
|
||||||
# Useful for debugging boot failures before U-Boot starts
|
|
||||||
# Comment out for production to reduce boot noise
|
|
||||||
|
|
||||||
[all]
|
[all]
|
||||||
arm_64bit=1
|
arm_64bit=1
|
||||||
|
|
||||||
@@ -18,7 +12,7 @@ dtoverlay=infix-key
|
|||||||
disable_overscan=1
|
disable_overscan=1
|
||||||
|
|
||||||
enable_uart=1
|
enable_uart=1
|
||||||
#uart_2ndstage=1
|
uart_2ndstage=1
|
||||||
|
|
||||||
[pi3]
|
[pi3]
|
||||||
start_file=start.elf
|
start_file=start.elf
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 220 KiB |
+1
-2
@@ -47,8 +47,7 @@
|
|||||||
{"id": "domain"},
|
{"id": "domain"},
|
||||||
{"id": "hostname"},
|
{"id": "hostname"},
|
||||||
{"id": "dns-server"},
|
{"id": "dns-server"},
|
||||||
{"id": "ntp-server"},
|
{"id": "ntp-server"}
|
||||||
{"id": "vendor-class", "value": "Raspberry Pi 4 Model B"}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
cat <<EOF
|
||||||
|
{
|
||||||
|
"name": "wifi0",
|
||||||
|
"type": "infix-if-type:wifi",
|
||||||
|
}
|
||||||
|
EOF
|
||||||
+1
-2
@@ -1,3 +1,2 @@
|
|||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/common.mk
|
|
||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/ix-board.mk
|
include $(BR2_EXTERNAL_INFIX_PATH)/board/ix-board.mk
|
||||||
-include $(BR2_EXTERNAL_INFIX_PATH)/board/$(patsubst "%",%,$(BR2_ARCH))/board.mk
|
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/board/*/*/*.mk))
|
||||||
|
|||||||
+149
-18
@@ -1,28 +1,32 @@
|
|||||||
menu "Images"
|
menuconfig SIGN_ENABLED
|
||||||
|
bool "Image Signing"
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-rootfs/Config.in"
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-aux/Config.in"
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-qcow/Config.in"
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-gns3a/Config.in"
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-rauc/Config.in"
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-itb-dl-release/Config.in"
|
|
||||||
source "$BR2_EXTERNAL_INFIX_PATH/board/common/image/image-readme/Config.in"
|
|
||||||
|
|
||||||
endmenu
|
|
||||||
|
|
||||||
config QEMU_SCRIPTS
|
|
||||||
bool "QEMU scripts"
|
|
||||||
default y
|
default y
|
||||||
help
|
|
||||||
Install QEMU scripts and related files in the images
|
choice
|
||||||
directory, which can be used to launch virtual Infix
|
prompt "Signing key source"
|
||||||
instances.
|
depends on SIGN_ENABLED
|
||||||
|
default SIGN_SRC_DIR
|
||||||
|
|
||||||
|
config SIGN_SRC_DIR
|
||||||
|
bool "Directory"
|
||||||
|
|
||||||
|
config SIGN_SRC_PKCS11
|
||||||
|
bool "PKCS#11 URL"
|
||||||
|
|
||||||
|
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
|
menuconfig TRUSTED_KEYS
|
||||||
bool "Trusted keys for image"
|
bool "Trusted keys for image"
|
||||||
|
depends on SIGN_ENABLED
|
||||||
help
|
help
|
||||||
Keys that will be accepted for this image
|
Keys that will be accepted for this image
|
||||||
|
|
||||||
|
|
||||||
config TRUSTED_KEYS_DEVELOPMENT
|
config TRUSTED_KEYS_DEVELOPMENT
|
||||||
bool "Development key"
|
bool "Development key"
|
||||||
depends on TRUSTED_KEYS
|
depends on TRUSTED_KEYS
|
||||||
@@ -35,3 +39,130 @@ config TRUSTED_KEYS_DEVELOPMENT_PATH
|
|||||||
config TRUSTED_KEYS_EXTRA_PATH
|
config TRUSTED_KEYS_EXTRA_PATH
|
||||||
string "Path to extra keys to include in image"
|
string "Path to extra keys to include in image"
|
||||||
depends on TRUSTED_KEYS
|
depends on TRUSTED_KEYS
|
||||||
|
|
||||||
|
menuconfig DISK_IMAGE
|
||||||
|
bool "Disk image"
|
||||||
|
help
|
||||||
|
Compose a full disk image with redundant Linux OS partitions,
|
||||||
|
configuration partition, etc.
|
||||||
|
|
||||||
|
This is useful when:
|
||||||
|
- Bringing up a blank system during manufacturing
|
||||||
|
- Creating a GNS3 appliance
|
||||||
|
- Developing/debugging issues in the boot process in QEMU
|
||||||
|
|
||||||
|
menuconfig DISK_IMAGE_SIZE
|
||||||
|
string "Image size"
|
||||||
|
depends on DISK_IMAGE
|
||||||
|
default "512M"
|
||||||
|
help
|
||||||
|
Create a disk image of this size. A K/M/G suffix may be used
|
||||||
|
to multiply by powers of 1024. Suffixes like KB/MB/GB may be
|
||||||
|
used to multiply by powers of 1000. The image will be split
|
||||||
|
proportionally to fit the two rootfs, a kernel, a writable
|
||||||
|
/cfg and /var partiotions.
|
||||||
|
|
||||||
|
Minimum supported size is 512M.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Bootloader"
|
||||||
|
depends on DISK_IMAGE
|
||||||
|
default DISK_IMAGE_BOOT_EFI if BR2_x86_64
|
||||||
|
default DISK_IMAGE_BOOT_NONE
|
||||||
|
|
||||||
|
config DISK_IMAGE_BOOT_NONE
|
||||||
|
bool "None"
|
||||||
|
help
|
||||||
|
Do not create any bootloader partition in the disk image.
|
||||||
|
|
||||||
|
config DISK_IMAGE_BOOT_EFI
|
||||||
|
bool "EFI"
|
||||||
|
help
|
||||||
|
Create a boot partition from a directory containing an EFI
|
||||||
|
boot application, e.g. GRUB.
|
||||||
|
|
||||||
|
config DISK_IMAGE_BOOT_BIN
|
||||||
|
bool "Binary"
|
||||||
|
help
|
||||||
|
Create a boot partition from a raw image containing the boot
|
||||||
|
application, e.g. U-Boot.
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config DISK_IMAGE_BOOT_DATA
|
||||||
|
string "Bootloader data"
|
||||||
|
depends on DISK_IMAGE
|
||||||
|
depends on DISK_IMAGE_BOOT_EFI || DISK_IMAGE_BOOT_BIN
|
||||||
|
default "${BINARIES_DIR}/efi-part/EFI" if BR2_x86_64
|
||||||
|
help
|
||||||
|
Path to the directory or file holding the bootloader data.
|
||||||
|
|
||||||
|
config DISK_IMAGE_BOOT_OFFSET
|
||||||
|
hex "Bootloader offset"
|
||||||
|
depends on DISK_IMAGE
|
||||||
|
depends on DISK_IMAGE_BOOT_EFI || DISK_IMAGE_BOOT_BIN
|
||||||
|
default 0x8000
|
||||||
|
help
|
||||||
|
Offset at which the bootloader partition is placed. Remember
|
||||||
|
to make sure that the GPT still fits at the start of the
|
||||||
|
image.
|
||||||
|
|
||||||
|
config DISK_IMAGE_RELEASE_URL
|
||||||
|
string "Infix URL"
|
||||||
|
depends on DISK_IMAGE
|
||||||
|
depends on !BR2_TARGET_ROOTFS_SQUASHFS
|
||||||
|
default "https://github.com/kernelkit/infix/releases/download/latest/infix-${BR2_ARCH}.tar.gz"
|
||||||
|
help
|
||||||
|
In situations where Infix itself is not being built, but a
|
||||||
|
disk image is, i.e. when building a bootloader: place this
|
||||||
|
Infix release in the primary and secondary partitions.
|
||||||
|
|
||||||
|
menuconfig GNS3_APPLIANCE
|
||||||
|
bool "GNS3 Appliance"
|
||||||
|
select DISK_IMAGE
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Create a GNS3 appliance description that, together with the
|
||||||
|
disk image, can be imported into GNS3.
|
||||||
|
|
||||||
|
config GNS3_APPLIANCE_RAM
|
||||||
|
int "Reserved RAM (MiB)"
|
||||||
|
depends on GNS3_APPLIANCE
|
||||||
|
default "192"
|
||||||
|
help
|
||||||
|
Amount of host RAM reserved for an appliance instance.
|
||||||
|
|
||||||
|
Minimum supported size is 192M.
|
||||||
|
|
||||||
|
config GNS3_APPLIANCE_IFNUM
|
||||||
|
int "Number of interfaces"
|
||||||
|
depends on GNS3_APPLIANCE
|
||||||
|
default "1"
|
||||||
|
help
|
||||||
|
Number of Ethernet interfaces to create for an appliance instance.
|
||||||
|
|
||||||
|
menuconfig FIT_IMAGE
|
||||||
|
bool "Traditional FIT image"
|
||||||
|
help
|
||||||
|
Create a "regular" FIT image where the kernel and DTBs are
|
||||||
|
stored in the FIT rather than inside the rootfs (like it
|
||||||
|
normally is in Infix).
|
||||||
|
|
||||||
|
This is useful when trying out Infix on targets whose
|
||||||
|
bootloader might not be capable of booting a raw Squash, but
|
||||||
|
is able to handle an FIT.
|
||||||
|
|
||||||
|
config FIT_ARCH
|
||||||
|
string
|
||||||
|
depends on FIT_IMAGE
|
||||||
|
default "arm64" if BR2_aarch64
|
||||||
|
|
||||||
|
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,7 +1,4 @@
|
|||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/image/image.mk
|
ifeq ($(SIGN_ENABLED),y)
|
||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/qemu/qemu.mk
|
|
||||||
|
|
||||||
ifeq ($(TRUSTED_KEYS),y)
|
|
||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/uboot.mk
|
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/uboot.mk
|
||||||
|
|
||||||
TRUSTED_KEYS=$(TRUSTED_KEYS_DEVELOPMENT_PATH) $(TRUSTED_KEYS_EXTRA_PATH)
|
TRUSTED_KEYS=$(TRUSTED_KEYS_DEVELOPMENT_PATH) $(TRUSTED_KEYS_EXTRA_PATH)
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
@BOOTIMG@
|
@BOOTIMG@
|
||||||
|
|
||||||
|
image aux.ext4 {
|
||||||
|
mountpoint = "/aux"
|
||||||
|
temporary = true
|
||||||
|
size = @AUXSIZE@
|
||||||
|
|
||||||
|
ext4 {
|
||||||
|
label = "aux"
|
||||||
|
use-mke2fs = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
image cfg.ext4 {
|
image cfg.ext4 {
|
||||||
empty = true
|
empty = true
|
||||||
temporary = true
|
temporary = true
|
||||||
@@ -22,8 +33,7 @@ image var.ext4 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
image disk.img {
|
image @DISKIMG@ {
|
||||||
temporary = true
|
|
||||||
size = @TOTALSIZE@
|
size = @TOTALSIZE@
|
||||||
hdimage {
|
hdimage {
|
||||||
partition-table-type = "gpt"
|
partition-table-type = "gpt"
|
||||||
@@ -58,15 +68,5 @@ image disk.img {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
image @QCOWIMG@ {
|
|
||||||
qemu {
|
|
||||||
format = "qcow2"
|
|
||||||
}
|
|
||||||
|
|
||||||
partition disk {
|
|
||||||
image = "disk.img"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Silence genimage warnings
|
# Silence genimage warnings
|
||||||
config {}
|
config {}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
config IMAGE_ITB_AUX
|
|
||||||
bool "aux partition"
|
|
||||||
depends on IMAGE_ITB_ROOTFS
|
|
||||||
select BR2_PACKAGE_HOST_UBOOT_TOOLS
|
|
||||||
select BR2_PACKAGE_HOST_GENIMAGE
|
|
||||||
help
|
|
||||||
Create and populate auxiliary partition, aux.ext4, with
|
|
||||||
metadata needed by U-Boot and RAUC to operate properly on
|
|
||||||
systems using ITB images. This may then be included as a
|
|
||||||
partition in a larger disk image.
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
boot="${1}"
|
|
||||||
squash="${BINARIES_DIR}"/rootfs.squashfs
|
|
||||||
itbh="${BINARIES_DIR}"/rootfs.itbh
|
|
||||||
aux="${BINARIES_DIR}"/aux.ext4
|
|
||||||
|
|
||||||
mkdir -p "${WORKDIR}"/aux
|
|
||||||
rm -rf "${WORKDIR}"/tmp
|
|
||||||
mkdir -p "${WORKDIR}"/tmp
|
|
||||||
|
|
||||||
cp -f "${itbh}" "${WORKDIR}"/aux/primary.itbh
|
|
||||||
cp -f "${itbh}" "${WORKDIR}"/aux/secondary.itbh
|
|
||||||
|
|
||||||
tstamp=$(date -u +%FT%TZ)
|
|
||||||
rootsha=$(sha256sum "${squash}" | cut -d" " -f1)
|
|
||||||
rootsize=$(stat -c %s "${squash}")
|
|
||||||
cat <<EOF >"${WORKDIR}"/aux/rauc.status
|
|
||||||
[slot.rootfs.0]
|
|
||||||
bundle.compatible=${COMPATIBLE}
|
|
||||||
bundle.version=${VERSION}
|
|
||||||
status=ok
|
|
||||||
sha256=${rootsha}
|
|
||||||
size=${rootsize}
|
|
||||||
installed.timestamp=$tstamp
|
|
||||||
installed.count=1
|
|
||||||
activated.timestamp=$tstamp
|
|
||||||
activated.count=1
|
|
||||||
|
|
||||||
[slot.rootfs.1]
|
|
||||||
bundle.compatible=${COMPATIBLE}
|
|
||||||
bundle.version=${VERSION}
|
|
||||||
status=ok
|
|
||||||
sha256=${rootsha}
|
|
||||||
size=${rootsize}
|
|
||||||
installed.timestamp=$tstamp
|
|
||||||
installed.count=1
|
|
||||||
activated.timestamp=$tstamp
|
|
||||||
activated.count=1
|
|
||||||
EOF
|
|
||||||
|
|
||||||
case "${boot}" in
|
|
||||||
uboot)
|
|
||||||
cat <<EOF | mkenvimage -s 0x4000 -o "${WORKDIR}"/aux/uboot.env -
|
|
||||||
BOOT_ORDER=primary secondary net
|
|
||||||
BOOT_primary_LEFT=1
|
|
||||||
BOOT_secondary_LEFT=1
|
|
||||||
BOOT_net_LEFT=1
|
|
||||||
EOF
|
|
||||||
;;
|
|
||||||
grub)
|
|
||||||
mkdir -p "${WORKDIR}"/aux/grub
|
|
||||||
cp -f "${PKGDIR}"/grub.cfg "${PKGDIR}"/grubenv "${WORKDIR}"/aux/grub
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "UNSUPPORTED BOOTLOADER ${boot}" >&2
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
cat <<EOF >"${WORKDIR}"/genimage.cfg
|
|
||||||
image $(basename ${aux}) {
|
|
||||||
mountpoint = "/"
|
|
||||||
size = 8M
|
|
||||||
|
|
||||||
ext4 {
|
|
||||||
label = "aux"
|
|
||||||
use-mke2fs = true
|
|
||||||
features = "^metadata_csum,^metadata_csum_seed,uninit_bg"
|
|
||||||
extraargs = "-m 0 -i 4096"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Silence genimage warnings
|
|
||||||
config {}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
genimage \
|
|
||||||
--loglevel 1 \
|
|
||||||
--tmppath "${WORKDIR}"/tmp \
|
|
||||||
--rootpath "${WORKDIR}"/aux \
|
|
||||||
--inputpath "${WORKDIR}" \
|
|
||||||
--outputpath "$(dirname ${aux})" \
|
|
||||||
--config "${WORKDIR}"/genimage.cfg
|
|
||||||
@@ -1,80 +0,0 @@
|
|||||||
set timeout="1"
|
|
||||||
|
|
||||||
load_env ORDER DEBUG
|
|
||||||
|
|
||||||
if [ -z "$ORDER" ]; then
|
|
||||||
set ORDER="primary secondary"
|
|
||||||
fi
|
|
||||||
|
|
||||||
set ORDER="$ORDER reboot"
|
|
||||||
|
|
||||||
for slot in $ORDER; do
|
|
||||||
if [ -z "$default" ]; then
|
|
||||||
set default="$slot"
|
|
||||||
else
|
|
||||||
# Contrary to what the documentation says, GRUB (2.06) does
|
|
||||||
# not support using titles or IDs in the fallback variable, so
|
|
||||||
# we translate to indices.
|
|
||||||
if [ "$slot" = "primary" ]; then
|
|
||||||
set fallback="$fallback 0"
|
|
||||||
elif [ "$slot" = "secondary" ]; then
|
|
||||||
set fallback="$fallback 1"
|
|
||||||
elif [ "$slot" = "net" ]; then
|
|
||||||
set fallback="$fallback 2"
|
|
||||||
elif [ "$slot" = "reboot" ]; then
|
|
||||||
set fallback="$fallback 3"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$DEBUG" ]; then
|
|
||||||
set log="debug"
|
|
||||||
else
|
|
||||||
set log="loglevel=4"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# From board/common/rootfs/etc/partition-uuid
|
|
||||||
search -p 107ae911-a97b-4380-975c-7ce1a2dde1e0 --set primary
|
|
||||||
search -p 352bd9b2-2ca9-44e2-bdc7-edbc87ba1e02 --set secondary
|
|
||||||
|
|
||||||
export primary
|
|
||||||
export secondary
|
|
||||||
|
|
||||||
submenu "primary" "$log" {
|
|
||||||
set slot="$1"
|
|
||||||
set append="console=ttyS0 console=hvc0 usbcore.authorized_default=2 root=PARTLABEL=$slot $2"
|
|
||||||
set root="($primary)"
|
|
||||||
source /boot/grub/grub.cfg
|
|
||||||
}
|
|
||||||
|
|
||||||
submenu "secondary" "$log" {
|
|
||||||
set slot="$1"
|
|
||||||
set append="console=ttyS0 console=hvc0 usbcore.authorized_default=2 root=PARTLABEL=$slot $2"
|
|
||||||
set root="($secondary)"
|
|
||||||
source /boot/grub/grub.cfg
|
|
||||||
}
|
|
||||||
|
|
||||||
submenu "net" "$log" {
|
|
||||||
net_dhcp
|
|
||||||
|
|
||||||
if [ "$net_efinet0_dhcp_next_server" -a "$net_efinet0_dhcp_boot_file" ]; then
|
|
||||||
set initrd=(tftp,$net_efinet0_dhcp_next_server)/$net_efinet0_dhcp_boot_file
|
|
||||||
loopback initrd $initrd
|
|
||||||
set root=(initrd)
|
|
||||||
|
|
||||||
set slot="$1"
|
|
||||||
set append="console=ttyS0 console=hvc0 usbcore.authorized_default=2 qroot=/dev/ram0 ramdisk_size=65536 $2"
|
|
||||||
source /boot/grub/grub.cfg
|
|
||||||
else
|
|
||||||
if [ -z "$net_efinet0_dhcp_next_server" ]; then
|
|
||||||
echo "No TFTP server supplied in DHCP response"
|
|
||||||
fi
|
|
||||||
if [ -z "$net_efinet0_dhcp_boot_file" ]; then
|
|
||||||
echo "No bootfile supplied in DHCP response"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
submenu "reboot" {
|
|
||||||
reboot
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# GRUB Environment Block
|
|
||||||
# WARNING: Do not edit this file by tools other than grub-editenv!!!
|
|
||||||
ORDER=primary secondary net
|
|
||||||
primary_OK=1
|
|
||||||
secondary_OK=1
|
|
||||||
net_OK=1
|
|
||||||
primary_TRY=0
|
|
||||||
secondary_TRY=0
|
|
||||||
net_TRY=0
|
|
||||||
#########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
#
|
|
||||||
# image-itb-aux
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
IMAGE_ITB_AUX_DEPENDENCIES := host-uboot-tools host-genimage image-itb-rootfs
|
|
||||||
IMAGE_ITB_AUX_OPTS := $(if $(BR2_TARGET_GRUB2),grub,uboot)
|
|
||||||
|
|
||||||
$(eval $(ix-image))
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
menuconfig IMAGE_ITB_DL_RELEASE
|
|
||||||
bool "Download existing release"
|
|
||||||
depends on !BR2_TARGET_ROOTFS_SQUASHFS
|
|
||||||
help
|
|
||||||
This is primarily used by target specific builds, where the
|
|
||||||
bootloader artifact needs to be combined with an existing
|
|
||||||
Infix image, to create a full disk image that can be
|
|
||||||
provisioned to an SD-card or eMMC.
|
|
||||||
|
|
||||||
config IMAGE_ITB_DL_RELEASE_URL
|
|
||||||
string "URL"
|
|
||||||
depends on IMAGE_ITB_DL_RELEASE
|
|
||||||
default "https://github.com/kernelkit/infix/releases/download/latest/infix-${BR2_ARCH}.tar.gz"
|
|
||||||
help
|
|
||||||
URL to release tarball.
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
squash="${BINARIES_DIR}"/rootfs.squashfs
|
|
||||||
aux="${BINARIES_DIR}"/aux.ext4
|
|
||||||
|
|
||||||
[ -f "${squash}" ] && [ -f "${aux}" ] && exit 0
|
|
||||||
|
|
||||||
archive="${WORKDIR}/$(basename ${URL})"
|
|
||||||
[ -f "${archive}" ] || wget -O"${archive}" "${URL}"
|
|
||||||
|
|
||||||
echo "Unpacking..."
|
|
||||||
tar -xa --strip-components=1 -C "${BINARIES_DIR}" -f "${archive}"
|
|
||||||
|
|
||||||
auxsize=$(stat -c %s "${aux}")
|
|
||||||
if [ "${auxsize}" -gt $((8 << 20)) ]; then
|
|
||||||
# In older releases, 16M aux.ext4 images were generated. In order
|
|
||||||
# to keep the image-itb-qcow logic simpler, trim it 8M, which we
|
|
||||||
# always generate nowadays.
|
|
||||||
echo "WARNING: Auxiliary partition is unexpectedly large. Resizing..."
|
|
||||||
resize2fs "${aux}" 8M
|
|
||||||
truncate -s 8M "${aux}"
|
|
||||||
tune2fs -l "${aux}"
|
|
||||||
fi
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
#
|
|
||||||
# image-itb-dl-release
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
IMAGE_ITB_DL_RELEASE_CONFIG_VARS := URL
|
|
||||||
|
|
||||||
$(eval $(ix-image))
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
menuconfig IMAGE_ITB_GNS3A
|
|
||||||
bool "GNS3 Appliance (ITB)"
|
|
||||||
depends on BR2_x86_64
|
|
||||||
select IMAGE_ITB_QCOW
|
|
||||||
help
|
|
||||||
Create a GNS3 appliance description that, together with the
|
|
||||||
disk image, can be imported into GNS3.
|
|
||||||
|
|
||||||
config IMAGE_ITB_GNS3A_RAM
|
|
||||||
int "Reserved RAM (MiB)"
|
|
||||||
depends on IMAGE_ITB_GNS3A
|
|
||||||
default "192"
|
|
||||||
help
|
|
||||||
Amount of host RAM reserved for an appliance instance.
|
|
||||||
|
|
||||||
Minimum supported size is 192M.
|
|
||||||
|
|
||||||
config IMAGE_ITB_GNS3A_IFNUM
|
|
||||||
int "Number of interfaces"
|
|
||||||
depends on IMAGE_ITB_GNS3A
|
|
||||||
default "1"
|
|
||||||
help
|
|
||||||
Number of Ethernet interfaces to create for an appliance instance.
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
bios="${BINARIES_DIR}"/OVMF.fd
|
|
||||||
qcow="${BINARIES_DIR}"/"${ARTIFACT}".qcow2
|
|
||||||
gns3a="${BINARIES_DIR}"/"${ARTIFACT}".gns3a
|
|
||||||
|
|
||||||
cat <<EOF >"${gns3a}"
|
|
||||||
{
|
|
||||||
"name": "${ARTIFACT} devel",
|
|
||||||
"category": "router",
|
|
||||||
"description": "${ARTIFACT} development appliance",
|
|
||||||
"vendor_name": "Kernelkit",
|
|
||||||
"vendor_url": "https://kernelkit.org",
|
|
||||||
"product_name": "${ARTIFACT} devel",
|
|
||||||
"registry_version": 6,
|
|
||||||
"status": "experimental",
|
|
||||||
"maintainer": "Kernelkit",
|
|
||||||
"maintainer_email": "null@kernelkit.org",
|
|
||||||
"usage": "Default login, user/pass: admin/admin\n\nType 'cli' (and Enter) followed by 'help' for an overview of commands and relevant configuration files.",
|
|
||||||
"port_name_format": "eth{0}",
|
|
||||||
"linked_clone": true,
|
|
||||||
"qemu": {
|
|
||||||
"adapter_type": "virtio-net-pci",
|
|
||||||
"adapters": ${IFNUM},
|
|
||||||
"ram": ${RAM},
|
|
||||||
"cpus": 1,
|
|
||||||
"hda_disk_interface": "virtio",
|
|
||||||
"arch": "x86_64",
|
|
||||||
"console_type": "telnet",
|
|
||||||
"bios_image": "$(basename ${bios})",
|
|
||||||
"kvm": "allow"
|
|
||||||
},
|
|
||||||
"images": [
|
|
||||||
{
|
|
||||||
"filename": "$(basename "${bios}")",
|
|
||||||
"filesize": $(stat --printf='%s' "${bios}"),
|
|
||||||
"md5sum": "$(md5sum "${bios}" | awk '{print $1}')",
|
|
||||||
"version": "0.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"filename": "$(basename "${qcow}")",
|
|
||||||
"filesize": $(stat --printf='%s' "${qcow}"),
|
|
||||||
"md5sum": "$(md5sum "${qcow}" | awk '{print $1}')",
|
|
||||||
"version": "${VERSION}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"versions": [
|
|
||||||
{
|
|
||||||
"name": "${VERSION}",
|
|
||||||
"images": {
|
|
||||||
"bios_image": "$(basename ${bios})",
|
|
||||||
"hda_disk_image": "$(basename ${qcow})"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
#
|
|
||||||
# image-itb-gns3a
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
IMAGE_ITB_GNS3A_DEPENDENCIES := image-itb-qcow
|
|
||||||
IMAGE_ITB_GNS3A_CONFIG_VARS := IFNUM RAM
|
|
||||||
|
|
||||||
$(eval $(ix-image))
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
menuconfig IMAGE_ITB_QCOW
|
|
||||||
bool "QEMU disk image (ITB)"
|
|
||||||
depends on (IMAGE_ITB_ROOTFS && IMAGE_ITB_AUX) || IMAGE_ITB_DL_RELEASE
|
|
||||||
select BR2_PACKAGE_HOST_GENIMAGE
|
|
||||||
help
|
|
||||||
Compose a full disk image with redundant Linux OS partitions,
|
|
||||||
configuration partition, etc., for systems using ITB images.
|
|
||||||
|
|
||||||
This is useful when:
|
|
||||||
- Bringing up a blank system during manufacturing
|
|
||||||
- Creating a GNS3 appliance
|
|
||||||
- Developing/debugging issues in the boot process in QEMU
|
|
||||||
|
|
||||||
menuconfig IMAGE_ITB_QCOW_SIZE
|
|
||||||
string "Image size"
|
|
||||||
depends on IMAGE_ITB_QCOW
|
|
||||||
default "512M"
|
|
||||||
help
|
|
||||||
Create a disk image of this size. A K/M/G suffix may be used
|
|
||||||
to multiply by powers of 1024. Suffixes like KB/MB/GB may be
|
|
||||||
used to multiply by powers of 1000. The image will be split
|
|
||||||
proportionally to fit the two rootfs, a kernel, a writable
|
|
||||||
/cfg and /var partiotions.
|
|
||||||
|
|
||||||
Minimum supported size is 512M.
|
|
||||||
|
|
||||||
choice
|
|
||||||
prompt "Bootloader"
|
|
||||||
depends on IMAGE_ITB_QCOW
|
|
||||||
default IMAGE_ITB_QCOW_BOOT_EFI if BR2_x86_64
|
|
||||||
default IMAGE_ITB_QCOW_BOOT_NONE
|
|
||||||
|
|
||||||
config IMAGE_ITB_QCOW_BOOT_NONE
|
|
||||||
bool "None"
|
|
||||||
help
|
|
||||||
Do not create any bootloader partition in the disk image.
|
|
||||||
|
|
||||||
config IMAGE_ITB_QCOW_BOOT_EFI
|
|
||||||
bool "EFI"
|
|
||||||
help
|
|
||||||
Create a boot partition from a directory containing an EFI
|
|
||||||
boot application, e.g. GRUB.
|
|
||||||
|
|
||||||
config IMAGE_ITB_QCOW_BOOT_BIN
|
|
||||||
bool "Binary"
|
|
||||||
help
|
|
||||||
Create a boot partition from a raw image containing the boot
|
|
||||||
application, e.g. U-Boot.
|
|
||||||
|
|
||||||
endchoice
|
|
||||||
|
|
||||||
config IMAGE_ITB_QCOW_BOOT_DATA
|
|
||||||
string "Bootloader data"
|
|
||||||
depends on IMAGE_ITB_QCOW
|
|
||||||
depends on IMAGE_ITB_QCOW_BOOT_EFI || IMAGE_ITB_QCOW_BOOT_BIN
|
|
||||||
default "${BINARIES_DIR}/efi-part/EFI" if BR2_x86_64
|
|
||||||
help
|
|
||||||
Path to the directory or file holding the bootloader data.
|
|
||||||
|
|
||||||
config IMAGE_ITB_QCOW_BOOT_OFFSET
|
|
||||||
hex "Bootloader offset"
|
|
||||||
depends on IMAGE_ITB_QCOW
|
|
||||||
depends on IMAGE_ITB_QCOW_BOOT_EFI || IMAGE_ITB_QCOW_BOOT_BIN
|
|
||||||
default 0x8000
|
|
||||||
help
|
|
||||||
Offset at which the bootloader partition is placed. Remember
|
|
||||||
to make sure that the GPT still fits at the start of the
|
|
||||||
image.
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
#
|
|
||||||
# image-itb-qcow
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# We can source the rootfs+aux from a local build, or from a
|
|
||||||
# downloaded release; so adjust our dependencies accordingly.
|
|
||||||
IMAGE_ITB_QCOW_SRC-$(IMAGE_ITB_ROOTFS) := image-itb-rootfs image-itb-aux
|
|
||||||
IMAGE_ITB_QCOW_SRC-$(IMAGE_ITB_DL_RELEASE) := image-itb-dl-release
|
|
||||||
|
|
||||||
IMAGE_ITB_QCOW_DEPENDENCIES := host-genimage $(IMAGE_ITB_QCOW_SRC-y)
|
|
||||||
IMAGE_ITB_QCOW_CONFIG_VARS := BOOT_DATA BOOT_OFFSET SIZE
|
|
||||||
|
|
||||||
$(eval $(ix-image))
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
menuconfig IMAGE_ITB_RAUC
|
|
||||||
bool "RAUC upgrade bundle (ITB)"
|
|
||||||
select IMAGE_ITB_ROOTFS
|
|
||||||
select BR2_PACKAGE_HOST_RAUC
|
|
||||||
help
|
|
||||||
Create RAUC upgrade bundle, for targets using ITB images,
|
|
||||||
that can be used to upgrade a running system to this version
|
|
||||||
of Infix.
|
|
||||||
|
|
||||||
config IMAGE_ITB_RAUC_KEY
|
|
||||||
string "signing key"
|
|
||||||
depends on IMAGE_ITB_RAUC
|
|
||||||
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development/infix.key"
|
|
||||||
help
|
|
||||||
Path to the private key, in PKCS#8 format, used to sign
|
|
||||||
the RAUC bundle; or a PKCS#11 URI.
|
|
||||||
|
|
||||||
config IMAGE_ITB_RAUC_CERT
|
|
||||||
string "signing certificate"
|
|
||||||
depends on IMAGE_ITB_RAUC
|
|
||||||
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development/infix.crt"
|
|
||||||
help
|
|
||||||
Path to the X509 certificate which will be associated with
|
|
||||||
the bundle signature.
|
|
||||||
|
|
||||||
NOTE: This cert MUST be included in the trust store of the
|
|
||||||
system on which this bundle is to be installed.
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
squash="${BINARIES_DIR}"/rootfs.squashfs
|
|
||||||
itbh="${BINARIES_DIR}"/rootfs.itbh
|
|
||||||
pkg="${BINARIES_DIR}"/"${ARTIFACT}.pkg"
|
|
||||||
|
|
||||||
cp -f "${PKGDIR}"/hooks.sh "${WORKDIR}"/hooks.sh
|
|
||||||
|
|
||||||
# RAUC internally uses the file extension to find a suitable install
|
|
||||||
# handler, hence the name must be .img
|
|
||||||
cp -f "${squash}" "${WORKDIR}"/rootfs.img
|
|
||||||
cp -f "${itbh}" "${WORKDIR}"/rootfs.itbh
|
|
||||||
|
|
||||||
cat >"${WORKDIR}"/manifest.raucm <<EOF
|
|
||||||
[update]
|
|
||||||
compatible=${COMPATIBLE}
|
|
||||||
version=${VERSION}
|
|
||||||
|
|
||||||
[bundle]
|
|
||||||
format=verity
|
|
||||||
|
|
||||||
[hooks]
|
|
||||||
filename=hooks.sh
|
|
||||||
|
|
||||||
[image.rootfs]
|
|
||||||
filename=rootfs.img
|
|
||||||
hooks=post-install
|
|
||||||
EOF
|
|
||||||
|
|
||||||
rauc --cert="${CERT}" --key="${KEY}" \
|
|
||||||
bundle "${WORKDIR}" "${pkg}.next"
|
|
||||||
|
|
||||||
mv "${pkg}.next" "${pkg}"
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
#
|
|
||||||
# image-itb-rauc
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
IMAGE_ITB_RAUC_DEPENDENCIES := host-rauc image-itb-rootfs
|
|
||||||
IMAGE_ITB_RAUC_CONFIG_VARS := KEY CERT
|
|
||||||
|
|
||||||
$(eval $(ix-image))
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
menuconfig IMAGE_ITB_ROOTFS
|
|
||||||
bool "rootfs.itb+.itbh"
|
|
||||||
select BR2_TARGET_ROOTFS_SQUASHFS
|
|
||||||
select BR2_PACKAGE_HOST_UBOOT_TOOLS
|
|
||||||
help
|
|
||||||
Create a signed ITB image containing a SquashFS of rootfs
|
|
||||||
and extract detached header (.itbh) for U-Boot based
|
|
||||||
targets.
|
|
||||||
|
|
||||||
config IMAGE_ITB_ROOTFS_KEY
|
|
||||||
string "signing key"
|
|
||||||
depends on IMAGE_ITB_ROOTFS
|
|
||||||
default "${BR2_EXTERNAL_INFIX_PATH}/board/common/signing-keys/development/infix.key"
|
|
||||||
help
|
|
||||||
Path to the private RSA key, in PKCS#8 format, used to sign
|
|
||||||
the root filesystem.
|
|
||||||
|
|
||||||
If the path is prefixed with "<hint>:", then that used as
|
|
||||||
the "key-name-hint" in the resulting ITB, otherwise the
|
|
||||||
basename of the path, with any extension removed, is used.
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
squash="${BINARIES_DIR}"/rootfs.squashfs
|
|
||||||
|
|
||||||
itb="${BINARIES_DIR}"/rootfs.itb
|
|
||||||
itbh_size=0x1000
|
|
||||||
|
|
||||||
IFS=:
|
|
||||||
set ${KEY}
|
|
||||||
case $# in
|
|
||||||
1)
|
|
||||||
keyfile="$1"
|
|
||||||
hint=$(basename ${keyfile%.*})
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
keyfile="$2"
|
|
||||||
hint="$1"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "INVALID KEY" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
rsanibbles=$(openssl rsa -in "${KEY}" -noout -modulus | \
|
|
||||||
sed -e 's/^Modulus=//' | tr -d '\n' | wc -c)
|
|
||||||
if [ "${rsanibbles}" -le 0 ]; then
|
|
||||||
echo "ONLY RSA KEYS ARE SUPPORTED" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat >"${WORKDIR}"/rootfs.its <<EOF
|
|
||||||
/dts-v1/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
description = "${ARTIFACT}";
|
|
||||||
creator = "infix";
|
|
||||||
#address-cells = <0x1>;
|
|
||||||
|
|
||||||
images {
|
|
||||||
rootfs {
|
|
||||||
description = "rootfs";
|
|
||||||
type = "ramdisk";
|
|
||||||
os = "linux";
|
|
||||||
compression = "none";
|
|
||||||
data = /incbin/("${squash}");
|
|
||||||
signature-1 {
|
|
||||||
algo = "sha256,rsa$((rsanibbles << 2))";
|
|
||||||
key-name-hint = "${hint}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
configurations {
|
|
||||||
default = "verity";
|
|
||||||
verity {
|
|
||||||
ramdisk = "rootfs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mkimage -E -p $itbh_size -B $itbh_size \
|
|
||||||
-f "${WORKDIR}"/rootfs.its \
|
|
||||||
-g "${hint}" -G "${keyfile}" \
|
|
||||||
"${itb}"
|
|
||||||
|
|
||||||
dd if="${itb}" bs=$((itbh_size)) count=1 of="${itb}h" status=none
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
#
|
|
||||||
# image-itb-rootfs
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
IMAGE_ITB_ROOTFS_DEPENDENCIES := rootfs-squashfs
|
|
||||||
IMAGE_ITB_ROOTFS_CONFIG_VARS := KEY
|
|
||||||
|
|
||||||
$(eval $(ix-image))
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
config IMAGE_README
|
|
||||||
bool "Install README.md in images"
|
|
||||||
help
|
|
||||||
Install a README.md with useful information about getting
|
|
||||||
started with Infix in the images directory (thereby also
|
|
||||||
including it in the resulting release tarball).
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
#
|
|
||||||
# image-readme
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
IMAGE_README_DIR := $(pkgdir)
|
|
||||||
|
|
||||||
image-readme: $(BINARIES_DIR)/README.md
|
|
||||||
|
|
||||||
$(BINARIES_DIR)/README.md: $(IMAGE_README_DIR)/README.md
|
|
||||||
@$(call IXMSG,"Installing README.md")
|
|
||||||
@mkdir -p $(BINARIES_DIR)
|
|
||||||
@cp $< $@
|
|
||||||
|
|
||||||
ifeq ($(IMAGE_README),y)
|
|
||||||
TARGETS_ROOTFS += image-readme
|
|
||||||
endif
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
include $(BR2_EXTERNAL_INFIX_PATH)/board/common/image/ix-image.mk
|
|
||||||
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/board/common/image/*/*.mk))
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
define inner-ix-image
|
|
||||||
|
|
||||||
$(2)_DIR := $$(pkgdir)
|
|
||||||
|
|
||||||
$(1): $$($(2)_DEPENDENCIES)
|
|
||||||
@$$(call IXMSG,"$$(if $$($(2)_MESSAGE),$$($(2)_MESSAGE),Creating $(1))")
|
|
||||||
@mkdir -p $$(BUILD_DIR)/$(1)
|
|
||||||
@ \
|
|
||||||
PATH=$$(BR_PATH) \
|
|
||||||
PKGDIR=$$($(2)_DIR) \
|
|
||||||
WORKDIR=$$(BUILD_DIR)/$(1) \
|
|
||||||
BINARIES_DIR=$$(BINARIES_DIR) \
|
|
||||||
BR2_EXTERNAL_INFIX_PATH=$$(BR2_EXTERNAL_INFIX_PATH) \
|
|
||||||
ARTIFACT=$$(INFIX_ARTIFACT) \
|
|
||||||
COMPATIBLE=$$(INFIX_COMPATIBLE) \
|
|
||||||
VERSION=$$(INFIX_VERSION) \
|
|
||||||
$$(foreach var,$$($(2)_CONFIG_VARS),$$(var)=$$($(2)_$$(var)) ) \
|
|
||||||
$$($(2)_DIR)/generate.sh $$($(2)_OPTS)
|
|
||||||
|
|
||||||
ifeq ($$($(2)),y)
|
|
||||||
TARGETS_ROOTFS += $(1)
|
|
||||||
endif
|
|
||||||
|
|
||||||
endef
|
|
||||||
|
|
||||||
ix-image = $(call inner-ix-image,$(pkgname),$(call UPPERCASE,$(pkgname)))
|
|
||||||
Executable
+40
@@ -0,0 +1,40 @@
|
|||||||
|
#!/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,uninit_bg"
|
||||||
|
extraargs = "-m 0 -i 4096"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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"
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
. $BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/etc/partition-uuid
|
||||||
|
|
||||||
K=10
|
K=10
|
||||||
M=20
|
M=20
|
||||||
G=30
|
G=30
|
||||||
@@ -45,32 +47,43 @@ dimension()
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Place aux right after the GPT...
|
# Size var to fit whatever is left over. Also reserve another 32K
|
||||||
auxoffs=$((32 << K))
|
# at the end to make room for the backup GPT.
|
||||||
|
varsize=$(($total - $auxsize - 2 * $imgsize - $cfgsize))
|
||||||
|
if [ "$bootoffs" ]; then
|
||||||
|
varsize=$(($varsize - $bootsize))
|
||||||
|
fi
|
||||||
|
varsize=$(($varsize - (32 << K)))
|
||||||
|
|
||||||
if [ "$bootoffs" ]; then
|
if [ "$bootoffs" ]; then
|
||||||
if [ $((bootoffs)) -lt $((32 << K)) ]; then
|
# Align the end of the boot partition to an even MiB. E.g. if
|
||||||
echo "Boot partition collides with GPT"
|
# boot was dimensioned to 4M, and bootoffs is 32K, then the
|
||||||
exit 1
|
# final bootsize becomes 4M - 32K, meaning aux will start on
|
||||||
fi
|
# exactly 4M.
|
||||||
|
auxoffs=$bootsize
|
||||||
# ...unless we have a boot partition, in which case we place
|
bootsize=$(($bootsize - $bootoffs))
|
||||||
# it after that.
|
else
|
||||||
auxoffs=$((auxoffs + bootsize))
|
# No bootloader, place aux after GPT, resize it to end on an
|
||||||
|
# even MiB (as is done for boot above).
|
||||||
|
auxoffs=$((32 << K))
|
||||||
|
auxsize=$(($auxsize - $auxoffs))
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Finally, size var to fit whatever is left over by subtracting
|
probeboot()
|
||||||
# all other images, plus another 32K at the end for the backup
|
{
|
||||||
# GPT.
|
# If we have built an EFI app, typically grub, make sure to
|
||||||
varsize=$((total - auxoffs - auxsize - 2 * imgsize - cfgsize - (32 << K)))
|
# include it.
|
||||||
|
if [ -d $BINARIES_DIR/efi-part/EFI ]; then
|
||||||
|
bootoffs=$((32 << K))
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
genboot()
|
genboot()
|
||||||
{
|
{
|
||||||
if [ -d "$bootdata" ]; then
|
if [ -d "$bootdata" ]; then
|
||||||
bootimg=$(cat <<EOF
|
bootimg=$(cat <<EOF
|
||||||
image efi-part.vfat {
|
image $BINARIES_DIR/efi-part.vfat {
|
||||||
temporary = true
|
|
||||||
size = $bootsize
|
size = $bootsize
|
||||||
vfat {
|
vfat {
|
||||||
file EFI {
|
file EFI {
|
||||||
@@ -85,7 +98,7 @@ EOF
|
|||||||
offset = $bootoffs
|
offset = $bootoffs
|
||||||
partition-type-uuid = U
|
partition-type-uuid = U
|
||||||
bootable = true
|
bootable = true
|
||||||
image = efi-part.vfat
|
image = $BINARIES_DIR/efi-part.vfat
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
@@ -104,29 +117,44 @@ EOF
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir -p "${WORKDIR}"/root
|
common=$(dirname $(readlink -f "$0"))
|
||||||
rm -rf "${WORKDIR}"/tmp
|
root=$BUILD_DIR/genimage.root
|
||||||
mkdir -p "${WORKDIR}"/tmp
|
tmp=$BUILD_DIR/genimage.tmp
|
||||||
|
|
||||||
qcowimg="${ARTIFACT}.qcow2"
|
total=$((512 << M))
|
||||||
total=$(size2int $SIZE)
|
bootoffs=$((32 << K))
|
||||||
bootoffs=
|
bootdata=
|
||||||
bootdata=$BOOT_DATA
|
diskimg=disk.img
|
||||||
bootimg=
|
bootimg=
|
||||||
bootpart=
|
bootpart=
|
||||||
|
tmpimage=$(mktemp)
|
||||||
|
while getopts "a:b:B:n:s:" opt; do
|
||||||
|
case ${opt} in
|
||||||
|
a)
|
||||||
|
arch=$OPTARG
|
||||||
|
;;
|
||||||
|
b)
|
||||||
|
bootdata=$OPTARG
|
||||||
|
;;
|
||||||
|
B)
|
||||||
|
bootoffs=$(($OPTARG))
|
||||||
|
;;
|
||||||
|
n)
|
||||||
|
diskimg=${OPTARG}
|
||||||
|
;;
|
||||||
|
s)
|
||||||
|
total=$(size2int $OPTARG)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
if [ -n "${BOOT_OFFSET}" ]; then
|
mkdir -p $root
|
||||||
bootoffs=$(($BOOT_OFFSET))
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
probeboot
|
||||||
dimension
|
dimension
|
||||||
genboot
|
genboot
|
||||||
|
|
||||||
. $BR2_EXTERNAL_INFIX_PATH/board/common/rootfs/etc/partition-uuid
|
|
||||||
[ -n "${AUX_UUID}" ]
|
|
||||||
[ -n "${PRIMARY_UUID}" ]
|
|
||||||
[ -n "${SECONDARY_UUID}" ]
|
|
||||||
|
|
||||||
# Use awk over sed because replacement text may contain newlines,
|
# Use awk over sed because replacement text may contain newlines,
|
||||||
# which sed does not approve of.
|
# which sed does not approve of.
|
||||||
awk \
|
awk \
|
||||||
@@ -138,7 +166,7 @@ awk \
|
|||||||
-vimgsize=$imgsize \
|
-vimgsize=$imgsize \
|
||||||
-vcfgsize=$cfgsize \
|
-vcfgsize=$cfgsize \
|
||||||
-vvarsize=$varsize \
|
-vvarsize=$varsize \
|
||||||
-vqcowimg=$qcowimg \
|
-vdiskimg=$tmpimage \
|
||||||
-vbootimg="$bootimg" -vbootpart="$bootpart" \
|
-vbootimg="$bootimg" -vbootpart="$bootpart" \
|
||||||
'{
|
'{
|
||||||
sub(/@TOTALSIZE@/, total);
|
sub(/@TOTALSIZE@/, total);
|
||||||
@@ -147,7 +175,7 @@ awk \
|
|||||||
sub(/@IMGSIZE@/, imgsize);
|
sub(/@IMGSIZE@/, imgsize);
|
||||||
sub(/@CFGSIZE@/, cfgsize);
|
sub(/@CFGSIZE@/, cfgsize);
|
||||||
sub(/@VARSIZE@/, varsize);
|
sub(/@VARSIZE@/, varsize);
|
||||||
sub(/@QCOWIMG@/, qcowimg);
|
sub(/@DISKIMG@/, diskimg);
|
||||||
sub(/@BOOTIMG@/, bootimg);
|
sub(/@BOOTIMG@/, bootimg);
|
||||||
sub(/@BOOTPART@/, bootpart);
|
sub(/@BOOTPART@/, bootpart);
|
||||||
sub(/@AUXUUID@/, auxuuid);
|
sub(/@AUXUUID@/, auxuuid);
|
||||||
@@ -155,11 +183,35 @@ awk \
|
|||||||
sub(/@SECONDARYUUID@/, secondaryuuid);
|
sub(/@SECONDARYUUID@/, secondaryuuid);
|
||||||
|
|
||||||
}1' \
|
}1' \
|
||||||
< $PKGDIR/genimage.cfg.in >$WORKDIR/genimage.cfg
|
< $common/genimage.cfg.in >$root/genimage.cfg
|
||||||
|
|
||||||
|
mkdir -p $root/aux
|
||||||
|
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/primary.itbh
|
||||||
|
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/secondary.itbh
|
||||||
|
cp -f $BINARIES_DIR/rauc.status $root/aux/rauc.status
|
||||||
|
|
||||||
|
case "$arch" in
|
||||||
|
aarch64)
|
||||||
|
mkenvimage -s 0x4000 -o "$root/aux/uboot.env" \
|
||||||
|
"$BR2_EXTERNAL_INFIX_PATH/board/common/uboot/aux-env.txt"
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
mkdir -p "$root/aux/grub"
|
||||||
|
cp -f "$BR2_EXTERNAL_INFIX_PATH/board/$arch/grub.cfg" \
|
||||||
|
"$BR2_EXTERNAL_INFIX_PATH/board/$arch/grubenv" \
|
||||||
|
"$root/aux/grub/"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rm -rf "$tmp"
|
||||||
|
|
||||||
genimage \
|
genimage \
|
||||||
--tmppath "${WORKDIR}"/tmp \
|
--rootpath "$root" \
|
||||||
--rootpath "${WORKDIR}"/root \
|
--tmppath "$tmp" \
|
||||||
--inputpath "$BINARIES_DIR" \
|
--inputpath "$BINARIES_DIR" \
|
||||||
--outputpath "$BINARIES_DIR" \
|
--config "$root/genimage.cfg"
|
||||||
--config "${WORKDIR}"/genimage.cfg
|
|
||||||
|
qemu-img convert -c -O qcow2 "$tmpimage" "$BINARIES_DIR/$diskimg"
|
||||||
|
rm "$tmpimage"
|
||||||
Executable
+118
@@ -0,0 +1,118 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die()
|
||||||
|
{
|
||||||
|
echo "$@" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
load_cfg()
|
||||||
|
{
|
||||||
|
local tmp=$(mktemp -p /tmp)
|
||||||
|
|
||||||
|
grep ^FIT_ $BR2_CONFIG >$tmp
|
||||||
|
. $tmp
|
||||||
|
rm $tmp
|
||||||
|
}
|
||||||
|
|
||||||
|
load_cfg
|
||||||
|
[ "$FIT_IMAGE" = "y" ] || exit 0
|
||||||
|
|
||||||
|
work=$BUILD_DIR/fit-image-local
|
||||||
|
dtbs=$(find $BINARIES_DIR -name '*.dtb')
|
||||||
|
kernel=$(find $BINARIES_DIR -name '*Image' | head -n1)
|
||||||
|
squash=$BINARIES_DIR/rootfs.squashfs
|
||||||
|
|
||||||
|
mkdir -p $work
|
||||||
|
gzip <$kernel >$work/Image.gz
|
||||||
|
kernel=$work/Image.gz
|
||||||
|
|
||||||
|
rm -rf $work/rootfs
|
||||||
|
unsquashfs -f -d $work/rootfs $squash
|
||||||
|
rm -f $work/rootfs/boot/*Image
|
||||||
|
|
||||||
|
squash=$work/rootfs-no-kernel.squashfs
|
||||||
|
rm -f $squash
|
||||||
|
mksquashfs $work/rootfs $squash
|
||||||
|
|
||||||
|
# mkimage will only align images to 4 bytes, but U-Boot will leave
|
||||||
|
# both DTB and ramdisk in place when starting the kernel. So we pad
|
||||||
|
# all components up to a 4k boundary.
|
||||||
|
truncate -s %4k $kernel $dtbs
|
||||||
|
|
||||||
|
: >$work/dtbs.itsi
|
||||||
|
: >$work/cfgs.itsi
|
||||||
|
for dtb in $dtbs; do
|
||||||
|
name=$(basename $dtb .dtb)
|
||||||
|
|
||||||
|
cat <<EOF >>$work/dtbs.itsi
|
||||||
|
$name-dtb {
|
||||||
|
description = "$name";
|
||||||
|
type = "flat_dt";
|
||||||
|
arch = "$FIT_ARCH";
|
||||||
|
compression = "none";
|
||||||
|
data = /incbin/("$dtb");
|
||||||
|
};
|
||||||
|
EOF
|
||||||
|
cat <<EOF >>$work/cfgs.itsi
|
||||||
|
$name {
|
||||||
|
description = "$name";
|
||||||
|
kernel = "kernel";
|
||||||
|
ramdisk = "ramdisk";
|
||||||
|
fdt = "$name-dtb";
|
||||||
|
};
|
||||||
|
EOF
|
||||||
|
done
|
||||||
|
|
||||||
|
: >$work/kernel-load.itsi
|
||||||
|
if [ "$FIT_KERNEL_LOAD_ADDR" ]; then
|
||||||
|
cat <<EOF >$work/kernel-load.itsi
|
||||||
|
load = <$FIT_KERNEL_LOAD_ADDR>;
|
||||||
|
entry = <$FIT_KERNEL_LOAD_ADDR>;
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF >$work/infix.its
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
/ {
|
||||||
|
timestamp = <$(date +%s)>;
|
||||||
|
description = "Infix ($FIT_ARCH)";
|
||||||
|
creator = "infix";
|
||||||
|
#address-cells = <0x1>;
|
||||||
|
|
||||||
|
images {
|
||||||
|
|
||||||
|
kernel {
|
||||||
|
description = "Linux";
|
||||||
|
type = "kernel";
|
||||||
|
arch = "$FIT_ARCH";
|
||||||
|
os = "linux";
|
||||||
|
$(cat $work/kernel-load.itsi)
|
||||||
|
compression = "gzip";
|
||||||
|
data = /incbin/("$kernel");
|
||||||
|
};
|
||||||
|
|
||||||
|
ramdisk {
|
||||||
|
description = "Infix";
|
||||||
|
type = "ramdisk";
|
||||||
|
os = "linux";
|
||||||
|
arch = "$FIT_ARCH";
|
||||||
|
compression = "none";
|
||||||
|
data = /incbin/("$squash");
|
||||||
|
};
|
||||||
|
|
||||||
|
$(cat $work/dtbs.itsi)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
$(cat $work/cfgs.itsi)
|
||||||
|
};
|
||||||
|
};
|
||||||
|
EOF
|
||||||
|
|
||||||
|
mkimage \
|
||||||
|
-E -p 0x1000 \
|
||||||
|
-f $work/infix.its $BINARIES_DIR/infix.itb \
|
||||||
|
|| die "Unable to create FIT image"
|
||||||
Executable
+103
@@ -0,0 +1,103 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. "$TARGET_DIR/etc/os-release"
|
||||||
|
|
||||||
|
if [ -n "$INFIX_RELEASE" ]; then
|
||||||
|
rel="-${INFIX_RELEASE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ARCH=$1
|
||||||
|
NM="${2:-custom}${rel}"
|
||||||
|
DISK=$3
|
||||||
|
RAM=${4:-512}
|
||||||
|
IFNUM=${5:-1}
|
||||||
|
|
||||||
|
# The aarch64 build currently has no "loader" but instead starts Linux
|
||||||
|
# directly, so we need to add a basic cmdline.
|
||||||
|
loader_args()
|
||||||
|
{
|
||||||
|
if [ "$ARCH" = "aarch64" ]; then
|
||||||
|
cat <<EOF
|
||||||
|
"kernel_command_line": "console=ttyAMA0 root=PARTLABEL=primary quiet",
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
loader_img()
|
||||||
|
{
|
||||||
|
if [ "$ARCH" = "x86_64" ]; then
|
||||||
|
cat <<EOF
|
||||||
|
"bios_image": "$loader",
|
||||||
|
EOF
|
||||||
|
else
|
||||||
|
cat <<EOF
|
||||||
|
"kernel_image": "$loader",
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$ARCH" = "x86_64" ]; then
|
||||||
|
loader=OVMF.fd
|
||||||
|
accel=allow
|
||||||
|
opts=
|
||||||
|
else
|
||||||
|
loader=Image
|
||||||
|
accel=disable
|
||||||
|
opts="-M virt -cpu cortex-a72"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ">> Disk image MD5: $(md5sum "$BINARIES_DIR/$DISK" | awk '{print $1}')"
|
||||||
|
|
||||||
|
cat <<EOF >"$BINARIES_DIR/${NM}.gns3a"
|
||||||
|
{
|
||||||
|
"name": "$NM",
|
||||||
|
"category": "router",
|
||||||
|
"description": "$INFIX_DESC",
|
||||||
|
"vendor_name": "$VENDOR_NAME",
|
||||||
|
"vendor_url": "$VENDOR_HOME",
|
||||||
|
"product_name": "$NAME",
|
||||||
|
"registry_version": 6,
|
||||||
|
"status": "stable",
|
||||||
|
"maintainer": "$VENDOR_NAME",
|
||||||
|
"maintainer_email": "${SUPPORT_URL#mailto:}",
|
||||||
|
"usage": "Default login, user/pass: admin/admin\n\nType 'cli' (and Enter) followed by 'help' for an overview of commands and relevant configuration files.",
|
||||||
|
"port_name_format": "eth{0}",
|
||||||
|
"linked_clone": true,
|
||||||
|
"qemu": {
|
||||||
|
"adapter_type": "virtio-net-pci",
|
||||||
|
"adapters": ${IFNUM},
|
||||||
|
"ram": ${RAM},
|
||||||
|
"cpus": 1,
|
||||||
|
"hda_disk_interface": "virtio",
|
||||||
|
"arch": "$ARCH",
|
||||||
|
"console_type": "telnet",
|
||||||
|
$(loader_img)
|
||||||
|
$(loader_args)
|
||||||
|
"kvm": "$accel",
|
||||||
|
"options": "$opts"
|
||||||
|
},
|
||||||
|
"images": [
|
||||||
|
{
|
||||||
|
"filename": "$loader",
|
||||||
|
"filesize": $(stat --printf='%s' "$BINARIES_DIR/$loader"),
|
||||||
|
"md5sum": "$(md5sum "$BINARIES_DIR/$loader" | awk '{print $1}')",
|
||||||
|
"version": "0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "$DISK",
|
||||||
|
"filesize": $(stat --printf='%s' "$BINARIES_DIR/$DISK"),
|
||||||
|
"md5sum": "$(md5sum "$BINARIES_DIR/$DISK" | awk '{print $1}')",
|
||||||
|
"version": "0.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"versions": [
|
||||||
|
{
|
||||||
|
"name": "0.0",
|
||||||
|
"images": {
|
||||||
|
$(loader_img)
|
||||||
|
"hda_disk_image": "$DISK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
EOF
|
||||||
Executable
+22
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
common=$(dirname $(readlink -f "$0"))
|
||||||
|
root=$BUILD_DIR/genimage.root
|
||||||
|
tmp=$BUILD_DIR/genimage.tmp
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p $root/aux
|
||||||
|
cp -f $BINARIES_DIR/uboot-env.bin $root/aux/uboot.env
|
||||||
|
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/primary.itbh
|
||||||
|
cp -f $BINARIES_DIR/rootfs.itbh $root/aux/secondary.itbh
|
||||||
|
|
||||||
|
rm -rf $tmp
|
||||||
|
|
||||||
|
genimage \
|
||||||
|
--rootpath $root \
|
||||||
|
--tmppath $tmp \
|
||||||
|
--inputpath $BINARIES_DIR \
|
||||||
|
--outputpath $BINARIES_DIR \
|
||||||
|
--config $common/genimage.cfg
|
||||||
Executable
+35
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Bootstrap a RAUC status file showing the newly created image
|
||||||
|
# installed to both the primary and secondary slots. This then bundled
|
||||||
|
# in the aux partition in mkdisk.sh, so that RAUC (on the target) can
|
||||||
|
# always report the installed versions.
|
||||||
|
rauc info --no-verify --output-format=shell $1 >/tmp/rauc-$$.info
|
||||||
|
. /tmp/rauc-$$.info
|
||||||
|
rm /tmp/rauc-$$.info
|
||||||
|
tstamp=$(date -u +%FT%TZ)
|
||||||
|
cat <<EOF
|
||||||
|
[slot.rootfs.0]
|
||||||
|
bundle.compatible=$RAUC_MF_COMPATIBLE
|
||||||
|
bundle.version=$RAUC_MF_VERSION
|
||||||
|
status=ok
|
||||||
|
sha256=$RAUC_IMAGE_DIGEST_0
|
||||||
|
size=$RAUC_IMAGE_SIZE_0
|
||||||
|
installed.timestamp=$tstamp
|
||||||
|
installed.count=1
|
||||||
|
activated.timestamp=$tstamp
|
||||||
|
activated.count=1
|
||||||
|
|
||||||
|
[slot.rootfs.1]
|
||||||
|
bundle.compatible=$RAUC_MF_COMPATIBLE
|
||||||
|
bundle.version=$RAUC_MF_VERSION
|
||||||
|
status=ok
|
||||||
|
sha256=$RAUC_IMAGE_DIGEST_0
|
||||||
|
size=$RAUC_IMAGE_SIZE_0
|
||||||
|
installed.timestamp=$tstamp
|
||||||
|
installed.count=1
|
||||||
|
activated.timestamp=$tstamp
|
||||||
|
activated.count=1
|
||||||
|
EOF
|
||||||
Executable
+43
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
name=$1
|
||||||
|
compat=$2
|
||||||
|
sign=$3
|
||||||
|
|
||||||
|
crt=$(ls $sign/*.crt)
|
||||||
|
key=$(ls $sign/*.key)
|
||||||
|
|
||||||
|
common=$(dirname "$(readlink -f "$0")")
|
||||||
|
|
||||||
|
work=$BUILD_DIR/mkrauc
|
||||||
|
mkdir -p "$work"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
cat >"$work/manifest.raucm" <<EOF
|
||||||
|
[update]
|
||||||
|
compatible=${compat}
|
||||||
|
version=${INFIX_VERSION}
|
||||||
|
|
||||||
|
[bundle]
|
||||||
|
format=verity
|
||||||
|
|
||||||
|
[hooks]
|
||||||
|
filename=hooks.sh
|
||||||
|
|
||||||
|
[image.rootfs]
|
||||||
|
filename=rootfs.img
|
||||||
|
hooks=post-install
|
||||||
|
EOF
|
||||||
|
|
||||||
|
rm -f "$BINARIES_DIR/$name.pkg"
|
||||||
|
|
||||||
|
rauc --cert="$crt" --key="$key" \
|
||||||
|
bundle "$work" "$BINARIES_DIR/$name.pkg"
|
||||||
Executable
+112
@@ -0,0 +1,112 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
|
||||||
|
common=$(dirname "$(readlink -f "$0")")
|
||||||
|
. "$common/lib.sh"
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. "$TARGET_DIR/etc/os-release"
|
||||||
|
|
||||||
|
# The INFIX_* variables may be composed from BR2_* variables,
|
||||||
|
# so we source them last.
|
||||||
|
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
|
||||||
|
|
||||||
|
ver()
|
||||||
|
{
|
||||||
|
if [ -n "$INFIX_RELEASE" ]; then
|
||||||
|
printf -- "-%s" "${INFIX_RELEASE#v}"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
load_cfg SIGN_ENABLED
|
||||||
|
if [ "$SIGN_ENABLED" = "y" ]; then
|
||||||
|
load_cfg BR2_ARCH
|
||||||
|
load_cfg SIGN_KEY
|
||||||
|
|
||||||
|
ixmsg "Signing SquashFS Image"
|
||||||
|
$common/sign.sh $BR2_ARCH $SIGN_KEY
|
||||||
|
|
||||||
|
ixmsg "Creating RAUC Update Bundle"
|
||||||
|
$common/mkrauc.sh "$NAME$(ver)" $INFIX_COMPATIBLE $SIGN_KEY
|
||||||
|
fi
|
||||||
|
|
||||||
|
load_cfg DISK_IMAGE
|
||||||
|
if [ "$DISK_IMAGE" = "y" ]; then
|
||||||
|
ixmsg "Creating Disk Image"
|
||||||
|
diskimg="${NAME}-disk$(ver).qcow2"
|
||||||
|
bootcfg=
|
||||||
|
if [ "$DISK_IMAGE_BOOT_DATA" ]; then
|
||||||
|
bootcfg="-b $DISK_IMAGE_BOOT_DATA -B $DISK_IMAGE_BOOT_OFFSET"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$BR2_TARGET_ROOTFS_SQUASHFS" != "y" ] && \
|
||||||
|
[ ! -f "$BINARIES_DIR/rootfs.squashfs" ]; then
|
||||||
|
ixmsg " Injecting $DISK_IMAGE_RELEASE_URL"
|
||||||
|
archive="$BINARIES_DIR/$(basename $DISK_IMAGE_RELEASE_URL)"
|
||||||
|
[ -f "$archive" ] || wget -O"$archive" "$DISK_IMAGE_RELEASE_URL"
|
||||||
|
tar -xa --strip-components=1 -C "$BINARIES_DIR" -f "$archive"
|
||||||
|
fi
|
||||||
|
|
||||||
|
$common/mkrauc-status.sh "$BINARIES_DIR/${NAME}.pkg" >"$BINARIES_DIR/rauc.status"
|
||||||
|
$common/mkdisk.sh -a $BR2_ARCH -n $diskimg -s $DISK_IMAGE_SIZE $bootcfg
|
||||||
|
fi
|
||||||
|
|
||||||
|
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"
|
||||||
|
$common/mkgns3a.sh $BR2_ARCH $NAME $diskimg $GNS3_APPLIANCE_RAM $GNS3_APPLIANCE_IFNUM
|
||||||
|
fi
|
||||||
|
|
||||||
|
load_cfg FIT_IMAGE
|
||||||
|
if [ "$FIT_IMAGE" = "y" ]; then
|
||||||
|
ixmsg "Creating Traditional FIT Image"
|
||||||
|
$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"
|
||||||
|
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
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
mainmenu "QEMU Virtualization"
|
mainmenu "QEMU Virtualization"
|
||||||
|
|
||||||
config QEMU_ARCH_IS_32
|
|
||||||
bool
|
|
||||||
|
|
||||||
config QEMU_ARCH_IS_64
|
|
||||||
bool
|
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Target Architecture"
|
prompt "Target Architecture"
|
||||||
default @ARCH@
|
default @ARCH@
|
||||||
@@ -18,10 +12,6 @@ config QEMU_x86_64
|
|||||||
bool "x86_64"
|
bool "x86_64"
|
||||||
select QEMU_ARCH_IS_64
|
select QEMU_ARCH_IS_64
|
||||||
|
|
||||||
config QEMU_arm
|
|
||||||
bool "AArch32 (little endian)"
|
|
||||||
select QEMU_ARCH_IS_32
|
|
||||||
|
|
||||||
config QEMU_aarch64
|
config QEMU_aarch64
|
||||||
bool "AArch64 (little endian)"
|
bool "AArch64 (little endian)"
|
||||||
select QEMU_ARCH_IS_64
|
select QEMU_ARCH_IS_64
|
||||||
@@ -64,7 +54,6 @@ endchoice
|
|||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Console"
|
prompt "Console"
|
||||||
default QEMU_CONSOLE_SERIAL if QEMU_arm
|
|
||||||
default QEMU_CONSOLE_VIRTIO
|
default QEMU_CONSOLE_VIRTIO
|
||||||
|
|
||||||
config QEMU_CONSOLE_VIRTIO
|
config QEMU_CONSOLE_VIRTIO
|
||||||
@@ -77,16 +66,15 @@ endchoice
|
|||||||
|
|
||||||
config QEMU_MACHINE
|
config QEMU_MACHINE
|
||||||
string "Select emulated machine"
|
string "Select emulated machine"
|
||||||
default "qemu-system-arm -M virt,accel=kvm:tcg -cpu max" if QEMU_arm
|
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 cortex-a53" if QEMU_aarch64
|
|
||||||
default "qemu-system-x86_64 -M pc,accel=kvm:tcg -cpu max" if QEMU_x86_64
|
default "qemu-system-x86_64 -M pc,accel=kvm:tcg -cpu max" if QEMU_x86_64
|
||||||
help
|
help
|
||||||
You should not have to change this setting, although you may
|
You should not have to change this setting, although you may
|
||||||
want to tweak it, or change the acceleration.
|
want to tweak it, or change the acceleration.
|
||||||
|
|
||||||
The default is based on the Buildroot architecture, selected by
|
The default is based on the Buildroot architecture, selected by
|
||||||
the defconfig you started with. Currently Infix supports
|
the defconfig you started with. Currently Infix supports only
|
||||||
arm (AArch32), aarch64 (ARM64), and x86_64 (AMD64).
|
aarch64 (ARM64) and x86_64 (AMD64).
|
||||||
|
|
||||||
config QEMU_MACHINE_RAM
|
config QEMU_MACHINE_RAM
|
||||||
string "RAM size (k/M/G)"
|
string "RAM size (k/M/G)"
|
||||||
@@ -99,20 +87,19 @@ config QEMU_MACHINE_RAM
|
|||||||
config QEMU_KERNEL
|
config QEMU_KERNEL
|
||||||
string
|
string
|
||||||
depends on QEMU_LOADER_KERNEL
|
depends on QEMU_LOADER_KERNEL
|
||||||
default "../zImage" if QEMU_arm
|
default "Image" if QEMU_aarch64
|
||||||
default "../Image" if QEMU_aarch64
|
default "bzImage" if QEMU_x86_64
|
||||||
default "../bzImage" if QEMU_x86_64
|
|
||||||
|
|
||||||
config QEMU_BIOS
|
config QEMU_BIOS
|
||||||
string
|
string
|
||||||
depends on !QEMU_LOADER_KERNEL
|
depends on !QEMU_LOADER_KERNEL
|
||||||
default "../u-boot.bin" if QEMU_LOADER_UBOOT
|
default "u-boot.bin" if QEMU_LOADER_UBOOT
|
||||||
default "../OVMF.fd" if QEMU_LOADER_OVMF
|
default "OVMF.fd" if QEMU_LOADER_OVMF
|
||||||
|
|
||||||
config QEMU_ROOTFS
|
config QEMU_ROOTFS
|
||||||
string
|
string
|
||||||
default "@DISK_IMG@" if !QEMU_ROOTFS_INITRD
|
default "@DISK_IMG@" if !QEMU_ROOTFS_INITRD
|
||||||
default "../rootfs.squashfs" if QEMU_ROOTFS_INITRD
|
default "rootfs.squashfs" if QEMU_ROOTFS_INITRD
|
||||||
|
|
||||||
config QEMU_DTB_EXTEND
|
config QEMU_DTB_EXTEND
|
||||||
bool
|
bool
|
||||||
@@ -224,15 +211,12 @@ endchoice
|
|||||||
|
|
||||||
config QEMU_NET_MODEL
|
config QEMU_NET_MODEL
|
||||||
string "Interface model"
|
string "Interface model"
|
||||||
default "virtio-net-device" if QEMU_arm
|
|
||||||
default "virtio-net-pci"
|
default "virtio-net-pci"
|
||||||
help
|
help
|
||||||
The default, virtio-net-pci, NIC works for most use-cases, but
|
The default, virtio-net-pci, NIC works for most use-cases, but
|
||||||
if you want to play with low-level stuff like ethtool, you
|
if you want to play with low-level stuff like ethtool, you
|
||||||
might want to test the Intel 82545EM driver, e1000.
|
might want to test the Intel 82545EM driver, e1000.
|
||||||
|
|
||||||
Note: ARM32 uses virtio-net-device (MMIO) by default.
|
|
||||||
|
|
||||||
config QEMU_NET_BRIDGE_DEV
|
config QEMU_NET_BRIDGE_DEV
|
||||||
string "Bridge device"
|
string "Bridge device"
|
||||||
depends on QEMU_NET_BRIDGE
|
depends on QEMU_NET_BRIDGE
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
################################################################################
|
|
||||||
#
|
|
||||||
# qemu-scripts
|
|
||||||
#
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
QEMU_SCRIPTS_DIR := $(pkgdir)
|
|
||||||
qemu-kconfig = \
|
|
||||||
CONFIG_="CONFIG_" \
|
|
||||||
BR2_CONFIG="$(BINARIES_DIR)/qemu/.config" \
|
|
||||||
$(BUILD_DIR)/buildroot-config/$(1) $(2) "$(BINARIES_DIR)/qemu/Config.in"
|
|
||||||
|
|
||||||
ifeq ($(QEMU_SCRIPTS),y)
|
|
||||||
|
|
||||||
.PHONY: run
|
|
||||||
run:
|
|
||||||
@$(BINARIES_DIR)/qemu/run.sh
|
|
||||||
|
|
||||||
.PHONY: run-menuconfig
|
|
||||||
run-menuconfig: $(BUILD_DIR)/buildroot-config/mconf
|
|
||||||
@$(call qemu-kconfig,mconf)
|
|
||||||
|
|
||||||
qemu-scripts: \
|
|
||||||
$(BINARIES_DIR)/qemu/run.sh \
|
|
||||||
$(BINARIES_DIR)/qemu/Config.in \
|
|
||||||
$(BINARIES_DIR)/qemu/.config
|
|
||||||
|
|
||||||
$(BINARIES_DIR)/qemu/run.sh: $(QEMU_SCRIPTS_DIR)/run.sh
|
|
||||||
@$(call IXMSG,"Installing QEMU scripts")
|
|
||||||
@mkdir -p $(dir $@)
|
|
||||||
@cp $< $@
|
|
||||||
|
|
||||||
$(BINARIES_DIR)/qemu/Config.in: $(QEMU_SCRIPTS_DIR)/Config.in.in
|
|
||||||
@mkdir -p $(dir $@)
|
|
||||||
@sed \
|
|
||||||
-e "s:@ARCH@:QEMU_$(BR2_ARCH):" \
|
|
||||||
-e "s:@DISK_IMG@:../$(INFIX_ARTIFACT).qcow2:" \
|
|
||||||
< $< >$@
|
|
||||||
|
|
||||||
$(BINARIES_DIR)/qemu/.config: $(BINARIES_DIR)/qemu/Config.in
|
|
||||||
@$(call qemu-kconfig,conf,--olddefconfig)
|
|
||||||
@rm -f $@.old
|
|
||||||
|
|
||||||
TARGETS_ROOTFS += qemu-scripts
|
|
||||||
endif
|
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
#
|
#
|
||||||
# shellcheck disable=SC3037
|
# shellcheck disable=SC3037
|
||||||
|
|
||||||
qdir=$(dirname "$(readlink -f "$0")")
|
# Local variables
|
||||||
imgdir=$(readlink -f "${qdir}/..")
|
imgdir=$(readlink -f "$(dirname "$0")")
|
||||||
prognm=$(basename "$0")
|
prognm=$(basename "$0")
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
@@ -56,8 +56,12 @@ die()
|
|||||||
|
|
||||||
load_qemucfg()
|
load_qemucfg()
|
||||||
{
|
{
|
||||||
|
tmp=$(mktemp -p /tmp)
|
||||||
|
|
||||||
|
grep ^CONFIG_QEMU_ "$1" >"$tmp"
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
. "./.config"
|
. "$tmp"
|
||||||
|
rm "$tmp"
|
||||||
|
|
||||||
[ "$CONFIG_QEMU_MACHINE" ] || die "Missing QEMU_MACHINE"
|
[ "$CONFIG_QEMU_MACHINE" ] || die "Missing QEMU_MACHINE"
|
||||||
[ "$CONFIG_QEMU_ROOTFS" ] || die "Missing QEMU_ROOTFS"
|
[ "$CONFIG_QEMU_ROOTFS" ] || die "Missing QEMU_ROOTFS"
|
||||||
@@ -80,10 +84,7 @@ loader_args()
|
|||||||
|
|
||||||
append_args()
|
append_args()
|
||||||
{
|
{
|
||||||
# ARM32 doesn't support virtio console properly, always use serial
|
if [ "$CONFIG_QEMU_CONSOLE_VIRTIO" ]; then
|
||||||
if [ "$CONFIG_QEMU_arm" ]; then
|
|
||||||
echo -n "console=ttyAMA0 "
|
|
||||||
elif [ "$CONFIG_QEMU_CONSOLE_VIRTIO" ]; then
|
|
||||||
echo -n "console=hvc0 "
|
echo -n "console=hvc0 "
|
||||||
elif [ "$CONFIG_QEMU_x86_64" ]; then
|
elif [ "$CONFIG_QEMU_x86_64" ]; then
|
||||||
echo -n "console=ttyS0 "
|
echo -n "console=ttyS0 "
|
||||||
@@ -119,13 +120,7 @@ rootfs_args()
|
|||||||
echo -n "-device sd-card,drive=mmc "
|
echo -n "-device sd-card,drive=mmc "
|
||||||
echo -n "-drive id=mmc,file=$CONFIG_QEMU_ROOTFS,if=none,format=raw "
|
echo -n "-drive id=mmc,file=$CONFIG_QEMU_ROOTFS,if=none,format=raw "
|
||||||
elif [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
elif [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
||||||
# ARM32 virt machine uses MMIO virtio devices, not PCI
|
echo -n "-drive file=qemu.qcow2,if=virtio,format=qcow2,bus=0,unit=0 "
|
||||||
if [ "$CONFIG_QEMU_arm" ]; then
|
|
||||||
echo -n "-drive file=qemu.qcow2,if=none,format=qcow2,id=rootfs "
|
|
||||||
echo -n "-device virtio-blk-device,drive=rootfs "
|
|
||||||
else
|
|
||||||
echo -n "-drive file=qemu.qcow2,if=virtio,format=qcow2,bus=0,unit=0 "
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,38 +173,22 @@ rw_args()
|
|||||||
dd if=/dev/zero of="aux.ext4" bs=1M count=1 >/dev/null 2>&1
|
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
|
mkfs.ext4 -L aux "aux.ext4" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
echo -n "-drive file=aux.ext4,if=virtio,format=raw,bus=0,unit=3 "
|
||||||
|
|
||||||
if ! [ -f "$CONFIG_QEMU_RW" ]; then
|
if ! [ -f "$CONFIG_QEMU_RW" ]; then
|
||||||
dd if=/dev/zero of="$CONFIG_QEMU_RW" bs=16M count=1 >/dev/null 2>&1
|
dd if=/dev/zero of="$CONFIG_QEMU_RW" bs=16M count=1 >/dev/null 2>&1
|
||||||
mkfs.ext4 -L cfg "$CONFIG_QEMU_RW" >/dev/null 2>&1
|
mkfs.ext4 -L cfg "$CONFIG_QEMU_RW" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ARM32 virt machine uses MMIO virtio devices, not PCI
|
echo -n "-drive file=$CONFIG_QEMU_RW,if=virtio,format=raw,bus=0,unit=1 "
|
||||||
if [ "$CONFIG_QEMU_arm" ]; then
|
|
||||||
echo -n "-drive file=aux.ext4,if=none,format=raw,id=aux "
|
|
||||||
echo -n "-device virtio-blk-device,drive=aux "
|
|
||||||
echo -n "-drive file=$CONFIG_QEMU_RW,if=none,format=raw,id=cfg "
|
|
||||||
echo -n "-device virtio-blk-device,drive=cfg "
|
|
||||||
|
|
||||||
if [ "$CONFIG_QEMU_RW_VAR_OPT" ]; then
|
if [ "$CONFIG_QEMU_RW_VAR_OPT" ]; then
|
||||||
if ! [ -f "$CONFIG_QEMU_RW_VAR" ]; 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=$CONFIG_QEMU_RW_VAR_SIZE count=1 >/dev/null 2>&1
|
||||||
mkfs.ext4 -L var "$CONFIG_QEMU_RW_VAR" >/dev/null 2>&1
|
mkfs.ext4 -L var "$CONFIG_QEMU_RW_VAR" >/dev/null 2>&1
|
||||||
fi
|
|
||||||
echo -n "-drive file=$CONFIG_QEMU_RW_VAR,if=none,format=raw,id=var "
|
|
||||||
echo -n "-device virtio-blk-device,drive=var "
|
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo -n "-drive file=aux.ext4,if=virtio,format=raw,bus=0,unit=3 "
|
|
||||||
echo -n "-drive file=$CONFIG_QEMU_RW,if=virtio,format=raw,bus=0,unit=1 "
|
|
||||||
|
|
||||||
if [ "$CONFIG_QEMU_RW_VAR_OPT" ]; then
|
echo -n "-drive file=$CONFIG_QEMU_RW_VAR,if=virtio,format=raw,bus=0,unit=2 "
|
||||||
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
|
|
||||||
mkfs.ext4 -L var "$CONFIG_QEMU_RW_VAR" >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
echo -n "-drive file=$CONFIG_QEMU_RW_VAR,if=virtio,format=raw,bus=0,unit=2 "
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,7 +222,7 @@ rocker_port_args()
|
|||||||
net_args()
|
net_args()
|
||||||
{
|
{
|
||||||
# Infix will pick up this file via fwcfg and install it to /etc
|
# Infix will pick up this file via fwcfg and install it to /etc
|
||||||
mactab=${qdir}/mactab
|
mactab=${imgdir}/mactab
|
||||||
:> "$mactab"
|
:> "$mactab"
|
||||||
echo -n "-fw_cfg name=opt/mactab,file=$mactab "
|
echo -n "-fw_cfg name=opt/mactab,file=$mactab "
|
||||||
|
|
||||||
@@ -282,7 +261,7 @@ vpd_args()
|
|||||||
{
|
{
|
||||||
[ "$CONFIG_QEMU_VPD" = "y" ] || return
|
[ "$CONFIG_QEMU_VPD" = "y" ] || return
|
||||||
|
|
||||||
vpd_file="${qdir}/vpd"
|
vpd_file="${imgdir}/vpd"
|
||||||
|
|
||||||
if ! [ -f "$vpd_file" ]; then
|
if ! [ -f "$vpd_file" ]; then
|
||||||
onieprom="${imgdir}/onieprom"
|
onieprom="${imgdir}/onieprom"
|
||||||
@@ -334,35 +313,8 @@ gdb_args()
|
|||||||
echo -n "-gdb chardev:gdbqemu"
|
echo -n "-gdb chardev:gdbqemu"
|
||||||
}
|
}
|
||||||
|
|
||||||
extract_squashfs()
|
|
||||||
{
|
|
||||||
# Extract rootfs.squashfs from rootfs.itb if missing
|
|
||||||
# The .itb file is rootfs.itbh (4096 bytes) + rootfs.squashfs
|
|
||||||
input="${1:-rootfs.itb}"
|
|
||||||
output="${2:-rootfs.squashfs}"
|
|
||||||
|
|
||||||
[ -f "$input" ] || die "Cannot extract $output: $input not found"
|
|
||||||
|
|
||||||
echo "Extracting $output from $input (skipping 4096-byte FIT header)..."
|
|
||||||
dd if="$input" of="$output" bs=4096 skip=1 2>/dev/null \
|
|
||||||
|| die "Failed to extract $output from $input"
|
|
||||||
|
|
||||||
echo "Successfully created $output"
|
|
||||||
}
|
|
||||||
|
|
||||||
run_qemu()
|
run_qemu()
|
||||||
{
|
{
|
||||||
# Auto-extract rootfs.squashfs from rootfs.itb if needed for initrd mode
|
|
||||||
if [ "$CONFIG_QEMU_ROOTFS_INITRD" = "y" ]; then
|
|
||||||
if [ "$CONFIG_QEMU_ROOTFS" = "rootfs.squashfs" ] && [ ! -f "rootfs.squashfs" ]; then
|
|
||||||
if [ -f "rootfs.itb" ]; then
|
|
||||||
extract_squashfs "rootfs.itb" "rootfs.squashfs"
|
|
||||||
else
|
|
||||||
die "Missing rootfs.squashfs and cannot find rootfs.itb to extract it from"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
if [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
||||||
if ! qemu-img check "qemu.qcow2"; then
|
if ! qemu-img check "qemu.qcow2"; then
|
||||||
rm -f "qemu.qcow2"
|
rm -f "qemu.qcow2"
|
||||||
@@ -426,7 +378,7 @@ dtb_args()
|
|||||||
|
|
||||||
# Extend it with the environment and signing information in
|
# Extend it with the environment and signing information in
|
||||||
# u-boot.dtb.
|
# u-boot.dtb.
|
||||||
echo "qemu.dtb ../u-boot.dtb" | \
|
echo "qemu.dtb u-boot.dtb" | \
|
||||||
xargs -n 1 dtc -I dtb -O dts | \
|
xargs -n 1 dtc -I dtb -O dts | \
|
||||||
{ echo "/dts-v1/;"; sed -e 's:/dts-v[0-9]\+/;::'; } | \
|
{ echo "/dts-v1/;"; sed -e 's:/dts-v[0-9]\+/;::'; } | \
|
||||||
dtc >qemu-extended.dtb 2>/dev/null
|
dtc >qemu-extended.dtb 2>/dev/null
|
||||||
@@ -435,7 +387,7 @@ dtb_args()
|
|||||||
echo -n "-dtb qemu-extended.dtb "
|
echo -n "-dtb qemu-extended.dtb "
|
||||||
else
|
else
|
||||||
# Otherwise we just use the unmodified one
|
# Otherwise we just use the unmodified one
|
||||||
echo -n "-dtb ../u-boot.dtb "
|
echo -n "-dtb u-boot.dtb "
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,12 +433,13 @@ EOF
|
|||||||
|
|
||||||
menuconfig()
|
menuconfig()
|
||||||
{
|
{
|
||||||
grep -q QEMU_MACHINE Config.in || die "$prognm: must be run from the $$O/images/qemu directory"
|
grep -q QEMU_MACHINE Config.in || die "$prognm: must be run from the output/images directory"
|
||||||
command -v kconfig-mconf >/dev/null || die "$prognm: cannot find kconfig-mconf for menuconfig"
|
command -v kconfig-mconf >/dev/null || die "$prognm: cannot find kconfig-mconf for menuconfig"
|
||||||
exec kconfig-mconf Config.in
|
exec kconfig-mconf Config.in
|
||||||
}
|
}
|
||||||
|
|
||||||
cd "$qdir" || (echo "Failed cd to $qdir"; exit 1)
|
scriptdir=$(dirname "$(readlink -f "$0")")
|
||||||
|
cd "$scriptdir" || (echo "Failed cd to $scriptdir"; exit 1)
|
||||||
|
|
||||||
while [ "$1" != "" ]; do
|
while [ "$1" != "" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
@@ -505,7 +458,13 @@ while [ "$1" != "" ]; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
load_qemucfg
|
if [ -f .config ]; then
|
||||||
|
# Customized settings from 'qemu.sh -c'
|
||||||
|
load_qemucfg .config
|
||||||
|
else
|
||||||
|
# Shipped defaults from release tarball
|
||||||
|
load_qemucfg qemu.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$QEMU_EXTRA_APPEND" ]; then
|
if [ -z "$QEMU_EXTRA_APPEND" ]; then
|
||||||
QEMU_EXTRA_APPEND="$*"
|
QEMU_EXTRA_APPEND="$*"
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
/ {
|
||||||
|
description = "Infix";
|
||||||
|
creator = "infix";
|
||||||
|
#address-cells = <0x1>;
|
||||||
|
|
||||||
|
images {
|
||||||
|
rootfs {
|
||||||
|
description = "Infix";
|
||||||
|
type = "ramdisk";
|
||||||
|
os = "linux";
|
||||||
|
compression = "none";
|
||||||
|
data = /incbin/("rootfs.squashfs");
|
||||||
|
signature-1 {
|
||||||
|
algo = "sha256,rsa4096";
|
||||||
|
key-name-hint = "infix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
default = "verity";
|
||||||
|
verity {
|
||||||
|
ramdisk = "rootfs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -31,8 +31,6 @@ bind "set completion-ignore-case on"
|
|||||||
# show all completions immediately instead of ringing bell
|
# show all completions immediately instead of ringing bell
|
||||||
bind "set show-all-if-ambiguous on"
|
bind "set show-all-if-ambiguous on"
|
||||||
|
|
||||||
export LANG=C.UTF-8
|
|
||||||
|
|
||||||
log()
|
log()
|
||||||
{
|
{
|
||||||
local fn="/var/log/syslog"
|
local fn="/var/log/syslog"
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
set COLORTERM=yes
|
set COLORTERM=yes
|
||||||
set LANG=C.UTF-8
|
rlimit soft core infinity
|
||||||
rlimit soft core infinity
|
|
||||||
@@ -16,7 +16,7 @@ cfgfs /config configfs nofail,noauto 0 0
|
|||||||
# /home, /root, and /var, are determined dynamically by /usr/libexec/infix/mnt
|
# /home, /root, and /var, are determined dynamically by /usr/libexec/infix/mnt
|
||||||
# depending on the available devices.
|
# depending on the available devices.
|
||||||
mnttmp /mnt/tmp tmpfs defaults 0 0
|
mnttmp /mnt/tmp tmpfs defaults 0 0
|
||||||
LABEL=aux /mnt/aux auto noatime,nodiratime,noauto,errors=remount-ro 0 0
|
LABEL=aux /mnt/aux ext2 noatime,nodiratime,noauto,errors=remount-ro 0 0
|
||||||
LABEL=var /mnt/var ext4 noatime,nodiratime,noauto,commit=30,errors=remount-ro 0 0
|
LABEL=var /mnt/var ext4 noatime,nodiratime,noauto,commit=30,errors=remount-ro 0 0
|
||||||
LABEL=cfg /mnt/cfg ext4 noatime,nodiratime,noauto,commit=30,errors=remount-ro 0 0
|
LABEL=cfg /mnt/cfg ext4 noatime,nodiratime,noauto,commit=30,errors=remount-ro 0 0
|
||||||
hostfs /mnt/host 9p cache=none,msize=16384,noauto 0 0
|
hostfs /mnt/host 9p cache=none,msize=16384,noauto 0 0
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user