anchor.diff:  }
   
   do_populate_sdk() {
  -        sdk_ipk_do_indexes
  +	sdk_ipk_do_indexes
   	rm -rf ${SDK_OUTPUT}
   	mkdir -p ${SDK_OUTPUT}
  -
  -        echo "Creating host.conf..."
   
   	cat <<EOF >${SDK_DIR}/ipkg-host.conf
   src oe file:${DEPLOY_DIR_IPK}/${BUILD_ARCH}
   arch ${BUILD_ARCH} 1
   EOF
  -        echo "done."
  -        priority=1
  -        for arch in $ipkgarchs; do
  -                echo "arch $arch $priority" >> ${SDK_DIR}/ipkg-target.conf
  -                priority=$(expr $priority + 5)
  -                if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then
  -                        echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${SDK_DIR}/ipkg-target.conf
  -                fi
  -        done
  +	cat <<EOF >${SDK_DIR}/ipkg-target.conf
  +src oe file:${DEPLOY_DIR_IPK}
  +EOF
  +	ipkgarchs="${PACKAGE_ARCHS}"
  +	priority=1
  +	for arch in $ipkgarchs; do
  +		echo "arch $arch $priority" >> ${SDK_DIR}/ipkg-target.conf
  +		echo "arch ${BUILD_ARCH}-$arch-sdk $priority" >> ${SDK_DIR}/ipkg-host.conf
  +		priority=$(expr $priority + 5)
  +		revipkgarchs="$arch $revipkgarchs"
  +		if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then
  +			echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${SDK_DIR}/ipkg-target.conf
  +		fi
  +	done
   
   	rm -r ${SDK_OUTPUT}
   	mkdir -p ${SDK_OUTPUT}
   
   	${IPKG_HOST} update
  -	${IPKG_HOST} -nodeps install ${HOST_INSTALL}
  +	${IPKG_HOST} -force-depends install ${HOST_INSTALL}
   
   	${IPKG_TARGET} update
   	${IPKG_TARGET} install ${TARGET_INSTALL}
  
positive.code: DESCRIPTION = "Meta package for building a installable toolchain"
  LICENSE = "MIT"
  DEPENDS = "ipkg-native ipkg-utils-native fakeroot-native sed-native"
  PR = "r0"
  
  inherit rootfs_ipk sdk meta
  
  SDK_DIR = "${WORKDIR}/sdk"
  SDK_OUTPUT = "${SDK_DIR}/image"
  
negative.code: 	cp -pPR ${SDK_OUTPUT}/${prefix}/usr/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}
  	rm -rf ${SDK_OUTPUT}/${prefix}/usr/
  
  	cp -pPR ${SDK_OUTPUT}/${prefix}/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib
  	rm -rf ${SDK_OUTPUT}/${prefix}/lib/*
  
  	for fn in `ls ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/`; do
  		if [ -h ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn ]; then
  			link=`readlink ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn`
  			bname=`basename $link`
  			if [ ! -e $link -a -e ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$bame ]; then
  				rm ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn
  				ln -s $bname ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn
  			fi
  		fi
  	done
  
  	mv ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/gcc* ${SDK_OUTPUT}/${prefix}/lib
  
  