meta-*: use SUMMARY instead of DESCRIPTION where appropriate (max. 80 chars)
[opendreambox.git] / meta-bsp / common / recipes / dreambox / dreambox-secondstage-base.inc
1 SUMMARY = "Dreambox second stage bootloader"
2 SECTION = "base"
3 LICENSE = "CLOSED"
4 DEPENDS += "dreambox-buildimage-native"
5 PROVIDES = "virtual/bootloader"
6 PRIORITY = "required"
7 INC_PR = "r10"
8
9 do_compile() {
10         ${DREAMBOX_BUILDIMAGE} \
11                 --boot-partition ${DREAMBOX_PART0_SIZE}:secondstage-${MACHINE}-${PV}.bin \
12                 --raw \
13                 > secondstage-${MACHINE}-${PV}.nand
14 }
15 do_install() {
16         install -d ${D}${datadir}/${PN}
17         install -m 0644 secondstage-${MACHINE}-${PV}.bin ${D}${datadir}/${PN}/secondstage-${MACHINE}.bin
18         install -m 0644 secondstage-${MACHINE}-${PV}.nand ${D}${datadir}/${PN}/secondstage-${MACHINE}.nand
19 }
20
21 PACKAGES = "${PN} ${PN}-bin"
22
23 PACKAGE_ARCH := "${MACHINE_ARCH}"
24
25 RDEPENDS_${PN} = "mtd-utils"
26
27 FILES_${PN} = "${datadir}/${PN}/secondstage-${MACHINE}.nand"
28 FILES_${PN}-bin = "${datadir}/${PN}/secondstage-${MACHINE}.bin"
29
30 pkg_postinst_${PN}() {
31 if [ -z "$D" ]; then
32         flash_erase /dev/mtd1 0 $((${DREAMBOX_PART0_SIZE} / ${DREAMBOX_ERASE_BLOCK_SIZE}))
33         nandwrite -m -n -o /dev/mtd1 ${datadir}/${PN}/secondstage-${MACHINE}.nand
34         sync
35 fi
36 }