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.
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.
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.
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
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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.
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.
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).
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")
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).
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>