Hi Laszlo > -----Original Message----- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Thursday, October 08, 2015 22:21 > To: Yehuda Yitschak > Cc: edk2-devel@lists.01.org; leif.lindh...@linaro.org > Subject: Re: [edk2] Cross compiling EDK2 for Aarch64 > > Obviously I forgot one command (because it need not be reissued every > time): > > On 10/08/15 21:17, Laszlo Ersek wrote: > > On 10/08/15 10:24, Yehuda Yitschak wrote: > >> Hello everyone > >> > >> I am new to the EDK2 projects and for starters I am trying to cross > >> compile the project for aarch64 on an x86_64 host > >> > >> I looked around in Linaro website and Tiano-core website but couldn't > >> find any instruction on how to _cross_ compile > >> > >> I tried to follow the instruction here: > >> https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/build > >> but when I try to compile using the "build" command the build script > >> uses the x86 compiler and naturally it fails I tried working around > >> this by setting the environment variable GCC48_BIN however then the > >> build system tries to call "make" from the path in GCC48_BIN which > >> off course fails > >> > >> I also found these instructions > >> https://github.com/tianocore/tianocore.github.io/wiki/Unix-like_syste > >> ms#Build_gcc_x64_UEFI_cross_compiler > >> But I'm not sure they apply to aarch64. > >> > >> I appreciate any suggestions you can offer > > > > Here's how I do it: > > > > - download & install the latest cross-compiler toolchain from Linaro's > > website, for example: > > > > https://releases.linaro.org/15.06/components/toolchain/binaries/4.8/aa > > rch64-linux-gnu/ > > > > The tarball you most probably want is > > > > gcc-linaro-4.8-2015.06-x86_64_aarch64-linux-gnu.tar.xz > > > > assuming you use Linux. If you use Windows, I guess you need: > > > > gcc-linaro-4.8-2015.06-i686-mingw32_aarch64-linux-gnu.tar.xz > > > > Now extract this somewhere, and put its "bin" directory on your PATH. > > Notice that it has filenames like "aarch64-linux-gnu-gcc". > > > > Once this is done, you can build ArmVirtQemu.dsc (for getting AARCH64 > > firmware that runs on "qemu-system-aarch64 -M virt") like this: > > > > $ source edksetup.sh > > after this: > > $ make -C "$EDK_TOOLS_PATH" > > Thanks > Laszlo > > > > > $ export GCC48_AARCH64_PREFIX=aarch64-linux-gnu- > > > > $ build \ > > -a AARCH64 \ > > -t GCC48 \ > > -p ArmVirtPkg/ArmVirtQemu.dsc \ > > -n 8 \ > > --report-file=.../build.aa64virt.report \ > > --log=.../build.aa64virt.log \ > > -b DEBUG \ > > -D DEBUG_PRINT_ERROR_LEVEL=0x8040004F \ > > -D SECURE_BOOT_ENABLE > > > > (See "build --help" for what's what.) > > > > The final firmware image is somewhere under the Build directory, > > you'll have to consult the FDF file referenced with FLASH_DEFINITION > > in the DSC file for finding out its name. > > > > For example, "ArmVirtPkg/ArmVirtQemu.dsc" references > > "ArmVirtPkg/ArmVirtQemu.fdf", and the latter has a section called > > [FD.QEMU_EFI], so the file you'd look for under Build is "QEMU_EFI.fd". > > > > For installing and/or running the firmware binary, further actions may > > be necessary, of course. (In case of QEMU, the QEMU_EFI.fd file needs > > to be padded to 64MB, etc etc, you can google the instructions in the > > Linaro and Fedora wikis.)
I tried following this guide on Linaro's website https://wiki.linaro.org/LEG/UEFIforQEMU I built qemu-system-aarch64 myself using qemu-2.4 since it cannot be installed using apt-get on Ubuntu-14.04. I managed to get to the boot phase with the message "the default boot selection will start in 3 seconds" But when I press enter to get to the boot menu (or even if don't press anything) I get: ASSERT_EFI_ERROR (Status = Not Found) ASSERT /home/yehuday/projects/uefi/linaro-edk2/ArmPlatformPkg/Bds/BootMenu.c(1014): !EFI_ERROR (Status) Which seems like the bootMenu package is somehow missing or misconfigured I got a few other error messages. Not sure they are related: - InstallProtocolInterface: 09576E91-6D3F-11D2-8E39-00A0C969723B 7B8F2858 VirtioMmioInit: Warning: The VendorId (0x554D4551) does not match the VirtIo VendorId (0x1AF4). - ValidateFvHeader: No Firmware Volume header present NorFlashFvbInitialize: ERROR - The FVB Header is not valid. Installing a correct one for this volume. I followed the steps on linaro's page one by one except I used my own build of qemu. Did I miss any step in the way ? Thanks Yehuda > > > > Thanks > > Laszlo > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel