Browse Source

Stefan Fiedler:


			
			
				rocklinux
			
			
		
Stefan Fiedler 17 years ago
parent
commit
89926bcf2d
5 changed files with 24 additions and 40 deletions
  1. +3
    -5
      package/target-finish/1st-stage/linuxrc.sh
  2. +13
    -5
      package/target-finish/bootloader/bootloader.conf
  3. +2
    -20
      package/target-finish/bootloader/sparc/build.sh
  4. +1
    -1
      package/target-finish/bootloader/sparc/silo.conf
  5. +5
    -9
      package/target-finish/bootloader/x86/build.sh

+ 3
- 5
package/target-finish/1st-stage/linuxrc.sh

@ -326,7 +326,7 @@ EOF
return 1
fi
echo "Extracting 2nd stage filesystem to ram ..."
echo "Extracting 2nd stage filesystem to RAM ..."
if ! tar ${STAGE_2_COMPRESS_ARG} -C /mnt_root -xf /mnt_source/${filename} ; then
echo "Can't extract /mnt/source/${filename}"
return 1
@ -411,10 +411,8 @@ emit_udev_events() { # {{{
input=1
[ -z "${autoboot}" ] && autoboot=0
# mount / / -o remount,rw || echo "Can't remount / read-/writeable"
# mount / / -o remount,rw || echo "Can't remount / read-/writeable (for mount log)"
mount -t tmpfs tmpfs /tmp -o ${TMPFS_OPTIONS} || echo "Can't mount a tmpfs on /tmp"
mount -t proc proc /proc || echo "Can't mount proc on /proc!"
mount / / -o remount,rw -n || echo "Can't remount / read-/writeable"
mount / / -o remount,rw || echo "Can't remount / read-/writeable (for mount log)"
mount -t tmpfs tmpfs /tmp -o ${TMPFS_OPTIONS} || echo "Can't mount a tmpfs on /tmp"
mount -t proc proc /proc || echo "Can't mount proc on /proc!"

+ 13
- 5
package/target-finish/bootloader/bootloader.conf

@ -28,20 +28,28 @@ if [ "$ROCKCFG_PKGFILE_VER" == 1 ] ; then
pkg_suffix='-$pkg_ver-$pkg_extraver'$pkg_suffix
fi
cd $disksdir
rm -rf boot/ ; mkdir -p boot
# Provide at least the kernel and initrd image in the boot/ directory of the
# ISO image, useful for direct booting with qemu.
cp -a $rootdir/boot/* boot/
rm -f boot/{initrd.img,kconfig,System.map}*
ln $ROCKCFG_PKG_1ST_STAGE_INITRD.gz boot/
if [ -f $confdir/$arch/build.sh ]; then
. $confdir/$arch/build.sh
fi
echo "Creating ISO filesystem description."
cd $disksdir; rm -rf isofs; mkdir -p isofs
rm -rf isofs; mkdir -p isofs
echo "Creating isofs directory.."
ln 2nd_stage.tar.gz 2nd_stage_small.tar.gz isofs/
ln *.img $ROCKCFG_PKG_1ST_STAGE_INITRD.gz isofs/ 2>/dev/null || true # might not exist on some architectures
echo "Creating isofs.txt file .."
echo "DISK1 build/${ROCKCFG_ID}/ROCK/target/isofs/ `
`${ROCKCFG_SHORTID}/" > $build_rock/isofs_bootdisk.txt
cat > $build_rock/isofs_bootdisk.txt <<- EOT
DISK1 $disksdir/boot/ boot/
DISK1 $disksdir/isofs/ ${ROCKCFG_SHORTID}/
EOT
rm -rf "$tmpdir"
}

+ 2
- 20
package/target-finish/bootloader/sparc/build.sh

@ -1,30 +1,12 @@
cd $disksdir
# echo "Cleaning boot directory:"
# rm -rfv boot/*-rock boot/System.map boot/kconfig* boot/initrd*img boot/*.b
echo "Creating silo setup:"
#
echo "Extracting silo boot loader images."
mkdir -p boot
pkg_ver="$( grep " silo " $base/config/$config/packages | cut -f6 -d" " )"
pkg_extraver="$( grep " silo " $base/config/$config/packages | cut -f7 -d" " )"
eval x=$build_rock/pkgs/silo$pkg_suffix
echo $x ver $pkg_ver extraver $pkg_extraver
if [[ "$pkg_suffix" == *gem ]] ; then
mine -k pkg_tarbz2 $x > $tmpdir/silo.tar.bz2
x=$tmpdir/silo.tar.bz2
fi
tar -O $taropt $x boot/second.b > boot/second.b
echo "Cleaning boot directory:"
find boot/ -name "*.b" ! -name "second.b" -exec rm -f {} +
#
echo "Creating silo config file."
cp -v $confdir/sparc/{silo.conf,boot.msg,help1.txt} boot/
#
echo "Copying images to boot directory."
cp -p $ROCKCFG_PKG_1ST_STAGE_INITRD.gz $rootdir/boot/{vmlinuz32,image} boot/ || true
#
cat > $build_rock/isofs_arch.txt <<- EOT
BOOT -G $rootdir/boot/isofs.b -B ...
DISK1 $disksdir/boot/ boot/
EOT

+ 1
- 1
package/target-finish/bootloader/sparc/silo.conf

@ -17,6 +17,6 @@ image="cat /boot/help1.txt"
image[sun4u]=/boot/vmlinux64.gz
label=install
alias=linux
image[sun4c,sun4d,sun4m]=/boot/image.gz
image[sun4c,sun4d,sun4m]=/boot/image
label=install
alias=linux

+ 5
- 9
package/target-finish/bootloader/x86/build.sh

@ -8,10 +8,8 @@ mdlbl_ver="`sed -n 's,.*mdlbl-\(.*\).tar.*,\1,p' \
cd $disksdir
echo "Creating lilo config and cleaning boot directory:"
rm -rf boot/ ; mkdir -p boot/
echo "Creating lilo config:"
cp $confdir/x86/lilo-* boot/
rm -rfv boot/{grub,System.map*,kconfig*}
echo "Creating floppy disk images:"
cp $confdir/x86/makeimages.sh .
@ -47,18 +45,16 @@ then
syslinux-$syslinux_ver/isolinux.bin > isolinux/isolinux.bin
#
echo "Creating isolinux config file."
cp $confdir/x86/isolinux.cfg isolinux/
cp $confdir/x86/help?.txt isolinux/
cp $confdir/x86/{isolinux.cfg,help?.txt} isolinux/
#
echo "Copy images to isolinux directory."
[ -e $rootdir/boot/memtest86.bin ] && \
cp $rootdir/boot/memtest86.bin isolinux/memtest86 || true
cp $ROCKCFG_PKG_1ST_STAGE_INITRD.gz $rootdir/boot/vmlinuz isolinux/
cp $ROCKCFG_PKG_1ST_STAGE_INITRD.gz $rootdir/boot/vmlinuz* isolinux/
#
cat > $build_rock/isofs_arch.txt <<- EOT
BOOT -b isolinux/isolinux.bin -c isolinux/boot.catalog
BOOT -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.catalog
BOOTx -no-emul-boot -boot-load-size 4 -boot-info-table
DISK1 $disksdir/isolinux/ isolinux/
DISK1 $disksdir/isolinux/ boot/isolinux/
EOT
fi

Loading…
Cancel
Save