From: "Steven A. Falco" <sfalco@domain.hid>
To: Bosko Radivojevic <bosko.radivojevic@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] copying instead of symlinking
Date: Mon, 24 Nov 2008 09:23:06 -0500 [thread overview]
Message-ID: <492AB8CA.1060208@domain.hid> (raw)
In-Reply-To: <d6c8ef150811240529x137a591fjd9f5c530dc501d63@domain.hid>
Bosko Radivojevic wrote:
> Hi all,
>
> is there an "official" way of "preparing" kernel with copying
> xenomai/ksrc files instead of symlinking them into kernel dir?
>
> Thanks
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
>
I don't know about an official way, but I too wanted to copy the files,
so that I could keep the modified kernel in a git branch. Attached is a
patch to the prepare-kernel.sh script that I use. You will see that
there is a new option (--root) which I needed because I also don't want
to infer the root directory from the path to the script.
Steve
--- xenomai-2.4.5/scripts/prepare-kernel.sh 2008-05-15 03:45:41.000000000 -0400
+++ prepare-kernel.sh 2008-05-23 14:27:20.000000000 -0400
@@ -116,7 +116,8 @@
if test x$forcelink = x1 -o \
! $xenomai_root/$target_dir/$f -ef $linux_tree/$link_dir/$f;
then
- ln -sf $xenomai_root/$target_dir/$f $linux_tree/$link_dir/$f
+ # ln -sf $xenomai_root/$target_dir/$f $linux_tree/$link_dir/$f
+ cp -f $xenomai_root/$target_dir/$f $linux_tree/$link_dir/$f
fi
else
if test `check_filter $link_dir/$f` = "ok"; then
@@ -173,6 +174,10 @@
while test $# -gt 0; do
case "$1" in
+ --root=*)
+ xenomai_root=`echo $1|sed -e 's,^--root=\\(.*\\)$,\\1,g'`
+ xenomai_root=`eval "echo $xenomai_root"`
+ ;;
--linux=*)
linux_tree=`echo $1|sed -e 's,^--linux=\\(.*\\)$,\\1,g'`
linux_tree=`eval "echo $linux_tree"`
@@ -217,11 +222,6 @@
shift
done
-# Infere the location of the Xenomai source tree from
-# the path of the current script.
-
-script_path=`type -p $0`
-xenomai_root=`dirname $script_path`/..
xenomai_root=`cd $xenomai_root && pwd`
# Check the Linux tree
@@ -327,7 +327,6 @@
*)
echo "$me: unsupported architecture: $linux_arch" >&2
linux_arch=
- usedefault=
;;
esac
if test \! x$linux_arch = x; then
@@ -385,7 +384,6 @@
fi
if test \! -r "$adeos_patch"; then
echo "$me: cannot read Adeos patch from $adeos_patch" >&2
- usedefault=
adeos_patch=
fi
done
@@ -582,7 +580,7 @@
fi
if test x$verbose = x1; then
-echo 'Links installed.'
+echo 'Files copied.'
echo 'Build system ready.'
fi
prev parent reply other threads:[~2008-11-24 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-24 13:29 [Xenomai-help] copying instead of symlinking Bosko Radivojevic
2008-11-24 14:23 ` Steven A. Falco [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=492AB8CA.1060208@domain.hid \
--to=sfalco@domain.hid \
--cc=bosko.radivojevic@domain.hid \
--cc=xenomai@xenomai.org \
/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.