Thank you Rudy and Vinay for your replies. I have been reading the blog you recommended. He says:
===== Now go into the file name uEnv.txt. The appears in the external device BEAGLEBONE if you have the board plugged into a computer. If using an external monitor go to Computer click the BEAGLEBONE device and open uEnv.txt with gedit. Delete any lines that may appear in uEnv.txt and add the following and save. This change will tell the board to apply the SPI0 Device Tree Overlay we created on startup. optargs=quiet drm.debug=7 capemgr.enable_partno=BB-SPI0-01 Reboot the BeagleBone Black. Do I need to delete (or comment out) ALL entries? I think I have the DTO enabled now. But I am anxious not to leave anything in any file that may cause a problem when I get to attempting the flash. Rudy I read your last post as saying to take out the line starting ‘optargs=‘. Was that correct? Or will I need that line as described above? Here is my current version of uEnv.txt (without lines that are commented-out): ==== uname_r=3.8.13-bone79 cmdline=coherent_pool=1M quiet init=/lib/systemd/systemd cape_universal=enable cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN uuid=c3048a42-5170-419f-ae71-6f96bf7f6f11 cape_enable=bone_capemgr.enable_partno=BB-SPIDEV0 capemgr.enable_partno=BB-SPI0-01 Should I delete/comment-out, or change, any of the above? And should I include the optargs line mentioned by Robert’s blog? the spidev1.0 file is listed in /dev as it is. I am having problems with the loop-back test. I tried to compile on the BBB but it gave errors such as these: root@beaglebone:~# gcc -Wall spi_test.c -o spi_test.o spi_test.c: In function 'transfer': spi_test.c:54:18: error: 'SPI_TX_QUAD' undeclared (first use in this function) spi_test.c:54:18: note: each undeclared identifier is reported only once for each function it appears in spi_test.c:55:14: error: 'struct spi_ioc_transfer' has no member named 'tx_nbits' spi_test.c:56:23: error: 'SPI_TX_DUAL' undeclared (first use in this function) ETC, ETC. So I tried to compile on the host machine (my Lenovo Thinkpad, as yet unliberated, running Xubuntu), and it worked fine, producing the object file. So I then tried scp-ing the .o file to the BBB and trying to run it there. But I got the error ‘Cannot execute binary file’. Is this because I don’t have gcc installed on the BBB (man gcc showed it isn’t there)? I think I have the wires connected to the correct pins. I rebooted the BBB and tried again just to be sure and I’m getting the same error. As for your question Rudy “Do you have a program that can send data out of the SPI?”… at this stage I don’t even know what that question means - I realise I will need to. I have downloaded and scp-ed across to the BBB the program called libreboot_util. In it’s directory I see files/directories named ‘flash’, ‘flashrom’, ‘ich9deblob’. I think these are what I need. I am also not clear about how this will work practically: I presume I will need a usb connection to the BBB in order to issue the commands. This will need to be a connection from another computer (unless I plug in a keyboard and monitor but then we’ve just disabled the hdmi so perhaps that isn’t an option?). I suppose I could ssh to the BBB from my macbook - or get another old lenovo and install linux and do it from there. Rudy I’m pretty sure the Lenovo ROM is 3.3v because that is what I understand from the Libreboot guide. Thank you both again for all your time and help. Will On 20072016, at 02:35, Vinay Divakar <[email protected]> wrote: > Hi, Rudy, > > Nothing much, Just hooked to my CC3200 LP. > > Will, looking at the slots, I can say that you have loaded the spi dev 1 > successfully. For your kernel version, adding CAPE=BB-SPI0-01 in the file > in "/etc/default/capemgr" is sufficient . To cross check the active spi > devices use " ls -al /dev/spidev*", it will show you which spi devices are > currently active and can be used. There nothing more to install or load, you > have one spi device now active and can use it for your application. However, > if I were you, I would first do a loop back test on the spi module to check > if its functioning using the code in Roberts blog SPI Test Utility Code. And > about your last side question, I think that is the size of image that is > currently running on your BBB > > On 19 July 2016 at 04:40, Will Napier <[email protected]> wrote: > Thank you Vinay and Rudy for your replies. I am using the Kernel > Version 3.8.13-bone79. > > I realised about the L thing after my last post - thank you Rudy, that > is encouraging that I have successfully disabled HDMI. I have added > the suggested line in /etc/default/capemgr > (CAPE=ADAFRUIT-SP0). Following earlier advice the only other line I > have in this file is: > > CAPE=BB-SP1-01. > > Is this correct for my purpose (ie simply and only to use the BBB to > flash the Lenovo ROM)? > > After adding the line you suggested, I rebooted and this is what I now get > in /sys/devices/bone_capemgr.9/slots: > > 0: 54:PF--- > 1: 55:PF--- > 2: 56:PF--- > 3: 57:PF--- > 4: ff:P-O-L 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 > 7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPI1-01 > > I am using the guide at > https://libreboot.org/docs/install/bbb_setup.html. In "Setting up > spidev on the BBB" it advises: > > Log on as root on the BBB, using either SSH or a serial console as > defined in #bbb_access. Make sure that you have internet access on > your BBB. > > > Follow the instructions at > http://elinux.org/BeagleBone_Black_Enable_SPIDEV#SPI0 up to (and > excluding) the point where it tells you to modify uEnv.txt > > > I did this, entering the .dtbo in the recommended location (for > SP01). Here is my uEnv.txt: > > ==================== > > #Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0 > > uname_r=3.8.13-bone79 > ##uuid= > #dtb= > > ##BeagleBone Black/Green dtb's for v4.1.x (BeagleBone White just works..) > > ##BeagleBone Black: HDMI (Audio/Video) disabled: > #dtb=am335x-boneblack-emmc-overlay.dtb > > ##BeagleBone Black: eMMC disabled: > #dtb=am335x-boneblack-hdmi-overlay.dtb > > ##BeagleBone Black: HDMI Audio/eMMC disabled: > #dtb=am335x-boneblack-nhdmi-overlay.dtb > > ##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled: > #dtb=am335x-boneblack-overlay.dtb > > ##BeagleBone Black: wl1835 > #dtb=am335x-boneblack-wl1835mod.dtb > > ##BeagleBone Black: replicape > am335x-boneblack-replicape.dtb > > ##BeagleBone Green: eMMC disabled > #dtb=am335x-bonegreen-overlay.dtb > > cmdline=coherent_pool=1M quiet init=/lib/systemd/systemd cape_universal=enable > > #In the event of edid real failures, uncomment this next line: > #cmdline=coherent_pool=1M quiet init=/lib/systemd/systemd > cape_universal=enable video=HDMI-A-1:1024x768@60e > > ##Example v3.8.x > #cape_disable=capemgr.disable_partno= > #cape_enable=capemgr.enable_partno= > > ##Example v4.1.x > #cape_disable=bone_capemgr.disable_partno= > #cape_enable=bone_capemgr.enable_partno= > > ##Disable HDMI/eMMC (v3.8.x) > #cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G > > ##Disable HDMI (v3.8.x) > cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN > > ##Disable eMMC (v3.8.x) > #cape_disable=capemgr.disable_partno=BB-BONE-EMMC-2G > > ##Audio Cape (needs HDMI Audio disabled) (v3.8.x) > #cape_disable=capemgr.disable_partno=BB-BONELT-HDMI > #cape_enable=capemgr.enable_partno=BB-BONE-AUDI-02 > > > ##enable Generic eMMC Flasher: > ##make sure, these tools are installed: dosfstools rsync > #cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh > > uuid=c3048a42-5170-419f-ae71-6f96bf7f6f11 > > cape_enable=bone_capemgr.enable_partno=BB-SPIDEV0 > > optargs=quiet drm.debug=7 > capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN > capemgr.enable_partno=BB-SPI1-01 > > ======= > > > So my current questions are: > > I am not clear from the guide what SPI things to install. SP0 & > SP1-01? or just one of them? > > Also should the optargs entry and the capemgr.enable_partno=BB-SP1-01 > be present in that file, or removed? > > Thank you Rudy for your files. I am not sure what to do with them. Given what > I have detailed above, do I need to do anything with them? > > And a side-question about the slots listing at the top of this post, > number 4.. why does it say 2Gb not 4Gb? I'm pretty sure I have the > 4Gb. Is it that there are 2x2? > > With thanks to you all for invaluable help. > > Will > > > On Mon, 18 Jul 2016, at 09:02 PM, [email protected] wrote: >> Hello all, I am new to BBB and using it to flash the ROM on my Lenovo >> Thinkpad T400 with Libreboot, using these instructions on eLinux. >> >> I disabled HDMI on the Beaglebone by opening vi and removing the comment >> from the line that says it disables HDMI. >> >> I couldn't locate the uEnv.txt file at first, because there isn't a /lib/ >> directory. It was found in /boot/ >> >> But when I did this, ie reboot and look, it seems that the HDMI is still >> there: >> >> root@beaglebone:/var/lib/cloud9# cat /sys/devices/bone_capemgr.*/slots >> 0: 54:PF--- >> 1: 55:PF--- >> 2: 56:PF--- >> 3: 57:PF--- >> 4: ff:P-O-L 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 >> root@beaglebone:/var/lib/cloud9# >> ==== >> >> I have now tried the advice of Vinay: >> >> >> >> >> Another solution is also simple, just include the line "CAPE=ADAFRUIT-SP0" >> in /etc/default/capemgr file. Then reboot and all should work fine. >> >> ======== >> >> >> This did not work. I still get the same slots listing. >> >> I then followed this advice also from vinay: >> ============ >> >> >> Re: [beagleboard] Re: Issues with Enabling SPIDev on Beaglebone Black >> Other recipients: [email protected], [email protected] >> >> Step 1 : Go to root@beaglebone: /boot# >> Step 2 : Open uEnv.txt file >> Step 3 : Inside the file >> >> You will find these lines, so do the following: In case If you dont find >> these lines for your kernel, then just append the line >> "cape_enable=bone_capemgr.enable_partno=BB-SPIDEV0" to the end of the file. >> >> ##Example v4.1.x >> #cape_disable=bone_capemgr.disable_partno= >> cape_enable=bone_capemgr.enable_partno=BB-SPIDEV0 >> >> Step 4 : Reboot your BBB >> Step 5 : Go to /sys/devices/platform/bone_capemgr# cat slots or dmesg to >> check. >> >> Then check if your SPI device has been loaded. >> >> This works with Linux beaglebone kernel 4.1.18-ti-r53 >> >> =============== >> >> This didn't work. there is no /sys/devices/platform/bone_capemgr. >> >> >> I would be very grateful for any help with this. With thanks, Will >> >> >> >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "BeagleBoard" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/beagleboard/2O0-NwbKc2M/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beagleboard/f55ac74f-155f-4536-8e0d-49e471e6f044%40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to a topic in the Google > Groups "BeagleBoard" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/beagleboard/2O0-NwbKc2M/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/1468928430.2674762.670488169.76C51D84%40webmail.messagingengine.com. > > For more options, visit https://groups.google.com/d/optout. > > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to a topic in the Google > Groups "BeagleBoard" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/beagleboard/2O0-NwbKc2M/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/CAL4GkmPdjOTV0XGbsUzx%2B6ORUqJhu-EcPG37MUeb3Y%3DxdvGOCg%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/FD948297-7868-43EE-8C74-9ACD4AD7F243%40willnapier.com. For more options, visit https://groups.google.com/d/optout.
