Browse Source

Dimitar Zhekov <jimmy@is-vn.bg>:

stage2small-progs.diff: include disktype _and tail_ (I
somehow missed it in the previous patch) in stage 2 small.
Incremential: apply after bzip2-ed-bootdisk only.
linuxrc-opt.diff: optimize the device scanning a bit.


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2047 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Dimitar Zhekov 21 years ago
parent
commit
e19ff63554
4 changed files with 14 additions and 49 deletions
  1. +2
    -0
      Documentation/Developers/CHANGELOG-RENE
  2. +1
    -4
      target/bootdisk/build_stage2.sh
  3. +0
    -21
      target/bootdisk/head
  4. +11
    -24
      target/bootdisk/linuxrc.c

+ 2
- 0
Documentation/Developers/CHANGELOG-RENE

@ -9,6 +9,8 @@
- Alan J. Wylie: updated spamassassin and clamav
- Dimitar Zhekov: workaround for memtest86 to avoid gcc-33 if possible
updated mplayer
the real tail/head and disktype for the small 2nd_stage
space optimisations for the linuxrc
*) 2003-12-21 (2.0.0-rc3 - 2.0.0-rc4)

+ 1
- 4
target/bootdisk/build_stage2.sh

@ -104,7 +104,7 @@ ln -s bin sbin ; ln -s . usr
progs="agetty bash cat cp date dd df ifconfig ln ls mine mkdir mke2fs \
mkswap mount mv rm reboot route sleep swapoff swapon sync umount \
eject chmod chroot grep halt rmdir sh shutdown uname killall5 \
stone mktemp sort fold sed mkreiserfs cut"
stone mktemp sort fold sed mkreiserfs cut head tail disktype"
progs="$progs fdisk sfdisk"
@ -157,9 +157,6 @@ for i in gui_text mod_install mod_packages mod_gas default ; do
cp -v ../2nd_stage/etc/stone.d/$i.sh etc/stone.d
done
#
echo_status "Copy head replacement script."
cp $base/target/$target/head bin/head ; chmod +x bin/head
#
echo_status "Creating links for identical files."
while read ck fn
do

+ 0
- 21
target/bootdisk/head

@ -1,21 +0,0 @@
#!/bin/sh
m=10
useage () {
echo "Usage: head [OPTION]... [FILE]..."
echo -e "\t-n,-[0-9]+\tprint first NUMBER lines instead of first 10"
exit 1
}
while [ "$1" ] ; do
case "$1" in
-n) m="$2" ; shift ; shift ;;
-[0-9]*) m=${1#-}; shift ;;
-*) useage ;;
*) break;
esac
done
exec grep -m$m "" $*

+ 11
- 24
target/bootdisk/linuxrc.c

@ -218,42 +218,29 @@ void load_modules(char * dir)
void load_ramdisk_file()
{
char *devicelists[2] = { "/dev/cdroms/cdrom%d", "/dev/floppy/%d" };
char *devicenames[2] =
{ "CD-ROM #%d (IDE/ATAPI or SCSI)", "FDD (Floppy Disk Drive) #%d" };
char *devn[10], *desc[10];
char text[100], devicefile[100];
char filename[100];
int nr=0;
int tmp_nr;
int found;
int i, tmp_nr;
printf("Select a device for loading the 2nd stage system from: \n\n");
for (tmp_nr = 0, found = 1; found; ++tmp_nr) {
sprintf(devicefile, "/dev/cdroms/cdrom%d", tmp_nr);
sprintf(text, "CD-ROM #%d (IDE/ATAPI or SCSI)", tmp_nr+1);
if ( ! access (devicefile, R_OK) ) {
desc[nr] = strdup (text);
devn[nr++] = strdup (devicefile);
}
else {
found = 0;
}
}
tmp_nr = 0; found = 1;
for (tmp_nr = 0, found = 1; found; ++tmp_nr) {
sprintf(devicefile, "/dev/floppy/%d", tmp_nr);
sprintf(text, "FDD (Floppy Disk Drive) #%d", tmp_nr+1);
for (i = 0; i < 2; i++) {
for (tmp_nr = 0; ; ++tmp_nr) {
sprintf(devicefile, devicelists[i], tmp_nr);
sprintf(text, devicenames[i], tmp_nr+1);
if ( ! access (devicefile, R_OK) ) {
if ( access (devicefile, R_OK) ) break;
desc[nr] = strdup (text);
devn[nr++] = strdup (devicefile);
}
else {
found = 0;
}
}
desc[nr] = devn[nr] = NULL;
for (nr=0; desc[nr]; nr++) {

Loading…
Cancel
Save