Comments
Patch
@@ -65,8 +65,15 @@ fakeroot python do_populate_sdk() {
}
fakeroot populate_sdk_image() {
- rm -rf ${SDK_OUTPUT}
- mkdir -p ${SDK_OUTPUT}
+
+ # When use the incremental image generation, and the type of previous image
+ # has no change, don't remove the rootfs
+ if [ "${INC_DEB_IMAGE_GEN}" = "1" -a -d ${T}/dpkg ]; then
+ echo "NOTE: Start incremental generation"
+ else
+ rm -rf ${SDK_OUTPUT}
+ mkdir -p ${SDK_OUTPUT}
+ fi
# populate_sdk_<image> is required to construct two images:
# SDK_ARCH-nativesdk - contains the cross compiler and associated tooling
@@ -90,7 +97,7 @@ fakeroot populate_sdk_image() {
rm -f ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/*.la
# Link the ld.so.cache file into the hosts filesystem
- ln -s /etc/ld.so.cache ${SDK_OUTPUT}/${SDKPATHNATIVE}/etc/ld.so.cache
+ ln -snf /etc/ld.so.cache ${SDK_OUTPUT}/${SDKPATHNATIVE}/etc/ld.so.cache
}
fakeroot create_sdk_files() {
@@ -60,7 +60,7 @@ populate_sdk_deb () {
#move remainings
install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}/var/lib/dpkg
- mv ${SDK_OUTPUT}/var/lib/dpkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}/var/lib/dpkg
+ cp -rf ${SDK_OUTPUT}/var/lib/dpkg/* ${SDK_OUTPUT}/${SDKPATHNATIVE}/var/lib/dpkg
rm -rf ${SDK_OUTPUT}/var
populate_sdk_log_check populate_sdk
When use the incremental image generation, and the type of previous image has no change, don't remove the rootfs Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- meta/classes/populate_sdk_base.bbclass | 13 ++++++++++--- meta/classes/populate_sdk_deb.bbclass | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-)