To add a module to FDT model you would add to the boards kernconf.
-For example- an RTC module on RPi2 via Maxim DS3231 supported via ds3231.c
/src/sys/arm/conf/RPI2
Then under the rpi2.dts you must add an entry for the module to the existing device tree source. Here is what needs be added.
/src/sys/boot/fdt/dts/arm/rpi2.dts
Save this as patch-rpi2.dts-file then apply on your source.
Then you cross compile like normal instructions. From there I am still learning.
-For example- an RTC module on RPi2 via Maxim DS3231 supported via ds3231.c
/src/sys/arm/conf/RPI2
Code:
device ds3231
Then under the rpi2.dts you must add an entry for the module to the existing device tree source. Here is what needs be added.
/src/sys/boot/fdt/dts/arm/rpi2.dts
Code:
--- rpi2.dts.original 2016-10-30 13:28:25.152947000 -0400
+++ rpi2.dts 2016-11-01 19:55:01.064610000 -0400
@@ -322,7 +322,12 @@
mac-address = [00 00 00 00 00 00];
};
};
-
+ };
+ bsc1{
+ rtc {
+ compatible="maxim,ds3231";
+ reg=<0x68>;
+ };
};
};
Then you cross compile like normal instructions. From there I am still learning.
Last edited: