diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 69e2784d..af9e8bc1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - platform: [aarch64, amd64] + platform: [aarch64, x86_64_classic, x86_64] fail-fast: false steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index 581ea1ea..7ab105fa 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ may enable additional boards in the config, of course): See the aarch64 specific [documentation](board/aarch64/README.md) for more information. -### amd64 +### x86_64 Primarily intended to be run under [QEMU][] for development & test as well as evaluation, demo and [training][] purposes, e.g. using [GNS3][] @@ -59,10 +59,12 @@ under `External options -> QEMU virtualization`. GNS3 ---- -Download the [latest build][0] of amd64, unpack in a dedicated directory -and use ["Import Appliance"][9] to install the `.gns3a` file into GNS3. -Infix will show up in the "Router" category, it has 10 interfaces -available by default for use as switch ports or routing. +Download the [latest build][0] of the `x86_64`, or `x86_64_classic` +flavor. Unpack in a dedicated directory and use ["Import Appliance"][9] +to install the `.gns3a` file into GNS3. Infix (`x86_64`) is in the +"Router" category, it has 10 interfaces available by default for use as +switch ports or routing. The *classic* build only has one interface by +default, geared more towards acting as an end device. Building @@ -70,9 +72,10 @@ Building Buildroot is almost stand-alone, but need a few locally installed tools to bootstrap itself. For details, see the [excellent manual][manual]. + Briefly, to build an Infix image; select the target and then make: - make amd64_defconfig + make x86_64_defconfig make Online help is available: diff --git a/board/native/post-build.sh b/board/classic/post-build.sh similarity index 100% rename from board/native/post-build.sh rename to board/classic/post-build.sh diff --git a/board/classic/rootfs/bin/chom b/board/classic/rootfs/bin/chom new file mode 100755 index 00000000..c823b3f5 --- /dev/null +++ b/board/classic/rootfs/bin/chom @@ -0,0 +1,2 @@ +#!/bin/sh +dialog --msgbox "This build is hardwired to classic /etc mode." 6 48 diff --git a/board/native/rootfs/etc/mdev.conf b/board/classic/rootfs/etc/mdev.conf similarity index 100% rename from board/native/rootfs/etc/mdev.conf rename to board/classic/rootfs/etc/mdev.conf diff --git a/board/native/rootfs/etc/motd b/board/classic/rootfs/etc/motd similarity index 100% rename from board/native/rootfs/etc/motd rename to board/classic/rootfs/etc/motd diff --git a/board/native/rootfs/etc/network/interfaces b/board/classic/rootfs/etc/network/interfaces similarity index 100% rename from board/native/rootfs/etc/network/interfaces rename to board/classic/rootfs/etc/network/interfaces diff --git a/board/native/rootfs/etc/network/interfaces.d/.empty b/board/classic/rootfs/etc/network/interfaces.d/.empty similarity index 100% rename from board/native/rootfs/etc/network/interfaces.d/.empty rename to board/classic/rootfs/etc/network/interfaces.d/.empty diff --git a/board/native/rootfs/etc/network/interfaces.d/eth0 b/board/classic/rootfs/etc/network/interfaces.d/eth0 similarity index 100% rename from board/native/rootfs/etc/network/interfaces.d/eth0 rename to board/classic/rootfs/etc/network/interfaces.d/eth0 diff --git a/board/native/rootfs/etc/rc.local b/board/classic/rootfs/etc/rc.local similarity index 100% rename from board/native/rootfs/etc/rc.local rename to board/classic/rootfs/etc/rc.local diff --git a/board/native/rootfs/lib/infix/use-etc b/board/classic/rootfs/lib/infix/use-etc similarity index 100% rename from board/native/rootfs/lib/infix/use-etc rename to board/classic/rootfs/lib/infix/use-etc diff --git a/board/common/mkdisk.sh b/board/common/mkdisk.sh index df1e86ad..556e8c43 100755 --- a/board/common/mkdisk.sh +++ b/board/common/mkdisk.sh @@ -160,24 +160,24 @@ cp -f $BINARIES_DIR/rootfs.itbh $root/aux/secondary.itbh case "$arch" in aarch64) - mkenvimage -s 0x4000 -o $root/aux/uboot.env \ - $BR2_EXTERNAL_INFIX_PATH/board/common/uboot/aux-env.txt + mkenvimage -s 0x4000 -o "$root/aux/uboot.env" \ + "$BR2_EXTERNAL_INFIX_PATH/board/common/uboot/aux-env.txt" ;; x86_64) - mkdir -p $root/aux/grub - cp -f $BR2_EXTERNAL_INFIX_PATH/board/amd64/grub.cfg \ - $BR2_EXTERNAL_INFIX_PATH/board/amd64/grubenv \ - $root/aux/grub/ + mkdir -p "$root/aux/grub" + cp -f "$BR2_EXTERNAL_INFIX_PATH/board/$arch/grub.cfg" \ + "$BR2_EXTERNAL_INFIX_PATH/board/$arch/grubenv" \ + "$root/aux/grub/" ;; *) ;; esac -rm -rf $tmp +rm -rf "$tmp" genimage \ - --rootpath $root \ - --tmppath $tmp \ - --inputpath $BINARIES_DIR \ - --outputpath $BINARIES_DIR \ - --config $root/genimage.cfg + --rootpath "$root" \ + --tmppath "$tmp" \ + --inputpath "$BINARIES_DIR" \ + --outputpath "$BINARIES_DIR" \ + --config "$root/genimage.cfg" diff --git a/board/common/rootfs/bin/chom b/board/common/rootfs/bin/chom index c8cf3c20..76072871 100755 --- a/board/common/rootfs/bin/chom +++ b/board/common/rootfs/bin/chom @@ -32,7 +32,7 @@ select_mode() --title "Select Operating Mode" \ --radiolist "System currently runs in: $current mode" 13 60 1 \ "1" "Managed NETCONF, XML datastore" "$m" \ - "2" "Native Linux, /etc datastore" "$n" \ + "2" "Classic Linux, /etc datastore" "$n" \ "3" "PROFINET, /etc variant" "$p" \ 2>&1 1>&3) exit_status=$? @@ -57,7 +57,7 @@ options: -h Show this help text arguments: - etc Change to Linux native mode, /etc + etc Change to Linux classic mode, /etc netconf Change to NETCONF mode, XML profinet Change to PROFINET mode, /etc variant @@ -94,9 +94,9 @@ case $selection in result="Manageed NETCONF" ;; 2) - echo "native /etc" > $mode - grep -qi native $boot 2>/dev/null && exit 0 - result="Native Linux, /etc" + echo "classic /etc" > $mode + grep -qi classic $boot 2>/dev/null && exit 0 + result="Classic Linux, /etc" ;; 3) echo "PROFINET" > $mode diff --git a/board/common/rootfs/lib/infix/swup b/board/common/rootfs/lib/infix/swup index 0b699c83..40d402d0 100755 --- a/board/common/rootfs/lib/infix/swup +++ b/board/common/rootfs/lib/infix/swup @@ -1,5 +1,5 @@ #!/bin/sh -# Only runs in native /etc and PROFINET nodes. +# Only runs in classic /etc nodes. if initctl cond get boot/profinet; then initctl enable snmpd diff --git a/board/common/rootfs/libexec/finit/hook/mount/all/boot-mode.sh b/board/common/rootfs/libexec/finit/hook/mount/all/boot-mode.sh index da0e90e2..678fa449 100755 --- a/board/common/rootfs/libexec/finit/hook/mount/all/boot-mode.sh +++ b/board/common/rootfs/libexec/finit/hook/mount/all/boot-mode.sh @@ -17,7 +17,7 @@ if /lib/infix/use-etc; then set_cond etc fi else - echo "native /etc" > /tmp/.boot_mode + echo "classic /etc" > /tmp/.boot_mode set_cond etc fi else diff --git a/board/native/rootfs/bin/chom b/board/native/rootfs/bin/chom deleted file mode 100755 index 4ee30389..00000000 --- a/board/native/rootfs/bin/chom +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -dialog --msgbox "This build is hardwired to native /etc mode." 6 48 diff --git a/board/amd64/genimage.cfg b/board/x86_64/genimage.cfg similarity index 100% rename from board/amd64/genimage.cfg rename to board/x86_64/genimage.cfg diff --git a/board/amd64/grub-embed.cfg b/board/x86_64/grub-embed.cfg similarity index 100% rename from board/amd64/grub-embed.cfg rename to board/x86_64/grub-embed.cfg diff --git a/board/amd64/grub.cfg b/board/x86_64/grub.cfg similarity index 100% rename from board/amd64/grub.cfg rename to board/x86_64/grub.cfg diff --git a/board/amd64/grubenv b/board/x86_64/grubenv similarity index 100% rename from board/amd64/grubenv rename to board/x86_64/grubenv diff --git a/board/amd64/isolinux.cfg b/board/x86_64/isolinux.cfg similarity index 100% rename from board/amd64/isolinux.cfg rename to board/x86_64/isolinux.cfg diff --git a/board/amd64/linux_defconfig b/board/x86_64/linux_defconfig similarity index 100% rename from board/amd64/linux_defconfig rename to board/x86_64/linux_defconfig diff --git a/board/amd64/rootfs/boot/grub/grub.cfg b/board/x86_64/rootfs/boot/grub/grub.cfg similarity index 100% rename from board/amd64/rootfs/boot/grub/grub.cfg rename to board/x86_64/rootfs/boot/grub/grub.cfg diff --git a/board/amd64/rootfs/etc/rauc/system.conf b/board/x86_64/rootfs/etc/rauc/system.conf similarity index 100% rename from board/amd64/rootfs/etc/rauc/system.conf rename to board/x86_64/rootfs/etc/rauc/system.conf diff --git a/configs/amd64_minimal_defconfig b/configs/x86_64_classic_defconfig similarity index 95% rename from configs/amd64_minimal_defconfig rename to configs/x86_64_classic_defconfig index d6d4055b..b61fc89d 100644 --- a/configs/amd64_minimal_defconfig +++ b/configs/x86_64_classic_defconfig @@ -17,14 +17,14 @@ BR2_ENABLE_LOCALE_WHITELIST="C en_US en_CA" BR2_GENERATE_LOCALE="en_US en_CA" BR2_TARGET_TZ_INFO=y BR2_ROOTFS_USERS_TABLES="${BR2_EXTERNAL_INFIX_PATH}/board/common/users" -BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/native/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/amd64/rootfs" -BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/native/post-build.sh" +BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/classic/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/rootfs" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/classic/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.19.17" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/amd64/linux_defconfig" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/linux_defconfig" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_INFIX_PATH}/board/common/busybox_defconfig" @@ -86,7 +86,7 @@ BR2_TARGET_EDK2=y BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_X86_64_EFI=y BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI="boot linux ext2 fat squash4 part_gpt normal efi_gop configfile loadenv test terminfo terminal echo" -BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI="${BR2_EXTERNAL_INFIX_PATH}/board/amd64/grub-embed.cfg" +BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/grub-embed.cfg" BR2_TARGET_GRUB2_INSTALL_TOOLS=y BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y diff --git a/configs/amd64_defconfig b/configs/x86_64_defconfig similarity index 97% rename from configs/amd64_defconfig rename to configs/x86_64_defconfig index e492ca76..c5997052 100644 --- a/configs/amd64_defconfig +++ b/configs/x86_64_defconfig @@ -19,14 +19,14 @@ BR2_ENABLE_LOCALE_WHITELIST="C en_US en_CA" BR2_GENERATE_LOCALE="en_US en_CA" BR2_TARGET_TZ_INFO=y BR2_ROOTFS_USERS_TABLES="${BR2_EXTERNAL_INFIX_PATH}/board/common/users" -BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/amd64/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/netconf/rootfs" +BR2_ROOTFS_OVERLAY="${BR2_EXTERNAL_INFIX_PATH}/board/common/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/rootfs ${BR2_EXTERNAL_INFIX_PATH}/board/netconf/rootfs" BR2_ROOTFS_POST_BUILD_SCRIPT="board/qemu/x86_64/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/common/post-build.sh ${BR2_EXTERNAL_INFIX_PATH}/board/netconf/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.19.17" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y -BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/amd64/linux_defconfig" +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/board/x86_64/linux_defconfig" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_PACKAGE_BUSYBOX_CONFIG="${BR2_EXTERNAL_INFIX_PATH}/board/common/busybox_defconfig" diff --git a/doc/boot.md b/doc/boot.md index 4bd7e07f..47772e97 100644 --- a/doc/boot.md +++ b/doc/boot.md @@ -329,11 +329,10 @@ rollbacks when upgrading to a new version. | Size | >= 16 MiB | | Format | EXT4 filesystem | -Non-volatile storage of the system configuration and user -data. Concretely, user data is everything stored under `/root` and -`/home`. Depending on the operating mode, the configuration is either -the NETCONF databases from `/cfg`, or the contents of `/etc` when -operating in native mode. +Non-volatile storage of the system configuration and user data. +Concretely, user data is everything stored under `/root` and `/home`. +Depending on the operating mode, the configuration is either the NETCONF +databases from `/cfg`, or the contents of `/etc` in classic mode. ### `var` - Variable Data