Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <rodrigue@qca.qualcomm.com>
To: <linux-wireless@vger.kernel.org>
Cc: <hauke@hauke-m.de>, <nbd@nbd.name>, <linville@tuxdriver.com>,
	"Luis R. Rodriguez" <mcgrof@frijolero.org>
Subject: [PATCH 2/5] compat: add some initial RHEL support
Date: Fri, 24 Feb 2012 17:52:03 -0800	[thread overview]
Message-ID: <1330134726-1634-3-git-send-email-rodrigue@qca.qualcomm.com> (raw)
In-Reply-To: <1330134726-1634-1-git-send-email-rodrigue@qca.qualcomm.com>

From: Luis R. Rodriguez <mcgrof@frijolero.org>

This adds a series of CONFIG_COMPAT_${RHEL_MAJOR}_${i} tags
for each known RHEL version that we supercede. I cannot
verify if this is correct but this is my translation of
this to script:

RHEL_MAJOR := $(shell grep ^RHEL_MAJOR $(KLIB_BUILD)/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
ifneq ($(RHEL_MAJOR),)
RHEL_MINOR := $(shell grep ^RHEL_MINOR $(KLIB_BUILD)/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
COMPAT_RHEL_VERSIONS := $(shell I=$(RHEL_MINOR); while [ "$$I" -ge 0 ]; do echo $$I; I=$$(($$I - 1)); done)
$(foreach ver,$(COMPAT_RHEL_VERSIONS),$(eval CONFIG_COMPAT_RHEL_$(RHEL_MAJOR)_$(ver)=y))

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
---
 scripts/gen-compat-config.sh |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/scripts/gen-compat-config.sh b/scripts/gen-compat-config.sh
index 82b439c..656e8d3 100755
--- a/scripts/gen-compat-config.sh
+++ b/scripts/gen-compat-config.sh
@@ -41,6 +41,16 @@ for i in $(seq ${KERNEL_SUBLEVEL} ${COMPAT_LATEST_VERSION}); do
 	echo "CONFIG_COMPAT_KERNEL_3_${i}=y"
 done
 
+# The purpose of these seem to be the inverse of the above other varibales.
+# The RHEL checks seem to annotate the existance of RHEL minor versions.
+RHEL_MAJOR=$(grep ^RHEL_MAJOR ${KLIB_BUILD}/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
+if [[ ! -z ${RHEL_MAJOR} ]]; then
+	RHEL_MINOR=$(grep ^RHEL_MINOR $(KLIB_BUILD)/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
+	for i in $(seq 0 ${RHEL_MINOR}); do
+		echo "CONFIG_COMPAT_${RHEL_MAJOR}_${i}=y"
+	done
+fi
+
 if [[ ${CONFIG_COMPAT_KERNEL_2_6_33} -eq "y" ]]; then
 	echo "CONFIG_COMPAT_FIRMWARE_CLASS=m"
 fi
-- 
1.7.4.15.g7811d


  parent reply	other threads:[~2012-02-25  1:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-25  1:52 [PATCH 0/5] compat / compat-wireless: merge autoconf generation Luis R. Rodriguez
2012-02-25  1:52 ` [PATCH 1/5] compat: fix few compilations by adding compat_autoconf.h support Luis R. Rodriguez
2012-02-25  1:52 ` Luis R. Rodriguez [this message]
2012-02-25  1:52 ` [PATCH 3/5] compat-wireless: fix old checks on KERNEL_SUBLEVEL Luis R. Rodriguez
2012-02-25  1:52 ` [PATCH 4/5] compat-wireless: start using CONFIG_COMPAT_KERNEL_ in code Luis R. Rodriguez
2012-02-25  1:52 ` [PATCH 5/5] compat-wireless: use compat's CONFIG_COMPAT_KERNEL_* variables Luis R. Rodriguez
2012-02-25 11:05 ` [PATCH 0/5] compat / compat-wireless: merge autoconf generation Hauke Mehrtens
2012-02-27 21:18   ` Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330134726-1634-3-git-send-email-rodrigue@qca.qualcomm.com \
    --to=rodrigue@qca.qualcomm.com \
    --cc=hauke@hauke-m.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@frijolero.org \
    --cc=nbd@nbd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox