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

Bug#752410: libdebian-installer: ppc64el support



Hi Ben,
actually the use of quilt/patch didn't handle the link between subarch-ppc64el-linux.c
and subarch-powerpc-linux.c . Sorry.
I redid the patch using git.
Compared to Ubuntu, this time I also added PowerNV so that is it handled in the platform
list and was enclined to return "chrp_ibm" but I would need your confirmation on
that, I'm not sure of what hides behind that specific term.
As far as I know for now, ppc64el is available in guests ("platform: pSeries")
and ppc64el P8 hosts will have "plateform: PowerNV" so that should cover all.
Thanks for your comments,

Fred


On Mon, 23 Jun 2014 17:55:18 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Mon, 2014-06-23 at 16:09 +0200, Frederic Bonnard wrote:
> > Package: libdebian-installer
> > Version: 0.91
> > Severity: normal
> > Tags: patch
> > User: debian-powerpc@lists.debian.org
> > Usertags: ppc64el
> > 
> > 
> > Dear Maintainer,
> > 
> > here is a patch from Ubuntu for ppc64el support in libdebian-installer.
> 
> This is copy-pasta from powerpc and most of it is useless for ppc64el.
> If you want to share the implementation across multiple Debian
> architectures, then share it instead of copying.
> 
> [...]
> > --- libdebian-installer-0.91/src/system/subarch-ppc64el-linux.c 1970-01-01 00:00:00.000000000 +0000
> > +++ libdebian-installer-0.91/src/system/subarch-ppc64el-linux.c 2014-05-20 10:28:31.000000000 +0000
> > @@ -0,0 +1,92 @@
> > +#include <ctype.h>
> > +#include <stdlib.h>
> > +#include <stdio.h>
> > +#include <string.h>
> > +#include <strings.h>
> > +
> > +#include <debian-installer/system/subarch.h>
> > +
> > +struct map {
> > +       char *entry;
> > +       char *ret;
> > +};
> > +
> > +static struct map map_generation[] = {
> > +       { "OldWorld", "powermac_oldworld" },
> > +       { "NewWorld", "powermac_newworld" },
> > +       { "NuBus", "powermac_nubus" },
> > +       { NULL, NULL }
> > +};
> 
> PowerMacs are big-endian.
> 
> > +static struct map map_machine[] = {
> > +       { "PReP", "prep" },
> > +       { "CHRP Pegasos", "chrp_pegasos" },
> > +       { "EFIKA", "chrp_pegasos" },
> > +       { "CHRP IBM", "chrp_rs6k" },
> > +       { "CHRP", "chrp" },
> > +       { "Amiga", "amiga" },
> > +       { "64-bit iSeries Logical Partition", "iseries" },
> 
> Do any of these support little-endian operation?
> 
> > +       { NULL, NULL }
> > +};
> > +
> > +static struct map map_platform[] = {
> > +       { "PS3", "ps3" },
> > +       { "Cell", "cell" },
> > +       { "PA Semi", "pasemi" },
> > +       { "Maple", "chrp_ibm" },
> > +       { "pSeries", "chrp_ibm" },
> > +       { "P4080 DS", "fsl" },
> > +       { "QEMU e500", "fsl" },
> [...]
> 
> At least PS3/Cell are big-endian only.
> 
> Ben.
> 
> -- 
> Ben Hutchings
> For every complex problem
> there is a solution that is simple, neat, and wrong.
diff --git a/src/system/Makefile.am b/src/system/Makefile.am
index 2593441..5ae637c 100644
--- a/src/system/Makefile.am
+++ b/src/system/Makefile.am
@@ -21,6 +21,7 @@ EXTRA_libsystem_la_SOURCES = \
 	subarch-mips-linux.c \
 	subarch-mipsel-linux.c \
 	subarch-powerpc-linux.c \
+	subarch-ppc64el-linux.c \
 	subarch-sh4-linux.c \
 	subarch-sparc-linux.c \
 	subarch-x86-linux.c \
diff --git a/src/system/subarch-powerpc-linux.c b/src/system/subarch-powerpc-linux.c
index a91a434..94df8c1 100644
--- a/src/system/subarch-powerpc-linux.c
+++ b/src/system/subarch-powerpc-linux.c
@@ -35,6 +35,7 @@ static struct map map_platform[] = {
 	{ "PA Semi", "pasemi" },
 	{ "Maple", "chrp_ibm" },
 	{ "pSeries", "chrp_ibm" },
+	{ "PowerNV", "chrp_ibm" },
 	{ NULL, NULL }
 };
 
diff --git a/src/system/subarch-ppc64el-linux.c b/src/system/subarch-ppc64el-linux.c
new file mode 120000
index 0000000..b6b70dc
--- /dev/null
+++ b/src/system/subarch-ppc64el-linux.c
@@ -0,0 +1 @@
+subarch-powerpc-linux.c
\ No newline at end of file

Reply to: