From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Wed, 10 Apr 2019 10:31:15 -0700 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 225C6308427D; Wed, 10 Apr 2019 17:31:15 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-121-133.rdu2.redhat.com [10.10.121.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7234A5D9CD; Wed, 10 Apr 2019 17:31:14 +0000 (UTC) Subject: Re: [edk2-devel] Building EDK2 code on arm64 (aarch64) - BaseTools fails To: devel@edk2.groups.io, rebecca@bluestop.org References: From: "Laszlo Ersek" Message-ID: <7fa82620-c915-07ea-bd51-d6bcc7da053b@redhat.com> Date: Wed, 10 Apr 2019 19:31:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 10 Apr 2019 17:31:15 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 04/10/19 06:57, Rebecca Cran via Groups.Io wrote: > Is there any expectation that EDK2 will build on non-x86 systems? Yes. It should certainly build on aarch64 (Linux at least). >=20 > I tried building BaseTools (from git master, > ae2fb9ead47b5abaf2a4e815b5f57c8f4838b221) using GCC 8.2 on a SoftIron > OverDrive 1000 (running FreeBSD) but there are lots of errors, such as: The issue here must be "FreeBSD". That's not supported as a build host OS, to my knowledge. I assume the build platform check in the BaseTools makefiles / scripts fail due to FreeBSD. edk2 platforms are otherwise regularly built on aarch64 Linux. Thanks Laszlo >=20 >=20 > gcc=C2=A0 -c=C2=A0 -I .. -I ../Include/Common -I ../Include/ -I > ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/Arm/= =C2=A0 > -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror > -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict > -Wno-unused-result -nostdlib -g -O2=C2=A0 BasePeCoff.c -o BasePeCoff.o > BasePeCoff.c: In function 'PeCoffLoaderGetPeHeader': > BasePeCoff.c:120:49: error: cast from pointer to integer of different > size [-Werror=3Dpointer-to-int-cast] > =C2=A0=C2=A0 *PeHdr =3D (EFI_IMAGE_OPTIONAL_HEADER_UNION *) > ((UINTN)ImageContext->Handle + ImageContext->PeCoffHeaderOffset); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^ > BasePeCoff.c:120:12: error: cast to pointer from integer of different > size [-Werror=3Dint-to-pointer-cast] > =C2=A0=C2=A0 *PeHdr =3D (EFI_IMAGE_OPTIONAL_HEADER_UNION *) > ((UINTN)ImageContext->Handle + ImageContext->PeCoffHeaderOffset); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^ > BasePeCoff.c: In function 'PeCoffLoaderImageAddress': > BasePeCoff.c:551:10: error: cast to pointer from integer of different > size [-Werror=3Dint-to-pointer-cast] > =C2=A0=C2=A0 return (UINT8 *) ((UINTN) ImageContext->ImageAddress + Add= ress); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^ >=20 >=20