All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support
@ 2022-05-31  5:49 Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 1/7] package/elf2flt: Remove Config.in.host Damien Le Moal via buildroot
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-05-31  5:49 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

This patch series is a rework of the old v5 series "Add RV64 NOMMU and
Canaan K210 SoC support" already posted some (long) time ago.

This series adds support for building 64-bits RISC-V NOMMU kernels (both
bootable kernels and u-boot sdcard boot envronements) for NOMMU RISC-V
64-bits boards. The board supported include QEMU and many boards using
the dual-core RISC-V 64-bits Cannan Kendryte K210 SoC.

The first patch is a simple fix of elf2flt configuration.

Patch 2 adds the configurations files common to all K210-based boards.

The last 5 patches add support for the following K210-based boards:
* Sipeed MAIX Bit
* Sipeed MAIXDUINO
* Sipeed MAIX Dock (dan)
* Sipeed MAIX Go
* Canaan KD233 development board

For each board, a readme.txt file is added to document how to build and
install images for these boards.

Changes from v2:
* Rebased patches on next branch
* Modified patch 1 to address Thomas comments
* Removed patches already applied
* Modified patches 2 to 7 to remove the BR2_PACKAGE_HOST_ELF2FLT and
  reference the global patch directory in boar/riscv/nommu

Changes from v1:
* Modified patch 5 to add the python-kflash utility as a host package as
  the new 1.1.5 version of this utility fixes the previously identified
  problems with python dependencies.
* Fixed patch 4 (qemu riscv nommu) to have buildroot configuration file
  reference kernel 5.18.
* Fixed patch 11 (kd233 board) to have buildroot configuration file
  reference kernel 5.18.
* Modified patch 7 to 11 to add the python-kflash host package to the
  buildroot configuration files. The instructions in the readme.txt
  file for each board are also updated accordingly.

Damien Le Moal (7):
  package/elf2flt: Remove Config.in.host
  board: Add common support for Canaan K210 SoC-based boards
  board: Add Sipeed MAIX-Bit board support
  board: Add Sipeed MAIXDUINO board support
  board: Add Sipeed MAIX-Dock board support
  board: Add Sipeed MAIX-Go board support
  board: Add Canaan KD233 board support

 Config.in                                     |   2 +-
 DEVELOPERS                                    |  11 +
 arch/Config.in                                |   1 +
 board/canaan/k210-soc/busybox-tiny.config     | 231 +++++++++++++
 board/canaan/k210-soc/genimage.cfg            |  30 ++
 board/canaan/k210-soc/linux-sdcard.config     |   4 +
 board/canaan/k210-soc/post-build.sh           |  28 ++
 board/canaan/k210-soc/rootfs_overlay/init     |   1 +
 .../canaan/k210-soc/rootfs_overlay/sbin/init  |  41 +++
 board/canaan/k210-soc/uboot.config            |   1 +
 board/canaan/kd233/linux-cpio.config          |   2 +
 board/canaan/kd233/readme.txt                 | 149 ++++++++
 board/sipeed/maix-bit/linux-cpio.config       |   2 +
 board/sipeed/maix-bit/readme.txt              | 316 +++++++++++++++++
 board/sipeed/maix-dock/linux-cpio.config      |   2 +
 board/sipeed/maix-dock/readme.txt             | 321 ++++++++++++++++++
 board/sipeed/maix-go/linux-cpio.config        |   2 +
 board/sipeed/maix-go/readme.txt               | 320 +++++++++++++++++
 board/sipeed/maixduino/linux-cpio.config      |   2 +
 board/sipeed/maixduino/readme.txt             | 292 ++++++++++++++++
 configs/canaan_kd233_defconfig                |  39 +++
 configs/qemu_arm_versatile_nommu_defconfig    |   1 -
 configs/qemu_riscv64_nommu_virt_defconfig     |   1 -
 configs/qemu_xtensa_lx60_nommu_defconfig      |   1 -
 configs/sipeed_maix_bit_defconfig             |  39 +++
 configs/sipeed_maix_bit_sdcard_defconfig      |  57 ++++
 configs/sipeed_maix_dock_defconfig            |  39 +++
 configs/sipeed_maix_dock_sdcard_defconfig     |  57 ++++
 configs/sipeed_maix_go_defconfig              |  39 +++
 configs/sipeed_maix_go_sdcard_defconfig       |  57 ++++
 configs/sipeed_maixduino_defconfig            |  39 +++
 configs/sipeed_maixduino_sdcard_defconfig     |  57 ++++
 package/elf2flt/Config.in.host                |  13 -
 toolchain/toolchain-buildroot/Config.in       |   1 -
 34 files changed, 2180 insertions(+), 18 deletions(-)
 create mode 100644 board/canaan/k210-soc/busybox-tiny.config
 create mode 100644 board/canaan/k210-soc/genimage.cfg
 create mode 100644 board/canaan/k210-soc/linux-sdcard.config
 create mode 100755 board/canaan/k210-soc/post-build.sh
 create mode 120000 board/canaan/k210-soc/rootfs_overlay/init
 create mode 100755 board/canaan/k210-soc/rootfs_overlay/sbin/init
 create mode 100644 board/canaan/k210-soc/uboot.config
 create mode 100644 board/canaan/kd233/linux-cpio.config
 create mode 100644 board/canaan/kd233/readme.txt
 create mode 100644 board/sipeed/maix-bit/linux-cpio.config
 create mode 100644 board/sipeed/maix-bit/readme.txt
 create mode 100644 board/sipeed/maix-dock/linux-cpio.config
 create mode 100644 board/sipeed/maix-dock/readme.txt
 create mode 100644 board/sipeed/maix-go/linux-cpio.config
 create mode 100644 board/sipeed/maix-go/readme.txt
 create mode 100644 board/sipeed/maixduino/linux-cpio.config
 create mode 100644 board/sipeed/maixduino/readme.txt
 create mode 100644 configs/canaan_kd233_defconfig
 create mode 100644 configs/sipeed_maix_bit_defconfig
 create mode 100644 configs/sipeed_maix_bit_sdcard_defconfig
 create mode 100644 configs/sipeed_maix_dock_defconfig
 create mode 100644 configs/sipeed_maix_dock_sdcard_defconfig
 create mode 100644 configs/sipeed_maix_go_defconfig
 create mode 100644 configs/sipeed_maix_go_sdcard_defconfig
 create mode 100644 configs/sipeed_maixduino_defconfig
 create mode 100644 configs/sipeed_maixduino_sdcard_defconfig
 delete mode 100644 package/elf2flt/Config.in.host

-- 
2.36.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v3 1/7] package/elf2flt: Remove Config.in.host
  2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
@ 2022-05-31  5:49 ` Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 2/7] board: Add common support for Canaan K210 SoC-based boards Damien Le Moal via buildroot
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-05-31  5:49 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

There is no need to have configuration files direbtly set the
BR2_PACKAGE_HOST_ELF2FLT option. The need for the elf2flt utility is
automatically determined by gcc build in package/gcc/gcc.mk according to
the BR2_BINFMT_FLAT option.

Accordingly, we can remove the file package/elf2flt/Config.in.host to
get rid of the BR2_PACKAGE_HOST_ELF2FLT option. BR2_STRIP_strip
dependency on this option is replaced with a dependency on
BR2_BINFMT_ELF.

To stay consistent with the fact that elf2flt supports only the arm, sh,
sparc, xtensa and riscv-64 architectures, a dependency on these
architectures is added to the BR2_BINFMT_FLAT option in arch/Config.in.

Board configuration files setting the BR2_PACKAGE_HOST_ELF2FLT option
are also updated.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 Config.in                                  |  2 +-
 arch/Config.in                             |  1 +
 configs/qemu_arm_versatile_nommu_defconfig |  1 -
 configs/qemu_riscv64_nommu_virt_defconfig  |  1 -
 configs/qemu_xtensa_lx60_nommu_defconfig   |  1 -
 package/elf2flt/Config.in.host             | 13 -------------
 toolchain/toolchain-buildroot/Config.in    |  1 -
 7 files changed, 2 insertions(+), 18 deletions(-)
 delete mode 100644 package/elf2flt/Config.in.host

diff --git a/Config.in b/Config.in
index f0cd6f48ed..7192292d10 100644
--- a/Config.in
+++ b/Config.in
@@ -432,7 +432,7 @@ config BR2_ENABLE_RUNTIME_DEBUG
 config BR2_STRIP_strip
 	bool "strip target binaries"
 	default y
-	depends on !BR2_PACKAGE_HOST_ELF2FLT
+	depends on BR2_BINFMT_ELF
 	help
 	  Binaries and libraries in the target filesystem will be
 	  stripped using the normal 'strip' command. This allows to save
diff --git a/arch/Config.in b/arch/Config.in
index 49e16fce38..e89a58ac3b 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -392,6 +392,7 @@ config BR2_BINFMT_ELF
 
 config BR2_BINFMT_FLAT
 	bool "FLAT"
+	depends on BR2_arm || BR2_sh || BR2_sparc || BR2_xtensa || BR2_RISCV_64
 	depends on !BR2_USE_MMU
 	help
 	  FLAT binary is a relatively simple and lightweight executable
diff --git a/configs/qemu_arm_versatile_nommu_defconfig b/configs/qemu_arm_versatile_nommu_defconfig
index 0c49d1b67d..d88ade1fe9 100644
--- a/configs/qemu_arm_versatile_nommu_defconfig
+++ b/configs/qemu_arm_versatile_nommu_defconfig
@@ -3,7 +3,6 @@ BR2_arm=y
 BR2_arm926t=y
 
 # Toolchain
-BR2_PACKAGE_HOST_ELF2FLT=y
 # BR2_USE_MMU is not set
 
 # Patches
diff --git a/configs/qemu_riscv64_nommu_virt_defconfig b/configs/qemu_riscv64_nommu_virt_defconfig
index bfee9e710a..33fad50a3c 100644
--- a/configs/qemu_riscv64_nommu_virt_defconfig
+++ b/configs/qemu_riscv64_nommu_virt_defconfig
@@ -6,7 +6,6 @@ BR2_RISCV_64=y
 BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
 
 # Toolchain
-BR2_PACKAGE_HOST_ELF2FLT=y
 # BR2_USE_MMU is not set
 
 # Busybox with hush
diff --git a/configs/qemu_xtensa_lx60_nommu_defconfig b/configs/qemu_xtensa_lx60_nommu_defconfig
index 44fb81bd74..f107b7e73b 100644
--- a/configs/qemu_xtensa_lx60_nommu_defconfig
+++ b/configs/qemu_xtensa_lx60_nommu_defconfig
@@ -4,7 +4,6 @@ BR2_XTENSA_CUSTOM=y
 BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/95291b7c39e6f790d0b2f062c945a630290f2c81/overlays/xtensa_dc233c.tar.gz"
 
 # Toolchain
-BR2_PACKAGE_HOST_ELF2FLT=y
 # BR2_USE_MMU is not set
 
 # Use minimal busybox with hush and networking tools
diff --git a/package/elf2flt/Config.in.host b/package/elf2flt/Config.in.host
deleted file mode 100644
index 2bab0095c2..0000000000
--- a/package/elf2flt/Config.in.host
+++ /dev/null
@@ -1,13 +0,0 @@
-config BR2_PACKAGE_HOST_ELF2FLT
-	bool "Enable elf2flt support?"
-	depends on BR2_arm || BR2_sh || BR2_sparc || BR2_xtensa || BR2_RISCV_64
-	depends on !BR2_USE_MMU
-	help
-	  uCLinux uses a Binary Flat format commonly known as BFLT. It
-	  is a relatively simple and lightweight executable format
-	  based on the original a.out format.
-
-	  This option compiles the required tools and makes the required
-	  modifications on your toolchain (linker).
-
-	  https://github.com/uclinux-dev/elf2flt
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 8d9cf4cc68..9c80f22afa 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -114,5 +114,4 @@ source "package/uclibc/Config.in"
 source "package/glibc/Config.in"
 source "package/binutils/Config.in.host"
 source "package/gcc/Config.in.host"
-source "package/elf2flt/Config.in.host"
 endif
-- 
2.36.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v3 2/7] board: Add common support for Canaan K210 SoC-based boards
  2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 1/7] package/elf2flt: Remove Config.in.host Damien Le Moal via buildroot
@ 2022-05-31  5:49 ` Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 3/7] board: Add Sipeed MAIX-Bit board support Damien Le Moal via buildroot
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-05-31  5:49 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

The Linux environment for all boards using the Canaan Kendryte K210 SoC
can be built with the same process, using configurations that differ
only by the device tree used for the build. This patch add the
shared configurations, rootfs overlay and scripts used for all
K210-based boards.

Since the K210 SoC only has 8 MB of SRAM, a special busybox
configuration and rootfs overlay are added to save memory at runtime:
* For configurations using direct kernel boot (no boot loader), the
  default busybox configuration busybox-minimal.config is modified
  using the fragment file board/canaan/k210-soc/busybox-tiny.config.
  This reduces the size of the busybox executable to save memory when
  executing shell commands.
* Busybox init system is not used and a special init scripts is provided
  using the rootfs_overlay root file system overlay. This init script
  simply mounts devtmpfs, /proc and /sys, and exec an interactive shell
  after printing a logo. This avoids (1) boot failures due to large
  memory allocations by the regular busybox init system (these
  allocations fail on the K210 for lack of enough memory) and avoids
  (2) keeping the init process sleeping in the background (wasted
  memory).

The board/canaan/k210-soc/busybox-tiny.config and the rootfs overlay
files in board/canaan/k210-soc/rootfs_overlay are used for all Canaan
K210 SoC based boards.

For board configurations booting using the U-Boot boot loader, a common
set of linux kernel configuration parameters is provided by the file
board/canaan/k210-soc/linux-sdcard.config. In addition, the post build
script board/canaan/k210-soc/post-build.sh file and U-Boot image
generation configuration file board/canaan/k210-soc/genimage.cfg are
provided. The post-build script creates a generic "k210.dtb" symlink to
the compiled device tree file for the target board. This symlink is used
by the genimage.cfg configuration, making this file common for all
boards.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 DEVELOPERS                                    |   1 +
 board/canaan/k210-soc/busybox-tiny.config     | 231 ++++++++++++++++++
 board/canaan/k210-soc/genimage.cfg            |  30 +++
 board/canaan/k210-soc/linux-sdcard.config     |   4 +
 board/canaan/k210-soc/post-build.sh           |  28 +++
 board/canaan/k210-soc/rootfs_overlay/init     |   1 +
 .../canaan/k210-soc/rootfs_overlay/sbin/init  |  41 ++++
 board/canaan/k210-soc/uboot.config            |   1 +
 8 files changed, 337 insertions(+)
 create mode 100644 board/canaan/k210-soc/busybox-tiny.config
 create mode 100644 board/canaan/k210-soc/genimage.cfg
 create mode 100644 board/canaan/k210-soc/linux-sdcard.config
 create mode 100755 board/canaan/k210-soc/post-build.sh
 create mode 120000 board/canaan/k210-soc/rootfs_overlay/init
 create mode 100755 board/canaan/k210-soc/rootfs_overlay/sbin/init
 create mode 100644 board/canaan/k210-soc/uboot.config

diff --git a/DEVELOPERS b/DEVELOPERS
index 096ca94f4e..972c5de380 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -632,6 +632,7 @@ F:	package/log4cpp/
 
 N:	Damien Le Moal <damien.lemoal@wdc.com>
 F:	package/python-kflash/
+F:	board/canaan/
 
 N:	Daniel Nicoletti <dantti12@gmail.com>
 F:	package/cutelyst/
diff --git a/board/canaan/k210-soc/busybox-tiny.config b/board/canaan/k210-soc/busybox-tiny.config
new file mode 100644
index 0000000000..9db12b560a
--- /dev/null
+++ b/board/canaan/k210-soc/busybox-tiny.config
@@ -0,0 +1,231 @@
+#
+# Additional config changes for busybox-minimal.config
+# to reduce the size of the busybox executable.
+#
+
+#
+# Settings
+#
+# CONFIG_INCLUDE_SUSv2 is not set
+# CONFIG_LONG_OPTS is not set
+# CONFIG_LFS is not set
+# CONFIG_FEATURE_DEVPTS is not set
+# CONFIG_FEATURE_SYSLOG_INFO is not set
+# CONFIG_FEATURE_SYSLOG is not set
+
+#
+# Library Tuning
+#
+# CONFIG_FEATURE_RTMINMAX is not set
+# CONFIG_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS is not set
+# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
+CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
+# CONFIG_FEATURE_EDITING_VI is not set
+# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
+# CONFIG_FEATURE_REVERSE_SEARCH is not set
+# CONFIG_FEATURE_EDITING_WINCH is not set
+# CONFIG_FEATURE_HWIB is not set
+
+#
+# Archival Utilities
+#
+# CONFIG_ZCAT is not set
+# CONFIG_BZCAT is not set
+# CONFIG_LZCAT is not set
+# CONFIG_XZCAT is not set
+# CONFIG_UNLZOP is not set
+# CONFIG_LZOPCAT is not set
+
+#
+# Coreutils
+#
+# CONFIG_CKSUM is not set
+# CONFIG_DOS2UNIX is not set
+# CONFIG_UNIX2DOS is not set
+# CONFIG_DU is not set
+# CONFIG_FACTOR is not set
+# CONFIG_FOLD is not set
+# CONFIG_HEAD is not set
+# CONFIG_INSTALL is not set
+# CONFIG_LINK is not set
+# CONFIG_LOGNAME is not set
+# CONFIG_MD5SUM is not set
+# CONFIG_SHA1SUM is not set
+# CONFIG_SHA256SUM is not set
+# CONFIG_SHA512SUM is not set
+# CONFIG_SHA3SUM is not set
+# CONFIG_MKFIFO is not set
+# CONFIG_NICE is not set
+# CONFIG_NL is not set
+# CONFIG_NOHUP is not set
+# CONFIG_OD is not set
+# CONFIG_PASTE is not set
+# CONFIG_SHRED is not set
+# CONFIG_SORT is not set
+# CONFIG_TAIL is not set
+# CONFIG_TEE is not set
+# CONFIG_TIMEOUT is not set
+# CONFIG_TR is not set
+# CONFIG_UNIQ is not set
+# CONFIG_UUDECODE is not set
+# CONFIG_BASE32 is not set
+# CONFIG_UUENCODE is not set
+# CONFIG_WC is not set
+# CONFIG_WHOAMI is not set
+# CONFIG_WHO is not set
+# CONFIG_W is not set
+# CONFIG_USERS is not set
+# CONFIG_YES is not set
+
+#
+# Common options
+#
+# CONFIG_FEATURE_VERBOSE is not set
+
+#
+# Debian Utilities
+#
+# CONFIG_RUN_PARTS is not set
+# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+# CONFIG_START_STOP_DAEMON is not set
+# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set
+# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set
+# CONFIG_WHICH is not set
+
+#
+# klibc-utils
+#
+# CONFIG_NUKE is not set
+# CONFIG_RESUME is not set
+# CONFIG_RUN_INIT is not set
+
+#
+# Editors
+#
+# CONFIG_SED is not set
+CONFIG_VI=y
+CONFIG_FEATURE_VI_MAX_LEN=4096
+CONFIG_FEATURE_VI_COLON=y
+CONFIG_FEATURE_VI_YANKMARK=y
+CONFIG_FEATURE_VI_USE_SIGNALS=y
+CONFIG_FEATURE_VI_DOT_CMD=y
+CONFIG_FEATURE_VI_READONLY=y
+CONFIG_FEATURE_VI_SETOPTS=y
+CONFIG_FEATURE_VI_SET=y
+CONFIG_FEATURE_VI_WIN_RESIZE=y
+CONFIG_FEATURE_VI_ASK_TERMINAL=y
+CONFIG_FEATURE_VI_UNDO=y
+
+#
+# Finding Utilities
+#
+CONFIG_GREP=y
+# CONFIG_EGREP is not set
+# CONFIG_FGREP is not set
+# CONFIG_XARGS is not set
+
+#
+# Init Utilities
+#
+# CONFIG_HALT is not set
+# CONFIG_POWEROFF is not set
+# CONFIG_FEATURE_WAIT_FOR_INIT is not set
+# CONFIG_FEATURE_CALL_TELINIT is not set
+# CONFIG_INIT is not set
+# CONFIG_LINUXRC is not set
+
+#
+# Login/Password Management Utilities
+#
+# CONFIG_FEATURE_SHADOWPASSWDS is not set
+# CONFIG_USE_BB_CRYPT is not set
+# CONFIG_USE_BB_CRYPT_SHA is not set
+# CONFIG_ADDUSER is not set
+# CONFIG_GETTY is not set
+# CONFIG_LOGIN is not set
+# CONFIG_PASSWD is not set
+
+#
+# Linux System Utilities
+#
+# CONFIG_FALLOCATE is not set
+# CONFIG_FREERAMDISK is not set
+# CONFIG_FSFREEZE is not set
+# CONFIG_GETOPT is not set
+# CONFIG_XXD is not set
+# CONFIG_MESG is not set
+# CONFIG_MKE2FS is not set
+# CONFIG_MKDOSFS is not set
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+# CONFIG_FEATURE_MOUNT_FSTAB is not set
+# CONFIG_FEATURE_MOUNT_OTHERTAB is not set
+# CONFIG_NOLOGIN is not set
+# CONFIG_LINUX32 is not set
+# CONFIG_LINUX64 is not set
+# CONFIG_SETPRIV is not set
+
+#
+# Common options for mount/umount
+#
+# CONFIG_FEATURE_MOUNT_LOOP is not set
+# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set
+
+#
+# Miscellaneous Utilities
+#
+# CONFIG_BC is not set
+# CONFIG_HEXEDIT is not set
+# CONFIG_I2CTRANSFER is not set
+# CONFIG_LSSCSI is not set
+# CONFIG_MIM is not set
+# CONFIG_PARTPROBE is not set
+# CONFIG_SETFATTR is not set
+# CONFIG_SETSERIAL is not set
+# CONFIG_TS is not set
+
+#
+# Networking Utilities
+#
+# CONFIG_HOSTNAME is not set
+# CONFIG_DNSDOMAINNAME is not set
+# CONFIG_IFCONFIG is not set
+# CONFIG_IFUP is not set
+# CONFIG_IFDOWN is not set
+# CONFIG_IP is not set
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_NC is not set
+# CONFIG_NETSTAT is not set
+# CONFIG_PING is not set
+# CONFIG_ROUTE is not set
+# CONFIG_TC is not set
+# CONFIG_TELNET is not set
+# CONFIG_WGET is not set
+# CONFIG_UDHCPC is not set
+
+#
+# Process Utilities
+#
+# CONFIG_KILLALL is not set
+# CONFIG_KILLALL5 is not set
+
+#
+# Runit Utilities
+#
+# CONFIG_SVC is not set
+# CONFIG_SVOK is not set
+
+#
+# Shells
+#
+CONFIG_BASH_IS_HUSH=y
+# CONFIG_BASH_IS_NONE is not set
+# CONFIG_HUSH_SAVEHISTORY is not set
+
+#
+# Options common to all shells
+#
+# CONFIG_FEATURE_SH_READ_FRAC is not set
+# CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS is not set
diff --git a/board/canaan/k210-soc/genimage.cfg b/board/canaan/k210-soc/genimage.cfg
new file mode 100644
index 0000000000..da7d5dbafb
--- /dev/null
+++ b/board/canaan/k210-soc/genimage.cfg
@@ -0,0 +1,30 @@
+image boot.vfat {
+	vfat {
+		file uImage {
+			image = "uImage"
+		}
+
+		file k210.dtb {
+			image = "k210.dtb"
+		}
+	}
+	size = 4M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition boot {
+		partition-type = 0xC
+		image = "boot.vfat"
+		bootable = "true"
+		offset = 4M
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext2"
+		size = 64M
+	}
+}
diff --git a/board/canaan/k210-soc/linux-sdcard.config b/board/canaan/k210-soc/linux-sdcard.config
new file mode 100644
index 0000000000..4b0ead78a7
--- /dev/null
+++ b/board/canaan/k210-soc/linux-sdcard.config
@@ -0,0 +1,4 @@
+CONFIG_BUILTIN_DTB=n
+CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=n
+CONFIG_SOC_CANAAN_K210_DTB_SOURCE=""
+CONFIG_CMDLINE="earlycon console=ttySIF0 root=/dev/mmcblk0p2 rootwait ro"
diff --git a/board/canaan/k210-soc/post-build.sh b/board/canaan/k210-soc/post-build.sh
new file mode 100755
index 0000000000..5b6f56a2c5
--- /dev/null
+++ b/board/canaan/k210-soc/post-build.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+MKIMAGE=${HOST_DIR}/bin/mkimage
+
+# Generate u-Boot kernel image
+${MKIMAGE} -A riscv -O linux -T kernel -C none \
+	-a 0x80000000 -e 0x80000000 \
+	-n Linux -d ${BINARIES_DIR}/loader.bin ${BINARIES_DIR}/uImage
+
+# Link the kernel-built board dtb file to using the k210.dtb generic
+# name for use by genimage.cfg
+BOARDDTBKPATH="$(grep BR2_LINUX_KERNEL_INTREE_DTS_NAME ${BR2_CONFIG} | cut -d'=' -f2 | tr -d \")"
+
+BOARDDTB="$(basename ${BOARDDTBKPATH})"
+if [ -z "${BOARDDTB}" ]; then
+	echo "Board DTB file not specified"
+	exit 1
+fi
+
+BOARDDTB="${BINARIES_DIR}/${BOARDDTB}.dtb"
+if [ ! -f "${BOARDDTB}" ]; then
+        echo "Board DTB file not found in ${BINARIES_DIR}"
+        exit 1
+fi
+
+TARGETDTB=${BINARIES_DIR}/k210.dtb
+rm -f ${TARGETDTB}
+ln -s ${BOARDDTB} ${TARGETDTB}
diff --git a/board/canaan/k210-soc/rootfs_overlay/init b/board/canaan/k210-soc/rootfs_overlay/init
new file mode 120000
index 0000000000..a0b71977c0
--- /dev/null
+++ b/board/canaan/k210-soc/rootfs_overlay/init
@@ -0,0 +1 @@
+/sbin/init
\ No newline at end of file
diff --git a/board/canaan/k210-soc/rootfs_overlay/sbin/init b/board/canaan/k210-soc/rootfs_overlay/sbin/init
new file mode 100755
index 0000000000..d4bf53d452
--- /dev/null
+++ b/board/canaan/k210-soc/rootfs_overlay/sbin/init
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+# This script replaces the default busybox init process to avoid having that
+# process staying alive and sleeping in the background, (uselessly) consuming
+# precious memory.
+
+# Mount procfs and sysfs
+/bin/mount -t proc proc /proc
+/bin/mount -t sysfs sysfs /sys
+
+# When the kernel is directly booted, devtmpfs is not automatically mounted.
+# Manually mount it if needed.
+devmnt=$(mount | grep -c devtmpfs)
+if [ ${devmnt} -eq 0 ]; then
+    /bin/mount -t devtmpfs devtmpfs /dev
+fi
+
+# Use the /dev/console device node from devtmpfs if possible to not
+# confuse glibc's ttyname_r().
+# This may fail (E.G. booted with console=), and errors from exec will
+# terminate the shell, so use a subshell for the test
+if (exec 0</dev/console) 2>/dev/null; then
+    exec 0</dev/console
+    exec 1>/dev/console
+    exec 2>/dev/console
+fi
+
+# Clear memory to reduce page fragmentation
+echo 3 > /proc/sys/vm/drop_caches
+
+# Print a fun logo :)
+echo "          __  _"
+echo "         / / (_) ____   _   _ __  __"
+echo "        / /  | ||  _ \\ | | | |\\ \\/ /"
+echo "       / /___| || | | || |_| | >  < "
+echo "      /_____/|_||_| |_| \\____|/_/\\_\\"
+echo "    64-bits RISC-V Kendryte K210 NOMMU"
+echo ""
+
+# Finally, let's start an interactive shell
+exec /bin/sh
diff --git a/board/canaan/k210-soc/uboot.config b/board/canaan/k210-soc/uboot.config
new file mode 100644
index 0000000000..159085f802
--- /dev/null
+++ b/board/canaan/k210-soc/uboot.config
@@ -0,0 +1 @@
+# CONFIG_WATCHDOG_AUTOSTART is not set
-- 
2.36.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v3 3/7] board: Add Sipeed MAIX-Bit board support
  2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 1/7] package/elf2flt: Remove Config.in.host Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 2/7] board: Add common support for Canaan K210 SoC-based boards Damien Le Moal via buildroot
@ 2022-05-31  5:49 ` Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 4/7] board: Add Sipeed MAIXDUINO " Damien Le Moal via buildroot
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-05-31  5:49 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

Add two buildroot configuration files to build a minimal Linux
environment for the Sipeed MAIX Bit board. The configurations are:
* sipeed_maix_bit_defconfig: Build a bootable kernel image with an
  embedded initramfs root file system. The image built can be flashed to
  the board as is and does not require a boot loader. This configuration
  uses the tiny busybox configuration defined in
  board/canaan/k210-soc/busybox-tiny.config.
* sipeed_maix_bit_sdcard_defconfig: Build a kernel image with a root
  file system on the SD card and using U-Boot as the boot loader. This
  uses the default busybox minimal configuration.

Both configurations also enable the python-kflash and pyserial-miniterm
host tools for flashing image files to the board and opening a terminal
console.

The readme.txt file documents how to build and boot the Sipeed MAIX-Bit
board with these configurations.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 DEVELOPERS                               |   3 +
 board/sipeed/maix-bit/linux-cpio.config  |   2 +
 board/sipeed/maix-bit/readme.txt         | 316 +++++++++++++++++++++++
 configs/sipeed_maix_bit_defconfig        |  39 +++
 configs/sipeed_maix_bit_sdcard_defconfig |  57 ++++
 5 files changed, 417 insertions(+)
 create mode 100644 board/sipeed/maix-bit/linux-cpio.config
 create mode 100644 board/sipeed/maix-bit/readme.txt
 create mode 100644 configs/sipeed_maix_bit_defconfig
 create mode 100644 configs/sipeed_maix_bit_sdcard_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index 972c5de380..3a5671e45b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -633,6 +633,9 @@ F:	package/log4cpp/
 N:	Damien Le Moal <damien.lemoal@wdc.com>
 F:	package/python-kflash/
 F:	board/canaan/
+F:	board/sipeed/
+F:	configs/sipeed_maix_bit_defconfig
+F:	configs/sipeed_maix_bit_sdcard_defconfig
 
 N:	Daniel Nicoletti <dantti12@gmail.com>
 F:	package/cutelyst/
diff --git a/board/sipeed/maix-bit/linux-cpio.config b/board/sipeed/maix-bit/linux-cpio.config
new file mode 100644
index 0000000000..de2f8fd074
--- /dev/null
+++ b/board/sipeed/maix-bit/linux-cpio.config
@@ -0,0 +1,2 @@
+CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y
+CONFIG_SOC_CANAAN_K210_DTB_SOURCE="sipeed_maix_bit"
diff --git a/board/sipeed/maix-bit/readme.txt b/board/sipeed/maix-bit/readme.txt
new file mode 100644
index 0000000000..7cc53bca67
--- /dev/null
+++ b/board/sipeed/maix-bit/readme.txt
@@ -0,0 +1,316 @@
+Sipeed MAIX-Bit Board
+=====================
+
+The Sipeed MAXI-Bit board is a dual-core RISC-V 64-bits board based on the
+Canaan Kendryte K210 SoC.
+
+Prerequisite
+------------
+
+In order to use the kflash utility to program this board, the user must have
+access to the board USB serial device file. The simplest way to do this is to
+add your user to the same group as this device file. Assume the device file is
+/dev/ttyUSB0, first identify the device group name. In most cases, it is
+either "dialout" or "uucp". Also verify that read-write access is enabled for
+the group:
+
+```
+$ ls -l /dev/ttyUSB0
+crw-rw---- 1 root dialout 188, 0 May 26 13:48 /dev/ttyUSB0
+```
+
+Then add yourself to that group (dialout in this example):
+
+```
+$ sudo usermod -a -G dialout $(whoami)
+```
+
+To enable the above, it is sometimes necessary to logout and login again.
+
+Buildroot Configuration
+-----------------------
+
+Two buildroot configuration files are provided:
+
+(1) Direct Linux Kernel Boot
+
+This is defined by the sipeed_maix_bit_defconfig configuration. This
+configuration allows building a bootable kernel image with a built-in initramfs
+root file system (the board SD card is not used). The built kernel image can be
+flashed directly to the board ROM for direct booting. No boot loader is
+required.
+
+(2) U-Boot SD-Card Boot
+
+The sipeed_maix_bit_sdcard_defconfig configuration allows building a kernel
+image with the root file system on the board SD card. U-Boot is used as the
+boot loader.
+
+Both configuration files will also compile and install the kflash and
+pyserial-miniterm host utilities to program bootable image files to the board
+and open a serial terminal console.
+
+Direct Linux Kernel Boot
+-------------------------
+
+Using the sipeed_maix_bit_defconfig configuration, the bootable kernel binary
+image is built as follows.
+
+```
+$ make sipeed_maix_bit_defconfig
+$ make
+```
+
+The bootable binary image is the output/images/loader.bin file. This image file
+can be written to the board boot ROM using the kflash utility.
+
+```
+$ output/host/bin/kflash -b 1500000 -p /dev/ttyUSB0 -t output/images/loader.bin
+```
+
+Once the kernel image file is fully programmed, a terminal console is open and
+the board can be rebooted by pressing the reset button on the board (if it does
+not reboot automatically).
+
+The output will be similar to the following.
+
+```
+[    0.000000] Linux version 5.18.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-560-g6a2b542a09-dirty) 10.3.0, GNU ld (GNU Binutils) 2.32) #2 SMP Thu Apr 21 14:30:02 JST 2022
+[    0.000000] Machine model: SiPeed MAIX BiT
+[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+[    0.000000] printk: bootconsole [sifive0] enabled
+[    0.000000] Zone ranges:
+[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000]   Normal   empty
+[    0.000000] Movable zone start for each node
+[    0.000000] Early memory node ranges
+[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] riscv: ISA extensions acdfim
+[    0.000000] riscv: ELF capabilities acdfim
+[    0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0
+[    0.000000] percpu: Embedded 11 pages/cpu s15264 r0 d29792 u45056
+[    0.000000] percpu: wasting 10 pages per chunk
+[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
+[    0.000000] Kernel command line: earlycon console=ttySIF0
+[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+[    0.000000] Memory: 5996K/8192K available (964K kernel code, 137K rwdata, 205K rodata, 530K init, 66K bss, 2196K reserved, 0K cma-reserved)
+[    0.000000] rcu: Hierarchical RCU implementation.
+[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+[    0.000000] riscv-intc: 64 local interrupts mapped
+[    0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts.
+[    0.000000] k210-clk: clock-controller: CPU running at 390 MHz
+[    0.000000] clint: timer@2000000: timer running at 7800000 Hz
+[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+[    0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+[    0.008188] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+[    0.018250] pid_max: default: 4096 minimum: 301
+[    0.022860] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.029972] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.040244] rcu: Hierarchical SRCU implementation.
+[    0.045121] smp: Bringing up secondary CPUs ...
+[    0.050225] smp: Brought up 1 node, 2 CPUs
+[    0.054355] devtmpfs: initialized
+[    0.071168] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+[    0.080240] pinctrl core: initialized pinctrl subsystem
+[    0.119221] clocksource: Switched to clocksource clint_clocksource
+[    0.131498] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+[    0.176943] k210-sysctl 50440000.syscon: K210 system controller
+[    0.193558] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+[    0.201526] cacheinfo: Unable to detect cache hierarchy for CPU 0
+[    0.211611] i2c_dev: i2c /dev entries driver
+[    0.221375] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+[    0.233591] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+[    0.242529] printk: console [ttySIF0] enabled
+[    0.242529] printk: console [ttySIF0] enabled
+[    0.251165] printk: bootconsole [sifive0] disabled
+[    0.251165] printk: bootconsole [sifive0] disabled
+[    0.274348] Freeing unused kernel image (initmem) memory: 524K
+[    0.279504] This architecture does not have kernel memory protection.
+[    0.285908] Run /init as init process
+          __  _
+         / / (_) ____   _   _ __  __
+        / /  | ||  _ \ | | | |\ \/ /
+       / /___| || | | || |_| | >  <
+      /_____/|_||_| |_| \____|/_/\_\
+    64-bits RISC-V Kendryte K210 NOMMU
+
+/ #
+```
+
+To open a terminal console without re-flashing the board, the pyserial-miniterm
+host tool can be used.
+
+```
+$ output/host/bin/pyserial-miniterm --raw --eol=LF /dev/ttyUSB0 115200
+```
+
+The options "--raw" and "--eol=LF" are added here to avoid a double carriage
+return each time a command is entered.
+
+
+U-Boot SD-Card Boot
+-------------------
+
+The build procedure is similar to the direct Linux kernel boot case.
+
+```
+$ make sipeed_maix_bit_sdcard_defconfig
+$ make
+```
+
+The build process will generate two files under the output/images directory.
+
+* sdcard.img: The image file for the SD card filesystem. This image has 2
+  partitions. The first partition is a vfat partition containing the kernel
+  uImage and the board device tree binary. The second partition is the root
+  filesystem with busybox installed. The second partition is formatted using
+  ext2 (rev1).
+
+* uboot.bin: U-Boot bootable binary to load and boot the kernel from the SD
+  card.
+
+The SD card can be prepared by writing the sdcard.img file, as follows.
+
+```
+$ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+$ sync
+$ eject /dev/sdX
+```
+
+Where /dev/sdX is the device file name of the SD card. Once completed, the SD
+card can be inserted into the board and the U-Boot binary image written to the
+board boot flash using the kflash utility.
+
+```
+$ output/host/bin/kflash -b 1500000 -p /dev/ttyUSB0 -t output/images/u-boot.bin
+```
+
+The above command will program U-Boot image to the board boot ROM and open a
+terminal console once the u-boot.bin file is fully programmed. Reboot into the
+newly programmed environment by pressing the board reset button.
+
+The output will be similar to the following.
+
+```
+U-Boot 2022.04 (May 24 2022 - 17:08:34 +0900)
+
+DRAM:  8 MiB
+Core:  34 devices, 17 uclasses, devicetree: separate
+WDT:   Not starting watchdog@50400000
+MMC:   spi@53000000:slot@0: 0
+Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
+*** Warning - bad CRC, using default environment
+
+In:    serial@38000000
+Out:   serial@38000000
+Err:   serial@38000000
+Hit any key to stop autoboot:  0
+1668562 bytes read in 933 ms (1.7 MiB/s)
+10468 bytes read in 11 ms (928.7 KiB/s)
+## Booting kernel from Legacy Image at 80060000 ...
+   Image Name:   Linux
+   Image Type:   RISC-V Linux Kernel Image (uncompressed)
+   Data Size:    1668498 Bytes = 1.6 MiB
+   Load Address: 80000000
+   Entry Point:  80000000
+   Verifying Checksum ... OK
+## Flattened Device Tree blob at 80400000
+   Booting using the fdt blob at 0x80400000
+   Loading Kernel Image
+   Loading Device Tree to 00000000803fa000, end 00000000803ff8e3 ... OK
+
+Starting kernel ...
+
+[    0.000000] Linux version 5.18.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-1056-gc356b62332) 10.3.0, GNU ld (GNU Binutils) 2.37) #1 SMP Tue May 24 06:45:04 JST 2022
+[    0.000000] Machine model: SiPeed MAIX BiT
+[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+[    0.000000] printk: bootconsole [sifive0] enabled
+[    0.000000] Zone ranges:
+[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000]   Normal   empty
+[    0.000000] Movable zone start for each node
+[    0.000000] Early memory node ranges
+[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] riscv: base ISA extensions acdfim
+[    0.000000] riscv: ELF capabilities acdfim
+[    0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0
+[    0.000000] percpu: Embedded 11 pages/cpu s15648 r0 d29408 u45056
+[    0.000000] percpu: wasting 10 pages per chunk
+[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
+[    0.000000] Kernel command line: earlycon console=ttySIF0 root=/dev/mmcblk0p2 rootwait ro
+[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+[    0.000000] Memory: 6204K/8192K available (1134K kernel code, 150K rwdata, 239K rodata, 100K init, 68K bss, 1988K reserved, 0K cma-reserved)
+[    0.000000] rcu: Hierarchical RCU implementation.
+[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+[    0.000000] riscv-intc: 64 local interrupts mapped
+[    0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts.
+[    0.000000] k210-clk: clock-controller: CPU running at 390 MHz
+[    0.000000] clint: timer@2000000: timer running at 7800000 Hz
+[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+[    0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+[    0.008194] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+[    0.018257] pid_max: default: 4096 minimum: 301
+[    0.022869] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.029982] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.040424] rcu: Hierarchical SRCU implementation.
+[    0.045397] smp: Bringing up secondary CPUs ...
+[    0.050518] smp: Brought up 1 node, 2 CPUs
+[    0.054676] devtmpfs: initialized
+[    0.072365] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+[    0.081396] pinctrl core: initialized pinctrl subsystem
+[    0.123762] clocksource: Switched to clocksource clint_clocksource
+[    0.136796] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+[    0.181768] k210-sysctl 50440000.syscon: K210 system controller
+[    0.198397] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+[    0.207373] cacheinfo: Unable to detect cache hierarchy for CPU 0
+[    0.218270] spi spi1.0: setup: ignoring unsupported mode bits a00
+[    0.224786] i2c_dev: i2c /dev entries driver
+[    0.235984] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+[    0.249172] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+[    0.258078] printk: console [ttySIF0] enabled
+[    0.258078] printk: console [ttySIF0] enabled
+[    0.266707] printk: bootconsole [sifive0] disabled
+[    0.266707] printk: bootconsole [sifive0] disabled
+[    0.307910] mmc_spi spi3.0: SD/MMC host mmc0, no WP, no poweroff, cd polling
+[    0.319869] Waiting for root device /dev/mmcblk0p2...
+[    0.345016] mmc0: host does not support reading read-only switch, assuming write-enable
+[    0.352330] mmc0: new SDHC card on SPI
+[    0.359338] mmcblk0: mmc0:0000 SA16G 14.5 GiB
+[    0.367589] random: fast init done
+[    0.371533]  mmcblk0: p1 p2
+[    0.391794] random: get_random_bytes called from 0x0000000080095ae8 with crng_init=1
+[    0.393388] VFS: Mounted root (ext2 filesystem) readonly on device 179:2.
+[    0.411377] devtmpfs: mounted
+[    0.413922] Freeing unused kernel image (initmem) memory: 96K
+[    0.419344] This architecture does not have kernel memory protection.
+[    0.425777] Run /sbin/init as init process
+[    0.718314] random: crng init done
+[    0.799903] init (1): drop_caches: 3
+          __  _
+         / / (_) ____   _   _ __  __
+        / /  | ||  _ \ | | | |\ \/ /
+       / /___| || | | || |_| | >  <
+      /_____/|_||_| |_| \____|/_/\_\
+    64-bits RISC-V Kendryte K210 NOMMU
+
+/ #
+```
+
+Of note is that the kernel mounts the SD card as read-only by default to avoid
+corruptions of the ext2 root file system when the board is powered down. This
+is recommended as this board does not support clean shutdown or halt.
+
+Similarly to the initramfs build case, a console can be open without
+re-flashing the board using the host tool pyserial-miniterm.
+
+```
+$ output/host/bin/pyserial-miniterm --raw --eol=LF /dev/ttyUSB0 115200
+```
diff --git a/configs/sipeed_maix_bit_defconfig b/configs/sipeed_maix_bit_defconfig
new file mode 100644
index 0000000000..dbc5af4e74
--- /dev/null
+++ b/configs/sipeed_maix_bit_defconfig
@@ -0,0 +1,39 @@
+# Architecture
+BR2_riscv=y
+BR2_RISCV_64=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_ABI_LP64D=y
+
+# Patches
+BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
+
+# Binary format
+# BR2_USE_MMU is not set
+BR2_BINFMT_FLAT=y
+BR2_BINFMT_FLAT_ONE=y
+# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.18"
+BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maix-bit/linux-cpio.config"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin"
+
+# Packages
+BR2_PACKAGE_HOST_PYTHON_KFLASH=y
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/busybox-tiny.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# Filesystem
+BR2_INIT_NONE=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_ROOTFS_OVERLAY="board/canaan/k210-soc/rootfs_overlay"
diff --git a/configs/sipeed_maix_bit_sdcard_defconfig b/configs/sipeed_maix_bit_sdcard_defconfig
new file mode 100644
index 0000000000..9f1c3a305f
--- /dev/null
+++ b/configs/sipeed_maix_bit_sdcard_defconfig
@@ -0,0 +1,57 @@
+# Architecture
+BR2_riscv=y
+BR2_RISCV_64=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_ABI_LP64D=y
+
+# Patches
+BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
+
+# System
+# BR2_USE_MMU is not set
+BR2_BINFMT_FLAT=y
+BR2_BINFMT_FLAT_ONE=y
+# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.18"
+BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210_sdcard"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/linux-sdcard.config"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="canaan/sipeed_maix_bit"
+
+# Packages
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# Filesystem
+BR2_INIT_NONE=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE=64M
+BR2_ROOTFS_OVERLAY="board/canaan/k210-soc/rootfs_overlay"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/canaan/k210-soc/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/canaan/k210-soc/genimage.cfg"
+
+# Bootloader and related host tools
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.04"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/uboot.config"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sipeed_maix_bitm"
+BR2_TARGET_UBOOT_FORMAT_BIN=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_PYTHON_KFLASH=y
-- 
2.36.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v3 4/7] board: Add Sipeed MAIXDUINO board support
  2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
                   ` (2 preceding siblings ...)
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 3/7] board: Add Sipeed MAIX-Bit board support Damien Le Moal via buildroot
@ 2022-05-31  5:49 ` Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 5/7] board: Add Sipeed MAIX-Dock " Damien Le Moal via buildroot
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-05-31  5:49 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

Add two buildroot configuration files to build a minimal Linux
environment for the Sipeed MAIXDUINO board. The configurations are:
* sipeed_maixduino_defconfig: Build a bootable kernel image with an
  embedded initramfs root file system. The image built can be flashed to
  the board as is and does not require a boot loader. This configuration
  uses the tiny busybox configuration defined in
  board/canaan/k210-soc/busybox-tiny.config.
* sipeed_maixduino_sdcard_defconfig: Build a kernel image with a root
  file system on the SD card and using U-Boot as the boot loader. This
  uses the default busybox minimal configuration.

Both configurations also enable the kflash and pyserial-miniterm host
tools for flashing image files to the board and opening a terminal
console.

The readme.txt file documents how to build and boot the Sipeed MAIXDUINO
board with these configurations.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 DEVELOPERS                                |   2 +
 board/sipeed/maixduino/linux-cpio.config  |   2 +
 board/sipeed/maixduino/readme.txt         | 292 ++++++++++++++++++++++
 configs/sipeed_maixduino_defconfig        |  39 +++
 configs/sipeed_maixduino_sdcard_defconfig |  57 +++++
 5 files changed, 392 insertions(+)
 create mode 100644 board/sipeed/maixduino/linux-cpio.config
 create mode 100644 board/sipeed/maixduino/readme.txt
 create mode 100644 configs/sipeed_maixduino_defconfig
 create mode 100644 configs/sipeed_maixduino_sdcard_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index 3a5671e45b..802e5cdbcb 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -636,6 +636,8 @@ F:	board/canaan/
 F:	board/sipeed/
 F:	configs/sipeed_maix_bit_defconfig
 F:	configs/sipeed_maix_bit_sdcard_defconfig
+F:	configs/sipeed_maixduino_defconfig
+F:	configs/sipeed_maixduino_sdcard_defconfig
 
 N:	Daniel Nicoletti <dantti12@gmail.com>
 F:	package/cutelyst/
diff --git a/board/sipeed/maixduino/linux-cpio.config b/board/sipeed/maixduino/linux-cpio.config
new file mode 100644
index 0000000000..049a2550c5
--- /dev/null
+++ b/board/sipeed/maixduino/linux-cpio.config
@@ -0,0 +1,2 @@
+CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y
+CONFIG_SOC_CANAAN_K210_DTB_SOURCE="sipeed_maixduino"
diff --git a/board/sipeed/maixduino/readme.txt b/board/sipeed/maixduino/readme.txt
new file mode 100644
index 0000000000..53a9e5c2ac
--- /dev/null
+++ b/board/sipeed/maixduino/readme.txt
@@ -0,0 +1,292 @@
+Sipeed MAIXDUINO Board
+======================
+
+The Sipeed MAIXDUINO board is a dual-core RISC-V 64-bits board based on the
+Canaan Kendryte K210 SoC. This board has the same form factor as the Arduino
+UNO board.
+
+Prerequisite
+------------
+
+In order to use the kflash utility to program this board, the user must have
+access to the board USB serial device file. The simplest way to do this is to
+add your user to the same group as this device file. Assume the device file is
+/dev/ttyUSB0, first identify the device group name. In most cases, it is
+either "dialout" or "uucp". Also verify that read-write access is enabled for
+the group:
+
+```
+$ ls -l /dev/ttyUSB0
+crw-rw---- 1 root dialout 188, 0 May 26 13:48 /dev/ttyUSB0
+```
+
+Then add yourself to that group (dialout in this example):
+
+```
+$ sudo usermod -a -G dialout $(whoami)
+```
+
+To enable the above, it is sometimes necessary to logout and login again.
+
+Buildroot Configuration
+-----------------------
+
+Two buildroot configurations are provided:
+
+(1) Direct Linux Kernel Boot
+
+This is defined by the sipeed_maixduino_defconfig configuration. This
+configuration allows building a bootable kernel image with a built-in initramfs
+root file system (the board SD card is not used). The built kernel image can be
+flashed directly to the board ROM for direct booting. No boot loader is
+required.
+
+(2) U-Boot SD-Card Boot
+
+The sipeed_maixduino_sdcard_defconfig configuration allows building a kernel
+image with the root file system on the board SD card. U-Boot is used as the
+boot loader.
+
+Note: U-Boot does not natively support the Sipeed MAIXDUINO board. However, the
+board and device tree differences with the Sipeed MAIX-bit board are small
+enough for U-Boot to work.
+
+Both configuration files will also compile and install the kflash and
+pyserial-miniterm host utilities to program bootable image files to the board
+and open a serial terminal console.
+
+Direct Linux Kernel Boot
+------------------------
+
+Using the sipeed_maixduino_defconfig configuration, the bootable kernel binary
+image is built as follows.
+
+```
+$ make sipeed_maixduino_defconfig
+$ make
+```
+
+The bootable binary image is the output/images/loader.bin file. This image file
+can be written to the board boot flash using the kflash utility.
+
+```
+$ output/host/bin/kflash -b 1500000 -p /dev/ttyUSB0 -t output/images/loader.bin
+```
+
+Once the kernel image file is fully programmed, a terminal console is open and
+the board can be rebooted by pressing the reset button on the board (if it does
+not reboot automatically).
+
+The output will be similar to the following.
+
+```
+[    0.000000] Linux version 5.18.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-560-g6a2b542a09-dirty) 10.3.0, GNU ld (GNU Binutils) 2.32) #2 SMP Thu Apr 21 15:16:00 JST 2022
+[    0.000000] Machine model: SiPeed MAIXDUINO
+[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+[    0.000000] printk: bootconsole [sifive0] enabled
+[    0.000000] Zone ranges:
+[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000]   Normal   empty
+[    0.000000] Movable zone start for each node
+[    0.000000] Early memory node ranges
+[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] riscv: ISA extensions acdfim
+[    0.000000] riscv: ELF capabilities acdfim
+[    0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0
+[    0.000000] percpu: Embedded 11 pages/cpu s15264 r0 d29792 u45056
+[    0.000000] percpu: wasting 10 pages per chunk
+[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
+[    0.000000] Kernel command line: earlycon console=ttySIF0
+[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+[    0.000000] Memory: 6000K/8192K available (964K kernel code, 137K rwdata, 205K rodata, 530K init, 66K bss, 2192K reserved, 0K cma-reserved)
+[    0.000000] rcu: Hierarchical RCU implementation.
+[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+[    0.000000] riscv-intc: 64 local interrupts mapped
+[    0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts.
+[    0.000000] k210-clk: clock-controller: CPU running at 390 MHz
+[    0.000000] clint: timer@2000000: timer running at 7800000 Hz
+[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+[    0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+[    0.008183] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+[    0.018249] pid_max: default: 4096 minimum: 301
+[    0.022860] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.029971] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.040242] rcu: Hierarchical SRCU implementation.
+[    0.045124] smp: Bringing up secondary CPUs ...
+[    0.050217] smp: Brought up 1 node, 2 CPUs
+[    0.054346] devtmpfs: initialized
+[    0.070924] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+[    0.079996] pinctrl core: initialized pinctrl subsystem
+[    0.119893] clocksource: Switched to clocksource clint_clocksource
+[    0.131992] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+[    0.179099] k210-sysctl 50440000.syscon: K210 system controller
+[    0.194904] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+[    0.203108] cacheinfo: Unable to detect cache hierarchy for CPU 0
+[    0.213867] i2c_dev: i2c /dev entries driver
+[    0.223397] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+[    0.235632] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+[    0.244585] printk: console [ttySIF0] enabled
+[    0.244585] printk: console [ttySIF0] enabled
+[    0.253190] printk: bootconsole [sifive0] disabled
+[    0.253190] printk: bootconsole [sifive0] disabled
+[    0.264820] panel@0 enforce active low on chipselect handle
+[    0.281482] Freeing unused kernel image (initmem) memory: 524K
+[    0.286621] This architecture does not have kernel memory protection.
+[    0.293047] Run /init as init process
+          __  _
+         / / (_) ____   _   _ __  __
+        / /  | ||  _ \ | | | |\ \/ /
+       / /___| || | | || |_| | >  <
+      /_____/|_||_| |_| \____|/_/\_\
+    64-bits RISC-V Kendryte K210 NOMMU
+
+/ #
+```
+
+To open a terminal console without re-flashing the board, the pyserial-miniterm
+host tool can be used.
+
+```
+$ output/host/bin/pyserial-miniterm --raw --eol=LF /dev/ttyUSB0 115200
+```
+
+The options "--raw" and "--eol=LF" are added here to avoid a double carriage
+return each time a command is entered.
+
+
+U-Boot SD-Card Boot
+-------------------
+
+The build procedure is similar to the built-in initramfs case.
+
+```
+$ make sipeed_maixduino_sdcard_defconfig
+$ make
+```
+
+The build process will generate two files under the output/images directory.
+
+* sdcard.img: The image file for the SD card filesystem. This image has 2
+  partitions. The first partition is a vfat partition containing the kernel
+  uImage and the board device tree binary. The second partition is the root
+  filesystem with busybox installed. The second partition is formatted using
+  ext2 (rev1).
+
+* uboot.bin: U-Boot bootable binary to load and boot the kernel from the SD
+  card.
+
+The SD card can be prepared by writing the sdcard.img file, as follows.
+
+```
+$ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+$ sync
+$ eject /dev/sdX
+```
+
+Where /dev/sdX is the device file name of the SD card. Once completed, the SD
+card can be inserted into the board and the U-Boot binary image written to the
+board boot flash using the kflash utility.
+
+```
+$ output/host/bin/kflash -b 1500000 -p /dev/ttyUSB0 -t output/images/u-boot.bin
+```
+
+The above command will program U-Boot image to the board boot ROM and open a
+terminal console once the u-boot.bin file is fully programmed. Reboot into the
+newly programmed environment by pressing the board reset button.
+
+The output will be similar to the following.
+
+```
+[    0.000000] Linux version 5.18.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-560-g6a2b542a09-dirty) 10.3.0, GNU ld (GNU Binutils) 2.32) #1 SMP Thu Apr 21 15:30:18 JST 2022
+[    0.000000] Machine model: SiPeed MAIXDUINO
+[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+[    0.000000] printk: bootconsole [sifive0] enabled
+[    0.000000] Zone ranges:
+[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000]   Normal   empty
+[    0.000000] Movable zone start for each node
+[    0.000000] Early memory node ranges
+[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] riscv: ISA extensions acdfim
+[    0.000000] riscv: ELF capabilities acdfim
+[    0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0
+[    0.000000] percpu: Embedded 11 pages/cpu s15392 r0 d29664 u45056
+[    0.000000] percpu: wasting 10 pages per chunk
+[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
+[    0.000000] Kernel command line: earlycon console=ttySIF0 root=/dev/mmcblk0p2 rootwait ro
+[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+[    0.000000] Memory: 6156K/8192K available (1180K kernel code, 151K rwdata, 239K rodata, 102K init, 69K bss, 2036K reserved, 0K cma-reserved)
+[    0.000000] rcu: Hierarchical RCU implementation.
+[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+[    0.000000] riscv-intc: 64 local interrupts mapped
+[    0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts.
+[    0.000000] k210-clk: clock-controller: CPU running at 390 MHz
+[    0.000000] clint: timer@2000000: timer running at 7800000 Hz
+[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+[    0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+[    0.008191] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+[    0.018255] pid_max: default: 4096 minimum: 301
+[    0.022876] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.029982] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.040417] rcu: Hierarchical SRCU implementation.
+[    0.045397] smp: Bringing up secondary CPUs ...
+[    0.050513] smp: Brought up 1 node, 2 CPUs
+[    0.054680] devtmpfs: initialized
+[    0.072127] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+[    0.081205] pinctrl core: initialized pinctrl subsystem
+[    0.125074] clocksource: Switched to clocksource clint_clocksource
+[    0.138311] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+[    0.183471] k210-sysctl 50440000.syscon: K210 system controller
+[    0.199873] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+[    0.208858] cacheinfo: Unable to detect cache hierarchy for CPU 0
+[    0.221586] i2c_dev: i2c /dev entries driver
+[    0.232786] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+[    0.246572] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+[    0.255508] printk: console [ttySIF0] enabled
+[    0.255508] printk: console [ttySIF0] enabled
+[    0.264137] printk: bootconsole [sifive0] disabled
+[    0.264137] printk: bootconsole [sifive0] disabled
+[    0.275560] panel@0 enforce active low on chipselect handle
+[    0.313245] mmc_spi spi3.0: SD/MMC host mmc0, no WP, no poweroff, cd polling
+[    0.322845] Waiting for root device /dev/mmcblk0p2...
+[    0.345869] mmc0: host does not support reading read-only switch, assuming write-enable
+[    0.353221] mmc0: new SDHC card on SPI
+[    0.360233] mmcblk0: mmc0:0000 SA16G 14.5 GiB
+[    0.368350] random: fast init done
+[    0.372926]  mmcblk0: p1 p2
+[    0.391887] random: get_random_bytes called from 0x000000008009b7d2 with crng_init=1
+[    0.400427] VFS: Mounted root (ext2 filesystem) readonly on device 179:2.
+[    0.410128] devtmpfs: mounted
+[    0.412628] Freeing unused kernel image (initmem) memory: 96K
+[    0.418137] This architecture does not have kernel memory protection.
+[    0.424530] Run /sbin/init as init process
+[    0.563384] random: crng init done
+          __  _
+         / / (_) ____   _   _ __  __
+        / /  | ||  _ \ | | | |\ \/ /
+       / /___| || | | || |_| | >  <
+      /_____/|_||_| |_| \____|/_/\_\
+    64-bits RISC-V Kendryte K210 NOMMU
+
+/ #
+```
+
+Of note is that the kernel mounts the SD card as read-only by default to avoid
+corruptions of the ext2 root file system when the board is powered down. This
+is recommended as this board does not support clean shutdown or halt.
+
+Similarly to the initramfs build case, a console can be open without
+re-flashing the board using the host tool pyserial-miniterm.
+
+```
+$ output/host/bin/pyserial-miniterm --raw --eol=LF /dev/ttyUSB0 115200
+```
diff --git a/configs/sipeed_maixduino_defconfig b/configs/sipeed_maixduino_defconfig
new file mode 100644
index 0000000000..a581ecbea5
--- /dev/null
+++ b/configs/sipeed_maixduino_defconfig
@@ -0,0 +1,39 @@
+# Architecture
+BR2_riscv=y
+BR2_RISCV_64=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_ABI_LP64D=y
+
+# Patches
+BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
+
+# Binary format
+# BR2_USE_MMU is not set
+BR2_BINFMT_FLAT=y
+BR2_BINFMT_FLAT_ONE=y
+# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.18"
+BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maixduino/linux-cpio.config"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin"
+
+# Packages
+BR2_PACKAGE_HOST_PYTHON_KFLASH=y
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/busybox-tiny.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# Filesystem
+BR2_INIT_NONE=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_ROOTFS_OVERLAY="board/canaan/k210-soc/rootfs_overlay"
diff --git a/configs/sipeed_maixduino_sdcard_defconfig b/configs/sipeed_maixduino_sdcard_defconfig
new file mode 100644
index 0000000000..7e627e5d15
--- /dev/null
+++ b/configs/sipeed_maixduino_sdcard_defconfig
@@ -0,0 +1,57 @@
+# Architecture
+BR2_riscv=y
+BR2_RISCV_64=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_ABI_LP64D=y
+
+# Patches
+BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
+
+# System
+# BR2_USE_MMU is not set
+BR2_BINFMT_FLAT=y
+BR2_BINFMT_FLAT_ONE=y
+# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.18"
+BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210_sdcard"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/linux-sdcard.config"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="canaan/sipeed_maixduino"
+
+# Packages
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# Filesystem
+BR2_INIT_NONE=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE=64M
+BR2_ROOTFS_OVERLAY="board/canaan/k210-soc/rootfs_overlay"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/canaan/k210-soc/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/canaan/k210-soc/genimage.cfg"
+
+# Bootloader and related host tools
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.04"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/uboot.config"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sipeed_maix_bitm"
+BR2_TARGET_UBOOT_FORMAT_BIN=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_PYTHON_KFLASH=y
-- 
2.36.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v3 5/7] board: Add Sipeed MAIX-Dock board support
  2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
                   ` (3 preceding siblings ...)
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 4/7] board: Add Sipeed MAIXDUINO " Damien Le Moal via buildroot
@ 2022-05-31  5:49 ` Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 6/7] board: Add Sipeed MAIX-Go " Damien Le Moal via buildroot
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-05-31  5:49 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

Add two buildroot configuration files to build a minimal Linux
environment for the Sipeed MAIX-Dock board. The configurations are:
* sipeed_maix_dock_defconfig: Build a bootable kernel image with an
  embedded initramfs root file system. The image built can be flashed to
  the board as is and does not require a boot loader. This configuration
  uses the tiny busybox configuration defined in
  board/canaan/k210-soc/busybox-tiny.config.
* sipeed_maix_dock_sdcard_defconfig: Build a kernel image with a root
  file system on the SD card and using U-Boot as the boot loader. This
  uses the default busybox minimal configuration.

Both configurations also enable the kflash and pyserial-miniterm host
tools for flashing image files to the board and opening a terminal
console.

The readme.txt file documents how to build and boot the Sipeed
MAIX-Dock board with these configurations.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 DEVELOPERS                                |   2 +
 board/sipeed/maix-dock/linux-cpio.config  |   2 +
 board/sipeed/maix-dock/readme.txt         | 321 ++++++++++++++++++++++
 configs/sipeed_maix_dock_defconfig        |  39 +++
 configs/sipeed_maix_dock_sdcard_defconfig |  57 ++++
 5 files changed, 421 insertions(+)
 create mode 100644 board/sipeed/maix-dock/linux-cpio.config
 create mode 100644 board/sipeed/maix-dock/readme.txt
 create mode 100644 configs/sipeed_maix_dock_defconfig
 create mode 100644 configs/sipeed_maix_dock_sdcard_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index 802e5cdbcb..4a25418695 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -638,6 +638,8 @@ F:	configs/sipeed_maix_bit_defconfig
 F:	configs/sipeed_maix_bit_sdcard_defconfig
 F:	configs/sipeed_maixduino_defconfig
 F:	configs/sipeed_maixduino_sdcard_defconfig
+F:	configs/sipeed_maix_dock_defconfig
+F:	configs/sipeed_maix_dock_sdcard_defconfig
 
 N:	Daniel Nicoletti <dantti12@gmail.com>
 F:	package/cutelyst/
diff --git a/board/sipeed/maix-dock/linux-cpio.config b/board/sipeed/maix-dock/linux-cpio.config
new file mode 100644
index 0000000000..b1ca3166f8
--- /dev/null
+++ b/board/sipeed/maix-dock/linux-cpio.config
@@ -0,0 +1,2 @@
+CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y
+CONFIG_SOC_CANAAN_K210_DTB_SOURCE="sipeed_maix_dock"
diff --git a/board/sipeed/maix-dock/readme.txt b/board/sipeed/maix-dock/readme.txt
new file mode 100644
index 0000000000..5971f6e50b
--- /dev/null
+++ b/board/sipeed/maix-dock/readme.txt
@@ -0,0 +1,321 @@
+Sipeed MAIX-Dock Board
+======================
+
+The Sipeed MAXI-Dock board is a dual-core RISC-V 64-bits board based on the
+Canaan Kendryte K210 SoC.
+
+Prerequisite
+------------
+
+In order to use the kflash utility to program this board, the user must have
+access to the board USB serial device file. The simplest way to do this is to
+add your user to the same group as this device file. Assume the device file is
+/dev/ttyUSB0, first identify the device group name. In most cases, it is
+either "dialout" or "uucp". Also verify that read-write access is enabled for
+the group:
+
+```
+$ ls -l /dev/ttyUSB0
+crw-rw---- 1 root dialout 188, 0 May 26 13:48 /dev/ttyUSB0
+```
+
+Then add yourself to that group (dialout in this example):
+
+```
+$ sudo usermod -a -G dialout $(whoami)
+```
+
+To enable the above, it is sometimes necessary to logout and login again.
+
+Buildroot Configuration
+-----------------------
+
+Two buildroot configuration files are provided:
+
+(1) Direct Linux Kernel Boot
+
+This is defined by the sipeed_maix_dock_defconfig configuration. This
+configuration allows building a bootable kernel image with a built-in initramfs
+root file system (the board SD card is not used). The built kernel image can be
+flashed directly to the board ROM for direct booting. No boot loader is
+required.
+
+(2) U-Boot SD-Card Boot
+
+The sipeed_maix_dock_sdcard_defconfig configuration allows building a kernel
+image with the root file system on the board SD card. U-Boot is used as the
+boot loader.
+
+Note: U-Boot does not natively support the Sipeed MAIX-Dock board. However, the
+board and device tree differences with the Sipeed MAIX-Bit board are small
+enough for U-Boot to work.
+
+Both configuration files will also compile the pyserial-miniterm host tool open
+a serial terminal console for the board.
+
+Direct Linux Kernel Boot
+-------------------------
+
+Using the sipeed_maix_dock_defconfig configuration, the bootable kernel binary
+image is built as follows.
+
+```
+$ make sipeed_maix_dock_defconfig
+$ make
+```
+
+Both configuration files will also compile and install the kflash and
+pyserial-miniterm host utilities to program bootable image files to the board
+and open a serial terminal console.
+
+```
+$ output/host/bin/kflash -b 1500000 -p /dev/ttyUSB0 -t output/images/loader.bin
+```
+
+Once the kernel image file is fully programmed, a terminal console is open and
+the board can be rebooted by pressing the reset button on the board (if it does
+not reboot automatically).
+
+The output will be similar to the following.
+
+```
+[    0.000000] Linux version 5.18.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-560-g6a2b542a09-dirty) 10.3.0, GNU ld (GNU Binutils) 2.32) #2 SMP Thu Apr 21 15:47:42 JST 2022
+[    0.000000] Machine model: SiPeed MAIX Dock
+[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+[    0.000000] printk: bootconsole [sifive0] enabled
+[    0.000000] Zone ranges:
+[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000]   Normal   empty
+[    0.000000] Movable zone start for each node
+[    0.000000] Early memory node ranges
+[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] riscv: ISA extensions acdfim
+[    0.000000] riscv: ELF capabilities acdfim
+[    0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0
+[    0.000000] percpu: Embedded 11 pages/cpu s15264 r0 d29792 u45056
+[    0.000000] percpu: wasting 10 pages per chunk
+[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
+[    0.000000] Kernel command line: earlycon console=ttySIF0
+[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+[    0.000000] Memory: 5980K/8192K available (964K kernel code, 137K rwdata, 205K rodata, 546K init, 66K bss, 2212K reserved, 0K cma-reserved)
+[    0.000000] rcu: Hierarchical RCU implementation.
+[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+[    0.000000] riscv-intc: 64 local interrupts mapped
+[    0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts.
+[    0.000000] k210-clk: clock-controller: CPU running at 390 MHz
+[    0.000000] clint: timer@2000000: timer running at 7800000 Hz
+[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+[    0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+[    0.008187] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+[    0.018250] pid_max: default: 4096 minimum: 301
+[    0.022859] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.029971] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.040238] rcu: Hierarchical SRCU implementation.
+[    0.045110] smp: Bringing up secondary CPUs ...
+[    0.050215] smp: Brought up 1 node, 2 CPUs
+[    0.054345] devtmpfs: initialized
+[    0.071112] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+[    0.080182] pinctrl core: initialized pinctrl subsystem
+[    0.120689] clocksource: Switched to clocksource clint_clocksource
+[    0.133165] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+[    0.181750] k210-sysctl 50440000.syscon: K210 system controller
+[    0.198612] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+[    0.206644] cacheinfo: Unable to detect cache hierarchy for CPU 0
+[    0.216569] i2c_dev: i2c /dev entries driver
+[    0.225905] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+[    0.238866] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+[    0.247778] printk: console [ttySIF0] enabled
+[    0.247778] printk: console [ttySIF0] enabled
+[    0.256459] printk: bootconsole [sifive0] disabled
+[    0.256459] printk: bootconsole [sifive0] disabled
+[    0.268225] panel@0 enforce active low on chipselect handle
+[    0.285238] Freeing unused kernel image (initmem) memory: 540K
+[    0.290372] This architecture does not have kernel memory protection.
+[    0.296807] Run /init as init process
+          __  _
+         / / (_) ____   _   _ __  __
+        / /  | ||  _ \ | | | |\ \/ /
+       / /___| || | | || |_| | >  <
+      /_____/|_||_| |_| \____|/_/\_\
+    64-bits RISC-V Kendryte K210 NOMMU
+
+/ #
+```
+
+To open a terminal console without re-flashing the board, the pyserial-miniterm
+host tool can be used.
+
+```
+$ output/host/bin/pyserial-miniterm --raw --eol=LF /dev/ttyUSB0 115200
+```
+
+The options "--raw" and "--eol=LF" are added here to avoid a double carriage
+return each time a command is entered.
+
+
+U-Boot SD-Card Boot
+-------------------
+
+The build procedure is similar to the built-in initramfs case.
+
+```
+$ make sipeed_maix_dock_sdcard_defconfig
+$ make
+```
+
+The build process will generate two files under the output/images directory.
+
+* sdcard.img: The image file for the SD card filesystem. This image has 2
+  partitions. The first partition is a vfat partition containing the kernel
+  uImage and the board device tree binary. The second partition is the root
+  filesystem with busybox installed. The second partition is formatted using
+  ext2 (rev1).
+
+* uboot.bin: U-Boot bootable binary to load and boot the kernel from the SD
+  card.
+
+The SD card can be prepared by writing the sdcard.img file, as follows.
+
+```
+$ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+$ sync
+$ eject /dev/sdX
+```
+
+Where /dev/sdX is the device file name of the SD card. Once completed, the SD
+card can be inserted into the board and the U-Boot binary image written to the
+board boot flash using the kflash utility.
+
+```
+$ output/host/bin/kflash -b 1500000 -p /dev/ttyUSB0 -t output/images/u-boot.bin
+```
+
+The above command will program U-Boot image to the board boot ROM and open a
+terminal console once the u-boot.bin file is fully programmed. Reboot into the
+newly programmed environment by pressing the board reset button if it does not
+reboot automatically.
+
+The output will be similar to the following.
+
+```
+U-Boot 2022.04 (Apr 21 2022 - 15:59:50 +0900)
+
+DRAM:  8 MiB
+Core:  34 devices, 17 uclasses, devicetree: separate
+WDT:   Not starting watchdog@50400000
+MMC:   spi@53000000:slot@0: 0
+Loading Environment from SPIFlash... SF: Detected w25q128fw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
+*** Warning - bad CRC, using default environment
+
+In:    serial@38000000
+Out:   serial@38000000
+Err:   serial@38000000
+Hit any key to stop autoboot:  0
+1717730 bytes read in 957 ms (1.7 MiB/s)
+10382 bytes read in 11 ms (920.9 KiB/s)
+## Booting kernel from Legacy Image at 80060000 ...
+   Image Name:   Linux
+   Image Type:   RISC-V Linux Kernel Image (uncompressed)
+   Data Size:    1717666 Bytes = 1.6 MiB
+   Load Address: 80000000
+   Entry Point:  80000000
+   Verifying Checksum ... OK
+## Flattened Device Tree blob at 80400000
+   Booting using the fdt blob at 0x80400000
+   Loading Kernel Image
+   Loading Device Tree to 00000000803fa000, end 00000000803ff88d ... OK
+
+Starting kernel ...
+
+[    0.000000] Linux version 5.18.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-560-g6a2b542a09-dirty) 10.3.0, GNU ld (GNU Binutils) 2.32) #1 SMP Thu Apr 21 16:00:03 JST 2022
+[    0.000000] Machine model: SiPeed MAIX Dock
+[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+[    0.000000] printk: bootconsole [sifive0] enabled
+[    0.000000] Zone ranges:
+[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000]   Normal   empty
+[    0.000000] Movable zone start for each node
+[    0.000000] Early memory node ranges
+[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] riscv: ISA extensions acdfim
+[    0.000000] riscv: ELF capabilities acdfim
+[    0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0
+[    0.000000] percpu: Embedded 11 pages/cpu s15392 r0 d29664 u45056
+[    0.000000] percpu: wasting 10 pages per chunk
+[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
+[    0.000000] Kernel command line: earlycon console=ttySIF0 root=/dev/mmcblk0p2 rootwait ro
+[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+[    0.000000] Memory: 6156K/8192K available (1180K kernel code, 151K rwdata, 239K rodata, 102K init, 69K bss, 2036K reserved, 0K cma-reserved)
+[    0.000000] rcu: Hierarchical RCU implementation.
+[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+[    0.000000] riscv-intc: 64 local interrupts mapped
+[    0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts.
+[    0.000000] k210-clk: clock-controller: CPU running at 390 MHz
+[    0.000000] clint: timer@2000000: timer running at 7800000 Hz
+[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+[    0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+[    0.008196] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+[    0.018256] pid_max: default: 4096 minimum: 301
+[    0.022876] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.029980] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.040401] rcu: Hierarchical SRCU implementation.
+[    0.045379] smp: Bringing up secondary CPUs ...
+[    0.050494] smp: Brought up 1 node, 2 CPUs
+[    0.054656] devtmpfs: initialized
+[    0.072338] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+[    0.081415] pinctrl core: initialized pinctrl subsystem
+[    0.123902] clocksource: Switched to clocksource clint_clocksource
+[    0.136898] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+[    0.182570] k210-sysctl 50440000.syscon: K210 system controller
+[    0.198158] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+[    0.207473] cacheinfo: Unable to detect cache hierarchy for CPU 0
+[    0.219724] i2c_dev: i2c /dev entries driver
+[    0.230080] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+[    0.243091] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+[    0.252034] printk: console [ttySIF0] enabled
+[    0.252034] printk: console [ttySIF0] enabled
+[    0.260656] printk: bootconsole [sifive0] disabled
+[    0.260656] printk: bootconsole [sifive0] disabled
+[    0.272546] panel@0 enforce active low on chipselect handle
+[    0.308098] mmc_spi spi3.0: SD/MMC host mmc0, no WP, no poweroff, cd polling
+[    0.320197] Waiting for root device /dev/mmcblk0p2...
+[    0.344667] mmc0: host does not support reading read-only switch, assuming write-enable
+[    0.352020] mmc0: new SDHC card on SPI
+[    0.358566] mmcblk0: mmc0:0000 SA16G 14.5 GiB
+[    0.366866] random: fast init done
+[    0.371439]  mmcblk0: p1 p2
+[    0.391314] random: get_random_bytes called from 0x000000008009b7d2 with crng_init=1
+[    0.400977] VFS: Mounted root (ext2 filesystem) readonly on device 179:2.
+[    0.410966] devtmpfs: mounted
+[    0.413521] Freeing unused kernel image (initmem) memory: 96K
+[    0.418944] This architecture does not have kernel memory protection.
+[    0.425370] Run /sbin/init as init process
+[    0.633502] random: crng init done
+          __  _
+         / / (_) ____   _   _ __  __
+        / /  | ||  _ \ | | | |\ \/ /
+       / /___| || | | || |_| | >  <
+      /_____/|_||_| |_| \____|/_/\_\
+    64-bits RISC-V Kendryte K210 NOMMU
+
+/ #
+```
+
+Of note is that the kernel mounts the SD card as read-only by default to avoid
+corruptions of the ext2 root file system when the board is powered down. This
+is recommended as this board does not support clean shutdown or halt.
+
+Similarly to the initramfs build case, a console can be open without
+re-flashing the board using the host tool pyserial-miniterm.
+
+```
+$ output/host/bin/pyserial-miniterm --raw --eol=LF /dev/ttyUSB0 115200
+```
diff --git a/configs/sipeed_maix_dock_defconfig b/configs/sipeed_maix_dock_defconfig
new file mode 100644
index 0000000000..0f30e8d38f
--- /dev/null
+++ b/configs/sipeed_maix_dock_defconfig
@@ -0,0 +1,39 @@
+# Architecture
+BR2_riscv=y
+BR2_RISCV_64=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_ABI_LP64D=y
+
+# Patches
+BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
+
+# Binary format
+# BR2_USE_MMU is not set
+BR2_BINFMT_FLAT=y
+BR2_BINFMT_FLAT_ONE=y
+# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.18"
+BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maix-dock/linux-cpio.config"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin"
+
+# Packages
+BR2_PACKAGE_HOST_PYTHON_KFLASH=y
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/busybox-tiny.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# Filesystem
+BR2_INIT_NONE=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_ROOTFS_OVERLAY="board/canaan/k210-soc/rootfs_overlay"
diff --git a/configs/sipeed_maix_dock_sdcard_defconfig b/configs/sipeed_maix_dock_sdcard_defconfig
new file mode 100644
index 0000000000..fdbca11590
--- /dev/null
+++ b/configs/sipeed_maix_dock_sdcard_defconfig
@@ -0,0 +1,57 @@
+# Architecture
+BR2_riscv=y
+BR2_RISCV_64=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_ABI_LP64D=y
+
+# Patches
+BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
+
+# System
+# BR2_USE_MMU is not set
+BR2_BINFMT_FLAT=y
+BR2_BINFMT_FLAT_ONE=y
+# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.18"
+BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210_sdcard"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/linux-sdcard.config"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="canaan/sipeed_maix_dock"
+
+# Packages
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# Filesystem
+BR2_INIT_NONE=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE=64M
+BR2_ROOTFS_OVERLAY="board/canaan/k210-soc/rootfs_overlay"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/canaan/k210-soc/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/canaan/k210-soc/genimage.cfg"
+
+# Bootloader and related host tools
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.04"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/uboot.config"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sipeed_maix_bitm"
+BR2_TARGET_UBOOT_FORMAT_BIN=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_PYTHON_KFLASH=y
-- 
2.36.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v3 6/7] board: Add Sipeed MAIX-Go board support
  2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
                   ` (4 preceding siblings ...)
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 5/7] board: Add Sipeed MAIX-Dock " Damien Le Moal via buildroot
@ 2022-05-31  5:49 ` Damien Le Moal via buildroot
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 7/7] board: Add Canaan KD233 " Damien Le Moal via buildroot
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-05-31  5:49 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

Add two buildroot configuration files to build a minimal Linux
environment for the Sipeed MAIX Bit board. The configurations are:
* sipeed_maix_go_defconfig: Build a bootable kernel image with an
  embedded initramfs root file system. The image built can be flashed to
  the board as is and does not require a boot loader. This configuration
  uses the tiny busybox configuration defined in
  board/canaan/k210-soc/busybox-tiny.config.
* sipeed_maix_go_sdcard_defconfig: Build a kernel image with a root
  file system on the SD card and using U-Boot as the boot loader. This
  uses the default busybox minimal configuration.

Both configurations also enable the kflash and pyserial-miniterm host
tools for flashing image files to the board and opening a terminal
console.

The readme.txt file documents how to build and boot the Sipeed MAIX-Go
board with these configurations.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 DEVELOPERS                              |   2 +
 board/sipeed/maix-go/linux-cpio.config  |   2 +
 board/sipeed/maix-go/readme.txt         | 320 ++++++++++++++++++++++++
 configs/sipeed_maix_go_defconfig        |  39 +++
 configs/sipeed_maix_go_sdcard_defconfig |  57 +++++
 5 files changed, 420 insertions(+)
 create mode 100644 board/sipeed/maix-go/linux-cpio.config
 create mode 100644 board/sipeed/maix-go/readme.txt
 create mode 100644 configs/sipeed_maix_go_defconfig
 create mode 100644 configs/sipeed_maix_go_sdcard_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index 4a25418695..0116ab0815 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -640,6 +640,8 @@ F:	configs/sipeed_maixduino_defconfig
 F:	configs/sipeed_maixduino_sdcard_defconfig
 F:	configs/sipeed_maix_dock_defconfig
 F:	configs/sipeed_maix_dock_sdcard_defconfig
+F:	configs/sipeed_maix_go_defconfig
+F:	configs/sipeed_maix_go_sdcard_defconfig
 
 N:	Daniel Nicoletti <dantti12@gmail.com>
 F:	package/cutelyst/
diff --git a/board/sipeed/maix-go/linux-cpio.config b/board/sipeed/maix-go/linux-cpio.config
new file mode 100644
index 0000000000..ea8c30e266
--- /dev/null
+++ b/board/sipeed/maix-go/linux-cpio.config
@@ -0,0 +1,2 @@
+CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y
+CONFIG_SOC_CANAAN_K210_DTB_SOURCE="sipeed_maix_go"
diff --git a/board/sipeed/maix-go/readme.txt b/board/sipeed/maix-go/readme.txt
new file mode 100644
index 0000000000..9f930fb6ac
--- /dev/null
+++ b/board/sipeed/maix-go/readme.txt
@@ -0,0 +1,320 @@
+Sipeed MAIX-Go Board
+====================
+
+The Sipeed MAXI-Go board is a dual-core RISC-V 64-bits board based on the
+Canaan Kendryte K210 SoC.
+
+Prerequisite
+------------
+
+In order to use the kflash utility to program this board, the user must have
+access to the board USB serial device file. The simplest way to do this is to
+add your user to the same group as this device file. Assume the device file is
+/dev/ttyUSB0, first identify the device group name. In most cases, it is
+either "dialout" or "uucp". Also verify that read-write access is enabled for
+the group:
+
+```
+$ ls -l /dev/ttyUSB0
+crw-rw---- 1 root dialout 188, 0 May 26 13:48 /dev/ttyUSB0
+```
+
+Then add yourself to that group (dialout in this example):
+
+```
+$ sudo usermod -a -G dialout $(whoami)
+```
+
+To enable the above, it is sometimes necessary to logout and login again.
+
+Buildroot Configuration
+-----------------------
+
+Two buildroot configuration files are provided:
+
+(1) Direct Linux Kernel Boot
+
+This is defined by the sipeed_maix_go_defconfig configuration. This
+configuration allows building a bootable kernel image with a built-in initramfs
+root file system (the board SD card is not used). The built kernel image can be
+flashed directly to the board ROM for direct booting. No boot loader is
+required.
+
+(2) U-Boot SD-Card Boot
+
+The sipeed_maix_go_sdcard_defconfig configuration allows building a kernel
+image with the root file system on the board SD card. U-Boot is used as the
+boot loader.
+
+Note: U-Boot does not natively support the Sipeed MAIX-Go board. However, the
+board and device tree differences with the Sipeed MAIX-bit board are small
+enough for U-Boot to work.
+
+Both configuration files will also compile and install the kflash and
+pyserial-miniterm host utilities to program bootable image files to the board
+and open a serial terminal console.
+
+Direct Linux Kernel Boot
+-------------------------
+
+Using the sipeed_maix_go_defconfig configuration, the bootable kernel binary
+image is built as follows.
+
+```
+$ make sipeed_maix_go_defconfig
+$ make
+```
+
+The bootable binary image is the output/images/loader.bin file. This image file
+can be written to the board boot flash using the kflash utility.
+
+```
+$ output/host/bin/kflash -b 1500000 -p /dev/ttyUSB0 -t output/images/loader.bin
+```
+
+Once the kernel image file is fully programmed, a terminal console is open and
+the board can be rebooted by pressing the reset button on the board (if it does
+not reboot automatically).
+
+The output will be similar to the following.
+
+```
+[    0.000000] Linux version 5.17.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-560-g6a2b542a09-dirty) 10.3.0, GNU ld (GNU Binutils) 2.32) #2 SMP Thu Apr 21 16:09:24 JST 2022
+[    0.000000] Machine model: SiPeed MAIX GO
+[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+[    0.000000] printk: bootconsole [sifive0] enabled
+[    0.000000] Zone ranges:
+[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000]   Normal   empty
+[    0.000000] Movable zone start for each node
+[    0.000000] Early memory node ranges
+[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] riscv: ISA extensions acdfim
+[    0.000000] riscv: ELF capabilities acdfim
+[    0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0
+[    0.000000] percpu: Embedded 11 pages/cpu s15264 r0 d29792 u45056
+[    0.000000] percpu: wasting 10 pages per chunk
+[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
+[    0.000000] Kernel command line: earlycon console=ttySIF0
+[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+[    0.000000] Memory: 5980K/8192K available (964K kernel code, 137K rwdata, 205K rodata, 546K init, 66K bss, 2212K reserved, 0K cma-reserved)
+[    0.000000] rcu: Hierarchical RCU implementation.
+[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+[    0.000000] riscv-intc: 64 local interrupts mapped
+[    0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts.
+[    0.000000] k210-clk: clock-controller: CPU running at 390 MHz
+[    0.000000] clint: timer@2000000: timer running at 7800000 Hz
+[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+[    0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+[    0.008193] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+[    0.018250] pid_max: default: 4096 minimum: 301
+[    0.022862] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.029971] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.040239] rcu: Hierarchical SRCU implementation.
+[    0.045118] smp: Bringing up secondary CPUs ...
+[    0.050204] smp: Brought up 1 node, 2 CPUs
+[    0.054336] devtmpfs: initialized
+[    0.071519] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+[    0.080591] pinctrl core: initialized pinctrl subsystem
+[    0.121163] clocksource: Switched to clocksource clint_clocksource
+[    0.133221] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+[    0.180960] k210-sysctl 50440000.syscon: K210 system controller
+[    0.196811] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+[    0.204879] cacheinfo: Unable to detect cache hierarchy for CPU 0
+[    0.214087] i2c_dev: i2c /dev entries driver
+[    0.222736] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+[    0.236173] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+[    0.245104] printk: console [ttySIF0] enabled
+[    0.245104] printk: console [ttySIF0] enabled
+[    0.253726] printk: bootconsole [sifive0] disabled
+[    0.253726] printk: bootconsole [sifive0] disabled
+[    0.265588] panel@0 enforce active low on chipselect handle
+[    0.282358] Freeing unused kernel image (initmem) memory: 540K
+[    0.287492] This architecture does not have kernel memory protection.
+[    0.293926] Run /init as init process
+          __  _
+         / / (_) ____   _   _ __  __
+        / /  | ||  _ \ | | | |\ \/ /
+       / /___| || | | || |_| | >  <
+      /_____/|_||_| |_| \____|/_/\_\
+    64-bits RISC-V Kendryte K210 NOMMU
+
+/ #
+```
+
+To open a terminal console without re-flashing the board, the pyserial-miniterm
+host tool can be used.
+
+```
+$ output/host/bin/pyserial-miniterm --raw --eol=LF /dev/ttyUSB0 115200
+```
+
+The options "--raw" and "--eol=LF" are added here to avoid a double carriage
+return each time a command is entered.
+
+
+U-Boot SD-Card Boot
+-------------------
+
+The build procedure is similar to the built-in initramfs case.
+
+```
+$ make sipeed_maix_go_sdcard_defconfig
+$ make
+```
+
+The build process will generate two files under the output/images directory.
+
+* sdcard.img: The image file for the SD card filesystem. This image has 2
+  partitions. The first partition is a vfat partition containing the kernel
+  uImage and the board device tree binary. The second partition is the root
+  filesystem with busybox installed. The second partition is formatted using
+  ext2 (rev1).
+
+* uboot.bin: U-Boot bootable binary to load and boot the kernel from the SD
+  card.
+
+The SD card can be prepared by writing the sdcard.img file, as follows.
+
+```
+$ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+$ sync
+$ eject /dev/sdX
+```
+
+Where /dev/sdX is the device file name of the SD card. Once completed, the SD
+card can be inserted into the board and the U-Boot binary image written to the
+board boot flash using the kflash utility.
+
+```
+$ output/host/bin/kflash -b 1500000 -p /dev/ttyUSB0 -t output/images/u-boot.bin
+```
+
+The above command will program U-Boot image to the board boot ROM and open a
+terminal console once the u-boot.bin file is fully programmed. Reboot into the
+newly programmed environment by pressing the board reset button.
+
+The output will be similar to the following.
+
+```
+U-Boot 2022.04 (Apr 21 2022 - 16:28:58 +0900)
+
+DRAM:  8 MiB
+Core:  34 devices, 17 uclasses, devicetree: separate
+WDT:   Not starting watchdog@50400000
+MMC:   spi@53000000:slot@0: 0
+Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
+*** Warning - bad CRC, using default environment
+
+In:    serial@38000000
+Out:   serial@38000000
+Err:   serial@38000000
+Hit any key to stop autoboot:  0
+1717730 bytes read in 956 ms (1.7 MiB/s)
+10502 bytes read in 11 ms (931.6 KiB/s)
+## Booting kernel from Legacy Image at 80060000 ...
+   Image Name:   Linux
+   Image Type:   RISC-V Linux Kernel Image (uncompressed)
+   Data Size:    1717666 Bytes = 1.6 MiB
+   Load Address: 80000000
+   Entry Point:  80000000
+   Verifying Checksum ... OK
+## Flattened Device Tree blob at 80400000
+   Booting using the fdt blob at 0x80400000
+   Loading Kernel Image
+   Loading Device Tree to 00000000803fa000, end 00000000803ff905 ... OK
+
+Starting kernel ...
+
+[    0.000000] Linux version 5.17.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-560-g6a2b542a09-dirty) 10.3.0, GNU ld (GNU Binutils) 2.32) #1 SMP Thu Apr 21 16:29:10 JST 2022
+[    0.000000] Machine model: SiPeed MAIX GO
+[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+[    0.000000] printk: bootconsole [sifive0] enabled
+[    0.000000] Zone ranges:
+[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000]   Normal   empty
+[    0.000000] Movable zone start for each node
+[    0.000000] Early memory node ranges
+[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] riscv: ISA extensions acdfim
+[    0.000000] riscv: ELF capabilities acdfim
+[    0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0
+[    0.000000] percpu: Embedded 11 pages/cpu s15392 r0 d29664 u45056
+[    0.000000] percpu: wasting 10 pages per chunk
+[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
+[    0.000000] Kernel command line: earlycon console=ttySIF0 root=/dev/mmcblk0p2 rootwait ro
+[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+[    0.000000] Memory: 6156K/8192K available (1180K kernel code, 151K rwdata, 239K rodata, 102K init, 69K bss, 2036K reserved, 0K cma-reserved)
+[    0.000000] rcu: Hierarchical RCU implementation.
+[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+[    0.000000] riscv-intc: 64 local interrupts mapped
+[    0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts.
+[    0.000000] k210-clk: clock-controller: CPU running at 390 MHz
+[    0.000000] clint: timer@2000000: timer running at 7800000 Hz
+[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+[    0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+[    0.008201] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+[    0.018256] pid_max: default: 4096 minimum: 301
+[    0.022875] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.029983] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.040405] rcu: Hierarchical SRCU implementation.
+[    0.045387] smp: Bringing up secondary CPUs ...
+[    0.050501] smp: Brought up 1 node, 2 CPUs
+[    0.054662] devtmpfs: initialized
+[    0.072840] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+[    0.081918] pinctrl core: initialized pinctrl subsystem
+[    0.124601] clocksource: Switched to clocksource clint_clocksource
+[    0.137869] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+[    0.183507] k210-sysctl 50440000.syscon: K210 system controller
+[    0.199987] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+[    0.209219] cacheinfo: Unable to detect cache hierarchy for CPU 0
+[    0.221062] i2c_dev: i2c /dev entries driver
+[    0.232254] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+[    0.245342] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+[    0.254281] printk: console [ttySIF0] enabled
+[    0.254281] printk: console [ttySIF0] enabled
+[    0.262908] printk: bootconsole [sifive0] disabled
+[    0.262908] printk: bootconsole [sifive0] disabled
+[    0.274939] panel@0 enforce active low on chipselect handle
+[    0.308760] mmc_spi spi3.0: SD/MMC host mmc0, no WP, no poweroff, cd polling
+[    0.321220] Waiting for root device /dev/mmcblk0p2...
+[    0.344805] mmc0: host does not support reading read-only switch, assuming write-enable
+[    0.352142] mmc0: new SDHC card on SPI
+[    0.358622] mmcblk0: mmc0:0000 SA16G 14.5 GiB
+[    0.366636] random: fast init done
+[    0.371323]  mmcblk0: p1 p2
+[    0.392887] random: get_random_bytes called from 0x000000008009b7d2 with crng_init=1
+[    0.394338] VFS: Mounted root (ext2 filesystem) readonly on device 179:2.
+[    0.411277] devtmpfs: mounted
+[    0.413836] Freeing unused kernel image (initmem) memory: 96K
+[    0.419267] This architecture does not have kernel memory protection.
+[    0.425683] Run /sbin/init as init process
+[    0.594251] random: crng init done
+          __  _
+         / / (_) ____   _   _ __  __
+        / /  | ||  _ \ | | | |\ \/ /
+       / /___| || | | || |_| | >  <
+      /_____/|_||_| |_| \____|/_/\_\
+    64-bits RISC-V Kendryte K210 NOMMU
+
+/ #
+```
+
+Of note is that the kernel mounts the SD card as read-only by default to avoid
+corruptions of the ext2 root file system when the board is powered down. This
+is recommended as this board does not support clean shutdown or halt.
+
+Similarly to the initramfs build case, a console can be open without
+re-flashing the board using the host tool pyserial-miniterm.
+
+```
+$ output/host/bin/pyserial-miniterm --raw --eol=LF /dev/ttyUSB0 115200
+```
diff --git a/configs/sipeed_maix_go_defconfig b/configs/sipeed_maix_go_defconfig
new file mode 100644
index 0000000000..2054e49ae2
--- /dev/null
+++ b/configs/sipeed_maix_go_defconfig
@@ -0,0 +1,39 @@
+# Architecture
+BR2_riscv=y
+BR2_RISCV_64=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_ABI_LP64D=y
+
+# Patches
+BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
+
+# Binary format
+# BR2_USE_MMU is not set
+BR2_BINFMT_FLAT=y
+BR2_BINFMT_FLAT_ONE=y
+# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.18"
+BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maix-go/linux-cpio.config"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin"
+
+# Packages
+BR2_PACKAGE_HOST_PYTHON_KFLASH=y
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/busybox-tiny.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# Filesystem
+BR2_INIT_NONE=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_ROOTFS_OVERLAY="board/canaan/k210-soc/rootfs_overlay"
diff --git a/configs/sipeed_maix_go_sdcard_defconfig b/configs/sipeed_maix_go_sdcard_defconfig
new file mode 100644
index 0000000000..a16943608c
--- /dev/null
+++ b/configs/sipeed_maix_go_sdcard_defconfig
@@ -0,0 +1,57 @@
+# Architecture
+BR2_riscv=y
+BR2_RISCV_64=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_ABI_LP64D=y
+
+# Patches
+BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
+
+# System
+# BR2_USE_MMU is not set
+BR2_BINFMT_FLAT=y
+BR2_BINFMT_FLAT_ONE=y
+# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.18"
+BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210_sdcard"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/linux-sdcard.config"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="canaan/sipeed_maix_go"
+
+# Packages
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# Filesystem
+BR2_INIT_NONE=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE=64M
+BR2_ROOTFS_OVERLAY="board/canaan/k210-soc/rootfs_overlay"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/canaan/k210-soc/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/canaan/k210-soc/genimage.cfg"
+
+# Bootloader and related host tools
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.04"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/uboot.config"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sipeed_maix_bitm"
+BR2_TARGET_UBOOT_FORMAT_BIN=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_PYTHON_KFLASH=y
-- 
2.36.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Buildroot] [PATCH v3 7/7] board: Add Canaan KD233 board support
  2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
                   ` (5 preceding siblings ...)
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 6/7] board: Add Sipeed MAIX-Go " Damien Le Moal via buildroot
@ 2022-05-31  5:49 ` Damien Le Moal via buildroot
  2022-06-07  2:31 ` [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
  2022-07-04 11:30 ` Damien Le Moal via buildroot
  8 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-05-31  5:49 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

Add a buildroot configuration file to build a minimal Linux environment
for the Sipeed MAIX Bit board.

The configuration file is canaan_kd233_defconfig. It builds a bootable
kernel image with an embedded initramfs root file system. The image
built can be flashed to the board as is and does not require a boot
loader. This configuration uses the tiny busybox configuration defined
in board/canaan/k210-soc/busybox-tiny.config.

U-Boot currently does not support this board, making it impossible to
boot the kernel after loading it from the SD card. However, the SD card
is usable from Linux once booted using the canaan_kd233_defconfig
configuration.

The configuration also enable the kflash and pyserial-miniterm host
tools for flashing image files to the board and opening a terminal
console.

The readme.txt file documents how to build and boot the Canaan KD233
board with this configuration.

Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 DEVELOPERS                           |   1 +
 board/canaan/kd233/linux-cpio.config |   2 +
 board/canaan/kd233/readme.txt        | 149 +++++++++++++++++++++++++++
 configs/canaan_kd233_defconfig       |  39 +++++++
 4 files changed, 191 insertions(+)
 create mode 100644 board/canaan/kd233/linux-cpio.config
 create mode 100644 board/canaan/kd233/readme.txt
 create mode 100644 configs/canaan_kd233_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index 0116ab0815..b459d2ef52 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -633,6 +633,7 @@ F:	package/log4cpp/
 N:	Damien Le Moal <damien.lemoal@wdc.com>
 F:	package/python-kflash/
 F:	board/canaan/
+F:	configs/canaan_kd233_defconfig
 F:	board/sipeed/
 F:	configs/sipeed_maix_bit_defconfig
 F:	configs/sipeed_maix_bit_sdcard_defconfig
diff --git a/board/canaan/kd233/linux-cpio.config b/board/canaan/kd233/linux-cpio.config
new file mode 100644
index 0000000000..d5b107124a
--- /dev/null
+++ b/board/canaan/kd233/linux-cpio.config
@@ -0,0 +1,2 @@
+CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y
+CONFIG_SOC_CANAAN_K210_DTB_SOURCE="canaan_kd233"
diff --git a/board/canaan/kd233/readme.txt b/board/canaan/kd233/readme.txt
new file mode 100644
index 0000000000..47b78fa2d7
--- /dev/null
+++ b/board/canaan/kd233/readme.txt
@@ -0,0 +1,149 @@
+Canaan KD233 Board
+==================
+
+The Canaan KD233 is a dual-core RISC-V 64-bits board based on the Canaan
+Kendryte K210 SoC.
+
+Prerequisite
+------------
+
+In order to use the kflash utility to program this board, the user must have
+access to the board USB serial device file. The simplest way to do this is to
+add your user to the same group as this device file. Assume the device file is
+/dev/ttyUSB0, first identify the device group name. In most cases, it is
+either "dialout" or "uucp". Also verify that read-write access is enabled for
+the group:
+
+```
+$ ls -l /dev/ttyUSB0
+crw-rw---- 1 root dialout 188, 0 May 26 13:48 /dev/ttyUSB0
+```
+
+Then add yourself to that group (dialout in this example):
+
+```
+$ sudo usermod -a -G dialout $(whoami)
+```
+
+To enable the above, it is sometimes necessary to logout and login again.
+
+Buildroot Configuration
+-----------------------
+
+Unlike other K210 based boards (Sipeed boards), U-Boot does not work on the
+KD233 board due to the different wiring for the SD-Card mmc controller. As such,
+the KD233 board can only be used by directly booting into Linux Kernel.
+
+buildroot can be configured to do so using the canaan_kd233_defconfig
+configuration file. This configuration allows building a bootable kernel image
+with a built-in initramfs root file system (the board SD card is not used). The
+built kernel image can be flashed directly to the board ROM for direct booting.
+No boot loader is required.
+
+Once booted, the on-board SD card can be used by Linux.
+
+The configuration file will also compile and install the kflash and
+pyserial-miniterm host utilities to program bootable image files to the board
+and open a serial terminal console.
+
+Direct Linux Kernel Boot
+-------------------------
+
+Using the canaan_kd233_defconfig configuration, the bootable kernel binary image
+is built as follows.
+
+```
+$ make canaan_kd233_defconfig
+$ make
+```
+
+The bootable binary image is the output/images/loader.bin file. This image file
+can be written to the board boot flash using the kflash utility.
+
+```
+$ output/host/bin/kflash -b 1500000 -p /dev/ttyUSB0 -t output/images/loader.bin
+```
+
+Once the kernel image file is fully programmed, a terminal console is open and
+the board can be rebooted by pressing the reset button on the board (if it does
+not reboot automatically).
+
+The output will be similar to the following.
+
+```
+[    0.000000] Linux version 5.17.0 (foo@bar.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2022.02-560-g6a2b542a09-dirty) 10.3.0, GNU ld (GNU Binutils) 2.32) #2 SMP Thu Apr 21 16:40:44 JST 2022
+[    0.000000] Machine model: Kendryte KD233
+[    0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+[    0.000000] printk: bootconsole [sifive0] enabled
+[    0.000000] Zone ranges:
+[    0.000000]   DMA32    [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000]   Normal   empty
+[    0.000000] Movable zone start for each node
+[    0.000000] Early memory node ranges
+[    0.000000]   node   0: [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+[    0.000000] riscv: ISA extensions acdfim
+[    0.000000] riscv: ELF capabilities acdfim
+[    0.000000] percpu: max_distance=0x16000 too large for vmalloc space 0x0
+[    0.000000] percpu: Embedded 11 pages/cpu s15264 r0 d29792 u45056
+[    0.000000] percpu: wasting 10 pages per chunk
+[    0.000000] Built 1 zonelists, mobility grouping off.  Total pages: 2020
+[    0.000000] Kernel command line: earlycon console=ttySIF0
+[    0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+[    0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+[    0.000000] Memory: 5984K/8192K available (964K kernel code, 137K rwdata, 205K rodata, 546K init, 66K bss, 2208K reserved, 0K cma-reserved)
+[    0.000000] rcu: Hierarchical RCU implementation.
+[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+[    0.000000] riscv-intc: 64 local interrupts mapped
+[    0.000000] plic: interrupt-controller@c000000: mapped 65 interrupts with 2 handlers for 4 contexts.
+[    0.000000] k210-clk: clock-controller: CPU running at 390 MHz
+[    0.000000] clint: timer@2000000: timer running at 7800000 Hz
+[    0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+[    0.000001] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+[    0.008178] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+[    0.018251] pid_max: default: 4096 minimum: 301
+[    0.022861] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.029971] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+[    0.040234] rcu: Hierarchical SRCU implementation.
+[    0.045110] smp: Bringing up secondary CPUs ...
+[    0.050211] smp: Brought up 1 node, 2 CPUs
+[    0.054340] devtmpfs: initialized
+[    0.070401] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+[    0.079473] pinctrl core: initialized pinctrl subsystem
+[    0.117795] clocksource: Switched to clocksource clint_clocksource
+[    0.130245] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+[    0.176925] k210-sysctl 50440000.syscon: K210 system controller
+[    0.192947] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+[    0.200870] cacheinfo: Unable to detect cache hierarchy for CPU 0
+[    0.210947] i2c_dev: i2c /dev entries driver
+[    0.220535] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+[    0.232253] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+[    0.241202] printk: console [ttySIF0] enabled
+[    0.241202] printk: console [ttySIF0] enabled
+[    0.249818] printk: bootconsole [sifive0] disabled
+[    0.249818] printk: bootconsole [sifive0] disabled
+[    0.261664] panel@0 enforce active low on chipselect handle
+[    0.275950] Freeing unused kernel image (initmem) memory: 540K
+[    0.281098] This architecture does not have kernel memory protection.
+[    0.287520] Run /init as init process
+          __  _
+         / / (_) ____   _   _ __  __
+        / /  | ||  _ \ | | | |\ \/ /
+       / /___| || | | || |_| | >  <
+      /_____/|_||_| |_| \____|/_/\_\
+    64-bits RISC-V Kendryte K210 NOMMU
+
+/ #
+```
+
+To open a terminal console without re-flashing the board, the pyserial-miniterm
+host tool can be used.
+
+```
+$ output/host/bin/pyserial-miniterm --raw --eol=LF /dev/ttyUSB0 115200
+```
+
+The options "--raw" and "--eol=LF" are added here to avoid a double carriage
+return each time a command is entered.
diff --git a/configs/canaan_kd233_defconfig b/configs/canaan_kd233_defconfig
new file mode 100644
index 0000000000..85b7b14fbd
--- /dev/null
+++ b/configs/canaan_kd233_defconfig
@@ -0,0 +1,39 @@
+# Architecture
+BR2_riscv=y
+BR2_RISCV_64=y
+BR2_riscv_custom=y
+BR2_RISCV_ISA_CUSTOM_RVM=y
+BR2_RISCV_ISA_CUSTOM_RVA=y
+BR2_RISCV_ISA_CUSTOM_RVF=y
+BR2_RISCV_ISA_CUSTOM_RVD=y
+BR2_RISCV_ISA_CUSTOM_RVC=y
+BR2_RISCV_ABI_LP64D=y
+
+# Patches
+BR2_GLOBAL_PATCH_DIR="board/riscv/nommu/patches"
+
+# Binary format
+# BR2_USE_MMU is not set
+BR2_BINFMT_FLAT=y
+BR2_BINFMT_FLAT_ONE=y
+# BR2_TARGET_ENABLE_ROOT_LOGIN is not set
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.18"
+BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/canaan/kd233/linux-cpio.config"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin"
+
+# Packages
+BR2_PACKAGE_HOST_PYTHON_KFLASH=y
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-soc/busybox-tiny.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+
+# Filesystem
+BR2_INIT_NONE=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
+BR2_ROOTFS_OVERLAY="board/canaan/k210-soc/rootfs_overlay"
-- 
2.36.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support
  2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
                   ` (6 preceding siblings ...)
  2022-05-31  5:49 ` [Buildroot] [PATCH v3 7/7] board: Add Canaan KD233 " Damien Le Moal via buildroot
@ 2022-06-07  2:31 ` Damien Le Moal via buildroot
  2022-06-09  7:35   ` Thomas Petazzoni via buildroot
  2022-07-04 11:30 ` Damien Le Moal via buildroot
  8 siblings, 1 reply; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-06-07  2:31 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

On 2022/05/31 14:49, Damien Le Moal via buildroot wrote:
> This patch series is a rework of the old v5 series "Add RV64 NOMMU and
> Canaan K210 SoC support" already posted some (long) time ago.
> 
> This series adds support for building 64-bits RISC-V NOMMU kernels (both
> bootable kernels and u-boot sdcard boot envronements) for NOMMU RISC-V
> 64-bits boards. The board supported include QEMU and many boards using
> the dual-core RISC-V 64-bits Cannan Kendryte K210 SoC.
> 
> The first patch is a simple fix of elf2flt configuration.
> 
> Patch 2 adds the configurations files common to all K210-based boards.
> 
> The last 5 patches add support for the following K210-based boards:
> * Sipeed MAIX Bit
> * Sipeed MAIXDUINO
> * Sipeed MAIX Dock (dan)
> * Sipeed MAIX Go
> * Canaan KD233 development board
> 
> For each board, a readme.txt file is added to document how to build and
> install images for these boards.

Thomas,

Ping ? Large backlog ?

> 
> Changes from v2:
> * Rebased patches on next branch
> * Modified patch 1 to address Thomas comments
> * Removed patches already applied
> * Modified patches 2 to 7 to remove the BR2_PACKAGE_HOST_ELF2FLT and
>   reference the global patch directory in boar/riscv/nommu
> 
> Changes from v1:
> * Modified patch 5 to add the python-kflash utility as a host package as
>   the new 1.1.5 version of this utility fixes the previously identified
>   problems with python dependencies.
> * Fixed patch 4 (qemu riscv nommu) to have buildroot configuration file
>   reference kernel 5.18.
> * Fixed patch 11 (kd233 board) to have buildroot configuration file
>   reference kernel 5.18.
> * Modified patch 7 to 11 to add the python-kflash host package to the
>   buildroot configuration files. The instructions in the readme.txt
>   file for each board are also updated accordingly.
> 
> Damien Le Moal (7):
>   package/elf2flt: Remove Config.in.host
>   board: Add common support for Canaan K210 SoC-based boards
>   board: Add Sipeed MAIX-Bit board support
>   board: Add Sipeed MAIXDUINO board support
>   board: Add Sipeed MAIX-Dock board support
>   board: Add Sipeed MAIX-Go board support
>   board: Add Canaan KD233 board support
> 
>  Config.in                                     |   2 +-
>  DEVELOPERS                                    |  11 +
>  arch/Config.in                                |   1 +
>  board/canaan/k210-soc/busybox-tiny.config     | 231 +++++++++++++
>  board/canaan/k210-soc/genimage.cfg            |  30 ++
>  board/canaan/k210-soc/linux-sdcard.config     |   4 +
>  board/canaan/k210-soc/post-build.sh           |  28 ++
>  board/canaan/k210-soc/rootfs_overlay/init     |   1 +
>  .../canaan/k210-soc/rootfs_overlay/sbin/init  |  41 +++
>  board/canaan/k210-soc/uboot.config            |   1 +
>  board/canaan/kd233/linux-cpio.config          |   2 +
>  board/canaan/kd233/readme.txt                 | 149 ++++++++
>  board/sipeed/maix-bit/linux-cpio.config       |   2 +
>  board/sipeed/maix-bit/readme.txt              | 316 +++++++++++++++++
>  board/sipeed/maix-dock/linux-cpio.config      |   2 +
>  board/sipeed/maix-dock/readme.txt             | 321 ++++++++++++++++++
>  board/sipeed/maix-go/linux-cpio.config        |   2 +
>  board/sipeed/maix-go/readme.txt               | 320 +++++++++++++++++
>  board/sipeed/maixduino/linux-cpio.config      |   2 +
>  board/sipeed/maixduino/readme.txt             | 292 ++++++++++++++++
>  configs/canaan_kd233_defconfig                |  39 +++
>  configs/qemu_arm_versatile_nommu_defconfig    |   1 -
>  configs/qemu_riscv64_nommu_virt_defconfig     |   1 -
>  configs/qemu_xtensa_lx60_nommu_defconfig      |   1 -
>  configs/sipeed_maix_bit_defconfig             |  39 +++
>  configs/sipeed_maix_bit_sdcard_defconfig      |  57 ++++
>  configs/sipeed_maix_dock_defconfig            |  39 +++
>  configs/sipeed_maix_dock_sdcard_defconfig     |  57 ++++
>  configs/sipeed_maix_go_defconfig              |  39 +++
>  configs/sipeed_maix_go_sdcard_defconfig       |  57 ++++
>  configs/sipeed_maixduino_defconfig            |  39 +++
>  configs/sipeed_maixduino_sdcard_defconfig     |  57 ++++
>  package/elf2flt/Config.in.host                |  13 -
>  toolchain/toolchain-buildroot/Config.in       |   1 -
>  34 files changed, 2180 insertions(+), 18 deletions(-)
>  create mode 100644 board/canaan/k210-soc/busybox-tiny.config
>  create mode 100644 board/canaan/k210-soc/genimage.cfg
>  create mode 100644 board/canaan/k210-soc/linux-sdcard.config
>  create mode 100755 board/canaan/k210-soc/post-build.sh
>  create mode 120000 board/canaan/k210-soc/rootfs_overlay/init
>  create mode 100755 board/canaan/k210-soc/rootfs_overlay/sbin/init
>  create mode 100644 board/canaan/k210-soc/uboot.config
>  create mode 100644 board/canaan/kd233/linux-cpio.config
>  create mode 100644 board/canaan/kd233/readme.txt
>  create mode 100644 board/sipeed/maix-bit/linux-cpio.config
>  create mode 100644 board/sipeed/maix-bit/readme.txt
>  create mode 100644 board/sipeed/maix-dock/linux-cpio.config
>  create mode 100644 board/sipeed/maix-dock/readme.txt
>  create mode 100644 board/sipeed/maix-go/linux-cpio.config
>  create mode 100644 board/sipeed/maix-go/readme.txt
>  create mode 100644 board/sipeed/maixduino/linux-cpio.config
>  create mode 100644 board/sipeed/maixduino/readme.txt
>  create mode 100644 configs/canaan_kd233_defconfig
>  create mode 100644 configs/sipeed_maix_bit_defconfig
>  create mode 100644 configs/sipeed_maix_bit_sdcard_defconfig
>  create mode 100644 configs/sipeed_maix_dock_defconfig
>  create mode 100644 configs/sipeed_maix_dock_sdcard_defconfig
>  create mode 100644 configs/sipeed_maix_go_defconfig
>  create mode 100644 configs/sipeed_maix_go_sdcard_defconfig
>  create mode 100644 configs/sipeed_maixduino_defconfig
>  create mode 100644 configs/sipeed_maixduino_sdcard_defconfig
>  delete mode 100644 package/elf2flt/Config.in.host
> 


-- 
Damien Le Moal
Western Digital Research
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support
  2022-06-07  2:31 ` [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
@ 2022-06-09  7:35   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-06-09  7:35 UTC (permalink / raw)
  To: Damien Le Moal; +Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN, buildroot

Hello Damien,

On Tue, 7 Jun 2022 11:31:33 +0900
Damien Le Moal <damien.lemoal@opensource.wdc.com> wrote:

> > For each board, a readme.txt file is added to document how to build and
> > install images for these boards.  
> 
> Thomas,
> 
> Ping ? Large backlog ?

Yes, I've handled other Buildroot patches/topics. Your patches are
lined up in patchwork, and not forgotten. For the record, we have ~300
patches in our backlog. We'll get to your patches!

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support
  2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
                   ` (7 preceding siblings ...)
  2022-06-07  2:31 ` [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
@ 2022-07-04 11:30 ` Damien Le Moal via buildroot
  8 siblings, 0 replies; 11+ messages in thread
From: Damien Le Moal via buildroot @ 2022-07-04 11:30 UTC (permalink / raw)
  To: buildroot, Thomas Petazzoni
  Cc: Niklas Cassel, Alistair Francis, Yann E . MORIN

On 5/31/22 14:49, Damien Le Moal via buildroot wrote:
> This patch series is a rework of the old v5 series "Add RV64 NOMMU and
> Canaan K210 SoC support" already posted some (long) time ago.
> 
> This series adds support for building 64-bits RISC-V NOMMU kernels (both
> bootable kernels and u-boot sdcard boot envronements) for NOMMU RISC-V
> 64-bits boards. The board supported include QEMU and many boards using
> the dual-core RISC-V 64-bits Cannan Kendryte K210 SoC.
> 
> The first patch is a simple fix of elf2flt configuration.
> 
> Patch 2 adds the configurations files common to all K210-based boards.
> 
> The last 5 patches add support for the following K210-based boards:
> * Sipeed MAIX Bit
> * Sipeed MAIXDUINO
> * Sipeed MAIX Dock (dan)
> * Sipeed MAIX Go
> * Canaan KD233 development board
> 
> For each board, a readme.txt file is added to document how to build and
> install images for these boards.

Ping ? This was sent at the end of May and still not applied nor
commented. Any blocker here ?

> 
> Changes from v2:
> * Rebased patches on next branch
> * Modified patch 1 to address Thomas comments
> * Removed patches already applied
> * Modified patches 2 to 7 to remove the BR2_PACKAGE_HOST_ELF2FLT and
>   reference the global patch directory in boar/riscv/nommu
> 
> Changes from v1:
> * Modified patch 5 to add the python-kflash utility as a host package as
>   the new 1.1.5 version of this utility fixes the previously identified
>   problems with python dependencies.
> * Fixed patch 4 (qemu riscv nommu) to have buildroot configuration file
>   reference kernel 5.18.
> * Fixed patch 11 (kd233 board) to have buildroot configuration file
>   reference kernel 5.18.
> * Modified patch 7 to 11 to add the python-kflash host package to the
>   buildroot configuration files. The instructions in the readme.txt
>   file for each board are also updated accordingly.
> 
> Damien Le Moal (7):
>   package/elf2flt: Remove Config.in.host
>   board: Add common support for Canaan K210 SoC-based boards
>   board: Add Sipeed MAIX-Bit board support
>   board: Add Sipeed MAIXDUINO board support
>   board: Add Sipeed MAIX-Dock board support
>   board: Add Sipeed MAIX-Go board support
>   board: Add Canaan KD233 board support
> 
>  Config.in                                     |   2 +-
>  DEVELOPERS                                    |  11 +
>  arch/Config.in                                |   1 +
>  board/canaan/k210-soc/busybox-tiny.config     | 231 +++++++++++++
>  board/canaan/k210-soc/genimage.cfg            |  30 ++
>  board/canaan/k210-soc/linux-sdcard.config     |   4 +
>  board/canaan/k210-soc/post-build.sh           |  28 ++
>  board/canaan/k210-soc/rootfs_overlay/init     |   1 +
>  .../canaan/k210-soc/rootfs_overlay/sbin/init  |  41 +++
>  board/canaan/k210-soc/uboot.config            |   1 +
>  board/canaan/kd233/linux-cpio.config          |   2 +
>  board/canaan/kd233/readme.txt                 | 149 ++++++++
>  board/sipeed/maix-bit/linux-cpio.config       |   2 +
>  board/sipeed/maix-bit/readme.txt              | 316 +++++++++++++++++
>  board/sipeed/maix-dock/linux-cpio.config      |   2 +
>  board/sipeed/maix-dock/readme.txt             | 321 ++++++++++++++++++
>  board/sipeed/maix-go/linux-cpio.config        |   2 +
>  board/sipeed/maix-go/readme.txt               | 320 +++++++++++++++++
>  board/sipeed/maixduino/linux-cpio.config      |   2 +
>  board/sipeed/maixduino/readme.txt             | 292 ++++++++++++++++
>  configs/canaan_kd233_defconfig                |  39 +++
>  configs/qemu_arm_versatile_nommu_defconfig    |   1 -
>  configs/qemu_riscv64_nommu_virt_defconfig     |   1 -
>  configs/qemu_xtensa_lx60_nommu_defconfig      |   1 -
>  configs/sipeed_maix_bit_defconfig             |  39 +++
>  configs/sipeed_maix_bit_sdcard_defconfig      |  57 ++++
>  configs/sipeed_maix_dock_defconfig            |  39 +++
>  configs/sipeed_maix_dock_sdcard_defconfig     |  57 ++++
>  configs/sipeed_maix_go_defconfig              |  39 +++
>  configs/sipeed_maix_go_sdcard_defconfig       |  57 ++++
>  configs/sipeed_maixduino_defconfig            |  39 +++
>  configs/sipeed_maixduino_sdcard_defconfig     |  57 ++++
>  package/elf2flt/Config.in.host                |  13 -
>  toolchain/toolchain-buildroot/Config.in       |   1 -
>  34 files changed, 2180 insertions(+), 18 deletions(-)
>  create mode 100644 board/canaan/k210-soc/busybox-tiny.config
>  create mode 100644 board/canaan/k210-soc/genimage.cfg
>  create mode 100644 board/canaan/k210-soc/linux-sdcard.config
>  create mode 100755 board/canaan/k210-soc/post-build.sh
>  create mode 120000 board/canaan/k210-soc/rootfs_overlay/init
>  create mode 100755 board/canaan/k210-soc/rootfs_overlay/sbin/init
>  create mode 100644 board/canaan/k210-soc/uboot.config
>  create mode 100644 board/canaan/kd233/linux-cpio.config
>  create mode 100644 board/canaan/kd233/readme.txt
>  create mode 100644 board/sipeed/maix-bit/linux-cpio.config
>  create mode 100644 board/sipeed/maix-bit/readme.txt
>  create mode 100644 board/sipeed/maix-dock/linux-cpio.config
>  create mode 100644 board/sipeed/maix-dock/readme.txt
>  create mode 100644 board/sipeed/maix-go/linux-cpio.config
>  create mode 100644 board/sipeed/maix-go/readme.txt
>  create mode 100644 board/sipeed/maixduino/linux-cpio.config
>  create mode 100644 board/sipeed/maixduino/readme.txt
>  create mode 100644 configs/canaan_kd233_defconfig
>  create mode 100644 configs/sipeed_maix_bit_defconfig
>  create mode 100644 configs/sipeed_maix_bit_sdcard_defconfig
>  create mode 100644 configs/sipeed_maix_dock_defconfig
>  create mode 100644 configs/sipeed_maix_dock_sdcard_defconfig
>  create mode 100644 configs/sipeed_maix_go_defconfig
>  create mode 100644 configs/sipeed_maix_go_sdcard_defconfig
>  create mode 100644 configs/sipeed_maixduino_defconfig
>  create mode 100644 configs/sipeed_maixduino_sdcard_defconfig
>  delete mode 100644 package/elf2flt/Config.in.host
> 


-- 
Damien Le Moal
Western Digital Research
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-07-04 11:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31  5:49 [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
2022-05-31  5:49 ` [Buildroot] [PATCH v3 1/7] package/elf2flt: Remove Config.in.host Damien Le Moal via buildroot
2022-05-31  5:49 ` [Buildroot] [PATCH v3 2/7] board: Add common support for Canaan K210 SoC-based boards Damien Le Moal via buildroot
2022-05-31  5:49 ` [Buildroot] [PATCH v3 3/7] board: Add Sipeed MAIX-Bit board support Damien Le Moal via buildroot
2022-05-31  5:49 ` [Buildroot] [PATCH v3 4/7] board: Add Sipeed MAIXDUINO " Damien Le Moal via buildroot
2022-05-31  5:49 ` [Buildroot] [PATCH v3 5/7] board: Add Sipeed MAIX-Dock " Damien Le Moal via buildroot
2022-05-31  5:49 ` [Buildroot] [PATCH v3 6/7] board: Add Sipeed MAIX-Go " Damien Le Moal via buildroot
2022-05-31  5:49 ` [Buildroot] [PATCH v3 7/7] board: Add Canaan KD233 " Damien Le Moal via buildroot
2022-06-07  2:31 ` [Buildroot] [PATCH v3 0/7] Fix RV64 NOMMU and add Canaan K210 SoC support Damien Le Moal via buildroot
2022-06-09  7:35   ` Thomas Petazzoni via buildroot
2022-07-04 11:30 ` Damien Le Moal via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.