[Bug 220877] embedfs throw compile error on aarch64(arm64)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jul 20 08:28:37 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220877

            Bug ID: 220877
           Summary: embedfs throw compile error on aarch64(arm64)
           Product: Base System
           Version: CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: freebsd-arm at FreeBSD.org
          Reporter: wheelcomplex at gmail.com

Compiling aarch64 kernel for raspberry pi 3 with following configure:

options         MD_ROOT
makeoptions     MFS_IMAGE=/usr/src/sys/arm64/conf/initrd.img

Throw error:

# --- embedfs_initrd.o --- 
# objcopy --input-target binary  --output-target   --binary-architecture
aarch64  /usr/src/sys/arm64/conf/initrd.img embedfs_initrd.o
# objcopy: --binary-architecture: invalid target name
# *** [embedfs_initrd.o] Error code 1

As we can see, command 'objcopy' missed one arg after --output-target.
The correct command line should be 'objcopy --input-target binary 
--output-target elf64-littleaarch64 --binary-architecture aarch64 
/usr/src/sys/arm64/conf/initrd.img embedfs_initrd.o'.

This small patch will fix the issue. It works for me.

---- cut here ---
--- /home/david/sandspace/private-freebsd/sys/conf/kern.pre.mk.orig
+++ /home/david/sandspace/private-freebsd/sys/conf/kern.pre.mk
@@ -250,6 +250,7 @@

 EMBEDFS_FORMAT.arm?=           elf32-littlearm
 EMBEDFS_FORMAT.armv6?=         elf32-littlearm
+EMBEDFS_FORMAT.aarch64?=       elf64-littleaarch64
 EMBEDFS_FORMAT.mips?=          elf32-tradbigmips
 EMBEDFS_FORMAT.mipsel?=                elf32-tradlittlemips
 EMBEDFS_FORMAT.mips64?=                elf64-tradbigmips
---- cut here ---

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-arm mailing list