From patchwork Mon Jun 6 13:57:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 1639340 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LGwJj4P02z9sG6 for ; Tue, 7 Jun 2022 00:06:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C8B9E840C5; Mon, 6 Jun 2022 14:06:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1qCWa11vDyhk; Mon, 6 Jun 2022 14:06:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id B322A831F2; Mon, 6 Jun 2022 14:06:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id D5E591BF363 for ; Mon, 6 Jun 2022 14:06:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C45DA4148A for ; Mon, 6 Jun 2022 14:06:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PH1PF9fc8wBR for ; Mon, 6 Jun 2022 14:06:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by smtp4.osuosl.org (Postfix) with ESMTPS id 2EA2F41299 for ; Mon, 6 Jun 2022 14:06:22 +0000 (UTC) Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4LGw726wH2z4xYY; Mon, 6 Jun 2022 23:58:06 +1000 (AEST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4LGw6y0FV5z4xR1; Mon, 6 Jun 2022 23:58:01 +1000 (AEST) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: buildroot@buildroot.org Date: Mon, 6 Jun 2022 15:57:55 +0200 Message-Id: <20220606135756.2264709-1-clg@kaod.org> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/2] configs/aspeed_ast2600evb: new defconfig X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: chin-ting_kuo@aspeedtech.com, troy_lee@aspeedtech.com, Joel Stanley , =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The kernel is from upstream and U-Boot is from the OpenBMC branch where most of development is done. Mainline doesn't have the required support for HW. The main resulting file from the build is a flash image. The partition layout matches the OpenBMC one for 64M chips. It makes it easier to update the different partitions from Linux. Intermediate files can be used to boot from U-boot over the network or to boot QEMU using -kernel/-initrd/-dtb. Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley --- Changes in v2: - Add Joel to the list of developers - Removed unused CONFIG from linux.fragment but added CONFIG_I2C_SLAVE_EEPROM which is useful for tests - minor cleanups in readme.txt DEVELOPERS | 4 ++ board/aspeed/ast2600-evb/genimage.cfg | 40 +++++++++++++ board/aspeed/ast2600-evb/linux.fragment | 1 + board/aspeed/ast2600-evb/readme.txt | 80 +++++++++++++++++++++++++ board/aspeed/common/image.its.template | 56 +++++++++++++++++ board/aspeed/common/post-image.sh | 27 +++++++++ configs/aspeed_ast2600evb_defconfig | 56 +++++++++++++++++ 7 files changed, 264 insertions(+) create mode 100644 board/aspeed/ast2600-evb/genimage.cfg create mode 100644 board/aspeed/ast2600-evb/linux.fragment create mode 100644 board/aspeed/ast2600-evb/readme.txt create mode 100644 board/aspeed/common/image.its.template create mode 100755 board/aspeed/common/post-image.sh create mode 100644 configs/aspeed_ast2600evb_defconfig diff --git a/DEVELOPERS b/DEVELOPERS index 71cc3da6d70b..3a7f67aee230 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -501,8 +501,10 @@ F: package/znc/ N: Cédric Le Goater F: board/qemu/ppc-bamboo/ F: board/qemu/ppc64le-powernv8/readme.txt +F: board/aspeed/ F: configs/qemu_ppc_bamboo_defconfig F: configs/qemu_ppc64le_powernv8_defconfig +F: configs/aspeed* N: Charles Hardin F: package/alsa-plugins/ @@ -1451,6 +1453,8 @@ F: board/qemu/ppc64le-pseries/ F: configs/qemu_ppc64le_pseries_defconfig F: board/qemu/ppc-mac99/ F: configs/qemu_ppc_mac99_defconfig +F: board/aspeed/ +F: configs/aspeed* N: Johan Derycke F: package/python-libconfig/ diff --git a/board/aspeed/ast2600-evb/genimage.cfg b/board/aspeed/ast2600-evb/genimage.cfg new file mode 100644 index 000000000000..56932d478756 --- /dev/null +++ b/board/aspeed/ast2600-evb/genimage.cfg @@ -0,0 +1,40 @@ +# +# This config reproduces the OpenBMC flash layout defined in Linux : +# +# arch/arm/boot/dts/openbmc-flash-layout-64.dtsi +# +# and included by aspeed-ast2600-evb.dts +# +flash nor-64M-256 { + pebsize = 4K + numpebs = 16K + minimum-io-unit-size = 256 +} + +image flash.img { + flash { + } + flashtype = "nor-64M-256" + + partition uboot { + image = "u-boot.bin" + size = 896K + } + + partition ubootenv { + /* TODO */ + offset = 896K + size = 128K + } + + partition fitimage { + image = "image.itb" + offset = 1M + size = 9M + } + + partition spare { + offset = 10M + size = 54M + } +} diff --git a/board/aspeed/ast2600-evb/linux.fragment b/board/aspeed/ast2600-evb/linux.fragment new file mode 100644 index 000000000000..8dd460870799 --- /dev/null +++ b/board/aspeed/ast2600-evb/linux.fragment @@ -0,0 +1 @@ +CONFIG_I2C_SLAVE_EEPROM=y diff --git a/board/aspeed/ast2600-evb/readme.txt b/board/aspeed/ast2600-evb/readme.txt new file mode 100644 index 000000000000..1f7ba13d5d97 --- /dev/null +++ b/board/aspeed/ast2600-evb/readme.txt @@ -0,0 +1,80 @@ +Aspeed AST2600 EVB + +Introduction +============ + +The AST2600 EVB is an evaluation board for the AST2600 SoC, most +commonly used as a Server Management Processor. It includes a +Dual-core ARM Cortex A7 processor with DDR4 SDRAM (up to 2GB), SPI +flash memory devices for BMC and host firmwares and numerous +controllers to drive the server board. + + https://www.aspeedtech.com/server_ast2600/ + +How to build it +=============== + +Configure buildroot: + + $ make aspeed_ast2600evb_defconfig + +Compile everything and build the rootfs image: + + $ make + +Result of the build +=================== + +After building, the output/images directory contains: + + output/images/ + ├── aspeed-ast2600-evb.dtb + ├── flash.img + ├── image.itb + ├── rootfs.cpio + ├── rootfs.cpio.xz + ├── rootfs.tar + ├── u-boot.bin + └── zImage + +Flashing the image +================== + +To update the contents of the first flash device, copy flash.img : + + $ flashcp flash.img /dev/mtd0 + +or simply the boot loader: + + $ flashcp u-boot.bin /dev/mtd1 + +Preparing the board +=================== + + * Connect a serial line to the board + * Power-up the board + +Booting the board +================= + +The AST2600 EVB boots from the SPI flash device directly and loads a +first bootloader (usually U-Boot). U-Boot will attempt to load a Linux +kernel from the same flash device by default but other storage could +be used. + + * from U-Boot + + The FIT image image.itb can be used to boot the board from U-Boot + using tftp + + * with QEMU + + $ qemu-system-arm -M ast2600-evb \ + -drive file=output/images/flash.img,format=raw,if=mtd \ + -nographic + + $ qemu-system-arm -M ast2600-evb \ + -kernel output/images/zImage \ + -initrd output/images/rootfs.cpio \ + -dtb output/images/aspeed-ast2600-evb.dtb \ + -nographic diff --git a/board/aspeed/common/image.its.template b/board/aspeed/common/image.its.template new file mode 100644 index 000000000000..e3200e240709 --- /dev/null +++ b/board/aspeed/common/image.its.template @@ -0,0 +1,56 @@ +/dts-v1/; + +/ { + description = "Kernel and buildroot image"; + #address-cells = <1>; + + images { + kernel-1 { + description = "Linux kernel"; + data = /incbin/("zImage"); + type = "kernel"; + arch = "arm"; + os = "linux"; + compression = "none"; + load = <0x80001000>; + entry = <0x80001000>; + hash-1 { + algo = "sha256"; + }; + }; + fdt-1 { + description = "Flattened Device Tree blob"; + data = /incbin/("%BOARD_DTB%"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + hash-1 { + algo = "sha256"; + }; + }; + ramdisk-1 { + description = "ramdisk"; + data = /incbin/("rootfs.cpio.xz"); + type = "ramdisk"; + arch = "arm"; + os = "linux"; + compression = "none"; + hash-1 { + algo = "sha256"; + }; + }; + }; + + configurations { + default = "conf-1"; + conf-1 { + description = "Boot Linux kernel with FDT blob, ramdisk"; + kernel = "kernel-1"; + fdt = "fdt-1"; + ramdisk = "ramdisk-1"; + hash-1 { + algo = "sha256"; + }; + }; + }; +}; diff --git a/board/aspeed/common/post-image.sh b/board/aspeed/common/post-image.sh new file mode 100755 index 000000000000..ea65a49afff0 --- /dev/null +++ b/board/aspeed/common/post-image.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +BOARD_DIR="$(dirname $0)" +mkimage=$HOST_DIR/bin/mkimage + +BOARD_DT=$(sed -n \ + 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9\-]*\).*"$/\1/p' \ + ${BR2_CONFIG}) + +sed -e "s/%BOARD_DTB%/${BOARD_DT}.dtb/" \ + $BOARD_DIR/image.its.template > $BINARIES_DIR/image.its + +(cd $BINARIES_DIR && $mkimage -f image.its image.itb) + +GENIMAGE_CFG="board/aspeed/${BOARD_DT#aspeed-*}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + +rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +rm -f $BINARIES_DIR/image.its diff --git a/configs/aspeed_ast2600evb_defconfig b/configs/aspeed_ast2600evb_defconfig new file mode 100644 index 000000000000..19e46a752f3c --- /dev/null +++ b/configs/aspeed_ast2600evb_defconfig @@ -0,0 +1,56 @@ +# Architecture +BR2_arm=y + +# System +BR2_TARGET_GENERIC_HOSTNAME="aspeed-evb" +BR2_TARGET_GENERIC_ISSUE="Aspeed EVB" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS4" +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_XZ=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/aspeed/common/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_17=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.17.7" +BR2_LINUX_KERNEL_DEFCONFIG="aspeed_g5" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/aspeed/ast2600-evb/linux.fragment" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="aspeed-ast2600-evb" + +# Boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/openbmc/u-boot.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="f2b82fa4ba17ed8091fe76c284220006645a293b" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="evb-ast2600" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=ast2600a1-evb" + +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y +BR2_PACKAGE_HOST_GENIMAGE=y + +# Target tools +BR2_PACKAGE_MTD=y +BR2_PACKAGE_UBOOT_TOOLS=y +BR2_PACKAGE_LIBGPIOD=y +BR2_PACKAGE_LIBGPIOD_TOOLS=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_LIBCURL_CURL=y +BR2_PACKAGE_LIBCURL_VERBOSE=y +BR2_PACKAGE_LIBFFI=y +BR2_PACKAGE_DROPBEAR=y +BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_HOST_MKPASSWD=y From patchwork Mon Jun 6 13:57:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 1639339 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LGw7N6rwyz9sG6 for ; Mon, 6 Jun 2022 23:58:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B3230840C5; Mon, 6 Jun 2022 13:58:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IqSzcGw_i5Hs; Mon, 6 Jun 2022 13:58:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 74A3783E4E; Mon, 6 Jun 2022 13:58:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id EAABC1BF2BC for ; Mon, 6 Jun 2022 13:58:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D95CF4169E for ; Mon, 6 Jun 2022 13:58:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fUxWpoQM5KOV for ; Mon, 6 Jun 2022 13:58:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by smtp4.osuosl.org (Postfix) with ESMTPS id 59DD4416AB for ; Mon, 6 Jun 2022 13:58:13 +0000 (UTC) Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4LGw751ybDz4xXJ; Mon, 6 Jun 2022 23:58:09 +1000 (AEST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4LGw733TCPz4xR1; Mon, 6 Jun 2022 23:58:07 +1000 (AEST) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: buildroot@buildroot.org Date: Mon, 6 Jun 2022 15:57:56 +0200 Message-Id: <20220606135756.2264709-2-clg@kaod.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220606135756.2264709-1-clg@kaod.org> References: <20220606135756.2264709-1-clg@kaod.org> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 2/2] configs/aspeed_ast2500evb: new defconfig X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: chin-ting_kuo@aspeedtech.com, troy_lee@aspeedtech.com, Joel Stanley , =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The kernel is from upstream with a custom config because the default 'aspeed_g5' defconfig builds a zImage file image too big for the flash layout. U-Boot is from the OpenBMC branch where most of development is done. Latest mainline should work. The main resulting file from the build is a flash image. The partition layout matches the OpenBMC one for 32M chips. It makes it easier to update the different partitions from Linux. Intermediate files can be used to boot from U-boot over the network or to boot QEMU using -kernel/-initrd/-dtb. Reviewed-by: Joel Stanley Signed-off-by: Cédric Le Goater --- Changes in v2: - minor cleanups in readme.txt board/aspeed/ast2500-evb/genimage.cfg | 40 ++++ board/aspeed/ast2500-evb/linux.config | 262 ++++++++++++++++++++++++ board/aspeed/ast2500-evb/readme.txt | 80 ++++++++ board/aspeed/ast2500-evb/uboot.fragment | 1 + configs/aspeed_ast2500evb_defconfig | 58 ++++++ 5 files changed, 441 insertions(+) create mode 100644 board/aspeed/ast2500-evb/genimage.cfg create mode 100644 board/aspeed/ast2500-evb/linux.config create mode 100644 board/aspeed/ast2500-evb/readme.txt create mode 100644 board/aspeed/ast2500-evb/uboot.fragment create mode 100644 configs/aspeed_ast2500evb_defconfig diff --git a/board/aspeed/ast2500-evb/genimage.cfg b/board/aspeed/ast2500-evb/genimage.cfg new file mode 100644 index 000000000000..498a71e4d75d --- /dev/null +++ b/board/aspeed/ast2500-evb/genimage.cfg @@ -0,0 +1,40 @@ +# +# This config reproduces the OpenBMC flash layout defined in Linux : +# +# arch/arm/boot/dts/openbmc-flash-layout.dtsi +# +# and included by aspeed-ast2500-evb.dts +# +flash nor-32M-256 { + pebsize = 4K + numpebs = 8K + minimum-io-unit-size = 256 +} + +image flash.img { + flash { + } + flashtype = "nor-32M-256" + + partition uboot { + image = "u-boot.bin" + size = 384K + } + + partition ubootenv { + /* TODO */ + offset = 384K + size = 128K + } + + partition fitimage { + image = "image.itb" + offset = 512K + size = 4352K + } + + partition spare { + offset = 4864K + size = 27904K + } +} diff --git a/board/aspeed/ast2500-evb/linux.config b/board/aspeed/ast2500-evb/linux.config new file mode 100644 index 000000000000..35eabcfe2bca --- /dev/null +++ b/board/aspeed/ast2500-evb/linux.config @@ -0,0 +1,262 @@ +CONFIG_KERNEL_XZ=y +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_BPF_SYSCALL=y +CONFIG_PSI=y +CONFIG_PSI_DEFAULT_DISABLED=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_CGROUPS=y +CONFIG_CGROUP_BPF=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_BLK_DEV_INITRD=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZO is not set +# CONFIG_RD_LZ4 is not set +# CONFIG_UID16 is not set +# CONFIG_SYSFS_SYSCALL is not set +# CONFIG_AIO is not set +CONFIG_EMBEDDED=y +CONFIG_PERF_EVENTS=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB_FREELIST_RANDOM=y +CONFIG_SLAB_FREELIST_HARDENED=y +CONFIG_ARCH_MULTI_V6=y +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_ARCH_ASPEED=y +CONFIG_MACH_ASPEED_G5=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_VMSPLIT_2G=y +CONFIG_UACCESS_WITH_MEMCPY=y +# CONFIG_ATAGS is not set +CONFIG_KEXEC=y +# CONFIG_SUSPEND is not set +CONFIG_JUMP_LABEL=y +CONFIG_STRICT_KERNEL_RWX=y +# CONFIG_BLK_DEBUG_FS is not set +# CONFIG_MQ_IOSCHED_DEADLINE is not set +# CONFIG_MQ_IOSCHED_KYBER is not set +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_COMPACTION is not set +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_PACKET_DIAG=y +CONFIG_UNIX=y +CONFIG_UNIX_DIAG=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_SYN_COOKIES=y +# CONFIG_INET_DIAG is not set +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +# CONFIG_IPV6_SIT is not set +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_ADVANCED is not set +CONFIG_VLAN_8021Q=y +CONFIG_NET_NCSI=y +# CONFIG_WIRELESS is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_FIRMWARE_MEMMAP=y +CONFIG_MTD=y +CONFIG_MTD_BLOCK=y +CONFIG_MTD_PARTITIONED_MASTER=y +CONFIG_MTD_SPI_NOR=y +# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set +CONFIG_SPI_ASPEED_SMC=y +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_FASTMAP=y +CONFIG_MTD_UBI_BLOCK=y +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_NBD=y +CONFIG_EEPROM_AT24=y +CONFIG_NETDEVICES=y +CONFIG_NETCONSOLE=y +# CONFIG_NET_VENDOR_ALACRITECH is not set +# CONFIG_NET_VENDOR_AMAZON is not set +# CONFIG_NET_VENDOR_AQUANTIA is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_NET_VENDOR_CORTINA is not set +# CONFIG_NET_VENDOR_EZCHIP is not set +CONFIG_FTGMAC100=y +# CONFIG_NET_VENDOR_HISILICON is not set +# CONFIG_NET_VENDOR_HUAWEI is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MELLANOX is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROSEMI is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_NET_VENDOR_NETRONOME is not set +# CONFIG_NET_VENDOR_NI is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_RENESAS is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SOLARFLARE is not set +# CONFIG_NET_VENDOR_SMSC is not set +# CONFIG_NET_VENDOR_SOCIONEXT is not set +# CONFIG_NET_VENDOR_STMICRO is not set +# CONFIG_NET_VENDOR_SYNOPSYS is not set +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_BROADCOM_PHY=y +CONFIG_REALTEK_PHY=y +# CONFIG_WLAN is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y +CONFIG_KEYBOARD_GPIO_POLLED=y +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_IBM_PANEL=y +# CONFIG_SERIO is not set +# CONFIG_VT is not set +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=6 +CONFIG_SERIAL_8250_RUNTIME_UARTS=6 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_ASPEED_VUART=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_ASPEED_KCS_IPMI_BMC=y +CONFIG_IPMI_KCS_BMC_CDEV_IPMI=y +CONFIG_IPMI_KCS_BMC_CDEV_RAW=y +CONFIG_ASPEED_BT_IPMI_BMC=y +CONFIG_HW_RANDOM_TIMERIOMEM=y +CONFIG_DEVMEM_BOOTPARAM=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX_PCA9541=y +CONFIG_I2C_MUX_PCA954x=y +CONFIG_I2C_ASPEED=y +CONFIG_I2C_FSI=y +CONFIG_I2C_SLAVE=y +CONFIG_SPI=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_ASPEED=y +CONFIG_GPIO_PCA953X=y +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_W1=y +CONFIG_W1_MASTER_GPIO=y +CONFIG_W1_SLAVE_THERM=y +CONFIG_SENSORS_ASPEED=y +CONFIG_SENSORS_IIO_HWMON=y +CONFIG_SENSORS_LM75=y +CONFIG_SENSORS_NCT7904=y +CONFIG_SENSORS_OCC_P8_I2C=y +CONFIG_SENSORS_OCC_P9_SBE=y +CONFIG_PMBUS=y +CONFIG_SENSORS_ADM1275=y +CONFIG_SENSORS_IBM_CFFPS=y +CONFIG_SENSORS_IR35221=y +CONFIG_SENSORS_LM25066=y +CONFIG_SENSORS_MAX31785=y +CONFIG_SENSORS_UCD9000=y +CONFIG_SENSORS_UCD9200=y +CONFIG_SENSORS_TMP421=y +CONFIG_SENSORS_W83773G=y +CONFIG_WATCHDOG_SYSFS=y +CONFIG_MEDIA_SUPPORT=y +CONFIG_MEDIA_SUPPORT_FILTER=y +CONFIG_MEDIA_PLATFORM_SUPPORT=y +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_ASPEED=y +CONFIG_DRM=y +CONFIG_DRM_ASPEED_GFX=y +CONFIG_FB=y +CONFIG_USB_GADGET=y +CONFIG_USB_ASPEED_VHUB=y +CONFIG_USB_CONFIGFS=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_MASS_STORAGE=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_CLASS_FLASH=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PCA955X=y +CONFIG_LEDS_PCA955X_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=y +CONFIG_RTC_DRV_PCF8523=y +CONFIG_RTC_DRV_RV8803=y +# CONFIG_VIRTIO_MENU is not set +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_ASPEED_XDMA=y +CONFIG_IIO=y +CONFIG_ASPEED_ADC=y +CONFIG_MAX1363=y +CONFIG_BMP280=y +CONFIG_DPS310=y +CONFIG_FSI=y +CONFIG_FSI_MASTER_GPIO=y +CONFIG_FSI_MASTER_HUB=y +CONFIG_FSI_MASTER_AST_CF=y +CONFIG_FSI_SCOM=y +CONFIG_FSI_SBEFIFO=y +CONFIG_FSI_OCC=y +CONFIG_FANOTIFY=y +CONFIG_OVERLAY_FS=y +CONFIG_TMPFS=y +CONFIG_JFFS2_FS=y +# CONFIG_JFFS2_FS_WRITEBUFFER is not set +CONFIG_JFFS2_SUMMARY=y +CONFIG_JFFS2_FS_XATTR=y +CONFIG_UBIFS_FS=y +CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_XZ=y +CONFIG_SQUASHFS_ZSTD=y +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_HARDENED_USERCOPY=y +CONFIG_FORTIFY_SOURCE=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_USER_API_HASH=y +# CONFIG_CRYPTO_HW is not set +# CONFIG_XZ_DEC_X86 is not set +# CONFIG_XZ_DEC_POWERPC is not set +# CONFIG_XZ_DEC_IA64 is not set +# CONFIG_XZ_DEC_SPARC is not set +CONFIG_PRINTK_TIME=y +CONFIG_DYNAMIC_DEBUG=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_REDUCED=y +CONFIG_DEBUG_INFO_DWARF4=y +CONFIG_GDB_SCRIPTS=y +CONFIG_STRIP_ASM_SYMS=y +CONFIG_DEBUG_FS=y +CONFIG_DEBUG_WX=y +CONFIG_SCHED_STACK_END_CHECK=y +CONFIG_PANIC_ON_OOPS=y +CONFIG_PANIC_TIMEOUT=-1 +CONFIG_SOFTLOCKUP_DETECTOR=y +# CONFIG_DETECT_HUNG_TASK is not set +CONFIG_WQ_WATCHDOG=y +# CONFIG_SCHED_DEBUG is not set +CONFIG_DEBUG_LIST=y +CONFIG_FUNCTION_TRACER=y +CONFIG_DEBUG_USER=y +# CONFIG_RUNTIME_TESTING_MENU is not set diff --git a/board/aspeed/ast2500-evb/readme.txt b/board/aspeed/ast2500-evb/readme.txt new file mode 100644 index 000000000000..f509be553bcf --- /dev/null +++ b/board/aspeed/ast2500-evb/readme.txt @@ -0,0 +1,80 @@ +Aspeed AST2500 EVB + +Introduction +============ + +The AST2500 EVB is an evaluation board for the AST2500 SoC, most +commonly used as a Server Management Processor. It includes an 800MHz +ARM11 processor with DDR3 or DDR4 SDRAM (up to 1GB), SPI flash memory +devices for BMC and host firmwares and numerous controllers to drive +the server board. + + https://www.aspeedtech.com/server_ast2500/ + +How to build it +=============== + +Configure buildroot: + + $ make aspeed_ast2500evb_defconfig + +Compile everything and build the rootfs image: + + $ make + +Result of the build +=================== + +After building, the output/images directory contains: + + output/images/ + ├── aspeed-ast2500-evb.dtb + ├── flash.img + ├── image.itb + ├── rootfs.cpio + ├── rootfs.cpio.xz + ├── rootfs.tar + ├── u-boot.bin + └── zImage + +Flashing the image +================== + +To update the contents of the first flash device, copy flash.img : + + $ flashcp flash.img /dev/mtd0 + +or simply the boot loader: + + $ flashcp u-boot.bin /dev/mtd1 + +Preparing the board +=================== + + * Connect a serial line to the board + * Power-up the board + +Booting the board +================= + +The AST2500 EVB boots from the SPI flash device directly and loads a +first bootloader (usually U-Boot). U-Boot will attempt to load a Linux +kernel from the same flash device by default but other storage could +be used. + + * from U-Boot + + The FIT image image.itb can be used to boot the board from U-Boot + using tftp + + * with QEMU + + $ qemu-system-arm -M ast2500-evb \ + -drive file=output/images/flash.img,format=raw,if=mtd \ + -nographic + + $ qemu-system-arm -M ast2500-evb \ + -kernel output/images/zImage \ + -initrd output/images/rootfs.cpio \ + -dtb output/images/aspeed-ast2500-evb.dtb \ + -nographic diff --git a/board/aspeed/ast2500-evb/uboot.fragment b/board/aspeed/ast2500-evb/uboot.fragment new file mode 100644 index 000000000000..5a8961538f4a --- /dev/null +++ b/board/aspeed/ast2500-evb/uboot.fragment @@ -0,0 +1 @@ +CONFIG_BOOTCOMMAND="bootm 20080000" diff --git a/configs/aspeed_ast2500evb_defconfig b/configs/aspeed_ast2500evb_defconfig new file mode 100644 index 000000000000..2ec2df4f5f1c --- /dev/null +++ b/configs/aspeed_ast2500evb_defconfig @@ -0,0 +1,58 @@ +# Architecture +BR2_arm=y + +# System +BR2_TARGET_GENERIC_HOSTNAME="aspeed-evb" +BR2_TARGET_GENERIC_ISSUE="Aspeed EVB" +BR2_TARGET_GENERIC_GETTY_PORT="ttyS4" +BR2_SYSTEM_DHCP="eth0" + +# Filesystem +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_XZ=y + +# Image +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/aspeed/common/post-image.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_DEFCONFIG)" + +# Linux headers same as kernel +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_17=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.17.7" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/aspeed/ast2500-evb/linux.config" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="aspeed-ast2500-evb" +BR2_LINUX_KERNEL_XZ=y + +# Boot +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/openbmc/u-boot.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="f2b82fa4ba17ed8091fe76c284220006645a293b" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="evb-ast2500" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=ast2500-evb" +BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/aspeed/ast2500-evb/uboot.fragment" + +BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y +BR2_PACKAGE_HOST_GENIMAGE=y + +# Target tools +BR2_PACKAGE_MTD=y +BR2_PACKAGE_UBOOT_TOOLS=y +BR2_PACKAGE_LIBGPIOD=y +BR2_PACKAGE_LIBGPIOD_TOOLS=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_LIBCURL_CURL=y +BR2_PACKAGE_LIBCURL_VERBOSE=y +BR2_PACKAGE_LIBFFI=y +BR2_PACKAGE_DROPBEAR=y +BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS=y +BR2_PACKAGE_LRZSZ=y +BR2_PACKAGE_HOST_MKPASSWD=y