diff options
Diffstat (limited to 'recipes-kernel/rs9113/rs9113.inc')
-rw-r--r-- | recipes-kernel/rs9113/rs9113.inc | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/recipes-kernel/rs9113/rs9113.inc b/recipes-kernel/rs9113/rs9113.inc new file mode 100644 index 0000000..e4dbb2c --- /dev/null +++ b/recipes-kernel/rs9113/rs9113.inc @@ -0,0 +1,59 @@ +DR = "${DL_DIR}/rs9113-ipk" + +python do_fetch_prepend () { + d.setVar('BB_STRICT_CHECKSUM',False) + DR = d.getVar("DR",True) + bb.note("DR is " + DR) + + try: + os.mkdir(DR,0755) + 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@" + try: + gt += d.getVar("MTS_INTERNAL_GIT") + except TypeError: + bb.fatal("MTS_INTERNAL_GIT must be in BB_ENV_EXTRAWHITE") + + PV = d.getVar("PV",True) + bb.note("PV is " + PV) + gt += ":mlinux/ipk.git " + PV + bb.note("git is " + gt) + PR = d.getVar("PR",True) + tar = "tar -vx --strip-components 1 -C " + DR + " rs9113/rs9113-from-src_" + tar += PV + "-" + PR + ".0_mtcdt.ipk" + bb.note("tar is " + tar) + os.system(ex + ";" + gt + "|" + tar) +} + +MR = "${WORKDIR}/rs9113" +do_install () { + bbnote "pwd,ls: $(pwd) $(ls) WORKDIR is ${WORKDIR}" + ( + cd ${WORKDIR} + find etc -print0 | cpio -0 -pdum ${D} + find usr -print0 | cpio -0 -pdum ${D} + find opt -print0 | cpio -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) +} + |