Wind River Support Network

HomeDefectsLIN6-7242
Fixed

LIN6-7242 : Compile grub-efi with atom64 toolchain failed

Created: Apr 28, 2014    Updated: Dec 3, 2018
Resolved Date: Oct 14, 2014
Previous ID: LIN5-18617
Found In Version: 6.0
Fix Version: 6.0.0.13
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Toolchain

Description

When I tried to compile grub-efi for intel-atom-baytrail-64,  I met a error as the following:


| atom64-wrswrap-linux-gnu-objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
|                    -j .rela -j .reloc --target=efi-app-x86_64 grub.so grub.efi
| /build-baytrail-64/bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/toolchain/i686-wrs-linux-gnu-objcopy:grub.so: Invalid bfd target
| make[2]: *** [grub.efi] Error 1


It seems the --target=efi-app-x86-64 is not supported.  Is this a toolchain issue?
In intel-atom-baytrail,  this is -target=efi-app-ia32, there is no problem.

I have tried to change the target to elf64-X86-64",  we could get the grub-efi binary file,  but it could not recognized and loaded by UEFI.

Workaround

| atom64-wrswrap-linux-gnu-objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
|                    -j .rela -j .reloc --target=efi-app-x86_64 grub.so grub.efi

Failed, but with: 

objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc --target=efi-app-x86_64 grub.so grub.efi

It's OK. My objcopy is provided by Ubuntu 10.04:

localhost @ /project$ objcopy --version
GNU objcopy (GNU Binutils for Ubuntu) 2.20.1-system.20100303
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.


localhost @ /project$ dpkg -l binutils
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                  Version                               Description
+++-=====================================-=====================================-==========================================================================================
ii  binutils                              2.20.1-3ubuntu5                       The GNU assembler, linker and binary utilities

Other Downloads


Live chat
Online