I have built the minimal core image with bitbake using the command bitbake core-image-minimal. This successfully creates a working BeagleBone Black with Yocto. However, in the “/dev” directory, SPI is not present, which means I need to enable it somehow.
I’ve done some research and looked at previous forum discussions about enabling SPI. Some suggest modifying the uEnv.txt file, but I can’t find this file anywhere. Additionally, I followed an informative video from Digi-Key (https://www.youtube.com/watch?v=srM6u8e4tyw). At the 13:45 mark, the presenter enables I2C, but I don’t find an equivalent “status = ‘disabled’” line in the “am33xx.dtsi” file (or any other included files) for SPI.
I also came across a suggestion about using menuconfig to activate it, but I haven’t found a clear description of how to do this.
i’m working we a bit older Yocto version, dunfell
there are no spi enabled, spi0 pins are used for mmc
take a look at am335x-pdu001.dts, spi1 is configured there, you should be able to copy paste what ya need. i’d recommend patching am335x-bone-common.dtsi or create a .dtsi and include it in am3335x-boneblack.dts (also would required being patched then)
Would it be possible to just copy this part and paste it to the bottom of am335x-bone-common.dtsi?
Can this be done just as it is or do I have to create a patch file first? Would prefer to directly edit am335x-bone-common.dtsi if possible.
After this (wheter patch or directly edit), can I just do
bitbake core-image-minimal
In the poky directory or do I have to make other changes or maybe use a different image?
you will also need the ‘spi1_pins’ part also
you do not need the display-controller part, this would be replaced with the driver/sensor/whatever you need spi for
Yocto is a beast, there is a learning curve (i had to say this, )
i would recommend the patch, since if you delete the temp directory, ya loss all your work
if you go with just changing the file, then: bitbake virtual/kernel -c compile
just copy the new dtb to your SBC, use dtc to decompile the dtb and verify your spi changes are there.
Are these files maybe relevant? But they are not dtsi files. Maybe the naming is different with my Yocto version? Or I need to obtain the file somehow?
finally got a build, ran out of disk space
what did ya have to do to get tmp/deploy/images/beaglebone
all i get are rpm file. a lot seems to have changed. so back to a learning curve.
the files are in deploy-ti/images/beaglebone
the older version of yocto had them in tmp/deploy/images/beaglebone
so loading the sd card with everything like i did with dunfell, does not boot, no serial com output either
ya, beagleboard response is slow, if you reply to my email address, i think it’s faster.
being it’s Friday, my day is over. will look at it over the weekend.
how are you doing the sd card ??
Now it looks like the post finally got posted immediately!
Yea, the files are at poky/build/deploy-ti/images/beaglebone
Before loading to SD-card, I unmount, remove partitions.
lsblk
sda 8:0 1 29,2G 0 disk
├─sda1 8:1 1 32M 0 part /media/danne/boot <-- Old partition
└─sda2 8:2 1 31,4M 0 part /media/danne/root <-- Old partition
nvme0n1 259:0 0 476,9G 0 disk
├─nvme0n1p1 259:1 0 260M 0 part /boot/efi
├─nvme0n1p2 259:2 0 16M 0 part
├─nvme0n1p3 259:3 0 289,1G 0 part
├─nvme0n1p4 259:4 0 1000M 0 part
└─nvme0n1p5 259:5 0 186,5G 0 part /var/snap/firefox/common/host-hunspell
/
danne@dendanne:~/Desktop/emlin/emlin_daniel_git/checkpoints$ sudo umount /dev/sda1
[sudo] password for danne:
danne@dendanne:~/Desktop/emlin/emlin_daniel_git/checkpoints$ sudo umount /dev/sda2
Remove partitions:
danne@dendanne:~/Desktop/emlin/emlin_daniel_git/checkpoints$ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Partition number (1,2, default 2): 1
Partition 1 has been deleted.
Command (m for help): d
Selected partition 2
Partition 2 has been deleted.
Command (m for help): 2
2: unknown command
Command (m for help): p
Disk /dev/sda: 29,16 GiB, 31312576512 bytes, 61157376 sectors
Disk model: SD Card Reader
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x9adac3bd
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
This is the command I ran to get it to the SD-card: