diff --git a/package/base/sysfiles/stone_mod_install.sh b/package/base/sysfiles/stone_mod_install.sh index 46f83c0c0..301d8493e 100644 --- a/package/base/sysfiles/stone_mod_install.sh +++ b/package/base/sysfiles/stone_mod_install.sh @@ -151,13 +151,13 @@ de-activate it.\" ''" disk_add() { local x y=0 - cmd="$cmd 'Partition table of $1:' 'disk_action $1'" + cmd="$cmd 'Edit partition table of $1' 'disk_action $1'" for x in $( cd /dev/$1 ; ls part* 2> /dev/null ) do part_add $1 $x ; y=1 done if [ $y = 0 ]; then - cmd="$cmd 'Partition table is empty.' ''" + cmd="$cmd 'This disks partition table is empty.' ''" fi cmd="$cmd '' ''" } diff --git a/package/base/sysfiles/stone_mod_packages.sh b/package/base/sysfiles/stone_mod_packages.sh index 2106559bf..42cf43f71 100644 --- a/package/base/sysfiles/stone_mod_packages.sh +++ b/package/base/sysfiles/stone_mod_packages.sh @@ -102,6 +102,11 @@ Note: You can install, update and remove packages (as well as query package information) with the command-line tool \"mine\". This is just a simple frontend for the \"mine\" program.'" + type -p gasgui > /dev/null && + cmd="$cmd 'Start gasgui Package Manager (recommended)' 'startgas=1'" + cmd="$cmd 'Start gastone Package manager (minimal)' 'startgas=2'" + cmd="$cmd '' ''" + cmd="$cmd 'Mount Options: $opt'" cmd="$cmd 'gui_input \"Mount Options (e.g. -s -o sync) \" \"\$opt\" opt'" @@ -117,11 +122,6 @@ a simple frontend for the \"mine\" program.'" read_ids - cmd="$cmd '' ''" - type -p gasgui > /dev/null && - cmd="$cmd 'Start gasgui Package Manager (recommended)' 'startgas=1'" - cmd="$cmd 'Start gastone Package manager (minimal)' 'startgas=2'" - if eval "$cmd" ; then if [ $startgas != 0 ]; then startgas $startgas diff --git a/target/bootdisk/build_stage1.sh b/target/bootdisk/build_stage1.sh index 847378a22..6d5a9589c 100644 --- a/target/bootdisk/build_stage1.sh +++ b/target/bootdisk/build_stage1.sh @@ -5,12 +5,12 @@ mkdir -p $disksdir/initrd/{dev,proc,tmp,scsi,net,bin} cd $disksdir/initrd; ln -s bin sbin; ln -s . usr # echo_status "Create linuxrc binary." -diet $CC -c $base/misc/isomd5sum/md5.c -Wall -o md5.o || true -diet $CC -c $base/misc/isomd5sum/libcheckisomd5.c -Wall -o libcheckisomd5.o || true +diet $CC -c $base/misc/isomd5sum/md5.c -Wall -o md5.o +diet $CC -c $base/misc/isomd5sum/libcheckisomd5.c -Wall -o libcheckisomd5.o diet $CC -c $base/target/$target/linuxrc.c -Wall -I $base/misc/isomd5sum/ \ -DSTAGE_2_BIG_IMAGE="\"${ROCKCFG_SHORTID}/2nd_stage.tar.gz\"" \ -DSTAGE_2_SMALL_IMAGE="\"${ROCKCFG_SHORTID}/2nd_stage_small.tar.gz\"" \ - -o linuxrc.o || true + -o linuxrc.o diet $CC linuxrc.o md5.o libcheckisomd5.o -o linuxrc rm -f linuxrc.o md5.o libcheckisomd5.o # diff --git a/target/bootdisk/build_stage2.sh b/target/bootdisk/build_stage2.sh index 0a547c774..5934de0db 100644 --- a/target/bootdisk/build_stage2.sh +++ b/target/bootdisk/build_stage2.sh @@ -8,8 +8,8 @@ cd $disksdir/2nd_stage mkdir -p mnt/source mnt/target # package_map=' +00-dirtree +glibc22 +glibc23 --gcc2 -gcc3 -gcc33 -gccx --linux24-source -linux26-source -linux24benh-src +-automake17 -automake18 -automake19 -gcc34 +-linux24-source -linux26-source -linux24benh-src -linux24-header -linux26-header -linux24benh-header -linux24 -linux26 -linux24benh -binutils -bin86 -nasm -dietlibc @@ -52,7 +52,11 @@ package_map="+$ROCKCFG_PKG_LINUX_DEFAULT +$packager $package_map" echo_status "Extracting the packages archives." for x in $( ls ../../pkgs/*.tar.bz2 | tr . / | cut -f8 -d/ ) do - if echo "" $package_map "" | grep -q " +$x " + if [ -z "${x##*:dev*}" -o -z "${x##*:doc*}" ] + then + # simply ignore :dev and :doc packages + true + elif echo "" $package_map "" | grep -q " +$x " then echo_status "\`- Extracting $x.tar.bz2 ..." tar --use-compress-program=bzip2 -xpf ../../pkgs/$x.tar.bz2 diff --git a/target/bootdisk/linuxrc.c b/target/bootdisk/linuxrc.c index 9659008eb..698f8ed79 100644 --- a/target/bootdisk/linuxrc.c +++ b/target/bootdisk/linuxrc.c @@ -263,7 +263,6 @@ void load_modules(char* directory){ int loader_res=0; char filename[256], input[256]; char *execargs[100]; - int pid; printf("module loading shell\n\n"); printf("you can navigate through the filestem with 'cd'. for loading a module\n"); @@ -356,7 +355,7 @@ void load_modules(char* directory){ return; } -int getdevice(char* devstr, int devlen, int cdroms, int floppies) +int getdevice(char* devstr, int devlen, int cdroms, int floppies, int autoboot) { char *devicelists[2] = { "/dev/cdroms/cdrom%d", "/dev/floppy/%d" }; char *devicenames[2] = @@ -395,9 +394,15 @@ int getdevice(char* devstr, int devlen, int cdroms, int floppies) printf("\nEnter number or device file name (default=0): "); fflush(stdout); - trygets(text, 100); + if ( !autoboot ) { + trygets(text, 100); + } else { + printf("0\n"); + strcpy(text, "0"); + } + if (text[0] == 0) - strcpy (text, "0"); + strcpy(text, "0"); while (1) { if ( ! access(text, R_OK) ) { @@ -419,7 +424,7 @@ int getdevice(char* devstr, int devlen, int cdroms, int floppies) return 1; } -void load_ramdisk_file() +void load_ramdisk_file(int autoboot) { char text[100], devicefile[100]; char filename[100]; @@ -427,7 +432,7 @@ void load_ramdisk_file() printf("Select a device for loading the 2nd stage system from: \n\n"); - if (getdevice(devicefile, 100, 1, 1) <= 0) + if (getdevice(devicefile, 100, 1, 1, autoboot) <= 0) return; printf("Select a stage 2 image file:\n\n" @@ -435,7 +440,13 @@ void load_ramdisk_file() "Enter number or image file name (default=1): ", STAGE_2_BIG_IMAGE, STAGE_2_SMALL_IMAGE); - trygets(text, 100); + if ( !autoboot ) { + trygets(text, 100); + } else { + printf("1\n"); + strcpy(text, "1"); + } + if (text[0] == 0) strcpy(filename, STAGE_2_BIG_IMAGE); else if (! strcmp(text, "1")) strcpy(filename, STAGE_2_BIG_IMAGE); else if (! strcmp(text, "2")) strcpy(filename, STAGE_2_SMALL_IMAGE); @@ -584,7 +595,7 @@ void checkisomd5() printf("Select a device for checking: \n\n"); - if (getdevice(devicefile, 100, 1, 0) <= 0) + if (getdevice(devicefile, 100, 1, 0, 0) <= 0) return; mediaCheckFile(devicefile, 0); @@ -610,6 +621,9 @@ int main() mod_suffix_len = strlen(mod_suffix); autoload_modules(); + if ( getenv("autoboot") ) { + load_ramdisk_file(1); + } printf("\n\ ============================================\n\ @@ -642,7 +656,7 @@ What do you want to do [0-8] (default=0)? "); switch (input) { case 0: - load_ramdisk_file(); + load_ramdisk_file(0); break; case 1: diff --git a/target/bootdisk/linuxrc2.sh b/target/bootdisk/linuxrc2.sh index a005443ca..e8502e418 100644 --- a/target/bootdisk/linuxrc2.sh +++ b/target/bootdisk/linuxrc2.sh @@ -42,9 +42,16 @@ for x in /etc/setup-*.sh /setup/setup.sh ; do done echo -echo "Enter the names of all terminal devices (e.g. 'vc/1' or 'tts/0')." -echo -n "An empty text stands for vc/1 - vc/6: " ; read ttydevs -[ -z "$ttydevs" ] && ttydevs="vc/1 vc/2 vc/3 vc/4 vc/5 vc/6" +ttydevs="" + +if [ -z "$autoboot" ]; then + echo "Enter the names of all terminal devices (e.g. 'vc/1' or 'tts/0')." + echo -n "An empty text stands for vc/1 - vc/6: "; read ttydevs +fi + +if [ -z "$ttydevs" ]; then + ttydevs="vc/1 vc/2 vc/3 vc/4 vc/5 vc/6" +fi if [[ "$ttydevs" = tts/* ]] ; then echo -n "Connection speed in Baud (default: 9600): " ; read baud @@ -62,7 +69,23 @@ else echo '(only the text interface is available).' fi -echo -e '#!/bin/sh\ncd ; exec /bin/sh --login' > /sbin/login-shell +if [ -z "$autoboot" ]; then + echo -e '#!/bin/sh\ncd ; exec /bin/sh --login' > /sbin/login-shell +else + cat <<- EOT > /sbin/login-shell + #!/bin/bash + case "\$( tty )" in + /dev/vc/1) + echo "Running 'stone' now.." + /bin/sh --login -c "stone" + echo -e '#!/bin/sh\\ncd ; exec /bin/sh --login' > /sbin/login-shell + exit 0 + ;; + *) + exec /bin/sh --login + esac + EOT +fi chmod +x /sbin/login-shell for x in $ttydevs ; do diff --git a/target/bootdisk/x86/help0.txt b/target/bootdisk/x86/help0.txt index c477bfdf2..c8ccfaa08 100644 --- a/target/bootdisk/x86/help0.txt +++ b/target/bootdisk/x86/help0.txt @@ -8,15 +8,15 @@ Help Screens: ------------- - <1> Installation overview - <2> Installing on systems with less than 64 MB RAM - <0> This help-text + <1> Installation overview + <2> Installing on systems with less than 64 MB RAM + <0> This help-text Actions: -------- - Start installation - ramdisk options Start install with the given kernel options - linux options Boot the linux kernel with the given options - memtest86 Boot the memtest86 mini-os + Start installation system + ramdisk [options] The same with interactive stage 1 (for experts) + linux [options] Boot a plain linux kernel (for rescue purposes) + memtest86 Boot the memtest86 mini-os diff --git a/target/bootdisk/x86/isolinux.cfg b/target/bootdisk/x86/isolinux.cfg index 7cf1ed94d..af032a901 100644 --- a/target/bootdisk/x86/isolinux.cfg +++ b/target/bootdisk/x86/isolinux.cfg @@ -1,5 +1,5 @@ -DEFAULT ramdisk +DEFAULT auto TIMEOUT 600 PROMPT 1 @@ -16,6 +16,10 @@ F8 help8.txt F9 help9.txt F0 help0.txt +LABEL auto + kernel vmlinuz + APPEND initrd=initrd.gz root=/dev/ram devfs=nocompat init=/linuxrc autoboot=1 rw + LABEL ramdisk kernel vmlinuz APPEND initrd=initrd.gz root=/dev/ram devfs=nocompat init=/linuxrc rw