All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] raisin: enable ovmf build for arm64
@ 2015-10-14 15:57 Stefano Stabellini
  2015-10-14 16:11 ` Ian Campbell
  2015-10-14 22:17 ` Julien Grall
  0 siblings, 2 replies; 4+ messages in thread
From: Stefano Stabellini @ 2015-10-14 15:57 UTC (permalink / raw)
  To: stefano.stabellini; +Cc: xen-devel

Disable ovmf build on x86_32: it does not work, the code was already
forcing a x86_64 build.

---

Changes in v2:
- disable x86_32 build (it doesn't work, but it wasn't explicitly
  disabled)
- remove export GCC48_AARCH64_PREFIX= as it is not necessary
- add a comment on why we are using -t GCC48
---
 components/ovmf |   47 +++++++++++++++++++++++++++++++----------------
 1 file changed, 31 insertions(+), 16 deletions(-)

diff --git a/components/ovmf b/components/ovmf
index ffdde19..48091ac 100644
--- a/components/ovmf
+++ b/components/ovmf
@@ -1,24 +1,28 @@
 #!/usr/bin/env bash
 
 function ovmf_skip() {
-    if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
-    then
-        return 0
-    else
-        return 1
-    fi
+    case $RAISIN_ARCH in
+        "arm32"|"x86_32" )
+            return 0
+            ;;
+        "arm64"|"x86_64" )
+            return 1
+            ;;
+    esac
 }
 
 function ovmf_check_package() {
-    local DEP_Debian_common="build-essential nasm uuid-dev python iasl"
-    local DEP_Debian_x86_32="$DEP_Debian_common"
-    local DEP_Debian_x86_64="$DEP_Debian_common"
-    local DEP_Debian_arm32="$DEP_Debian_common"
+    local DEP_Debian_common="build-essential uuid-dev python iasl"
+    local DEP_Debian_x86_64="$DEP_Debian_common nasm"
     local DEP_Debian_arm64="$DEP_Debian_common"
 
-    local DEP_Fedora_common="make gcc gcc-c++ nasm libuuid-devel python acpica-tools"
-    local DEP_Fedora_x86_32="$DEP_Fedora_common"
-    local DEP_Fedora_x86_64="$DEP_Fedora_common"
+    local DEP_Fedora_common="make gcc gcc-c++ libuuid-devel python acpica-tools"
+    local DEP_Fedora_x86_64="$DEP_Fedora_common nasm"
+    local DEP_Fedora_arm64="$DEP_Debian_common"
+
+    local DEP_CentOS_common="$DEP_Fedora_common"
+    local DEP_CentOS_x86_64="$DEP_Fedora_x86_64"
+    local DEP_CentOS_arm64="$DEP_Fedora_arm64"
 
     verbose_echo Checking OVMF dependencies
     eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
@@ -30,9 +34,20 @@ function ovmf_build() {
     git-checkout $OVMF_URL $OVMF_REVISION ovmf-dir
     cd ovmf-dir
 
-    make -C BaseTools/Source/C
-    OvmfPkg/build.sh -a X64 -b RELEASE -n 4
-    cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin
+    make -C BaseTools
+
+    if [[ $RAISIN_ARCH = "arm64" ]]
+    then
+        # Just use gcc4.8 flags for now: we have to specify a gcc
+        # version and the 4.8 flags are almost identical to 4.9, etc.
+        bash -c "source edksetup.sh && \
+                 build -a AARCH64 -t GCC48 -p ArmVirtPkg/ArmVirtXen.dsc -b RELEASE"
+        mkdir -p "$INST_DIR"/$PREFIX/lib/xen/boot
+        cp Build/ArmVirtXen-AARCH64/RELEASE_GCC*/FV/XEN_EFI.fd "$INST_DIR"/$PREFIX/lib/xen/boot/XEN_EFI.fd
+    else
+        OvmfPkg/build.sh -a X64 -b RELEASE -n 4
+        cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin
+    fi
 
     cd "$BASEDIR"
 }
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] raisin: enable ovmf build for arm64
  2015-10-14 15:57 [PATCH v2] raisin: enable ovmf build for arm64 Stefano Stabellini
@ 2015-10-14 16:11 ` Ian Campbell
  2015-10-16 11:26   ` Stefano Stabellini
  2015-10-14 22:17 ` Julien Grall
  1 sibling, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2015-10-14 16:11 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel

On Wed, 2015-10-14 at 16:57 +0100, Stefano Stabellini wrote:
> Disable ovmf build on x86_32: it does not work, the code was already
> forcing a x86_64 build.

FYI osstest builds OVMF (64-bit) in its build-i386 jobs just fine. e.g. in
[0]. That's useful in 32-on-64 type scenarios, maybe raisin doesn't want to
support those?

The build run for both x86's in xen.git is just:
        OvmfPkg/build.sh -a X64 -b $(TARGET) -n 4
        cp Build/OvmfX64/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin

Which looks pretty close to what you have below...

Ian

[0] http://logs.test-lab.xenproject.org/osstest/logs/62946/build-i386/5.ts-xen-build.log

> 
> ---
> 
> Changes in v2:
> - disable x86_32 build (it doesn't work, but it wasn't explicitly
>   disabled)
> - remove export GCC48_AARCH64_PREFIX= as it is not necessary
> - add a comment on why we are using -t GCC48
> ---
>  components/ovmf |   47 +++++++++++++++++++++++++++++++----------------
>  1 file changed, 31 insertions(+), 16 deletions(-)
> 
> diff --git a/components/ovmf b/components/ovmf
> index ffdde19..48091ac 100644
> --- a/components/ovmf
> +++ b/components/ovmf
> @@ -1,24 +1,28 @@
>  #!/usr/bin/env bash
>  
>  function ovmf_skip() {
> -    if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
> -    then
> -        return 0
> -    else
> -        return 1
> -    fi
> +    case $RAISIN_ARCH in
> +        "arm32"|"x86_32" )
> +            return 0
> +            ;;
> +        "arm64"|"x86_64" )
> +            return 1
> +            ;;
> +    esac
>  }
>  
>  function ovmf_check_package() {
> -    local DEP_Debian_common="build-essential nasm uuid-dev python iasl"
> -    local DEP_Debian_x86_32="$DEP_Debian_common"
> -    local DEP_Debian_x86_64="$DEP_Debian_common"
> -    local DEP_Debian_arm32="$DEP_Debian_common"
> +    local DEP_Debian_common="build-essential uuid-dev python iasl"
> +    local DEP_Debian_x86_64="$DEP_Debian_common nasm"
>      local DEP_Debian_arm64="$DEP_Debian_common"
>  
> -    local DEP_Fedora_common="make gcc gcc-c++ nasm libuuid-devel python
> acpica-tools"
> -    local DEP_Fedora_x86_32="$DEP_Fedora_common"
> -    local DEP_Fedora_x86_64="$DEP_Fedora_common"
> +    local DEP_Fedora_common="make gcc gcc-c++ libuuid-devel python
> acpica-tools"
> +    local DEP_Fedora_x86_64="$DEP_Fedora_common nasm"
> +    local DEP_Fedora_arm64="$DEP_Debian_common"
> +
> +    local DEP_CentOS_common="$DEP_Fedora_common"
> +    local DEP_CentOS_x86_64="$DEP_Fedora_x86_64"
> +    local DEP_CentOS_arm64="$DEP_Fedora_arm64"
>  
>      verbose_echo Checking OVMF dependencies
>      eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
> @@ -30,9 +34,20 @@ function ovmf_build() {
>      git-checkout $OVMF_URL $OVMF_REVISION ovmf-dir
>      cd ovmf-dir
>  
> -    make -C BaseTools/Source/C
> -    OvmfPkg/build.sh -a X64 -b RELEASE -n 4
> -    cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin
> +    make -C BaseTools
> +
> +    if [[ $RAISIN_ARCH = "arm64" ]]
> +    then
> +        # Just use gcc4.8 flags for now: we have to specify a gcc
> +        # version and the 4.8 flags are almost identical to 4.9, etc.
> +        bash -c "source edksetup.sh && \
> +                 build -a AARCH64 -t GCC48 -p ArmVirtPkg/ArmVirtXen.dsc 
> -b RELEASE"
> +        mkdir -p "$INST_DIR"/$PREFIX/lib/xen/boot
> +        cp Build/ArmVirtXen-AARCH64/RELEASE_GCC*/FV/XEN_EFI.fd
> "$INST_DIR"/$PREFIX/lib/xen/boot/XEN_EFI.fd
> +    else
> +        OvmfPkg/build.sh -a X64 -b RELEASE -n 4
> +        cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin
> +    fi
>  
>      cd "$BASEDIR"
>  }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] raisin: enable ovmf build for arm64
  2015-10-14 15:57 [PATCH v2] raisin: enable ovmf build for arm64 Stefano Stabellini
  2015-10-14 16:11 ` Ian Campbell
@ 2015-10-14 22:17 ` Julien Grall
  1 sibling, 0 replies; 4+ messages in thread
From: Julien Grall @ 2015-10-14 22:17 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel

Hi Stefano,

On 14/10/2015 16:57, Stefano Stabellini wrote:
> -    make -C BaseTools/Source/C
> -    OvmfPkg/build.sh -a X64 -b RELEASE -n 4
> -    cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin
> +    make -C BaseTools
> +
> +    if [[ $RAISIN_ARCH = "arm64" ]]
> +    then
> +        # Just use gcc4.8 flags for now: we have to specify a gcc
> +        # version and the 4.8 flags are almost identical to 4.9, etc.

It would have been nice to mention that the downside is we always use 
the large model (see [1]).

Regards,

[1] http://lists.xen.org/archives/html/xen-devel/2015-10/msg01450.html

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] raisin: enable ovmf build for arm64
  2015-10-14 16:11 ` Ian Campbell
@ 2015-10-16 11:26   ` Stefano Stabellini
  0 siblings, 0 replies; 4+ messages in thread
From: Stefano Stabellini @ 2015-10-16 11:26 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel, Stefano Stabellini

On Wed, 14 Oct 2015, Ian Campbell wrote:
> On Wed, 2015-10-14 at 16:57 +0100, Stefano Stabellini wrote:
> > Disable ovmf build on x86_32: it does not work, the code was already
> > forcing a x86_64 build.
> 
> FYI osstest builds OVMF (64-bit) in its build-i386 jobs just fine. e.g. in
> [0]. That's useful in 32-on-64 type scenarios, maybe raisin doesn't want to
> support those?
> 
> The build run for both x86's in xen.git is just:
>         OvmfPkg/build.sh -a X64 -b $(TARGET) -n 4
>         cp Build/OvmfX64/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin
> 
> Which looks pretty close to what you have below...

Fair enough, maybe I'll add a message to warn the user


> Ian
> 
> [0] http://logs.test-lab.xenproject.org/osstest/logs/62946/build-i386/5.ts-xen-build.log
> 
> > 
> > ---
> > 
> > Changes in v2:
> > - disable x86_32 build (it doesn't work, but it wasn't explicitly
> >   disabled)
> > - remove export GCC48_AARCH64_PREFIX= as it is not necessary
> > - add a comment on why we are using -t GCC48
> > ---
> >  components/ovmf |   47 +++++++++++++++++++++++++++++++----------------
> >  1 file changed, 31 insertions(+), 16 deletions(-)
> > 
> > diff --git a/components/ovmf b/components/ovmf
> > index ffdde19..48091ac 100644
> > --- a/components/ovmf
> > +++ b/components/ovmf
> > @@ -1,24 +1,28 @@
> >  #!/usr/bin/env bash
> >  
> >  function ovmf_skip() {
> > -    if [[ $RAISIN_ARCH != "x86_64" && $RAISIN_ARCH != "x86_32" ]]
> > -    then
> > -        return 0
> > -    else
> > -        return 1
> > -    fi
> > +    case $RAISIN_ARCH in
> > +        "arm32"|"x86_32" )
> > +            return 0
> > +            ;;
> > +        "arm64"|"x86_64" )
> > +            return 1
> > +            ;;
> > +    esac
> >  }
> >  
> >  function ovmf_check_package() {
> > -    local DEP_Debian_common="build-essential nasm uuid-dev python iasl"
> > -    local DEP_Debian_x86_32="$DEP_Debian_common"
> > -    local DEP_Debian_x86_64="$DEP_Debian_common"
> > -    local DEP_Debian_arm32="$DEP_Debian_common"
> > +    local DEP_Debian_common="build-essential uuid-dev python iasl"
> > +    local DEP_Debian_x86_64="$DEP_Debian_common nasm"
> >      local DEP_Debian_arm64="$DEP_Debian_common"
> >  
> > -    local DEP_Fedora_common="make gcc gcc-c++ nasm libuuid-devel python
> > acpica-tools"
> > -    local DEP_Fedora_x86_32="$DEP_Fedora_common"
> > -    local DEP_Fedora_x86_64="$DEP_Fedora_common"
> > +    local DEP_Fedora_common="make gcc gcc-c++ libuuid-devel python
> > acpica-tools"
> > +    local DEP_Fedora_x86_64="$DEP_Fedora_common nasm"
> > +    local DEP_Fedora_arm64="$DEP_Debian_common"
> > +
> > +    local DEP_CentOS_common="$DEP_Fedora_common"
> > +    local DEP_CentOS_x86_64="$DEP_Fedora_x86_64"
> > +    local DEP_CentOS_arm64="$DEP_Fedora_arm64"
> >  
> >      verbose_echo Checking OVMF dependencies
> >      eval check-package \$DEP_"$DISTRO"_"$RAISIN_ARCH"
> > @@ -30,9 +34,20 @@ function ovmf_build() {
> >      git-checkout $OVMF_URL $OVMF_REVISION ovmf-dir
> >      cd ovmf-dir
> >  
> > -    make -C BaseTools/Source/C
> > -    OvmfPkg/build.sh -a X64 -b RELEASE -n 4
> > -    cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin
> > +    make -C BaseTools
> > +
> > +    if [[ $RAISIN_ARCH = "arm64" ]]
> > +    then
> > +        # Just use gcc4.8 flags for now: we have to specify a gcc
> > +        # version and the 4.8 flags are almost identical to 4.9, etc.
> > +        bash -c "source edksetup.sh && \
> > +                 build -a AARCH64 -t GCC48 -p ArmVirtPkg/ArmVirtXen.dsc 
> > -b RELEASE"
> > +        mkdir -p "$INST_DIR"/$PREFIX/lib/xen/boot
> > +        cp Build/ArmVirtXen-AARCH64/RELEASE_GCC*/FV/XEN_EFI.fd
> > "$INST_DIR"/$PREFIX/lib/xen/boot/XEN_EFI.fd
> > +    else
> > +        OvmfPkg/build.sh -a X64 -b RELEASE -n 4
> > +        cp Build/OvmfX64/RELEASE_GCC*/FV/OVMF.fd ovmf.bin
> > +    fi
> >  
> >      cd "$BASEDIR"
> >  }
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-16 11:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14 15:57 [PATCH v2] raisin: enable ovmf build for arm64 Stefano Stabellini
2015-10-14 16:11 ` Ian Campbell
2015-10-16 11:26   ` Stefano Stabellini
2015-10-14 22:17 ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.