From patchwork Fri Oct 14 06:58:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1689902 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::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Mpcgy5VNMz23jn for ; Fri, 14 Oct 2022 17:59:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 025A8410E1; Fri, 14 Oct 2022 06:59:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 025A8410E1 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 LEdhMn3jGJ9f; Fri, 14 Oct 2022 06:59:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id D8572409FC; Fri, 14 Oct 2022 06:59:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D8572409FC X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id EF2ED1BF20D for ; Fri, 14 Oct 2022 06:59:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D7C2740C57 for ; Fri, 14 Oct 2022 06:59:07 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D7C2740C57 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 JcbofO6FbrSI for ; Fri, 14 Oct 2022 06:59:07 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2064B400F1 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by smtp2.osuosl.org (Postfix) with ESMTPS id 2064B400F1 for ; Fri, 14 Oct 2022 06:59:07 +0000 (UTC) Received: by mail-ed1-x52c.google.com with SMTP id z97so5599527ede.8 for ; Thu, 13 Oct 2022 23:59:06 -0700 (PDT) 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=++8WfDXWBEVLYyz/rmJeGaXhPPJS0AXQAVb++6tWMms=; b=uYYuxiCMKbCx9J6GfBSepsBkefPbiLXh0hZDiKGLw61WVXoCHJMQk5jq5fYPvH4QjZ 9qc95j1pEuRXdHvQfwmwpzP3a+hw1n2WefpTNCexAd1//y/T8VzLwnx9OKo4dIW23ZU/ 5CP8ORkl/CQgTqDhspSt4BnDnL/FQJkkWr6zsrX2q+JncoJH/9qHiQy0eChWowisFyRf 1CYYXinB2aIcymYxPdbeAvLStlRwmMgIRFccF9ydE8skyL8PadOJ+WJwxDVbC62iAGN0 GE+8ONFDjrLXMR/tf/QtX36L6hFXxrRUBktbLhq2x6aiLgm7u71txvVg5MSJanG2o+wl nQeA== X-Gm-Message-State: ACrzQf0Q4wPyjrrNKISzdpQvV71mm3cUm9wtmiWh0TPzyMykiyciQ0xL 5IKyHun1DHkHLngPYl3+x0Irn6xBbUNpdg== X-Google-Smtp-Source: AMsMyM5Shlc8HQz3jesFm90bNu8Ds0RE0VHF+3lkBJhYgiNsTACXRd+BxyjJQ2AEjvxBe/7CnlXCww== X-Received: by 2002:a05:6402:84d:b0:454:f41d:6ccf with SMTP id b13-20020a056402084d00b00454f41d6ccfmr3028097edz.129.1665730745012; Thu, 13 Oct 2022 23:59:05 -0700 (PDT) Received: from localhost.localdomain (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id u13-20020aa7d54d000000b00458478a4295sm1285550edr.9.2022.10.13.23.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 23:59:04 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Fri, 14 Oct 2022 08:58:56 +0200 Message-Id: <20221014065900.3311604-2-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014065900.3311604-1-angelo@amarulasolutions.com> References: <20221014065900.3311604-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=++8WfDXWBEVLYyz/rmJeGaXhPPJS0AXQAVb++6tWMms=; b=h4OLWFQzwGFM88W8sbwNt3EzcfCibMs5CxR08iLDK6plQNt/uMb/Sy9Bgd20K+NurJ ax/V1M6jv08KLOP4y0vf3Q0wqulUl1j5UiBoq1g4nJqxMChY1aprX5TsX6KEgBM9TpBM yFglqiAM2SU/hSzKO/EhmquZ3WdG0MTkfG92Y= X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=h4OLWFQz Subject: [Buildroot] [PATCH v2 1/5] linux: enable CONFIG_EXTRA_FIRMWARE_DIR 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: Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" CONFIG_EXTRA_FIRMWARE_DIR must point to the directory where firmware file from CONFIG_EXTRA_FIRMWARE will be taken to be embedded to the kernel. The option is removed if CONFIG_EXTRA_FIRMWARE is not used, but it defaults to a sensible value when used. Signed-off-by: Angelo Compagnucci --- linux/linux.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux/linux.mk b/linux/linux.mk index efdc21eff2..9a909c7d7b 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -408,6 +408,9 @@ define LINUX_KCONFIG_FIXUP_CMDS $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO) $(call KCONFIG_ENABLE_OPT,CONFIG_LOGO_LINUX_CLUT224)) $(call KCONFIG_DISABLE_OPT,CONFIG_GCC_PLUGINS) + # The kernel CONFIG_EXTRA_FIRMWARE feature requires to have the firmware full + # path for locating firmware file. + $(call KCONFIG_SET_OPT,CONFIG_EXTRA_FIRMWARE_DIR,"$(STAGING_DIR)/lib/firmware") $(PACKAGES_LINUX_CONFIG_FIXUPS) endef From patchwork Fri Oct 14 06:58:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1689903 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 4MpchC3HHfz23jn for ; Fri, 14 Oct 2022 17:59:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4FC7540FF1; Fri, 14 Oct 2022 06:59:37 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4FC7540FF1 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 jOI7M3UkXUxJ; Fri, 14 Oct 2022 06:59:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 7A74A40C57; Fri, 14 Oct 2022 06:59:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7A74A40C57 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 1BD831BF20D for ; Fri, 14 Oct 2022 06:59:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id EC42361223 for ; Fri, 14 Oct 2022 06:59:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org EC42361223 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 BIKcQjWiumHO for ; Fri, 14 Oct 2022 06:59:08 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 40DB161222 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by smtp3.osuosl.org (Postfix) with ESMTPS id 40DB161222 for ; Fri, 14 Oct 2022 06:59:08 +0000 (UTC) Received: by mail-ej1-x62c.google.com with SMTP id q9so8627572ejd.0 for ; Thu, 13 Oct 2022 23:59:08 -0700 (PDT) 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=jRwQDkna2hl3ENRxo8uy6umjsiFdw8mAULDp39hxPHo=; b=ovlROBkrPzxsyzme4iw5WL4gRhM0+qKJA5mC3njW3ukQCBsepjcLVRr1RF+83hZMuL h7TmS42o0hrlbtOsVEE0ke/Gqti551Lwbt7G7rELrlo2374PRTM2uzOJeN/FCr+xdWxr iBgXRiWEPxro2D/2Kn4ePubutrGH7iivAQGYkFNBaxi+lPRrB10N+bzIGuUaYdzcrE39 lH3C9+Qo8HKyeCyPY9xLC7+WInduyX6rZavh0n3G+1mQ0XHTJchG0woZMJlrly74BUyo 25G6wGN6bD6NYvLzN4Gu/ekUKfTWRyYR8+iugoDHqcgEsV8yE8Dk5gmiV+dPBr+38GB0 rjDQ== X-Gm-Message-State: ACrzQf0ZkyjzYWAjTpFTdcyRTRFtoQ9Wc9UH5/PyA6HwY4nQwDaki7Ff qdvlePaBdSwMN6Ok/7nzsfyaOZXVHvgGGg== X-Google-Smtp-Source: AMsMyM6E4tqf4V5nOm1yOtZDlNq4a02MBkW41vlg7mqRH/oPHavJlt0ns7fNkYNAXqW6iugu0hxYsg== X-Received: by 2002:a17:907:7611:b0:78d:9d69:adf9 with SMTP id jx17-20020a170907761100b0078d9d69adf9mr2532232ejc.283.1665730746147; Thu, 13 Oct 2022 23:59:06 -0700 (PDT) Received: from localhost.localdomain (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id u13-20020aa7d54d000000b00458478a4295sm1285550edr.9.2022.10.13.23.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 23:59:05 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Fri, 14 Oct 2022 08:58:57 +0200 Message-Id: <20221014065900.3311604-3-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014065900.3311604-1-angelo@amarulasolutions.com> References: <20221014065900.3311604-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=jRwQDkna2hl3ENRxo8uy6umjsiFdw8mAULDp39hxPHo=; b=C13zukw6oSuxL/pNXzmFf3VQH/wtCzDPGrjGZyfKgEdlcqGpCyLdxeZ8UVH2c8mM89 nfuqf9FkwB8A9IY2xVsndpPjZ9TpGOYhJbG3evXL+KOUNuVsHwXHs4f+JZWVm57nQ1VD 4BSdfkimKdh4NB+nqOODBN320z0SE2+hotLyg= X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=C13zukw6 Subject: [Buildroot] [PATCH v2 2/5] package/pkg-utils: add KCONFIG_APPEND_OPT 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: Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This macro can be used to append a value to a previously configured option where the intent is to join the old value with the new one. Signed-off-by: Angelo Compagnucci --- package/pkg-utils.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index 0945e6ed31..d812946934 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -33,6 +33,16 @@ define KCONFIG_ENABLE_OPT $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=y, $(2)); \ fi endef +# KCONFIG_APPEND_OPT (option, value, [, file]) +# If the option is already set append, else add new. +define KCONFIG_APPEND_OPT + $(Q)if ! grep -q '^$(strip $(1))' $(call KCONFIG_DOT_CONFIG,$(3)); then \ + $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=$(2), $(3)); \ + else \ + grep -E '$(strip $(1)).*$(strip $(2))' $(call KCONFIG_DOT_CONFIG,$(3)) || \ + $(SED) 's|$(1)="\(.*\)"|$(1)="\1 $(2)"|g' $(call KCONFIG_DOT_CONFIG,$(3)); \ + fi +endef # KCONFIG_SET_OPT (option, value [, file]) KCONFIG_SET_OPT = $(call KCONFIG_MUNGE_DOT_CONFIG, $(1), $(1)=$(2), $(3)) # KCONFIG_DISABLE_OPT (option [, file]) From patchwork Fri Oct 14 06:58:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1689904 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::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MpchR5VBHz23jn for ; Fri, 14 Oct 2022 17:59:51 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id CBAAD8401A; Fri, 14 Oct 2022 06:59:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CBAAD8401A 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 EOX5Os4S6_Xm; Fri, 14 Oct 2022 06:59:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id E4E2C84017; Fri, 14 Oct 2022 06:59:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E4E2C84017 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 E8CDF1BF20D for ; Fri, 14 Oct 2022 06:59:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 07EC94006A for ; Fri, 14 Oct 2022 06:59:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 07EC94006A 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 DqzbgqlmAnqp for ; Fri, 14 Oct 2022 06:59:09 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 81DBD42211 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by smtp4.osuosl.org (Postfix) with ESMTPS id 81DBD42211 for ; Fri, 14 Oct 2022 06:59:09 +0000 (UTC) Received: by mail-ej1-x635.google.com with SMTP id bj12so8446633ejb.13 for ; Thu, 13 Oct 2022 23:59:09 -0700 (PDT) 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=ys0RsH5P5W8ruBvDVTa5LkNjcuMA2KR756mkKqI0vhw=; b=5/67jh/bfLjkqk1QOK3QMRJrTNDilCthCjBHk/iUVOT4Y5UHYASXt7Gp1X5R+QTS/w ipEfbtsHVm29bP/Y4QqkundysiZqIb8u3J0paP12xZ/sqWb1dWjZsqUFFjfyIfO1haXv yAfcblTb4qYW7yaUyIAMBzlp7ewg/Z3UX2+cE280UGoO8mk6xZN5dWdSA5e8tC01eUlo nu9wudb/FQgYFJVqBnLNFK71fN+nM0kywdExUMzvdmVsPKzGTpB4sNyDOxUa8Wr0oGRX PeeJcizuPP2LxlHd9YuL8fZPqxs6C8qApw5uZ9rTiHC2CFQ4JvjyUTUHoMImWpcETbe5 IQgA== X-Gm-Message-State: ACrzQf1+/lwsW9v0r+09SClOXbZC/lL3Lf+niGruzjm/EQS79JFWOCHO cCdARdxzOMl1oibxMeGRo+xYZrAo/dG+JA== X-Google-Smtp-Source: AMsMyM4lC574K0KeV1d2OOBzijvf7Vu+OQJYu8kj2C2QjpUW0v12MBvZn9kWAQyM0ACDFlp1kkGjmw== X-Received: by 2002:a17:906:5587:b0:78d:b6b6:7872 with SMTP id y7-20020a170906558700b0078db6b67872mr2502829ejp.72.1665730747409; Thu, 13 Oct 2022 23:59:07 -0700 (PDT) Received: from localhost.localdomain (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id u13-20020aa7d54d000000b00458478a4295sm1285550edr.9.2022.10.13.23.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 23:59:06 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Fri, 14 Oct 2022 08:58:58 +0200 Message-Id: <20221014065900.3311604-4-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014065900.3311604-1-angelo@amarulasolutions.com> References: <20221014065900.3311604-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=ys0RsH5P5W8ruBvDVTa5LkNjcuMA2KR756mkKqI0vhw=; b=f0m7E8gAqYMnXIiVBFhe/v6PSQMpr4ovVFC0mKA1dDoC4xqIafvX93vAeI51wgcB3f IXkKgsly0ukykXDYIntMmO9O3ot6FUFjdZeEitY2RJJIJYvsQJSUJA/jVDXBZtTHN/Nn 3WwtC0adH5v7Qh6Gb96mmTUjisJH0N4j/0MNw= X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=f0m7E8gA Subject: [Buildroot] [PATCH v2 3/5] ackage/rtl8723ds-bt: new package 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: Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This package enables the Bluetooth device embedded in the RTL8723DS chip. Signed-off-by: Angelo Compagnucci --- linux/linux.mk | 3 ++- package/Config.in | 1 + package/rtl8723ds-bt/Config.in | 6 ++++++ package/rtl8723ds-bt/rtl8723ds-bt.hash | 2 ++ package/rtl8723ds-bt/rtl8723ds-bt.mk | 28 ++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 package/rtl8723ds-bt/Config.in create mode 100644 package/rtl8723ds-bt/rtl8723ds-bt.hash create mode 100644 package/rtl8723ds-bt/rtl8723ds-bt.mk diff --git a/linux/linux.mk b/linux/linux.mk index 9a909c7d7b..8ae5a97a80 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -78,7 +78,8 @@ LINUX_DEPENDENCIES += \ $(if $(BR2_PACKAGE_INTEL_MICROCODE),intel-microcode) \ $(if $(BR2_PACKAGE_LINUX_FIRMWARE),linux-firmware) \ $(if $(BR2_PACKAGE_FIRMWARE_IMX),firmware-imx) \ - $(if $(BR2_PACKAGE_WIRELESS_REGDB),wireless-regdb) + $(if $(BR2_PACKAGE_WIRELESS_REGDB),wireless-regdb) \ + $(if $(BR2_PACKAGE_RTL8723DS_BT),rtl8723ds-bt) # Starting with 4.16, the generated kconfig paser code is no longer # shipped with the kernel sources, so we need flex and bison, but diff --git a/package/Config.in b/package/Config.in index e3a34d6e97..4f6e508106 100644 --- a/package/Config.in +++ b/package/Config.in @@ -578,6 +578,7 @@ endmenu source "package/rtl8189fs/Config.in" source "package/rtl8723bu/Config.in" source "package/rtl8723ds/Config.in" + source "package/rtl8723ds-bt/Config.in" source "package/rtl8812au-aircrack-ng/Config.in" source "package/rtl8821au/Config.in" source "package/sane-backends/Config.in" diff --git a/package/rtl8723ds-bt/Config.in b/package/rtl8723ds-bt/Config.in new file mode 100644 index 0000000000..ab4ba0bf11 --- /dev/null +++ b/package/rtl8723ds-bt/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_RTL8723DS_BT + bool "rtl8723ds-bt" + help + rtl8723ds UART attached Bluetooth driver + + https://github.com/wsyco/RTL8723DS_BT_Linux diff --git a/package/rtl8723ds-bt/rtl8723ds-bt.hash b/package/rtl8723ds-bt/rtl8723ds-bt.hash new file mode 100644 index 0000000000..1ec4e350f9 --- /dev/null +++ b/package/rtl8723ds-bt/rtl8723ds-bt.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 9e70a981946abeeb6437d9a27d8437cea15aa4df72f8d56ded0ae28af484d2f4 rtl8723ds-bt-14cedf3a9fec1aa8c500fa52f3e3acc433cbcf08.tar.gz diff --git a/package/rtl8723ds-bt/rtl8723ds-bt.mk b/package/rtl8723ds-bt/rtl8723ds-bt.mk new file mode 100644 index 0000000000..be1b9a9cc2 --- /dev/null +++ b/package/rtl8723ds-bt/rtl8723ds-bt.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# rtl8723ds-bt +# +################################################################################ + +RTL8723DS_BT_VERSION = 14cedf3a9fec1aa8c500fa52f3e3acc433cbcf08 +RTL8723DS_BT_SITE = $(call github,wsyco,RTL8723DS_BT_Linux,$(RTL8723DS_BT_VERSION)) +RTL8723DS_BT_LICENSE = PROPRIETARY +RTL8723DS_BT_INSTALL_STAGING = YES + +define RTL8723DS_BT_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_DEV_BUS) + $(call KCONFIG_ENABLE_OPT,CONFIG_SERIAL_DEV_CTRL_TTYPORT) + $(call KCONFIG_ENABLE_OPT,CONFIG_BT) + $(call KCONFIG_ENABLE_OPT,CONFIG_BT_HCIUART) + $(call KCONFIG_ENABLE_OPT,CONFIG_BT_HCIUART_3WIRE) + $(call KCONFIG_ENABLE_OPT,CONFIG_BT_HCIUART_RTL) + $(call KCONFIG_APPEND_OPT,CONFIG_EXTRA_FIRMWARE,rtl_bt/rtl8723ds_fw.bin rtl_bt/rtl8723ds_config.bin) +endef + +define RTL8723DS_BT_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/lib/firmware/rtl_bt/ + cp $(@D)/8723D/rtl8723d_fw $(STAGING_DIR)/lib/firmware/rtl_bt/rtl8723ds_fw.bin + cp $(@D)/8723D/rtl8723d_config $(STAGING_DIR)/lib/firmware/rtl_bt/rtl8723ds_config.bin +endef + +$(eval $(generic-package)) From patchwork Fri Oct 14 06:58:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1689905 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=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Mpchj3Gy0z23jf for ; Fri, 14 Oct 2022 18:00:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id AD9F261229; Fri, 14 Oct 2022 07:00:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org AD9F261229 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 xGFmNNIGg9f2; Fri, 14 Oct 2022 07:00:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 5C6F461224; Fri, 14 Oct 2022 07:00:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5C6F461224 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 6A4F01BF20D for ; Fri, 14 Oct 2022 06:59:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 43F91402D2 for ; Fri, 14 Oct 2022 06:59:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 43F91402D2 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 zYkQwoA_d7r0 for ; Fri, 14 Oct 2022 06:59:10 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org AB61542214 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by smtp4.osuosl.org (Postfix) with ESMTPS id AB61542214 for ; Fri, 14 Oct 2022 06:59:10 +0000 (UTC) Received: by mail-ed1-x533.google.com with SMTP id l22so5608855edj.5 for ; Thu, 13 Oct 2022 23:59:10 -0700 (PDT) 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=DAMHbhQR7DEz7Nas100rZRTC5QSKV2AWULIksgRQkc0=; b=p4eyRen3DDM5t4YUZuZvDgIf4Ra72QFDCdPiLDIXK9rGXZk6wd/Cja6XYvzXL2e8ae Pm9fpkciEzogo9sYSRI96CfcpVzoSDW8gCsdVX5u2+JPUZ5PC7fatRBVSrHv+Zy3e0J9 Qo+nGIDXBnOqnaax5lNmQHJTTur1rNbKckuOEIscJvgaNZklY2UxrYdHkwBLafEAOdEu LT2o7lse5cqqz74laexF2HJIec1ZTaHGhaW2bjN4+2fLUu4jjuskETVuRTuxkDulE5n8 WVb3rfk+oNLEBMjoTbl0Yw9FvtAOV3IyKufpZDt1FnRzuTEHAMAp/T7r/yargWMtK3O2 CK0A== X-Gm-Message-State: ACrzQf15xbuLWDuGYB8iihtEyU3RPzs1DeEBjeMdGWa7lwMnCj4TzThV 6Ut7owQhPCvRJ/1tyjzgA3Jj+nLLmCqHLg== X-Google-Smtp-Source: AMsMyM6LY+RtU7RwrCInLLAtmKFNvA1H3hNN/O1XpNS9ePoWcPrCQVgxStIfKuudn+lnoumAxZ0Svw== X-Received: by 2002:a05:6402:298d:b0:451:5fc5:d423 with SMTP id eq13-20020a056402298d00b004515fc5d423mr3022085edb.102.1665730748564; Thu, 13 Oct 2022 23:59:08 -0700 (PDT) Received: from localhost.localdomain (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id u13-20020aa7d54d000000b00458478a4295sm1285550edr.9.2022.10.13.23.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 23:59:08 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Fri, 14 Oct 2022 08:58:59 +0200 Message-Id: <20221014065900.3311604-5-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014065900.3311604-1-angelo@amarulasolutions.com> References: <20221014065900.3311604-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=DAMHbhQR7DEz7Nas100rZRTC5QSKV2AWULIksgRQkc0=; b=jVb/fMZBodblRIyd8AWy6kRlUZz4YGd869XxqBuktbEOR8caongFV4FQY+Yfj3VjvW PvcH1cz3CKuj57BI4DDfDCjI59UCVZj0/lsYVjjFaKjCb0L5rMaeCkf3vzSgz9yIYBzy P1zWAG0m0/h9jwzh2gwI3bydoTAzdkr4CoUOI= X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=jVb/fMZB Subject: [Buildroot] [PATCH v2 4/5] 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: 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 --- board/sipeed/lichee_rv/genimage.cfg | 37 +++++++++++++ ...t-building-u-boot.toc1-for-lichee-rv.patch | 54 +++++++++++++++++++ board/sipeed/lichee_rv/readme.txt | 26 +++++++++ configs/sipeed_lichee_rv_defconfig | 34 ++++++++++++ 4 files changed, 151 insertions(+) create mode 100644 board/sipeed/lichee_rv/genimage.cfg create mode 100644 board/sipeed/lichee_rv/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-lichee-rv.patch 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..52603c3f70 --- /dev/null +++ b/board/sipeed/lichee_rv/genimage.cfg @@ -0,0 +1,37 @@ +# Minimal SD card image for the sipeed Lichee RV + +image sdcard.img { + hdimage { + } + + partition boot0-1 { + in-partition-table = "no" + image = "boot0_sdcard_sun20iw1p1.bin" + offset = 8K + } + + partition boot0-2 { + in-partition-table = "no" + image = "boot0_sdcard_sun20iw1p1.bin" + offset = 128K + } + + partition u-boot-1 { + in-partition-table = "no" + image = "u-boot.toc1" + offset = 12M + } + + partition u-boot-2 { + in-partition-table = "no" + image = "u-boot.toc1" + offset = 16400K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + bootable = "true" + offset = 18M + } +} diff --git a/board/sipeed/lichee_rv/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-lichee-rv.patch b/board/sipeed/lichee_rv/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-lichee-rv.patch new file mode 100644 index 0000000000..69ebe3b21d --- /dev/null +++ b/board/sipeed/lichee_rv/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-lichee-rv.patch @@ -0,0 +1,54 @@ +From 4a923e0e4ef6d2b41cb89d658e269adada847573 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Thu, 4 Nov 2021 22:32:04 +0100 +Subject: [PATCH] Makefile: HACK: Support building u-boot.toc1 for nezda board + +For easier integration into Buildroot. The boot0 / toc1 logic is WIP until +U-Boot gains SPL support for the D1, so add a hack to make it easier to +integrate in Buildroot as-is. + +Signed-off-by: Peter Korsgaard +--- + Makefile | 9 +++++++++ + nezha.cfg | 9 +++++++++ + 2 files changed, 18 insertions(+) + create mode 100644 nezha.cfg + +diff --git a/Makefile b/Makefile +index f911f70344..259d93bf80 100644 +--- a/Makefile ++++ b/Makefile +@@ -1084,6 +1084,15 @@ endif + .binman_stamp: FORCE + @touch $@ + ++fw_dynamic.bin: $(OPENSBI) ++ $(call if_changed,copy) ++ ++MKIMAGEFLAGS_u-boot.toc1 = -T sunxi_toc1 ++u-boot.toc1: lichee-rv.cfg fw_dynamic.bin inputs ++ $(call if_changed,mkimage) ++ ++all: u-boot.toc1 ++ + ifeq ($(CONFIG_DEPRECATED),y) + $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.") + endif +diff --git a/lichee-rv.cfg b/lichee-rv.cfg +new file mode 100644 +index 0000000000..2d23b9b388 +--- /dev/null ++++ b/lichee-rv.cfg +@@ -0,0 +1,9 @@ ++[opensbi] ++file = fw_dynamic.bin ++addr = 0x40000000 ++[dtb] ++file = arch/riscv/dts/sun20i-d1-lichee-rv.dtb ++addr = 0x44000000 ++[u-boot] ++file = u-boot-nodtb.bin ++addr = 0x4a000000 +-- +2.20.1 + diff --git a/board/sipeed/lichee_rv/readme.txt b/board/sipeed/lichee_rv/readme.txt new file mode 100644 index 0000000000..008be3a3bc --- /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 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..355d5caa70 --- /dev/null +++ b/configs/sipeed_lichee_rv_defconfig @@ -0,0 +1,34 @@ +BR2_riscv=y +BR2_GLOBAL_PATCH_DIR="board/sipeed/lichee_rv/patches" +BR2_ROOTFS_OVERLAY="board/nezha/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,fe178cf0153d98b71cb01a46c8cc050826a17e77)/linux-fe178cf0153d98b71cb01a46c8cc050826a17e77.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_TARBALL=y +BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz" +BR2_TARGET_OPENSBI_PLAT="generic" +# BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set +BR2_TARGET_SUN20I_D1_SPL=y +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,d1-2022-05-26)/uboot-d1-2022-05-26.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="lichee_rv" +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.toc1" +BR2_PACKAGE_HOST_GENIMAGE=y From patchwork Fri Oct 14 06:59:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1689906 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 4Mpchz66Rkz23jf for ; Fri, 14 Oct 2022 18:00:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 039FA40FF6; Fri, 14 Oct 2022 07:00:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 039FA40FF6 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 Fg-x-d2D14jM; Fri, 14 Oct 2022 07:00:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id CC1F64100C; Fri, 14 Oct 2022 07:00:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org CC1F64100C X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 915A91BF860 for ; Fri, 14 Oct 2022 06:59:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6D3A040C57 for ; Fri, 14 Oct 2022 06:59:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6D3A040C57 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 nf-UJuAcbhuI for ; Fri, 14 Oct 2022 06:59:11 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org DC3D8400F1 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by smtp2.osuosl.org (Postfix) with ESMTPS id DC3D8400F1 for ; Fri, 14 Oct 2022 06:59:10 +0000 (UTC) Received: by mail-ed1-x52c.google.com with SMTP id z97so5599779ede.8 for ; Thu, 13 Oct 2022 23:59:10 -0700 (PDT) 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=3vHMnU3SPbK/ZXilMh6K76jdvchXFqBN7vd9tXLbUVY=; b=hFsGIhoeHRTPIRGVhP546HNJBO24IG7goycOBK7IdVuNogzGJAU9hToPN4vuGWt8cG rHIuHRe2r83Epb2s/VDgBEUXPuBjwJ50Fhk1lRUe1oIr+urRddqFXyqT2+YsqoM2Hpf1 hQ/6wWLYp5FVr88xgEDurm0GZF7goV0UQxFhnZMV4YbjSvJyz7lKexsHO08F7Q2AhJ6W 1mFDgQLfHaf7TnFpRPCNDNNZgFWjw+7yi9tgQEz7iy8jLuy2l1TEEyz3E2nJwopZcaa/ oA9oP75qjtRU2MYQkBE7GIERy2OnFtk33afGwYJpu7Y+7jvRssYAYtrx7pocSzPg5xkV idBA== X-Gm-Message-State: ACrzQf1AbcjTYXr9Zw0LnYAWK9j3U60StsBs65GzA+3wChw/eBV2O/no Ufeptz44DUxI5dFIeVqh1Q9+NSs4QW/dtw== X-Google-Smtp-Source: AMsMyM60Vzh5CXL6cW6Rk+Kepv/HPLhFmV7KFLUtiSUKukfwqoQPfTa+jldPqtTYiON2HVZCNKADKA== X-Received: by 2002:a05:6402:b3c:b0:458:f680:6ab8 with SMTP id bo28-20020a0564020b3c00b00458f6806ab8mr3101992edb.267.1665730750064; Thu, 13 Oct 2022 23:59:10 -0700 (PDT) Received: from localhost.localdomain (host085115199111.static.fidoka.tech. [85.115.199.111]) by smtp.gmail.com with ESMTPSA id u13-20020aa7d54d000000b00458478a4295sm1285550edr.9.2022.10.13.23.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 23:59:09 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Fri, 14 Oct 2022 08:59:00 +0200 Message-Id: <20221014065900.3311604-6-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014065900.3311604-1-angelo@amarulasolutions.com> References: <20221014065900.3311604-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=3vHMnU3SPbK/ZXilMh6K76jdvchXFqBN7vd9tXLbUVY=; b=qMW4d4So5Gto0Gx095AusoAq3mFqAdMN4jZe3F39prXxhz3FkLKuKsTk7yqB2kbi1e Kglfg3GTqOGVW6sl/StEt5LzuujEeFOxEpYVEosQjpAT+N+g95+ZSb0Uw3JeH2FeSdhz G0O6Fay1XtIDuhWT4ubtDma8y5kme1zG4ud/8= X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=qMW4d4So Subject: [Buildroot] [PATCH v2 5/5] configs/lichee_rv_dock: 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: Angelo Compagnucci Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Lichee RV Dock is a RISC-V Linux development kits with high integration, small size and affordable price designed for opensource developer. https://wiki.sipeed.com/hardware/en/lichee/RV/Dock.html Signed-off-by: Angelo Compagnucci --- board/sipeed/lichee_rv_dock/genimage.cfg | 37 +++++++++++++ .../overlay/etc/network/interfaces | 7 +++ .../overlay/etc/wpa_supplicant.conf | 8 +++ ...t-building-u-boot.toc1-for-lichee-rv.patch | 54 +++++++++++++++++++ ...-d1-lichee-rv-dock-add-bluetooth-bin.patch | 33 ++++++++++++ board/sipeed/lichee_rv_dock/readme.txt | 45 ++++++++++++++++ configs/sipeed_lichee_rv_dock_defconfig | 40 ++++++++++++++ 7 files changed, 224 insertions(+) create mode 100644 board/sipeed/lichee_rv_dock/genimage.cfg create mode 100644 board/sipeed/lichee_rv_dock/overlay/etc/network/interfaces create mode 100644 board/sipeed/lichee_rv_dock/overlay/etc/wpa_supplicant.conf create mode 100644 board/sipeed/lichee_rv_dock/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-lichee-rv.patch create mode 100644 board/sipeed/lichee_rv_dock/patches/uboot/0002-RISCV-dts-sun20i-d1-lichee-rv-dock-add-bluetooth-bin.patch create mode 100644 board/sipeed/lichee_rv_dock/readme.txt create mode 100644 configs/sipeed_lichee_rv_dock_defconfig diff --git a/board/sipeed/lichee_rv_dock/genimage.cfg b/board/sipeed/lichee_rv_dock/genimage.cfg new file mode 100644 index 0000000000..016acc3611 --- /dev/null +++ b/board/sipeed/lichee_rv_dock/genimage.cfg @@ -0,0 +1,37 @@ +# Minimal SD card image for the sipeed Lichee RV dock + +image sdcard.img { + hdimage { + } + + partition boot0-1 { + in-partition-table = "no" + image = "boot0_sdcard_sun20iw1p1.bin" + offset = 8K + } + + partition boot0-2 { + in-partition-table = "no" + image = "boot0_sdcard_sun20iw1p1.bin" + offset = 128K + } + + partition u-boot-1 { + in-partition-table = "no" + image = "u-boot.toc1" + offset = 12M + } + + partition u-boot-2 { + in-partition-table = "no" + image = "u-boot.toc1" + offset = 16400K + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + bootable = "true" + offset = 18M + } +} diff --git a/board/sipeed/lichee_rv_dock/overlay/etc/network/interfaces b/board/sipeed/lichee_rv_dock/overlay/etc/network/interfaces new file mode 100644 index 0000000000..62153aabd1 --- /dev/null +++ b/board/sipeed/lichee_rv_dock/overlay/etc/network/interfaces @@ -0,0 +1,7 @@ +auto lo +iface lo inet loopback + +auto wlan0 +iface wlan0 inet dhcp +pre-up modprobe 8723ds +wpa-conf /etc/wpa_supplicant.conf diff --git a/board/sipeed/lichee_rv_dock/overlay/etc/wpa_supplicant.conf b/board/sipeed/lichee_rv_dock/overlay/etc/wpa_supplicant.conf new file mode 100644 index 0000000000..b43292b0a7 --- /dev/null +++ b/board/sipeed/lichee_rv_dock/overlay/etc/wpa_supplicant.conf @@ -0,0 +1,8 @@ +ap_scan=1 + +network={ + ssid="YOURSSID" + scan_ssid=1 + key_mgmt=WPA-PSK + psk="YOURPASSWD" +} diff --git a/board/sipeed/lichee_rv_dock/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-lichee-rv.patch b/board/sipeed/lichee_rv_dock/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-lichee-rv.patch new file mode 100644 index 0000000000..396d928b85 --- /dev/null +++ b/board/sipeed/lichee_rv_dock/patches/uboot/0001-Makefile-HACK-Support-building-u-boot.toc1-for-lichee-rv.patch @@ -0,0 +1,54 @@ +From 4a923e0e4ef6d2b41cb89d658e269adada847573 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Thu, 4 Nov 2021 22:32:04 +0100 +Subject: [PATCH] Makefile: HACK: Support building u-boot.toc1 for nezda board + +For easier integration into Buildroot. The boot0 / toc1 logic is WIP until +U-Boot gains SPL support for the D1, so add a hack to make it easier to +integrate in Buildroot as-is. + +Signed-off-by: Peter Korsgaard +--- + Makefile | 9 +++++++++ + nezha.cfg | 9 +++++++++ + 2 files changed, 18 insertions(+) + create mode 100644 nezha.cfg + +diff --git a/Makefile b/Makefile +index f911f70344..259d93bf80 100644 +--- a/Makefile ++++ b/Makefile +@@ -1084,6 +1084,15 @@ endif + .binman_stamp: FORCE + @touch $@ + ++fw_dynamic.bin: $(OPENSBI) ++ $(call if_changed,copy) ++ ++MKIMAGEFLAGS_u-boot.toc1 = -T sunxi_toc1 ++u-boot.toc1: lichee-rv-dock.cfg fw_dynamic.bin inputs ++ $(call if_changed,mkimage) ++ ++all: u-boot.toc1 ++ + ifeq ($(CONFIG_DEPRECATED),y) + $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.") + endif +diff --git a/lichee-rv-dock.cfg b/lichee-rv-dock.cfg +new file mode 100644 +index 0000000000..2d23b9b388 +--- /dev/null ++++ b/lichee-rv-dock.cfg +@@ -0,0 +1,9 @@ ++[opensbi] ++file = fw_dynamic.bin ++addr = 0x40000000 ++[dtb] ++file = arch/riscv/dts/sun20i-d1-lichee-rv-dock.dtb ++addr = 0x44000000 ++[u-boot] ++file = u-boot-nodtb.bin ++addr = 0x4a000000 +-- +2.20.1 + diff --git a/board/sipeed/lichee_rv_dock/patches/uboot/0002-RISCV-dts-sun20i-d1-lichee-rv-dock-add-bluetooth-bin.patch b/board/sipeed/lichee_rv_dock/patches/uboot/0002-RISCV-dts-sun20i-d1-lichee-rv-dock-add-bluetooth-bin.patch new file mode 100644 index 0000000000..091afeacdc --- /dev/null +++ b/board/sipeed/lichee_rv_dock/patches/uboot/0002-RISCV-dts-sun20i-d1-lichee-rv-dock-add-bluetooth-bin.patch @@ -0,0 +1,33 @@ +From add5f78e04e22f12da309f11122c1a9133b09d0b Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci +Date: Thu, 13 Oct 2022 22:37:29 +0200 +Subject: [PATCH] RISCV: dts: sun20i: d1: lichee-rv-dock: add bluetooth binding + +UART1 is attached to a rtl8723ds bluetooth module + +Signed-off-by: Angelo Compagnucci +--- + arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts b/arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts +index 0b0f356e2e..c27e682c5e 100644 +--- a/arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts ++++ b/arch/riscv/dts/sun20i-d1-lichee-rv-dock.dts +@@ -158,6 +158,13 @@ + pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>; + pinctrl-names = "default"; + status = "okay"; ++ ++ bluetooth { ++ compatible = "realtek,rtl8723ds-bt"; ++ device-wake-gpios = <&gpio 6 15 GPIO_ACTIVE_HIGH>; /* PG16 */ ++ enable-gpios = <&gpio 6 18 GPIO_ACTIVE_HIGH>; /* PG18 */ ++ host-wake-gpios = <&gpio 6 17 GPIO_ACTIVE_HIGH>; /* PG17 */ ++ }; + }; + + &usbphy { +-- +2.25.1 + diff --git a/board/sipeed/lichee_rv_dock/readme.txt b/board/sipeed/lichee_rv_dock/readme.txt new file mode 100644 index 0000000000..34478cafcc --- /dev/null +++ b/board/sipeed/lichee_rv_dock/readme.txt @@ -0,0 +1,45 @@ +Lichee RV dock +=============== + +Lichee RV Dock is a RISC-V Linux development kits with high integration, small +size and affordable price designed for opensource developer. It's equipped with +HDMI interface and it supports many screen by its screen convert board. It's +also equipped with many peripherals, including a UAB-A port, 2.4G Wifi-BT module, +an analog microphone and a speaker jack interface. + +How to build +============ + +$ make lichee_rv_dock_defconfig +$ make + +Wifi +========== + +Edit board/lichee_rv/overlay_dock/etc/wpa_supplicant.conf or +/etc/wpa_supplicant.conf once connected to the board: + +* Replace YOURSSID with your AP ssid +* Replace YOURPASSWD with your AP password + +Bluetooth +========== + +To make the device discoverable and pairable, once connected to the board: + +* bluetoothctl power on +* bluetoothctl discoverable yes +* bluetoothctl pairable yes + +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_dock_defconfig b/configs/sipeed_lichee_rv_dock_defconfig new file mode 100644 index 0000000000..6da3ae24e4 --- /dev/null +++ b/configs/sipeed_lichee_rv_dock_defconfig @@ -0,0 +1,40 @@ +BR2_riscv=y +BR2_GLOBAL_PATCH_DIR="board/sipeed/lichee_rv_dock/patches" +BR2_ROOTFS_OVERLAY="board/nezha/overlay board/sipeed/lichee_rv_dock/overlay" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/sipeed/lichee_rv_dock/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,linux,fe178cf0153d98b71cb01a46c8cc050826a17e77)/linux-fe178cf0153d98b71cb01a46c8cc050826a17e77.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="nezha" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun20i-d1-lichee-rv-dock" +BR2_LINUX_KERNEL_INSTALL_TARGET=y +BR2_PACKAGE_BLUEZ5_UTILS=y +BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y +BR2_PACKAGE_RTL8723DS=y +BR2_PACKAGE_RTL8723DS_BT=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_AUTOSCAN=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_TARBALL=y +BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,e6793dc36a71537023f078034fe795c64a9992a3)/opensbi-e6793dc36a71537023f078034fe795c64a9992a3.tar.gz" +BR2_TARGET_OPENSBI_PLAT="generic" +# BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set +BR2_TARGET_SUN20I_D1_SPL=y +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,d1-2022-05-26)/uboot-d1-2022-05-26.tar.gz" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="lichee_rv" +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.toc1" +BR2_PACKAGE_HOST_GENIMAGE=y