summaryrefslogtreecommitdiffstats
path: root/scripts/mk-images.i386
blob: e3ed9e7964550cfdc1bf797f83197d0685efe96a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
SYSLINUX=$IMGPATH/usr/bin/syslinux

if [ ! -f $SYSLINUX ]; then
    echo "$SYSLINUX doesn't exist"
    exit 1
fi

SECSTAGE="vfat raid0 raid1 raid5"

prepareBootImage() {
        dd if=/dev/zero bs=1k count=$BOOTDISKSIZE of=/$MBD_TMPIMAGE 2>/dev/null
	gunzip < $BOOTDISKDIR/template.img.gz |
	    dd of=$MBD_TMPIMAGE conv=notrunc > /dev/null 2> /dev/null
	$SYSLINUX $MBD_TMPIMAGE
	mount -o loop -t msdos $MBD_TMPIMAGE $MBD_BOOTTREE

	(cd $BOOTDISKDIR; find . ! -name "*.msg" -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE)

	cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
	cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
	cp $BOOTDISKDIR/*.msg $MBD_BOOTTREE
}

makebootdisk --kernelto $TOPDESTPATH/dosutils/autorun/vmlinuz  \
	     --bootdisksize 1440 \
	     --imagename boot.img \
	     --initrdflags '--initrdto $TOPDESTPATH/dosutils/autorun/initrd.img \
		   	    --initrdsize 2000 \
			    --loaderbin loader-local \
			    --modules "vfat AM53C974 ips DAC960
			    megaraid ncr53c8xx cpqarray aic7xxx
			    BusLogic qlogicisp advansys eata_dma"'

makebootdisk --kernelto $TOPDESTPATH/images/pxeboot/vmlinuz  \
	     --bootdisksize 1440 \
	     --imagename bootnet.img \
	     --initrdflags '--initrdto $TOPDESTPATH/images/pxeboot/initrd.img \
		     	    --initrdsize 2000 \
			    --loaderbin loader-network \
		 	    --modules "3c59x ac3200 at1700 de4x5 de600
		  	    de620 depca dgrs eepro100 eepro hp-plus hp
		  	    hp100 ibmtr ni52 old_tulip tulip ne nfs
		  	    vfat"'

makebootdisk --imagename pcmcia.img \
	     --bootdisksize 1440 \
	     --initrdflags '--pcmcia \
		     	    --initrdsize 2000 \
			    --loaderbin loader-pcmcia \
			    --modules "$PCMCIAMODULES nfs vfat"'

makedriverdisk "Supplemental Drivers" "drivers" "+scsi +net"

makedriverdisk "Parallel port IDE Drivers" "paride" "parport_pc parport pcd paride aten bpck comm dstr epat fit2 fit3 friq frpw kbic ktti on20 on26 epia ppa imm"

makemainmodules "=scsi =net $SECSTAGE"

makeinstimage --size1 2660 --size2 2460 "netstg" "=scsi $SECSTAGE"
makeinstimage --size1 2660 --size2 2460 "hdstg" "=net $SECSTAGE"
makemainimage "stage2"