[PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8

Kevin Zhao
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 <[hidden email]>
---
 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


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8

Mike Frysinger
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

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH v1 2/3] Modify the create iso parameter of ppc64le and power8

Kevin Zhao
2016-01-06 7:30 GMT+08:00 Mike Frysinger <[hidden email]>:
> 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.