Re: [PATCH] Add support for lpia arch
On Wed, Apr 15, 2009 at 5:18 PM, Daniel Baumann
<daniel@debian.org> wrote:
<snip>
rest looks ok, however, please have a look at it again now that the
ubuntu mode is included.
Refreshed the patch and made recommended changes.
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
From 1cb684586d88cd10161ba42a5ff56958eb0a3561 Mon Sep 17 00:00:00 2001
From: Cody A.W. Somerville <cody.somerville@canonical.com>
Date: Wed, 15 Apr 2009 20:56:03 -0300
Subject: [PATCH] Add support for lpia architecture.
---
functions/architecture.sh | 10 ++++++++--
functions/defaults.sh | 19 +++++++++++++++++--
helpers/lh_binary_debian-installer | 10 ++++++++--
helpers/lh_binary_grub | 2 +-
helpers/lh_binary_includes | 4 ++++
helpers/lh_binary_linux-image | 10 +---------
helpers/lh_binary_memtest | 2 +-
helpers/lh_binary_rootfs | 2 +-
helpers/lh_binary_syslinux | 4 ++--
helpers/lh_binary_win32-loader | 2 +-
helpers/lh_chroot_hacks | 2 +-
helpers/lh_source_debian | 2 +-
12 files changed, 46 insertions(+), 23 deletions(-)
diff --git a/functions/architecture.sh b/functions/architecture.sh
index cd8e073..278ec6a 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)
@@ -75,6 +75,12 @@ Check_multiarchitecture ()
DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
;;
+ lpia)
+ DESTDIR="${DESTDIR}.lpi"
+ DESTDIR_LIVE="${DESTDIR_LIVE}.lpi"
+ DESTDIR_INSTALL="${DESTDIR_INSTALL}.lpi"
+ ;;
+
powerpc)
DESTDIR="${DESTDIR}.ppc"
DESTDIR_LIVE="${DESTDIR_LIVE}.ppc"
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 06e1478..c358ddb 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -518,6 +518,19 @@ Set_defaults ()
LH_LINUX_FLAVOURS="itanium"
;;
+ lpia)
+ case "${LH_MODE}" in
+ debian|debian-release|embedian)
+ Echo_error "Architecture ${LH_ARCHITECTURE} not supported on ${LH_MODE}."
+ exit 1
+ ;;
+
+ *)
+ LH_LINUX_FLAVOURS="lpia"
+ ;;
+ esac
+ ;;
+
powerpc)
case "${LIST}" in
stripped|minimal)
@@ -534,6 +547,7 @@ Set_defaults ()
case "${LH_MODE}" in
ubuntu)
Echo_error "Architecture ${LH_ARCHITECTURE} not supported on Ubuntu."
+ exit 1
;;
*)
@@ -558,6 +572,7 @@ Set_defaults ()
*)
Echo_error "Architecture ${LH_ARCHITECTURE} not yet supported (FIXME)"
+ exit 1
;;
esac
fi
@@ -690,7 +705,7 @@ Set_defaults ()
if [ -z "${LH_BOOTLOADER}" ]
then
case "${LH_ARCHITECTURE}" in
- amd64|i386)
+ amd64|i386|lpia)
LH_BOOTLOADER="syslinux"
;;
@@ -850,7 +865,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 f319d2a..f434992 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}"
@@ -346,9 +346,10 @@ else
# Downloading graphical-installer
DOWNLOAD_GTK_INSTALLER=0
case "${LH_ARCHITECTURE}" in
- amd64|i386)
+ amd64|i386|lpia)
DOWNLOAD_GTK_INSTALLER=1
;;
+
powerpc)
if [ "${LH_DEBIAN_INSTALLER}" = "netboot" ]
then
@@ -385,6 +386,11 @@ then
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 9dfeb18..f9a41db 100755
--- a/helpers/lh_binary_includes
+++ b/helpers/lh_binary_includes
@@ -70,6 +70,10 @@ case "${LH_ARCHITECTURE}" in
ARCH="386"
;;
+ lpia)
+ ARCH="lpia"
+ ;;
+
powerpc)
ARCH="ppc"
;;
diff --git a/helpers/lh_binary_linux-image b/helpers/lh_binary_linux-image
index f5abaab..0b1c542 100755
--- a/helpers/lh_binary_linux-image
+++ b/helpers/lh_binary_linux-image
@@ -53,19 +53,11 @@ case "${LH_INITRAMFS}" in
esac
case "${LH_ARCHITECTURE}" in
- amd64)
- LINUX="vmlinuz"
- ;;
-
- i386)
- LINUX="vmlinuz"
- ;;
-
powerpc)
LINUX="vmlinux"
;;
- sparc)
+ *)
LINUX="vmlinuz"
;;
esac
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
--
1.6.0.4
Reply to: