inherit update-rc.d PACKAGE_ARCH = "${MACHINE_ARCH}" # No arch package must be last, since it picks up all files not picked # up elsewhere. PACKAGES = "kernel-module-${PN} ${PN}-util ${PN}-dbg ${PN}-noarch" RDEPENDS_${PN}-noarch = "bash" RRECOMMENDS_${PN}-noarch = "perl" DR = "${DL_DIR}/rs9113-ipk" FILESEXTRAPATHS_append := "${DR}:" INITSCRIPT_PACKAGES = "${PN}-noarch" INITSCRIPT_NAME_${PN}-noarch = "rs9113" INITSCRIPT_PARAMS_${PN}-noarch = "start 50 S ." BB_STRICT_CHECKSUM = "0" # Avoid QA Issue: No GNU_HASH in the elf binary INSANE_SKIP_${PN} = "ldflags" INSANE_SKIP_${PN}-dev = "ldflags" python do_fetch_prepend () { # d.setVar('BB_STRICT_CHECKSUM',False) DR = d.getVar("DR",True) bb.note("DR is " + DR) ARCH = d.getVar("PACKAGE_ARCH",True) try: os.mkdir(DR,0o755) except OSError: pass try: ex = "export SSH_AUTH_SOCK=" + d.getVar("SSH_AUTH_SOCK",True) except TypeError: ex=":" bb.note("SSH_AUTH_SOCK not set. SSH keys must not use a pass phrase") bb.note("export is " + ex) gt = "git archive -v --remote=git@" gitversion = d.getVar("PV",True) PV = gitversion PV += "-" try: PV += d.getVar("PR",True) except TypeError: bb.fatal("PR is missing from recipe") bb.note("PV is " + PV) ipkn = "rs9113-from-src_" + PV + ".0_" + ARCH + ".ipk" bb.note("ipkname is " + ipkn) bb.note ("ipk path is " + DR + "/" + ipkn) try: gt += d.getVar("MTS_INTERNAL_GIT",True) except TypeError: if os.path.isfile(DR + "/" + ipkn): return bb.fatal("Need " + DR + "/" + ipkn + " or set MTS_INTERNAL_GIT and add it to BB_ENV_EXTRAWHITE") gt += ":mlinux/ipk.git " + gitversion bb.note("git is " + gt) tar = "tar -vx --strip-components 1 -C " + DR + " rs9113/" + ipkn bb.note("tar is " + tar) os.system(ex + ";" + gt + "|" + tar) } FILES_kernel-module-${PN} = "/opt/rs9113/wlan_xauth.ko \ /opt/rs9113/wlan_acl.ko \ /opt/rs9113/wlan_tkip.ko \ /opt/rs9113/wlan_wep.ko \ /opt/rs9113/onebox_wlan_gpl.ko \ /opt/rs9113/onebox_nongpl.ko \ /opt/rs9113/onebox_common_gpl.ko \ /opt/rs9113/onebox_wlan_nongpl.ko \ /opt/rs9113/wlan_ccmp.ko \ /opt/rs9113/wlan_aes_cmac.ko \ /opt/rs9113/onebox_bt_nongpl.ko \ /opt/rs9113/onebox_bt_gpl.ko \ /opt/rs9113/wlan_scan_sta.ko \ /opt/rs9113/onebox_gpl.ko \ /opt/rs9113/wlan.ko \ " FILES_${PN}-util = "/opt/rs9113/transmit \ /opt/rs9113/transmit_packet \ /opt/rs9113/bt_bbp_utils \ /opt/rs9113/bbp_util \ /opt/rs9113/zb_bbp_util \ /opt/rs9113/bt_util \ /opt/rs9113/zb_transmit \ /opt/rs9113/receive \ /opt/rs9113/onebox_util \ /opt/rs9113/zb_util \ /opt/rs9113/bt_transmit \ /opt/rs9113/bt_receive \ /opt/rs9113/sniffer_app \ /opt/rs9113/START_RS9116_NBZ_D0N \ " FILES_${PN}-dbg = "/opt/rs9113/.debug/bt_bbp_utils \ /opt/rs9113/.debug/bbp_util \ /opt/rs9113/.debug/zb_bbp_util \ /opt/rs9113/.debug/transmit \ /opt/rs9113/.debug/zb_util \ /opt/rs9113/.debug/bt_transmit \ /opt/rs9113/.debug/onebox_util \ /opt/rs9113/.debug/receive \ /opt/rs9113/.debug/zb_transmit \ /opt/rs9113/.debug/bt_util \ /opt/rs9113/.debug/START_RS9116_NBZ_D0N \ /opt/rs9113/.debug/sniffer_app \ /opt/rs9113/.debug/transmit_packet \ /opt/rs9113/.debug/bt_receive \ " CONFFILES_${PN}-noarch = "${sysconfdir}/default/" FILES_${PN}-noarch = "/opt/rs9113/ ${sysconfdir}/init.d/ ${sysconfdir}/default/ ${prefix}/" MR = "${WORKDIR}/rs9113" do_install () { bbnote "pwd,ls: $(pwd) $(ls) WORKDIR is ${WORKDIR}" ( cd ${WORKDIR} find etc -print0 | cpio --owner root:root -0 -pdum ${D} find usr -print0 | cpio --owner root:root -0 -pdum ${D} find opt -print0 | cpio --owner root:root -0 -pdum ${D} ) install -d ${D}/opt/rs9113/init.d install -d ${D}${sysconfdir}/init.d/ install -d ${D}${sysconfdir}/default/ install -m 0755 ${MR}/wpa_supplicant ${D}/opt/rs9113/init.d install -m 0755 ${MR}/rs9113.init ${D}${sysconfdir}/init.d/rs9113 install -m 0644 ${MR}/rs9113.default ${D}${sysconfdir}/default/rs9113 } python do_cleanall_prepend () { bb.note("In do_clean_prepend") DR = d.getVar("DR",True) bb.note("About to delete " + DR) os.system("/bin/rm -rf " + DR) }