[Glibc-bsd-commits] r5987 - in trunk/kfreebsd-10/debian: . local patches
stevenc-guest at alioth.debian.org
stevenc-guest at alioth.debian.org
Sat Apr 9 21:08:22 UTC 2016
Author: stevenc-guest
Date: 2016-04-09 21:08:22 +0000 (Sat, 09 Apr 2016)
New Revision: 5987
Added:
trunk/kfreebsd-10/debian/local/
trunk/kfreebsd-10/debian/local/ar9300_devid.h
Modified:
trunk/kfreebsd-10/debian/changelog
trunk/kfreebsd-10/debian/patches/999_config.diff
trunk/kfreebsd-10/debian/patches/series
trunk/kfreebsd-10/debian/rules
Log:
* Simplify the procedure to enable debug builds in debian/rules
* Simplify the procedure to build with non-free drivers and blobs,
enabled by putting +nonfree or +sourceless in the Version field
(Thanks, Jon Boden, for the original patch this is based on)
(Closes: #820151)
Modified: trunk/kfreebsd-10/debian/changelog
===================================================================
--- trunk/kfreebsd-10/debian/changelog 2016-04-04 11:52:05 UTC (rev 5986)
+++ trunk/kfreebsd-10/debian/changelog 2016-04-09 21:08:22 UTC (rev 5987)
@@ -1,3 +1,13 @@
+kfreebsd-10 (10.3~svn296998-3) UNRELEASED; urgency=medium
+
+ * Simplify the procedure to enable debug builds in debian/rules
+ * Simplify the procedure to build with non-free drivers and blobs,
+ enabled by putting +nonfree or +sourceless in the Version field
+ (Thanks, Jon Boden, for the original patch this is based on)
+ (Closes: #820151)
+
+ -- Steven Chamberlain <steven at pyro.eu.org> Mon, 04 Apr 2016 11:04:58 +0100
+
kfreebsd-10 (10.3~svn296998-2) experimental; urgency=medium
* Experimentally build all arches with GCC for now (Closes: #813727)
Added: trunk/kfreebsd-10/debian/local/ar9300_devid.h
===================================================================
--- trunk/kfreebsd-10/debian/local/ar9300_devid.h (rev 0)
+++ trunk/kfreebsd-10/debian/local/ar9300_devid.h 2016-04-09 21:08:22 UTC (rev 5987)
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2008-2011 Atheros Communications Inc.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef __AR9300_DEVID_H__
+#define __AR9300_DEVID_H__
+
+/* Atheros chipsets */
+#define AR_SREV_VERSION_AR5416_PCI 0xD
+#define AR_SREV_VERSION_AR5416_PCIE 0xC
+#define AR_SREV_REVISION_AR5416_10 0
+#define AR_SREV_REVISION_AR5416_20 1
+#define AR_SREV_REVISION_AR5416_22 2
+#define AR_SREV_VERSION_AR9100 0x14
+#define AR_SREV_VERSION_AR9160 0x40
+#define AR_SREV_REVISION_AR9160_10 0
+#define AR_SREV_REVISION_AR9160_11 1
+#define AR_SREV_VERSION_AR9280 0x80
+#define AR_SREV_REVISION_AR9280_10 0
+#define AR_SREV_REVISION_AR9280_20 1
+#define AR_SREV_REVISION_AR9280_21 2
+#define AR_SREV_VERSION_AR9285 0xC0
+#define AR_SREV_REVISION_AR9285_10 0
+#define AR_SREV_REVISION_AR9285_11 1
+#define AR_SREV_REVISION_AR9285_12 2
+#define AR_SREV_VERSION_AR9287 0x180
+#define AR_SREV_REVISION_AR9287_10 0
+#define AR_SREV_REVISION_AR9287_11 1
+#define AR_SREV_REVISION_AR9287_12 2
+#define AR_SREV_REVISION_AR9287_13 3
+#define AR_SREV_VERSION_AR9271 0x140
+#define AR_SREV_REVISION_AR9271_10 0
+#define AR_SREV_REVISION_AR9271_11 1
+#define AR_SREV_VERSION_AR9300 0x1c0
+#define AR_SREV_REVISION_AR9300_20 2 /* 2.0 and 2.1 */
+#define AR_SREV_REVISION_AR9300_22 3
+#define AR_SREV_VERSION_AR9330 0x200
+#define AR_SREV_REVISION_AR9330_10 0
+#define AR_SREV_REVISION_AR9330_11 1
+#define AR_SREV_REVISION_AR9330_12 2
+#define AR_SREV_VERSION_AR9485 0x240
+#define AR_SREV_REVISION_AR9485_10 0
+#define AR_SREV_REVISION_AR9485_11 1
+#define AR_SREV_VERSION_AR9340 0x300
+#define AR_SREV_REVISION_AR9340_10 0
+#define AR_SREV_REVISION_AR9340_11 1
+#define AR_SREV_REVISION_AR9340_12 2
+#define AR_SREV_REVISION_AR9340_13 3
+#define AR_SREV_VERSION_AR9380 0x1C0
+#define AR_SREV_VERSION_AR9580 0x1C0
+#define AR_SREV_REVISION_AR9580_10 4 /* AR9580 1.0 */
+#define AR_SREV_VERSION_AR9460 0x280
+#define AR_SREV_VERSION_AR9462 0x280
+#define AR_SREV_REVISION_AR9462_20 2
+#define AR_SREV_REVISION_AR9462_21 3
+
+/* Qualcomm Atheros chipsets */
+#define AR_SREV_VERSION_QCA9565 0x2C0
+#define AR_SREV_REVISION_QCA9565_10 0
+#define AR_SREV_REVISION_QCA9565_101 1
+#define AR_SREV_REVISION_QCA9565_11 2
+#define AR_SREV_VERSION_QCA9550 0x400
+#define AR_SREV_VERSION_QCA9531 0x500
+#define AR_SREV_REVISION_QCA9531_10 0
+#define AR_SREV_REVISION_QCA9531_11 1
+
+#endif
Modified: trunk/kfreebsd-10/debian/patches/999_config.diff
===================================================================
--- trunk/kfreebsd-10/debian/patches/999_config.diff 2016-04-04 11:52:05 UTC (rev 5986)
+++ trunk/kfreebsd-10/debian/patches/999_config.diff 2016-04-09 21:08:22 UTC (rev 5987)
@@ -48,7 +48,7 @@
options SYSVSHM # SYSV-style shared memory
--- /dev/null
+++ b/sys/conf/DEBIAN
-@@ -0,0 +1,52 @@
+@@ -0,0 +1,45 @@
+# Common options to all Debian GNU/kFreeBSD kernels
+
+options LINPROCFS
@@ -75,10 +75,6 @@
+# but unfortunetely glibc doesn't support pts(4) yet (see #667448).
+device pty
+
-+# Toggle to enable/disable debug options.
-+include DEBIAN_DEBUG
-+#include DEBIAN_NODEBUG
-+
+# Alternate queueing
+options ALTQ
+options ALTQ_CBQ # Class Bases Queuing (CBQ)
@@ -87,9 +83,6 @@
+options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC)
+options ALTQ_PRIQ # Priority Queuing (PRIQ)
+
-+# Disable binary blobs
-+include WITHOUT_SOURCELESS
-+
+# In order to enable IPSEC you MUST also add device crypto to
+# your kernel configuration
+device crypto # core crypto support
Modified: trunk/kfreebsd-10/debian/patches/series
===================================================================
--- trunk/kfreebsd-10/debian/patches/series 2016-04-04 11:52:05 UTC (rev 5986)
+++ trunk/kfreebsd-10/debian/patches/series 2016-04-09 21:08:22 UTC (rev 5987)
@@ -35,7 +35,6 @@
924_module_objdir.diff
999_config.diff
aicasm-parallel-build-dependencies.diff
-ath9k-linux.diff
# Security patches / errata
#SA-15_02.kmem.patch
Modified: trunk/kfreebsd-10/debian/rules
===================================================================
--- trunk/kfreebsd-10/debian/rules 2016-04-04 11:52:05 UTC (rev 5986)
+++ trunk/kfreebsd-10/debian/rules 2016-04-09 21:08:22 UTC (rev 5987)
@@ -20,9 +20,22 @@
cpu := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
config_files := $(wildcard debian/arch/$(cpu)/*.config)
flavours := $(config_files:debian/arch/$(cpu)/%.config=%)
+ld_target := $(shell ld --help | sed -ne "s/[^ :]*: supported targets: \([^ ]*\) .*/\1/p")
configfile := DEBCUSTOM
+
+# Whether to enable extra debug features, at the expense of performance
+# Not recommended for release builds
+debug := yes
+
+# Produce a DFSG-free package by default, stripping out sourceless
+# (non-free) blobs. Put +nonfree or +sourceless in the Version field
+# to keep the non-free parts and build non-free drivers
+nonfree := $(findstring +nonfree,$(full_version))$(findstring +sourceless,$(full_version))
+
abiname := 0
-ld_target := $(shell ld --help | sed -ne "s/[^ :]*: supported targets: \([^ ]*\) .*/\1/p")
+# Clearly indicate if the build is non-free, and make it
+# co-installable with DFSG-free versions
+abiname := $(abiname)$(nonfree)
ifeq ($(cpu), mipsel)
kfreebsd_cpu := mips
@@ -58,9 +71,13 @@
MAKE := \
MAKEFLAGS=$(BSD_MAKEFLAGS) \
make \
- MACHINE_ARCH=$(kfreebsd_cpu) \
- -DWITHOUT_SOURCELESS
+ MACHINE_ARCH=$(kfreebsd_cpu)
+ifeq ($(nonfree),)
+# Disable non-free drivers
+MAKE += -DWITHOUT_SOURCELESS
+endif
+
# Clang is the default compiler on these architectures (see src/share/mk/bsd.own.mk)
clang_cpus := # i386 amd64 arm
# Experimentally build all arches with GCC for now
@@ -96,7 +113,15 @@
get-orig-source:
rm -rf $(ORIG_DIR)
svn export --ignore-keywords -r $(svn_revision) $(SVN)/sys $(ORIG_DIR)/sys
+ifeq ($(nonfree),)
+ # Removing non-free blobs to make source package DFSG-free
cd $(ORIG_DIR) && $(CURDIR)/debian/prune.sh
+ # Replace file with a DFSG-free re-implementation
+ cp -af debian/local/ar9300_devid.h $(ORIG_DIR)/sys/contrib/dev/ath/ath_hal/ar9300/
+ cp -af debian/local/ar9300_devid.h $(ORIG_DIR)/sys/dev/ath/ath_hal/ar9003/
+else
+ # WARNING: orig source tarball will contain non-free blobs
+endif
# Clamp timestamps to be no newer than last changelog entry, see
# https://wiki.debian.org/ReproducibleBuilds/TimestampsInTarball
find $(ORIG_DIR) -newermt "@$(SOURCE_DATE_EPOCH)" -print0 \
@@ -201,6 +226,14 @@
\( -name Makefile -o -name Makefile.inc \) \
-exec sed -i 's@$${.CURDIR}/@@g' \{\} \;
+ifneq ($(nonfree),)
+ # Use appropriate syntax for GNU uudecode,
+ # only needed for non-free blobs
+ find $(FLAVOR_DIR)-$*/sys/modules/ \
+ \( -name Makefile -o -name Makefile.inc \) \
+ -exec sed -i 's/uudecode -p/uudecode -o -/' \{\} \;
+endif
+
touch $@
build-flavor-%-stamp: src-flavor-%-stamp
# Add the abiname and the flavor to the kernel version
@@ -222,7 +255,23 @@
$(FLAVOR_DIR)-$*/sys/conf/ldscript.$(kfreebsd_cpu)
# Configure the kernel
- cp debian/arch/$(cpu)/$*.config $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/conf/
+ cp -af debian/arch/$(cpu)/$*.config $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/conf/
+ echo "# Debian package build options" >> \
+ $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/conf/$*.config
+ifneq ($(debug),no)
+ # Extra debugging options are enabled
+ echo "include DEBIAN_DEBUG" >> \
+ $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/conf/$*.config
+else
+ # Extra debugging options are disabled
+ echo "include DEBIAN_NODEBUG" >> \
+ $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/conf/$*.config
+endif
+ifeq ($(nonfree),)
+ # Disable non-free drivers
+ echo "include WITHOUT_SOURCELESS" >> \
+ $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/conf/$*.config
+endif
ln -sf $*.config $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/conf/$(configfile)
cd $(FLAVOR_DIR)-$*/sys/$(kfreebsd_cpu)/conf \
&& config $(configfile)
More information about the Glibc-bsd-commits
mailing list