Moved to using the dev snapshot.

Allow the image and cd-rom to be given on the command line.
This commit is contained in:
Kees Jongenburger
2012-06-21 13:07:11 +02:00
parent 4c2f9699cb
commit 62a57d951c
4 changed files with 100 additions and 27 deletions

View File

@@ -1,29 +1,26 @@
default:minix.base.8g.img
minix_R3.2.0-116fcea.iso.bz2:
wget http://www.minix3.org/iso/minix_R3.2.0-116fcea.iso.bz2
default:minix.dev.8g.img
#
# unzip the bz2
# Download the isp
#
%.iso:%.iso.bz2
bunzip2 -k $<
minix-dev.iso:
wget http://www.minix3.org/iso/minix3_2_1_ide_20120620_ace9a62.iso.bz2
bunzip2 minix3_2_1_ide_20120620_ace9a62.iso.bz2
mv minix3_2_1_ide_20120620_ace9a62.iso minix-dev.iso
#
# Perform installation to harddisk
#
# @TODO make the script more configurable
minix.base.8g.img:script/02_qemu_minix_base.install.expect minix_R3.2.0-116fcea.iso
script/02_qemu_minix_base.install.expect
mv minix.tmp.img minix.base.8g.img
minix.dev.8g.img:script/02_qemu_minix_base.install.expect minix-dev.iso
script/02_qemu_minix_base.install.expect -- --image $@ --cdrom minix-dev.iso
minix.postinst.8g.img:minix.base.8g.img
rm -f minix.postinst.8g.tmp.img minix.postinst.8g.img
cp minix.base.8g.img minix.postinst.8g.tmp.img
post-install/01-reconfigure-net.expect
post-install/02-setup.expect
post-install/03-password.expect
mv minix.postinst.8g.tmp.img minix.postinst.8g.img
echo "now start the image using the startup.sh script"
echo "and scp and run post-install.sh to finish installation"
#
# Perform generic post installation
#
minix.dev-postinst.8g.img:minix.dev.8g.img
cp $< $@
post-install/02-setup.expect -- --image $@
post-install/03-password.expect -- --image $@
#echo "now start the image using the startup.sh script"
#echo "and scp and run post-install.sh to finish installation"

View File

@@ -1,6 +1,25 @@
#!/usr/bin/expect -f
#
spawn qemu-system-i386 -m 512 -hda minix.postinst.8g.tmp.img -curses
#
# Parse arguments
#
set image minix.postinst.8g.tmp.img
if { $argc > 0 } {
puts "Parsing arguments"
set counter 0
while {$counter < $argc} {
if { [lindex $argv $counter] == "--image" } {
set counter [expr {$counter +1}]
set image [lindex $argv $counter]
}
set counter [expr {$counter +1}]
}
}
spawn qemu-system-i386 -m 512 -hda $image -curses
set timeout 5

View File

@@ -1,6 +1,24 @@
#!/usr/bin/expect -f
#
spawn qemu-system-i386 -m 512 -hda minix.postinst.8g.tmp.img -curses
#
# Parse arguments
#
set image minix.postinst.8g.tmp.img
if { $argc > 0 } {
puts "Parsing arguments"
set counter 0
while {$counter < $argc} {
if { [lindex $argv $counter] == "--image" } {
set counter [expr {$counter +1}]
set image [lindex $argv $counter]
}
set counter [expr {$counter +1}]
}
}
spawn qemu-system-i386 -m 512 -hda $image -curses
set timeout 5

View File

@@ -8,17 +8,37 @@
#
set timeout 30
set image minix.tmp.img
set cdrom minix-cdrom.iso
if { $argc > 0 } {
puts "Parsing arguments"
set counter 0
while {$counter < $argc} {
if { [lindex $argv $counter] == "--image" } {
set counter [expr {$counter +1}]
set image [lindex $argv $counter]
}
if { [lindex $argv $counter] == "--cdrom" } {
set counter [expr {$counter +1}]
set cdrom [lindex $argv $counter]
}
set counter [expr {$counter +1}]
}
}
# Remove the previous install
exec rm -rf minix.tmp.img
exec rm -rf $image
# Create a new empty raw qemu image
exec qemu-img create minix.tmp.img 8G
exec qemu-img create $image 8G
# Spawn qemu using the curses front-end and start interacting with it
#spawn qemu -hda minix.tmp.img -cdrom minix_R3.2.0-116fcea.iso -boot d -curses
spawn qemu-system-i386 -hda minix.tmp.img -cdrom minix_R3.2.0-116fcea.iso -boot d -curses
spawn qemu-system-i386 -hda $image -cdrom $cdrom -boot d -curses
#pass past the bootloader
expect "1. Regular MINIX 3" {
@@ -97,7 +117,26 @@ expect "Block size in kilobytes?" {
}
set timeout 600
# Ethernet card?
expect "Ethernet card?" {
#--- Step 8: Select your Ethernet chip ---------------------------------
#
#MINIX 3 currently supports the following Ethernet cards. PCI cards detected
#by MINIX are marked with *. Please choose:
#
#0. No Ethernet card (no networking)
#1. 3Com 501 or 3Com 509 based card
#2. Realtek 8029 based card (also emulated by Qemu)
#3. NE2000, 3com 503 or WD based card (also emulated by Bochs)
#4. Attansic/Atheros L2 FastEthernet
#5. DEC Tulip 21140A in VirtualPC
#6. * Intel PRO/1000 Gigabit
#7. Intel PRO/100
#8. AMD LANCE (also emulated by VMWare and VirtualBox)
#9. Realtek 8139 based card
#10. Realtek 8169 based card
#11. Different Ethernet card (no networking)
#
#Ethernet card? [6]
expect "Ethernet card" {
send "\n"
}
#Configure network using DHCP or manually?