Skip to content

Split defconfigs#16

Merged
wkz merged 26 commits intomainfrom
split-defconfig
Apr 27, 2023
Merged

Split defconfigs#16
wkz merged 26 commits intomainfrom
split-defconfig

Conversation

@troglobit
Copy link
Copy Markdown
Contributor

@troglobit troglobit commented Apr 26, 2023

  • Split amd64_defconfig and aarch64_defconfig into four new. The classic variant is with managed by writing to /etc (read-writable across reboots), and the plain one is the default NETCONF variant:
    • x86_64_defconfig
    • x86_64_classic_defconfig
    • aarch64_defconfig
    • aarch64_classic_defconfig
  • Both variants/flavors start up with autoconf enabled for both IPv4 and IPv6, the classic variant comes with a default /etc/network/interfaces.d/eth0 that also has a DHCP client enabled using dhcpcd.
  • All non-NETCONF related files in board/common/rootfs/etc have been relocated to board/classic/rootfs/etc
  • All non-NETCONF related files in board/common/rootfs/lib/infix have been relocated to board/classic/rootfs/lib/infix
  • All Finit .conf files have been simplified, stripping out all if:boot/foo conditionals

The clean-etc script has been kept almost as-is for the NETCONF variant, when we have more support for controlling critical services from the CLI/factory-config it can be removed.

The GitHub action has been updated to four different variants now. See this build for details: https://github.com/kernelkit/infix/actions/runs/4816175056

@troglobit troglobit requested a review from wkz April 26, 2023 12:09
When calling 'make skeleton-init-finit-rebuild' to (re)install any new
or modified services, we cannot remove everything installed already.
That breaks what other packages may have installed already and is not
the Buildroot way.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The root user is by default not allowed to log in over SSH, so we add an
admin user with limited root privileges for this purpose.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
With the new templating support in Finit, and this patch, we can now
very easily enable a ZeroConf service on, e.g., eth0:

    $ initctl enable zeroconf@eth0

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch adds a first Infix model to augment ietf-ip with a node,
similar to the IPv6 'autoconf' node, also for IPv4.  For IPv6 the
autoconf feature comes built-in, for IPv4 it is defined in RFC3927.

The setting behaves the same as for IPv6, but in the case of IPv4 we
enable avahi-autoipd per interface to acquire the 169.254/16 address.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This is very ugly, what we really want is that the commit_done_hook()
runs when *all* DONE events have been processed in all models.  The
side-effect of this hack is that the callback is run twice, both for
ietf-systm and ietf-interfaces if both are modified.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Consistent naming to match startup-config.cfg and running-config.cfg

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The idea is to, as a plain Infix default, start up devices with DHCP and
IPv4LL/ZeroConf and IPv6 link-local address.  Using mDNS the user can
then and push a NETCONF configuration over SSH.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Still ways to go here, eth0 should be in a bridge with a vlan1 interface
on top, which in turn should have this config.  But let's start here, it
works! :-)

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This build is intended as a base reference and for use as a very simple
end device.  The default starts DHCP and IPv4LL (ZeroConf) on eth0, but
can be configured by editing /etc/network/interfaces.d/*

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
 - Drop unused packages in NETCONF (default) mode
   In the default build we will use the net tool instead of iupdown-ng,
   p-net & Profeth will move to customer-specifc builds with another
   licensing model.
 - Split out NETCONF specific parts from board/common to board/netconf

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
A long standing internal debate comes to its logical conclusion.  Arch
naming should follow GCC.  The "native /etc" has also found a better
name: classic!

README and GitHub action has been updated accordingly.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
 - board/common: drop everything not needed by NETCONF mode
 - board/classic: most board/common helpers relocated here
 - Simplify Finit scripts for critical services
 - Source variant from /etc/os-release to select ramdisk /etc

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
@wkz wkz merged commit daa67f9 into main Apr 27, 2023
@troglobit troglobit deleted the split-defconfig branch April 27, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants