Bug#754093: debian-installer: ppc64el support

2014-08-30 Thread Aurelien Jarno
Hi,

On Mon, Jul 07, 2014 at 03:53:47PM +0200, Frederic Bonnard wrote:
 Package: debian-installer
 Severity: normal
 Tags: d-i patch
 User: debian-powe...@lists.debian.org
 Usertags: ppc64el
 
 Dear Maintainer,
 
 hi, here is a patch from Ubuntu to add support of ppc64el.
 I just changed grub-cdrom.cfg to remove any d-i option on the kernel command 
 line.
 I added virtio-modules to support VMs with virtio which is good to have for 
 development.

I have merge the part of the patch which doesn't use grub, as it is not
yet available. This will allow debian-installer to be built for the 
daily images [1] that I'll setup for ppc64el in the next days. I'll 
merge the other parts when grub is available.

I also have done some small changes to the packages list, and set the
DEBIAN_RELEASE variable to install unstable instead of testing, as the
latter is not yet available for ppc64el.

[1] http://d-i.debian.org/daily-images/

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140830162859.gb1...@ohm.rr44.fr



Bug#754093: debian-installer: ppc64el support

2014-07-07 Thread Frederic Bonnard
Package: debian-installer
Severity: normal
Tags: d-i patch
User: debian-powe...@lists.debian.org
Usertags: ppc64el

Dear Maintainer,

hi, here is a patch from Ubuntu to add support of ppc64el.
I just changed grub-cdrom.cfg to remove any d-i option on the kernel command 
line.
I added virtio-modules to support VMs with virtio which is good to have for 
development.
Thank you,

F.


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ppc64el (ppc64le)

Kernel: Linux 3.14-1-powerpc64le (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/build/boot/ppc64el/grub-cdrom.cfg b/build/boot/ppc64el/grub-cdrom.cfg
new file mode 100644
index 000..825921a
--- /dev/null
+++ b/build/boot/ppc64el/grub-cdrom.cfg
@@ -0,0 +1,11 @@
+set timeout=-1
+
+menuentry Install {
+	linux	${KERNEL} -- quiet
+	initrd	${INITRD}
+}
+
+menuentry Rescue mode {
+	linux	${KERNEL} rescue/enable=true -- quiet
+	initrd	${INITRD}
+}
diff --git a/build/config/ppc64el.cfg b/build/config/ppc64el.cfg
new file mode 100644
index 000..ecbec94
--- /dev/null
+++ b/build/config/ppc64el.cfg
@@ -0,0 +1,76 @@
+MEDIUM_SUPPORTED = netboot cdrom
+
+MKLIBS = mklibs-copy
+
+KERNELMAJOR = 2.6
+BASEVERSION = 3.14-1
+KERNELVERSION = $(BASEVERSION)-powerpc64le
+KERNEL_FLAVOUR = di
+KERNELNAME = vmlinux
+KERNELIMAGEVERSION = $(KERNELVERSION)
+
+GRUB_CFG_CDROM = boot/ppc64el/grub-cdrom.cfg
+GRUB_CFG_NETBOOT=boot/ppc64el/grub-cdrom.cfg
+
+GRUB_MODULES = linux normal
+GRUB_MODULES_CDROM = iso9660
+
+arch_boot_screens:
+arch_tree:
+
+# Miniature CD image using GRUB, with only an initrd, no udebs or debs.
+.PHONY: arch_miniiso
+arch_miniiso: $(TEMP_INITRD) $(TEMP_KERNEL) $(TREE)
+	-rm -f $(TEMP_CD_TREE)/*
+	mkdir -p $(TEMP_CD_TREE)/boot/grub/powerpc-ieee1275 \
+		 $(TEMP_CD_TREE)/ppc/chrp \
+		 $(TEMP_CD_TREE)/install
+
+	cp $(TEMP_KERNEL) $(TEMP_CD_TREE)/install/vmlinux
+	cp $(TEMP_INITRD) $(TEMP_CD_TREE)/install/initrd.gz
+
+	bootvars-subst \
+		KERNEL /install/vmlinux \
+		INITRD /install/initrd.gz \
+	 $(GRUB_CFG_CDROM)  $(TEMP_CD_TREE)/boot/grub/grub.cfg
+
+	cp -p /usr/lib/grub/powerpc-ieee1275/bootinfo.txt \
+		$(TEMP_CD_TREE)/ppc/
+
+	grub-mkrescue --output=$(TEMP_MINIISO) $(TEMP_CD_TREE)
+
+# genisoimage CD info directory, including GRUB and configuration files.
+.PHONY: arch_cd_info_dir
+arch_cd_info_dir:
+	rm -rf $(TEMP_CD_INFO_DIR)
+	mkdir -p $(TEMP_CD_INFO_DIR)/boot/grub/powerpc-ieee1275 \
+		 $(TEMP_CD_INFO_DIR)/ppc/chrp
+
+	bootvars-subst \
+		KERNEL /install/vmlinux \
+		INITRD /install/initrd.gz \
+	 $(GRUB_CFG_CDROM)  $(TEMP_CD_INFO_DIR)/boot/grub/grub.cfg
+	grub-mkimage -O powerpc-ieee1275 -p '(ieee1275/cdrom)/boot/grub' \
+		-o $(TEMP_CD_INFO_DIR)/boot/grub/powerpc.elf \
+		$(GRUB_MODULES) $(GRUB_MODULES_CDROM)
+	cp -p /usr/lib/grub/powerpc-ieee1275/bootinfo.txt \
+		$(TEMP_CD_INFO_DIR)/ppc/
+
+# Netboot files
+.PHONY: arch_netboot_dir
+arch_netboot_dir:
+	-rm -f $(TEMP_NETBOOT_DIR)
+	mkdir -p $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)
+	cp $(TEMP_INITRD) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)
+	cp $(TEMP_KERNEL) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)
+	
+	bootvars-subst \
+		KERNEL $(NETBOOT_PATH)/vmlinux \
+		INITRD $(NETBOOT_PATH)/initrd.gz \
+	 $(GRUB_CFG_NETBOOT)  $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub.cfg
+	if [ -n $(SPLASH_PNG) ]; then \
+		cp $(SPLASH_PNG) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/splash.png; \
+	fi
+
+	grub-mknetdir --net-directory=$(TEMP_NETBOOT_DIR) \
+		--subdir=$(NETBOOT_PATH)
diff --git a/build/config/ppc64el/cdrom.cfg b/build/config/ppc64el/cdrom.cfg
new file mode 100644
index 000..38547cb
--- /dev/null
+++ b/build/config/ppc64el/cdrom.cfg
@@ -0,0 +1,8 @@
+MEDIA_TYPE = CD-ROM
+
+TARGET = $(INITRD) $(KERNEL) $(DEBIAN_CD_INFO)
+EXTRANAME = $(MEDIUM)/
+
+MANIFEST-KERNEL = kernel for use with mkisofs to build a CD
+MANIFEST-INITRD = initrd for use with mkisofs to build a CD
+MANIFEST-DEBIAN_CD_INFO = mkisofs config files for CD
diff --git a/build/config/ppc64el/netboot.cfg b/build/config/ppc64el/netboot.cfg
new file mode 100644
index 000..7c65d91
--- /dev/null
+++ b/build/config/ppc64el/netboot.cfg
@@ -0,0 +1,9 @@
+MEDIA_TYPE = netboot image
+
+NETBOOT_DIR_TARGETS = $(TEMP_INITRD) $(TEMP_KERNEL)
+TARGET = $(NETBOOT_DIR) $(NETBOOT_TAR) $(MINIISO)
+EXTRANAME = $(MEDIUM)/
+
+MANIFEST-NETBOOT_DIR = boot directory for tftp server
+MANIFEST-NETBOOT_TAR = tarball of boot directory
+MANIFEST-MINIISO = tiny CD image that boots the netboot installer
diff --git a/build/pkg-lists/netboot/ppc64el.cfg b/build/pkg-lists/netboot/ppc64el.cfg
new file mode 100644
index 000..6df809c
--- /dev/null
+++ b/build/pkg-lists/netboot/ppc64el.cfg
@@ -0,0 +1,29 @@
+input-modules-${kernel:Version}
+console-setup-pc-ekmap
+nic-modules-${kernel:Version}
+#nic-pcmcia-modules-${kernel:Version}
+#pcmcia-modules-${kernel:Version}
+mountmedia
+media-retriever
+usb-storage-modules-${kernel:Version}
+pcmciautils-udeb