1 DESCRIPTION = "Dreambox second stage bootloader"
4 DEPENDS += "dreambox-buildimage-native"
5 PROVIDES = "virtual/bootloader"
10 ${DREAMBOX_BUILDIMAGE} \
11 --boot-partition ${DREAMBOX_PART0_SIZE}:secondstage-${MACHINE}-${PV}.bin \
13 > secondstage-${MACHINE}-${PV}.nand
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
21 PACKAGES = "${PN} ${PN}-bin"
23 PACKAGE_ARCH := "${MACHINE_ARCH}"
25 RDEPENDS_${PN} = "mtd-utils"
27 FILES_${PN} = "${datadir}/${PN}/secondstage-${MACHINE}.nand"
28 FILES_${PN}-bin = "${datadir}/${PN}/secondstage-${MACHINE}.bin"
30 pkg_postinst_${PN}() {
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