Commit Graph
3974 Commits
Author SHA1 Message Date
Joachim Wiberg 7a4fe98a3e mech: remember hard-coded strings
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg f43b31b1f5 mech: system headers before clixon, skip sys/ prefix
The canonical location for syslog.h is in the root.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg 1aac798041 mech: must specify model revision
Found when debugging output from "show state", which displayed NULL for
the infix model.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg 77f6d5e82e mech: use same pager as Clixon by default
Add configurable pager support to Clixon later.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg cc5453bfbd mech: use new 'show -n' to skip shell user's help notice
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg 3c4ff8cabb board/common: add 'show -n' for no footer output
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg 6fec738628 board/common: make sure to enable clixon_backend in NETCONF mode
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg 6a591ddd5a mech: use NOTICE file and spdx format for Apache 2.0 license
Recommendations on how to apply the Apache 2.0 license to a project from
https://www.linkedin.com/pulse/how-apply-apache-20-license-your-open-source-software-vladimír-gorej/

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg d8d761bfa4 mech: change license to Apache v2.0, same as Clixon package
To facilitate linking and circumvent any possible legal problems.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg 2f7dbe110a src/mech: add some basic 'show' commands
- Example of optional args (show log [FILE])
 - Example of dynamic expansion
 - Example of how to re-enable signals for external commands
 - Example of hidden commands
 - Add basic 'help' command for the current level

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg 9041c54dbd README: mention Clixon and add Qeneth as alternative to GNS3
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg 9f74bac06c README: fix footnote link
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Joachim Wiberg 70a393ec99 package/mech: minor, for Buildroot conformance
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-14 09:06:22 +01:00
Tobias Waldekranz 77d94e0ffd doc: Expand boot procedure documentation
Provide more details on the boot procedure, different image types
used, how to configure the bootloader, and how to perform system
upgrades.
2023-03-13 23:20:01 +01: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 e7112ca0c9 qemu: Support mounting host filesystem inside guest
This is mounted at /mnt/host in the guest. By default the images
directory is mounted.
2023-03-13 13:53:12 +01:00
Tobias Waldekranz 162f019574 aarch64: Remove U-Boot envimage generation from defconfig
This created a circular dependency that caused the build to fail. This
is now handled by the mkdisk.sh script instead.
2023-03-13 10:21:08 +01:00
Tobias Waldekranz bf240e0d89 amd64: Update GNS3 appliance generation to use the disk image
The appliance now uses the same QEMU setup as when using `make run`
with OVMF loader.
2023-03-13 09:57:04 +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 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 3c720892dc aarch64: Cleanup unused stuff from defconfig
Config options are now loaded internally by the post-image script.

We never use the EXT image for anything.
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
Tobias Waldekranz 515d9f6e84 config: Replace $() with ${}
This lets us source .config from shell scripts
2023-03-13 09:56:37 +01:00
Tobias Waldekranz 96af542d40 qemu: Consolidate DTB extension handling in qemu.sh 2023-03-13 09:55:16 +01:00
Tobias Waldekranz e9adde4100 qemu: Add option to start with UEFI instead of BIOS 2023-03-13 09:55:16 +01:00
Tobias Waldekranz 81f0276a31 qemu: Remove redundant enabling of KVM 2023-03-13 09:55:16 +01:00
Tobias Waldekranz 7ba2e0a0b1 qemu: Always use disk images when using U-Boot
The U-Boot scripts won't accept a raw squash.
2023-03-13 09:55:16 +01:00
Tobias Waldekranz d1607cc2f3 doc: Document boot process and image formats 2023-03-13 09:55:16 +01:00
Tobias Waldekranz 9869c1a290 common: uboot: Update environment to new disk layout
- Adapt boot scripts to exepect the split FIT header/SquashFS image
  layout.

- Make sure that we can boot from any kind of block device (most
  importantly virtio for GNS3).

- Rename net -> dhcp as we might have more kinds of netboots in the
  future (http).
2023-03-13 09:55:16 +01:00
Tobias Waldekranz 8296a98e61 common: Use plain SquashFS images on disk
Store FIT headers separately on aux, and place the raw SquashFS images
on primary/secondary. This removes the need to muck about with the
device mapper to setup the rootfs, and it allows us to boot using
syslinux files.
2023-03-13 09:55:16 +01:00
Joachim Wiberg c328c41eff package/profeth: document QEMU_NET_TAP_N=10 requirement
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-09 07:21:50 +01:00
Joachim Wiberg 6c1a53ffdb package/skeleton-init-finit: add missing /etc/sysctl.d directory
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-09 07:17:21 +01:00
Joachim Wiberg 597207b7dd profeth: drop copy of p-net headers, use library headers instead
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-09 06:58:46 +01:00
Joachim Wiberg 67727e3050 configs: enable PROFINET support in default builds
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-09 05:58:09 +01:00
Joachim Wiberg 8eb879c8b2 board/amd64: enable E1000 ethernet nic support for Qemu
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-09 05:58:09 +01:00
Joachim Wiberg f8738de608 package/skeletin-init/finit: per-package tmpfiles.d directory
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-09 05:58:09 +01:00
Joachim Wiberg 2f0b2e113e package/skeleton-init-finit: update lldpd configuration
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-09 05:58:09 +01:00
Joachim Wiberg 0f38ac54f8 src/profeth: add submodules for all ports, matching the GSD file
These changes allow profeth to pass the Automatic RT Tester's first
behavior tests: Scenario 1-9.

 - Explorative changes to the GSD file to appease the conformance tool
 - Fix mismatch in installed submodules vs advertised ports in GSD file

Note: changes in GSD file only match the amd64 virtual build.  Must be
      updated for the final product.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-09 05:58:09 +01:00
Joachim Wiberg 25db613398 Refactor boot mode handling
With the recent `if:<cond>` addition to Finit we can simplify a lot of
the logic for disabling and enabling features in Infix.  Standardizing
on conditions that Finit provides.

We create boot/netconf, boot/etc, and boot/profinet conditions early,
after all filesystems have been mounted (and cleaned), so they are all
set before Finit loads its configuration files in runlevel S.

The default is still to boot into a managed NETCONF mode, since the end
goal remains to integrate PROFINET as yet another service.  The other
mode, native /etc, should then be the only exception.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-08 20:02:03 +01:00
Joachim Wiberg 81212e12f1 package/profeth: persistent data in /var/lib, syslog.conf
Split tmpfiles config in two, one for snmpd and one for profeth.
Add logging and redirect profeth logs to /log/profinet.log with
default log rotation.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-08 20:02:03 +01:00
Joachim Wiberg f8670f7150 package/p-net: increase log level slightly Fatal -> Info
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-08 20:01:55 +01:00
Joachim Wiberg 917633f439 mech: create the /run/clixon directory at boot
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-08 18:40:25 +01:00
Joachim Wiberg e94b4de865 rootfs: add handy /log shortcut to /var/log
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-08 18:39:23 +01:00
Joachim Wiberg 5045c6e6ba utils: use same IP subnet as PROFINET Automated RT Tester
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-08 17:05:37 +01:00
Joachim Wiberg f41846fab4 src/profeth: use RT-Labs VendorID and DeviceID for now
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 15:08:20 +01:00
Joachim Wiberg 4942a53483 package/profeth: add set_network_parameters script
Allow profeth to set IP address, netmask and gateway on PROFINET set.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 15:08:09 +01:00
Joachim Wiberg 06599d2097 package/finit: bump for next snapshot
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:54:00 +01:00
Joachim Wiberg 5ddbb2cf55 utils: helper script for briding a Qemu instance with the real world
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg 7cf945af5b board/common: add PROFINET boot mode, compliments native /etc
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00
Joachim Wiberg 6c7d945e8b profeth: use /var/run/agentx/master socket instead of default
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-03-06 10:50:58 +01:00