Benutzerdefiniertes Dateisystemimage

Aus Labor für Echtzeitsysteme

Wechseln zu: Navigation, Suche

Ausgehend von user.collection/packages wird ein Verzeichnis "images" erstellt, welches die benutzerdefinierten Images enthält.

Eine Datei gumstix-custom-image sähe dann wie folgt aus:

# minimal gumstix-basic-image including own applications
#Notice that the semantic is <packagename>.bb with ".bb"!
#The Image and all dependend images MUST BE included in the same directory your custom image resides, e.g
#in this case you have to copy and to your image-folder, otherwise
#the build-process fail
no-arch##${BASE_URI}/all \
base##${BASE_URI}/${FEED_ARCH} \
#include your own packages here
gateway \

Nun das eigentliche Rezept, hier für unsere Gateway-Applikation:


SECTION = "base"
PN = "gateway"
#If you want to version your Software, simple increase the PV.
PV = "1.1"
PR = "R1"
#in my case, the makefile from T.Hammers' Application is auto-generated and therefore CCFLAGS and LDFLAGS are
#set. Bitbake don't like that, so there is a customized Makefile which replaced the old Version after the checkout
#Another often used possibility is to include a patch to modify the (Make)file
#Module must be set, otherwise do fetch failed. The param is just a subfolder under the svn-path, which contains the sources
SRC_URI = "svn://;module=trunk;rev=260;proto=http \
file://Makefile_oe \
#cp the files from the trunk-folder to the unpacked-source-folder (${S})
do_configure () {
cp -R ${WORKDIR}/trunk/* ${S}
#replace Makefile
do_compile() {
cd ${S}
rm Makefile
mv ${WORKDIR}/Makefile_oe Makefile
do_install() {
#creates the bindir /usr/bin
#under /tmp/work/armv5.../<yourapplication>/image
install -d ${D}${bindir}
#install your application to your bindir
install -m 0755 gateway ${D}${bindir}/
#include your own files here, e.g. files, that should appear under /etc on the target
#will installed by typing 'install -m 0755 <conffile> ${D}${sysconfdir}
#Which package should be build.You can define more packages here,for example:
#PACKAGES = "${PN} ${PN}-debug ${PN}-locale"
#Files included to the package
#define for every package the included files here.
#FILES_${PN} = "${bindir}/*"
#FILES_${PN}-debug = "${bindir}/debug/*
Persönliche Werkzeuge