[Buildroot] which templates are used?

Steve Calfee stevecalfee at gmail.com
Tue Apr 12 16:52:57 UTC 2011


On 04/12/11 06:01, Michael S. Zick wrote:
>> Mine patchrootfs is:
>> #!/bin/bash
>> #
>> # skript which runs before creating rootfs
>> #
>> #
>> MAINDIR=${1}/../../
>> SRCDIR=${MAINDIR}"target/device/beagleboard/skeleton/*"
>> DESTDIR=${1}
>> echo "***************patching some stuff in " ${DESTDIR} from ${SRCDIR}
>> #echo "DESTDIR " ${DESTDIR}
>> #echo "SRCDIR " ${SRCDIR}
>> #ls -l ${SRCDIR} ${SRCDIR}"/etc"
>> cp -rvp ${SRCDIR} ${DESTDIR}
>> echo "end of userdefined script before packing rootfs"
>>
>> So this copies the fs skeleton, recursively from the local directory
>> after every build. The trick is it just overlays the fs in the target,
>> so you only have to add files that are specific or changed in your
>> build. So if you tweak an existing file say in /etc, it will replace
>> that file. If you add a new file (maybe a script) say in /usr/bin it
>> will add that from your local tree into the build. The local skeleton
>> should stay very sparse.
>>
>> There is no way to remove files that are not needed etc, just remove
>> them locally in your skeleton and when buildroot is remade with a clean
>> it will get all sorted out.
>>
> 
> Would using rsync with appropriate options instead of cp do that trick?
> 
> Mike

Hi Mike,

Maybe, but I think you would have to have an entire tree in your local
directory, my goal was to have as few board specific files as necessary.
I haven't actually found it much of a problem growing litter in the file
system. And if it is I can always do the buildroot "make clean".

Regards, Steve



More information about the buildroot mailing list