Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ulf at uclibc.org <ulf@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] svn commit: trunk/buildroot/scripts
Date: Sat,  3 Jan 2009 16:59:04 +0000 (UTC)	[thread overview]
Message-ID: <20090103165904.DD4DC76BC9@busybox.osuosl.org> (raw)

Author: ulf
Date: 2009-01-03 16:59:04 +0000 (Sat, 03 Jan 2009)
New Revision: 24679

Log:
Do not copy linux config with higher minor version than current kernel

Modified:
   trunk/buildroot/scripts/get_linux_config.sh


Changeset:
Modified: trunk/buildroot/scripts/get_linux_config.sh
===================================================================
--- trunk/buildroot/scripts/get_linux_config.sh	2009-01-03 16:30:09 UTC (rev 24678)
+++ trunk/buildroot/scripts/get_linux_config.sh	2009-01-03 16:59:04 UTC (rev 24679)
@@ -11,38 +11,57 @@
 #######################################################################
 
 TOPDIR=`pwd`
-
+DEBUG=0
 # parameter #1	BOARD_PATH
 # parameter #2  LINUX26_DIR
 
-CONFIGS=`ls -X $1/*linux*.*.config | sed s/[.]config// - | sort`
+CONFIGS=`ls -X $1/*linux-2.6.*.config | sed s/[.]config// - | sort`
 LINUX26_DIR=`basename $2`
 LINUX26_CONFIG=${2}/.config
 LINUX_MAJOR_VERSION=${LINUX26_DIR:10:2}
 LINUX_MINOR_VERSION=${LINUX26_DIR:13}
 
+function DBG_PRINT
+{
+	if [ ${DEBUG} == 1 ] ; then
+		echo $1
+	fi
+}
+
 function linux_version()
 {
 	local KCONFIG
 	KCONFIG=`basename $1`
-	KERNEL=`echo ${KCONFIG} | sed s/.*-linux-/linux-/g -`
+	KERNEL=`echo ${KCONFIG} | sed s/.*linux-2.6./linux-2.6./g -`
 	THIS_MAJOR=${KERNEL:10:2}
 	THIS_MINOR=${KERNEL:13}
-
 }
 
 # Try to be careful...
+DBG_PRINT MAJOR=\"${LINUX_MAJOR_VERSION}\"
+DBG_PRINT MINOR=\"${LINUX_MINOR_VERSION}\"
 
 for i in ${CONFIGS} ; do
+    DBG_PRINT FILE=$i
     linux_version $i
-    if [ ${THIS_MAJOR} -le ${LINUX_MAJOR_VERSION} ] ; then
+    DBG_PRINT KERNEL=${KERNEL}
+    if [ ${THIS_MAJOR} -lt ${LINUX_MAJOR_VERSION} ] ; then
 	    echo Copying `basename $i`.config ...
 	    cp $i.config ${LINUX26_CONFIG}
     elif [ ${THIS_MAJOR} -eq ${LINUX_MAJOR_VERSION} ] ; then
-	if [ ${THIS_MINOR} -le ${LINUX_MINOR_VERSION} ] ; then
+	if [ "${LINUX_MINOR_VERSION}X" == "X" ] ; then
+		if [ "${THIS_MINOR}X" == "X" ] ; then
+		    echo Copying `basename $i`.config ...
+		    cp $i.config ${LINUX26_CONFIG}
+		else		
+			return
+		fi
+	elif [ ${THIS_MINOR} -le ${LINUX_MINOR_VERSION} ] ; then
 	    echo Copying `basename $i`.config ...
 	    cp $i.config ${LINUX26_CONFIG}
 	fi
+    else		
+	return
     fi
 done
 

             reply	other threads:[~2009-01-03 16:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-03 16:59 ulf at uclibc.org [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-02-03 16:24 [Buildroot] svn commit: trunk/buildroot/scripts jacmet at uclibc.org
2009-02-02  7:19 ulf at uclibc.org
2009-02-02  7:18 ulf at uclibc.org
2009-01-25 23:09 ulf at uclibc.org
2009-01-22 23:10 ulf at uclibc.org
2009-01-22 23:05 ulf at uclibc.org
2009-01-16 22:45 ulf at uclibc.org
2009-01-15 23:17 ulf at uclibc.org
2009-01-13 18:43 ulf at uclibc.org
2009-01-12  7:45 ulf at uclibc.org
2009-01-12  7:43 ulf at uclibc.org
2009-01-11 20:37 ulf at uclibc.org
2009-01-10  0:26 ulf at uclibc.org
2009-01-11 13:23 ` Peter Korsgaard
2009-01-02 15:44 ulf at uclibc.org
2009-01-03  7:04 ` Hamish Moffatt
2009-01-03  8:50   ` Ulf Samuelsson
2008-12-23 17:51 wberrier at uclibc.org
2008-10-22  5:19 jacmet at uclibc.org
2008-05-01 15:21 ninevoltz at uclibc.org
2008-04-06 10:01 ulf at uclibc.org
2008-04-01  9:53 jacmet at uclibc.org
2008-03-11 13:14 ninevoltz at uclibc.org

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=20090103165904.DD4DC76BC9@busybox.osuosl.org \
    --to=ulf@uclibc.org \
    --cc=buildroot@busybox.net \
    /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