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

Bug#412922: [PATCH] win32-loader integration



retitle 412922 win32-loader integration
thanks

The attached patch integrates win32-loader in the build system, to include
it with cdrom and hd-media builds (and netboot, when it comes to mini.iso)

Acknowledging the concerns Frans stated before about making it too easy for
unaware win32 users to run D-I and wipe their system, my patch doesn't generate
any autorun.inf file.

I do think it might be a good idea to explore that possibility later, but
having the feature at all is more important IMHO.  So let's postpone that and
please let me know what you think about the current patch.

Thanks!

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
Index: build/config/x86.cfg
===================================================================
--- build/config/x86.cfg	(revision 49070)
+++ build/config/x86.cfg	(working copy)
@@ -81,6 +81,25 @@
 		mcopy -i$(TEMP_BOOT) $(TEMP_BOOT_SCREENS)/splash.rle ::splash.rle; \
 	fi || echo "*** Failed to add boot logo, probably out of space." >&2
 
+	# win32-loader
+	(mcopy -i$(TEMP_BOOT) /usr/lib/win32-loader/win32-loader.exe	::setup.exe ; \
+	mcopy -i$(TEMP_BOOT) /usr/lib/win32-loader/g2ldr		::g2ldr ; \
+	mcopy -i$(TEMP_BOOT) /usr/lib/win32-loader/g2ldr.mbr		::g2ldr.mbr ; \
+	\
+	(echo -en "[installer]\n"; \
+	echo -en "arch=$(ARCH)\n"; \
+	if [ -n "$(INITRD_GTK)" ]; then \
+		echo -en "$(ARCH)/linux=linux\n$(ARCH)/initrd=initrd.gz\n"; \
+		echo -en "$(ARCH)/gtk/linux=linux\n$(ARCH)/gtk/initrd=initrdg.gz\n"; \
+	else \
+		echo -en "user_interface=text\n"; \
+		echo -en "$(ARCH)/linux=linux\n$(ARCH)/initrd=initrd.gz\n"; \
+	fi; \
+	echo -en "\n[grub]\ng2ldr=g2ldr\ng2ldr.mbr=g2ldr.mbr\n") \
+		| todos | mcopy -i$(TEMP_BOOT) - ::win32-loader.ini) \
+	|| (mdel -i$(TEMP_BOOT) ::setup.exe ::g2ldr ::g2ldr.mbr ::win32-loader.ini ; \
+		echo "*** Failed to add win32-loader, probably out of space." >&2)
+
 	$(if $(GZIPPED),gzip -v9f $(TEMP_BOOT))
 
 # Create a non-bootable image.
@@ -148,6 +167,24 @@
 		> $(TEMP_CD_INFO_DIR)/isolinux.cfg.withgtk; \
 	fi
 
+	# win32-loader
+	cp /usr/lib/win32-loader/win32-loader.exe	$(TEMP_CD_INFO_DIR)/setup.exe
+	cp /usr/lib/win32-loader/g2ldr			$(TEMP_CD_INFO_DIR)/g2ldr
+	cp /usr/lib/win32-loader/g2ldr.mbr		$(TEMP_CD_INFO_DIR)/g2ldr.mbr
+
+	# win32-loader.ini
+	(echo -en "[installer]\n"; \
+	echo -en "arch=$(ARCH)\n"; \
+	if [ -n "$(INITRD_GTK)" ]; then \
+		echo -en "$(ARCH)/linux=install/vmlinuz\n$(ARCH)/initrd=install/initrd.gz\n"; \
+		echo -en "$(ARCH)/gtk/linux=install/vmlinuz\n$(ARCH)/gtk/initrd=install/gtk/initrd.gz\n"; \
+	else \
+		echo -en "user_interface=text\n"; \
+		echo -en "$(ARCH)/linux=install/vmlinuz\n$(ARCH)/initrd=install/initrd.gz\n"; \
+	fi; \
+	echo -en "\n[grub]\ng2ldr=g2ldr\ng2ldr.mbr=g2ldr.mbr\n") \
+		| todos > $(TEMP_CD_INFO_DIR)/win32-loader.ini
+
 .PHONY: arch_miniiso
 arch_miniiso:
 	-rm -f $(TEMP_CD_TREE)/*
@@ -177,6 +214,24 @@
 	| todos > $(TEMP_CD_TREE)/isolinux.cfg
 	ln -f $(TEMP_INITRD) $(TEMP_CD_TREE)/initrd.gz
 	
+	# win32-loader
+	cp /usr/lib/win32-loader/win32-loader.exe	$(TEMP_CD_TREE)/setup.exe
+	cp /usr/lib/win32-loader/g2ldr			$(TEMP_CD_TREE)/g2ldr
+	cp /usr/lib/win32-loader/g2ldr.mbr		$(TEMP_CD_TREE)/g2ldr.mbr
+
+	# win32-loader.ini
+	(echo -en "[installer]\n"; \
+	echo -en "arch=$(ARCH)\n"; \
+	if [ "$(TYPE)" = "netboot/gtk" ]; then \
+		echo -en "user_interface=graphical\n"; \
+		echo -en "$(ARCH)/gtk/linux=linux\n$(ARCH)/gtk/initrd=initrd.gz\n"; \
+	else \
+		echo -en "user_interface=text\n"; \
+		echo -en "$(ARCH)/linux=linux\n$(ARCH)/initrd=initrd.gz\n"; \
+	fi; \
+	echo -en "\n[grub]\ng2ldr=g2ldr\ng2ldr.mbr=g2ldr.mbr\n") \
+		| todos > $(TEMP_CD_TREE)/win32-loader.ini
+
 	mkisofs -r -J -b isolinux.bin -c boot.cat \
 		-no-emul-boot -boot-load-size 4 -boot-info-table \
 		-o $(TEMP_MINIISO) $(TEMP_CD_TREE)
Index: debian/control
===================================================================
--- debian/control	(revision 49070)
+++ debian/control	(working copy)
@@ -155,6 +155,8 @@
 #	- openssl [arm armel]
 #		Used to encrypt a firmware image so an ARM based device
 #		(Thecus N2100) will accept it.
+#	- win32-loader [i386 amd64 kfreebsd-i386 kfreebsd-amd64]
+#		Alternative boot method for win32 platforms.
 
 Package: debian-installer
 Architecture: any

Reply to: