From patchwork Fri May 14 22:03:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1478717 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.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.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 4FhjGW6Sw8z9sWH for ; Sat, 15 May 2021 08:03:47 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A08D960821; Fri, 14 May 2021 22:03:45 +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 G1UYKCWFwS1D; Fri, 14 May 2021 22:03:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id ED6CF607CF; Fri, 14 May 2021 22:03:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id A7D8C1BF3AA for ; Fri, 14 May 2021 22:03:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 96C9D41885 for ; Fri, 14 May 2021 22:03:42 +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 NAE2Boe2y0y1 for ; Fri, 14 May 2021 22:03:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by smtp4.osuosl.org (Postfix) with ESMTPS id 069D44187F for ; Fri, 14 May 2021 22:03:40 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id B2CC11C0005; Fri, 14 May 2021 22:03:38 +0000 (UTC) From: Thomas Petazzoni To: Buildroot List Date: Sat, 15 May 2021 00:03:15 +0200 Message-Id: <20210514220316.1942381-2-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210514220316.1942381-1-thomas.petazzoni@bootlin.com> References: <20210514220316.1942381-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] package/jh71xx-tools: new package 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: Drew Fustini , Bin Meng , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add jh71xx-tools as a new host package, it includes a tool that allows to recover the bootloader of JH71xx-based platforms, such as the BeagleV. Signed-off-by: Thomas Petazzoni Reviewed-by: Bin Meng --- DEVELOPERS | 1 + package/Config.in.host | 1 + package/jh71xx-tools/Config.in.host | 7 +++++++ package/jh71xx-tools/jh71xx-tools.hash | 3 +++ package/jh71xx-tools/jh71xx-tools.mk | 20 ++++++++++++++++++++ 5 files changed, 32 insertions(+) create mode 100644 package/jh71xx-tools/Config.in.host create mode 100644 package/jh71xx-tools/jh71xx-tools.hash create mode 100644 package/jh71xx-tools/jh71xx-tools.mk diff --git a/DEVELOPERS b/DEVELOPERS index ed86dc82ba..a90ad1c354 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2633,6 +2633,7 @@ F: package/heirloom-mailx/ F: package/hiawatha/ F: package/igh-ethercat/ F: package/intltool/ +F: package/jh71xx-tools/ F: package/libcap/ F: package/libffi/ F: package/libsha1/ diff --git a/package/Config.in.host b/package/Config.in.host index ba6a68c728..cef36cebc1 100644 --- a/package/Config.in.host +++ b/package/Config.in.host @@ -40,6 +40,7 @@ menu "Host utilities" source "package/imx-mkimage/Config.in.host" source "package/imx-usb-loader/Config.in.host" source "package/jq/Config.in.host" + source "package/jh71xx-tools/Config.in.host" source "package/jsmin/Config.in.host" source "package/kmod/Config.in.host" source "package/libp11/Config.in.host" diff --git a/package/jh71xx-tools/Config.in.host b/package/jh71xx-tools/Config.in.host new file mode 100644 index 0000000000..08872f295c --- /dev/null +++ b/package/jh71xx-tools/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_JH71XX_TOOLS + bool "host jh71xx-tools" + depends on BR2_riscv + help + Bootloader recovery and updater tool for StarFive JH7100 SoCs. + + https://github.com/kprasadvnsi/JH71xx-tools diff --git a/package/jh71xx-tools/jh71xx-tools.hash b/package/jh71xx-tools/jh71xx-tools.hash new file mode 100644 index 0000000000..d8a88dcb22 --- /dev/null +++ b/package/jh71xx-tools/jh71xx-tools.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 0f16ea896164f6e8bfe0a03bbbd95ff14d474445ba6f045f9377d01282c9364f jh71xx-tools-7a29f4b9d2355aa39afa8680680909bb74e4991d.tar.gz +sha256 3ef425421620cd815709f3ede736bb83dbfc47201897b66731606dc699e98460 jh7100-recover.c diff --git a/package/jh71xx-tools/jh71xx-tools.mk b/package/jh71xx-tools/jh71xx-tools.mk new file mode 100644 index 0000000000..b9f3974931 --- /dev/null +++ b/package/jh71xx-tools/jh71xx-tools.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# jh71xx-tools +# +################################################################################ + +JH71XX_TOOLS_VERSION = 7a29f4b9d2355aa39afa8680680909bb74e4991d +JH71XX_TOOLS_SITE = $(call github,kprasadvnsi,JH71xx-tools,$(JH71XX_TOOLS_VERSION)) +JH71XX_TOOLS_LICENSE = MIT +JH71XX_TOOLS_LICENSE_FILES = jh7100-recover.c + +define HOST_JH71XX_TOOLS_BUILD_CMDS + $(HOSTCC) -o $(@D)/jh7100-recover $(@D)/jh7100-recover.c +endef + +define HOST_JH71XX_TOOLS_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/jh7100-recover $(HOST_DIR)/bin/jh7100-recover +endef + +$(eval $(host-generic-package)) From patchwork Fri May 14 22:03:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1478719 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=) 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 4FhjH122Zmz9sWQ for ; Sat, 15 May 2021 08:04:12 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id BE5D0404FD; Fri, 14 May 2021 22:04:10 +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 Y3KGggnNMbz3; Fri, 14 May 2021 22:04:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id EDE8E404BA; Fri, 14 May 2021 22:04:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 598CA1BF3AA for ; Fri, 14 May 2021 22:03:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 494E64187F for ; Fri, 14 May 2021 22:03:43 +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 fvbry8JPngXr for ; Fri, 14 May 2021 22:03:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by smtp4.osuosl.org (Postfix) with ESMTPS id 13F3D41883 for ; Fri, 14 May 2021 22:03:41 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 328AE1BF205; Fri, 14 May 2021 22:03:40 +0000 (UTC) From: Thomas Petazzoni To: Buildroot List Date: Sat, 15 May 2021 00:03:16 +0200 Message-Id: <20210514220316.1942381-3-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210514220316.1942381-1-thomas.petazzoni@bootlin.com> References: <20210514220316.1942381-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] configs/beaglev: enable host jh71xx-tools 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: Drew Fustini , Bin Meng , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This host utility is useful to recover the bootloader. Signed-off-by: Thomas Petazzoni Reviewed-by: Bin Meng --- board/beaglev/readme.txt | 4 +++- configs/beaglev_defconfig | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/board/beaglev/readme.txt b/board/beaglev/readme.txt index bbdb9b12ef..60678059e1 100644 --- a/board/beaglev/readme.txt +++ b/board/beaglev/readme.txt @@ -119,4 +119,6 @@ bootloaders, so if you flash non-working versions, you'll have to go through a recovery process. This requires wiring up to a separate debug UART, which pins are located near the HDMI connector. See https://wiki.seeedstudio.com/BeagleV-Update-bootloader-ddr-init-boot-uboot-Recover-bootloader/ -section "Recover the bootloader" for more details. +section "Recover the bootloader" for more details. The instructions +make use of a jh7100-recover tool, which Buildroot has built as part +of this defconfig: it is available as output/host/bin/jh7100-recover. diff --git a/configs/beaglev_defconfig b/configs/beaglev_defconfig index 8943ce9c34..bbb69ca268 100644 --- a/configs/beaglev_defconfig +++ b/configs/beaglev_defconfig @@ -35,3 +35,4 @@ BR2_TARGET_UBOOT_CUSTOM_TARBALL=y BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,starfive-tech,u-boot,3f3ac01a29ad1cd5fa519d86f81daead2447f1d4)/uboot-3f3ac01a29ad1cd5fa519d86f81daead2447f1d4.tar.gz" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="starfive_vic7100_beagle_v_smode" BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_JH71XX_TOOLS=y