From patchwork Fri Oct 6 14:05:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: enki X-Patchwork-Id: 1844517 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.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S29FH0F2kz1yqD for ; Sat, 7 Oct 2023 01:05:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id CCB2B818AC; Fri, 6 Oct 2023 14:05:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CCB2B818AC 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 9ZbqUyJ0hUbT; Fri, 6 Oct 2023 14:05:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id E1AA381985; Fri, 6 Oct 2023 14:05:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E1AA381985 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 4EDA71BF34F for ; Fri, 6 Oct 2023 14:05:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 341E2417BA for ; Fri, 6 Oct 2023 14:05:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 341E2417BA 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 Zz91SI3oAlv1 for ; Fri, 6 Oct 2023 14:05:40 +0000 (UTC) Received: from sender4-of-o50.zoho.com (sender4-of-o50.zoho.com [136.143.188.50]) by smtp4.osuosl.org (Postfix) with ESMTPS id DEEFC4179E for ; Fri, 6 Oct 2023 14:05:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org DEEFC4179E Delivered-To: enki@fsck.pl ARC-Seal: i=1; a=rsa-sha256; t=1696601132; cv=none; d=zohomail.com; s=zohoarc; b=WwzUawY8Ooxz5FFtalhi89mmBcH/4AgyKqnQ5nX5Hrv6SyQ1+OrI5ol60HgJLMLsAbm8wy+uA4S9QocKpLe1H3vJEk41x/vrCeTLMy7oWNn9/euxU5OQNFWMT7FkqELmKbAQfVjBrrv7VfnYJoHqxTaXfy6aitBvxdvsrQemUc0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696601132; 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=iGt4tD3I4uG1a4qqOF9ZwxlZ1nIr4fKyqmHdQj0b9UZ550tAWJpzGDAoVZ8ptR8xY+k2qir98AnkUzHArgrFK1NbPqVo9cBLhC01FNAf+vbdZQovf94jSBCUxyPnMXPL3bDI1RmzSM4tt6AW3KCc89FdpMFXDxObTe73M1JWCPc= 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 1696601130570187.59006420788273; Fri, 6 Oct 2023 07:05:30 -0700 (PDT) From: Maciej Grela To: buildroot@buildroot.org Message-ID: <20231006140511.3840643-2-enki@fsck.pl> Date: Fri, 6 Oct 2023 16:05:09 +0200 X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231004131256.2113233-2-enki@fsck.pl> References: <20231004131256.2113233-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=1696601132; 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=avFGmkuUY6TSgHyeoUf0/24uUqrrRbo5feEj8Xq/HRDRAUJhjcF46hLuqroFPVeI 7QGEXYkpd1+/HHULLmjx02gvUd8xyjd91aqYJiPzzsG8VYQ5wXLp+zLnyJ/G0mIbNbE GPcEp9EyjFFBUsc50pNRfDiHKmZSkmE4MIcvz0sM= X-Mailman-Original-Authentication-Results: smtp4.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=avFGmkuU Subject: [Buildroot] [PATCH v3 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 Fri Oct 6 14:05:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: enki X-Patchwork-Id: 1844518 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.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S29FX5YtQz1yqD for ; Sat, 7 Oct 2023 01:06:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id DE3EF81F1B; Fri, 6 Oct 2023 14:06:05 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org DE3EF81F1B 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 jDB4lpjW50GM; Fri, 6 Oct 2023 14:06:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id DAC5F81B3E; Fri, 6 Oct 2023 14:06:03 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org DAC5F81B3E 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 D21D41BF34F for ; Fri, 6 Oct 2023 14:05:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B784C417BA for ; Fri, 6 Oct 2023 14:05:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B784C417BA 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 66k2E5ITWyAs for ; Fri, 6 Oct 2023 14:05:43 +0000 (UTC) Received: from sender4-of-o50.zoho.com (sender4-of-o50.zoho.com [136.143.188.50]) by smtp4.osuosl.org (Postfix) with ESMTPS id 7214A4179E for ; Fri, 6 Oct 2023 14:05:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 7214A4179E Delivered-To: enki@fsck.pl ARC-Seal: i=1; a=rsa-sha256; t=1696601136; cv=none; d=zohomail.com; s=zohoarc; b=FKiempa+e/HVSYshYbFzBNEpob7CRf6WBdmT8xuGkXmf+66jpV8ykkTjAAoee91Cz/tpcBLCcnLccyKZIukZPiG4JPPdq93Jw22ltr/je4gr5lwGgAOND/FHrLlxgYs0HE4e0CXZYC819yztJskKfC301+c7jtaV5Wqqx4EtTZQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696601136; 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=Z0nnypir2xsLwYV4oqT2MTdtol/U1FtVRxHOUyFiPzQ=; b=nb0IgmeonpSiyWuS2dcDrOTeJKrHNYGgiNNfLz9wxRAAXCpW7X7cnPBJ3UYrr6bObIAwiZUytfDLXmVTB2mlpdb7rlwniY6zgSxalGKo+yHwhxVAvfB/J9XXojfPBG76EteHd/i9LSUCbTt1pCXf4C6qFfT/gw0z/eQzXoNHgEQ= 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 1696601135548891.2762185242651; Fri, 6 Oct 2023 07:05:35 -0700 (PDT) From: Maciej Grela To: buildroot@buildroot.org Message-ID: <20231006140511.3840643-3-enki@fsck.pl> Date: Fri, 6 Oct 2023 16:05:10 +0200 X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231004131256.2113233-2-enki@fsck.pl> References: <20231004131256.2113233-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=1696601136; 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=Z0nnypir2xsLwYV4oqT2MTdtol/U1FtVRxHOUyFiPzQ=; b=nKSx0U7MH1OY/9aO3uIXea3ti9veMAhB5BwdN4FT4a3fYadVOoX8m3jOv9tK+7x3 JTo2u3K06mvsa8kHmMO2//kMsYn3Vd0dqmCSBz5AEGJ51xUF9xbLADyi71kYOWHY8GY G2K/3imAyaPmKMEF0usgJJjbPXFnWKIbQ8PX4vtA= X-Mailman-Original-Authentication-Results: smtp4.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=nKSx0U7M Subject: [Buildroot] [PATCH v3 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 + .../0001-listen-on-localhost.patch | 21 ++++++++++ package/dns320l-daemon/Config.in | 8 ++++ package/dns320l-daemon/S50dns320l-daemon | 42 +++++++++++++++++++ package/dns320l-daemon/dns320l-daemon.hash | 1 + package/dns320l-daemon/dns320l-daemon.mk | 32 ++++++++++++++ 6 files changed, 105 insertions(+) create mode 100644 package/dns320l-daemon/0001-listen-on-localhost.patch 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/0001-listen-on-localhost.patch b/package/dns320l-daemon/0001-listen-on-localhost.patch new file mode 100644 index 0000000000..50da024024 --- /dev/null +++ b/package/dns320l-daemon/0001-listen-on-localhost.patch @@ -0,0 +1,21 @@ +# HG changeset patch +# User Maciej Grela +# Date 1696540279 -7200 +# Thu Oct 05 23:11:19 2023 +0200 +# Node ID eca5ed65582402e64c36145290c214aee84b012b +# Parent 1f945ce22321a876143b38aaf5610c8915172b90 +Subject: [PATCH] Listen on localhost by default +Signed-off-by: Maciej Grela + +diff -r 1f945ce22321 -r eca5ed655824 dns320l-daemon.ini +--- a/dns320l-daemon.ini Tue Dec 09 12:24:29 2014 +0100 ++++ b/dns320l-daemon.ini Thu Oct 05 23:11:19 2023 +0200 +@@ -4,7 +4,7 @@ + + [Daemon] + ServerPort = 57367 +-ServerAddr = 0.0.0.0 ++ServerAddr = 127.0.0.1 + SyncTimeOnStartup = 0 + SyncTimeOnShutdown = 0 + DeviceShutdownDelay = 30 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..3bc2a60d0b --- /dev/null +++ b/package/dns320l-daemon/S50dns320l-daemon @@ -0,0 +1,42 @@ +#!/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 -s INT -K -x "/usr/bin/$DAEMON" +} + +poweroff() { + printf 'Stopping %s: ' "$DAEMON" + start-stop-daemon -s TERM -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|poweroff}" + 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..bc24a553c2 --- /dev/null +++ b/package/dns320l-daemon/dns320l-daemon.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# 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 +DNS320l_DAEMON_PATCH = 0001-listen-on-localhost.patch + +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 Fri Oct 6 14:05:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: enki X-Patchwork-Id: 1844519 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=patchwork.ozlabs.org) 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 (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S29Fq4ZlBz1yqD for ; Sat, 7 Oct 2023 01:06:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id B3DA081E37; Fri, 6 Oct 2023 14:06:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B3DA081E37 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 rzoL45UA9VuI; Fri, 6 Oct 2023 14:06:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id E484982356; Fri, 6 Oct 2023 14:06:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E484982356 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 22AF71BF34F for ; Fri, 6 Oct 2023 14:05:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id F0D998188A for ; Fri, 6 Oct 2023 14:05:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org F0D998188A 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 dtIUjBXvAbhY for ; Fri, 6 Oct 2023 14:05:44 +0000 (UTC) Received: from sender3-of-o57.zoho.com (sender3-of-o57.zoho.com [136.143.184.57]) by smtp1.osuosl.org (Postfix) with ESMTPS id 763A58183D for ; Fri, 6 Oct 2023 14:05:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 763A58183D Delivered-To: enki@fsck.pl ARC-Seal: i=1; a=rsa-sha256; t=1696601140; cv=none; d=zohomail.com; s=zohoarc; b=ChwUeKt4RX6gIivBeP9S982xcaXBRdP24P8rFJcNcm7xKgum0NT+LQyURu20oWklXUPdaSLgLrTWrxe7m46wyH0KN/jHf4FQHYGA8Z+MxZvUu4ycAVWYufpnxXB5LUpQ3L+Q/BFw9Y4067ZGm86fxOUkKXyspGvMgjnStDM0b0E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696601140; 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=gmkWRwtGcPIR+cL1vuBJ5hFEtTE25zhZYRDHX2T9QdtwupR6MMnip24TkFfUmRySLXpdht+9qFZUvunQfhBnxtJCpEZX/lo2KY9NsQKAU9QhLfNRKBTKayySuViLRcp0/+b86mHdENMOOlfsYeNcV6pg/yqrK7vukiuQxr1jdb8= 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 1696601139131820.492309379511; Fri, 6 Oct 2023 07:05:39 -0700 (PDT) From: Maciej Grela To: buildroot@buildroot.org Message-ID: <20231006140511.3840643-4-enki@fsck.pl> Date: Fri, 6 Oct 2023 16:05:11 +0200 X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231004131256.2113233-2-enki@fsck.pl> References: <20231004131256.2113233-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=1696601140; 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=Fjw9bvcuyDeTnV7G7wtBMJtNJjvPIetOr+q6tU3x+fkoELVJUx/NxL2ptIXV5tZ/ Y0z7/xqcsUmmB53FRTdhbusR4sqCMhxNBTGqaoD7y4ooYWrIlvvmk77i8llHBoZqFyM IFXiN1FfihV92omCp27Fo6PKE3JdNZkVruDX+3LY= 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=Fjw9bvcu Subject: [Buildroot] [PATCH v3 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 Reviewed-by: Giulio Benetti --- 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