Date: Mon, 25 Apr 2022 21:07:47 +0200 From: "Patrick M. Hausen" <pmh@hausen.com> To: "freebsd-current@freebsd.org" <freebsd-current@FreeBSD.org> Subject: Cross-compile worked, cross-install not so much ... Message-ID: <3D48BE93-7D42-4AB2-82D4-88BBF4E1FD40@hausen.com>
next in thread | raw e-mail | index | archive | help
Hi all, getting into FreeBSD ARM64 I tried to compile a current system on a fast = AMD64 VM and now I am somewhat stuck - no help using search engines and the like. 1st step: # checkout main aka 14-CURRENT cd /usr/src make -j 8 TARGET=3Darm64 TARGET_ARCH=3Daarch64 buildworld = buildkernel That worked like a charm and I seem to have a well populated = /usr/obj/usr/src/arm64.aarch64. 2nd step: I then mounted /usr/src and /usr/obj on my Raspberry Pi via NFS. The = binaries in /usr/obj are the correct architecture and run perfectly well: root@pi8:~ # file /usr/obj/usr/src/arm64.aarch64/bin/sh/sh /usr/obj/usr/src/arm64.aarch64/bin/sh/sh: ELF 64-bit LSB pie = executable, ARM aarch64, version 1 (FreeBSD), dynamically linked, = interpreter /libexec/ld-elf.so.1, for FreeBSD 14.0 (1400057), = FreeBSD-style, not stripped root@pi8:~ # /usr/obj/usr/src/arm64.aarch64/bin/sh/sh root@pi8:~ # ^D 3rd step: root@pi8:/usr/src # make TARGET=3Darm64 TARGET_ARCH=3Daarch64 = installkernel -------------------------------------------------------------- >>> Install check kernel -------------------------------------------------------------- -------------------------------------------------------------- >>> Installing kernel GENERIC on Mon Apr 25 21:03:58 CEST 2022 -------------------------------------------------------------- cd /usr/obj/usr/src/arm64.aarch64/sys/GENERIC; = MACHINE_ARCH=3Daarch64 MACHINE=3Darm64 CPUTYPE=3D CC=3D"cc -target = aarch64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/arm64.aarch64/tmp= -B/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin" CXX=3D"c++ -target = aarch64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/arm64.aarch64/tmp= -B/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin" CPP=3D"cpp -target = aarch64-unknown-freebsd14.0 --sysroot=3D/usr/obj/usr/src/arm64.aarch64/tmp= -B/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin" AS=3D"as" AR=3D"ar" = ELFCTL=3D"elfctl" LD=3D"ld" LLVM_LINK=3D"" NM=3Dnm OBJCOPY=3D"objcopy" = RANLIB=3Dranlib STRINGS=3D SIZE=3D"size" STRIPBIN=3D"strip" = PATH=3D/usr/obj/usr/src/arm64.aarch64/tmp/bin:/usr/obj/usr/src/arm64.aarch= 64/tmp/usr/sbin:/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin:/usr/obj/usr/sr= c/arm64.aarch64/tmp/legacy/usr/sbin:/usr/obj/usr/src/arm64.aarch64/tmp/leg= acy/usr/bin:/usr/obj/usr/src/arm64.aarch64/tmp/legacy/bin:/usr/obj/usr/src= /arm64.aarch64/tmp/legacy/usr/libexec::/sbin:/bin:/usr/sbin:/usr/bin = make KERNEL=3Dkernel install /bin/sh: make: Exec format error *** Error code 126 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src So via that complicated PATH setting it seems to run: = /usr/obj/usr/src/arm64.aarch64/tmp/legacy/usr/bin/make Which surprisingly is an amd64 binary: root@pi8:/usr/src # file = /usr/obj/usr/src/arm64.aarch64/tmp/legacy/usr/bin/make /usr/obj/usr/src/arm64.aarch64/tmp/legacy/usr/bin/make: ELF = 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically = linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 14.0 (1400057), = FreeBSD-style, stripped So what did I do wrong? Thanks for all help, Patrick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D48BE93-7D42-4AB2-82D4-88BBF4E1FD40>