Commit Graph
3974 Commits
Author SHA1 Message Date
Joachim Wiberg bb62d58b17 profeth: branding
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg c0c087e719 src/profeth: fix system IP address/netmask and gateway query
Replace the old p-net API for querying the interface address, netmask
and gateway with the new ones that use getifaddrs() and inspect the
kernel routing table.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg e33f191d07 package/profeth: add support for starting and monitoring PROFINET
An Infix build with PROFINET gears Net-SNMP heavily towards acting as a
servant to profeth (p-net stack).  This will be hard-coded for now until
we've integrated it all better in Clixon.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg d572bc78f3 package/skeleton-init-finit: add support for monitoring net-snmp
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg 5a003c40c3 package/skeleton-init-finit: add env file to mini-snmpd
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg e3adc8a6e4 src/profeth: add GPLv3 license and basic README
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg 221cc0b1f6 mech: move Finit service .conf to package and add conditions
The new if: conditions require latest Finit master, unreleased v4.4

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg 90a1fd99ec board/common: ensure cache directory for nginx is created at boot
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg 80b23566b5 board/common: use same method to determine operating mode
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg 281183755b qemu: replace -nic with -netdev to get >8 NICs, fix MAC calculation
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Tobias WaldekranzandJoachim Wiberg 5a441252f8 profeth: Initial add 2023-03-06 10:50:58 +01:00
Tobias WaldekranzandJoachim Wiberg 23a25147cc package/p-net: new package
Use ael fork with not-yet upstreamed fixes for now.

Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:51 +01:00
Joachim Wiberg 04e646ab40 qemu: default to 256M RAM for both targets
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-28 14:47:56 +01:00
Joachim Wiberg 7537e7e263 package/clixon: prevent host install from stripping .so files
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-28 11:34:59 +01:00
Joachim Wiberg bc7b366c85 package/cligen: prevent host install from stripping .so files
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-28 11:34:55 +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
Joachim Wiberg 759f8aa589 aarch64: add missing $BR2_ARCH arg to post-image.sh
Needed by sign.sh when creating the image.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-28 11:33:08 +01:00
Tobias WaldekranzandJoachim Wiberg d8c529a2a7 common: Make U-Boot's auxiliary environment accessable from Infix
This is not the full environment used by U-Boot, just the bits needed
for U-Boot to know which slot to boot and for Infix to know how the
boot process went.

U-Boot will selectively import/export only these keys during boot,
which avoids a malicious user from altering the boot in a way that
might bypass signature validation.
2023-02-28 11:01:04 +01:00
Tobias WaldekranzandJoachim Wiberg dd8bcca180 common: Generate a new dev cert with a distant expiry date
100 years ought to be enough for everyone.
2023-02-28 11:00:15 +01:00
Tobias WaldekranzandJoachim Wiberg d4432b72dd common: uboot: Add missing blkmap patches
The blkmap patches were not included in the original U-Boot Secure
Boot changeset.

Fixes: d243c80 ("aarch64: Convenience target to configure a QEMU compatible U-Boot")
2023-02-28 11:00:15 +01:00
Tobias WaldekranzandJoachim Wiberg 07dd863fb9 common: Remove remnants of old separate FIT-header-PoC
Now that the uncut FIT is stored in primary/secondary, we don't create
any FIT header files.

Fixes: 499a8f7 ("common: Create (e)MMC image with redundant root filesystems")
2023-02-28 11:00:15 +01:00
Joachim Wiberg c94c360d4a configs: sync aarch64 with amd64 to get Clixon, Frr, nginx, etc.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-28 10:49:27 +01:00
Joachim Wiberg 513316f19e configs: drop qemu tap settings, default should bet user
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-27 15:56:38 +01:00
Joachim Wiberg 47c39c311f Basic User Guide for the Open Source base
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-24 20:08:34 +01:00
Joachim Wiberg 48a64a39f2 amd64,aarch64: disable udev hwdb, not needed currently
Saves 18 MiB from /etc

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-23 09:41:38 +01:00
Joachim Wiberg 0c07f10062 board/amd64: minor fixups to isolinux.cfg
- Drop unused com32 modules
 - Fix duplicate prompt output (serial not needed)
 - Reduce timeout before booting default to 0.5 sec
 - UI or DEFAULT must be set, otherwise isolinux complains
   so replace ONTIMEOUT with DEFAULT
 - Increase user-walked-away timeout to 5 minutes
 - Always show the prompt

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-23 09:37:40 +01:00
Joachim Wiberg f2dd7430a7 package/finit: bump for next snapshot
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-22 20:00:04 +01:00
Joachim Wiberg fc6a793269 configs/amd64_defconfig: simplify syslinux, drop graphical menu
Not required and often just looks garbled, better to drop it for now.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-22 18:56:28 +01:00
Joachim Wiberg c098629ce9 mkgns3a.sh: increase node ram even more, we need 512 MiB (!) to run
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-22 18:53:30 +01:00
Joachim Wiberg 384ef8c189 package/skeleton-init-finit: fix regression introduced in aee7fb9
On rebuild (without distclean) the getty.conf contained two tty lines
for the same TTY, causing Finit to believe the command line args had
been changed between each reload -- and thus kicking out the logged
in console user who just typed `initctl reload`.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-22 18:51:45 +01:00
Joachim Wiberg 8e7b173de3 mkgns3a.sh: increase node ram, we now provide Frr
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-22 07:32:43 +01:00
Joachim Wiberg 0a5729cbea package/skeleton-init-finit: fix ftbfs regression from aee7fb9
Need to rsync the whole skeleton since we provide more than just the
finit.d files, e.g. /etc/fstab, which we also modify in this .mk.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-22 07:31:31 +01:00
Joachim Wiberg c3d7405b8f Add support for using /usr/bin/pdmenu (setup) as a login shell
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-21 22:28:42 +01:00
Joachim Wiberg 378633fa5c setup: make this the default /etc/pdmenurc in Infix
Set COLORTERM instead of using -c flag.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-21 22:28:42 +01:00
Joachim Wiberg 6cf4a986f5 setup: add support for performing factory reset
Now that we have dialog on target we can add a user-friendly factory
reset dialog.  The new `yorn` script handles any form of yes-or-no
question, with or without dialog, to call a command.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-21 22:28:42 +01:00
Joachim Wiberg 9af4155a83 board/common: always clear the tty after the setup command
Exiting pdmenu leaves artifacts on screen.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-21 22:28:42 +01:00
Joachim Wiberg 0bd3acd361 setup: add support for easily switching system boot mode
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-21 22:28:42 +01:00
Joachim Wiberg 7733f18179 configs/amd64: enable squashfs images as well as kernel support
Now that we only support mmc and squash in `make run` we should make
sure the reference platform works as well as aarch64.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-21 20:12:12 +01:00
Joachim Wiberg 12b5731655 board/common: add support for overriding managed mode
This change adds support for setting the system boot mode to native /etc
style for systems where it's difficult, or close to impossible, to set
the Finit boot condition to 'etc'.

Note: this also moves the check for factory reset before we check if we
should use_etc, rather than NETCONF.  This to allow clearing out any of
the state files (.use_etc) before proceeding to boot in the default mode

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-21 20:05:31 +01:00
Joachim Wiberg 605bd7262b src/factory: use new /mnt/cfg/infix/.reset path
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-21 20:02:34 +01:00
Joachim Wiberg 357799bf47 package/skeleton-init-finit: add support for Frr
1. Use same naming standard for quagga and frr
 2. Only one of quagga and frr can be used at the same time
 3. Subdirectories in available/ only in the skeleton, not on target

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-20 14:49:37 +01:00
Joachim Wiberg aee7fb91d0 package/skeleton-init-finit: refactor, install svc files on demand
Only install the corresponding Finit svc if the package is selected in
the Buildroot menuconfig.  Some packages cannot be enabled by default
though, since they require a daemon configuration file, e.g. in the
case of ulogd it requires a valid /etc/ulogd.conf

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-20 14:49:37 +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
Tobias Waldekranz 40f55058c6 common: Enable required U-Boot options in fragment file
This ensures that U-Boot images that we build can always:

- Rely on the environment extensions in env.dtsi being available
- Access the configured signing keys
- Use SD/eMMC cards
- Extract files from SquashFS filesystems

All of which are foundations that we intend to design our image
loading around.
2023-02-20 09:57:31 +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
Tobias Waldekranz 8716bea698 common: Add a development signing key
Keep a shared in-tree key that can be used to sign Infix images during
development. The idea is that this will also be included in developer
builds of U-Boot.
2023-02-20 09:57:31 +01:00
Tobias Waldekranz 98b59ac20b qemu: Optionally start from U-Boot using MMC disk
This is very useful for testing things like image signature
verification, system upgrades, etc.
2023-02-20 09:57:31 +01:00
Tobias Waldekranz d243c802b0 aarch64: Convenience target to configure a QEMU compatible U-Boot 2023-02-20 09:57:31 +01:00
Tobias Waldekranz 205d6e0187 aarch64: Enable support for PCI SDHC controllers
This let's us easily emulate SD/MMC disks from QEMU.
2023-02-20 08:56:06 +01:00