- Support modprobe for hotplugged devices
- Allow writable /dev/{null,zero,...} by all users
- Correct TTY and console permissions
- Adapt groups to Buildroot standard (Debian)
https://github.com/slashbeast/mdev-like-a-boss
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- Replace ISC dhclient with dhcpcd => IPv4 link-local address
- Enable openresolv to handle /etc/resolv.conf for us
- iproute2 was a dependency of ifupdown2, but now we need to
enable it explicitly
- Ensure we have the same default system interface in infix
- Reenable BusyBox applets disabled when enabling ifupdown2, for
infix derivatives that may prefer a smaller base image.
Note: ifupdown-ng prefers dhcpcd over udhcpc, so no risk for conflict by
reenabling udhcpc.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This change adds a `factory` tool, and login shell, that schedules a
reset of all writable (overlay) filesystems. The tool is set up with
the suid gid flag to allow all members of the wheel group to perform
the reset.
The login method only allows reset from /dev/console, to prevent any
malicious reset over SSH. This should be further constrained later
when PAM is introduced.
To initiate factory reset from the login prompt, use login/pass:
factory/reset
To initiate factory reset from the shell, call
factory
Both methods are interactive by default, but two command line options
can be used to modify the behavior:
-r Skip reboot, and "reboot now?" question
-y Assume yes to all questions, for non-interactive use
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This change checks¹ if the system does not have a br0 interface, creates
a default one consisting of all switch ports in VLAN 1 of br0.
On top of br0 a vlan1 management interface is created with DHCP address.
For emulation and test purposes, a way to supply tap interfaces from
Qemu, and pass off as if they were regular switch ports, is added.
____
¹ obviously a better way to detect a factory-reset device is needed,
not all systems running infix will need or want a br0 interface.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Do not wait for dhclient to acquire first release, this will cause
unnecessary delays when booting, and not provide any real value in our
system. Because we will never have any service that depends on a
network address being set when starting up, this is a feature that
Finit can provide for us as a condition when starting such services.
Also, never set global "README" in multiple policy files, this will
cause ifupdown2 to crash in horrific ways.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The default policy for management interface prefix in ifupdown2 is
"eth", which currently clashes with Infix default switch port names.
Changing our naming policy of switch ports to "swpN", mimicing the
naming using in Cumulus Linux, would also help. To be discussed.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
We will not use features like batman, vxrd, or openvswitch. Also, the
clagd and vxrd addons are not in ifupdown2, so likely proprietary ext.
by Cumulus. Dropping them makes "unknown addon" warnings go away.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Various scripts and tools search for the ip command in different
places. Most distros install it to /bin/ip and symlink to /sbin
and /usr dito, but Buildroot only installs to /sbin/ip
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Unlike debugfs, cfgfs is currently an optional feature in Infix, so
let's set it to noauto for now.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This change replaces the BusyBox ifup/ifdown applets with the full-blown
ifupdown2 package. To get it fully working we also need to enable a few
missing kernel features: ipv4 + ipv6, multiple routing tables, and some
netfilter features. We take the opportunity to sync kernel features in
between the two archs as well.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- Drop Cortex A72 in favor of more general A53 images
- Enable device trees for all supported EspressoBIN models
- Bump kernel to latest 6.0
- Currently only starts from SD card, so add genimage to post-build
- Create Ext2/4 disk image for SD card
- Add infix-rw partition to sd-card image
- The genimage tool needs genext2fs to create rw.ext4
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Upstream device trees specify regular PSCI support for SparX-5i, but
the U-Boot that Microchip ships does not actually support it.
Therefore, wrap the upstream version to disable PSCI and revert to
spin tables for SMP bringup.
Preparing for the upcoming Finit v4.4 which takes system information
from /etc/os-release -- reduces branding efforts.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Set up bridge first:
root@infix:~# ip link set dev eth0 up
root@infix:~# ip link set dev eth1 up
root@infix:~# ip link set dev eth2 up
root@infix:~# ip link set dev eth3 up
root@infix:~# ip link add name br0 type bridge
root@infix:~# ip link set dev eth0 master br0
root@infix:~# ip link set dev eth1 master br0
root@infix:~# ip link set dev eth2 master br0
root@infix:~# ip link set dev eth3 master br0
Start MRP server and add a configuration:
root@infix:~# mrp_server &
root@infix:~# mrp addmrp bridge br0 ring_nr 1 pport eth0 sport eth1 ring_role mrm
root@infix:~# mrp addmrp bridge br0 ring_nr 2 pport eth2 sport eth3 ring_role mrm
root@infix:~# mrp getmrp
bridge: br0 ring_nr: 1 pport: eth0 sport: eth1 ring_role: MRM ring_state: CHK_RO
bridge: br0 ring_nr: 2 pport: eth2 sport: eth3 ring_role: MRM ring_state: CHK_RC
Once all rings are set up:
root@infix:~# ip link set dev br0 up
For more information, see:
- https://github.com/microchip-ung/mrp
- https://lwn.net/Articles/809089/
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The Buildroot linux_defconfig doesn't have CONFIG_OVERLAY_FS, which we
need for our shared rootfs overlay.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>