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

Re: Adding ppc64el support in debian-cd



Hi Steve,

On Sat, Sep 27, 2014 at 10:02:34AM +0200, Aurelien Jarno wrote:
> On Mon, Sep 22, 2014 at 10:47:10PM +0200, Aurelien Jarno wrote:
> > The tarball should be decompressed in the root of the CD-ROM, while the
> > kernel and initrd should be placed in the /install directory. The ISO
> > image should be generated with the --chrp-boot argument. Beside that the
> > default options of genisoimage should be used, there is no need to
> > specify any strange HFS option like on powerpc (Note: I only tested that
> > on a VM using SLOF, it will be nice if someone with access to bare metal
> > can confirm that).
> > 
> > Don't hesitate to ask more details if needed. I will tell you once GRUB
> > is fixed and all these files are in place on d-i.debian.org.
> 
> GRUB is now fixed, and the latest daily build of d-i does have the CDROM
> files available:
> 
> http://d-i.debian.org/daily-images/ppc64el/daily/cdrom/

Please find attached a patch to add ppc64el support to debian-cd. Could
you please merge it?

Thanks,
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net
From c7868964f5fb572fccbb7a00fd2f79bf612fadb5 Mon Sep 17 00:00:00 2001
From: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri, 3 Oct 2014 00:11:47 +0200
Subject: [PATCH] Add initial support for ppc64el

---
 build_all.sh                   |  2 +-
 tools/boot/jessie/boot-ppc64el | 65 ++++++++++++++++++++++++++++++++++++++++++
 tools/generate_di+k_list       |  9 ++++++
 3 files changed, 75 insertions(+), 1 deletion(-)
 create mode 100755 tools/boot/jessie/boot-ppc64el

diff --git a/build_all.sh b/build_all.sh
index 70337ec..87d938d 100755
--- a/build_all.sh
+++ b/build_all.sh
@@ -40,7 +40,7 @@ if [ -z "$IMAGETARGET" ] ; then
 	IMAGETARGET="official_images"
 fi
 
-for ARCHES in i386 amd64 armel armhf arm64 mips mipsel powerpc s390x kfreebsd-amd64 kfreebsd-i386 source
+for ARCHES in i386 amd64 armel armhf arm64 mips mipsel powerpc ppc64el s390x kfreebsd-amd64 kfreebsd-i386 source
 do
 	export ARCHES
 	echo "Now we're going to build CD for $ARCHES !"
diff --git a/tools/boot/jessie/boot-ppc64el b/tools/boot/jessie/boot-ppc64el
new file mode 100755
index 0000000..0db3163
--- /dev/null
+++ b/tools/boot/jessie/boot-ppc64el
@@ -0,0 +1,65 @@
+#!/bin/bash
+#
+# Do install stuff for ppc64el, including making bootable CDs
+# Works with debian-installer
+#
+# $1 is the CD number
+# $2 is the temporary CD build dir
+
+. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
+
+set -e
+#set -x
+
+N=$1
+CDDIR=$2
+INSTALLDIR=$CDDIR/install
+if [ "$DI_WWW_HOME" = "default" ];then
+    DI_WWW_HOME="http://d-i.debian.org/daily-images/ppc64el/daily";
+    try_di_image_cache
+fi
+
+# Common mkisofs options when creating CDs
+add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
+add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
+
+# Only disc 1 bootable
+if [ $N != 1 ] ; then exit 0; fi
+
+cd $CDDIR/..
+
+BOOT_IMAGES="cdrom/initrd.gz cdrom/vmlinux cdrom/debian-cd_info.tar.gz"
+
+# Download boot images.
+for image in $BOOT_IMAGES; do
+    if [ ! -e "$image" ]; then
+        dir=$(dirname $image)
+        mkdir -p $dir
+        if [ -n "$LOCAL"  -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
+            cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
+        elif [ ! "$DI_WWW_HOME" ];then
+            if [ ! "$DI_DIR" ];then
+                DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
+            fi
+            cp "$DI_DIR/$image" "$image"
+        else
+            wget "$DI_WWW_HOME/$image" -O "$image"
+        fi
+    fi
+done
+
+# Boot setup including config and help files comes from d-i.
+mkdir -pv $PWD/CD$N
+cat cdrom/debian-cd_info.tar.gz | (cd CD$N/; tar zx)
+
+# Copy kernel and initrd
+mkdir -p $INSTALLDIR
+cp -lf cdrom/vmlinux $INSTALLDIR/
+cp -lf cdrom/initrd.gz $INSTALLDIR/
+
+# Add CHRP boot header
+if [ -d CD$N/ppc/bootinfo.txt ] ; then
+    add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-chrp-boot"
+fi
+
+exit 0
diff --git a/tools/generate_di+k_list b/tools/generate_di+k_list
index 7759e4b..2ecea4e 100755
--- a/tools/generate_di+k_list
+++ b/tools/generate_di+k_list
@@ -232,6 +232,15 @@ linux-image-powerpc64
 linux-image-prep
 #endif
 
+#ifdef ARCH_ppc64el
+initramfs-tools
+grub-ieee1275
+busybox
+powerpc-utils
+powerpc-ibm-utils
+linux-image-powerpc64el
+#endif
+
 #ifdef ARCH_alpha
 aboot
 #endif
-- 
2.1.1

Attachment: signature.asc
Description: Digital signature


Reply to: