Browse Source

bootdisk target cleanup and tiny refactoring to make it possible to skip

the /boot directory content from the bootdisk (on PowerPC the 2nd stage
increased to over 64MB ...)


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1334 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Rene Rebe 21 years ago
parent
commit
90457beee3
6 changed files with 27 additions and 13 deletions
  1. +3
    -0
      Documentation/Developers/CHANGELOG-RENE
  2. +2
    -1
      target/bootdisk/build.sh
  3. +5
    -3
      target/bootdisk/build_stage1.sh
  4. +5
    -1
      target/bootdisk/build_stage2.sh
  5. +6
    -4
      target/bootdisk/powerpc/build.sh
  6. +6
    -4
      target/bootdisk/x86/build.sh

+ 3
- 0
Documentation/Developers/CHANGELOG-RENE

@ -7,6 +7,9 @@
- disabled arithmethic (libm) functions in gawk when dietlibc is used - - disabled arithmethic (libm) functions in gawk when dietlibc is used -
non-x86 architectures do not have a libm when dietlibc is used (this is non-x86 architectures do not have a libm when dietlibc is used (this is
a hack and should be fixed with real support inside dietlibc ...) a hack and should be fixed with real support inside dietlibc ...)
- bootdisk target cleanup and tiny refactoring to make it possible to skip
the /boot directory content from the bootdisk (on PowerPC the 2nd stage
increased to over 64MB ...)
*) 2003-09-06 (2.0.0-rc1 - 2.0.0-rc2) *) 2003-09-06 (2.0.0-rc1 - 2.0.0-rc2)

+ 2
- 1
target/bootdisk/build.sh

@ -34,7 +34,8 @@ echo_header "Creating ISO filesystem description."
cd $disksdir; rm -rf isofs; mkdir -p isofs cd $disksdir; rm -rf isofs; mkdir -p isofs
echo_status "Creating bootdisk/isofs directory.." echo_status "Creating bootdisk/isofs directory.."
ln 2nd_stage.tar.gz 2nd_stage_small.tar.gz *.img isofs/
ln 2nd_stage.tar.gz 2nd_stage_small.tar.gz isofs/
ln *.img isofs/ 2>/dev/null || true # might not exist on some architectures
echo_status "Creating isofs.txt file .." echo_status "Creating isofs.txt file .."
echo "DISK1 build/${ROCKCFG_ID}/bootdisk/isofs/ ` echo "DISK1 build/${ROCKCFG_ID}/bootdisk/isofs/ `

+ 5
- 3
target/bootdisk/build_stage1.sh

@ -34,9 +34,11 @@ for x in ../2nd_stage/lib/modules/*/kernel/drivers/{scsi,net}/*.o; do
mkdir -p $( dirname $xx ) ; cp $x $xx mkdir -p $( dirname $xx ) ; cp $x $xx
strip $xx # --strip-debug --strip-unneeded $xx strip $xx # --strip-debug --strip-unneeded $xx
done done
cp ../2nd_stage/lib/modules/*/modules.dep lib/modules/[0-9]*/
cp ../2nd_stage/lib/modules/*/modules.pcimap lib/modules/[0-9]*/
cp ../2nd_stage/lib/modules/*/modules.isapnpmap lib/modules/[0-9]*/
#
for x in ../2nd_stage/lib/modules/*/modules.{dep,pcimap,isapnpmap} ; do
cp $x ${x#../2nd_stage/}
done
#
for x in lib/modules/*/kernel/drivers/{scsi,net}; do for x in lib/modules/*/kernel/drivers/{scsi,net}; do
ln -s ${x#lib/modules/} lib/modules/ ln -s ${x#lib/modules/} lib/modules/
done done

+ 5
- 1
target/bootdisk/build_stage2.sh

@ -55,11 +55,15 @@ do
fi fi
done done
# #
echo_status "Saving boot/* - we do not need this on the 2nd stage ..."
rm -rf ../boor ; mkdir ../boot
mv -v boot/* ../boot/
#
echo_status "Remove the stuff we don't need ..." echo_status "Remove the stuff we don't need ..."
rm -rf home usr/{local,doc,man,info,games,share} rm -rf home usr/{local,doc,man,info,games,share}
rm -rf var/adm/* var/games var/adm var/mail var/opt rm -rf var/adm/* var/games var/adm var/mail var/opt
rm -rf usr/{include,src} usr/*-linux-gnu usr/lib/*.{a,la,o} rm -rf usr/{include,src} usr/*-linux-gnu usr/lib/*.{a,la,o}
rm -rf usr/lib/*/ boot/*-rock boot/System.map
rm -rf usr/lib/*/
# #
echo_status "Installing some terminfo databases ..." echo_status "Installing some terminfo databases ..."
tar $taropt ../../pkgs/ncurses.tar.bz2 \ tar $taropt ../../pkgs/ncurses.tar.bz2 \

+ 6
- 4
target/bootdisk/powerpc/build.sh

@ -1,8 +1,10 @@
use_yaboot=1 use_yaboot=1
echo "Copying vmlinux."
cp -v 2nd_stage/boot/vmlinux .
cd $disksdir
echo_header "Creating cleaning boot directory:"
rm -rfv boot/*-rock boot/System.map boot/kconfig*
if [ $use_yaboot -eq 1 ] if [ $use_yaboot -eq 1 ]
then then
@ -18,8 +20,8 @@ then
cp -v $base/target/$target/powerpc/{yaboot.conf,boot.msg,ofboot.b} \ cp -v $base/target/$target/powerpc/{yaboot.conf,boot.msg,ofboot.b} \
boot boot
# #
echo_status "Copy images (initrd,vmlinux) to yaboot directory."
cp -v initrd.img vmlinux boot/
echo_status "Moving image (initrd) to yaboot directory."
mv -v initrd.img boot/
# #
echo_status "Copy more config files." echo_status "Copy more config files."
cp -v $base/target/$target/powerpc/mapping . cp -v $base/target/$target/powerpc/mapping .

+ 6
- 4
target/bootdisk/x86/build.sh

@ -2,12 +2,14 @@
use_isolinux=1 use_isolinux=1
use_mdlbl=1 use_mdlbl=1
echo_header "Creating floppy disk images:"
cd $disksdir; mkdir -p boot
cd $disksdir
echo_header "Creating lilo config and cleaning boot directory:"
cp $base/target/$target/x86/lilo-* boot/ cp $base/target/$target/x86/lilo-* boot/
rm -rfv boot/*-rock boot/grub boot/System.map boot/kconfig*
echo_header "Creating floppy disk images:"
cp $base/target/$target/x86/makeimages.sh . cp $base/target/$target/x86/makeimages.sh .
cp 2nd_stage/boot/memtest86.bin boot/
cp 2nd_stage/boot/vmlinuz boot/
chmod +x makeimages.sh chmod +x makeimages.sh
if [ $use_mdlbl -eq 1 ] if [ $use_mdlbl -eq 1 ]

Loading…
Cancel
Save