I have configured and compiled the Linux kernel using buildroot. I want to have access to spi buses on this board in user mode. Here are the steps I’ve take to compile the kernel.
1- clone the buildroot repo : version 2023.02-rc1
$ git clone https://github.com/buildroot/buildroot.git && cd buildroot
2- load defconfig for the board
$ make beagleboardx15_defconfig
3- Changes made to the menuconfig
$ make menuconfig
Toolchain ---> A) Toolchain Type ---> External Toolchain
B) Toolchain ---> Linaro ARM 2018.05
Kernel ---> A) Kernel version ---> Custom version (4.20.17)
B) Out-of-tree Device Tree Source file paths (path/to/my/am57xx-beagle-x15.dts)
This path/to/my/am57xx-beagle-x15.dts
file will be copy to linux source and compile from there. I have changed the status
property of mcspi1-4
nodes to "okay"
in this file like this:
&mcspi1 {
status = "okay";
};
# also did this for other mcspi nodes...
These node are defined in dra7.dtsi
file which by default are disabled.
4- Changes made to the linux-menuconfig
$ make linux-menuconfig
Device Drivers ---> SPI support ---> <*> User mode SPI driver support
5- compile the kernel and write the sdcard.img to my sd card.
$ make
$ sudo dd if=images/sdcard.img of=/dev/sdc
After these steps I expected to see some spidev in the /dev directory, but there is nothing related to spi there.