From owner-freebsd-arm@FreeBSD.ORG Mon Mar 16 00:35:47 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A67A7CB for ; Mon, 16 Mar 2015 00:35:47 +0000 (UTC) Received: from mail-qc0-f172.google.com (mail-qc0-f172.google.com [209.85.216.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3B9CFE54 for ; Mon, 16 Mar 2015 00:35:46 +0000 (UTC) Received: by qcaz10 with SMTP id z10so31387170qca.1 for ; Sun, 15 Mar 2015 17:35:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=y6RJi5KsipL1Sb6lOHyFRTAE1a9E4fVzpEWmSlFt9EI=; b=lKWvjtlmSy1xL5qN0QYZxy84riiP8IA9RUGoSzQu4245XPvt7dveKnwyl+kac0hsf8 akHmtbbwL3rmv+1R0mk15MJcT45GFWd7PdrFB+Yta/ypCrZJoSsEjvqMSaGMZS7Cq8se NX0h/Cx2GKoAWApJ6umIlbPhdvIQPFQFekt9qb8QXfWexUQ8tOS7y7WvXZh5PdBg34cx Bs9n6MWKsH6yip2ILRpjHyeHNf9IE5CQRVcRA0FMpEsEgBUMYC+MSJE1x4rZN3ryNlwT krRX6xKrmdLonkQxJNtU3YBjgrumVIfOCKRGG1O2ua1TROpczMXw1Cie5dQcsJzAp7/2 Dsbw== X-Gm-Message-State: ALoCoQkqJuizwK0QxzmiDrGJrFC8vRMVS68F2Ao4sf0ARASwb8YbroGhHfXQk1olKCbbKZ3k5zZj X-Received: by 10.55.23.6 with SMTP id i6mr62629908qkh.39.1426466139920; Sun, 15 Mar 2015 17:35:39 -0700 (PDT) Received: from [172.26.26.1] (ip69-17-247-231.vif.net. [69.17.247.231]) by mx.google.com with ESMTPSA id s7sm6465802qgd.4.2015.03.15.17.35.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2015 17:35:39 -0700 (PDT) Message-ID: <55062566.1020908@ambient-md.com> Date: Sun, 15 Mar 2015 20:35:50 -0400 From: Peter Garshtja User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Russell Haley Subject: Re: Building Cross Compiler and u-boot References: <5505CD50.2050503@ambient-md.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-arm , Ian Lepore X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2015 00:35:47 -0000 Can you check u-boot on git ? here is tutorial that i use for my Pi |30) pkg install git 31) pkg install devel/subversion 32) pkg install python 33) pkg install devel/gmake 34) pkg install textproc/gsed 35) git clone git://github.com/kientzle/crochet-freebsd.git /root/crochet 36) git clone git://github.com/gonzoua/u-boot-pi.git /root/crochet/u-boot-rpi 37) svn checkout https://svn0.us-west.freebsd.org/base/head /usr/src -r 273702 38) cd /usr/src && make XDEV=arm XDEV_ARCH=armv6 WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG=1 WITHOUT_CLANG_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 xdev xdev-links As you can see i use ||github.com/gonzoua/u-boot-pi.git| , perhaps on git you can find uboot for your board Regards, Peter On 3/15/2015 7:04 PM, Russell Haley wrote: > Ha ha, jokes on me. One of the Crochet scripts checks for xdev tools: > > root@Jailbird:/usr/crochet# ./crochet.sh -b CoreConnect-WMX53 > Starting at Sun Mar 15 15:14:33 PDT 2015 > Board: CoreConnect-WMX53 > Source version is: r279684 > Building FreeBSD version: 11.0 > Image name is: > /usr/crochet/work/FreeBSD-armv6-11.0-DIGI-CCWMX53-r279684.img > Building FreeBSD version: 11.0 > Object files are at: /usr/crochet/work/obj/arm.armv6/usr/src > Found suitable FreeBSD source tree in: > /usr/src > Can't find appropriate FreeBSD xdev tools. > Tested: /usr/armv6-freebsd/usr/bin/cc > If you have FreeBSD-CURRENT sources in /usr/src, you can build these > with the following command: > > cd /usr/src && sudo make XDEV=arm XDEV_ARCH=armv6 WITH_GCC=1 > WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG=1 WITHOUT_CLANG_BOOTSTRAP=1 > WITHOUT_CLANG_IS_CC=1 WITHOUT_TESTS=1 xdev > > Run this script again after you have the xdev tools installed. > > ******************* > Which fails with the same "Dwarf error" I am getting from other xdev attempts. > > Oh, my poor little brain. > Russ > > On Sun, Mar 15, 2015 at 12:25 PM, Russell Haley wrote: >> Peter, >> >> Sorry, I was attacked by a wild kid who managed to send my unfinished email... >> >> Here is the error I get when I run your command from head: >> make XDEV=arm XDEV_ARCH=armv6 WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 >> WITHOUT_CLANG=1 WITHOUT_CLANG_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 xdev >> xdev-links >> >> cc -O2 -pipe -I/usr/src/usr.bin/nm/../../contrib/elftoolchain/libelftc >> -I/usr/src/usr.bin/nm/../../contrib/elftoolchain/common -std=gnu99 >> -fstack-protector -Qunused-arguments -c >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:920:34: error: >> unknown type name 'Dwarf_Block' >> get_block_value(Dwarf_Debug dbg, Dwarf_Block *block) >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:926:6: warning: >> implicit declaration of function 'dwarf_get_elf' >> is invalid in C99 [-Wimplicit-function-declaration] >> if (dwarf_get_elf(dbg, &elf, &de) != DW_DLV_OK) { >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:927:50: error: >> passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') >> to parameter of incompatible type 'Dwarf_Error *' (aka 'struct >> _Dwarf_Error *'); take the address with & >> warnx("dwarf_get_elf failed: %s", dwarf_errmsg(de)); >> ^~ >> & >> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >> const char *dwarf_errmsg(Dwarf_Error *); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:959:2: error: >> use of undeclared identifier 'Dwarf_Block' >> Dwarf_Block *block; >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:959:15: error: >> use of undeclared identifier 'block' >> Dwarf_Block *block; >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:969:46: error: >> passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') >> to parameter of incompatible type 'Dwarf_Error *' (aka 'struct >> _Dwarf_Error *'); take the address with & >> warnx("dwarf_tag failed: %s", dwarf_errmsg(de)); >> ^~ >> & >> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >> const char *dwarf_errmsg(Dwarf_Error *); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1028:7: >> warning: implicit declaration of function >> 'dwarf_formblock' is invalid in C99 [-Wimplicit-function-declaration] >> dwarf_formblock(at, &block, &de) == DW_DLV_OK) { >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1028:28: error: >> use of undeclared identifier 'block' >> dwarf_formblock(at, &block, &de) == DW_DLV_OK) { >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1034:21: error: >> use of undeclared identifier 'block' >> if (*((uint8_t *)block->bl_data) == DW_OP_addr) >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1035:38: error: >> use of undeclared identifier 'block' >> var->addr = get_block_value(dbg, block); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1093:13: error: >> use of undeclared identifier 'DW_DLV_ERROR' >> if (ret == DW_DLV_ERROR) >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1094:41: error: >> passing 'Dwarf_Error' >> (aka 'struct _Dwarf_Error') to parameter of incompatible type >> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >> the address with & >> warnx("dwarf_child: %s", dwarf_errmsg(de)); >> ^~ >> & >> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >> const char *dwarf_errmsg(Dwarf_Error *); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1101:13: error: >> use of undeclared identifier 'DW_DLV_ERROR' >> if (ret == DW_DLV_ERROR) >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1102:45: error: >> passing 'Dwarf_Error' >> (aka 'struct _Dwarf_Error') to parameter of incompatible type >> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >> the address with & >> warnx("dwarf_siblingof: %s", dwarf_errmsg(de)); >> ^~ >> & >> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >> const char *dwarf_errmsg(Dwarf_Error *); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1107:26: error: >> use of undeclared identifier 'DW_DLA_DIE' >> dwarf_dealloc(dbg, die, DW_DLA_DIE); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1282:51: error: >> too many arguments to function call, expected 4, >> have 6 >> if (dwarf_elf_init(elf, DW_DLC_READ, NULL, NULL, &dbg, &de) != >> ~~~~~~~~~~~~~~ ^~~~~~~~~ >> /usr/include/libdwarf.h:139:1: note: 'dwarf_elf_init' declared here >> int dwarf_elf_init(Elf *, int, Dwarf_Debug *, Dwarf_Error *); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1284:51: error: >> passing 'Dwarf_Error' >> (aka 'struct _Dwarf_Error') to parameter of incompatible type >> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >> the address with & >> warnx("dwarf_elf_init failed: %s", dwarf_errmsg(de)); >> ^~ >> & >> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >> const char *dwarf_errmsg(Dwarf_Error *); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1293:23: >> warning: incompatible pointer types passing >> 'Dwarf_Debug' (aka 'struct _Dwarf_Debug *') to parameter of type >> 'Dwarf_Debug *' (aka 'struct _Dwarf_Debug **'); >> take the address with & [-Wincompatible-pointer-types] >> (void) dwarf_finish(dbg, &de); >> ^~~ >> & >> /usr/include/libdwarf.h:141:32: note: passing argument to parameter here >> int dwarf_finish(Dwarf_Debug *, Dwarf_Error *); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1306:22: error: >> passing 'Dwarf_Error' >> (aka 'struct _Dwarf_Error') to parameter of incompatible type >> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >> the address with & >> dwarf_errmsg(de)); >> ^~ >> & >> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >> const char *dwarf_errmsg(Dwarf_Error *); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1319:9: >> warning: implicit declaration of function >> 'dwarf_srcfiles' is invalid in C99 [-Wimplicit-function-declaration] >> ret = dwarf_srcfiles(die, &src_files, &filecount, &de); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1320:14: error: >> use of undeclared identifier 'DW_DLV_ERROR' >> if (ret == DW_DLV_ERROR) >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1321:45: error: >> passing 'Dwarf_Error' >> (aka 'struct _Dwarf_Error') to parameter of incompatible type >> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >> the address with & >> warnx("dwarf_srclines: %s", dwarf_errmsg(de)); >> ^~ >> & >> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >> const char *dwarf_errmsg(Dwarf_Error *); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1329:9: >> warning: implicit declaration of function >> 'dwarf_srclines' is invalid in C99 [-Wimplicit-function-declaration] >> ret = dwarf_srclines(die, &lbuf, &lcount, &de); >> ^ >> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1330:14: error: >> use of undeclared identifier 'DW_DLV_ERROR' >> if (ret == DW_DLV_ERROR) >> ^ >> fatal error: too many errors emitted, stopping now [-ferror-limit=] >> 5 warnings and 20 errors generated. >> *** Error code 1 >> >> Stop. >> make[2]: stopped in /usr/src/usr.bin/nm >> *** Error code 1 >> >> Stop. >> make[1]: stopped in /usr/src >> *** Error code 1 >> >> Stop. >> make: stopped in /usr/src >> >> >> As per Ian's last comment about xdev being dead, I will instead move >> forward with his suggested remedy from pkgng. I looked into crochet >> and was impressed with what I saw. I forked and will look at adding >> the CoreConnect board. >> >> Thanks, >> >> Russ >> >> On Sun, Mar 15, 2015 at 12:00 PM, Russell Haley wrote: >>> Hi Peter, >>> >>> This is the error I get when running your command for head: >>> >>> cc -O2 -pipe -I/usr/src/usr.bin/nm/../../contrib/elftoolchain/libelftc >>> -I/usr/src/usr.bin/nm/../../contrib/elftoolchain/common -std=gnu99 >>> -fstack-protector -Qunused-arguments -c >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:920:34: error: >>> unknown type name 'Dwarf_Block' >>> get_block_value(Dwarf_Debug dbg, Dwarf_Block *block) >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:926:6: warning: >>> implicit declaration of function 'dwarf_get_elf' >>> is invalid in C99 [-Wimplicit-function-declaration] >>> if (dwarf_get_elf(dbg, &elf, &de) != DW_DLV_OK) { >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:927:50: error: >>> passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') >>> to parameter of incompatible type 'Dwarf_Error *' (aka 'struct >>> _Dwarf_Error *'); take the address with & >>> warnx("dwarf_get_elf failed: %s", dwarf_errmsg(de)); >>> ^~ >>> & >>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>> const char *dwarf_errmsg(Dwarf_Error *); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:959:2: error: >>> use of undeclared identifier 'Dwarf_Block' >>> Dwarf_Block *block; >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:959:15: error: >>> use of undeclared identifier 'block' >>> Dwarf_Block *block; >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:969:46: error: >>> passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') >>> to parameter of incompatible type 'Dwarf_Error *' (aka 'struct >>> _Dwarf_Error *'); take the address with & >>> warnx("dwarf_tag failed: %s", dwarf_errmsg(de)); >>> ^~ >>> & >>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>> const char *dwarf_errmsg(Dwarf_Error *); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1028:7: >>> warning: implicit declaration of function >>> 'dwarf_formblock' is invalid in C99 [-Wimplicit-function-declaration] >>> dwarf_formblock(at, &block, &de) == DW_DLV_OK) { >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1028:28: error: >>> use of undeclared identifier 'block' >>> dwarf_formblock(at, &block, &de) == DW_DLV_OK) { >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1034:21: error: >>> use of undeclared identifier 'block' >>> if (*((uint8_t *)block->bl_data) == DW_OP_addr) >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1035:38: error: >>> use of undeclared identifier 'block' >>> var->addr = get_block_value(dbg, block); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1093:13: error: >>> use of undeclared identifier 'DW_DLV_ERROR' >>> if (ret == DW_DLV_ERROR) >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1094:41: error: >>> passing 'Dwarf_Error' >>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>> the address with & >>> warnx("dwarf_child: %s", dwarf_errmsg(de)); >>> ^~ >>> & >>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>> const char *dwarf_errmsg(Dwarf_Error *); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1101:13: error: >>> use of undeclared identifier 'DW_DLV_ERROR' >>> if (ret == DW_DLV_ERROR) >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1102:45: error: >>> passing 'Dwarf_Error' >>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>> the address with & >>> warnx("dwarf_siblingof: %s", dwarf_errmsg(de)); >>> ^~ >>> & >>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>> const char *dwarf_errmsg(Dwarf_Error *); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1107:26: error: >>> use of undeclared identifier 'DW_DLA_DIE' >>> dwarf_dealloc(dbg, die, DW_DLA_DIE); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1282:51: error: >>> too many arguments to function call, expected 4, >>> have 6 >>> if (dwarf_elf_init(elf, DW_DLC_READ, NULL, NULL, &dbg, &de) != >>> ~~~~~~~~~~~~~~ ^~~~~~~~~ >>> /usr/include/libdwarf.h:139:1: note: 'dwarf_elf_init' declared here >>> int dwarf_elf_init(Elf *, int, Dwarf_Debug *, Dwarf_Error *); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1284:51: error: >>> passing 'Dwarf_Error' >>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>> the address with & >>> warnx("dwarf_elf_init failed: %s", dwarf_errmsg(de)); >>> ^~ >>> & >>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>> const char *dwarf_errmsg(Dwarf_Error *); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1293:23: >>> warning: incompatible pointer types passing >>> 'Dwarf_Debug' (aka 'struct _Dwarf_Debug *') to parameter of type >>> 'Dwarf_Debug *' (aka 'struct _Dwarf_Debug **'); >>> take the address with & [-Wincompatible-pointer-types] >>> (void) dwarf_finish(dbg, &de); >>> ^~~ >>> & >>> /usr/include/libdwarf.h:141:32: note: passing argument to parameter here >>> int dwarf_finish(Dwarf_Debug *, Dwarf_Error *); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1306:22: error: >>> passing 'Dwarf_Error' >>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>> the address with & >>> dwarf_errmsg(de)); >>> ^~ >>> & >>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>> const char *dwarf_errmsg(Dwarf_Error *); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1319:9: >>> warning: implicit declaration of function >>> 'dwarf_srcfiles' is invalid in C99 [-Wimplicit-function-declaration] >>> ret = dwarf_srcfiles(die, &src_files, &filecount, &de); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1320:14: error: >>> use of undeclared identifier 'DW_DLV_ERROR' >>> if (ret == DW_DLV_ERROR) >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1321:45: error: >>> passing 'Dwarf_Error' >>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>> the address with & >>> warnx("dwarf_srclines: %s", dwarf_errmsg(de)); >>> ^~ >>> & >>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>> const char *dwarf_errmsg(Dwarf_Error *); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1329:9: >>> warning: implicit declaration of function >>> 'dwarf_srclines' is invalid in C99 [-Wimplicit-function-declaration] >>> ret = dwarf_srclines(die, &lbuf, &lcount, &de); >>> ^ >>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1330:14: error: >>> use of undeclared identifier 'DW_DLV_ERROR' >>> if (ret == DW_DLV_ERROR) >>> ^ >>> fatal error: too many errors emitted, stopping now [-ferror-limit=] >>> 5 warnings and 20 errors generated. >>> *** Error code 1 >>> >>> Stop. >>> make[2]: stopped in /usr/src/usr.bin/nm >>> *** Error code 1 >>> >>> Stop. >>> make[1]: stopped in /usr/src >>> *** Error code 1 >>> >>> Stop. >>> make: stopped in /usr/src >>> >>> On Sun, Mar 15, 2015 at 11:20 AM, Peter Garshtja >>> wrote: >>>> here is gcc cross compiler >>>> >>>> FreeBSD 10.X >>>> >>>> make XDEV=arm XDEV_ARCH=armv6 WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 >>>> WITHOUT_CLANG=1 WITHOUT_CLANG_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 xdev >>>> >>>> FreeBSD HEAD >>>> >>>> make XDEV=arm XDEV_ARCH=armv6 WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 >>>> WITHOUT_CLANG=1 WITHOUT_CLANG_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 xdev >>>> xdev-links >>>> >>>> Regards, >>>> Peter >>>> >>>> >>>> On 3/15/2015 7:48 AM, peter garshtja wrote: >>>> >>>> Hi, >>>> >>>> You need GCC compiler for u-boot. >>>> >>>> I will send you later the make command that will build GCC cross compiler >>>> >>>> On Sunday, March 15, 2015, Russell Haley wrote: >>>>> Hello I am trying to build the cross compile tools and make u-boot. >>>>> >>>>> Tim Kientzle spoke about two ways of getting cross compilers for >>>>> outside of building FreeBDS: >>>>> >>>>> 1) make TARGET=arm TARGET_ARCH=armv6 buildenv >>>>> >>>>> after a successful buildworld >>>>> >>>>> 2)make xdev XDEV=arm XDEV_ARCH=armv6 >>>>> >>>>> I have struggled (and failed) to make either work. I checked out Rui >>>>> Paulos uboot fork to /usr/uboot. >>>>> >>>>> >>>>> 1)Using buildenv -> >>>>> >>>>> Jailbird:/usr/src$ make TARGET=arm TARGET_ARCH=armv6 buildenv >>>>> Entering world for armv6:arm >>>>> # cd ../uboot/ >>>>> # PATH=$PATH:/usr/local/bin export PATH EDITOR >>>>> # gmake SED=gsed HOSTCC=cc CROSS_COMPILE=armv6-freebsd- ccwmx53js_config >>>>> gmake[2]: Entering directory '/usr/uboot' >>>>> armv6-freebsd-gcc: not found >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> Generating include/autoconf.mk >>>>> armv6-freebsd-gcc: not found >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> Generating include/autoconf.mk.dep >>>>> armv6-freebsd-gcc: not found >>>>> armv6-freebsd-gcc: not found >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> Configuring a wireless module >>>>> Configuring for ccwmx53 board... >>>>> gmake[2]: Leaving directory '/usr/uboot' >>>>> # >>>>> >>>>> >>>>> 2)Using xdev-> >>>>> >>>>> Jailbird:/usr/src$ make xdev XDEV=arm XDEV_ARCH=arm >>>>> >>>>> I also failed to "make xdev XDEV=arm XDEV_ARCH=armv6" but didn't >>>>> capture text. Here is the last output I have captured: >>>>> >>>>> CC='cc ' mkdep -f .depend -a >>>>> -I/usr/src/usr.bin/nm/../../contrib/elftoolchain/libelftc >>>>> -I/usr/src/usr.bin/nm/../../contrib/elftoolchain/common -std=gnu99 >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c >>>>> echo nm: /usr/lib/libc.a /usr/lib/libdwarf.a >>>>> /usr/obj/arm.armv6/arm-freebsd/usr/src/lib/libelftc/libelftc.a >>>>> /usr/lib/libelf.a >> .depend >>>>> cc -O -pipe -mfloat-abi=softfp >>>>> -I/usr/src/usr.bin/nm/../../contrib/elftoolchain/libelftc >>>>> -I/usr/src/usr.bin/nm/../../contrib/elftoolchain/common -std=gnu99 >>>>> -Qunused-arguments -c >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:920:34: error: >>>>> unknown type name 'Dwarf_Block' >>>>> get_block_value(Dwarf_Debug dbg, Dwarf_Block *block) >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:926:6: warning: >>>>> implicit declaration of function 'dwarf_get_elf' >>>>> is invalid in C99 [-Wimplicit-function-declaration] >>>>> if (dwarf_get_elf(dbg, &elf, &de) != DW_DLV_OK) { >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:927:50: error: >>>>> passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') >>>>> to parameter of incompatible type 'Dwarf_Error *' (aka 'struct >>>>> _Dwarf_Error *'); take the address with & >>>>> warnx("dwarf_get_elf failed: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:959:2: error: >>>>> use of undeclared identifier 'Dwarf_Block' >>>>> Dwarf_Block *block; >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:959:15: error: >>>>> use of undeclared identifier 'block' >>>>> Dwarf_Block *block; >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:969:46: error: >>>>> passing 'Dwarf_Error' (aka 'struct _Dwarf_Error') >>>>> to parameter of incompatible type 'Dwarf_Error *' (aka 'struct >>>>> _Dwarf_Error *'); take the address with & >>>>> warnx("dwarf_tag failed: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1028:7: >>>>> warning: implicit declaration of function >>>>> 'dwarf_formblock' is invalid in C99 >>>>> [-Wimplicit-function-declaration] >>>>> dwarf_formblock(at, &block, &de) == DW_DLV_OK) { >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1028:28: error: >>>>> use of undeclared identifier 'block' >>>>> dwarf_formblock(at, &block, &de) == DW_DLV_OK) { >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1034:21: error: >>>>> use of undeclared identifier 'block' >>>>> if (*((uint8_t *)block->bl_data) == DW_OP_addr) >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1035:38: error: >>>>> use of undeclared identifier 'block' >>>>> var->addr = get_block_value(dbg, block); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1093:13: error: >>>>> use of undeclared identifier 'DW_DLV_ERROR' >>>>> if (ret == DW_DLV_ERROR) >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1094:41: error: >>>>> passing 'Dwarf_Error' >>>>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>>>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>>> the address with & >>>>> warnx("dwarf_child: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1101:13: error: >>>>> use of undeclared identifier 'DW_DLV_ERROR' >>>>> if (ret == DW_DLV_ERROR) >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1102:45: error: >>>>> passing 'Dwarf_Error' >>>>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>>>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>>> the address with & >>>>> warnx("dwarf_siblingof: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1107:26: error: >>>>> use of undeclared identifier 'DW_DLA_DIE' >>>>> dwarf_dealloc(dbg, die, DW_DLA_DIE); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1282:51: error: >>>>> too many arguments to function call, expected 4, >>>>> have 6 >>>>> if (dwarf_elf_init(elf, DW_DLC_READ, NULL, NULL, &dbg, &de) != >>>>> ~~~~~~~~~~~~~~ ^~~~~~~~~ >>>>> /usr/include/libdwarf.h:139:1: note: 'dwarf_elf_init' declared here >>>>> int dwarf_elf_init(Elf *, int, Dwarf_Debug *, Dwarf_Error *); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1284:51: error: >>>>> passing 'Dwarf_Error' >>>>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>>>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>>> the address with & >>>>> warnx("dwarf_elf_init failed: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1293:23: >>>>> warning: incompatible pointer types passing >>>>> 'Dwarf_Debug' (aka 'struct _Dwarf_Debug *') to parameter of type >>>>> 'Dwarf_Debug *' (aka 'struct _Dwarf_Debug **'); >>>>> take the address with & [-Wincompatible-pointer-types] >>>>> (void) dwarf_finish(dbg, &de); >>>>> ^~~ >>>>> & >>>>> /usr/include/libdwarf.h:141:32: note: passing argument to parameter here >>>>> int dwarf_finish(Dwarf_Debug *, Dwarf_Error *); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1306:22: error: >>>>> passing 'Dwarf_Error' >>>>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>>>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>>> the address with & >>>>> dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1319:9: >>>>> warning: implicit declaration of function >>>>> 'dwarf_srcfiles' is invalid in C99 [-Wimplicit-function-declaration] >>>>> ret = dwarf_srcfiles(die, &src_files, &filecount, &de); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1320:14: error: >>>>> use of undeclared identifier 'DW_DLV_ERROR' >>>>> if (ret == DW_DLV_ERROR) >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1321:45: error: >>>>> passing 'Dwarf_Error' >>>>> (aka 'struct _Dwarf_Error') to parameter of incompatible type >>>>> 'Dwarf_Error *' (aka 'struct _Dwarf_Error *'); take >>>>> the address with & >>>>> warnx("dwarf_srclines: %s", dwarf_errmsg(de)); >>>>> ^~ >>>>> & >>>>> /usr/include/libdwarf.h:122:39: note: passing argument to parameter here >>>>> const char *dwarf_errmsg(Dwarf_Error *); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1329:9: >>>>> warning: implicit declaration of function >>>>> 'dwarf_srclines' is invalid in C99 [-Wimplicit-function-declaration] >>>>> ret = dwarf_srclines(die, &lbuf, &lcount, &de); >>>>> ^ >>>>> /usr/src/usr.bin/nm/../../contrib/elftoolchain/nm/nm.c:1330:14: error: >>>>> use of undeclared identifier 'DW_DLV_ERROR' >>>>> if (ret == DW_DLV_ERROR) >>>>> ^ >>>>> fatal error: too many errors emitted, stopping now [-ferror-limit=] >>>>> 5 warnings and 20 errors generated. >>>>> *** Error code 1 >>>>> >>>>> Stop. >>>>> make[4]: stopped in /usr/src/usr.bin/nm >>>>> *** Error code 1 >>>>> >>>>> Stop. >>>>> make[3]: stopped in /usr/src >>>>> *** Error code 1 >>>>> >>>>> Stop. >>>>> make[2]: stopped in /usr/src >>>>> >>>>> >>>>> >>>>> My attempt to build Rui Paulos u-boot repository: >>>>> >>>>> >>>>> #gmake SED=gsed HOSTCC=cc CROSS_COMPILE=armv6-freebsd- ccwmx53js_config >>>>> >>>>> armv6-freebsd-gcc: not found >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> Generating include/autoconf.mk >>>>> armv6-freebsd-gcc: not found >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> Generating include/autoconf.mk.dep >>>>> armv6-freebsd-gcc: not found >>>>> armv6-freebsd-gcc: not found >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> for dir in tools examples/standalone examples/api ; do gmake -C $dir >>>>> _depend ; done >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> gmake[1]: Entering directory '/usr/uboot/tools' >>>>> gmake[1]: gcc: Command not found >>>>> gmake[1]: armv6-freebsd-gcc: Command not found >>>>> gmake[1]: Nothing to be done for '_depend'. >>>>> gmake[1]: Leaving directory '/usr/uboot/tools' >>>>> gmake[1]: Entering directory '/usr/uboot/examples/standalone' >>>>> gmake[1]: armv6-freebsd-gcc: Command not found >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> gmake[1]: Nothing to be done for '_depend'. >>>>> gmake[1]: Leaving directory '/usr/uboot/examples/standalone' >>>>> gmake[1]: Entering directory '/usr/uboot/examples/api' >>>>> gmake[1]: armv6-freebsd-gcc: Command not found >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> gmake[1]: Nothing to be done for '_depend'. >>>>> gmake[1]: Leaving directory '/usr/uboot/examples/api' >>>>> gmake -C tools all >>>>> armv6-freebsd-gcc: not found >>>>> usage: dirname string [...] >>>>> gmake[1]: Entering directory '/usr/uboot/tools' >>>>> gmake[1]: gcc: Command not found >>>>> gmake[1]: armv6-freebsd-gcc: Command not found >>>>> gcc -g -Wall -idirafter /usr/uboot/include -idirafter >>>>> /usr/uboot/include2 -idirafter /usr/uboot/include -I /usr/uboot/libfdt >>>>> -I /usr/uboot/tools -DTEXT_BASE=0x97800000 -DUSE_HOSTCC >>>>> -D__KERNEL_STRICT_NAMES -O -c -o mkimage.o /usr/uboot/tools/mkimage.c >>>>> gmake[1]: gcc: Command not found >>>>> Makefile:218: recipe for target 'mkimage.o' failed >>>>> gmake[1]: *** [mkimage.o] Error 127 >>>>> gmake[1]: Leaving directory '/usr/uboot/tools' >>>>> Makefile:402: recipe for target 'tools' failed >>>>> gmake: *** [tools] Error 2 >>>>> >>>>> >>>>> >>>>> Thanks, >>>>> Russ >>>>> _______________________________________________ >>>>> freebsd-arm@freebsd.org mailing list >>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-arm >>>>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >>>>> >>>>