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

[PATCH] Add support for lpia arch



Hello,
 
 I noticed that live-helper does not support building images for the lpia architecture. Since lpia is pretty much i386 and I'd like to use live-helper to build images for lpia, I've created a small patch to fix this.

 If there are any problems with my patch, please let me know I'd be happy to try and address them.

Cheers,

--
Cody A.W. Somerville
Software Systems Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1-781-850-2087
Cell: +1-506-471-8402
Email: cody.somerville@canonical.com
diff --git a/debian/changelog b/debian/changelog
index 0b6a35d..b373164 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+live-helper (1.0.5-1) unstable; urgency=low
+
+  * Added support for lpia architecture.
+  
+ -- Cody A.W. Somerville <cody.somerville@canonical.com>  Wed, 25 Mar 2009 09:34:41 -0300
+
 live-helper (1.0.4-1) unstable; urgency=low
 
   * Handling kernel selection properly in example images build script.
diff --git a/functions/architecture.sh b/functions/architecture.sh
index cd8e073..dedfdf7 100755
--- a/functions/architecture.sh
+++ b/functions/architecture.sh
@@ -38,8 +38,8 @@ Check_crossarchitecture ()
 	fi
 
 	case "${HOST}" in
-		amd64|i386|x86_64)
-			CROSS="amd64 i386"
+		amd64|i386|lpia|x86_64)
+			CROSS="amd64 i386 lpia"
 			;;
 
 		powerpc|ppc64)
@@ -74,7 +74,11 @@ Check_multiarchitecture ()
 					DESTDIR_LIVE="${DESTDIR_LIVE}.386"
 					DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
 					;;
-
+				lpia)
+					DESTDIR="${DESTDIR}.lpia"
+					DESTDIR_LIVE="${DESTDIR_LIVE}.lpia"
+					DESTDIR_INSTALL="${DESTDIR_INSTALL}.lpia"
+					;;					
 				powerpc)
 					DESTDIR="${DESTDIR}.ppc"
 					DESTDIR_LIVE="${DESTDIR_LIVE}.ppc"
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 2b2e3f7..5bae552 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -447,7 +447,7 @@ Set_defaults ()
 				fi
 				;;
 
-			arm|armel|m68k)
+			arm|armel|m68k|lpia)
 				Echo_error "You need to specify the linux kernel flavour manually on ${LH_ARCHITECTURE} (FIXME)."
 				exit 1
 				;;
@@ -571,7 +571,7 @@ Set_defaults ()
 	if [ -z "${LH_BOOTLOADER}" ]
 	then
 		case "${LH_ARCHITECTURE}" in
-			amd64|i386)
+			amd64|i386|lpia)
 				LH_BOOTLOADER="syslinux"
 				;;
 
@@ -704,7 +704,7 @@ Set_defaults ()
 
 	# Setting win32-loader option
 	case "${LH_ARCHITECTURE}" in
-		amd64|i386)
+		amd64|i386|lpia)
 			if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
 			then
 				LH_WIN32_LOADER="${LH_WIN32_LOADER:-enabled}"
diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer
index 56f0b73..678adfc 100755
--- a/helpers/lh_binary_debian-installer
+++ b/helpers/lh_binary_debian-installer
@@ -118,7 +118,7 @@ esac
 
 # Varous architecture-specific hacks
 case "${LH_ARCHITECTURE}" in
-	i386|amd64)
+	i386|amd64|lpia)
 		case "${DI_IMAGE_TYPE}" in
 			netboot)
 				DI_REMOTE_BASE="netboot/debian-installer/${LH_ARCHITECTURE}"
@@ -278,7 +278,11 @@ then
 		i386)
 			URL="http://people.debian.org/~joeyh/d-i/images/daily/";
 			;;
-
+		
+		lpia)
+			URL="http://people.debian.org/~joeyh/d-i/images/daily/";
+			;;
+		
 		ia64)
 			URL="http://people.debian.org/~dannf/d-i/images/daily/";
 			;;
@@ -346,7 +350,7 @@ else
 	# Downloading graphical-installer
 	DOWNLOAD_GTK_INSTALLER=0
 	case "${LH_ARCHITECTURE}" in
-		amd64|i386)
+		amd64|i386|lpia)
 			DOWNLOAD_GTK_INSTALLER=1
 			;;
 		powerpc)
@@ -384,7 +388,12 @@ then
 			DI_REQ_PACKAGES="elilo lilo grub"
 			DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-486 linux-image-2.6-686"
 			;;
-
+		
+		lpia)
+			DI_REQ_PACKAGES="elilo lilo grub"
+			DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-486 linux-image-2.6-686"
+			;;
+		
 		sparc)
 			DI_REQ_PACKAGES="silo"
 			DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-2.6-sparc64 linux-image-2.6-sparc64-smp"
diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub
index 59377d2..6ddf843 100755
--- a/helpers/lh_binary_grub
+++ b/helpers/lh_binary_grub
@@ -46,7 +46,7 @@ Check_lockfile .lock
 Create_lockfile .lock
 
 # Check architecture
-Check_architecture amd64 i386
+Check_architecture amd64 i386 lpia
 Check_crossarchitecture
 
 # Checking depends
diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes
index e37cc61..0a1fd56 100755
--- a/helpers/lh_binary_includes
+++ b/helpers/lh_binary_includes
@@ -69,7 +69,11 @@ case "${LH_ARCHITECTURE}" in
 	i386)
 		ARCH="386"
 		;;
-
+	
+	lpia)
+		ARCH="lpia"
+		;;
+	
 	powerpc)
 		ARCH="ppc"
 		;;
diff --git a/helpers/lh_binary_linux-image b/helpers/lh_binary_linux-image
index f5abaab..6bae34f 100755
--- a/helpers/lh_binary_linux-image
+++ b/helpers/lh_binary_linux-image
@@ -60,7 +60,11 @@ case "${LH_ARCHITECTURE}" in
 	i386)
 		LINUX="vmlinuz"
 		;;
-
+	
+	lpia)
+		LINUX="vmlinuz"
+		;;
+	
 	powerpc)
 		LINUX="vmlinux"
 		;;
diff --git a/helpers/lh_binary_memtest b/helpers/lh_binary_memtest
index 88bacbc..edd9225 100755
--- a/helpers/lh_binary_memtest
+++ b/helpers/lh_binary_memtest
@@ -42,7 +42,7 @@ Check_lockfile .lock
 # Creating lock file
 Create_lockfile .lock
 
-if [ "${LH_ARCHITECTURE}" != "amd64" ] && [ "${LH_ARCHITECTURE}" != "i386" ]
+if [ "${LH_ARCHITECTURE}" != "amd64" ] && [ "${LH_ARCHITECTURE}" != "i386" ] && [ "${LH_ARCHITECTURE}" != "lpia" ]
 then
 	Echo_warning "skipping binary_memtest, foreign architecture."
 	exit 0
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index 9040f87..2bd1349 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -38,7 +38,7 @@ Check_lockfile .lock
 Create_lockfile .lock
 
 case "${LH_ARCHITECTURE}" in
-	amd64|i386)
+	amd64|i386|lpia)
 		LINUX="vmlinuz"
 		;;
 
diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index 310b879..e68cc4f 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -46,7 +46,7 @@ Check_lockfile .lock
 Create_lockfile .lock
 
 # Check architecture
-Check_architecture amd64 i386
+Check_architecture amd64 i386 lpia
 Check_crossarchitecture
 
 # Checking depends
@@ -220,7 +220,7 @@ Copy_syslinux_templates ()
 		fi
 
 		case "${LH_ARCHITECTURE}" in
-			amd64|i386|powerpc)
+			amd64|i386|powerpc|lpia)
 				if ls ${SCREEN_PATH}/*.install.g-i > /dev/null 2>&1
 				then
 					for FILE in ${SCREEN_PATH}/*.install.g-i
diff --git a/helpers/lh_binary_win32-loader b/helpers/lh_binary_win32-loader
index eb7247c..b25a268 100755
--- a/helpers/lh_binary_win32-loader
+++ b/helpers/lh_binary_win32-loader
@@ -45,7 +45,7 @@ Create_lockfile .lock
 if [ "${LH_DISTRIBUTION}" != "etch" ]
 then
 	case "${LH_ARCHITECTURE}" in
-		amd64|i386)
+		amd64|i386|lpia)
 			if [ "${LH_CHROOT_BUILD}" = "enabled" ]
 			then
 				# Checking depends
diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks
index 251c1c0..f23853f 100755
--- a/helpers/lh_chroot_hacks
+++ b/helpers/lh_chroot_hacks
@@ -121,7 +121,7 @@ then
 	# bootloader is already installed in the image. Very ugly, but it's to
 	# late to fix it in d-i because lenny rc2 has been already released.
 	case "${LH_ARCHITECTURE}" in
-		amd64|i386)
+		amd64|i386|lpia)
 			Apt install grub
 			;;
 
diff --git a/helpers/lh_source_debian b/helpers/lh_source_debian
index 26a3238..7b44345 100755
--- a/helpers/lh_source_debian
+++ b/helpers/lh_source_debian
@@ -64,7 +64,7 @@ mtd-tools
 EOF
 
 case "${LH_ARCHITECTURE}" in
-	amd64|i386)
+	amd64|i386|lpia)
 
 cat >> source-selection.txt << EOF
 mtools

Reply to: