Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jul 2017 08:28:37 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-arm@FreeBSD.org
Subject:   [Bug 220877] embedfs throw compile error on aarch64(arm64)
Message-ID:  <bug-220877-7@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220877

            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@FreeBSD.org
          Reporter: wheelcomplex@gmail.com

Compiling aarch64 kernel for raspberry pi 3 with following configure:

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

Throw error:

# --- embedfs_initrd.o ---=20
# 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=20
--output-target elf64-littleaarch64 --binary-architecture aarch64=20
/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?=3D           elf32-littlearm
 EMBEDFS_FORMAT.armv6?=3D         elf32-littlearm
+EMBEDFS_FORMAT.aarch64?=3D       elf64-littleaarch64
 EMBEDFS_FORMAT.mips?=3D          elf32-tradbigmips
 EMBEDFS_FORMAT.mipsel?=3D                elf32-tradlittlemips
 EMBEDFS_FORMAT.mips64?=3D                elf64-tradbigmips
---- cut here ---

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-220877-7>