From 6fe89cfbe8a5304cbd79c9b2f40b1488cca84f91 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 10 Mar 2006 14:11:19 +0000 Subject: [PATCH] Hack small and big fs into a single image. Must now set BIG or SMALL label. --- commands/scripts/setup.sh | 2 +- servers/fs/Makefile | 8 +------- tools/Makefile | 15 ++++++--------- tools/mkboot | 4 ++-- tools/release.sh | 6 ++++-- 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/commands/scripts/setup.sh b/commands/scripts/setup.sh index cb4b82341..6e5b5ebb8 100755 --- a/commands/scripts/setup.sh +++ b/commands/scripts/setup.sh @@ -614,7 +614,7 @@ mount /dev/$usr /mnt >/dev/null || exit # Make bootable. installboot -d /dev/$root /usr/mdec/bootblock /boot/boot >/dev/null || exit -edparams /dev/$root "rootdev=$root; ramimagedev=$root; $disable; minix(1,Start MINIX 3 (requires at least 16 MB RAM)) { unset image; boot; }; smallminix(2,Start Small MINIX 3 (intended for 8 MB RAM systems)) { image=/boot/image_small; ramsize=0; boot; }; main() { echo By default, MINIX 3 will automatically load in 3 seconds.; echo Press ESC to enter the monitor for special configuration.; trap 3000 boot; menu; }; save" || exit +edparams /dev/$root "rootdev=$root; ramimagedev=$root; $disable; minix(1,Start MINIX 3 (requires at least 16 MB RAM)) { label=BIG; boot; }; smallminix(2,Start Small MINIX 3 (intended for 8 MB RAM systems)) { label=SMALL; ramsize=0; boot; }; main() { echo By default, MINIX 3 will automatically load in 3 seconds.; echo Press ESC to enter the monitor for special configuration.; trap 3000 boot; menu; }; save" || exit pfile="/mnt/src/tools/fdbootparams" echo "rootdev=$root; ramimagedev=$root; $disable; save" >$pfile # Save name of CD drive diff --git a/servers/fs/Makefile b/servers/fs/Makefile index ff8d82c14..d331d3f8f 100644 --- a/servers/fs/Makefile +++ b/servers/fs/Makefile @@ -19,16 +19,11 @@ OBJ = main.o open.o read.o write.o pipe.o dmap.o \ lock.o misc.o utility.o select.o timers.o table.o # build local binary -all build: $(SERVER) +install all build: $(SERVER) $(SERVER): $(OBJ) $(CC) -o $@ $(LDFLAGS) $(OBJ) $(LIBS) install -S 512w $@ -# install with other servers -install: /usr/sbin/$(SERVER) -/usr/sbin/$(SERVER): $(SERVER) - install -o root -cs $? $@ - # clean up local files clean: rm -f $(SERVER) *.o *.bak @@ -38,4 +33,3 @@ depend: # Include generated dependencies. include .depend - diff --git a/tools/Makefile b/tools/Makefile index def0d0223..bc00ec7aa 100755 --- a/tools/Makefile +++ b/tools/Makefile @@ -4,7 +4,7 @@ u=/usr CC= exec cc CFLAGS= -O -D_MINIX -D_POSIX_SOURCE MDEC= /usr/mdec -MAKE= exec make -$(MAKEFLAGS) +MAKE= make -$(MAKEFLAGS) # Specify the programs that are part of the system image. # Multiple boot medium drivers can be included in the image, @@ -12,7 +12,8 @@ MAKE= exec make -$(MAKEFLAGS) # determined by the 'label=...' boot monitor parameter. PROGRAMS= ../kernel/kernel \ ../servers/pm/pm \ - ../servers/fs/fs \ + BIG:../servers/fs/fs \ + SMALL:../servers/fs/smallfs \ ../servers/rs/rs \ ../servers/ds/ds \ ../drivers/tty/tty \ @@ -53,16 +54,12 @@ all: services image image: includes cd ../kernel && $(MAKE) + cd ../servers/fs && $(MAKE) EXTRA_OPTS=-D_MINIX_SMALL=1 clean fs && \ + mv fs smallfs && make clean cd ../servers && $(MAKE) image cd ../drivers && $(MAKE) image installboot -image $@ $(PROGRAMS) -image_small: includes - cd ../kernel && $(MAKE) - cd ../servers && $(MAKE) EXTRA_OPTS=-D_MINIX_SMALL=1 image - cd ../drivers && $(MAKE) EXTRA_OPTS=$(EXTRA_OPTS) image - installboot -image $@ $(PROGRAMS) - # rebuild the program or system libraries includes: cd ../include && $(MAKE) install @@ -100,5 +97,5 @@ clean: cd ../kernel && $(MAKE) $@ cd ../servers && $(MAKE) $@ cd ../drivers && $(MAKE) $@ - rm -rf *.bak image image_small *.iso *.iso.gz cdfdimage rootimage src + rm -rf *.bak image *.iso *.iso.gz cdfdimage rootimage src diff --git a/tools/mkboot b/tools/mkboot index 06824f3ef..203827877 100755 --- a/tools/mkboot +++ b/tools/mkboot @@ -182,11 +182,11 @@ cdfdboot) mkdir /mnt/boot mkdir /mnt/boot/image ( cd /mnt/dev && sh /usr/src/commands/scripts/MAKEDEV.sh std ) - cp -p image image_* /mnt/boot/image || exit 1 + cp -p image /mnt/boot/image || exit 1 cp -p ../boot/boot /mnt/boot/boot || exit 1 umount $dev || exit 1 installboot -d $dev ../boot/bootblock boot/boot || exit 1 - edparams $dev 'unset bootopts; unset servers; disable=inet; image=/boot/image/image_big; bootbig(1, Regular MINIX 3 (requires at least 16 MB RAM)) { image=/boot/image/image ; boot } bootsmall(2, Small MINIX 3 (intended for 8 MB systems)) { image=/boot/image/image_small ; boot } cdproberoot=1; unset rootdev; unset leader; leader() { echo \n--- Welcome to MINIX 3. This is the boot monitor. ---\n\nChoose an option from the menu or press ESC if you need to do anything special.\nOtherwise I will boot with my defaults in 10 seconds.\n\n }; bootcd=1; main(){trap 10000 boot; menu; }; save' || exit + edparams $dev 'unset bootopts; unset servers; disable=inet; image=/boot/image/image; bootbig(1, Regular MINIX 3 (requires at least 16 MB RAM)) { label=BIG ; boot } bootsmall(2, Small MINIX 3 (intended for 8 MB systems)) { label=SMALL ; boot } cdproberoot=1; unset rootdev; unset leader; leader() { echo \n--- Welcome to MINIX 3. This is the boot monitor. ---\n\nChoose an option from the menu or press ESC if you need to do anything special.\nOtherwise I will boot with my defaults in 10 seconds.\n\n }; bootcd=1; main(){trap 10000 boot; menu; }; save' || exit # copy image dd if=$dev of=cdfdimage bs=8192 count=180 diff --git a/tools/release.sh b/tools/release.sh index c1da36542..ed7994d0c 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -38,11 +38,13 @@ hdemu_root_changes() $RELEASEDIR/usr/bin/installboot -d $TMPDISK3 \ $RELEASEDIR/usr/mdec/bootblock boot/boot echo \ -'label=BIOS -bootcd=2 +'bootcd=2 disable=inet bios_remap_first=1 ramimagedev=c0d7p0s0 +bootbig(1, Regular MINIX 3) { label=BIG; boot } +bootsmall(2, Small MINIX 3 (<16MB)) {label=SMALL; boot } +main() { trap 10000 boot ; menu; } save' | $RELEASEDIR/usr/bin/edparams $TMPDISK3 echo \ -- 2.44.0