diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/build.mk | 2 | ||||
-rw-r--r-- | mk/image.mk | 47 | ||||
-rw-r--r-- | mk/kernel-build.mk | 5 | ||||
-rw-r--r-- | mk/rootfs.mk | 2 |
4 files changed, 50 insertions, 6 deletions
diff --git a/mk/build.mk b/mk/build.mk index ad2d42b40..f20b4e59e 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -100,7 +100,7 @@ POSTCONFIG= -@\ touch .rebuild.busybox;\ rebuild=1;\ fi; \ - for i in ADK_RUNTIME_PASSWORD ADK_RUNTIME_TMPFS_SIZE ADK_RUNTIME_HOSTNAME ADK_TARGET_ROOTFS ADK_RUNTIME_CONSOLE;do \ + for i in ADK_RUNTIME_PASSWORD ADK_RUNTIME_TMPFS_SIZE ADK_RUNTIME_HOSTNAME ADK_TARGET_ROOTFS ADK_RUNTIME_CONSOLE ADK_TARGET_QEMU_MICROBLAZE_MODEL;do \ if [ "$$(grep ^$$i .config|md5sum)" != "$$(grep ^$$i .config.old|md5sum)" ];then \ touch .rebuild.base-files;\ rebuild=1;\ diff --git a/mk/image.mk b/mk/image.mk index 7c519d7f5..79d6102c6 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -119,6 +119,7 @@ ifeq ($(ADK_HARDWARE_QEMU),y) TARGET_KERNEL= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_FS}-kernel INITRAMFS= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS} ROOTFSSQUASHFS= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.img +ROOTFSJFFS2= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-jffs2.img ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.gz ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.gz ROOTFSISO= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.iso @@ -126,6 +127,7 @@ else TARGET_KERNEL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_FS}-kernel INITRAMFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS} ROOTFSSQUASHFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.img +ROOTFSJFFS2= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-jffs2.img ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.gz ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.gz ROOTFSISO= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.iso @@ -161,41 +163,76 @@ ${BIN_DIR}/${INITRAMFS}: ${BIN_DIR}/${INITRAMFS}_list ${BUILD_DIR}/root.squashfs: ${TARGET_DIR} ${STAGING_HOST_DIR}/bin/mksquashfs ${TARGET_DIR} \ - ${BUILD_DIR}/root.squashfs \ + ${BUILD_DIR}/root.squashfs -comp xz \ -nopad -noappend -root-owned $(MAKE_TRACE) +${BIN_DIR}/${ROOTFSJFFS2}: ${TARGET_DIR} + ${STAGING_HOST_DIR}/bin/mkfs.jffs2 $(ADK_JFFS2_OPTS) -q -r ${TARGET_DIR} \ + --pad=$(ADK_TARGET_MTD_SIZE) -o ${BIN_DIR}/${ROOTFSJFFS2} $(MAKE_TRACE) + createinitramfs: ${BIN_DIR}/${INITRAMFS}_list ${SED} 's/.*CONFIG_(BLK_DEV_INITRD|INITRAMFS_SOURCE|INITRAMFS_COMPRESSION).*//' \ ${LINUX_DIR}/.config ( \ echo "CONFIG_BLK_DEV_INITRD=y"; \ echo 'CONFIG_INITRAMFS_SOURCE="${BIN_DIR}/${INITRAMFS}_list"'; \ - echo 'CONFIG_INITRAMFS_COMPRESSION_NONE is not set' >> ${LINUX_DIR}/.config; \ + echo '# CONFIG_INITRAMFS_COMPRESSION_NONE is not set' >> ${LINUX_DIR}/.config; \ + echo 'CONFIG_INITRAMFS_ROOT_UID=0' >> ${LINUX_DIR}/.config; \ + echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> ${LINUX_DIR}/.config; \ ) >> ${LINUX_DIR}/.config ifeq ($(ADK_KERNEL_COMP_XZ),y) + echo "CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config echo "CONFIG_RD_XZ=y" >> ${LINUX_DIR}/.config echo "CONFIG_INITRAMFS_COMPRESSION_XZ=y" >> ${LINUX_DIR}/.config + echo "CONFIG_XZ_DEC_X86=n" >> ${LINUX_DIR}/.config + echo "CONFIG_XZ_DEC_POWERPC=n" >> ${LINUX_DIR}/.config + echo "CONFIG_XZ_DEC_IA64=n" >> ${LINUX_DIR}/.config + echo "CONFIG_XZ_DEC_ARM=n" >> ${LINUX_DIR}/.config + echo "CONFIG_XZ_DEC_ARMTHUMB=n" >> ${LINUX_DIR}/.config + echo "CONFIG_XZ_DEC_SPARC=n" >> ${LINUX_DIR}/.config + echo "CONFIG_XZ_DEC_TEST=n" >> ${LINUX_DIR}/.config endif ifeq ($(ADK_KERNEL_COMP_LZMA),y) + echo "CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config echo "CONFIG_RD_LZMA=y" >> ${LINUX_DIR}/.config echo "CONFIG_INITRAMFS_COMPRESSION_LZMA=y" >> ${LINUX_DIR}/.config endif ifeq ($(ADK_KERNEL_COMP_LZO),y) + echo "CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config echo "CONFIG_RD_LZO=y" >> ${LINUX_DIR}/.config echo "CONFIG_INITRAMFS_COMPRESSION_LZO=y" >> ${LINUX_DIR}/.config endif ifeq ($(ADK_KERNEL_COMP_GZIP),y) + echo "CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config echo "CONFIG_RD_GZIP=y" >> ${LINUX_DIR}/.config echo "CONFIG_INITRAMFS_COMPRESSION_GZIP=y" >> ${LINUX_DIR}/.config endif ifeq ($(ADK_KERNEL_COMP_BZIP2),y) + echo "CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config + echo "CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config echo "CONFIG_RD_BZIP2=y" >> ${LINUX_DIR}/.config echo "CONFIG_INITRAMFS_COMPRESSION_BZIP2=y" >> ${LINUX_DIR}/.config endif @-rm $(LINUX_DIR)/usr/initramfs_data.cpio* 2>/dev/null - echo N | \ - $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ - ARCH=$(ARCH) CC="$(TARGET_CC)" -j${ADK_MAKE_JOBS} oldconfig $(MAKE_TRACE) $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH=$(ARCH) CC="$(TARGET_CC)" -j${ADK_MAKE_JOBS} $(ADK_TARGET_KERNEL) $(MAKE_TRACE) diff --git a/mk/kernel-build.mk b/mk/kernel-build.mk index 59a68eb88..8fe0799a0 100644 --- a/mk/kernel-build.mk +++ b/mk/kernel-build.mk @@ -35,8 +35,13 @@ $(LINUX_DIR)/.prepared: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PK $(LINUX_DIR)/.config: $(LINUX_DIR)/.prepared $(BUILD_DIR)/.kernelconfig $(TOPDIR)/mk/modules.mk $(TRACE) target/$(ADK_TARGET_ARCH)-kernel-configure -for f in $(TARGETS);do if [ -f $$f ];then rm $$f;fi;done +ifeq ($(ADK_USE_KERNEL_MINICONFIG),y) + $(CP) $(BUILD_DIR)/.kernelconfig $(LINUX_DIR)/mini.config + ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} KCONFIG_ALLCONFIG=mini.config allnoconfig $(MAKE_TRACE) +else $(CP) $(BUILD_DIR)/.kernelconfig $(LINUX_DIR)/.config echo N | ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} oldconfig $(MAKE_TRACE) +endif ${KERNEL_MAKE_ENV} $(MAKE) ${KERNEL_MAKE_OPTS} prepare scripts $(MAKE_TRACE) touch -c $(LINUX_DIR)/.config diff --git a/mk/rootfs.mk b/mk/rootfs.mk index 18d4f83dc..3bbe31f25 100644 --- a/mk/rootfs.mk +++ b/mk/rootfs.mk @@ -9,6 +9,7 @@ endif endef ifeq ($(ADK_HARDWARE_QEMU),y) +MTDDEV:= root=/dev/mtdblock0 ifeq ($(ADK_TARGET_ROOTFS_ARCHIVE),y) ROOTFS:= root=/dev/sda1 endif @@ -50,6 +51,7 @@ $(eval $(call rootfs_template,initramfs,INITRAMFS)) $(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK)) $(eval $(call rootfs_template,squashfs,SQUASHFS,$(ROOTFS))) $(eval $(call rootfs_template,yaffs,YAFFS,$(MTDDEV) panic=3)) +$(eval $(call rootfs_template,jffs2,JFFS2,$(MTDDEV) rootfstype=jffs2)) $(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp init=/init)) $(eval $(call rootfs_template,encrypted,ENCRYPTED)) $(eval $(call rootfs_template,iso,ISO)) |