Created
October 24, 2014 14:33
-
-
Save niun/f8443db5bbfaaf02b026 to your computer and use it in GitHub Desktop.
Create custom device tree blob to configure Raspberry Pi pins on early boot time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install device-tree-compiler | |
wget https://raw.githubusercontent.com/raspberrypi/documentation/master/configuration/images/dt-blob.dts | |
# for example, set P1:26 (BCM pin 7) to active low (on Raspi B Rev2.0, in dts file from August): | |
awk 'NR==104{print " pin@p7 { function = \"output\"; termination = \"pull_down\"; }; // SPI_CE1_N (P1:26)"}1' dt-blob.dts > dt-blob-mod.dts | |
dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-mod.dts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment