s3c2410_boot_usb

dragilla
I'm trying to compile the s3c2410_boot_usb program on my ubuntu 11.10.
I need it to put files on my mini2440 board via usb.
I got it from here:
http://code.google.com/p/mini2440/downloads/detail?name=s3c2410_boot_usb...=

And it was referenced from here:
http://narnia.cs.ttu.edu/drupal/node/131

And the above tutorial was referenced on the wiki of this site :)

But the program is really old (2006) and it won't compile:
luke@dragilla:~/Desktop/moje/mini2440/s3c2410_boot_usb$ make
cc -lusb -o s3c2410_boot_usb boot_usb.o
boot_usb.o: In function `find_qt2410_device':
boot_usb.c:(.text+0x83): undefined reference to `usb_busses'
boot_usb.o: In function `qt2410_send_file':
boot_usb.c:(.text+0x2df): undefined reference to `usb_bulk_write'
boot_usb.o: In function `main':
boot_usb.c:(.text+0x325): undefined reference to `usb_init'
boot_usb.c:(.text+0x32a): undefined reference to `usb_find_busses'
boot_usb.c:(.text+0x33f): undefined reference to `usb_find_devices'
boot_usb.c:(.text+0x38c): undefined reference to `usb_open'
boot_usb.c:(.text+0x39f): undefined reference to `usb_strerror'
boot_usb.c:(.text+0x3d1): undefined reference to `usb_claim_interface'
boot_usb.c:(.text+0x3da): undefined reference to `usb_strerror'
collect2: ld returned 1 exit status
make: *** [s3c2410_boot_usb] Error 1

Yes, I do have libusb-dev installed.

Any ideas how to fix it? Or maybe I should use a different tool?

regards,
-- 
Luke

Juergen Beisert
Do you now 'usbpush'? I'm using it in my BSP and it does the job.

dragilla
I didn't know it, but it seems it's based on boot_usb (s3c2410_boot_usb).
Anyways I'm having the same compilation errors trying to make usbpush.
Must be something wrong with the new ubuntu and it's library dependencies.

Luckily in the package of usbpush there's a staticly linked version of boot
usb, which seems to  work just fine. Thank you.

Jay
Here is an alternative program to upload files to the mini2440 board
(basing on the original s3c2410_boot_usb but with many improvements):
http://programmers-projects.de/node/16

The source code is included in the tar.gz archive.

geoffrey bulan
On ubuntu 11.10
sudo apt-get install libusb-dev
that-s OK

Chris
If anyone else has this problem. The solution is changing the make target
to the following in the makefile:

s3c2410_boot_usb: boot_usb.o
  $(CC) -o $@ $< $(LDFLAGS)

This is caused by new gcc needing the lib flags after the source files

lolo
Thank you Chris, exactly what i was looking for !

Manish
The post by Chris helps solve this issue!
Thanks Chris!

Fávero Santos
Hi!

If you wanna use usbpush, edit the makefile, replacing the lines bellow:

usbpush: usbpush.o
--> replaced line $(CC) -o $@ $< $(LDFLAGS)       
--> original line #$(CC) $(LDFLAGS) -o $@ $<

usbpush.o: usbpush.c
--> replaced line $(CC) -o $@ $< $(LDFLAGS)       
--> original line #$(CC) $(CFLAGS) -o $@ -c $<