21 Commits
Author SHA1 Message Date
Tobias Waldekranz 516313b489 board/common: Move QEMU script generation to separate make target 2025-12-03 16:46:07 +01:00
Tobias Waldekranz 218cf5ccdb board: Defer Makefile fragment inclusion to each architecture
The board/*/*/*.mk is very broad, intended to hit all board specific
definitions, but may also cause duplicate inclusions, e.g., in
board/common.

Let each architecture do the inclusion instead.
2025-12-03 16:45:58 +01:00
Joachim Wiberg ab56c1be50 Relocate src/board/* and package/board/* to board/
This commit consolidates all BSP support files into the Buildroot standard
board/ directory.  The concept of selectable boards in menuconfig remains
as-is but now lives in board/ instead.

Drop support for board-specific post-build.sh scripts, not needed atm. and
we should really use Buildroot _POST_INSTALL_HOOKS in the board .mk files
instead.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:06 +01:00
Tobias Waldekranz d16ad7eedc build: Define build id and version in one place
Before this change, setting `GIT_VERSION` in `make`'s environment was
intended to allow the user to specify a custom build id.  As it turns
out, `test/test.mk` had duplicated the logic from
`board/common/post-build.sh` to unconditionally override any value set
in it.  Because of the way `make` handles variables, where assignments
to variables inherited from the environment are exported back to
it[^1], this would mean that `test.mk` would always clobber any value
set by the user.  Furthermore, there is also this file called
`buildroot/package/git/git.mk`, which also (reasonably) has opinions
about what the proper value of `GIT_VERSION` should be.  In summary,
this was a bit of a mess.

Therefore: Make sure that there is one single place where we determine
the build id and version, and make sure that those variables are
scoped under the `INFIX_` prefix to avoid clashing with any other
component.

[^1]: https://www.gnu.org/software/make/manual/html_node/Environment.html
2024-12-05 10:29:21 +01:00
Joachim Wiberg d34e852574 Hook into toolchain-external for legal-info extraction
External pre-built toolchains are usually distrubuted as binary-only and
currently (Buildroot 2023.02) do not have a license file.  Infix use the
Bootlin toolchains, built from Buildroot, which contains a summary.csv
file with all packages, and licenses, used.

This commit adds that csv, under the name toolchain-external-bootlin.csv,
to the legal-info output directory.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-11 06:19:07 +02:00
Tobias Waldekranz 2e3d8881cc test: Allow unit tests to be run from non-x86 builds
Since there is no dependency on anything being built, move the
test-unit target to an architecture-neutral location.
2024-03-13 11:01:15 +01:00
Mattias Walström 8f996859dc Add infix CFLAGS, used when building src/ (confd, statd....) 2024-02-23 14:01:23 +01:00
Joachim WibergandTobias Waldekranz 871a536b1b Minor, add comment for Buildroot package overrides
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-12-18 17:32:27 +01:00
Mattias Walström 37f7b5ba92 Add support for reading routing operational data for IPv4
In the CLI:
admin@infix-00-00-00:/> show routes
PREFIX                        DESTINATION                   PROTOCOL  METRIC
1.1.1.0/24                    e0                            kernel
192.168.100.0/24              1.1.1.1                       static    20
192.168.110.2/32              blackhole                     static    20
192.168.120.2/32              blackhole                     static    20
192.168.130.2/32              unreachable                   static    20
2023-11-23 10:30:26 +01:00
Joachim WibergandTobias Waldekranz 2d453d0025 Fix #46: 'make run-menuconfig' needs buildroot-config/mconf
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-30 13:37:12 +02:00
Tobias Waldekranz f6a7fe5353 qemu: Allow qemu.sh to be run from any directory
Since qemu.sh is now tied to the directory it's ran from, it makes
sense to change into that directory before starting to resolve any
file paths. This let's us start the script from any directory without
the need for any (cd && qemu) subshell.
2023-06-05 14:07:02 +02:00
Joachim WibergandTobias Waldekranz f8d5c3a9b8 Drop Infix Qemu support from "make menuconfig"
This change drops Qemu menuconfig from the regular 'make menuconfig' in
favor of full release tarball support.  Meaning "make update-defconfig"
will not longer cause unwanted diffs for Qemu defaults checked in when
the defconfigs are updated.

Details:

 - For "make run, run-menuconfig" and bootstrapping qemu.cfg we want to
   use the Buildroot menuconfig system. However, we must set the proper
   environment variables for it to not overwrite our product's .config,
   so the calls to conf and mconf are not pretty.

 - The qemu.sh script can probably be cleaned up further, I've just set
   a CONFIG_ prefix to all variables and dropped any images/ prefix vs.
   the original.  The CONFIG_ prefix is to make the qemu.cfg compatible
   with kconfig-mconf from the kconfig-frontends package.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-05 14:07:02 +02:00
Tobias Waldekranz d777d59ee2 common: Prettify output from Infix extensions to the build system
This makes it easier to spot where we've added things (that might not
work :))
2023-03-13 09:57:04 +01:00
Tobias Waldekranz b655ac778a common: Install signing key and environment in U-Boot's build tree
Ensure that whenever U-Boot is built:
- The chosen signing key and is converted to the expected format and
  installed in the build tree.
- Infix's environment extensions are installed in the build tree
2023-02-20 09:57:31 +01:00
Joachim Wiberg e2f3e43461 Update .PHONY rule, missing argument
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-08 11:29:58 +01:00
Joachim Wiberg 073f2fb043 qemu: move quick-help text to right before starting qemu
The qemu.sh script can fail, due to misconfiguration or other problems,
before it actually starts qemu.  Therefore, move the help text to right
before starting the emulator.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-12-05 21:12:04 +01:00
Tobias Waldekranz 4948cfebff aarch64/sparx5: Add support for PCB135 (eMMC) board 2022-11-18 16:24:32 +01:00
Joachim WibergandTobias Waldekranz e641ca947e aarch64: replace package override with local.mk rule in external.mk
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-11-18 12:05:51 +01:00
Tobias Waldekranz 4232b22b76 qemu: Add virtualization support
The virtualized system is configured through kconfig under "External
Options"->"QEMU Virtualization".

To launch the system, simply run "make run". This works both from
output directories, and from the infix root with O= set.
2022-11-17 00:19:23 +01:00
Joachim Wiberg 2dd603113b package/finit: new init package, with skeleton
This patch imports Finit v4.3 from myLinux to infIX along with a
rudimentary rootfs skeleton.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-05-17 08:43:08 +02:00
Joachim Wiberg a441f9a988 Create basic BR2_EXTERNAL, with a twist
Initial defconfig is based on Buildroot qemu_x86_64_defconfig, with a
Bootlin pre-built toolchain and a very basic qemu.sh script, generated
by a local post-image.sh, for `make run`.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-05-09 19:52:45 +02:00