Commit Graph
50 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 065c131285 board/common: Move GNS3 appliance creation to separate make target
Limit support to x86, like we do on the "official" appliances on the
marketplace. Aarch64 has never really been used AFAIK.

Avoid the os-release import, since all that info is not important now
that these appliance files are only for development scenarios. In all
other cases, the official one, based on a proper release, should be
used.
2025-12-03 16:46:06 +01:00
Tobias Waldekranz 046a736dc9 board/common: Remove broken "Traditional FIT image"
We have not installed .dtb:s to $O/images/ for quite some time, and
nobody cared. That goes to show that this is not really used.

The image is still useful at times, so if it needed in the future,
then we can resurrect it from the logs and refactor it to an image
package.
2025-12-03 16:46:05 +01:00
Tobias Waldekranz aee053c94b board/common: Move QEMU disk creation to separate make target 2025-12-03 16:46:04 +01:00
Tobias Waldekranz 290bdfcedb board/common: Consolidate aux.ext4 generation
Add a generic image target to build aux.ext4, which can be used both
when creating target-specific SD-card images, and when creating
regular disk images.

While we're here, make sure that we don't need a RAUC bundle in order
to generate aux.ext4 (which mkrauc-status.sh did). This saves us time
on _every_ incremental build.
2025-12-03 16:46:03 +01:00
Tobias Waldekranz dd98c57bc7 board/common: Move RAUC bundle creation to separate make target 2025-12-03 16:46:02 +01:00
Tobias Waldekranz bf1a431692 board/common: Move rootfs.itb/itbh creation to separate make target 2025-12-03 16:46:01 +01:00
Mattias Walström d5536fa536 board/common/post-image: Remove hack for building sdcards images
Bootloaders is not built during normal build, not possible to create
sdcard images.
2025-08-22 21:43:44 +02:00
Joachim Wiberg d151b5ef7c board/common: skip qemu.sh et al for bootloader builds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-08-12 10:46:34 +02:00
Mattias Walström d5d3eef08b rpi4: Move to a board package and normal aarch64 build
Features availible on RPI4 so far is:

* WiFi
* USB
* (Graphics, untested)
2025-07-11 17:06:39 +02:00
Mattias Walström d3fa51e4fa Use qcow2 for disk image instead of raw image
This make the release bundle much smaller, the disk image size
change from 512M to 2xsizeof(squashimage)
2025-04-07 08:16:33 +02:00
Mattias Walström 6cfe5f8c58 Fix symlink in release packages
Fix #1002
2025-04-07 08:16:33 +02:00
Joachim Wiberg a1771ff5c6 board/common: use INFIX_COMPATIBLE also in rauc.status
Follow-up to cedb654, issue #755.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-10-23 10:03:22 +02:00
Joachim Wiberg ecc1e24ba9 board/common: bundle helpful README in release tarballs
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-09-27 07:54:45 +02:00
Ahmed KaricandAhmed Karic 621e76c925 Revert "board/common: introduce image test-mode"
This reverts commit 241f3f224f.
2024-09-23 15:35:21 +02:00
Ahmed KaricandMattias Walström 241f3f224f board/common: introduce image test-mode
To support testing, the test-config.cfg file has been introduced in Infix.
Additionally, a "test mode" for the running image is required for this
configuration to be applied.

Basically the test-config will only be loaded when the device is in test mode,
which is determined by the presence of the /mnt/aux/test-mode file.
However, placing this file via the Qeneth system proved to be
inconvenient in the test environment. Therefore, it the entire image is
built in test mode, with the 'test-mode' file preloaded onto the disk
image (specifically in the auxiliary partition).
To support this, a new variable, (bool) DISK_IMAGE_TEST_MODE, has been
introduced:

 enabled: the image will be built in the test mode;
 disabled: the image will be built in the standard mode.

Part of issue #568
2024-08-26 13:59:49 +02:00
Joachim WibergandTobias Waldekranz 890d812b69 board/common: allow device specific compat strings for .pkg files
This patch allows us to define the rauc manifest compatibility string with
menuconfig.  The INFIX_IMAGE_ID is a direct replacement for the previously
composed "infix-$ARCH" in mkrauc.sh.

For example, the compatibility string "infix-aarch64" is replaced for the
NanoPi R2S with "infix-r2s" to ensure users get a proper warning if they
try upgrading to an image that maybe boots, but is not likely to work.

The CLI upgrade command gets a 'force' flag to override the compat string.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-08-16 16:47:28 +02:00
Joachim Wiberg 28b1ffe2ae board/riscv64: generalized secure boot support
- Enable squashfs for rootfs image
 - Enable signing of images
 - Add secondary partition
 - Add mkaux.sh script

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-08-08 13:35:27 +02:00
Mattias WalströmandJoachim Wiberg 8c333ab7e5 Fix regression when merge /usr
cp: cannot stat '/home/lazzer/Documents/addiva/infix/board/common/rootfs/bin/onieprom': No such file or directory
Signed-off-by: Mattias Walström <lazzer@gmail.com>
2024-08-07 17:22:25 +02:00
Joachim Wiberg 84f83d635b board/common: fix #294: drop 'v' from version in filenames
The files inside a release tarball, as well as the tarball name itself,
should not have the leading 'v', that's just for the tag.

Also, add -ver to GNS3 disk.img file as well.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-02-25 19:49:27 +01:00
Richard AlpeandJoachim Wiberg 63a34d570d Use default pwd hash from VPD in QEMU
This commit does several things. Its end goal is to fetch the admin
password hash from VPD memory during factory bootstrap.

To accomplish this probe creates a new file /run/system.json with
information read from a fw_cfg QEMU partition. The data from
/run/system.json is then later used during config bootstrap to fill in
the factory administrator password.

The idea is to make QEMU behave the same way hardware does, i.e. a
default/factory password should be fetched and used from
"hardware memory". The hardware portion of this is yet to be done.

Signed-off-by: Richard Alpe <richard@bit42.se>
2023-11-24 08:55:57 +01:00
Joachim WibergandTobias Waldekranz afbf92c07e configs: drop x86_64_minimal_defconfig
Replaced with full build in GitHub Actions.  No other use-cases for it,
and too much of a hassle to maintain, so remove.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-31 09:28:28 +01:00
Joachim Wiberg acecbe7e5d Allow custom image filename being set in menuconfig
This adds support for the two /etc/os-release variables:

 - IMAGE_ID
 - IMAGE_VERSION

The former is configurable, with fallback to name-arch, and the latter
is only set for relase builds.  During releae builds the release will
be appended to the image name.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-17 13:26:26 +02:00
Joachim Wiberg 230c2adae7 board/common: rename disk.img and update .gns3a
- Create per-arch unique distribution file names
 - Source .gns3a information from /etc/os-release

Instead of attempting to create unique file names by hard-coding an
'infix-' prefix and extracting the "board" or "arch" part from the
defconfig, let's use the branding information from /etc/os-release
along with $BR2_ARCH.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-12 11:22:55 +02:00
Joachim Wiberg f2e30943ee board/common: generate images/Config.in and reduce x86 ram
The default arch and disk image filename needs to be generated
to be unique per, at least, each architecture build.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-12 11:22:55 +02:00
Joachim Wiberg c6d4fbf341 board/common: generate a simplified .gns3a for aarch64 builds
Due to problems with using u-boot as loader¹ we decided to start the
system by calling the kernel image directly.  The downside to that is
that, even though RAUC upgrades would work, the kernel would remain
the same.

Improvements to this are of course welcome.

________
¹) Must extract the built-in .dtb and merge with the Qemu .dtb at runtime
   to be able to boot primary (or secondry) image.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-12 11:22:55 +02:00
Joachim Wiberg b40484e262 board/common: fix load_cfg key=value extraction
Calling `load_cfg BR2_EXTERNAL_INFIX_PATH` from post-image.sh caused
warnings due to multiple hits in the .config file:

post-image.sh: 12: /tmp/tmp.5a3xhQQVc8: BR2_EXTERNAL_INFIX_PATH: not found
post-image.sh: 13: /tmp/tmp.5a3xhQQVc8: BR2_EXTERNAL_INFIX_PATH: not found

Let's grep for a "key.*=" instead of "key" to drop those warnings, while
still acting as a catch-all for partial matches.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-10-12 11:22:55 +02:00
Tobias WaldekranzandJoachim Wiberg 73f991081c post-image: Allow disk images to be built from downloaded release
This is useful when we're only building a bootloader, but we still
want to create a full disk image on the format expected by Infix.
2023-08-25 10:51:45 +02:00
Tobias WaldekranzandJoachim Wiberg c08fe9f522 post-image: Defer RAUC status file generation to disk image creation
In the future we want to build disk images from builds where we
haven't locally built Infix, we've just downloaded an existing
release. In those cases we also have to create rauc.status, even
though we're not creating a bundle.
2023-08-25 10:51:45 +02:00
Joachim Wiberg 89ea840e74 board/common: append $INFIX_RELEASE to artifact names
This patch affects the various artiact file names in release tarballs.
The files /etc/os-release and /etc/version in the image use the actual
GIT commit (git describe), as per post-build.sh

Guiding principle: artifacts without release suffix are development or
"nightly" builds.  Artifacts *with* release suffix are released ones.

This drops the $GITVER from .img files for consistency with the other
artifacts, e.g. .gns3a and .pkg.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-22 23:12:10 +02:00
Joachim Wiberg 3afd84fb1a board: minimal builds provide qeneth compatible .img
Minimal builds should probably trigger use of another template in
Infamy, but for now we use this.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-09 11:54:23 +02:00
Joachim Wiberg c34981cc9f board/common: allow image signing to be optional
Primarily intended for minimal/testing images, but likely also useful
for other use-cases as well.

Defaults remain to sign all images.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-09 11:54:23 +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
Joachim WibergandTobias Waldekranz 816cf5c370 qemu: add stand-alone menuconfig support
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-05 14:07:02 +02:00
Joachim WibergandTobias Waldekranz 93701ae2ef qemu: export Qemu start script in release tarball
First basic step, we also want a menuconfig-like way of changing the
settings, e.g., networking options.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-06-05 14:07:02 +02:00
Joachim Wiberg 60fa170bee board/common: for consistency, preserve x86_64 even in filenames
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-29 12:47:30 +02:00
Joachim Wiberg 5e15d85ff9 board/common: artifact naming overhaul
With the introduction of the -classic defconfigs we need to also make
sure to name the resulting artifacts accordingly:

 - infix-$ARCH.{gns3a,img,pkg}
 - infix-$ARCH-classic.{gns3a,img,pkg}

For release builds the version (-23.02-$REV) will be appended before
the file suffix, e.g., infix-x86-64-classic-23.02-3.img

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-28 18:18:16 +02:00
Joachim WibergandTobias Waldekranz 3caaada051 board/common: add menuconfig support for GNS3 RAM and num. of ifaces
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-27 09:59:35 +02:00
Joachim WibergandTobias Waldekranz ce10e4b734 board/common: add missing $DISK_IMAGE_SIZE to mkdisk.sh
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-27 09:59:35 +02:00
Tobias Waldekranz 19672fcc58 rauc: Initial support
Add support for firmware updates via RAUC on aarch64. The created RAUC
bundle (images/infix-$BR2_ARCH.pkg) is signed with the same key used
to sign the raw FIT image.
2023-03-13 14:46:37 +01:00
Tobias Waldekranz 6cc26307b7 common: Mark output from Infix shell scripts similarly to Make
Similarly to how $(call IXMSG,"hello world") outputs a blue
information line from a makefile, provide `ixmsg` to accomplish the
same thing in shell scripts.

Use a different prefix (`#!:` vs `>>>`) to differentiate it from
makefile output.
2023-03-13 09:57:04 +01:00
Tobias Waldekranz f3304a6539 common: Unify disk image generation across aarch64 and amd64
On amd64, we use grub instead of U-Boot, because yours truly can't
figure out how to handle ACPI handover to the kernel.

The resulting image is now called disk.img instead of the old mmc.img,
since we can use it over any interface (e.g. virtio or SCSI).
2023-03-13 09:57:03 +01:00
Joachim Wiberg 046b15fbc0 common: separate handling of aarch64 and amd64 images, for now
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-28 11:33:35 +01:00
Tobias Waldekranz 499a8f718c common: Create (e)MMC image with redundant root filesystems
This image contains:

- A partition to hold bootloader config ("aux").

- Two redundant copies of the FIT framed rootfs (which will be
  upgradable by RAUC from within Infix).

- A partition to store critical configuration data ("cfg")

- A partition to store data created dynamically by Infix ("var")
2023-02-20 10:48:24 +01:00
Tobias Waldekranz ca3966db62 common: Create signature of root filesystem
mkimage will generate an FIT image containing a signature of the
rootfs, where the data is kept out of the DTB data structure, i.e.:

.---------.
|   DTB   |
:---------:
| Padding |
:---------:
|         |
|         |
| rootfs  |
|         |
|         |
'---------'

This is the on-disk format of Infix. At boot, we extract kernel and
device trees from the rootfs, and then use Linux's device mapper to
create a virtual block device that exposes the rootfs (squash).
2023-02-20 10:45:51 +01:00
Joachim Wiberg 9018024ca9 Add support for generating GNS3 appliance file for amd64 builds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-01-16 19:15:40 +01:00
Tobias Waldekranz b2befc4566 build: Optionally build an FIT image with all enabled DTBs 2022-11-17 20:26:53 +01:00
Tobias Waldekranz 7477f81d71 post-image: Remove old QEMU remnants
TODO: Restore x86_64 support
2022-11-17 20:16:38 +01:00
Joachim Wiberg 06c1306dc5 board/common: enable kernel quiet mode by default
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-05-17 08:49:31 +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