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

patch for building powerpc-images (version 2)



Hi 

I changed my patch to make cd images for powerpc a little bit. I arranged
things like this:
- new directory build/boot, it contains files specific to boot-loaders,
  one directory for each architecture.
- new targets cd_content_powerpc and cd_image_powerpc. I could not make
  it simple as an addition to cd_content and cd_image, because on i386
  these have to depend on floppy-image, but on powerpc floppy images are
  not needed for cd booting.
- on powerpc build-installer now depends on yaboot, because the yaboot 
  binary is copied from /usr/lib/yaboot/yaboot
- I removed usb-modules-${kernel:Version}-udeb and 
  input-modules-${kernel:Version}-udeb from the packages lists for
  powerpc, because usb and input modules are compiled into the kernel
  on powerpc.
- new files:
  build/boot/powerpc/boot.msg
  build/boot/powerpc/cdrom-yaboot.conf
  build/boot/powerpc/hfs.map
  build/boot/powerpc/net-yaboot.conf
  build/boot/powerpc/ofboot.b
  build/pkg-lists/net/powerpc
- moved files:
  build/syslinux.cfg to build/boot/i386/syslinux.cfg
  
  
below are the new files and the patch, you can also get them
from http://www.soziologie.ch/users/steinlin/d-i/

I hope the patch is ok like this. Because I'm quite new to 
d-i, I did not know how to best submit patches. Please correct
me if things are not like you would like to have it. Otherwise
please commit this to CVS.

- gaudenz

build/boot/powerpc/boot.msg:
-------
Welcome to Debian GNU/Linux PowerPC (CODENAME)

Additionally ot the default 'install' option, 
there is 'install-safe' which you should try if 
the system fails to boot at all (the typical
symptom is a white screen which doesn't go away).

************************************
If in doubt, just choose 'install', and if that doesn't work, try
'install-safe'.
************************************
----------

build/boot/powerpc/cdrom-yaboot.conf:
----------
## This yaboot.conf is for CD booting only, do not use as reference.
## Debian GNU/Linux PowerPC (woody)

# It is important not to have a comma after cd:
device=cd:
default=install
timeout=100

# FIXME: will this be the correct path?
message=/boot/boot.msg

image=/boot/cdrom-linux
	label=install
	initrd=/boot/cdrom-initrd.gz
	initrd-size=8192
	read-only

# some machines have wonky framebuffer support
image=/boot/cdrom-linux
	label=install-safe
	initrd=/boot/cdrom-initrd.gz
	initrd-size=8192
	append="video=ofonly"
	read-only
------------

build/boot/powerpc/hfs.map:
------------
# ext.  xlate  creator  type    comment
.hqx    Ascii  'BnHx'   'TEXT'  "BinHex file"
.mov    Raw    'TVOD'   'MooV'  "QuickTime Movie"
.deb    Raw    'Debn'   'bina'  "Debian package"
.bin    Raw    'ddsk'   'DDim'  "Floppy or ramdisk image"
.img    Raw    'ddsk'   'DDim'  "Floppy or ramdisk image"
.b      Raw    'UNIX'   'tbxi'  "bootstrap"
yaboot  Raw    'UNIX'   'boot'  "bootstrap"
vmlinux Raw    'UNIX'   'boot'  "bootstrap"
.conf   Raw    'UNIX'   'conf'  "bootstrap"
*       Ascii  '????'   '????'  "Text file"
--------------

build/boot/powerpc/net-yaboot.conf:
--------------
## This yaboot.conf is for CD booting only, do not use as reference.
## Debian GNU/Linux PowerPC (woody)

# It is important not to have a comma after cd:
device=cd:
default=install
timeout=100

# FIXME: will this be the correct path?
message=/boot/boot.msg

image=/boot/net-linux
	label=install
	initrd=/boot/net-initrd.gz
	initrd-size=8192
	read-only

# some machines have wonky framebuffer support
image=/boot/net-linux
	label=install-safe
	initrd=/boot/net-initrd.gz
	initrd-size=8192
	append="video=ofonly"
	read-only
-------------

build/boot/powerpc/ofboot.b:
-------------
<CHRP-BOOT>
<COMPATIBLE>
MacRISC
</COMPATIBLE>
<DESCRIPTION>
Debian GNU/Linux PowerPC first stage CDROM bootloader
</DESCRIPTION>
<BOOT-SCRIPT>
" screen" output
load-base release-load-area
boot cd:,\boot\yaboot
</BOOT-SCRIPT>
</CHRP-BOOT>
--------------------

build/pkg-lists/net/powerpc:
--------------------
ide-modules-${kernel:Version}-udeb
scsi-modules-${kernel:Version}-udeb
nic-modules-${kernel:Version}-udeb
nic-modules-shared-${kernel:Version}-udeb
packet-socket-${kernel:Version}-udeb
#usb-modules-${kernel:Version}-udeb
#input-modules-${kernel:Version}-udeb
console-keymaps-amiga
console-keymaps-ps2
console-keymaps-usb
kbd-chooser
-------------------

and the patch:
-------------------
Index: Makefile
===================================================================
RCS file: /cvs/debian-boot/debian-installer/build/Makefile,v
retrieving revision 1.159
diff -u -r1.159 Makefile
--- Makefile	9 May 2003 15:18:23 -0000	1.159
+++ Makefile	15 May 2003 09:55:27 -0000
@@ -60,6 +60,9 @@
 # Build tree location.
 TREE=$(TEMP)/tree
 
+# CD Image tree location
+CD_IMAGE_TREE=$(TEMP)/cd_image_tree
+
 DPKGDIR=$(TREE)/var/lib/dpkg
 TMP_MNT:=$(shell pwd)/mnt
 
@@ -438,7 +441,7 @@
 	if $(foreach NAME,$(KERNELNAME), \
              cp -f $(TEMP)/$(NAME) $(TMP_MNT)/linux) \
 	   && cp $(INITRD) $(TMP_MNT)/initrd.gz \
-	   && cp syslinux.cfg $(TMP_MNT)/ \
+	   && cp boot/i386/syslinux.cfg $(TMP_MNT)/ \
 	   && todos $(TMP_MNT)/syslinux.cfg ; \
 	then \
 		umount $(TMP_MNT) ; \
@@ -463,11 +466,34 @@
 cd_content: floppy_image
 	$(foreach NAME,$(KERNELNAME), \
 		cp -f $(TEMP)/$(NAME) $(DEST)/$(TYPE)-linux; )
-	cp syslinux.cfg $(DEST)/$(TYPE)-syslinux.cfg
+	cp boot/i386/syslinux.cfg $(DEST)/$(TYPE)-syslinux.cfg
 
 cd_image: cd_content
 	mkisofs -r -J -b `basename $(FLOPPY_IMAGE)` -o $(TYPE).iso $(DEST)
 	mv $(TYPE).iso $(DEST)
+
+#cd content for powerpc, includes yaboot for booting apple powerpc (newworld) 
+#computers
+cd_content_powerpc: initrd
+	mkdir -p $(CD_IMAGE_TREE)
+	mkdir -p $(CD_IMAGE_TREE)/boot
+
+	$(foreach NAME,$(KERNELNAME), \
+		cp -f $(TEMP)/$(NAME) $(CD_IMAGE_TREE)/boot/$(TYPE)-linux; )
+
+	cp -f $(INITRD) $(CD_IMAGE_TREE)/boot/
+
+	#New-world bootability
+	cp -f boot/powerpc/ofboot.b $(CD_IMAGE_TREE)/boot/
+	cp -f /usr/lib/yaboot/yaboot $(CD_IMAGE_TREE)/boot/
+	cp -f boot/powerpc/boot.msg $(CD_IMAGE_TREE)/boot/
+	cp -f boot/powerpc/$(TYPE)-yaboot.conf $(CD_IMAGE_TREE)/boot/yaboot.conf
+
+
+#creates a bootable cd image for powerpc
+cd_image_powerpc: cd_content_powerpc
+	mkisofs -r -T --netatalk -hfs -probe -map boot/powerpc/hfs.map -part -no-desktop -hfs-bless $(CD_IMAGE_TREE)/boot -hfs-volid Debian-Installer/PPC -o $(DEST)/$(TYPE).iso $(CD_IMAGE_TREE)
+
 
 # Write image to floppy
 boot_floppy: floppy_image
Index: config/arch/linux-powerpc
===================================================================
RCS file: /cvs/debian-boot/debian-installer/build/config/arch/linux-powerpc,v
retrieving revision 1.2
diff -u -r1.2 linux-powerpc
--- config/arch/linux-powerpc	18 Apr 2003 08:56:59 -0000	1.2
+++ config/arch/linux-powerpc	15 May 2003 09:55:27 -0000
@@ -1,6 +1,7 @@
 # The version of the kernel to use.
 
-KERNELVERSION=2.4.19-powerpc
+KERNELVERSION=2.4.20-powerpc
 KERNELNAME=vmlinux
 
 KERNELIMAGEVERSION=$(KERNELVERSION)
+
Index: pkg-lists/cdrom/powerpc
===================================================================
RCS file: /cvs/debian-boot/debian-installer/build/pkg-lists/cdrom/powerpc,v
retrieving revision 1.4
diff -u -r1.4 powerpc
--- pkg-lists/cdrom/powerpc	13 Apr 2003 11:32:55 -0000	1.4
+++ pkg-lists/cdrom/powerpc	15 May 2003 09:55:27 -0000
@@ -1,7 +1,7 @@
 ide-modules-${kernel:Version}-udeb
 scsi-modules-${kernel:Version}-udeb
-usb-modules-${kernel:Version}-udeb
-input-modules-${kernel:Version}-udeb
+#usb-modules-${kernel:Version}-udeb
+#input-modules-${kernel:Version}-udeb
 console-keymaps-amiga
 console-keymaps-ps2
 console-keymaps-usb



Reply to: