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 0000000..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 0000000..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 0000000..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 0000000..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 0000000..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
+#fb-modules-${kernel:Version}
+usb-modules-${kernel:Version}
+virtio-modules-${kernel:Version}
+
+console-setup-udeb
+kbd-udeb
+bogl-bterm-udeb
+hw-detect
+ethdetect
+netcfg
+
+# brltty
+brltty-udeb
+serial-modules-${kernel:Version}
+usb-serial-modules-${kernel:Version} ?
+uinput-modules-${kernel:Version} ?
+
+# IBM Power hypervisor modules, only available on powerpc64.
+hypervisor-modules-${kernel:Version} ?
+fancontrol-modules-${kernel:Version} ?

Reply via email to