From patchwork Wed Dec 14 22:15:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1715943 X-Patchwork-Delegate: jacmet@gmail.com Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NXV72405Hz23yy for ; Thu, 15 Dec 2022 09:15:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id DFC6C40BEA; Wed, 14 Dec 2022 22:15:40 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org DFC6C40BEA 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 W75CzBUAhl8Y; Wed, 14 Dec 2022 22:15:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id D557340BF5; Wed, 14 Dec 2022 22:15:38 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D557340BF5 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9A6B01BF947 for ; Wed, 14 Dec 2022 22:15:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 82C4A81F6C for ; Wed, 14 Dec 2022 22:15:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 82C4A81F6C 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 YxSrkeHcnxKj for ; Wed, 14 Dec 2022 22:15:17 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org DEA3681F6B Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by smtp1.osuosl.org (Postfix) with ESMTPS id DEA3681F6B for ; Wed, 14 Dec 2022 22:15:16 +0000 (UTC) Received: by mail-ej1-x635.google.com with SMTP id kw15so47930972ejc.10 for ; Wed, 14 Dec 2022 14:15:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IIKdcaKUxxtaW0+ij5AJ6jgOkGbBn76v8SYtoaTss9A=; b=Ow99hwjwob6gpOWiYuBrCr524/yML7LTlJFrj5nnNVc7ik2JlGApoTSjNBxiiH1kh+ mnfEmEmpk0u64dbUck0ofvih/orEW1wFj2jEoyLQViCEAPFmFLj2DT9ibzH5C/teKJWJ RRfoaSEHSkFODW+UzJfNPkCKTLAgYadAWuAPO8grOYDd2+/p6H9oxQtiQkuMZc+7LCJb 4/QI6ueDdKwy6Cpw1v85iYWWE/j+4am1VHB+fKqql1gYUFlcfeA3XgSv98raoodHSUfH gbxVP76oY2lzO7h7F7nGv7y8eYVENOvPyPrtdwG28reBagEpC8mV3c/18y8Z82/kG1ue GJig== X-Gm-Message-State: ANoB5pmHQaujiZGZrWCD65mjxpAGNcraQDFL9Y00ocv//RLDmskbdkZX zQ0xKRYNSlkihLbLL/Hm+kGELJ7mncOGO0ss1jQ= X-Google-Smtp-Source: AA0mqf4JQF+0kWYvgQITOFJkLXrAvtZIKCm9SEVFetQ76iDM3yxOW4FT6z0QU5wC74ldAlHwN0gAMA== X-Received: by 2002:a17:907:7424:b0:7c1:6fd3:1ef3 with SMTP id gj36-20020a170907742400b007c16fd31ef3mr11645005ejc.33.1671056114660; Wed, 14 Dec 2022 14:15:14 -0800 (PST) Received: from angelo-ThinkPad-X270.. (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id f13-20020a17090631cd00b0073c8d4c9f38sm6502684ejf.177.2022.12.14.14.15.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 14:15:14 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 14 Dec 2022 23:15:05 +0100 Message-Id: <20221214221506.43849-2-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221214221506.43849-1-angelo@amarulasolutions.com> References: <20221214221506.43849-1-angelo@amarulasolutions.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IIKdcaKUxxtaW0+ij5AJ6jgOkGbBn76v8SYtoaTss9A=; b=cchgYs1CJQdyr+5NNrILTvP9BYnPNwlvjH55M0BnRM5kILlGytQNFBIXL2oItFBeSE ihGXp/fnvAp3h0yu652IQhzTzT9gLaV09QspPphIZMDmUk25C6BkAGioxaLONbR43LXH w1DOaXMwAyn+j5JkA3CJLEmCY0MOQllvSKtt4= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=cchgYs1C Subject: [Buildroot] [PATCH v5 2/3] configs/lichee_rv: new defconfig X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: indrek.kruusa@gmail.com, Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Lichee RV - Nezha CM is a compute module with modular design, equipped with Allwinner D1 chip (based on T-Head XuanTie C906 core), 512MB DDR3 RAM. Board support is based on the nezha defconfig already available in buildroot. https://wiki.sipeed.com/hardware/en/lichee/RV/RV.html https://linux-sunxi.org/Sipeed_Lichee_RV Signed-off-by: Angelo Compagnucci Reviewed-by: Indrek Kruusa Tested-by: Indrek Kruusa --- v5: * Fixing typos in readme (Indrek Kruusa) v4: * bump to latest kernel/uboot/opensbi as for the nezha defconfig board/sipeed/lichee_rv/genimage.cfg | 19 +++++++++++ .../overlay/boot/extlinux/extlinux.conf | 4 +++ board/sipeed/lichee_rv/readme.txt | 26 +++++++++++++++ configs/sipeed_lichee_rv_defconfig | 33 +++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 board/sipeed/lichee_rv/genimage.cfg create mode 100644 board/sipeed/lichee_rv/overlay/boot/extlinux/extlinux.conf create mode 100644 board/sipeed/lichee_rv/readme.txt create mode 100644 configs/sipeed_lichee_rv_defconfig diff --git a/board/sipeed/lichee_rv/genimage.cfg b/board/sipeed/lichee_rv/genimage.cfg new file mode 100644 index 0000000000..d5df41203d --- /dev/null +++ b/board/sipeed/lichee_rv/genimage.cfg @@ -0,0 +1,19 @@ +# Minimal SD card image for the sipeed Lichee RV + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = false + image = "u-boot-sunxi-with-spl.bin" + offset = 8K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + bootable = "true" + offset = 1M + } +} diff --git a/board/sipeed/lichee_rv/overlay/boot/extlinux/extlinux.conf b/board/sipeed/lichee_rv/overlay/boot/extlinux/extlinux.conf new file mode 100644 index 0000000000..91b2298628 --- /dev/null +++ b/board/sipeed/lichee_rv/overlay/boot/extlinux/extlinux.conf @@ -0,0 +1,4 @@ +label linux + kernel /boot/Image + # use devicetree from u-boot + append console=ttyS0,115200 root=/dev/mmcblk0p1 ro rootwait diff --git a/board/sipeed/lichee_rv/readme.txt b/board/sipeed/lichee_rv/readme.txt new file mode 100644 index 0000000000..24e8141851 --- /dev/null +++ b/board/sipeed/lichee_rv/readme.txt @@ -0,0 +1,26 @@ +Lichee RV +=============== + +Lichee RV - Nezha CM is a compute module with modular design, equipped +with Allwinner D1 chip (based on T-Head XuanTie C906 core), 512MB DDR3 RAM. +It can boot from TF card or SD-NAND, uses two sets of M.2 b key 67 pin +connectors to route all IO, making it convient for wide use and easy to replace. + +How to build +============ + +$ make sipeed_lichee_rv_defconfig +$ make + +How to write the SD card +======================== + +Once the build process is finished you will have an image called "sdcard.img" +in the output/images/ directory. + +Copy the bootable "sdcard.img" onto an SD card with "dd": + + $ sudo dd if=output/images/sdcard.img of=/dev/sdX + +Connect a TTL UART to the debug connector, insert the microSD card and +plug in a USB-C cable to the PWR connector to boot the system. diff --git a/configs/sipeed_lichee_rv_defconfig b/configs/sipeed_lichee_rv_defconfig new file mode 100644 index 0000000000..f9782f870b --- /dev/null +++ b/configs/sipeed_lichee_rv_defconfig @@ -0,0 +1,33 @@ +BR2_riscv=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_0=y +BR2_ROOTFS_OVERLAY="board/sipeed/lichee_rv/overlay" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/sipeed/lichee_rv/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,linux,ca67838d84af4c9f85d06311c9e98e1adf46308f)/linux-ca67838d84af4c9f85d06311c9e98e1adf46308f.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="nezha" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun20i-d1-lichee-rv" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_OPENSBI=y +BR2_TARGET_OPENSBI_CUSTOM_VERSION=y +BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE="1.1" +BR2_TARGET_OPENSBI_PLAT="generic" +# BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL=y +BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,u-boot,528ae9bc6c55edd3ffe642734b4132a8246ea777)/uboot-528ae9bc6c55edd3ffe642734b4132a8246ea777.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="lichee_rv_dock" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_NEEDS_OPENSBI=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin" +BR2_PACKAGE_HOST_GENIMAGE=y