1 DESCRIPTION = "Dreambox second stage bootloader"
4 MAINTAINER = "Felix Domke <tmbinc@elitedvb.net>"
12 RDEPENDS_${PN} = "dreambox-bootlogo (>= 7.0)"
14 SRC_URI = "http://sources.dreamboxupdate.com/download/7020/secondstage-${MACHINE}-${PV}.bin"
16 WRITENFI = "writenfi-mipsel-2.6.18-r2"
18 SECONDSTAGE_UPDATE_SRC = "http://sources.dreamboxupdate.com/download/7020/secondstage-${MACHINE}-${PV}.nfi \
19 http://sources.dreamboxupdate.com/download/7020/${WRITENFI}"
21 SRC_URI_append_mipsel = " ${SECONDSTAGE_UPDATE_SRC}"
26 install -d ${STAGING_LIBDIR}/dreambox-secondstage
27 gzip -c ${S}/secondstage-${MACHINE}-${PV}.bin > ${STAGING_LIBDIR}/dreambox-secondstage/main.bin.gz
30 # secondstage >= 81 is already compressed
32 install -d ${STAGING_LIBDIR}/dreambox-secondstage
33 cp ${S}/secondstage-${MACHINE}-${PV}.bin ${STAGING_LIBDIR}/dreambox-secondstage/main.bin.gz
38 install ${WORKDIR}/secondstage-${MACHINE}-${PV}.nfi ${D}/tmp/secondstage.nfi
39 install -m 0755 ${WORKDIR}/${WRITENFI} ${D}/tmp/writenfi
43 PACKAGE_ARCH := "${MACHINE_ARCH}"
46 if [ -d /proc/stb ]; then
47 if [ -f /tmp/writenfi ]; then
48 if [ "$(cat /proc/stb/info/model)" = "dm8000" ]; then
49 /tmp/writenfi /tmp/secondstage.nfi;
50 rm /tmp/writenfi /tmp/secondstage.nfi;
52 #hack for broken mtd layer in linux kernel 2.6.18-r13.0
53 mv /tmp/writenfi /usr/bin/writenfi;
54 mv /tmp/secondstage.nfi /usr/bin/secondstage.nfi;
55 echo "#!/bin/sh" > /etc/rcS.d/S05UpdateSecondstage;
56 echo "/usr/bin/writenfi /usr/bin/secondstage.nfi || /bin/true" > /etc/rcS.d/S05UpdateSecondstage;
57 echo "rm -f /usr/bin/writenfi /usr/bin/secondstage.nfi /etc/rcS.d/S05UpdateSecondstage" >> /etc/rcS.d/S05UpdateSecondstage;
58 chmod ugo+x /etc/rcS.d/S05UpdateSecondstage;