summaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_ipk.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/populate_sdk_ipk.bbclass')
-rw-r--r--meta/classes/populate_sdk_ipk.bbclass44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/classes/populate_sdk_ipk.bbclass b/meta/classes/populate_sdk_ipk.bbclass
new file mode 100644
index 0000000000..79259f80d6
--- /dev/null
+++ b/meta/classes/populate_sdk_ipk.bbclass
@@ -0,0 +1,44 @@
1do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
2do_populate_sdk[recrdeptask] += "do_package_write_ipk"
3
4fakeroot populate_sdk_ipk() {
5
6 rm -f ${IPKGCONF_TARGET}
7 touch ${IPKGCONF_TARGET}
8 rm -f ${IPKGCONF_SDK}
9 touch ${IPKGCONF_SDK}
10
11 package_update_index_ipk
12 package_generate_ipkg_conf
13
14 export INSTALL_PACKAGES_ATTEMPTONLY_IPK=""
15 export INSTALL_PACKAGES_LINGUAS_IPK=""
16 export INSTALL_TASK_IPK="populate_sdk"
17
18 #install target
19 export INSTALL_ROOTFS_IPK="${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
20 export INSTALL_CONF_IPK="${IPKGCONF_TARGET}"
21 export INSTALL_PACKAGES_NORMAL_IPK="${TOOLCHAIN_TARGET_TASK}"
22
23 package_install_internal_ipk
24
25 #install host
26 export INSTALL_ROOTFS_IPK="${SDK_OUTPUT}"
27 export INSTALL_CONF_IPK="${IPKGCONF_SDK}"
28 export INSTALL_PACKAGES_NORMAL_IPK="${TOOLCHAIN_HOST_TASK}"
29
30 package_install_internal_ipk
31
32 #post clean up
33 install -d ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/${sysconfdir}
34 install -m 0644 ${IPKGCONF_TARGET} ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/${sysconfdir}/
35
36 install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}
37 install -m 0644 ${IPKGCONF_SDK} ${SDK_OUTPUT}/${SDKPATHNATIVE}/${sysconfdir}/
38
39 install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg
40 mv ${SDK_OUTPUT}/var/lib/opkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}${localstatedir_nativesdk}/lib/opkg/
41 rm -Rf ${SDK_OUTPUT}/var
42
43 populate_sdk_log_check populate_sdk
44}