Browse Source

Andreas V. Meier:


			
			
				rocklinux
			
			
		
Andreas V. 'netrunner' Meier 20 years ago
parent
commit
f2d6f96d10
4 changed files with 46 additions and 18 deletions
  1. +3
    -10
      package/base/uml_utilities/pkg_linux24_pre.conf
  2. +10
    -0
      package/base/uml_utilities/pkg_linux26_pre.conf
  3. +1
    -1
      package/base/uml_utilities/uml_utilities.desc
  4. +32
    -7
      scripts/Create-UMLRootfs

package/base/uml_utilities/pkg_linux_pre.conf → package/base/uml_utilities/pkg_linux24_pre.conf

@ -8,16 +8,9 @@ for i in $uml_patch $uml_24host26 $uml_24cmdline; do
done
if [ "$ROCKCFG_KERNEL_UMLPATCH" == '1' ] ; then
if [ "$xpkg" = "linux24" ] ; then
var_append patchfiles " " "$uml_patch"
var_append patchfiles " " "$uml_24host26"
var_append patchfiles " " "$uml_24cmdline"
elif [ "$xpkg" = "linux26" ] ; then
var_append patchfiles " " "$uml_patch"
# fix for the arch/um/kernel/ksyms.c:90: redefinition of `__kstrtab_os_ioctl_generic'
hook_add postpatch 3 \
"sed -e 's,\(EXPORT_SYMBOL(os_ioctl_generic);\),// \1,1' -i arch/um/kernel/ksyms.c"
fi
var_append patchfiles " " "$uml_patch"
var_append patchfiles " " "$uml_24host26"
var_append patchfiles " " "$uml_24cmdline"
echo_status "Including UML Patch for $xpkg ($ver): $uml_patch."
export arch_machine="um"
var_insert makeopt " " "ARCH=um"

+ 10
- 0
package/base/uml_utilities/pkg_linux26_pre.conf

@ -0,0 +1,10 @@
if [ "$ROCKCFG_KERNEL_UMLPATCH" == '1' ] ; then
# fix for the arch/um/kernel/ksyms.c:90:
# redefinition of `__kstrtab_os_ioctl_generic'
hook_add postpatch 3 \
"sed -e 's,\(EXPORT_SYMBOL(os_ioctl_generic);\),// \1,1' -i arch/um/kernel/ksyms.c"
fi
echo_status "Building UML kernel for $xpkg ($ver)."
export arch_machine="um"
var_insert makeopt " " "ARCH=um"
fi

+ 1
- 1
package/base/uml_utilities/uml_utilities.desc

@ -39,6 +39,6 @@
[D] 1163032836 uml_utilities_20040406.tar.bz2 http://dl.sourceforge.net/sourceforge/user-mode-linux/
[D] 3565257192 uml-patch-2.6.8.1-1.bz2 http://dl.sourceforge.net/user-mode-linux/
[D] 2488277907 uml-patch-2.4.26-3.bz2 http://dl.sourceforge.net/user-mode-linux/
[D] 3715834792 uml-patch-2.4.27-1.bz2 http://dl.sourceforge.net/user-mode-linux/
[D] 2612233733 uml-patch-hostis26.diff.bz2 http://home.in.tum.de/~meiera/projects/rocklinux/download/base/uml_utilities/
[D] 1813879424 uml-patch-kernel-cmdline.diff.bz2 http://home.in.tum.de/~meiera/projects/rocklinux/download/base/uml_utilities/

+ 32
- 7
scripts/Create-UMLRootfs

@ -29,9 +29,10 @@ eval `grep rockver scripts/parse-config`
if [ $# -eq 0 ] ; then
echo
echo "Usage: $0 [ -size MB ] [ -mkdebug ] [-prefix FS-Prefix] [-fs filesystem] Config"
echo "Usage: $0 [-size MB] [-debug] [-verbose] [-full]"
echo " [-prefix FS-Prefix] [-fs filesystem] Config"
echo
echo "E.g.: $0 -prefix my myconfig"
echo "E.g.: $0 -full -prefix my myconfig"
echo "this will leave you with a file 'my_linux' (the kernel) and a file"
echo "'my_rootfs' (the file system). Just start it with ./linux"
echo
@ -45,8 +46,10 @@ while true ; do
case "$1" in
-size)
fssize=$2 ; shift ; shift ;;
-mkdebug)
mkdebug=1 ; shift ;;
-debug)
debug=1 ; shift ;;
-verbose)
verbose=1 ; shift ;;
-fs)
filesystem=$2; shift; shift ;;
-prefix)
@ -130,13 +133,35 @@ mount -t $filesystem $loopdevice $mountpoint
# install all
echo "Installing files, may take some time..."
if [ $full = 1 ]; then
for i in build/$buildid/*; do
if [ $i = "build/$buildid/ROCK" ]; then continue; fi
cp -rp $i $mountpoint
# for i in build/$buildid/*; do
# if [ $i = "build/$buildid/ROCK" ]; then continue; fi
# cp -rp $i $mountpoint
# done
for i in build/$buildid/ROCK/pkgs/*gem; do
if [ 'x1' = "x$verbose" ]; then
echo "Installing ${i/*\//}"
fi
mine -i -R $mountpoint $i
done
fi
# call the update script and some other tweaks
echo "Doing post-install adoptions"
chroot $mountpoint bash /etc/cron.d/00-updates
sed -i -e 's,vc/1,vc/0,' -e 's,^\([2-6]:\),#\1,' $mountpoint/etc/inittab
cat >$mountpoint/etc/fstab <<EOF
/dev/root / auto defaults 0 1
none /proc proc defaults 0 0
none /dev devfs defaults 0 0
none /dev/pts devpts defaults 0 0
none /dev/shm ramfs defaults 0 0
none /sys sysfs defaults 0 0
#none /tmp tmpfs defaults 0 0
EOF
# Copy the executable kernel
cp $mountpoint/boot/linux ${fsprefix}linux
# Finished.
echo "Finished. You may now run"
echo " ./${fsprefix}linux ubd0=${fsprefix}rootfs"

Loading…
Cancel
Save