From patchwork Wed Oct 4 13:12:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: enki X-Patchwork-Id: 1843360 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::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S0w9p2cRGz1yph for ; Thu, 5 Oct 2023 00:13:34 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2B4AD60AD0; Wed, 4 Oct 2023 13:13:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2B4AD60AD0 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 W0l186T9RfWk; Wed, 4 Oct 2023 13:13:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 475F160E1B; Wed, 4 Oct 2023 13:13:30 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 475F160E1B 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 888491BF2BC for ; Wed, 4 Oct 2023 13:13:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6211A820C7 for ; Wed, 4 Oct 2023 13:13:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 6211A820C7 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 A4MtKGXMSbXD for ; Wed, 4 Oct 2023 13:13:20 +0000 (UTC) Received: from sender4-of-o50.zoho.com (sender4-of-o50.zoho.com [136.143.188.50]) by smtp1.osuosl.org (Postfix) with ESMTPS id 4FDDA82033 for ; Wed, 4 Oct 2023 13:13:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 4FDDA82033 Delivered-To: enki@fsck.pl ARC-Seal: i=1; a=rsa-sha256; t=1696425196; cv=none; d=zohomail.com; s=zohoarc; b=eN4lePRZmMBbf5Z9rHN9ajmV6DqCAnYJ6IExp4dbNqeJ/aU+9BZZOcSwJmh1rZXANqBJYL4bC3SJ/VzPHerq7PTsZZgqAF99EBJNuIwNqlKGwkI/CE57433xyfvn7+aLHJgmdmDWO8LbGZu3nR5vxoOSw41zX6inxPpgfQOgE64= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696425196; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=BgGUOBdunBYYSicKf/VU+TtrT5dBHeXhYUm/NxlWKvo=; b=Jv0C9FpJ1eoKViDakrh5sVaFzyrR0aAwALBtIibBBEpYIHC1j7oJhzXEd6x8WMgfvpSZPixnJXyDhFxLHBIb65GQcjfUzoMDSwJrhltl2Q8wRak1J/+Da/MYma3plmnqEktx00BrSPF5TxbesfpYyfm0Jd/iL4aCV7B14udg7I8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=fsck.pl; spf=pass smtp.mailfrom=enki@fsck.pl; dmarc=pass header.from= Received: from newton.shill.gq (193.93.205.86 [193.93.205.86]) by mx.zohomail.com with SMTPS id 1696425194059377.4388370796805; Wed, 4 Oct 2023 06:13:14 -0700 (PDT) From: Maciej Grela To: buildroot@buildroot.org Message-ID: <20231004131256.2113233-2-enki@fsck.pl> Date: Wed, 4 Oct 2023 15:12:53 +0200 X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003094612.62025-2-enki@fsck.pl> References: <20231003094612.62025-2-enki@fsck.pl> MIME-Version: 1.0 X-ZohoMailClient: External X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1696425196; s=zoho; d=fsck.pl; i=enki@fsck.pl; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=BgGUOBdunBYYSicKf/VU+TtrT5dBHeXhYUm/NxlWKvo=; b=ZXG9hWnUvDjtjIQXyF6ovPd2F6x/jSLumlT9OPCQNBfMRszsZAJ8qf/MVUidxEpS M9ZbJL2BdtTeSUn/8GUHzAcVPraw46LswWNVB26iYxjLnT0v/XkNoCUiZNhGaq3iPhR A9GA9Rf9INOTfhMtBysV4AYZCA67RYS2sk4cHcww= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=fsck.pl header.i=enki@fsck.pl header.a=rsa-sha256 header.s=zoho header.b=ZXG9hWnU Subject: [Buildroot] [PATCH v2 1/3] package/iniparser: 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: Thomas Petazzoni , Maciej Grela Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" iniparser is a required dependency of dns320l-daemon Signed-off-by: Maciej Grela --- package/Config.in | 1 + package/iniparser/Config.in | 6 ++++ package/iniparser/iniparser.hash | 2 ++ package/iniparser/iniparser.mk | 56 ++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 package/iniparser/Config.in create mode 100644 package/iniparser/iniparser.hash create mode 100644 package/iniparser/iniparser.mk diff --git a/package/Config.in b/package/Config.in index 009f7ba186..228e9eb1e3 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2085,6 +2085,7 @@ menu "Other" source "package/gtest/Config.in" source "package/gumbo-parser/Config.in" source "package/highway/Config.in" + source "package/iniparser/Config.in" source "package/jemalloc/Config.in" source "package/lapack/Config.in" source "package/libabseil-cpp/Config.in" diff --git a/package/iniparser/Config.in b/package/iniparser/Config.in new file mode 100644 index 0000000000..4932869943 --- /dev/null +++ b/package/iniparser/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_INIPARSER + bool "iniparser" + help + ini file parser + + https://github.com/ndevilla/iniparser diff --git a/package/iniparser/iniparser.hash b/package/iniparser/iniparser.hash new file mode 100644 index 0000000000..a745062fcd --- /dev/null +++ b/package/iniparser/iniparser.hash @@ -0,0 +1,2 @@ +# From https://github.com/ndevilla/iniparser/releases +sha256 960daa800dd31d70ba1bacf3ea2d22e8ddfc2906534bf328319495966443f3ae iniparser-4.1.tar.gz diff --git a/package/iniparser/iniparser.mk b/package/iniparser/iniparser.mk new file mode 100644 index 0000000000..f3f74601f3 --- /dev/null +++ b/package/iniparser/iniparser.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# iniparser +# +################################################################################ + +INIPARSER_VERSION = 4.1 +INIPARSER_SITE = $(call github,ndevilla,iniparser,v$(INIPARSER_VERSION)) +INIPARSER_INSTALL_STAGING = YES +INIPARSER_LICENSE = MIT +INIPARSER_LICENSE_FILES = LICENSE +INIPARSER_SO_TARGET = libiniparser.so.1 +INIPARSER_A_TARGET = libiniparser.a +INIPARSER_BUILD_TARGETS = +INIPARSER_STAGING_INSTALL_TGTS = +INIPARSER_TARGET_INSTALL_TGTS = + +INIPARSER_CONFIGURE_OPTS = $(TARGET_CONFIGURE_OPTS) + +ifeq ($(BR2_STATIC_LIBS),y) +INIPARSER_BUILD_TARGETS = $(INIPARSER_A_TARGET) +INIPARSER_STAGING_INSTALL_TGTS = $(INIPARSER_A_TARGET) +INIPARSER_TARGET_INSTALL_TGTS = $(INIPARSER_A_TARGET) +else ifeq ($(BR2_SHARED_LIBS),y) +INIPARSER_LINK_SO = y + +INIPARSER_BUILD_TARGETS = $(INIPARSER_SO_TARGET) +INIPARSER_STAGING_INSTALL_TGTS = $(INIPARSER_SO_TARGET) + +INIPARSER_TARGET_INSTALL_TGTS = $(INIPARSER_SO_TARGET) +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +INIPARSER_LINK_SO = y + +INIPARSER_BUILD_TARGETS = $(INIPARSER_A_TARGET) $(INIPARSER_SO_TARGET) +INIPARSER_STAGING_INSTALL_TGTS = $(INIPARSER_A_TARGET) $(INIPARSER_SO_TARGET) + +# Don't install static libs on target +INIPARSER_TARGET_INSTALL_TGTS = $(INIPARSER_SO_TARGET) +endif + +define INIPARSER_BUILD_CMDS + $(INIPARSER_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(INIPARSER_BUILD_TARGETS) +endef + +define INIPARSER_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0644 $(@D)/src/iniparser.h $(@D)/src/dictionary.h $(STAGING_DIR)/usr/include/ + $(foreach target,$(INIPARSER_STAGING_INSTALL_TGTS),$(INSTALL) -D -m 0755 $(@D)/$(target) $(STAGING_DIR)/usr/lib/) + $(if $(INIPARSER_LINK_SO),ln -s -r $(STAGING_DIR)/usr/lib/$(INIPARSER_SO_TARGET) $(STAGING_DIR)/usr/lib/libiniparser.so) +endef + +define INIPARSER_INSTALL_TARGET_CMDS + $(foreach target,$(INIPARSER_TARGET_INSTALL_TGTS),$(INSTALL) -D -m 0755 $(@D)/$(target) $(TARGET_DIR)/usr/lib/) + $(if $(INIPARSER_LINK_SO),ln -s -r $(TARGET_DIR)/usr/lib/$(INIPARSER_SO_TARGET) $(TARGET_DIR)/usr/lib/libiniparser.so) +endef + +$(eval $(generic-package)) From patchwork Wed Oct 4 13:12:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: enki X-Patchwork-Id: 1843361 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S0wB22vB7z1yph for ; Thu, 5 Oct 2023 00:13:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9AC77613F3; Wed, 4 Oct 2023 13:13:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9AC77613F3 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 Ycu7xkz1NQXK; Wed, 4 Oct 2023 13:13:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id B4B6460B33; Wed, 4 Oct 2023 13:13:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B4B6460B33 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 A07931BF2BC for ; Wed, 4 Oct 2023 13:13:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7A3EF820C7 for ; Wed, 4 Oct 2023 13:13:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7A3EF820C7 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 hF8q4HlqdpW5 for ; Wed, 4 Oct 2023 13:13:24 +0000 (UTC) Received: from sender4-of-o50.zoho.com (sender4-of-o50.zoho.com [136.143.188.50]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7993482033 for ; Wed, 4 Oct 2023 13:13:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7993482033 Delivered-To: enki@fsck.pl ARC-Seal: i=1; a=rsa-sha256; t=1696425198; cv=none; d=zohomail.com; s=zohoarc; b=me3HMprMWiHx4DbaujRtSfYAH5f7JtLn0PM7MPK2mrAMk7A1o5FoqbF6PjjUehdLNdUw6sd2TG2UpnPnn7u1iPF+IELaJ1PSktXTwdurb6KFT/3Kic3V6PFBsyXoODhX+STVErZ8gLYjgjneVPCGSrGt112QaXEvyAOoOyBTeoE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696425198; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=zRychMzt2tdMiJqOVHIMcL1fAh96esM/jrB9LXcGUNY=; b=AZxPQuwLhfmKoHIAwmmjZ7cITgCcl0DNdKlbgrznEFI1neSjZoLvR9kkGVe79sar8iZkFzDBQVhZSWnMVhQu5tgJGUX36Ap6UXKSb4qskc4ypStgRykiRwf6r8undA+vI7zDswk5QD3dl2fNbwryusGEHByZ6f/ouTlTW6oGr64= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=fsck.pl; spf=pass smtp.mailfrom=enki@fsck.pl; dmarc=pass header.from= Received: from newton.shill.gq (193.93.205.86 [193.93.205.86]) by mx.zohomail.com with SMTPS id 1696425196241625.9192224905073; Wed, 4 Oct 2023 06:13:16 -0700 (PDT) From: Maciej Grela To: buildroot@buildroot.org Message-ID: <20231004131256.2113233-3-enki@fsck.pl> Date: Wed, 4 Oct 2023 15:12:54 +0200 X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003094612.62025-2-enki@fsck.pl> References: <20231003094612.62025-2-enki@fsck.pl> MIME-Version: 1.0 X-ZohoMailClient: External X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1696425198; s=zoho; d=fsck.pl; i=enki@fsck.pl; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=zRychMzt2tdMiJqOVHIMcL1fAh96esM/jrB9LXcGUNY=; b=qNvBMQEdY2QcpYYrbGIzgOsLy9p9AMdfM8wzBR57EJJMb5qOiK+0vtwyJenc4KOk HFjwawDpNw2sJayqIJfM3Adde0Iq5OZqeMJm80YGRhHWvfKzsRii8pB3La4yzKYlSVa rySdaZ4XSDoDASSDwqC8T0DSTogZeCx987foOPlE= X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=fsck.pl header.i=enki@fsck.pl header.a=rsa-sha256 header.s=zoho header.b=qNvBMQEd Subject: [Buildroot] [PATCH v2 2/3] package/dns320l-daemon: 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: Thomas Petazzoni , Maciej Grela Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" dns320l-daemon is a simple system management daemon for the D-Link DNS-320L NAS. It handles power, Wake-on-LAN, temperature, fan speed and some LEDs. Signed-off-by: Maciej Grela --- package/Config.in | 1 + package/dns320l-daemon/Config.in | 8 +++++ package/dns320l-daemon/S50dns320l-daemon | 37 ++++++++++++++++++++++ package/dns320l-daemon/dns320l-daemon.hash | 1 + package/dns320l-daemon/dns320l-daemon.mk | 31 ++++++++++++++++++ 5 files changed, 78 insertions(+) create mode 100644 package/dns320l-daemon/Config.in create mode 100644 package/dns320l-daemon/S50dns320l-daemon create mode 100644 package/dns320l-daemon/dns320l-daemon.hash create mode 100644 package/dns320l-daemon/dns320l-daemon.mk diff --git a/package/Config.in b/package/Config.in index 228e9eb1e3..f1c451890f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2684,6 +2684,7 @@ menu "System tools" source "package/dcron/Config.in" source "package/ddrescue/Config.in" source "package/debianutils/Config.in" + source "package/dns320l-daemon/Config.in" source "package/docker-cli/Config.in" source "package/docker-compose/Config.in" source "package/docker-engine/Config.in" diff --git a/package/dns320l-daemon/Config.in b/package/dns320l-daemon/Config.in new file mode 100644 index 0000000000..35bd30a9e5 --- /dev/null +++ b/package/dns320l-daemon/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_DNS320L_DAEMON + bool "dns320l-daemon" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_INIPARSER + help + MCU Daemon for the D-Link DNS-320L + + https://www.aboehler.at/hg/dns320l-daemon diff --git a/package/dns320l-daemon/S50dns320l-daemon b/package/dns320l-daemon/S50dns320l-daemon new file mode 100644 index 0000000000..3e0b4a3339 --- /dev/null +++ b/package/dns320l-daemon/S50dns320l-daemon @@ -0,0 +1,37 @@ +#!/bin/sh + +DAEMON="dns320l-daemon" + +start() { + printf 'Starting %s: ' "$DAEMON" + start-stop-daemon -S -x "/usr/bin/$DAEMON" + status="$?" + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return "$status" +} + +stop() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -K -x "/usr/bin/$DAEMON" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start|stop|restart) + "$1";; + reload) + restart;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac diff --git a/package/dns320l-daemon/dns320l-daemon.hash b/package/dns320l-daemon/dns320l-daemon.hash new file mode 100644 index 0000000000..4396eb8f5d --- /dev/null +++ b/package/dns320l-daemon/dns320l-daemon.hash @@ -0,0 +1 @@ +sha256 eac74a64f0d4127748e629b8a5f723eab58ac83064a3f249f97b85bcd7faf061 tip.tar.bz2 diff --git a/package/dns320l-daemon/dns320l-daemon.mk b/package/dns320l-daemon/dns320l-daemon.mk new file mode 100644 index 0000000000..fd87ac1be3 --- /dev/null +++ b/package/dns320l-daemon/dns320l-daemon.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# dns320l-daemon +# +################################################################################ + +DNS320L_DAEMON_VERSION = 1.0 +DNS320L_DAEMON_SOURCE = tip.tar.bz2 +DNS320L_DAEMON_SITE = https://www.aboehler.at/hg/dns320l-daemon/archive +DNS320L_DAEMON_LICENSE = GPL-3 +DNS320L_DAEMON_DEPENDENCIES = iniparser + +define DNS320L_DAEMON_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" +endef + +define DNS320L_DAEMON_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/dns320l-daemon $(TARGET_DIR)/usr/bin/ + $(INSTALL) -D -m 0600 $(@D)/dns320l-daemon.ini $(TARGET_DIR)/etc/ +endef + +define DNS320L_DAEMON_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/dns320l-daemon.service $(TARGET_DIR)/lib/systemd/system/ +endef + +define DNS320L_DAEMON_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/dns320l-daemon/S50dns320l-daemon $(TARGET_DIR)/etc/init.d/S50dns320l-daemon +endef + +$(eval $(generic-package)) From patchwork Wed Oct 4 13:12:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: enki X-Patchwork-Id: 1843363 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::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S0wBG71cQz1yph for ; Thu, 5 Oct 2023 00:13:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3893660AF6; Wed, 4 Oct 2023 13:13:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3893660AF6 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 L_PmKJk9kZkU; Wed, 4 Oct 2023 13:13:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 2057061401; Wed, 4 Oct 2023 13:13:55 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2057061401 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 874031BF2BC for ; Wed, 4 Oct 2023 13:13:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6E02740A01 for ; Wed, 4 Oct 2023 13:13:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6E02740A01 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 Zgf1YlOyyjip for ; Wed, 4 Oct 2023 13:13:25 +0000 (UTC) Received: from sender3-of-o58.zoho.com (sender3-of-o58.zoho.com [136.143.184.58]) by smtp2.osuosl.org (Postfix) with ESMTPS id 32233404C3 for ; Wed, 4 Oct 2023 13:13:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 32233404C3 Delivered-To: enki@fsck.pl ARC-Seal: i=1; a=rsa-sha256; t=1696425200; cv=none; d=zohomail.com; s=zohoarc; b=mbMZPVBogK0NwvlZxxGN5XiNPm94pDKaij/X/J4sosSaKpJIYmPdpPiZHc5Ok7zg5wHSCEwkQcIU3O6mi0YvDFUlSRC77V0rSfN3rY7lVHk1qA6UMwss44Pgy36h7Nye7dHZffs9vrXusZhoprChbzTta7tsUQvi5wW4NHuzAeo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696425200; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=KjipEf2Yi+iJ4ADrbQyJnLPH8TC/g6tCiik6YKvS6BQ=; b=OuoP3JvLzECsr+cclc3jOnILDE4grGlrpUkBGevCtrYfkWrRTf71w1/25Ell+dEJeXHi1zj1wDhzkhOIHZ+FevXw1mB36XnbArWazoeLYds75OcBV51bztHK6j2Q+6tCnzJIBqwSpJC+L929wjn1EShLkKF+oMG6TFwmTEGeMwc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=fsck.pl; spf=pass smtp.mailfrom=enki@fsck.pl; dmarc=pass header.from= Received: from newton.shill.gq (193.93.205.86 [193.93.205.86]) by mx.zohomail.com with SMTPS id 1696425198156898.0340064012586; Wed, 4 Oct 2023 06:13:18 -0700 (PDT) From: Maciej Grela To: buildroot@buildroot.org Message-ID: <20231004131256.2113233-4-enki@fsck.pl> Date: Wed, 4 Oct 2023 15:12:55 +0200 X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003094612.62025-2-enki@fsck.pl> References: <20231003094612.62025-2-enki@fsck.pl> MIME-Version: 1.0 X-ZohoMailClient: External X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1696425200; s=zoho; d=fsck.pl; i=enki@fsck.pl; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=KjipEf2Yi+iJ4ADrbQyJnLPH8TC/g6tCiik6YKvS6BQ=; b=OqJ49GwXQcxNfwBjWoMXLZqsisWtvCDFU3QAkVr3MQTfjzryhqKkNL4c380+ZhmI VDLIWrisRtzE8SKaPsEa9ZbsPkLK7CLAWhJBtKwdgtJu74k+PjHtaC7J9OVt+YT56mn /r1wGMrbVlMab1yAs/1QHn9Fke3u1+PMQBhPJ1LE= X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=fsck.pl header.i=enki@fsck.pl header.a=rsa-sha256 header.s=zoho header.b=OqJ49GwX Subject: [Buildroot] [PATCH v2 3/3] board/d-link/dns320l: new board 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: Maciej Grela Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Add support for the D-Link DNS-320L using: - U-Boot 1.1.4 (in device flash) - Linux kernel 6.5.5 This is a 2-Bay 3.5'' SATA NAS with the following specs: - Marvell 88F6702 (1 GHz) CPU - 256 MiB DDR2 RAM - 128 MiB NAND Flash - 2 x SATA - 1 x 1000 Mbit/s Ethernet port - 1 x USB 2.0 The builtin bootloader banner is: U-Boot 1.1.4 (Aug 22 2012 - 17:06:54) Marvell version: 3.6.0.DNS-320L.01 Manufacturer product page: http://sharecenter.dlink.com/products/DNS-320 Device wiki: https://wikidevi.wi-cat.ru/D-Link_DNS-320L_rev_A1 Signed-off-by: Maciej Grela --- DEVELOPERS | 6 + board/d-link/dns320l/dts/kirkwood-dns320l.dts | 218 ++++++++++++++++++ configs/dns320l_defconfig | 16 ++ 3 files changed, 240 insertions(+) create mode 100644 board/d-link/dns320l/dts/kirkwood-dns320l.dts create mode 100644 configs/dns320l_defconfig diff --git a/DEVELOPERS b/DEVELOPERS index c45e7315da..76e8644073 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1950,6 +1950,12 @@ N: Ludwig Kormann F: board/in-circuit/ F: configs/icnova* +N: Maciej Grela +F: board/d-link/dns320l/ +F: configs/dns320l_defconfig +F: package/dns320l-daemon +F: package/iniparser + N: Maeva Manuel F: board/freescale/imx8qmmek/ F: configs/freescale_imx8qmmek_defconfig diff --git a/board/d-link/dns320l/dts/kirkwood-dns320l.dts b/board/d-link/dns320l/dts/kirkwood-dns320l.dts new file mode 100644 index 0000000000..660508a51a --- /dev/null +++ b/board/d-link/dns320l/dts/kirkwood-dns320l.dts @@ -0,0 +1,218 @@ +/dts-v1/; + +/* + * Device Tree file for DLINK DNS-320L + * + * Copyright (C) 2015, Sunke Schlüters + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * + * This file is based on the work of Andreas Böhler : + * - http://www.aboehler.at/doku/doku.php/projects:dns320l + * - http://www.aboehler.at/hg/linux-dns320l/file/ba7a60ad7687/linux-3.12/kirkwood-dns320l.dts + */ + +#include "marvell/kirkwood.dtsi" +#include "marvell/kirkwood-6281.dtsi" + +/ { + model = "D-Link DNS-320L"; + compatible = "dlink,dns-320l", "marvell,kirkwood-88f6702", "marvell,kirkwood"; + + memory { + device_type = "memory"; + reg = <0x00000000 0x10000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200n8 earlyprintk"; + stdout-path = &uart0; + }; + + gpio-keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-0 = <&pmx_button_reset &pmx_button_usb_copy>; + pinctrl-names = "default"; + + button@1 { + label = "Reset push button"; + linux,code = ; + gpios = <&gpio0 28 1>; + }; + button@2 { + label = "USB unmount button"; + linux,code = ; + gpios = <&gpio0 27 1>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + pinctrl-0 = <&pmx_led_usb_blue &pmx_led_red_right_hdd + &pmx_led_red_left_hdd &pmx_led_usb_orange>; + pinctrl-names = "default"; + + blue-usb { + label = "usb_blue"; + gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; + }; + orange-usb { + label = "usb_orange"; + gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; + }; + orange-l_hdd { + label = "hdd1_orange"; + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; + }; + orange-r_hdd { + label = "hdd2_orange"; + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; + }; + }; + + ocp@f1000000 { + pinctrl: pin-controller@10000 { + + pinctrl-0 = <&pmx_button_power>; + pinctrl-names = "default"; + + pmx_sata0: pmx-sata0 { + marvell,pins = "mpp20"; + marvell,function = "sata0"; + }; + pmx_sata1: pmx-sata1 { + marvell,pins = "mpp21"; + marvell,function = "sata1"; + }; + pmx_led_red_right_hdd: pmx-led-red-right-hdd { + marvell,pins = "mpp22"; + marvell,function = "gpio"; + }; + pmx_led_red_left_hdd: pmx-led-red-left-hdd { + marvell,pins = "mpp23"; + marvell,function = "gpio"; + }; + pmx_power_sata: pmx-power-sata { + marvell,pins = "mpp24"; + marvell,function = "gpio"; + }; + pmx_led_usb_blue: pmx-led-usb-blue { + marvell,pins = "mpp25"; + marvell,function = "gpio"; + }; + pmx_led_usb_orange: pmx-led-usb-orange { + marvell,pins = "mpp26"; + marvell,function = "gpio"; + }; + pmx_button_usb_copy: pmx-button-usb-copy { + marvell,pins = "mpp27"; + marvell,function = "gpio"; + }; + pmx_button_reset: pmx-button-reset { + marvell,pins = "mpp28"; + marvell,function = "gpio"; + }; + pmx_button_power: pmx-button-power { // I can't get this one to trigger a button press... + marvell,pins = "mpp29"; + marvell,function = "gpio"; + }; + }; + sata@80000 { + status = "okay"; + nr-ports = <2>; + }; + serial@12000 { + status = "okay"; + }; + + serial@12100 { + pinctrl-0 = <&pmx_uart1>; + pinctrl-names = "default"; + status = "okay"; + }; + }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-0 = <&pmx_power_sata>; + pinctrl-names = "default"; + + sata_power: regulator@1 { + compatible = "regulator-fixed"; + reg = <1>; + regulator-name = "SATA Power"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + regulator-always-on; + regulator-boot-on; + gpio = <&gpio1 24 0>; + }; + }; +}; + +&nand { + pinctrl-0 = <&pmx_nand>; + pinctrl-names = "default"; + status = "okay"; + chip-delay = <35>; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x100000>; + read-only; + }; + + partition@100000 { + label = "uImage"; + reg = <0x0100000 0x500000>; + }; + + partition@600000 { + label = "ramdisk"; + reg = <0x0600000 0x500000>; + }; + + partition@b00000 { + label = "image"; + reg = <0x0b00000 0x6400000>; + }; + + partition@6f00000 { + label = "mini firmware"; + reg = <0x6f00000 0xa00000>; + }; + + partition@7900000 { + label = "config"; + reg = <0x7900000 0x500000>; + }; + + partition@7e00000 { + label = "my-dlink"; + reg = <0x7e00000 0x200000>; + }; +}; + +&mdio { + status = "okay"; + + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + +ð0 { + status = "okay"; + ethernet0-port@0 { + phy-handle = <ðphy0>; + }; +}; diff --git a/configs/dns320l_defconfig b/configs/dns320l_defconfig new file mode 100644 index 0000000000..f281984267 --- /dev/null +++ b/configs/dns320l_defconfig @@ -0,0 +1,16 @@ +BR2_arm=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" +BR2_SYSTEM_DHCP="eth0" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.5.5" +BR2_LINUX_KERNEL_DEFCONFIG="mvebu_v5" +BR2_LINUX_KERNEL_APPENDED_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000" +BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/d-link/dns320l/dts/kirkwood-dns320l.dts" +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +BR2_TARGET_ROOTFS_CPIO_UIMAGE=y + +# The package is required for proper power management +BR2_PACKAGE_DNS320L_DAEMON=y