Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by David Brown (5ed3c6f09194d80dedc1aba5d051888359d583c7)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: David Brown <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by David Brown (5ed3c6f09194d80dedc1aba5d051888359d583c7)
  • Date: Wed, 4 Apr 2007 17:49:22 -0500

GIT changes to master grimoire by David Brown <dmlb2000 AT gmail.com>:

smgl/linux-initramfs/DETAILS | 2 -
smgl/linux-initramfs/FINAL | 5 ++
smgl/linux-initramfs/HISTORY | 13 +++++-
smgl/linux-initramfs/INSTALL | 11 +++++
smgl/linux-initramfs/examples/pre_kinit.sh.xmp_suspend2 | 9 ++++
smgl/linux-initramfs/mkinitrd | 30
+++++++++++++++-
6 files changed, 65 insertions(+), 5 deletions(-)

New commits:
commit 5ed3c6f09194d80dedc1aba5d051888359d583c7
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

linux-initramfs lots of little things, new user defined pre_kinit script
cabability and additions of user defined files from the system

diff --git a/smgl/linux-initramfs/DETAILS b/smgl/linux-initramfs/DETAILS
index 2cbfd7c..b380c17 100755
--- a/smgl/linux-initramfs/DETAILS
+++ b/smgl/linux-initramfs/DETAILS
@@ -1,5 +1,5 @@
SPELL=linux-initramfs
- VERSION=0.1
+ VERSION=0.2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL
WEB_SITE="http://www.sourcemage.org/";
ENTERED=20030803
diff --git a/smgl/linux-initramfs/FINAL b/smgl/linux-initramfs/FINAL
index a42ede0..6729a87 100755
--- a/smgl/linux-initramfs/FINAL
+++ b/smgl/linux-initramfs/FINAL
@@ -1,7 +1,10 @@
local TEXT=$(cat <<EOF
-The initramfs listing files have been put into /usr/share/smgl-initramfs
+The initramfs listing files have been put into /usr/share/linux-initramfs
you should take a look at them and make changes if you like. You may need
to remove modules that you have builtin or add modules you want to load
before the root filesystem is mounted.
+
+Also checkout the /etc/linux-initramfs/* and /sbin/mkinitrd for generating
+separate initramfs files for use in suspend/resume, raid or lvm.
EOF )
message "${MESSAGE_COLOR}$TEXT${DEFAULT_COLOR}"
diff --git a/smgl/linux-initramfs/HISTORY b/smgl/linux-initramfs/HISTORY
index dc95029..f5a8c0d 100644
--- a/smgl/linux-initramfs/HISTORY
+++ b/smgl/linux-initramfs/HISTORY
@@ -1,10 +1,19 @@
-2007-04-17 David Brown <dmlb2000 AT gmail.com>
+2007-04-15 David Brown <dmlb2000 AT gmail.com>
+ * DETAILS: updated version its time for this
+ * FINAL: fixed output to correct install location
+ * INSTALL: added install of example files to /etc
+ * examples/pre_kinit.sh.xmp_suspend2: added example prekinit script to
+ use with suspend2
+ * mkinitrd: added user defined files to add to the initrd and a
prekinit
+ script feature
+
+2007-03-17 David Brown <dmlb2000 AT gmail.com>
* INSTALL: created /etc/linux-initramfs dir for configuration of
mkinitrd
* mkinitrd: use /etc/linux-initramfs/modules.lst instead of
/etc/modules
for modules to be included in the initrd

-2007-04-17 David Brown <dmlb2000 AT gmail.com>
+2007-03-17 David Brown <dmlb2000 AT gmail.com>
* DEPENDS: added klibc dependency

2007-01-29 David Brown <dmlb2000 AT gmail.com>
diff --git a/smgl/linux-initramfs/INSTALL b/smgl/linux-initramfs/INSTALL
index 8b61812..a306c9a 100755
--- a/smgl/linux-initramfs/INSTALL
+++ b/smgl/linux-initramfs/INSTALL
@@ -11,6 +11,17 @@ do
install_config_file ${SPELL_DIRECTORY}/share/${file}
${INSTALL_ROOT}/usr/share/${SPELL}/${file}
fi
done &&
+find ${SPELL_DIRECTORY}/examples |
+sed "s#${SPELL_DIRECTORY}##g" |
+while read file
+do
+ if [[ -d ${SPELL_DIRECTORY}/$file ]]
+ then
+ mkdir -p ${INSTALL_ROOT}/etc/linux-initramfs/$file
+ else
+ install_config_file ${SPELL_DIRECTORY}/$file
${INSTALL_ROOT}/etc/linux-initramfs/$file
+ fi
+done
install -vm 755 -o root -g root ${SPELL_DIRECTORY}/mkinitrd
${INSTALL_ROOT}/sbin/ &&
install -vm 755 -o root -g root ${SPELL_DIRECTORY}/installkernel
${INSTALL_ROOT}/sbin/
mkdir -p ${INSTALL_ROOT}/etc/linux-initramfs &&
diff --git a/smgl/linux-initramfs/examples/pre_kinit.sh.xmp_suspend2
b/smgl/linux-initramfs/examples/pre_kinit.sh.xmp_suspend2
new file mode 100644
index 0000000..a180c53
--- /dev/null
+++ b/smgl/linux-initramfs/examples/pre_kinit.sh.xmp_suspend2
@@ -0,0 +1,9 @@
+#!/bin/bash
+# this is an example of a suspend2 resume in the initrd
+cat <<-EOF
+mount -t sysfs sysfs /sys
+if [ -f /sys/power/suspend2/do_resume ]
+then
+ echo > /sys/power/suspend2/do_resume
+fi
+EOF
diff --git a/smgl/linux-initramfs/mkinitrd b/smgl/linux-initramfs/mkinitrd
index a2743b5..69e0c8a 100755
--- a/smgl/linux-initramfs/mkinitrd
+++ b/smgl/linux-initramfs/mkinitrd
@@ -74,6 +74,12 @@ EOF
fi
}

+function linuxrc_pre_kinit()
+{
+ [ -x /etc/linux-initramfs/pre_kinit.sh ] &&
+ . /etc/linux-initramfs/pre_kinit.sh
+}
+
function linuxrc_post()
{
cat <<-EOF
@@ -97,6 +103,8 @@ function dir_parts()
cat <<-EOF
slink /sbin bin 0755 0 0
dir /bin 0755 0 0
+slink /usr/sbin bin 0755 0 0
+dir /usr/bin 0755 0 0
dir /lib 0755 0 0
dir /proc 0755 0 0
dir /sys 0755 0 0
@@ -105,6 +113,24 @@ dir /modules 0755 0 0
EOF
}

+function user_parts()
+{
+ local file
+ [ -f /etc/linux-initramfs/add-files.lst ] &&
+ for file in `cat /etc/linux-initramfs/add-files.lst`
+ do
+ if [[ -f $file ]]
+ then
+ local mode=$(stat -c %a $file)
+ local O=$(stat -c %o $file)
+ local G=$(stat -c %g $file)
+ cat <<-EOF
+ file $file $file $mode $O $G
+ EOF
+ fi
+ done
+}
+
function dev_parts()
{
cat <<-EOF
@@ -687,12 +713,14 @@ fill_modules
module_parts
klibc_parts
raid_parts
- lvm_parts
+ lvm_parts
+ user_parts
) > /tmp/initrd.lst
(
linuxrc_pre
linuxrc_raid
linuxrc_lvm
+ linuxrc_pre_kinit
linuxrc_post
) > /tmp/linuxrc
if ! [[ -x /lib/modules/$KVERSION/build/usr/gen_init_cpio ]]



  • [SM-Commit] GIT changes to master grimoire by David Brown (5ed3c6f09194d80dedc1aba5d051888359d583c7), David Brown, 04/04/2007

Archive powered by MHonArc 2.6.24.

Top of Page