diff options
Diffstat (limited to 'mk/image.mk')
-rw-r--r-- | mk/image.mk | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/mk/image.mk b/mk/image.mk index 53b01d0c2..668de8c26 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -1,7 +1,7 @@ # This file is part of the OpenADK project. OpenADK is copyrighted # material, please see the LICENCE file in the top-level directory. -imageprepare: kernel-install image-prepare-post extra-install +imageprepare: image-prepare-post extra-install # if an extra directory exist in TOPDIR, copy all content over the # root directory, do the same if make extra=/dir/to/extra is used @@ -13,37 +13,6 @@ image-prepare-post: rng=/dev/arandom; test -e $$rng || rng=/dev/urandom; \ dd if=$$rng bs=512 count=1 >>${TARGET_DIR}/etc/.rnd 2>/dev/null; \ chmod 600 ${TARGET_DIR}/etc/.rnd - @cd ${TARGET_DIR}; ls=; ln=; li=; x=1; md5sum $$(find . -type f) | \ - sed -e "s/*//" | \ - while read sum name; do \ - inode=$$(ls -i "$$name"); \ - echo "$$sum $${inode%% *} $$name"; \ - done | sort | while read sum inode name; do \ - if [[ $$sum = $$ls ]]; then \ - [[ $$li = $$inode ]] && continue; \ - case $$x in \ - 1) echo 'WARNING: duplicate files found' \ - 'in filesystem! Please fix them.' >&2; \ - echo -n "> $$ln "; \ - ;; \ - 2) echo -n "> $$ln "; \ - ;; \ - 3) echo -n ' '; \ - ;; \ - esac; \ - echo -n "$$name"; \ - x=3; \ - else \ - case $$x in \ - 3) echo; \ - x=2; \ - ;; \ - esac; \ - fi; \ - ls=$$sum; \ - ln=$$name; \ - li=$$inode; \ - done chmod 4511 ${TARGET_DIR}/bin/busybox chmod 1777 ${TARGET_DIR}/tmp @if [ -d ${TARGET_DIR}/usr/share/fonts/X11 ];then \ @@ -52,13 +21,26 @@ image-prepare-post: done; \ fi +KERNEL_PKGDIR:=$(LINUX_BUILD_DIR)/kernel-pkg +KERNEL_PKG:=$(PACKAGE_DIR)/kernel_$(ADK_TARGET)-$(KERNEL_VERSION)_$(CPU_ARCH).$(PKG_SUFFIX) + +kernel-package: $(LINUX_DIR)/vmlinux + $(TRACE) target/$(ADK_TARGET)-create-kernel-package + rm -rf $(KERNEL_PKGDIR) + @mkdir -p $(KERNEL_PKGDIR)/boot + cp $(KERNEL) $(KERNEL_PKGDIR)/boot/vmlinuz-adk + ${BASH} ${SCRIPT_DIR}/make-ipkg-dir.sh ${KERNEL_PKGDIR} \ + ../linux/kernel.control ${ADK_TARGET}-${KERNEL_VERSION} ${CPU_ARCH} + $(PKG_BUILD) $(KERNEL_PKGDIR) $(PACKAGE_DIR) + $(PKG_INSTALL) $(KERNEL_PKG) + INITRAMFS= ${ADK_TARGET}-${ADK_LIBC}-${FS} ROOTFSSQUASHFS= ${ADK_TARGET}-${ADK_LIBC}-${FS}.img ROOTFSTARBALL= ${ADK_TARGET}-${ADK_LIBC}-${FS}+kernel.tar.gz ROOTFSUSERTARBALL= ${ADK_TARGET}-${ADK_LIBC}-${FS}.tar.gz INITRAMFS_PIGGYBACK= ${ADK_TARGET}-${ADK_LIBC}-${FS}.cpio -${BIN_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR} +${BIN_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR} kernel-package cd ${TARGET_DIR}; tar -cf - --owner=0 --group=0 . | gzip -n9 >$@ ${BIN_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR} |