* [gentoo-catalyst][PATCH v1 1/3] Add an subarch ppc64le,as the little-endian of ppc64.
@ 2015-12-16 16:40 Kevin Zhao
2015-12-16 16:41 ` [gentoo-catalyst][PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8 Kevin Zhao
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Zhao @ 2015-12-16 16:40 UTC (permalink / raw
To: gentoo-catalyst; +Cc: kevin.zhaoshuai
Add a subarch ppc64le, tweak the power8 inheriting from
arch_ppc64 to arch_ppc64le.So that the ppc64le can be a
keywork,it will be used in create iso and intergrating
bootloader.
Signed-off-by: Kevin Zhao <kevin.zhaoshuai@gmail.com>
---
catalyst/arch/powerpc.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/catalyst/arch/powerpc.py b/catalyst/arch/powerpc.py
index 7f4194e..a52b0d4 100644
--- a/catalyst/arch/powerpc.py
+++ b/catalyst/arch/powerpc.py
@@ -28,6 +28,13 @@ class arch_ppc64(generic_ppc64):
self.settings["CFLAGS"]="-O2 -pipe"
self.settings["CHOST"]="powerpc64-unknown-linux-gnu"
+class arch_ppc64le(generic_ppc64):
+ "builder class for generic ppc64le"
+ def __init__(self,myspec):
+ generic_ppc64.__init__(self,myspec)
+ self.settings["CFLAGS"]="-O2 -pipe"
+ self.settings["CHOST"]="powerpc64le-unknown-linux-gnu"
+
class arch_970(arch_ppc64):
"builder class for 970 aka G5 under ppc64"
def __init__(self,myspec):
@@ -99,10 +106,10 @@ class arch_power6(arch_ppc64):
self.settings["CFLAGS"]="-O2 -pipe -mcpu=power6 -mtune=power6"
self.settings["HOSTUSE"]=["altivec","ibm"]
-class arch_power8(arch_ppc64):
+class arch_power8(arch_ppc64le):
"builder class for power8 under ppc64le"
def __init__(self,myspec):
- arch_ppc64.__init__(self,myspec)
+ arch_ppc64le.__init__(self,myspec)
self.settings["CFLAGS"]="-O2 -pipe -mcpu=power8 -mtune=power8 -mabi=elfv2"
self.settings["CHOST"]="powerpc64le-unknown-linux-gnu"
self.settings["HOSTUSE"]=["altivec","ibm"]
@@ -123,5 +130,6 @@ def register():
"power6" : arch_power6,
"power8" : arch_power8,
"ppc" : arch_ppc,
- "ppc64" : arch_ppc64
+ "ppc64" : arch_ppc64,
+ "ppc64le" : arch_ppc64le
}, ("ppc","ppc64","ppc64le","powerpc","powerpc64","powerpc64le"))
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-catalyst][PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8
@ 2015-12-16 16:41 ` Kevin Zhao
2016-01-05 23:30 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Zhao @ 2015-12-16 16:41 UTC (permalink / raw
To: gentoo-catalyst; +Cc: kevin.zhaoshuai
Modify the parameter of ppc64le and power8, because the
ppc64 little-endian has different archtecture and new
boot parameters.Don't need the hfs and mapping files
as it in Big-endian.
Signed-off-by: Kevin Zhao <kevin.zhaoshuai@gmail.com>
---
targets/support/create-iso.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh
index b4077c3..8bdb15a 100755
--- a/targets/support/create-iso.sh
+++ b/targets/support/create-iso.sh
@@ -212,7 +212,12 @@ case ${clst_hostarch} in
fi
echo ">> Running mkisofs to create iso image...."
- run_mkisofs -r -U -chrp-boot -netatalk -hfs -probe -map "${clst_target_path}"/boot/map.hfs -part -no-desktop -hfs-volid "${clst_iso_volume_id}" -hfs-bless "${clst_target_path}"/boot -hide-hfs "zisofs" -hide-hfs "stages" -hide-hfs "distfiles" -hide-hfs "snapshots" -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"/
+ if [ "${clst_subarch}" == "ppc64le" ]||[ "${clst_subarch}" == "power8" ]
+ then
+ run_mkisofs -v -r -T -U -l -cache-inodes -chrp-boot -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"
+ else
+ run_mkisofs -r -U -chrp-boot -netatalk -hfs -probe -map "${clst_target_path}"/boot/map.hfs -part -no-desktop -hfs-volid "${clst_iso_volume_id}" -hfs-bless "${clst_target_path}"/boot -hide-hfs "zisofs" -hide-hfs "stages" -hide-hfs "distfiles" -hide-hfs "snapshots" -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"/
+ fi
;;
sparc*)
# Old silo (<=1.2.6) requires a specially built mkisofs
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [gentoo-catalyst][PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8
2015-12-16 16:41 ` [gentoo-catalyst][PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8 Kevin Zhao
@ 2016-01-05 23:30 ` Mike Frysinger
2016-01-07 2:35 ` Kevin Zhao
0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2016-01-05 23:30 UTC (permalink / raw
To: gentoo-catalyst; +Cc: kevin.zhaoshuai
[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]
On 16 Dec 2015 11:41, Kevin Zhao wrote:
> - run_mkisofs -r -U -chrp-boot -netatalk -hfs -probe -map "${clst_target_path}"/boot/map.hfs -part -no-desktop -hfs-volid "${clst_iso_volume_id}" -hfs-bless "${clst_target_path}"/boot -hide-hfs "zisofs" -hide-hfs "stages" -hide-hfs "distfiles" -hide-hfs "snapshots" -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"/
> + if [ "${clst_subarch}" == "ppc64le" ]||[ "${clst_subarch}" == "power8" ]
please put spaces around the || operator, and use = instead of ==
isn't this power8 specific ? so do you really need to look at ppc64le ?
> + then
> + run_mkisofs -v -r -T -U -l -cache-inodes -chrp-boot -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"
> + else
> + run_mkisofs -r -U -chrp-boot -netatalk -hfs -probe -map "${clst_target_path}"/boot/map.hfs -part -no-desktop -hfs-volid "${clst_iso_volume_id}" -hfs-bless "${clst_target_path}"/boot -hide-hfs "zisofs" -hide-hfs "stages" -hide-hfs "distfiles" -hide-hfs "snapshots" -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"/
> + fi
i know the existing code is ugly, but please fix that here. rather than
duplicate the huge command line, factor out the common bits. something
like:
flags=( -r -U )
if [ "${clst_subarch}" = "power8" ]
then
flags+=(
-v -T -l -cache-inodes -chrp-boot
)
else
flags+=(
...
)
fi
run_mkisofs "${flags[@]}" \
-J ${mkisofs_zisofs_opts}
-V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"
also, it seems like some of the flags you dropped for power8 should stay there.
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-catalyst][PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8
2016-01-05 23:30 ` Mike Frysinger
@ 2016-01-07 2:35 ` Kevin Zhao
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Zhao @ 2016-01-07 2:35 UTC (permalink / raw
To: gentoo-catalyst, Zhao Kevin
2016-01-06 7:30 GMT+08:00 Mike Frysinger <vapier@gentoo.org>:
> On 16 Dec 2015 11:41, Kevin Zhao wrote:
>> - run_mkisofs -r -U -chrp-boot -netatalk -hfs -probe -map "${clst_target_path}"/boot/map.hfs -part -no-desktop -hfs-volid "${clst_iso_volume_id}" -hfs-bless "${clst_target_path}"/boot -hide-hfs "zisofs" -hide-hfs "stages" -hide-hfs "distfiles" -hide-hfs "snapshots" -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"/
>> + if [ "${clst_subarch}" == "ppc64le" ]||[ "${clst_subarch}" == "power8" ]
>
> please put spaces around the || operator, and use = instead of ==
>
> isn't this power8 specific ? so do you really need to look at ppc64le ?
Thanks for the comment Mike. It is not the power8 specific, all the
ppc64le arch(including power7le and power8le)will use the new command
>
>> + then
>> + run_mkisofs -v -r -T -U -l -cache-inodes -chrp-boot -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"
>> + else
>> + run_mkisofs -r -U -chrp-boot -netatalk -hfs -probe -map "${clst_target_path}"/boot/map.hfs -part -no-desktop -hfs-volid "${clst_iso_volume_id}" -hfs-bless "${clst_target_path}"/boot -hide-hfs "zisofs" -hide-hfs "stages" -hide-hfs "distfiles" -hide-hfs "snapshots" -J ${mkisofs_zisofs_opts} -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"/
>> + fi
>
> i know the existing code is ugly, but please fix that here. rather than
> duplicate the huge command line, factor out the common bits. something
> like:
> flags=( -r -U )
> if [ "${clst_subarch}" = "power8" ]
> then
> flags+=(
> -v -T -l -cache-inodes -chrp-boot
> )
> else
> flags+=(
> ...
> )
> fi
> run_mkisofs "${flags[@]}" \
> -J ${mkisofs_zisofs_opts}
> -V "${clst_iso_volume_id}" -o "${1}" "${clst_target_path}"
>
> also, it seems like some of the flags you dropped for power8 should stay there.
> -mike
OK I will fix it here.Thanks~I will send the modifying patches again
after tweaking.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-07 2:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16 16:40 [gentoo-catalyst][PATCH v1 1/3] Add an subarch ppc64le,as the little-endian of ppc64 Kevin Zhao
2015-12-16 16:41 ` [gentoo-catalyst][PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8 Kevin Zhao
2016-01-05 23:30 ` Mike Frysinger
2016-01-07 2:35 ` Kevin Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox