From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 12 Nov 2021 10:09:24 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mlSYm-0006Yc-1g for lore@lore.pengutronix.de; Fri, 12 Nov 2021 10:09:24 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mlSYl-0001r0-Iv; Fri, 12 Nov 2021 10:09:23 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mlSY8-0001qq-0Q; Fri, 12 Nov 2021 10:08:44 +0100 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1mlSY7-0008PU-Qo; Fri, 12 Nov 2021 10:08:43 +0100 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1mlSY6-00HX3C-5g; Fri, 12 Nov 2021 10:08:42 +0100 Date: Fri, 12 Nov 2021 10:08:42 +0100 From: Michael Olbrich To: Christian Melki Message-ID: Mail-Followup-To: Christian Melki , ptxdist@pengutronix.de References: <20211111095249.1873275-1-christian.melki@t2data.com> <20211111095249.1873275-2-christian.melki@t2data.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211111095249.1873275-2-christian.melki@t2data.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] [PATCH] dump1090fa: New package. Version 6.1 X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On Thu, Nov 11, 2021 at 10:52:49AM +0100, Christian Melki wrote: > dump1090 from FlightAware is an ADS-B (Automatic Dependent Surveillance-Broadcast). > ADS-B is used by aircrafts to signal their presence. > Using an RTL (very cheap) based SDR, you can easily build your own ADS-B decoder. > > Signed-off-by: Christian Melki > --- > .../dump1090fa-6.1/fix_cpufeatures_arch.patch | 61 ++++++++++++++ > patches/dump1090fa-6.1/series | 1 + > rules/dump1090fa.in | 8 ++ > rules/dump1090fa.make | 80 +++++++++++++++++++ > 4 files changed, 150 insertions(+) > create mode 100644 patches/dump1090fa-6.1/fix_cpufeatures_arch.patch > create mode 100644 patches/dump1090fa-6.1/series > create mode 100644 rules/dump1090fa.in > create mode 100644 rules/dump1090fa.make > > diff --git a/patches/dump1090fa-6.1/fix_cpufeatures_arch.patch b/patches/dump1090fa-6.1/fix_cpufeatures_arch.patch > new file mode 100644 > index 000000000..270a35846 > --- /dev/null > +++ b/patches/dump1090fa-6.1/fix_cpufeatures_arch.patch > @@ -0,0 +1,61 @@ > +From 059e48b82beb4fb920cca977b02db1ceb48facb9 Mon Sep 17 00:00:00 2001 > +From: Oliver Jowett > +Date: Thu, 23 Sep 2021 13:23:17 +0800 > +Subject: [PATCH] Allow env vars (not only command line overrides) to set > + CPUFEATURES_{ARCH,UNAME}. Change CPUFEATURES_{ARCH,UNAME} defaults to use > + {ARCH,UNAME} values. > + > +Fixes #158 > +--- > + Makefile | 8 ++++++-- > + Makefile.cpufeatures | 4 ++-- > + 2 files changed, 8 insertions(+), 4 deletions(-) > + > +diff --git a/Makefile b/Makefile > +index a85d154c5..9d81ed157 100644 > +--- a/Makefile > ++++ b/Makefile > +@@ -39,7 +39,11 @@ else > + LIMESDR ?= no > + endif > + > +-UNAME := $(shell uname) > ++HOST_UNAME := $(shell uname) > ++HOST_ARCH := $(shell uname -m) > ++ > ++UNAME ?= $(HOST_UNAME) > ++ARCH ?= $(HOST_ARCH) > + > + ifeq ($(UNAME), Linux) > + CPPFLAGS += -D_DEFAULT_SOURCE > +@@ -150,7 +154,6 @@ endif > + ## starch (runtime DSP code selection) mix, architecture-specific > + ## > + > +-ARCH ?= $(shell uname -m) > + ifneq ($(CPUFEATURES),yes) > + # need to be able to detect CPU features at runtime to enable any non-standard compiler flags > + STARCH_MIX := generic > +@@ -180,6 +183,7 @@ include dsp/generated/makefile.$(STARCH_MIX) > + showconfig: > + @echo "Building with:" >&2 > + @echo " Version string: $(DUMP1090_VERSION)" >&2 > ++ @echo " Architecture: $(ARCH)" >&2 > + @echo " DSP mix: $(STARCH_MIX)" >&2 > + @echo " RTLSDR support: $(RTLSDR)" >&2 > + @echo " BladeRF support: $(BLADERF)" >&2 > +diff --git a/Makefile.cpufeatures b/Makefile.cpufeatures > +index 8c3b8418d..6b4289978 100644 > +--- a/Makefile.cpufeatures > ++++ b/Makefile.cpufeatures > +@@ -2,8 +2,8 @@ > + > + # cmake integration is a little tricky, so let's do this by hand for now > + > +-CPUFEATURES_UNAME := $(shell uname) > +-CPUFEATURES_ARCH := $(shell uname -m) > ++CPUFEATURES_UNAME ?= $(UNAME) > ++CPUFEATURES_ARCH ?= $(ARCH) > + > + CPUFEATURES_OBJS := cpu_features/src/filesystem.o cpu_features/src/stack_line_reader.o cpu_features/src/string_view.o > + CPUFEATURES_CFLAGS := -std=c99 -O -g -DSTACK_LINE_READER_BUFFER_SIZE=1024 -DNDEBUG > diff --git a/patches/dump1090fa-6.1/series b/patches/dump1090fa-6.1/series > new file mode 100644 > index 000000000..75a7aa6dc > --- /dev/null > +++ b/patches/dump1090fa-6.1/series > @@ -0,0 +1 @@ > +fix_cpufeatures_arch.patch > diff --git a/rules/dump1090fa.in b/rules/dump1090fa.in > new file mode 100644 > index 000000000..5738ba17e > --- /dev/null > +++ b/rules/dump1090fa.in > @@ -0,0 +1,8 @@ > +## SECTION=networking > + > +menuconfig DUMP1090FA > + tristate > + prompt "dump1090fa " no tabs, just spaces to align the prompt. > + select LIBRTLSDR > + help > + FlightAware MODE-S/ADS-B decoder. > \ No newline at end of file > diff --git a/rules/dump1090fa.make b/rules/dump1090fa.make > new file mode 100644 > index 000000000..53d44791b > --- /dev/null > +++ b/rules/dump1090fa.make > @@ -0,0 +1,80 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2021 by Christian Melki > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_DUMP1090FA) += dump1090fa > + > +# > +# Paths and names > +# > +DUMP1090FA_VERSION := 6.1 > +DUMP1090FA_MD5 := a7cb661bc23974f8bf7650ce26b6e0be > +DUMP1090FA := dump1090fa-$(DUMP1090FA_VERSION) > +DUMP1090FA_SUFFIX := tar.gz > +DUMP1090FA_URL := https://github.com/flightaware/dump1090/archive/refs/tags/v$(DUMP1090FA_VERSION).$(DUMP1090FA_SUFFIX) > +DUMP1090FA_SOURCE := $(SRCDIR)/$(DUMP1090FA).$(DUMP1090FA_SUFFIX) > +DUMP1090FA_DIR := $(BUILDDIR)/$(DUMP1090FA) > +DUMP1090FA_LICENSE := GPL-2.0-only > + > +# ---------------------------------------------------------------------------- > +# Prepare > +# ---------------------------------------------------------------------------- > + > +ifdef PTXCONF_ARCH_X86 > +DUMP1090FA_ARCH := x86 > +ifdef PTXCONF_ARCH_X86_64 > +DUMP1090FA_ARCH := x86_64 > +endif > +endif > +ifdef PTXCONF_ARCH_ARM > +DUMP1090FA_ARCH := arm > +endif > +ifdef PTXCONF_ARCH_ARM64 > +DUMP1090FA_ARCH := aarch64 > +endif Use PTXCONF_ARCH_STRING to start with. Take a look at what nss.make does. You can probably just copy it. That should simplify this a bit. > + > +DUMP1090FA_CONF_TOOL := NO > +DUMP1090FA_MAKE_ENV := \ > + $(CROSS_ENV) \ > + BLADERF=no \ > + LIMESDR=no \ > + HACKRF=no \ > + RTLSDR=yes \ > + ARCH=$(DUMP1090FA_ARCH) \ > + CPUFEATURES_ARCH=$(DUMP1090FA_ARCH) \ > + CPUFEATURES_UNAME="Linux" > + > +# ---------------------------------------------------------------------------- > +# Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/dump1090fa.install: > + @$(call targetinfo) > + @install -vD -m 755 $(DUMP1090FA_DIR)/dump1090 $(DUMP1090FA_PKGDIR)/usr/bin/dump1090-fa > + $(call touch) > + > +# ---------------------------------------------------------------------------- > +# Target-Install > +# ---------------------------------------------------------------------------- > + > +$(STATEDIR)/dump1090fa.targetinstall: > + @$(call targetinfo) > + @$(call install_init, dump1090fa) > + @$(call install_fixup, dump1090fa,PRIORITY,optional) > + @$(call install_fixup, dump1090fa,SECTION,base) > + @$(call install_fixup, dump1090fa,AUTHOR,"Christian Melki ") > + @$(call install_fixup, dump1090fa,DESCRIPTION,missing) One empty line here. Michael > + @$(call install_copy, dump1090fa, 0, 0, 0755, -, /usr/bin/dump1090-fa) > + > + @$(call install_finish, dump1090fa) > + > + @$(call touch) > + > +# vim: syntax=make > -- > 2.30.2 > > > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de