logi_loader and dd throwing "Inappropriate ioctl" when pushing bitfile to /dev/logibone

I'm running the 2014-5-14 Debian from the BeagleBone Black website and was delighted to see that the logibone drivers have already been included in the kernel.

However, after cloning the repository from github (https://github.com/fpga-logi/logi-projects) and making sure the logibone loader was installed, I cannot push bit files to /dev/logibone, I have tried both with dd and the logi_loader but the following result appears:

$ dd if=logibone_r1_blink.bit of=/dev/logibone bs=4M
dd: writing `/dev/logibone': Inappropriate ioctl for device
0+1 records in
0+0 records out
0 bytes (0 B) copied, 1.23868 s, 0.0 kB/s

If anyone could point me in the right direction I'd be realy grateful.

Comments

  • Hi There!  The driver development is @Jpiat 's turf.  He is currently on the road, but has been getting to email/forum as available.  He should be checking back on this soon.

    Cheers!
  • Can you lake sure that the logibone is properly detected (/dev/logibone and /dev/logibone_mem exists ? Can you do a "dmesg" and see the output after trying logi_loader
  • edited August 2014
    Both /dev/logibone and /dev/logibone_mem exist, the following is appended to dmesg when executing 'logi_loader logibone_r1_blink.bit' from the cloned logi-tools repository:

    [64457.252386] Starting configuration of 2725624 bits
    [64458.391012] Waiting for done pin to go high
    [64458.392180] FPGA prog failed, done pin not going high
  • I think I've narrowed down the problem to the cape loading, it does not find the dtbo:

     dmesg | grep bone_capemgr
    [    0.565707] bone-capemgr bone_capemgr.9: Baseboard: 'A335BNLT,000C,2414BBBK1470'
    [    0.565733] bone-capemgr bone_capemgr.9: compatible-baseboard=ti,beaglebone-black
    [    0.565761] bone-capemgr bone_capemgr.9: Skipping disabled cape with part# BB-BONE-EMMC-2G
    [    0.565788] bone-capemgr bone_capemgr.9: Skipping disabled cape with part# BB-BONELT-HDMI
    [    0.565840] bone-capemgr bone_capemgr.9: Skipping disabled cape with part# BB-BONELT-HDMIN
    [    0.589882] bone-capemgr bone_capemgr.9: slot #0: 'BB-BONE-LOGIBONE,00R1,VALENTFX,BB-BONE\xffffffc3-LOGIBON'
    [    0.620088] bone-capemgr bone_capemgr.9: slot #1: No cape found
    [    0.657198] bone-capemgr bone_capemgr.9: slot #2: No cape found
    [    0.694306] bone-capemgr bone_capemgr.9: slot #3: No cape found
    [    0.700520] bone-capemgr bone_capemgr.9: slot #4: specific override
    [    0.700542] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 4
    [    0.700556] bone-capemgr bone_capemgr.9: slot #4: 'Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G'
    [    0.700634] bone-capemgr bone_capemgr.9: slot #5: specific override
    [    0.700651] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 5
    [    0.700666] bone-capemgr bone_capemgr.9: slot #5: 'Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI'
    [    0.700735] bone-capemgr bone_capemgr.9: slot #6: specific override
    [    0.700752] bone-capemgr bone_capemgr.9: bone: Using override eeprom data at slot 6
    [    0.700766] bone-capemgr bone_capemgr.9: slot #6: 'Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN'
    [    0.700930] bone-capemgr bone_capemgr.9: Skipping loading of disabled cape with part# BB-BONE-EMMC-2G
    [    0.700943] bone-capemgr bone_capemgr.9: Skipping loading of disabled cape with part# BB-BONELT-HDMI
    [    0.700955] bone-capemgr bone_capemgr.9: Skipping loading of disabled cape with part# BB-BONELT-HDMIN
    [    0.701097] bone-capemgr bone_capemgr.9: initialized OK.
    [    0.704204] bone-capemgr bone_capemgr.9: loader: before slot-0 BB-BONE\xffffffc3-LOGIBON:00R1 (prio 0)
    [    0.704220] bone-capemgr bone_capemgr.9: loader: check slot-0 BB-BONE\xffffffc3-LOGIBON:00R1 (prio 0)
    [    0.704235] bone-capemgr bone_capemgr.9: loader: after slot-0 BB-BONE\xffffffc3-LOGIBON:00R1 (prio 0)
    [    0.704252] bone-capemgr bone_capemgr.9: slot #0: Requesting part number/version based 'BB-BONE\xffffffc3-LOGIBON-00R1.dtbo
    [    0.704267] bone-capemgr bone_capemgr.9: slot #0: Requesting firmware 'BB-BONE\xffffffc3-LOGIBON-00R1.dtbo' for board-name 'BB-BONE-LOGIBONE', version '00R1'
    [    1.065161] bone-capemgr bone_capemgr.9: failed to load firmware 'BB-BONE\xffffffc3-LOGIBON-00R1.dtbo'
    [    1.074170] bone-capemgr bone_capemgr.9: loader: failed to load slot-0 BB-BONE\xffffffc3-LOGIBON:00R1 (prio 0)
  • Strangely even though dmesg shows the capemgr skipped loading the HDMI and eMMC, they are still listed as installed in the cape slots

    cat /sys/devices/bone_capemgr.9/slots
     1: 55:PF---
     2: 56:PF---
     3: 57:PF---
     4: ff:P-O-- Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
     5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
     6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
  • It seems that the information read from your cape eeprom is bad (have you tested this board with the default logibone image). Here is a link to a latest Debian image that I tested with the logibone: https://www.dropbox.com/s/4gmcpigtdpap5br/debian_jessie_24_07_2014.img.zip
  • I'm using the logibone R1.0, the default ubuntu image seems to be built for RA2.0+, setup_device_tree.sh fails when ran. 

    Any instructions on loading the Jessie image? I only see uboot and the mlo when writing the image, there is no kernel or uEnv.txt..?


  • Latest Debian image have the kernel and uenv into the filesystem. To build this image I had no modification to make to the uenv and it detected the logi on first boot ! Since the Debian image was based on earlier version of the loyibone code (latest code does FPGA loading in user space instead of kernel module), I modified the image with latest logibone tools. You may have to reflash your eeprom by running the install_logibone script n logi-tools.

    Regards,

    Jonathan piat
  • I've written the Jessie image but when I insert the SD card I get no SSH over USB, the heartbeat is present though after a few seconds of activity but I have no way to connect. Am I missing something in the boot process?

    I've tried rewritting the logibone EEPROM by rerunning the install_logibone script on my original Debian but although I get no errors in the script execution there are no changes to the capemgr boot process. Shouldn't I be able to modify the EEPROM since it's on I2C?

    Thanks
  • For the Jessie image I forgot to mention that you need to press the boot button (the one to force boot from SD card) as latest Debian will try to boot from emmc ... The button is not very accessible with the logibone plugged in (use a small wood or plastic stick), and you need to press it when powering the board (not just pressing the reset button). We will build an image with default boot from SD card when we find how to configure uboot for this.

    The eeprom can b accessed with no problem whatever distro you use, you just need to run the script as sudo. I am away from my computer until the 13th so I have no way to try to o replicate your problem until then.

    Regards

    Jonathan piat
  • Alright, thanks a lot though. :)

    I have successfully loaded the cape manually on the BBB Debian earlier this afternoon using /sys/devices/bone-capemgr.9/slots and am currently running some tests with the wishbone app. I hope we'll be able to resolve the issues with the boot but since then I can work on developing the interface.
Sign In or Register to comment.