Add support for x86_64

This patch adds support for the x86_64 target. Both legacy and UEFI boot
are supported.

Currently, only a single network interface is supported, which is
configured like any other ONE_PORT device. Therefore, this target is not
very useful for the node variant. However, vlan interfaces can be
configured for client, wan and peering sections in the layer3
configuation.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
Fabian Bläse 2021-06-08 23:30:40 +02:00
parent 9a3b499cae
commit 128a748626
6 changed files with 35 additions and 0 deletions

4
bsp/x86-64.bsp Normal file
View File

@ -0,0 +1,4 @@
chipset=x86
subtarget=64
images=("openwrt-${chipset}-${subtarget}-generic-squashfs-combined-*"
)

18
bsp/x86-64/.config Normal file
View File

@ -0,0 +1,18 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_x86=y
CONFIG_TARGET_x86_64=y
CONFIG_TARGET_x86_64_DEVICE_generic=y
# CONFIG_TARGET_ROOTFS_EXT4FS is not set
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_opkg=m
CONFIG_STRIP_KERNEL_EXPORTS=y

View File

@ -1,5 +1,9 @@
BOARD=$(cat /var/sysinfo/board_name)
if uname -a | grep x86_64 > /dev/null; then
BOARD="x86_64"
fi
uci set board.model.name=$BOARD
uci commit board

View File

@ -24,6 +24,7 @@ get_cpu_port() {
ubnt,nanostation-loco-m-xw|\
ubnt,unifi|\
ubnt,unifiac-mesh|\
x86_64|\
xiaomi,mi-router-4a-gigabit)
CPUPORT=""
;;

View File

@ -0,0 +1 @@
ETHMODE="CLIENT"

View File

@ -0,0 +1,7 @@
WANDEV=eth0
SWITCHDEV=eth0
ONE_PORT="YES"
. /etc/network.mode
ROUTERMAC=$(cat /sys/class/net/eth0/address)