Commit Graph
30 Commits
Author SHA1 Message Date
Joachim Wiberg 3265f46990 board/aarch64: ensure dwc2 controller is in host mode
The DWC2 controller is a very common IP block in ARM and RiscV SoCs.  With the
USB subsystem back to a built-in we can now enable host mode for the DWC2 (USB
2.0) ports on RPi.  It also opens up for merging the NanoPi R2S into the
generic aarch64 build.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:26:02 +01:00
Joachim Wiberg 937d4c38c7 board: make usb subsystem a built-in
Use kernel cmdline option 'usbcore.authorized_default=2' to lock all
external/user-visible USB ports by default.

The kernel distinguishes internal vs external USB ports using ACPI
methods (_UPC and _PLD) on x86/x86_64 systems.  On ACPI systems, ports
marked as non-visible but connectable are considered internal (e.g.,
hard-wired USB-to-Ethernet adapters) and are automatically authorized,
while user-visible external ports require manual authorization.

However, on device tree systems the kernel lacks a standard mechanism
for identifying internal ports. The 'authorized_default=2' setting falls
back to requiring authorization for all devices on these platforms,

We list user-accessible USB ports in the device tree ('usb-ports' and
'usb-port-names'), with unlisted ports being implicitly internal and
managed separately.

Fixes #1065

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:25:59 +01:00
Joachim Wiberg b2a41e4868 board: drop team support, add common USB to Ethernet drivers
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-31 13:25:59 +01:00
Joachim Wiberg b3ea0f3207 board/aarch64: add support for std partition labels on cmdline
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-10-13 21:24:15 +02:00
Tobias Waldekranz a3f85a3872 linux: Upgrade to 6.12.1
Exploratory change to smoke out any regressions that this might
introduce.
2024-12-04 11:27:03 +01:00
Mattias Walström b0f4192f24 kernel: Reboot device if kernel panics
The worst way of handling a kernel crash is to do nothing at all.
2024-10-31 15:55:47 +01:00
Joachim Wiberg b9238b2a96 board: add support for exFAT file systems
From https://en.wikipedia.org/wiki/exFAT:

   ... a file system optimized for flash memory such as USB flash
   drives and SD cards.
   ... has been adopted by the SD Association as the default file
   system for SDXC and SDUC cards larger than 32 GB.

The exfatprogs is also a default installed package on most modern
distros, compared to dosfstools (mkfs.vfat) which is not.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-08-04 07:42:44 +02:00
Tobias Waldekranz b4e3c955d8 kernel: Import mqprio support for mv88e6xxx from kkit-linux-6.6.y
...and enable mqprio support in the kernel config.
2024-06-07 10:10:38 +02:00
Tobias WaldekranzandJoachim Wiberg 3d8b64f939 aarch64: kernel: Enable DCB
In order to make use of the DCB support in mv88e6xxx we also enable it
in the kernel config.

Fixes: 3a73ce3cfb ("kernel: Import EtherType based priority override support")
2024-05-02 15:30:02 +02:00
Mattias Walström c58bd5ead4 aarch64: Configure USB_CORE as a module
This to be able to control the USB ports in infix using authorized in /sys
2024-02-23 14:01:23 +01:00
Tobias WaldekranzandJoachim Wiberg 405aa6510d kernel: Enable netdev LED trigger
This trigger can be offloaded into hardware by the PHY or MAC LED
attached to the netdev in question.
2023-11-19 08:50:19 +01:00
Henrik NordstromandJoachim Wiberg b36568bcb7 board/aarch64: alder: Watchdog support 2023-11-16 19:51:52 +01:00
Tobias WaldekranzandJoachim Wiberg e454c4a8b6 board/aarch64: alder: Add power board related drivers
- I2C GPIO expanders, mainly used for LED control and power-good
  inputs

- LED blink support
2023-11-14 16:41:03 +01:00
Tobias WaldekranzandJoachim Wiberg 2f1c383602 board/aarch64: alder: Initial add
- Device tree
- Enable needed drivers
- Include in aarch64_defconfig
- 88X3310P Firmware
2023-10-10 14:54:50 +02:00
Tobias WaldekranzandJoachim Wiberg 5f37b8acd3 board/aarch64: Build kernel and modules with debug info
This costs nothing on target, and it means that we always have debug
symbols ready when we need them, without having to do a complete
rebuild.
2023-10-10 14:54:50 +02:00
Tobias WaldekranzandJoachim Wiberg 5891c0f2b3 board/aarch64: Build all network related drivers as modules
As we may need to load firmware to the PHYs, we can't load those
modules until we have access to the rootfs. In order for that to work,
the MDIO driver must not be built-in, as that will cause the kernel to
bind devices with missing (built-in) drivers to bind to the genphy
driver.

Therefore, build everything as modules and let udev load it during
boot.
2023-10-10 14:54:50 +02:00
Joachim WibergandTobias Waldekranz b3761d84dc board: update kernel defconfigs for running containers (podman)
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-05-21 20:39:12 +02:00
Henrik NordstromandJoachim Wiberg 7db1581b21 linux aarch64: Enable CPU_THERMAL 2023-05-02 10:52:43 +02:00
Joachim Wiberg 23cf9df856 Follow-up to 7e089ee: convert to kernel modules, use /etc/modprobe.d
Instead of having to rely on the kernel command line, we convert all the
kernel functionality in question into modules and rely on the auto-load
feature in the kernel and modprobe to add options at load time.

The fb_tunnels setting is a net core setting, for that we use sysctl.

This commit also syncs the kernel config between our two main archs,
disabling DRM and SOUND for the Amd64 build as a spin-off.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-17 14:09:24 +02:00
Joachim Wiberg 3bef1eec16 Disable rauc streaming and kernel nbd, not used atm.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-02 16:24:08 +02: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
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
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 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
Joachim Wiberg ccba72b083 Add factory default, all switch ports in group VLAN 1 on br0
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>
2023-01-03 18:25:18 +01:00
Joachim Wiberg 989a81fdc9 Enable ifupdown2 for all platforms, replacing BusyBox ifup/ifdown
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>
2022-12-13 17:34:19 +01:00
Joachim Wiberg 2a06a50687 amd64,aarch64: enable kernel watchdog driver support
- At least softdog should always be there
 - Add i6300esb driver for Qemu

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2022-11-23 14:41:23 +01:00
Joachim Wiberg 71948c6c9b aarch64,amd64: enable IEC 62439-2 MRP bridge and userspace support
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>
2022-11-18 17:08:59 +01:00
Tobias Waldekranz cef9cd9e44 aarch64/kernel: Support SparX-5i 2022-11-18 16:24:32 +01:00
Tobias Waldekranz e2fbd55970 aarch64: Add kernel defconfig
Default to build CN9130 for now.
2022-11-16 20:29:48 +01:00