17467fd9bb093b0556dcee29f5b32af89cd85764
[openpandora.oe.git] / recipes / pandora-system / pandora-uboot-scripts.bb
1 DESCRIPTION = "Helper uboot boot scripts for the OpenPandora"
2
3 DEPENDS = "u-boot-mkimage-native"
4
5 SRC_URI = "file://*.cmd"
6
7 do_configure() {
8         cp ${WORKDIR}/*.cmd ${S}
9 }
10
11 do_compile() {
12         for i in *.cmd ; do
13                 uboot-mkimage -A ${TARGET_ARCH} -O linux -T script -C none -a 0 -e 0 -n "OpenPandora $i" -d $i $i.scr
14         done
15 }
16
17 do_install() {
18         install -d ${D}${datadir}/u-boot-scripts
19         for i in *.scr ; do
20                 install -m 0644 $i ${D}${datadir}/u-boot-scripts
21         done
22 }
23
24 FILES_${PN} += "${datadir}"
25
26 addtask deploy before do_package after do_install
27
28 do_deploy() {
29         install -d ${DEPLOY_DIR_IMAGE}
30         for i in *.scr ; do
31                 cp $i ${DEPLOY_DIR_IMAGE}
32                 package_stagefile_shell ${DEPLOY_DIR_IMAGE}/$i
33         done
34 }
35
36 PACKAGE_ARCH = "${MACHINE_ARCH}"