Any arch specific changes to scripts directory?
Does any architecture have local changes to the scripts directory? This includes scripts/mkdep.c, the config code etc. Or to the top level Makefile and Rules.make? I need to know about anything that affects the overall kernel build and is not in the base kernel.
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.
Ok for inclusion into scripts/ ?
M. R.
* Keith Owens <[email protected]> on Thu, Dec 13, 2001:
Quoted 5 lines
Does any architecture have local changes to the scripts directory? This includes
scripts/mkdep.c, the config code etc. Or to the top levelMakefileand Rules.make? I need to know about anything that affects the overall kernel build and is not in the base kernel.
scripts/treelink.sh renamed from usr/src/linux/scripts/treelink.sh +45 -0
@@ -0,0 +1,45 @@ +#!/bin/sh +# +# treelink.sh - Tree Linking Script +# +# Copyright (C) 2001 Paul Mundt <[email protected]> +# +# Modified by M. R. Brown <[email protected]> +# +# 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."
scripts/treeunlink.sh renamed from usr/src/linux/scripts/treeunlink.sh +31 -0
@@ -0,0 +1,31 @@ +#!/bin/sh +# +# treeunlink.sh - Tree Unlinking Script +# +# Copyright (c) 2001 M. R. Brown <[email protected]> +# +# 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."
Quoted 4 lines · M. R. Brown
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.
* Keith Owens <[email protected]> on Thu, Dec 13, 2001:
Quoted 11 lines
Quoted 4 lines · M. R. Brown
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.
scripts/treelink.sh renamed from usr/src/linux/scripts/treelink.sh +45 -0
@@ -0,0 +1,45 @@ +#!/bin/sh +# +# treelink.sh - Tree Linking Script +# +# Copyright (C) 2001 Paul Mundt <[email protected]> +# +# Modified by M. R. Brown <[email protected]> +# +# 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."
scripts/treeunlink.sh renamed from usr/src/linux/scripts/treeunlink.sh +31 -0
@@ -0,0 +1,31 @@ +#!/bin/sh +# +# treeunlink.sh - Tree Unlinking Script +# +# Copyright (c) 2001 M. R. Brown <[email protected]> +# +# 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."