[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debian-installer alpha support patch



Hi,

Attached are a diff for the build/ subdirectory of d-i (I didn't have to
change anything outside it) and an aboot.conf file needed by that patch,
which add more support for alpha as what is currently there.

On my PWS500au system, it boots the kernel disk (net-1440.img) and prompts
for the root disk (net-initrd-1440.img.new - now that I read it I see that
I've forgotten to mv that image afterwards, someone add a line doing that
please).
It doesn't get further than that; when I insert the initrd disk and press
enter I get an error:

VFS: Insert root floppy disk to be loaded into RAM disk and press ENTER
<switch floppies, press enter>
VFS: Cannot open root device "fd0" or 02:00
Please append a correct "root=" boot option
Kernel panic: VFS: unable to mount root fs on 02:00

And there it sits.
The initrd is just /initrd.gz on an ext2 floppy, but ext2 should work just
as fine as vfat AFAIK. I'm not sure what the problem is, and I'm not going
to look into it anymore today.

I don't have clue on what different alpha systems will do. I could've
blindly copied the milo setup code from b-f (copying and a few tweaks here
and there is mostly what I did for the aboot code) but I think it's better
if someone with a different system type takes a look at it. Or someone who
feels comfortable enough just copying and adding it to d-i ;-)

As for the patch, I've had to make some misc changes here and there, to
support the two floppy build. There may be prettier ways to do some things,
but I think I've use relatively sane ways most of the time.
Feel free to adapt where needed.


Regards,

Filip

-- 
"If I have seen farther than others, it is because I was standing on the
 shoulders of giants."
	-- Sir Isaac Newton
#
# Bootparameters for Debian-Installation
#
# Installation-Boot with:  boot dva0 -fl 0
# Rescue-Boot with:        boot dva0 -fi linux -fl root=/dev/...
#
# from SRM-Console
#
0:linux ro root=/dev/fd0 load_ramdisk=1
diff -u -r1.129 Makefile
--- Makefile	9 Jan 2003 08:18:11 -0000	1.129
+++ Makefile	12 Jan 2003 16:09:48 -0000
@@ -23,6 +23,7 @@
 ifeq "$(architecture)" "i386"
 KERNELVERSION=2.4.19-386
 KERNELNAME=vmlinuz
+FSTYPE=vfat
 endif
 ifeq "$(architecture)" "ia64"
 KERNELVERSION=2.4.19-ia64
@@ -44,6 +45,12 @@
 KERNELVERSION=2.2.20
 KERNELNAME=vmlinuz
 endif
+ifeq "$(architecture)" "alpha"
+KERNELIMAGEVERSION=2.4.20-generic
+KERNELVERSION=2.4.20
+KERNELNAME=vmlinuz
+TWO_FLOPPY_HACK=true
+endif
 
 ifndef KERNELIMAGEVERSION
 KERNELIMAGEVERSION=${KERNELVERSION}
@@ -51,6 +58,9 @@
 ifndef KERNELIMAGEVERSION_SECOND
 KERNELIMAGEVERSION_SECOND=${KERNELVERSION_SECOND}
 endif
+ifndef FSTYPE
+FSTYPE=ext2
+endif
 
 # The type of system to build. Determines what udebs are unpacked into
 # the system. See the .list files for various types. You may want to
@@ -100,6 +110,7 @@
 
 # The floppy image to create.
 FLOPPY_IMAGE=$(DEST)/$(TYPE)-$(FLOPPY_SIZE).img
+INITRD_IMAGE=$(DEST)/$(TYPE)-initrd-$(FLOPPY_SIZE).img
 
 # Creating floppy images requires mounting the image to copy files to it.
 # This generally needs root permissions. To let a user mount the floppy
@@ -186,6 +197,9 @@
 
 build: demo_clean tree stats
 
+vars-test:
+	-@echo "TYPE=$(TYPE); architecture=$(architecture); KERNELIMAGEVERSION=$(KERNELIMAGEVERSION)"
+
 demo: tree
 	-@sudo chroot $(TREE) bin/sh -c "bin/umount /dev; bin/mount -t devfs dev /dev" &> /dev/null
 	-@sudo chroot $(TREE) bin/sh -c "bin/umount /proc; bin/mount -t proc proc /proc" &> /dev/null
@@ -434,29 +448,53 @@
 $(FLOPPY_IMAGE):
 	install -d $(DEST)
 
+ifeq "$(architecture)" "alpha"
+	genext2fs -b $(FLOPPY_SIZE) -z $(FLOPPY_IMAGE).new
+else
 	dd if=/dev/zero of=$(FLOPPY_IMAGE).new bs=1k count=$(FLOPPY_SIZE)
 	mkfs.msdos -i deb00001 -n 'Debian Installer' -C $(FLOPPY_IMAGE).new $(FLOPPY_SIZE)
+endif
 
 ifdef USER_MOUNT_HACK
 	ln -sf `pwd`/$(FLOPPY_IMAGE).new $(USER_MOUNT_HACK)
 	mount $(TMP_MNT)
 else
-	mount -t vfat -o loop $(FLOPPY_IMAGE).new $(TMP_MNT)
+	mount -t $(FSTYPE) -o loop $(FLOPPY_IMAGE).new $(TMP_MNT)
 endif
 
 	cp $(KERNEL) $(TMP_MNT)/linux
+ifdef TWO_FLOPPY_HACK
+	umount $(TMP_MNT)
+	genext2fs -b $(FLOPPY_SIZE) -z $(INITRD_IMAGE).new
+	mount -t $(FSTYPE) -o loop $(INITRD_IMAGE).new $(TMP_MNT)
 	cp $(INITRD) $(TMP_MNT)/initrd.gz
+	umount $(TMP_MNT)
+	mount -t $(FSTYPE) -o loop $(FLOPPY_IMAGE).new $(TMP_MNT)
+else
+	cp $(INITRD) $(TMP_MNT)/initrd.gz
+endif
 
 	# Make the floppy bootable.
+ifeq "$(architecture)" "alpha"
+	# b-f unmounted before running e2writeboot, too
+	umount $(TMP_MNT)
+	e2writeboot $(FLOPPY_IMAGE).new /boot/bootlx
+	mount -t $(FSTYPE) -o loop $(FLOPPY_IMAGE).new $(TMP_MNT)
+	mkdir $(TMP_MNT)/etc
+	install -o root -g root -m 0644 aboot.conf $(TMP_MNT)/etc/
+else
 	cp syslinux.cfg $(TMP_MNT)/
 	todos $(TMP_MNT)/syslinux.cfg
+endif
 	umount $(TMP_MNT)
 	
+ifeq "$(architecture)" "i386"
 ifdef USER_MOUNT_HACK
 	syslinux $(SYSLINUX_OPTS) $(USER_MOUNT_HACK)
 	rm -f $(USER_MOUNT_HACK)
 else
 	syslinux $(SYSLINUX_OPTS) $(FLOPPY_IMAGE).new
+endif
 endif
 
 	# Finalize the image.
diff -u -r1.22 control
--- debian/control	11 Jan 2003 11:38:14 -0000	1.22
+++ debian/control	12 Jan 2003 16:09:48 -0000
@@ -1,7 +1,6 @@
 Source: build-installer
 Section: devel
 Priority: extra
-Build-Depends: apt, slang1-utf8-pic, syslinux [i386], sysutils [i386], dosfstools [i386], libdiscover1-pic [!s390 !s390x], libdiscover1 [!s390 !s390x], ncurses-base, genext2fs, mklibs, libdebconf1, libdebian-installer3, modutils
+Build-Depends: apt, slang1-utf8-pic, syslinux [i386], sysutils [i386], dosfstools [i386], libdiscover1-pic [!s390 !s390x], libdiscover1 [!s390 !s390x], ncurses-base, genext2fs, mklibs, libdebconf1, libdebian-installer3, modutils, debhelper
 Maintainer: Joey Hess <joeyh@debian.org>
-Build-Depends: debhelper
 Standards-Version: 3.2.1.0

Reply to: