From owner-freebsd-arm@FreeBSD.ORG Sun Sep 29 08:27:10 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 25697E33 for ; Sun, 29 Sep 2013 08:27:10 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 06E002BBD for ; Sun, 29 Sep 2013 08:27:09 +0000 (UTC) Received: from bender (unknown [78.133.116.236]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id 2523F5DFFE; Sun, 29 Sep 2013 08:27:02 +0000 (UTC) Date: Sun, 29 Sep 2013 10:26:51 +0200 From: Andrew Turner To: Berislav Purgar Subject: Re: avila boot2 problem ? Message-ID: <20130929102651.15b203ff@bender> In-Reply-To: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/ak/kjF/WognxGc3Gb7sb4B6" Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Sep 2013 08:27:10 -0000 --MP_/ak/kjF/WognxGc3Gb7sb4B6 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sat, 28 Sep 2013 18:48:32 +0200 Berislav Purgar wrote: > Hello .. i have tryed to build boot2 for avila GW2345 board but i got > err from LD > about missing __aeabi_llsl from boot2.o ? > > freebsd -HEAD ... i have build buildworld and buildenv .. make > ixp425/boot2 runs Ok but when trying to link these object i got these > error undefined __aeabi_llsl from boot2.o .. Can you try the attached patch. It adds the required function to libkern, along with the needed unwind symbol. Andrew --MP_/ak/kjF/WognxGc3Gb7sb4B6 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=llsl_fix.diff Index: sys/boot/arm/ixp425/boot2/Makefile =================================================================== --- sys/boot/arm/ixp425/boot2/Makefile (revision 255873) +++ sys/boot/arm/ixp425/boot2/Makefile (working copy) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + # We get a lot of the std lib functions from here. .PATH: ${.CURDIR}/../../at91/libat91 @@ -15,6 +17,9 @@ SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:tl}_board.c SRCS+=memchr.c memcmp.c memcpy.c memmem.c memset.c printf.c strcmp.c strcpy.c SRCS+=strlen.c ashldi3.c divsi3.S muldi3.c +.if ${MK_ARM_EABI} != "no" +SRCS+=aeabi_unwind.c +.endif NO_MAN= KERNPHYSADDR=0x180000 Index: sys/libkern/arm/aeabi_unwind.c =================================================================== --- sys/libkern/arm/aeabi_unwind.c (revision 255873) +++ sys/libkern/arm/aeabi_unwind.c (working copy) @@ -29,7 +29,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef _KERNEL #include +#else +#define panic(x) (void)0 +#endif #ifdef __ARM_EABI__ /* We need to provide these functions never call them */ Index: sys/libkern/ashldi3.c =================================================================== --- sys/libkern/ashldi3.c (revision 255873) +++ sys/libkern/ashldi3.c (working copy) @@ -59,3 +59,13 @@ } return (aa.q); } + +#ifdef __ARM_EABI__ +long long __aeabi_llsl(long long, int); + +long long +__aeabi_llsl(long long a, int b) +{ + return __ashldi3(a, b); +} +#endif --MP_/ak/kjF/WognxGc3Gb7sb4B6--