Hi,
I have been following this famous link from Robert Nelson for kernel
building : https://eewiki.net/display/linuxonarm/BeagleBone+Black
I have been reading and trying the concept of Device Tree for a new Driver
i am writing.To start with I tried to build a sample dts
file( leds-ns2.dts) by copying it into the KERNEL/scripts/dtc folder
dtc -I dts -O dtb -o mydtb.dtb leds-ns2.dts
below is the content of the leds-ns2.dts
******************************************************************************************
#include <dt-bindings/leds/leds-ns2.h>
ns2-leds {
compatible = "lacie,ns2-leds";
blue-sata {
label = "ns2:blue:sata";
slow-gpio = <&gpio0 29 0>;
cmd-gpio = <&gpio0 30 0>;
modes-map = <NS_V2_LED_OFF 0 1
NS_V2_LED_ON 1 0
NS_V2_LED_ON 0 0
NS_V2_LED_SATA 1 1>;
};
};
******************************************************************************************
but I am getting this error :
DTC: dts->dtb on file "leds-ns2.dts"
Error: leds-ns2.dts:1.1-2 syntax error
FATAL ERROR: Unable to parse input tree
On further googling in forums I found that I have to build the dts using
the below command->
make ARCH=arm CROSS_COMPILE=${CC} dtbs ( i put the leds-ns2.dts file into
/arch/arm/boot/dts/. folder before this,I skipped : make ARCH=arm
CROSS_COMPILE=arm-none-eabi- am335x_evm_defconfig since kernel is already
been built with this.)
After building I didn't see any error but I didn't find any leds-ns2.dtb in
the folder.Does that mean that do I have to enable it in the .config file
first by running tools/rebuild.sh script?
once I will be able to built it successfully do I have to run this command
to copy the dtbs to the BBB .
sudo tar xfv ./bb-kernel/deploy/${kernel_version}-dtbs.tar.gz -C
/media/rootfs/boot/dtbs/${kernel_version}/
Is there a way I can just build the dtb for the device I want and transfer
it to the BBB and test my driver using that dtb.
I think device tree overlay must be doing this?
Please advice the directions .
Thanks and Regards,
J
--
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/36f4f9f7-7a09-4ae0-a452-1357938881f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.