Building Cross Compiler and u-boot

Russell Haley russ.haley at gmail.com
Thu Mar 19 06:53:42 UTC 2015


Hi Tim,

In case you care, I was able to rebuild world from within my jail as
root but just didn't realize it worked? When I do uname -a it still
returns as running 10.1-Release (which is my PCBSD version I
think???). I've come to this conclusion because I created a new jail
with the CURRENT snapshot from the FTP site, and I still get the same
result:

root at current:/usr/include # uname -a
FreeBSD current.example.org 10.1-RELEASE-p17 FreeBSD 10.1-RELEASE-p17
#0: Wed Feb 25 19:37:57 UTC 2015
root at amd64-builder.pcbsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

Is there a way to tell what my world/rootfs  (sorry, what's the
correct term?) is from within the jail?

Anyway, the Dwarf_Block error has gone and xdev is currently make as I type.

Thanks,

Russ

On Tue, Mar 17, 2015 at 12:09 AM, Russell Haley <russ.haley at gmail.com> wrote:
> I'll answer my own jails question:
>
> 15.3. Creating and Controlling Jails
> https://www.freebsd.org/doc/handbook/jails-build.html
>
> Cheers,
>
> Russ
>
> On Mon, Mar 16, 2015 at 11:54 PM, Russell Haley <russ.haley at gmail.com> wrote:
>> Okay, I have to figure out how to get current running in a jail on
>> PC-BSD. I'm going to hit their forum.
>>
>> Tim, as per "You’re trying to use the cross-compiler for the native
>> bits." Okay, this is my latest:
>>
>> root at Jailbird:/usr/uboot# gmake SED=gsed HOSTCC=cc
>> CROSS_COMPILE=arm-none-eabi- ccwmx53js_config
>> Configuring a wireless module
>> Configuring for ccwmx53 board...
>> root at Jailbird:/usr/uboot# gmake SED=gsed HOSTCC=cc CROSS_COMPILE=arm-none-eabi-
>> Generating include/autoconf.mk
>> Shared object "libmpc.so.3" not found, required by "cc1"
>> Generating include/autoconf.mk.dep
>> Shared object "libmpc.so.3" not found, required by "cc1"
>> for dir in tools examples/standalone examples/api ; do gmake -C $dir
>> _depend ; done
>> gmake[1]: Entering directory '/usr/uboot/tools'
>> 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]: Nothing to be done for '_depend'.
>> gmake[1]: Leaving directory '/usr/uboot/examples/standalone'
>> gmake[1]: Entering directory '/usr/uboot/examples/api'
>> gmake[1]: Nothing to be done for '_depend'.
>> gmake[1]: Leaving directory '/usr/uboot/examples/api'
>> gmake -C tools all
>> gmake[1]: Entering directory '/usr/uboot/tools'
>> cc -g -Wall -idirafter /usr/uboot/include -idirafter
>> /usr/uboot/include2 -idirafter /usr/uboot/include -I /usr/uboot/libfdt
>> -I /usr/uboot/tools -DTEXT_BASE=0x77800000 -DUSE_HOSTCC
>> -D__KERNEL_STRICT_NAMES -O -c -o fdt.o
>> cc: error: no input files
>> Makefile:231: recipe for target 'fdt.o' failed
>> gmake[1]: *** [fdt.o] Error 1
>> gmake[1]: Leaving directory '/usr/uboot/tools'
>> Makefile:402: recipe for target 'tools' failed
>> gmake: *** [tools] Error 2
>> root at Jailbird:/usr/uboot# ls tools/
>> .depend           easylogo          image.o           logos
>>  mkimage.o         scripts
>> Makefile          env               img2brec.sh       md5.o
>>  mpc86x_clk.c      setlocalversion
>> bddb              envcrc.c          img2srec.c        mingw_support.c
>>  ncb.c             sha1.o
>> bin2header.c      fdt_host.h        imls              mingw_support.h
>>  netconsole        ubsha1.c
>> bmp_logo.c        gdb               inca-swap-bytes.c mkimage.c
>>  os_support.c      updater
>> crc32.o           gen_eth_addr.c    jtagconsole       mkimage.h
>>  os_support.h
>> root at Jailbird:/usr/uboot#
>>
>> I know I've already said it but: oh, my poor little brain!
>>
>> Thanks guys!
>> Russ
>>
>> On Sun, Mar 15, 2015 at 10:32 PM, Russell Haley <russ.haley at gmail.com> wrote:
>>> Ah, I didn't realize my jail had to be of the same branch as I was
>>> trying to cross compile. Thank you.
>>>
>>> Russ
>>>
>>> On Sun, Mar 15, 2015 at 9:25 PM, Tim Kientzle <tim at kientzle.com> wrote:
>>>>
>>>>> On Mar 15, 2015, at 8:17 PM, Russell Haley <russ.haley at gmail.com> wrote:
>>>>>
>>>>> Tim,
>>>>>
>>>>> root at Jailbird:/usr/src# cat /usr/src/contrib/elftoolchain/nm/nm.c |
>>>>> grep "libdwarf.h"
>>>>> #include <libdwarf.h>
>>>>>
>>>>> root at Jailbird:/usr/src# ll /usr/include/libdwarf.h
>>>>> -r--r--r--  1 root  wheel  7385 Nov 11 13:03 /usr/include/libdwarf.h
>>>>>
>>>>> root at Jailbird:/usr/src# ll /usr/src/contrib/elftoolchain/libdwarf/libdwarf.h
>>>>> -rw-r--r--  1 root  wheel  33712 Mar  5 23:00
>>>>> /usr/src/contrib/elftoolchain/libdwarf/libdwarf.h
>>>>>
>>>>>
>>>>> root at Jailbird:/usr/src# cat /usr/include/libdwarf.h | grep Dwarf_Block
>>>>
>>>> Apparently, you have a broken /usr/include/libdwarf.h.  The
>>>> file on your system is from Nov 11, but a quick dig through SVN
>>>> logs shows that the Dwarf_Block declaration has been in
>>>> FreeBSD-CURRENT since at least Jan 2014.
>>>>
>>>> I suggest you try updating your build system from source.
>>>>
>>>> Cheers,
>>>>
>>>> Tim
>>>>
>>>>
>>>>
>>>>> root at Jailbird:/usr/src# cat
>>>>> /usr/src/contrib/elftoolchain/libdwarf/libdwarf.h | grep Dwarf_Block
>>>>> } Dwarf_Block;
>>>>> int             dwarf_formblock(Dwarf_Attribute, Dwarf_Block **, Dwarf_Error *);
>>>>> root at Jailbird:/usr/src#
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Russ
>>>>>
>>>>> On Sun, Mar 15, 2015 at 7:52 PM, Tim Kientzle <tim at kientzle.com> wrote:
>>>>>>
>>>>>>> On Mar 15, 2015, at 12:25 PM, Russell Haley <russ.haley at gmail.com> 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)
>>>>>>>                                ^
>>>>>>
>>>>>> On my system:
>>>>>>   /usr/src/contrib/elftoolchain/nm/nm.c includes libdwarf.h.
>>>>>>
>>>>>>  /usr/include/libdwarf.h defines Dwarf_Block
>>>>>>
>>>>>>  /usr/include/libdwarf.h is installed from /usr/src/contrib/elftoolchain/libdwarf/libdwarf.h
>>>>>>
>>>>>> Can you check those on your system?
>>>>>>
>>>>>> Tim
>>>>>>
>>>>>>
>>>>


More information about the freebsd-arm mailing list