summaryrefslogtreecommitdiff
path: root/meta/meta-sdk.oe
blob: b31dedee7f88646b23787b1f8d1d75691c190b93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
DEPENDS = "ipkg-native ipkg-utils-native binutils-cross-sdk gcc-cross-sdk gdb-cross-sdk"

inherit sdk

SDK_DIR = "${TMPDIR}/sdk"
SDK_OUTPUT = "${SDK_DIR}/image"

IPKG_HOST = "ipkg-cl -f ${SDK_DIR}/ipkg-host.conf -o ${SDK_OUTPUT}"
IPKG_TARGET = "ipkg-cl -f ${SDK_DIR}/ipkg-target.conf -o ${SDK_OUTPUT}/${prefix}"

do_populate_sdk() {
	touch ${DEPLOY_DIR_IPK}/Packages
	ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}

	rm -rf ${SDK_OUTPUT}
	mkdir -p ${SDK_OUTPUT}

	cat <<EOF >${SDK_DIR}/ipkg-host.conf
src oe file:${DEPLOY_DIR_IPK}
arch ${BUILD_ARCH} 1
EOF
	cat <<EOF >${SDK_DIR}/ipkg-target.conf
src oe file:${DEPLOY_DIR_IPK}
arch ${TARGET_ARCH} 1
EOF
	${IPKG_HOST} update
	${IPKG_HOST} --nodeps install binutils-cross-sdk gcc-cross-sdk gdb-cross-sdk
	${IPKG_TARGET} update
	${IPKG_TARGET} install glibc-dev 
}

do_populate_sdk[nostamp] = 1
addtask populate_sdk before do_build after do_install