From 59958d6a76843d262fc20469bb1d8860a2ad818a Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Mon, 12 Sep 2005 15:31:57 +0000 Subject: [PATCH] Added sh architecture to supported architectures. Thanks to Matsuu Takuto for the patch. Closing bug #105693. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@836 d1e1f19c-881f-0410-ab34-b69fee027534 --- AUTHORS | 1 + ChangeLog | 7 +++- arch/sh.py | 59 +++++++++++++++++++++++++++++++++ modules/generic_stage_target.py | 7 +++- 4 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 arch/sh.py diff --git a/AUTHORS b/AUTHORS index 2f381b20..72425e63 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,3 +14,4 @@ Gustavo Zacarias Robert Paskowitz David Bryson Daniel Ostrow +Matsuu Takuto diff --git a/ChangeLog b/ChangeLog index c96e071d..37365c26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.328 2005/09/08 20:59:07 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.329 2005/09/12 15:31:56 wolf31o2 Exp $ + + 12 Sep 2005; Chris Gianelloni AUTHORS, +arch/sh.py, + modules/generic_stage_target.py: + Added sh architecture to supported architectures. Thanks to Matsuu Takuto + for the patch. Closing bug #105693. 08 Sep 2005; Chris Gianelloni targets/livecd-stage1/livecd-stage1-controller.sh, diff --git a/arch/sh.py b/arch/sh.py new file mode 100644 index 00000000..70b683ac --- /dev/null +++ b/arch/sh.py @@ -0,0 +1,59 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/arch/sh.py,v 1.1 2005/09/12 15:31:57 wolf31o2 Exp $ + +import builder,os +from catalyst_support import * + +class generic_sh(builder.generic): + "Abstract base class for all sh builders [Little-endian]" + def __init__(self,myspec): + builder.generic.__init__(self,myspec) + self.settings["mainarch"]="sh" + self.settings["CHROOT"]="chroot" + +class generic_sheb(builder.generic): + "Abstract base class for all sheb builders [Big-endian]" + def __init__(self,myspec): + builder.generic.__init__(self,myspec) + self.settings["mainarch"]="sh" + self.settings["CHROOT"]="chroot" + +class arch_sh3(generic_sh): + "Builder class for SH-3 [Little-endian]" + def __init__(self,myspec): + generic_sh.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -m3" + self.settings["CHOST"]="sh3-unknown-linux-gnu" + +class arch_sh4(generic_sh): + "Builder class for SH-4 [Little-endian]" + def __init__(self,myspec): + generic_sh.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -m4" + self.settings["CHOST"]="sh4-unknown-linux-gnu" + +class arch_sh3eb(generic_sheb): + "Builder class for SH-3 [Big-endian]" + def __init__(self,myspec): + generic_sheb.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -m3 -mb" + self.settings["CHOST"]="sh3eb-unknown-linux-gnu" + +class arch_sh4eb(generic_sheb): + "Builder class for SH-4 [Big-endian]" + def __init__(self,myspec): + generic_sheb.__init__(self,myspec) + self.settings["CFLAGS"]="-O2 -m4 -mb" + self.settings["CHOST"]="sh4eb-unknown-linux-gnu" + +def register(foo): + "Inform main catalyst program of the contents of this plugin." + foo.update({ + "sh" :arch_sh3, + "sh3" :arch_sh3, + "sh4" :arch_sh4, + "sheb" :arch_sh3eb, + "sh3eb" :arch_sh3eb, + "sh4eb" :arch_sh4eb + }) diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 4c277cbd..b15613ab 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.57 2005/09/01 15:00:56 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.58 2005/09/12 15:31:57 wolf31o2 Exp $ """ This class does all of the chroot setup, copying of files, etc. It is @@ -34,6 +34,7 @@ class generic_stage_target(generic_target): "ia64" : ["ia64"], "alpha" : ["alpha"], "sparc" : ["sparc"], + "sh" : ["sh"], "s390" : ["s390"], "ppc" : ["ppc"], "ppc64" : ["ppc","ppc64"], @@ -52,6 +53,10 @@ class generic_stage_target(generic_target): "ia64" : "ia64", "alpha" : "alpha", "sparc" : "sparc", + "sh3" : "sh", + "sh4" : "sh", + "sh3eb" : "sh", + "sh4eb" : "sh", "s390" : "s390", "ppc" : "ppc", "ppc64" : "ppc64", -- 2.26.2