From patchwork Mon Aug 30 04:40:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1522049 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=fKCLeE0M; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyd24630zz9sRf for ; Mon, 30 Aug 2021 14:41:32 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9485C40400; Mon, 30 Aug 2021 04:41:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1hmLnyRIsmAT; Mon, 30 Aug 2021 04:41:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 9EAA940412; Mon, 30 Aug 2021 04:41:21 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 6DDF91BF2F4 for ; Mon, 30 Aug 2021 04:41:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5DF8C606EF for ; Mon, 30 Aug 2021 04:41:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=wdc.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YP-daI-zoFIS for ; Mon, 30 Aug 2021 04:41:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by smtp3.osuosl.org (Postfix) with ESMTPS id 8BF5B60755 for ; Mon, 30 Aug 2021 04:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1630298463; x=1661834463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VD3qGyn4LEOPY6JZJ6J4zp8E4Cytpdp7j+EsvFxORrI=; b=fKCLeE0MJnHe8mW9FMPRfNQi8wLgRYctgNG/AxkJK/G4xzix8Vyfw4Vl slEvnE8JaU5NcWr1bzUEB9CgCclKmnf18rrbrJ02ftFMH1SIBx1A5yb01 wdYedfA1AtOCTGI6byFd/cK5T1bz+SwcihlxPsUfJyZrLWSG5MWf4Ap+z z5Koja46Dgz4juoWG3s64Unt5PEE619cdc5U+/0EMWFeRCBN0BJIgddPc 66LQ0q3OUZuLqvW8WIJi4MdZv1HYdjcP2jc9sn8U1lWuuoeVjEJW0cauO 5nJRTmS05leIsMWJ8W5zYwyWg0B2tKR0T1xahD4rflLvcYVVn5Q3V6+0X w==; X-IronPort-AV: E=Sophos;i="5.84,362,1620662400"; d="scan'208";a="177842482" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2021 12:41:03 +0800 IronPort-SDR: pERv0YHzLho5cWgBL69eNQSjIENsqjv+qEg9MZqvL4s+88seUcoNkwCfreHu2GBuiRdtxwsi9/ BATQbxA0HadFVyyCGXSpNQqgJ/odgxoDHEyshbYyefw75mTj2ufqii93+fgzhR4VS5+xErlET5 RMXvfydir9tKjod6qYMqvzJ06tNkMeTSfwbKH0l2yyyxxd2SkxbVawCEJNrCweNbnfOZ3bgBsd la1JB1wD/ozhVsVwjNeiAABOwgCBKyQJXRkKwvionzEB5iWNBMSaGN4gdWXoJ0N6wSQsJo+xJL HvK/98M/v53MMwlRy9AhXYp0 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2021 21:17:54 -0700 IronPort-SDR: 5JHOgxAd6jNmYLP1yr7CTZF1jNowXQH3I1ggklv0FOAJRPm1VmJLcAxfxlViOalVShYeeNLltu w0xaCQezOJe0ftXZ1aj18rg5cbPYBicHciRRMFWGmISZ3HTQmw0lTGmP9zdMTQwkdCE/iCMTc+ fJUurcsvglNwRXwUs8jXL7M5Grg23zgfBY36cjhgxvt26IjbQFeID2HSvFyjb9sSuh+V7Ji4Eo mEycPjZ+2uE0QyVOvT4cOszrkT2X/ntH62GtTIRtCWRjEc4S2BIN5eZ/9xmc0nO3U+FsSiAnIA yRQ= WDCIronportException: Internal Received: from unknown (HELO twashi.fujisawa.hgst.com) ([10.225.163.119]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Aug 2021 21:41:02 -0700 From: Damien Le Moal To: buildroot , Thomas Petazzoni Date: Mon, 30 Aug 2021 13:40:52 +0900 Message-Id: <20210830044100.260173-2-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210830044100.260173-1-damien.lemoal@wdc.com> References: <20210830044100.260173-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 1/9] package/elf2flt: add RISC-V 64-bits support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Christoph Hellwig Enable selecting elf2flt for RISC-V 64-bits no MMU builds and add support for it in the form of an additional patch (upstream pull request https://github.com/uclinux-dev/elf2flt/pull/19). Signed-off-by: Christoph Hellwig Signed-off-by: Damien Le Moal --- ...04-elf2flt-add-riscv-64-bits-support.patch | 299 ++++++++++++++++++ package/elf2flt/Config.in.host | 2 +- 2 files changed, 300 insertions(+), 1 deletion(-) create mode 100644 package/elf2flt/0004-elf2flt-add-riscv-64-bits-support.patch diff --git a/package/elf2flt/0004-elf2flt-add-riscv-64-bits-support.patch b/package/elf2flt/0004-elf2flt-add-riscv-64-bits-support.patch new file mode 100644 index 0000000000..11e8df2d87 --- /dev/null +++ b/package/elf2flt/0004-elf2flt-add-riscv-64-bits-support.patch @@ -0,0 +1,299 @@ +From 45d27f1e2ec2a5ec793bb3cf9e326160a85e5bac Mon Sep 17 00:00:00 2001 +From: Christoph Hellwig +Date: Wed, 9 Sep 2020 17:31:33 +0900 +Subject: [PATCH] elf2flt: add riscv 64-bits support + +Upstream pull request https://github.com/uclinux-dev/elf2flt/pull/19 + +Add support for riscv 64bits ISA by defining the relocation types +R_RISCV_32_PCREL, R_RISCV_ADD32, R_RISCV_SUB32 and R_RISCV_64. +riscv64 support also needs a new linker script as the global_pointer +variable __global_pointer$ needs to be defined right after the +relocation tables in the data section and section ordering changes are +needed. With these changes, buildroot/busybox builds and run on NOMMU +systems with kernel 5.13. Tested on Canaan Kendryte K210 boards. + +Signed-off-by: Christoph Hellwig +Signed-off-by: Damien Le Moal +--- + Makefile.in | 4 +- + elf2flt.c | 22 +++++ + riscv64-elf2flt.ld | 197 +++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 222 insertions(+), 1 deletion(-) + create mode 100644 riscv64-elf2flt.ld + +diff --git a/Makefile.in b/Makefile.in +index 0529c7f..121a2a7 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -44,7 +44,9 @@ endif + LDFILE= elf2flt.ld + ifeq ($(strip $(CPU)),e1) + SRC_LDFILE= $(srcdir)/$(CPU)-elf2flt.ld +-else ++else ifeq ($(strip $(CPU)),riscv64) ++SRC_LDFILE= $(srcdir)/$(CPU)-elf2flt.ld ++else + SRC_LDFILE= elf2flt.ld + endif + +diff --git a/elf2flt.c b/elf2flt.c +index b93aecd..62d4c50 100644 +--- a/elf2flt.c ++++ b/elf2flt.c +@@ -81,6 +81,8 @@ const char *elf2flt_progname; + #include + #elif defined(TARGET_xtensa) + #include ++#elif defined(TARGET_riscv64) ++#include + #endif + + #if defined(__MINGW32__) +@@ -123,6 +125,8 @@ const char *elf2flt_progname; + #define ARCH "nios2" + #elif defined(TARGET_xtensa) + #define ARCH "xtensa" ++#elif defined(TARGET_riscv64) ++#define ARCH "riscv64" + #else + #error "Don't know how to support your CPU architecture??" + #endif +@@ -811,6 +815,15 @@ output_relocs ( + goto good_32bit_resolved_reloc; + default: + goto bad_resolved_reloc; ++#elif defined(TARGET_riscv64) ++ case R_RISCV_32_PCREL: ++ case R_RISCV_ADD32: ++ case R_RISCV_SUB32: ++ break; ++ case R_RISCV_64: ++ goto good_32bit_resolved_reloc; ++ default: ++ goto bad_resolved_reloc; + #else + default: + /* The default is to assume that the +@@ -1831,6 +1844,15 @@ int main(int argc, char *argv[]) + if (!load_to_ram && !pfile) + load_to_ram = 1; + ++#if defined(TARGET_riscv64) ++ /* ++ * riscv only supports loading text and data contiguously. ++ * So fail if load_to_ram is false. ++ */ ++ if (!load_to_ram) ++ fatal("Loading to RAM ('-r' option) is required"); ++#endif ++ + fname = argv[argc-1]; + + if (pfile) { +diff --git a/riscv64-elf2flt.ld b/riscv64-elf2flt.ld +new file mode 100644 +index 0000000..5861f95 +--- /dev/null ++++ b/riscv64-elf2flt.ld +@@ -0,0 +1,197 @@ ++ENTRY (_start) ++ ++MEMORY { ++ flatmem : ORIGIN = 0x0, LENGTH = 0xfffffff ++} ++ ++PHDRS { ++ text PT_LOAD ; ++ data PT_LOAD ; ++} ++ ++SECTIONS { ++ ++ .text 0x0 : { ++ . = . + 4; ++ . = ALIGN(0x4) ; ++ _stext = . ; ++ *(.literal .text) ++ *(.literal.* .text.*) ++ *(.gnu.warning) ++ *(.stub) ++ *(.gnu.linkonce.literal.*) ++ *(.gnu.linkonce.t*) ++ *(.glue_7t) ++ *(.glue_7) ++ *(.jcr) ++ *(.init.literal) ++ KEEP (*(.init)) ++ *(.fini.literal) ++ KEEP (*(.fini)) ++ ++W_RODAT *(.rodata) ++W_RODAT *(.rodata1) ++W_RODAT *(.rodata.*) ++W_RODAT *(.gnu.linkonce.r*) ++ ++ /* This is special code area at the end of the normal ++ text section. It contains a small lookup table at ++ the start followed by the code pointed to by entries ++ in the lookup table. */ ++ . = ALIGN (4) ; ++ PROVIDE(__ctbp = .); ++ *(.call_table_data) ++ *(.call_table_text) ++ ++ . = ALIGN(0x10) ; ++ _etext = . ; ++ } > flatmem :text ++ ++ .data : { ++ . = ALIGN(0x20) ; ++ _sdata = . ; ++ __data_start = . ; ++ data_start = . ; ++ *(.got) ++ *(.got.plt) ++ *(.igot) ++ *(.igot.plt) ++ FILL(0) ; ++ . = ALIGN(0x20) ; ++ LONG(-1) ++ . = ALIGN(0x20) ; ++ ++ __global_pointer$ = . + 0x800; ++ ++R_RODAT *(.rodata) ++R_RODAT *(.rodata1) ++R_RODAT *(.rodata.*) ++R_RODAT *(.gnu.linkonce.r*) ++ *(.data) ++ *(.data1) ++ *(.data.*) ++ *(.gnu.linkonce.d*) ++ ++ *(.gnu.linkonce.s.*) ++ *(__libc_atexit) ++ *(__libc_subinit) ++ *(__libc_subfreeres) ++ ++ . = ALIGN(4) ; ++TOR: __CTOR_LIST__ = .; ++TOR: LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) ++SINGLE_LINK: /* gcc uses crtbegin.o to find the start of ++SINGLE_LINK: the constructors, so we make sure it is ++SINGLE_LINK: first. Because this is a wildcard, it ++SINGLE_LINK: doesn't matter if the user does not ++SINGLE_LINK: actually link against crtbegin.o; the ++SINGLE_LINK: linker won't look for a file to match a ++SINGLE_LINK: wildcard. The wildcard also means that it ++SINGLE_LINK: doesn't matter which directory crtbegin.o ++SINGLE_LINK: is in. */ ++SINGLE_LINK: KEEP (*crtbegin*.o(.ctors)) ++SINGLE_LINK: /* We don't want to include the .ctor section from ++SINGLE_LINK: from the crtend.o file until after the sorted ctors. ++SINGLE_LINK: The .ctor section from the crtend file contains the ++SINGLE_LINK: end of ctors marker and it must be last */ ++SINGLE_LINK: KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors)) ++SINGLE_LINK: KEEP (*(SORT(.ctors.*))) ++ KEEP (*(.ctors)) ++TOR: LONG(0) ++TOR: __CTOR_END__ = .; ++TOR: __DTOR_LIST__ = .; ++TOR: LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) ++SINGLE_LINK: KEEP (*crtbegin*.o(.dtors)) ++SINGLE_LINK: KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors)) ++SINGLE_LINK: KEEP (*(SORT(.dtors.*))) ++ KEEP (*(.dtors)) ++TOR: LONG(0) ++TOR: __DTOR_END__ = .; ++ ++ PROVIDE (__preinit_array_start = .); ++ KEEP (*(.preinit_array)) ++ PROVIDE (__preinit_array_end = .); ++ ++ PROVIDE (__init_array_start = .); ++ KEEP (*(SORT(.init_array.*))) ++ KEEP (*(.init_array)) ++ PROVIDE (__init_array_end = .); ++ ++ PROVIDE (__fini_array_start = .); ++ KEEP (*(.fini_array)) ++ KEEP (*(SORT(.fini_array.*))) ++ PROVIDE (__fini_array_end = .); ++ ++ . = ALIGN(0x10) ; ++ _edata = . ; ++ } > flatmem :data ++ ++ .note.ABI-tag : { *(.note.ABI-tag) } > flatmem ++ .eh_frame_hdr : { *(.eh_frame_hdr) } > flatmem ++ .eh_frame : { KEEP(*(.eh_frame)) } > flatmem ++ .gcc_except_table : { ++ KEEP(*(.gcc_except_table)) ++ KEEP(*(.gcc_except_table.*)) ++ } > flatmem ++ ++ .bss : { ++ . = ALIGN(0x4) ; ++ _sbss = ALIGN(0x4) ; ++ __bss_start = . ; ++ *(.dynsbss) ++ *(.sbss) ++ *(.sbss.*) ++ *(.scommon) ++ *(.dynbss) ++ *(.bss) ++ *(.bss.*) ++ *(.bss*) ++ *(.gnu.linkonce.b*) ++ *(COMMON) ++ . = ALIGN(0x10) ; ++ _ebss = . ; ++ _end = . ; ++ end = . ; ++ } > flatmem ++ ++ .stack : { ++ . = ALIGN(0x4); ++ _stack_start = .; ++ } > flatmem ++ ++ .junk 0 : { *(.rel*) *(.rela*) } ++ /DISCARD/ : { *(.note.GNU-stack) } ++ /* Stabs debugging sections. */ ++ .stab 0 : { *(.stab) } ++ .stabstr 0 : { *(.stabstr) } ++ .stab.excl 0 : { *(.stab.excl) } ++ .stab.exclstr 0 : { *(.stab.exclstr) } ++ .stab.index 0 : { *(.stab.index) } ++ .stab.indexstr 0 : { *(.stab.indexstr) } ++ .comment 0 : { *(.comment) } ++ /* DWARF debug sections. ++ Symbols in the DWARF debugging sections are relative to the beginning ++ of the section so we begin them at 0. */ ++ /* DWARF 1 */ ++ .debug 0 : { *(.debug) } ++ .line 0 : { *(.line) } ++ /* GNU DWARF 1 extensions */ ++ .debug_srcinfo 0 : { *(.debug_srcinfo) } ++ .debug_sfnames 0 : { *(.debug_sfnames) } ++ /* DWARF 1.1 and DWARF 2 */ ++ .debug_aranges 0 : { *(.debug_aranges) } ++ .debug_pubnames 0 : { *(.debug_pubnames) } ++ /* DWARF 2 */ ++ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } ++ .debug_abbrev 0 : { *(.debug_abbrev) } ++ .debug_line 0 : { *(.debug_line) } ++ .debug_frame 0 : { *(.debug_frame) } ++ .debug_str 0 : { *(.debug_str) } ++ .debug_loc 0 : { *(.debug_loc) } ++ .debug_macinfo 0 : { *(.debug_macinfo) } ++ /* SGI/MIPS DWARF 2 extensions */ ++ .debug_weaknames 0 : { *(.debug_weaknames) } ++ .debug_funcnames 0 : { *(.debug_funcnames) } ++ .debug_typenames 0 : { *(.debug_typenames) } ++ .debug_varnames 0 : { *(.debug_varnames) } ++} +-- +2.31.1 + diff --git a/package/elf2flt/Config.in.host b/package/elf2flt/Config.in.host index d6685a7ff6..2bab0095c2 100644 --- a/package/elf2flt/Config.in.host +++ b/package/elf2flt/Config.in.host @@ -1,6 +1,6 @@ config BR2_PACKAGE_HOST_ELF2FLT bool "Enable elf2flt support?" - depends on BR2_arm || BR2_sh || BR2_sparc || BR2_xtensa + 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 From patchwork Mon Aug 30 04:40:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1522050 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=ETisq4C1; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyd2Q2QS6z9sRf for ; Mon, 30 Aug 2021 14:41:50 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9C1D140412; Mon, 30 Aug 2021 04:41:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qjyzsv4aHOvq; Mon, 30 Aug 2021 04:41:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id B3B814041A; Mon, 30 Aug 2021 04:41:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1515E1BF2F4 for ; Mon, 30 Aug 2021 04:41:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 056E0606EF for ; Mon, 30 Aug 2021 04:41:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=wdc.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XsZ5lMLL26gv for ; Mon, 30 Aug 2021 04:41:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by smtp3.osuosl.org (Postfix) with ESMTPS id ABB0B60759 for ; Mon, 30 Aug 2021 04:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1630298464; x=1661834464; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=37MoRX431DXL+aQl0Cqp22J+CiiAM+6cV53ND3bxqZs=; b=ETisq4C1H76qWIapdBHgcf6DaMv7ChxjeW+6Fyr674+7zqxmPyGNT9jh gb70sW+pmW8O0WezqrHZndrlOrrJIyrhofk94qJ1ciWNNmk16Nfe8hsqU nlNztbEGd4Rzot/JWeO/ehHIRMlVq9XZoLEhq0MGUy7MEQqoLmuYM1exL k3moXJqetPKmZbFd8FPa2PKkmaC7mrnvf73k6uRnc0AwlHG1FbVHeuA2U 8nLckTvmOvTYGKHlbBeVh/VSg8shbkMgsxrwkkiweMFHsHDeFh9frQTnz 6nrcfI/wRl9xjApM6YO2sdN5bM4khxifXh46LUfHxHSHrppD4i/u42Otk g==; X-IronPort-AV: E=Sophos;i="5.84,362,1620662400"; d="scan'208";a="177842484" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2021 12:41:04 +0800 IronPort-SDR: xsU0jzXulOfwEyRREOlDidLiK0+hPSQi7aYTaZZPMlkZsb3L0HHnk1n20ayd3U0GfWCWuTCzPN 1J0X/nIbo3kzSyqkWy4RGeA/JUoEzBM8LRxSBwsfBAQ4VHziBm0srZ3Zs8J29BnyYmnS9lssad nezNEjYOyBKV1qFNZOVuEue60776/IyCsNlvzpUOEv8Y94NQxTn4shQ6PGPukD6RMkE6AyYgtX V10Uf1RS8tJkbx02y3jBRPbaEhzBlBQd/DCB0b+z62KIBIRPTkpLpMirgGQUgnP9r6mmV1SMIm eNPOMHpGt+sjcUtjISiUOseF Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2021 21:17:55 -0700 IronPort-SDR: ZVHHJhMctBlnjyJjOjxOQOKCPq3qfQj1orzkDVl62JTzqr3X2AIWMsdvPmItcZXJ1FQlmTwuti aEcALGg2Oxn0HA1D3KPmVFuh20zPbeYzyin2JA0gB0DJJVJFSbWDs1K3l0zROyJTcZLW0LVucy goRBSjyFQszXfuUlg9ckms7+pAXo+HNZ5rdW5xq9RB+cJUCTncCho44blbYENfw2EQsUhU0AMV U8KY1JaIfhoPuqHn+FyS2kzpy798HvnLXh49EDxuj2dWBwHIRI0mowKfeD7WkBKA8cu0mMjYxD 1iE= WDCIronportException: Internal Received: from unknown (HELO twashi.fujisawa.hgst.com) ([10.225.163.119]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Aug 2021 21:41:03 -0700 From: Damien Le Moal To: buildroot , Thomas Petazzoni Date: Mon, 30 Aug 2021 13:40:53 +0900 Message-Id: <20210830044100.260173-3-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210830044100.260173-1-damien.lemoal@wdc.com> References: <20210830044100.260173-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 2/9] package/Makefile.in: Fix NOMMU RISC-V 64-bits toolchain base name X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Christoph Hellwig Using *-uclinux-* seems like an only partially followed convention. And at least RISC-V 64-bits gcc does not know about uclinux tuples. So switch back to the normal "linux" one for now. Signed-off-by: Christoph Hellwig [Damien] * Make the change conditional on BR2_RISCV_64 being "y". Signed-off-by: Damien Le Moal --- package/Makefile.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/Makefile.in b/package/Makefile.in index 86db62ba5b..5b25ea7c7a 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -39,8 +39,9 @@ endif # Compute GNU_TARGET_NAME GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI) -# FLAT binary format needs uclinux -ifeq ($(BR2_BINFMT_FLAT),y) +# FLAT binary format needs uclinux, except RISC-V 64-bits which needs +# the regular linux name. +ifeq ($(BR2_BINFMT_FLAT):$(BR2_RISCV_64),y:) TARGET_OS = uclinux else TARGET_OS = linux From patchwork Mon Aug 30 04:40:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1522051 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=A0e3Wtio; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyd2k67LGz9sWX for ; Mon, 30 Aug 2021 14:42:06 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 41B254010B; Mon, 30 Aug 2021 04:42:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2IZpFgtcvUjA; Mon, 30 Aug 2021 04:41:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id AB40D4011B; Mon, 30 Aug 2021 04:41:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 6ED051BF2F4 for ; Mon, 30 Aug 2021 04:41:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 5EC3360755 for ; Mon, 30 Aug 2021 04:41:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=wdc.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MU1nI4iimpF0 for ; Mon, 30 Aug 2021 04:41:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by smtp3.osuosl.org (Postfix) with ESMTPS id E191A6075B for ; Mon, 30 Aug 2021 04:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1630298465; x=1661834465; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HpFNNX5Ls6C5r8Ulp1AAiIhqUYtYybHcWGc9kLQ0NK4=; b=A0e3Wtio3ZfnjOF236bbyO81XL0avKiCyb6d0TUx0XJIiGn8F7kYJzJl y7YzW6jQ19Sv3L6L1+OAhsAfyqBnlaafllpI7w6B43f7m/Jt5d+L0PKCS 1nU1pfOGD5qMAxTVYSPE13qCCLzyfzFNEAWI5mSb9hngpZmpRQBJsAa8d nBj1RHibaKPD/sZwsRVrNA8jNQLmZZh+YdtuWefYRq4/2c8ff6iQBMa+2 Btd1LxKcwCP3xK/drzfo+3pV1xe87J8UeTnNKdG3W/FZhOB83HWaXkwH3 YJIruecCxHZgGBcybkaqZnLx0AU2EnKiObOBLIoRSR9xyt5zxhzEPLFPr w==; X-IronPort-AV: E=Sophos;i="5.84,362,1620662400"; d="scan'208";a="177842489" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2021 12:41:05 +0800 IronPort-SDR: d853ZgDsKvkqadYrCWliUpnNx8pMAP0eLiGXcKcM2hrZv49axyPFU0SxN2O5C82EcXulL9MNJv dwT2SlbJOlp34a1/7je/jqxT6ILVaLOot1RXqp/2PP1MZ15On/IXPlnS8vMwxIb/BLHNxMh/gg aifMdzi3wqEpGjoPQ46V9jgOZnYhmxYY8HpoV57s6AM8fizcZ1Y8vrl5QqDNaF4BRGG159ZFR9 jO+huXrfm7JkNiWBVrGBpj3kf5jW42BnEYlxwNvfvCwMN7eCdGjj8AoAQ4XQiHhfXKpPDoQwLS wvrQRNJWxd3civ7vedTWhSM8 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2021 21:17:56 -0700 IronPort-SDR: 44WGn+Su5nfmbuzwkQ09BbtpvWpcTg78GoNSg0W2QDZThqBOp2vrXIYZK3KIvqnAJYCiUvM5Mf 5waUorPgpVWGC3FAnF4zHB2fO5PiB8LvJ4qQ7ep3tg2bAUwTFesyCiiR/9N77tFzGS8SxYdTae wSL+/YGN592Qf8iv4Dnwlq5jB6Q8rmm5dEVYIV0wxZEJwjWclVLIQiukz6GNBpws4WqASLySfH 0obdHqcbZeCSitJz+uuYZ6qgk+5A2SWf4kl3CTAZyg6S7ez4d5wRsa9lzXgKi8cWSJNGPlNd9O AjM= WDCIronportException: Internal Received: from unknown (HELO twashi.fujisawa.hgst.com) ([10.225.163.119]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Aug 2021 21:41:04 -0700 From: Damien Le Moal To: buildroot , Thomas Petazzoni Date: Mon, 30 Aug 2021 13:40:54 +0900 Message-Id: <20210830044100.260173-4-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210830044100.260173-1-damien.lemoal@wdc.com> References: <20210830044100.260173-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 3/9] arch/config: Make RISC-V 64-bits MMU optional X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Linux supports No-MMU RISC-V 64-bits since kernel version 5.8. Make MMU optional to enable building for RISC-V 64-bits boards that do not have one. MMU use of RISC-V 32-bits builds remains mandatory for now. Signed-off-by: Damien Le Moal Reviewed-by: Alistair Francis --- arch/Config.in | 1 - arch/Config.in.riscv | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/Config.in b/arch/Config.in index 1853e26bb4..2e95b6e76c 100644 --- a/arch/Config.in +++ b/arch/Config.in @@ -210,7 +210,6 @@ config BR2_powerpc64le config BR2_riscv bool "RISCV" - select BR2_ARCH_HAS_MMU_MANDATORY select BR2_ARCH_NEEDS_GCC_AT_LEAST_7 help RISC-V is an open, free Instruction Set Architecture created diff --git a/arch/Config.in.riscv b/arch/Config.in.riscv index 1fc20e5de7..e6436d7c39 100644 --- a/arch/Config.in.riscv +++ b/arch/Config.in.riscv @@ -71,10 +71,12 @@ choice config BR2_RISCV_32 bool "32-bit" + select BR2_ARCH_HAS_MMU_MANDATORY config BR2_RISCV_64 bool "64-bit" select BR2_ARCH_IS_64 + select BR2_ARCH_HAS_MMU_OPTIONAL endchoice From patchwork Mon Aug 30 04:40:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1522052 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=UacxWCps; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyd2w1wknz9sRf for ; Mon, 30 Aug 2021 14:42:16 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6FBED4042D; Mon, 30 Aug 2021 04:42:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 697Fi_pqqrzJ; Mon, 30 Aug 2021 04:42:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 613C04042F; Mon, 30 Aug 2021 04:42:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1B0931BF2F4 for ; Mon, 30 Aug 2021 04:41:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 186DB60759 for ; Mon, 30 Aug 2021 04:41:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=wdc.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uVqgxXX8aveR for ; Mon, 30 Aug 2021 04:41:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0AFD36075E for ; Mon, 30 Aug 2021 04:41:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1630298467; x=1661834467; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ufSQony0zqmx+kP9Z93SMQbjYcuQou6KPlgm+ONHA3Y=; b=UacxWCpsGMaD1/fa6W/G8iqfIwK6LvQQopmLtpR38Jvtye7u01iJE/Gz e7Yb7jtVpsj8gbNAyWvJN800M1rP/17xyj8hiIhH4Q/C9vrB8d+xMEyFu 5G7nBuRPdJz7vOecxb7mHPsGsHqF2y1p8UWBt7PnNI9Z3TRwM5pxdiU2S CBXtcJNGNoi/Ex9sUun4CXenu6nqMDbVRewOG/tK1nq1AXZVylEfqiglB ox3FWMsPLsXxIOUxkuKvlJeGhOpL5CFZDqWXXhoxwoA4L6Pe5VQPO3Qbm uYfko5eVfDEmBQFwkoA9tQcArcqFAyBXso4u4+i956sMRGTpKBoIm9lhO g==; X-IronPort-AV: E=Sophos;i="5.84,362,1620662400"; d="scan'208";a="177842496" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2021 12:41:06 +0800 IronPort-SDR: cSXQ9qEJsfTBGroe4nIJ88+F3VISgr4lG537KJxn6oCnX/1MFrry0EBaKae9mu6PxZgr9d0A1k mwifo2oJQVcYne6BzkEg5NAr79bLKpEV73AZhDGcNfoa7fFTuUHLwFJyEYYy9aLeosfvgPSIZC 2wL3xvOh1P7f0aCpDUqnHwEINYSR45B1qcQQB/69koj3J5lKAjoKM8QopQJSlrR2amaidDNBiY BMtFbjqs8owPshIu4NtMyZMSS/y6KoHlkkcxYl9LLD9eIdRXsDZlTf+wd5OAJHMyL3tueh1V1E CNlY5iMGQhiMSXEqh9bt+Kjv Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2021 21:17:57 -0700 IronPort-SDR: KOTaZgf0PS5gxmv5/bEFpv4VRpjqY41TsNh/6gadea1qDPzadFDsmXsFYchMj7W2ZKktVWoaJo Z6/QqqaGuT4ZvUZV40bYyLROL1+rA7ERFWmVI0PnyiQDptF+gRszB5TLR0DjHVtSl8jv5FXOMT /4OUssExguWgMA/cCs9AxP7Lgw1hxj8CPPBKGlzzSIiL2aUgaaHwdLx51dWivN6gp3C+MYqfgM KrJq+TXEb6v8/5iVyado56YcdrEfEfabMOKMf7F5UTcNR6C2wLyg8PZ/N/fg5v9xANF6BNgHM8 VIE= WDCIronportException: Internal Received: from unknown (HELO twashi.fujisawa.hgst.com) ([10.225.163.119]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Aug 2021 21:41:06 -0700 From: Damien Le Moal To: buildroot , Thomas Petazzoni Date: Mon, 30 Aug 2021 13:40:55 +0900 Message-Id: <20210830044100.260173-5-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210830044100.260173-1-damien.lemoal@wdc.com> References: <20210830044100.260173-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 4/9] board: Add Sipeed MAIX-bit support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add two configuration files to support the dual-core RV64 Canaan K210 SoC based Sipeed MAIX-bit board. The first configuration file, sipeed_maix_bit_defconfig, enables building a bootable kernel 5.13 image with the root file system initramfs linked with the kernel. This configuration modifies the default busybox configuration busybox-minimal.config using the fragment file board/canaan/k210-common/busybox-tiny.config. This reduces the size of the busybox executable to save memory when executing shell commands. The second configuration file (sipeed_maix_bit_sdcard_defconfig) builds a bootable kernel 5.13 image that uses the board SD card for the root file system. This configuration uses the default busybox minimal configuration. Both configurations share the same device tree which is provided by and built-in the kernel. This configuration is set with the kernel configuration snippet provided by the configuration file board/sipeed/maix-bit/linux-dtb.config. Both configurations also share the same init script provided using the rootfs_overlay root file system overlay. This provides the /sbin/init script which replaces the default init process as it causes failures due to excessive memory usage. busybox-tiny.config and the rootfs overlay will be reused for all Canaan K210 SoC based boards. These 2 files are thus placed in the directory board/canaan/k210-common while the Sipeed MAIX-bit board specific kernel config snippet is added under the directory board/sipeed/maix-bit. Signed-off-by: Damien Le Moal --- board/canaan/k210-common/busybox-tiny.config | 243 ++++++++++++++++++ board/canaan/k210-common/rootfs_overlay/init | 1 + .../k210-common/rootfs_overlay/sbin/init | 27 ++ board/sipeed/maix-bit/linux-dtb.config | 2 + configs/sipeed_maix_bit_defconfig | 15 ++ configs/sipeed_maix_bit_sdcard_defconfig | 14 + 6 files changed, 302 insertions(+) create mode 100644 board/canaan/k210-common/busybox-tiny.config create mode 120000 board/canaan/k210-common/rootfs_overlay/init create mode 100755 board/canaan/k210-common/rootfs_overlay/sbin/init create mode 100644 board/sipeed/maix-bit/linux-dtb.config create mode 100644 configs/sipeed_maix_bit_defconfig create mode 100644 configs/sipeed_maix_bit_sdcard_defconfig diff --git a/board/canaan/k210-common/busybox-tiny.config b/board/canaan/k210-common/busybox-tiny.config new file mode 100644 index 0000000000..f78b837b2a --- /dev/null +++ b/board/canaan/k210-common/busybox-tiny.config @@ -0,0 +1,243 @@ +# +# 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 + +# +# Build Options +# +CONFIG_NOMMU=y +CONFIG_EXTRA_CFLAGS="-Os -fPIC" +CONFIG_EXTRA_LDFLAGS="-Os -static -Wl,-elf2flt=-r" +# CONFIG_STACK_OPTIMIZATION_386 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 + +# +# Applets +# + +# +# 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-common/rootfs_overlay/init b/board/canaan/k210-common/rootfs_overlay/init new file mode 120000 index 0000000000..a0b71977c0 --- /dev/null +++ b/board/canaan/k210-common/rootfs_overlay/init @@ -0,0 +1 @@ +/sbin/init \ No newline at end of file diff --git a/board/canaan/k210-common/rootfs_overlay/sbin/init b/board/canaan/k210-common/rootfs_overlay/sbin/init new file mode 100755 index 0000000000..6ec4748c03 --- /dev/null +++ b/board/canaan/k210-common/rootfs_overlay/sbin/init @@ -0,0 +1,27 @@ +#!/bin/sh + +# Mount sysfs and procfs +/bin/mount -t sysfs sysfs /sys +/bin/mount -t proc proc /proc + +# 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/null; then + exec 0/dev/console + exec 2>/dev/console +fi + +# Print a fun logo :) +echo " __ _" +echo " / / (_) ____ _ _ __ __" +echo " / / | || _ \\ | | | |\\ \\/ /" +echo " / /___| || | | || |_| | > < " +echo " /_____/|_||_| |_| \\____|/_/\\_\\" +echo " 64-bits RISC-V Kendryte K210 NOMMU" +echo "" + +# Start interactive shell +exec /bin/sh diff --git a/board/sipeed/maix-bit/linux-dtb.config b/board/sipeed/maix-bit/linux-dtb.config new file mode 100644 index 0000000000..de2f8fd074 --- /dev/null +++ b/board/sipeed/maix-bit/linux-dtb.config @@ -0,0 +1,2 @@ +CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y +CONFIG_SOC_CANAAN_K210_DTB_SOURCE="sipeed_maix_bit" diff --git a/configs/sipeed_maix_bit_defconfig b/configs/sipeed_maix_bit_defconfig new file mode 100644 index 0000000000..1d3934e927 --- /dev/null +++ b/configs/sipeed_maix_bit_defconfig @@ -0,0 +1,15 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maix-bit/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-common/busybox-tiny.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_INITRAMFS=y diff --git a/configs/sipeed_maix_bit_sdcard_defconfig b/configs/sipeed_maix_bit_sdcard_defconfig new file mode 100644 index 0000000000..0c787143a8 --- /dev/null +++ b/configs/sipeed_maix_bit_sdcard_defconfig @@ -0,0 +1,14 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210_sdcard" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maix-bit/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_EXT2=y From patchwork Mon Aug 30 04:40:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1522053 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=FqccKzDn; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyd382D9dz9sRf for ; Mon, 30 Aug 2021 14:42:28 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id E3BB140443; Mon, 30 Aug 2021 04:42:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5R2KyojVPYce; Mon, 30 Aug 2021 04:42:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 8981540436; Mon, 30 Aug 2021 04:42:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 39DD91BF2F4 for ; Mon, 30 Aug 2021 04:41:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 375876075B for ; Mon, 30 Aug 2021 04:41:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=wdc.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7ceftuBZCb7G for ; Mon, 30 Aug 2021 04:41:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by smtp3.osuosl.org (Postfix) with ESMTPS id 3D79A6067E for ; Mon, 30 Aug 2021 04:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1630298468; x=1661834468; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WMghBbbAyJCOMQsFDntiDRZAp9Jj4aAhmtR57Kma/bo=; b=FqccKzDnZ69jftgF1cikr2s53qQQQIdicRroydvT+3OhHu4XJlI0yaOz 9zLunOaU83bB/1pJMhpF+ZySXYr/yvP8ituJZF3tvmKSWJvkghAlZoU76 +FxRCzy++ttp7mWQfhF3kvySMMsh4jUj7avtQBwPeSuU85cZuDmnjT4F/ X5BlBMMpxy5kNDfRla1YnAhycxPPjDu/ywuSXBDyrR/X1SVuwuLX7GlTj KrXKJRQsyXOd7wqHi3lUU8SvA2awXEE+9cyedBCTXnfbNxeK4MnoxzXU5 PnrKt5FeSAQv4KGDSY3Ph81mdYyAs1k6Lut1EQIefeTbIDC/vhWJHWVDc Q==; X-IronPort-AV: E=Sophos;i="5.84,362,1620662400"; d="scan'208";a="177842500" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2021 12:41:08 +0800 IronPort-SDR: 3aVUVPgQSe1ACdqfIly5QXenv7dQx0i/4JhX3vVar1rfkZmDd9OtABAybC/zjb1An3WmpPdXB1 zNeDq+sWYisYG/7UqszF3AE9nTBazi5RdZ2XInNcTNagXYbSxjb8RrzNa9ZlspGUfhAFB9+gDw FuCygu5NYAsSHsX5bCUkelS+6zEsGSrmfaxV2r7GNayIR6rfxotO0dV34wpS7R76WhCMHej0Fl W9O4+P12BNt3N8GcMdjGZzNCsOHi08qQLKuzDXlxmBrhYr6YO3SY8ChMnHNZW0fvc0cyrdsU1O SF1UuMafmGwM/pvJsRRYMQMY Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2021 21:17:58 -0700 IronPort-SDR: ImG9j8meeDxmd+yx6Z8lU8NZMo9cEo7Tjzmfd1ZQaAsJFofQGzVM2ESkyCWFB7AeFtMUow+iCF ZRaTkrfvpeLCVZf8Taz7hnjAZqXxl6thobsmbaL9rgT9WWK6j14XkgsbU9rB/BXa3quR5rHLwI BxhBU/aKi3SXs8Xy70MJWF3WpGQMEbHB5wo+ppqq0kjQKRb8YIStRQucc1DVKitx2WphliYM1Q Bnt/yLglsMaNMuPyVQkDZsphwvjcPPbh8Z+Aog3WFBB9OxdrHHaq3vTg4iwh0fPBLEEgWQeGtq QaQ= WDCIronportException: Internal Received: from unknown (HELO twashi.fujisawa.hgst.com) ([10.225.163.119]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Aug 2021 21:41:07 -0700 From: Damien Le Moal To: buildroot , Thomas Petazzoni Date: Mon, 30 Aug 2021 13:40:56 +0900 Message-Id: <20210830044100.260173-6-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210830044100.260173-1-damien.lemoal@wdc.com> References: <20210830044100.260173-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 5/9] board: Add Sipeed MAIX-Go support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add two configuration files to support the dual-core RV64 Canaan K210 SoC based Sipeed MAIX-Go board. These configurations are similar to the Sipeed MAIX-bit board configurations, differing only by the built-in kernel device tree used. Signed-off-by: Damien Le Moal --- board/sipeed/maix-go/linux-dtb.config | 2 ++ configs/sipeed_maix_go_defconfig | 15 +++++++++++++++ configs/sipeed_maix_go_sdcard_defconfig | 14 ++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 board/sipeed/maix-go/linux-dtb.config create mode 100644 configs/sipeed_maix_go_defconfig create mode 100644 configs/sipeed_maix_go_sdcard_defconfig diff --git a/board/sipeed/maix-go/linux-dtb.config b/board/sipeed/maix-go/linux-dtb.config new file mode 100644 index 0000000000..ea8c30e266 --- /dev/null +++ b/board/sipeed/maix-go/linux-dtb.config @@ -0,0 +1,2 @@ +CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y +CONFIG_SOC_CANAAN_K210_DTB_SOURCE="sipeed_maix_go" diff --git a/configs/sipeed_maix_go_defconfig b/configs/sipeed_maix_go_defconfig new file mode 100644 index 0000000000..8ce2258e96 --- /dev/null +++ b/configs/sipeed_maix_go_defconfig @@ -0,0 +1,15 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maix-go/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-common/busybox-tiny.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_INITRAMFS=y diff --git a/configs/sipeed_maix_go_sdcard_defconfig b/configs/sipeed_maix_go_sdcard_defconfig new file mode 100644 index 0000000000..6f1c2316d2 --- /dev/null +++ b/configs/sipeed_maix_go_sdcard_defconfig @@ -0,0 +1,14 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210_sdcard" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maix-go/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_EXT2=y From patchwork Mon Aug 30 04:40:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1522056 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=kLFXuW07; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyd3r3FVLz9sRf for ; Mon, 30 Aug 2021 14:43:04 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A262940415; Mon, 30 Aug 2021 04:43:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UFnquQwCHtba; Mon, 30 Aug 2021 04:42:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 564DC40423; Mon, 30 Aug 2021 04:42:57 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B53151BF2F4 for ; Mon, 30 Aug 2021 04:41:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B06D060755 for ; Mon, 30 Aug 2021 04:41:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=wdc.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J8gh_9LEstn1 for ; Mon, 30 Aug 2021 04:41:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5F2CD606EF for ; Mon, 30 Aug 2021 04:41:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1630298469; x=1661834469; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FzZ46Tz6z2nBVkChiKYHJcLir1fNUbpV9SEjLKkM7P8=; b=kLFXuW07Q98DQj4cMcpTDTt1eySM5mGTJmqCT5sHrbY44pfRJQokviCO 5kZAHAc5gGZ8/51HmyyJPKK/hDFw1u7LIgqhkwH28raPG2tJ8vglH7wwE BGtCHMIJJ7IS7xoWlGJBQFVxTTW/G+M7cJFDqtYvJhajLCCosqbzO2b2W UiaVoaIpcd22OZpOwbhniTfb2moKWbHewp4Mvy5lAP6OwAmRkB7kfk+2i nCGxPnfoaw0zDe+D5YFnfLLUVkxHSBuf5h3SCxuT6yUMp0z0rbumAZl5W q9Eu79N+Dj1+lJq23m4VuZFS/xCFx5c6uEtbcTJSI0mqOKxdDsuYAien8 A==; X-IronPort-AV: E=Sophos;i="5.84,362,1620662400"; d="scan'208";a="177842503" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2021 12:41:09 +0800 IronPort-SDR: JyMBBFs+9+wn8eb8qvRfyAIm+jl/fDM3ZUm93NjAgOVP8LGPKhydR8cwlszRk8dr7mk+pVurbh KpVARgWxEp3HFgRChecMQyvfgg3WY5sHZf0A9Vy2NGLgNnyIb3da7+UGReOTlC0+tcrSowipId g43QeYxpjJdmsxxq8owJI8Y3uzi2gCiKX5GYAvjzX26P3YPO3K6Ul5sCbaBX0EVBOHbfnrzMtD z4eimvIK8Gm8zpTlhZFAQPal3EjZ8Q07p1XVL0uFxkYkrechba2wUb9Z6rYdx28CtIBPSFmyfl a/7Tmb6vDddCMsP2Cja2J7oC Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2021 21:18:00 -0700 IronPort-SDR: r1DFcQmrHHBV/QoLArIlqcOEegvJdes4rnttaWnZYQwBCp8lrVNb74+s0c+uBDWvtJ0IuGkvZy rSKhI70ntfBumKSLP4kvO3cvgitbiUdDNo8q6NgWECIxiVR0vPorvy/mHsB38eKTi7ogvcQeCC F+doTgiAIro69R9jbeTTorBacH3LByBnW15lUcj1L/3I11+Wf3LJlf4EIyyLSDNl3UUC7mRiks VjvJojF3fa6rqahoyJMo8kuq1pqcIr1bQb11Zo0tOC7w4WtAx46PWgPG95SRFeMRXlaE+iYyla oZ0= WDCIronportException: Internal Received: from unknown (HELO twashi.fujisawa.hgst.com) ([10.225.163.119]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Aug 2021 21:41:08 -0700 From: Damien Le Moal To: buildroot , Thomas Petazzoni Date: Mon, 30 Aug 2021 13:40:57 +0900 Message-Id: <20210830044100.260173-7-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210830044100.260173-1-damien.lemoal@wdc.com> References: <20210830044100.260173-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 6/9] board: Add Sipeed MAIXDUINO support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add two configuration files to support the dual-core RV64 Canaan K210 SoC based Sipeed MAIXDUINO board. These configurations are similar to the Sipeed MAIX-bit board configurations, differing only by the built-in kernel device tree used. Signed-off-by: Damien Le Moal --- board/sipeed/maixduino/linux-dtb.config | 2 ++ configs/sipeed_maixduino_defconfig | 15 +++++++++++++++ configs/sipeed_maixduino_sdcard_defconfig | 14 ++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 board/sipeed/maixduino/linux-dtb.config create mode 100644 configs/sipeed_maixduino_defconfig create mode 100644 configs/sipeed_maixduino_sdcard_defconfig diff --git a/board/sipeed/maixduino/linux-dtb.config b/board/sipeed/maixduino/linux-dtb.config new file mode 100644 index 0000000000..049a2550c5 --- /dev/null +++ b/board/sipeed/maixduino/linux-dtb.config @@ -0,0 +1,2 @@ +CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y +CONFIG_SOC_CANAAN_K210_DTB_SOURCE="sipeed_maixduino" diff --git a/configs/sipeed_maixduino_defconfig b/configs/sipeed_maixduino_defconfig new file mode 100644 index 0000000000..8d83fdf6ad --- /dev/null +++ b/configs/sipeed_maixduino_defconfig @@ -0,0 +1,15 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maixduino/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-common/busybox-tiny.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_INITRAMFS=y diff --git a/configs/sipeed_maixduino_sdcard_defconfig b/configs/sipeed_maixduino_sdcard_defconfig new file mode 100644 index 0000000000..47eb6fc7ae --- /dev/null +++ b/configs/sipeed_maixduino_sdcard_defconfig @@ -0,0 +1,14 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210_sdcard" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maixduino/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_EXT2=y From patchwork Mon Aug 30 04:40:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1522055 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=IouD+UfD; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyd3c2YJ4z9sRf for ; Mon, 30 Aug 2021 14:42:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0AB5A4040B; Mon, 30 Aug 2021 04:42:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dwnTxYbdlATu; Mon, 30 Aug 2021 04:42:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id F01A34041F; Mon, 30 Aug 2021 04:42:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 43CAC1BF2F4 for ; Mon, 30 Aug 2021 04:41:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 33E2560759 for ; Mon, 30 Aug 2021 04:41:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=wdc.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T6fDdMCaoOkD for ; Mon, 30 Aug 2021 04:41:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by smtp3.osuosl.org (Postfix) with ESMTPS id B46E860755 for ; Mon, 30 Aug 2021 04:41:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1630298470; x=1661834470; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dxxPStFpFcDPqjslRQ2TN3IJIlYfX5i0LJmtynPLQuI=; b=IouD+UfDFkOZ2lJBxBnzAWOm1VPqFEQHvx/qpoQwlEJ2NQ4hiQHpeKPD 759/4r194znOOClWei5db7IKLtFXB2nASJAwK82FKA8aMkegvISwg/qAV ebDkwkT1OvoxFW/GKa0/jB/F4dkSgef4R0gJHuUxYrpDIR4WHnyDQ6XIm GUy0WYBcUntV4ekXadlBA0Sw7StiC3YaA5SmjjEqbPzPgtd9MwoOo4sPg xtOYD/iJiatDdGheSH6OqnwadguY+4bLr/uwbMoPzjdIxcioePBSZSGU9 jDYA+x48JdNBBnz7WEkGWKv1zzo8lX0yPsGczBGSTybBPRTTKNgIkHPzE Q==; X-IronPort-AV: E=Sophos;i="5.84,362,1620662400"; d="scan'208";a="177842508" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2021 12:41:10 +0800 IronPort-SDR: IU/bkq2RybQFMqYJLhh/c8l8ppmbZbNJf+Tm7lm569udqJQ5FNBwEZ9ZGukB3AhJKBPoVw+/9m hmchNuUjZAnF/rKmsUYIosrGqlUrgoOlJzjL4kzoQ/Ngb3MpQOBxP7Hc3DNyph2HkfEpAIPEu6 zzWrPZczjPxbzIxEq5KiiWDe6m0jdLVmX0fuKQX2AR2UJaztYh4QjwkRi5DJ5ubRdXGEqXKnu+ C+0iMVylL1CFAquAQlOVbDkQ5i3qv3mFiASMVKO7AmLI4e8QsZ3RaZEytEvPSBC3vRE2hCi0Uj NNfMzy/Irm1HB3DezCe80Q5q Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2021 21:18:01 -0700 IronPort-SDR: Fhf08WSW6QdFdHKGtDfmD9uXLL7TXNHRmb5aj2v/KwCFxrv1KcUdczaSDGlLim6WI+/7VJJGLk pTO4O4gPz+nJn6smLoYAgnhDcwEWGvkYGv6u8OK1BqDloe0EIGuFqAE/McngdbSvSG1cibKlLs FFLpiJpEM/ZcM3miAG9DMnZuJ5b64gNXUWLu1KbSkXoD7su0GjuWxqE3V5OriCOIBhOtYRXznn k8uanEdH+2P+HHocX3aiHNEY15iyffumFex2ZMXS9SVKHffytRIChOXjo1BtE9WXBzEJn9ZV44 Wc4= WDCIronportException: Internal Received: from unknown (HELO twashi.fujisawa.hgst.com) ([10.225.163.119]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Aug 2021 21:41:09 -0700 From: Damien Le Moal To: buildroot , Thomas Petazzoni Date: Mon, 30 Aug 2021 13:40:58 +0900 Message-Id: <20210830044100.260173-8-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210830044100.260173-1-damien.lemoal@wdc.com> References: <20210830044100.260173-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 7/9] board: Add Sipeed MAIX-Dock support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add two configuration files to support the dual-core RV64 Canaan K210 SoC based Sipeed MAIX-Dock board. These configurations are similar to the Sipeed MAIX-bit board configurations, differing only by the built-in kernel device tree used. Signed-off-by: Damien Le Moal --- board/sipeed/maix-dock/linux-dtb.config | 2 ++ configs/sipeed_maix_dock_defconfig | 15 +++++++++++++++ configs/sipeed_maix_dock_sdcard_defconfig | 14 ++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 board/sipeed/maix-dock/linux-dtb.config create mode 100644 configs/sipeed_maix_dock_defconfig create mode 100644 configs/sipeed_maix_dock_sdcard_defconfig diff --git a/board/sipeed/maix-dock/linux-dtb.config b/board/sipeed/maix-dock/linux-dtb.config new file mode 100644 index 0000000000..b1ca3166f8 --- /dev/null +++ b/board/sipeed/maix-dock/linux-dtb.config @@ -0,0 +1,2 @@ +CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y +CONFIG_SOC_CANAAN_K210_DTB_SOURCE="sipeed_maix_dock" diff --git a/configs/sipeed_maix_dock_defconfig b/configs/sipeed_maix_dock_defconfig new file mode 100644 index 0000000000..253ba2690d --- /dev/null +++ b/configs/sipeed_maix_dock_defconfig @@ -0,0 +1,15 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maix-dock/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-common/busybox-tiny.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_INITRAMFS=y diff --git a/configs/sipeed_maix_dock_sdcard_defconfig b/configs/sipeed_maix_dock_sdcard_defconfig new file mode 100644 index 0000000000..3e6b9b1026 --- /dev/null +++ b/configs/sipeed_maix_dock_sdcard_defconfig @@ -0,0 +1,14 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210_sdcard" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sipeed/maix-dock/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_EXT2=y From patchwork Mon Aug 30 04:40:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1522054 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=EyalwbiK; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyd3N6sYkz9sRf for ; Mon, 30 Aug 2021 14:42:40 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 1C36B6067E; Mon, 30 Aug 2021 04:42:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dtdYraAgMZ9X; Mon, 30 Aug 2021 04:42:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 1266C606EF; Mon, 30 Aug 2021 04:42:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 404DF1BF2F4 for ; Mon, 30 Aug 2021 04:41:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3DCEE6067E for ; Mon, 30 Aug 2021 04:41:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BPqITpjQ_AfX for ; Mon, 30 Aug 2021 04:41:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by smtp3.osuosl.org (Postfix) with ESMTPS id CE61460759 for ; Mon, 30 Aug 2021 04:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1630298471; x=1661834471; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cF+Wu5R2Haz+8r1wawZUTcvf67T/32+97UgtJEsZxjM=; b=EyalwbiKEaVJET+UfjxzyzOl7vrnf3HhATVX7c3SgyKb45RJaQ3L5EM3 r61qVhRR7KTDYB15dHm0wJtx1c8DLfP2X2pl3HtYcCoJzHbjaaAxZm3oj bL9cXantcQdP8nzIXHb3K/xMqlONlgvy1HrqhJ9aWGNUdU2TPGyQNubb9 jy17yMKaikb/uusw24tNqXYy6oNWwN4q2yrdxOl7tPHmLuWzSLx3hOKMx JmyOa+clxrdHbgq66Ht5VZTx2oRi5Ey1Lurwkh7+LwLsEn75+W7DkRay2 qIypl0eJpaB6dge3QlkTanFyb8Yuy0o65XPORzt/M+eXo2pIOoRTqLh5y Q==; X-IronPort-AV: E=Sophos;i="5.84,362,1620662400"; d="scan'208";a="177842512" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2021 12:41:11 +0800 IronPort-SDR: dxqxbt9CjUnTWk1F1O9X4aatZtRrfiSmFJcqOKuWLUgk2krvmRORQXe8/VbDXDz08sCjy8/Icf d0n41EanRwXpzm0my3tY0zFm4JYuC/AKS8BnSLeCSwSOxA2kaWzGwql2CnLMZi2T6ijdXmmNSh 8WiS0dbXB9mxGgozxDVB/RBFzzQD+naxDBZaC+T5mPLOXN16eKq7/kXpxgy3Ov9Lttu07tiDCD /SRDTiQ5G5y/caeiUA6JnlEhCmo1bKqo6No2bQgjKylhn2VBMtCDEH+Yk2Z2MgT15W9UIttfFV AJX69L+NMIrqWRMFvnDyrh8e Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2021 21:18:02 -0700 IronPort-SDR: no3E+ZohNMDNGhe27UZjBxf3jzY9lJOk4IAiWNaTNAkS3l2Ke1m+6EO6jpR8XiTBPG+UimwkP+ uzdYoFceEAqoQbiJrkoKMo4NbdmO+XDAQFIBJD0CXCkvNYheAMeXRx1AwoHENHFpeIWJkIv5R2 1hd/VsKDFhQNPw8xb3FpTVAhc56EU7jKhQcd4P8mp/LE3tlN8Ugaip/XEz6RAp9jyCjtS6R6xb /L8abzcKytbhV/Dkkdw3eFWpZzYNH3XUt5nVWQy3loBEMnYHu7Qotg4PovPY9VaaHhHORJ3QDU cSE= WDCIronportException: Internal Received: from unknown (HELO twashi.fujisawa.hgst.com) ([10.225.163.119]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Aug 2021 21:41:10 -0700 From: Damien Le Moal To: buildroot , Thomas Petazzoni Date: Mon, 30 Aug 2021 13:40:59 +0900 Message-Id: <20210830044100.260173-9-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210830044100.260173-1-damien.lemoal@wdc.com> References: <20210830044100.260173-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 8/9] board: Add Canaan KD233 support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add two configuration files to support the dual-core RV64 Canaan K210 SoC based KD233 development board. These configurations are similar to the configurations defined for the Sipeed boards, differing only by the built-in kernel device tree used. Signed-off-by: Damien Le Moal --- board/canaan/kd233/linux-dtb.config | 2 ++ configs/canaan_kd233_defconfig | 15 +++++++++++++++ configs/canaan_kd233_sdcard_defconfig | 14 ++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 board/canaan/kd233/linux-dtb.config create mode 100644 configs/canaan_kd233_defconfig create mode 100644 configs/canaan_kd233_sdcard_defconfig diff --git a/board/canaan/kd233/linux-dtb.config b/board/canaan/kd233/linux-dtb.config new file mode 100644 index 0000000000..d5b107124a --- /dev/null +++ b/board/canaan/kd233/linux-dtb.config @@ -0,0 +1,2 @@ +CONFIG_SOC_CANAAN_K210_DTB_BUILTIN=y +CONFIG_SOC_CANAAN_K210_DTB_SOURCE="canaan_kd233" diff --git a/configs/canaan_kd233_defconfig b/configs/canaan_kd233_defconfig new file mode 100644 index 0000000000..cabb6aa4f8 --- /dev/null +++ b/configs/canaan_kd233_defconfig @@ -0,0 +1,15 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/canaan/kd233/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/canaan/k210-common/busybox-tiny.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_INITRAMFS=y diff --git a/configs/canaan_kd233_sdcard_defconfig b/configs/canaan_kd233_sdcard_defconfig new file mode 100644 index 0000000000..c57418674f --- /dev/null +++ b/configs/canaan_kd233_sdcard_defconfig @@ -0,0 +1,14 @@ +BR2_riscv=y +BR2_KERNEL_HEADERS_5_13=y +BR2_PACKAGE_HOST_ELF2FLT=y +# BR2_USE_MMU is not set +BR2_INIT_NONE=y +BR2_ROOTFS_OVERLAY="board/canaan/k210-common/rootfs_overlay" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="nommu_k210_sdcard" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/canaan/kd233/linux-dtb.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_IMAGE_NAME="loader.bin" +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_TARGET_ROOTFS_EXT2=y From patchwork Mon Aug 30 04:41:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 1522057 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=eDIWFk+l; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gyd460ZHpz9sWX for ; Mon, 30 Aug 2021 14:43:17 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3F59980EA2; Mon, 30 Aug 2021 04:43:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pNN2uemwxe0Q; Mon, 30 Aug 2021 04:43:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 9630780E9C; Mon, 30 Aug 2021 04:43:09 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 817561BF2F4 for ; Mon, 30 Aug 2021 04:41:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 7E0BE606EF for ; Mon, 30 Aug 2021 04:41:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=wdc.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vI7zV8vFadwI for ; Mon, 30 Aug 2021 04:41:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by smtp3.osuosl.org (Postfix) with ESMTPS id 428906067E for ; Mon, 30 Aug 2021 04:41:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1630298473; x=1661834473; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hjMbqdwhgwl5WIzFb/frbt1DEhSFGH2v9gGh5YDOsQM=; b=eDIWFk+lORnVT+Bt4m+IrgZwoZFCm7KQ2RqVhrY9Tj5GWuuJ6y0kxesJ qv+R+rnLKA7Uuxv/18YgQEkXUoJJJC08RnFeHg72ualfLxpjlMqZ+vkyL p7iQKIJ/PeYUUwPFg/MjvhCBojvtE4mfQvJUYzl/7MZ7BuglX2RnZDUaV 2n7eUbPaAnTpXD+Sk2QlOOoDUZHa/ZMmQ+tLM6vqZcoY3Az7xD6Kc2eMY OM8o39/BHVHYt06j1oPAA0Qu7EZOasdT4X4nLezJtVIGRRWKvJoS6lcTs Viqo96n8vVwCbv1NMc2I94N9RDuRloUZJFa4JsYb0as2dHVYfNYjkJuzf w==; X-IronPort-AV: E=Sophos;i="5.84,362,1620662400"; d="scan'208";a="177842516" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2021 12:41:13 +0800 IronPort-SDR: sNoBOwNJa6FwxYjh8qBBgyoyfHMLrFZKGkpd1wdtFEm71K2MU0R7a0K0vhRshIAYrVc0wxBMEy qrOefCAt6ZnqTR33F7A5+aGrEUkkFjH3xKkYbC0zvAESnbdqHhZkIH/wuwC3MEAf8ELHDOJaWo kIuXV3tTLu7TulcA2xEcfcSDF7ZSYzuhnuSk+TjwCIkNw9mBrRn4viUtTSKLr4C4OXsucBfmbb C9YKgbmvTQzpJDbhE/VDUFDrn9xhh05EixREfZWMTQBktObKyce8NKCdD1r/W0A0hN4a79m669 j+57KtqIpsOr9gpBnHuZ47ul Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2021 21:18:03 -0700 IronPort-SDR: yLubW2JjmdO1rc6UMhvY6QkowxnHvXV5r+HMoCRFtD77R1ePSc+l3srFbwOCWhgbuRpRF/1K0o t7ZJPcQD1ZtUKnvJ6w/73QFvRAc3Y0va5pKmuQgs6c0pWjF/qLiF3HJyi+Wn6JLvAklNa5Zpks RCyDzsW6BGGBwVitA5LVQYqkbfXqc9d5ABVN978vIsF+1pYVMVsNLMTUv0Co1Wuevuv8jqP2vj LCzEPiaQ0+plcMU+f470WcQ+aYMhJQtV2QsUiRO2EeqF0RhOrga/abz5gn3FJ8jVdzsLfPfoOk qcs= WDCIronportException: Internal Received: from unknown (HELO twashi.fujisawa.hgst.com) ([10.225.163.119]) by uls-op-cesaip02.wdc.com with ESMTP; 29 Aug 2021 21:41:12 -0700 From: Damien Le Moal To: buildroot , Thomas Petazzoni Date: Mon, 30 Aug 2021 13:41:00 +0900 Message-Id: <20210830044100.260173-10-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210830044100.260173-1-damien.lemoal@wdc.com> References: <20210830044100.260173-1-damien.lemoal@wdc.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 9/9] board: Document Canaan K210 based boards support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add a generic board/canaan/k210-common/README.md file documenting how to generate and install buildroot images for boards based on the dual-core RV64 Canaan K210 SoC. A simple README.md file pointing to this generic documentation is also added under each K210 SoC board directory. Signed-off-by: Damien Le Moal Reviewed-by: Alistair Francis --- board/canaan/k210-common/README.md | 318 +++++++++++++++++++++++++++++ board/canaan/kd233/README.md | 4 + board/sipeed/maix-bit/README.md | 4 + board/sipeed/maix-dock/README.md | 4 + board/sipeed/maix-go/README.md | 4 + board/sipeed/maixduino/README.md | 4 + 6 files changed, 338 insertions(+) create mode 100644 board/canaan/k210-common/README.md create mode 100644 board/canaan/kd233/README.md create mode 100644 board/sipeed/maix-bit/README.md create mode 100644 board/sipeed/maix-dock/README.md create mode 100644 board/sipeed/maix-go/README.md create mode 100644 board/sipeed/maixduino/README.md diff --git a/board/canaan/k210-common/README.md b/board/canaan/k210-common/README.md new file mode 100644 index 0000000000..b9a4eca3b0 --- /dev/null +++ b/board/canaan/k210-common/README.md @@ -0,0 +1,318 @@ +# Canaan Kendryte K210 SoC Based Board Support + +Buildroot provides support for Canaan RISC-V Kendryte K210 SoC based boards. +Configurations for different K210 Soc board variants are available. The boards +supported are as follows. + +* From Sipeed: MAIX Bit, MAIX Dock (Dan Dock), MAIX Go and MAIXDUINO boards. + +* From Canaan: KD233 development board. + +For each board, two configurations are provided: + +* Configuration to build a bootable kernel image with built-in initramfs root +file system (SD card is not used) + +* Configuration to build a bootable kernel image with the root file system +on the board SD card. + +In all cases, the build process generates a bootable kernel image that can be +directly flashed to the board boot flash. A boot loader (e.g. U-Boot) and +OpenSBI are not necessary. + +## Bootable Kernel Image With A Built-In Initramfs Root File System + +The following table lists the default configuration provided for each board +supported. + +| Board vendor and model | configuration name | +| ---------------------- | --------------------------- | +| Canaan KD233 | canaan_kd233_defconfig | +| Sipeed MAIX bit | sipeed_maix_bit_defconfig | +| Sipeed MAIX Go | sipeed_maix_go_defconfig | +| Sipeed MAIX dock | sipeed_maix_dock_defconfig | +| Sipeed MAIXDUINO | sipeed_maixduino_defconfig | + +The build procedure is similar for all boards. The steps to create the kernel +bootable image are as follows: + +``` +$ make +$ make +``` + +The build process will generate the bootable binary image file +*output/images/loader.bin*. This image file must be written to the board boot +flash using the +[Sipeed kflash python utility](https://github.com/sipeed/kflash.py). + +``` +$ sudo python3 kflash.py -p /dev/ttyUSB0 -b 1500000 -t output/images/loader.bin +``` + +The above command will open a terminal console and reboot the board once the +image is written. The output will be similar to the following (example obtained +with the Sipeed MAIX Bit board). + +``` +[INFO] COM Port Selected Manually: /dev/ttyUSB0 +[INFO] Default baudrate is 115200 , later it may be changed to the value you set. +[INFO] Trying to Enter the ISP Mode... +._ +[INFO] Automatically detected goE/kd233 + +[INFO] Greeting Message Detected, Start Downloading ISP +Downloading ISP: |=================================================================| 100.0% 10kiB/s +[INFO] Booting From 0x80000000 +[INFO] Wait For 0.1 second for ISP to Boot +[INFO] Boot to Flashmode Successfully +[INFO] Selected Baudrate: 1500000 +[INFO] Baudrate changed, greeting with ISP again ... +[INFO] Boot to Flashmode Successfully +[INFO] Selected Flash: On-Board +[INFO] Initialization flash Successfully +Programming BIN: |=================================================================| 100.0% 50kiB/s +[INFO] Rebooting... +--- forcing DTR inactive +--- forcing RTS inactive +--- Miniterm on /dev/ttyUSB0 115200,8,N,1 --- +--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- +[ 0.000000] Linux version 5.13.0 (xxx@yyy.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2021.05-rc3-447-g26fab79296-dirty) 11.1.0, GNU ld (GNU Binutils) 2.32) #2 SMP Fri Jul 9 10:59:05 JST 2021 +[ 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=0x18000 too large for vmalloc space 0x0 +[ 0.000000] percpu: Embedded 12 pages/cpu s19360 r0 d29792 u49152 +[ 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: 6052K/8192K available (950K kernel code, 140K rwdata, 200K rodata, 480K init, 66K bss, 2140K 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 2 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.000002] 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.018250] pid_max: default: 4096 minimum: 301 +[ 0.022865] 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.040316] rcu: Hierarchical SRCU implementation. +[ 0.045151] smp: Bringing up secondary CPUs ... +[ 0.050271] smp: Brought up 1 node, 2 CPUs +[ 0.054355] devtmpfs: initialized +[ 0.071852] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns +[ 0.080926] pinctrl core: initialized pinctrl subsystem +[ 0.117980] clocksource: Switched to clocksource clint_clocksource +[ 0.130392] workingset: timestamp_bits=62 max_order=11 bucket_order=0 +[ 0.162498] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller +[ 0.175231] k210-sysctl 50440000.syscon: K210 system controller +[ 0.182048] k210-rst 50440000.syscon:reset-controller: K210 reset controller +[ 0.189335] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0 +[ 0.198258] printk: console [ttySIF0] enabled +[ 0.198258] printk: console [ttySIF0] enabled +[ 0.206899] printk: bootconsole [sifive0] disabled +[ 0.206899] printk: bootconsole [sifive0] disabled +[ 0.218821] cacheinfo: Unable to detect cache hierarchy for CPU 0 +[ 0.236193] i2c /dev entries driver +[ 0.240804] random: get_random_bytes called from 0x000000008000586e with crng_init=0 +[ 0.253005] Freeing unused kernel memory: 476K +[ 0.256754] This architecture does not have kernel memory protection. +[ 0.263177] Run /init as init process + __ _ + / / (_) ____ _ _ __ __ + / / | || _ \ | | | |\ \/ / + / /___| || | | || |_| | > < + /_____/|_||_| |_| \____|/_/\_\ + RISC-V Kendryte K210 NOMMU + + +BusyBox v1.33.1 (2021-07-09 10:58:24 JST) hush - the humble shell +Enter 'help' for a list of built-in commands. + +/ # +``` + +To open a console without re-flashing the board, *miniterm.py* can be used. +``` +sudo miniterm.py --raw --eol=LF /dev/ttyUSB0 115200 +``` + +The options *--raw --eol=LF* are added here to avoid a double carriage return +each time a command is entered. + +## Bootable Kernel Image With the Root File System On SD Card + +The following table lists the default configurations provided for the supported +boards. + +| Board vendor and model | configuration name | +| ---------------------- | ---------------------------------- | +| Canaan KD233 | canaan_kd233_sdcard_defconfig | +| Sipeed MAIX bit | sipeed_maix_bit_sdcard_defconfig | +| Sipeed MAIX Go | sipeed_maix_go_sdcard_defconfig | +| Sipeed MAIX dock | sipeed_maix_dock_sdcard_defconfig | +| Sipeed MAIXDUINO | sipeed_maixduino_sdcard_defconfig | + +The build procedure is similar to the built-in initramfs case. + +``` +$ make +$ make +``` + +The build process will generate two files under the *output/images* directory. + +* *loader.bin*: This bootable kernel image file. + +* *rootfs.ext2*: ext2 (rev1) SD card image. + +Before flashing the kernel bootable image, the SD card must be prepared. + +``` +$ sudo dd if=output/images/rootfs.ext2 of=/dev/sdX1 bs=1M +$ sync +$ eject /dev/sdX +``` + +Where */dev/sdX* is the device file name of the SD card. The SD card must have +at least one partition of at least 60 MB. Once completed, the SD card can be +inserted into the board and the kernel bootable image file written to the board +boot flash, using +[Sipeed kflash python utility](https://github.com/sipeed/kflash.py). + +``` +$ sudo python3 kflash.py -p /dev/ttyUSB0 -b 1500000 -t output/image/loader.bin +``` + +The above command will open a terminal console and reboot the board once the +image is written. The output will be similar to the following (example obtained +with the Sipeed MAIX Bit board). + +``` +[INFO] COM Port Selected Manually: /dev/ttyUSB0 +[INFO] Default baudrate is 115200 , later it may be changed to the value you set. +[INFO] Trying to Enter the ISP Mode... +._ +[INFO] Automatically detected goE/kd233 + +[INFO] Greeting Message Detected, Start Downloading ISP +Downloading ISP: |=================================================================| 100.0% 10kiB/s +[INFO] Booting From 0x80000000 +[INFO] Wait For 0.1 second for ISP to Boot +[INFO] Boot to Flashmode Successfully +[INFO] Selected Baudrate: 1500000 +[INFO] Baudrate changed, greeting with ISP again ... +[INFO] Boot to Flashmode Successfully +[INFO] Selected Flash: On-Board +[INFO] Initialization flash Successfully +Programming BIN: |=================================================================| 100.0% 50kiB/s +[INFO] Rebooting... +--- forcing DTR inactive +--- forcing RTS inactive +--- Miniterm on /dev/ttyUSB0 115200,8,N,1 --- +--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- +[ 0.000000] Linux version 5.13.0 (damien@twashi.fujisawa.hgst.com) (riscv64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2021.05-rc3-447-g26fab79296-dirty) 11.1.0, GNU ld (GNU Binutils) 2.32) #1 SMP Fri Jul 9 14:50:18 JST 2021 +[ 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=0x18000 too large for vmalloc space 0x0 +[ 0.000000] percpu: Embedded 12 pages/cpu s19488 r0 d29664 u49152 +[ 0.000000] Built 1 zonelists, mobility grouping off. Total pages: 2020 +[ 0.000000] Kernel command line: earlycon console=ttySIF0 rootdelay=2 root=/dev/mmcblk0p1 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: 6184K/8192K available (1149K kernel code, 151K rwdata, 232K rodata, 105K init, 69K bss, 2008K 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 2 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.008179] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200) +[ 0.018252] pid_max: default: 4096 minimum: 301 +[ 0.022859] 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.040382] rcu: Hierarchical SRCU implementation. +[ 0.045234] smp: Bringing up secondary CPUs ... +[ 0.050345] smp: Brought up 1 node, 2 CPUs +[ 0.054419] devtmpfs: initialized +[ 0.071317] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns +[ 0.080392] pinctrl core: initialized pinctrl subsystem +[ 0.119377] clocksource: Switched to clocksource clint_clocksource +[ 0.131238] workingset: timestamp_bits=62 max_order=11 bucket_order=0 +[ 0.159389] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller +[ 0.171494] k210-sysctl 50440000.syscon: K210 system controller +[ 0.178193] k210-rst 50440000.syscon:reset-controller: K210 reset controller +[ 0.186800] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0 +[ 0.195764] printk: console [ttySIF0] enabled +[ 0.195764] printk: console [ttySIF0] enabled +[ 0.204377] printk: bootconsole [sifive0] disabled +[ 0.204377] printk: bootconsole [sifive0] disabled +[ 0.216056] cacheinfo: Unable to detect cache hierarchy for CPU 0 +[ 0.232882] i2c /dev entries driver +[ 0.263551] mmc_spi spi2.0: SD/MMC host mmc0, no WP, no poweroff, cd polling +[ 0.271167] random: get_random_bytes called from 0x0000000080005d60 with crng_init=0 +[ 0.289511] Waiting 2 sec before mounting root device... +[ 0.312217] mmc0: host does not support reading read-only switch, assuming write-enable +[ 0.319565] mmc0: new SDHC card on SPI +[ 0.326205] mmcblk0: mmc0:0000 SA16G 14.5 GiB +[ 0.333339] random: fast init done +[ 0.337935] mmcblk0: p1 p2 +[ 2.311900] VFS: Mounted root (ext2 filesystem) readonly on device 179:1. +[ 2.321555] devtmpfs: mounted +[ 2.324099] Freeing unused kernel memory: 100K +[ 2.328227] This architecture does not have kernel memory protection. +[ 2.334652] Run /sbin/init as init process +[ 2.491565] random: crng init done + __ _ + / / (_) ____ _ _ __ __ + / / | || _ \ | | | |\ \/ / + / /___| || | | || |_| | > < + /_____/|_||_| |_| \____|/_/\_\ + RISC-V Kendryte K210 NOMMU + + +BusyBox v1.33.1 (2021-07-09 10:58:24 JST) hush - the humble shell +Enter 'help' for a list of built-in commands. + +/ # +``` + +Of note is that the kernel command line arguments, specified in the kernel +*nommu_k210_sdcard* default configuration, mount the SD card as read-only to +avoid corruptions of the ext2 root file system. This is recommended as this +board does not isupport clean shutdown or halt. + +Similarly to the initramfs build case, a console can be open without +re-flashing the board using *miniterm.py*. +``` +sudo miniterm.py --raw --eol=LF /dev/ttyUSB0 115200 +``` diff --git a/board/canaan/kd233/README.md b/board/canaan/kd233/README.md new file mode 100644 index 0000000000..e622d121c2 --- /dev/null +++ b/board/canaan/kd233/README.md @@ -0,0 +1,4 @@ +# Canaan KD233 Board + +See the common documentation for +[Canaan K210 SoC based boards](../k210-common/README.md). diff --git a/board/sipeed/maix-bit/README.md b/board/sipeed/maix-bit/README.md new file mode 100644 index 0000000000..c9132bcc76 --- /dev/null +++ b/board/sipeed/maix-bit/README.md @@ -0,0 +1,4 @@ +# Sipeed MAIX-Bit Board + +See the common documentation for +[Canaan K210 SoC based boards](../../canaan/k210-common/README.md). diff --git a/board/sipeed/maix-dock/README.md b/board/sipeed/maix-dock/README.md new file mode 100644 index 0000000000..fec6fb9939 --- /dev/null +++ b/board/sipeed/maix-dock/README.md @@ -0,0 +1,4 @@ +# Sipeed MAIX-Dock Board + +See the common documentation for +[Canaan K210 SoC based boards](../../canaan/k210-common/README.md). diff --git a/board/sipeed/maix-go/README.md b/board/sipeed/maix-go/README.md new file mode 100644 index 0000000000..1f14f65410 --- /dev/null +++ b/board/sipeed/maix-go/README.md @@ -0,0 +1,4 @@ +# Sipeed MAIX-Go Board + +See the common documentation for +[Canaan K210 SoC based boards](../../canaan/k210-common/README.md). diff --git a/board/sipeed/maixduino/README.md b/board/sipeed/maixduino/README.md new file mode 100644 index 0000000000..daf0f763c9 --- /dev/null +++ b/board/sipeed/maixduino/README.md @@ -0,0 +1,4 @@ +# Sipeed MAIXDUINO Board + +See the common documentation for +[Canaan K210 SoC based boards](../../canaan/k210-common/README.md).