2
votes

I am trying to Cross compile library bcm2835-1.42 for my raspberry pi board in Ubuntu. Download library and cross compiled using following commands:

wget http: www.airspayce.com/mikem/bcm2835/bcm2835-1.42.tar.gz

tar -xvf bcm2835-1.42.tar.gz

cd bcm2835-1.42

./configure -host=arm -prefix=$(DEVELROOT) CC=arm-linux-gnueabihf-gcc-4.8 ar=arm-linux-gnueabihf-ar-4.8

make

when i have make sources code i stuck with following error message.

/tmp/ccxDzazg.s: Assembler messages:

/tmp/ccxDzazg.s:299: Error: invalid barrier type -- dmb ldr r0,[r0] dmb' /tmp/ccxDzazg.s:365: Error: invalid barrier type --dmb str r1,[r0] dmb' /tmp/ccxDzazg.s:453: Error: invalid barrier type -- dmb ldr r0,[r0] dmb' /tmp/ccxDzazg.s:480: Error: invalid barrier type --dmb str r1,[r6] dmb' /tmp/ccxDzazg.s:644: Error: invalid barrier type -- dmb str r1,[r0] dmb' /tmp/ccxDzazg.s:731: Error: invalid barrier type --dmb str r1,[r0] dmb' /tmp/ccxDzazg.s:807: Error: invalid barrier type -- dmb str r1,[r0] dmb' /tmp/ccxDzazg.s:868: Error: invalid barrier type --dmb str r1,[r0] dmb'

2

2 Answers

1
votes

Solve, It would work fine with bcm2835-1.44 library.

0
votes

If you don't have to use the bcm2835-1.42 library, this post on the Raspberry Pi forum suggests using QEMU with the following steps:

  • With the SD card connected to the host machine, execute sudo fdisk -l and find the disk that matches your SD card size
  • Mount the SD card with sudo mount /dev/XXXX /mnt(XXXX being the indentifier representing your SD card)
  • Execute sudo apt-get install qemu qemu-user qemu-user-static to install qemu
  • Copy over the file for the emulating to the SD card with sudo cp /usr/bin/qemu-arm-static /mnt/usr/bin
  • Chroot into the Pi file system sudo chroot /mnt
  • You should now be prompted with a new command line, check it has worked with root:/# gcc -v
  • Navigate to the project you want to compile and run the Makefile or gcc or ARM build tool you need and it will start building
  • When you're done, type this in to exit the chroot exit
  • Then unmount the device sudo unmount /dev/sdc2