Best way to patch dtsi at compile time, and getting the source on my local drive?

So I made some changes to am335x-bone-common.dtsi thinking this was the place to to change some pin usage to get my 1-wire working on BBB. How wrong was I, I compile and the file gets overwritten so my changes get lost. FACE-PALM

So how best to make changes and patch the file so they don’t get overwritten?

Also how can I get the source downloaded so I don’t have to be connected to the internet to build Angstrom? Every time I run MACHINE=beaglebone ./ bitbake cloud9-gnome-image I have to have a network connection which isn’t possible in my office at the minute.

I just build the kernel on another machine with the changes I want and copy it and the dtb over to /boot on the BBB.

I would be really interested in a short tutorial that explained how with OE to a) add/remove packages from a standard image (cloud9, console, etc) and b) change the source of certain dependencies (eg, pull the kernel from a fork instead of github/beagleboard/kernel/3.8 ) - in a ‘correct’ / reproducible way, I’m assuming this means creating your own recipes/layers, but the OE docs are not the friendliest.

So far the best thing I’ve found so far is this, but it does not seem like the “right” way.

I have no issue getting the built file onto the board, just that my changes get overwritten by the build process when I compile.

A better approach is to use device tree overlays. A quick search should
find you the necessary howtos. The device tree is passed to the kernel which
then loads the overlays and updates the tree to match.


I’ve been reading up on these yes. But one thing that isn’t obvious is how you would go about getting these done at boot rather than manually installing the overlay after booting.

You would write an init script which loaded it. Then it would happen at
each boot.