From: "M. R. Brown" <mrbrown@0xd6.org>
To: Keith Owens <kaos@ocs.com.au>
Cc: linux-kernel@vger.kernel.org, marcelo@conectiva.com.br
Subject: Re: Any arch specific changes to scripts directory?
Date: Thu, 13 Dec 2001 11:18:35 -0600 [thread overview]
Message-ID: <20011213171835.GA19987@0xd6.org> (raw)
In-Reply-To: <20011213055943.GB7669@0xd6.org> <24711.1008223525@kao2.melbourne.sgi.com>
In-Reply-To: <24711.1008223525@kao2.melbourne.sgi.com>
[-- Attachment #1.1: Type: text/plain, Size: 1064 bytes --]
* Keith Owens <kaos@ocs.com.au> on Thu, Dec 13, 2001:
> On Wed, 12 Dec 2001 23:59:43 -0600,
> "M. R. Brown" <mrbrown@0xd6.org> wrote:
> >On an somewhat-related subject, here are a couple of utility scripts that
> >make it easier to use drop-in trees with various stock kernels. These are
> >used by linux-mips, linuxconsole (Ruby), and linuxsh developers, so it's
> >assumed they'd be useful to anyone else who needs to build those kernels.
>
> This facility and more is built into kbuild 2.5, which is going into
> 2.5 soon. I don't see the point in adding this to 2.4 now, especially
> since kbuild 2.5 can also run on 2.4 kernels.
>
True, but IMO the majority of people aren't using kbuild with 2.4 yet.
Plus the fact that kbuild isn't included in 2.4 - I'm thinking of the
newbie/more-than-casual user who just wants to a) grab vanilla, b) run the
provided treelink scripts to drop in their second kernel. Patching the
kernel with kbuild 2.5 would be a bit too intrusive for this.
Marcelo, can these scripts go into 2.4?
M. R.
[-- Attachment #1.2: treescripts.diff --]
[-- Type: text/plain, Size: 2290 bytes --]
--- /usr/src/linux/scripts/treelink.sh Wed Dec 12 23:50:08 2001
+++ linux-2.4-branch/scripts/treelink.sh Tue Oct 16 16:25:24 2001
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# treelink.sh - Tree Linking Script
+#
+# Copyright (C) 2001 Paul Mundt <lethal@chaoticdreams.org>
+#
+# Modified by M. R. Brown <mrbrown@0xd6.org>
+#
+# A simple shell script for linking a drop in tree into a stock
+# kernel tree. Usable for drop in trees such as the linux-mips
+# and linuxconsole trees.
+#
+# Released under the terms of the GNU GPL v2
+#
+[ "$#" -ne "2" ] && echo "Usage: $0 <drop in tree> <kernel tree>" && exit 1
+
+ODIR=${PWD}
+cd $1 || exit 1
+LDIR=${PWD}
+echo -n "Building file list ... "
+LIST=`find * \( -type d -name CVS -prune \) -o -type f -print`
+echo -e "done."
+cd ${ODIR}
+
+cd $2 || exit 1
+
+# Make this a seperate step so that the user can cancel the operation
+echo -n "Saving originals ..... "
+for file in $LIST; do
+ if [ -e $file -a ! -h $file ]; then
+ DIR=`dirname $file`
+ ofile=`basename $file`
+ [ ! -d ${DIR}/.orig ] && mkdir -p ${DIR}/.orig
+ cp $file ${DIR}/.orig/$ofile
+ fi
+done
+echo -e "done."
+
+echo -n "Linking files ........ "
+for file in $LIST; do
+ DIR=`dirname $file`
+ [ ! -d $DIR ] && mkdir -p $DIR
+ ln -sf $LDIR/$file $file
+done
+echo -e "done."
--- /usr/src/linux/scripts/treeunlink.sh Wed Dec 12 23:50:10 2001
+++ linux-2.4-branch/scripts/treeunlink.sh Tue Oct 16 16:25:24 2001
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# treeunlink.sh - Tree Unlinking Script
+#
+# Copyright (c) 2001 M. R. Brown <mrbrown@0xd6.org>
+#
+# This script attempts to restore a previously tree-linked tree.
+# It's the anti-thesis of (and based on) treelink.sh by Paul Mundt.
+#
+# Released under the terms of the GNU GPL v2
+
+[ "$#" -ne "1" ] && echo "Usage: $0 <kernel tree>" && exit 1
+
+cd $1 || exit 1
+echo -n "Building file list ... "
+LIST=`find * \( -type d -name CVS -prune \) -o -type l -print`
+echo -e "done."
+
+[ -z "$LIST" ] && echo "No linked files to unlink." && exit 1
+
+echo -n "Restoring originals .. "
+for file in $LIST; do
+ DIR=`dirname $file`
+ ofile=`basename $file`
+ rm -f $file
+ if [ -d ${DIR}/.orig -a -e ${DIR}/.orig/$ofile ]; then
+ mv ${DIR}/.orig/$ofile $file
+ [ -z "`ls ${DIR}/.orig`" ] && rmdir ${DIR}/.orig
+ fi
+done
+echo -e "done."
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2001-12-13 17:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-12 23:09 Any arch specific changes to scripts directory? Keith Owens
2001-12-13 5:59 ` M. R. Brown
2001-12-13 6:05 ` Keith Owens
2001-12-13 17:18 ` M. R. Brown [this message]
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=20011213171835.GA19987@0xd6.org \
--to=mrbrown@0xd6.org \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.