diff options
-rw-r--r-- | mk/image.mk | 43 | ||||
-rwxr-xr-x | package/base-files/src/init | 1 | ||||
-rw-r--r-- | target/arm/Makefile | 2 | ||||
-rw-r--r-- | target/avr32/Makefile | 2 | ||||
-rw-r--r-- | target/cris/Makefile | 2 | ||||
-rw-r--r-- | target/mips/Makefile | 2 | ||||
-rw-r--r-- | target/native/Makefile | 2 | ||||
-rw-r--r-- | target/ppc/Makefile | 2 | ||||
-rw-r--r-- | target/ppc64/Makefile | 2 | ||||
-rw-r--r-- | target/sh/Makefile | 2 | ||||
-rw-r--r-- | target/sparc/Makefile | 2 | ||||
-rw-r--r-- | target/sparc64/Makefile | 2 | ||||
-rw-r--r-- | target/x86/Makefile | 2 | ||||
-rw-r--r-- | target/x86_64/Makefile | 2 |
14 files changed, 37 insertions, 31 deletions
diff --git a/mk/image.mk b/mk/image.mk index e6dd06a82..4ea8ab235 100644 --- a/mk/image.mk +++ b/mk/image.mk @@ -71,14 +71,12 @@ 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 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 -INITRAMFS_PIGGYBACK= ${ADK_TARGET_SYSTEM}-$(CPU_ARCH)-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.cpio 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 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 -INITRAMFS_PIGGYBACK= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.cpio endif ${BIN_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR} kernel-package @@ -91,29 +89,38 @@ ${BIN_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR} sed "s#\(.*\)#:0:0::::::\1#" | sort | \ ${TOOLS_DIR}/cpio -o -Hustar -P | gzip -n9 >$@ -${BIN_DIR}/${INITRAMFS}: ${TARGET_DIR} - cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | \ - sed "s#\(.*\)#:0:0::::::\1#" | sort | \ - ${TOOLS_DIR}/cpio -o -C512 -Hnewc -P | \ - xz -C crc32 >$@ 2>/dev/null +${BIN_DIR}/${INITRAMFS}_list: ${TARGET_DIR} + sh ${LINUX_DIR}/scripts/gen_initramfs_list.sh -u squash -g squash \ + ${TARGET_DIR}/ >$@ + ( \ + echo "nod /dev/console 0644 0 0 c 5 1"; \ + echo "nod /dev/tty 0644 0 0 c 5 0"; \ + for i in 0 1 2 3 4; do \ + echo "nod /dev/tty$$i 0644 0 0 c 4 $i"; \ + done \ + echo "nod /dev/systty 0644 0 0 c 4 0"; \ + echo "nod /dev/null 0644 0 0 c 1 3"; \ + echo "nod /dev/ram 0655 0 0 b 1 1"; \ + ) >>$@ -${BUILD_DIR}/${INITRAMFS_PIGGYBACK}: ${TARGET_DIR} - ${SED} 's/.*CONFIG_(BLK_DEV_INITRD|INITRAMFS_SOURCE).*//' \ - ${LINUX_DIR}/.config - echo "CONFIG_BLK_DEV_INITRD=y" >> ${LINUX_DIR}/.config - echo 'CONFIG_INITRAMFS_SOURCE="${BUILD_DIR}/${INITRAMFS_PIGGYBACK}"' >> \ - ${LINUX_DIR}/.config - cp $(TOPDIR)/scripts/dev.cpio $@ - cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | \ - sed "s#\(.*\)#:0:0::::::\1#" | sort | \ - ${TOOLS_DIR}/cpio -o -C512 -Hnewc -A -P -O $@ 2>/dev/null +${BIN_DIR}/${INITRAMFS}: ${BIN_DIR}/${INITRAMFS}_list + sh ${LINUX_DIR}/usr/gen_init_cpio ${BIN_DIR}/${INITRAMFS}_list | \ + gzip -9 -c >$@ ${BUILD_DIR}/root.squashfs: ${TARGET_DIR} ${STAGING_HOST_DIR}/bin/mksquashfs ${TARGET_DIR} \ ${BUILD_DIR}/root.squashfs \ -nopad -noappend -root-owned $(MAKE_TRACE) -createinitramfs: +createinitramfs: ${BIN_DIR}/${INITRAMFS}_list + ${SED} 's/.*CONFIG_(BLK_DEV_INITRD|INITRAMFS_SOURCE).*//' \ + ${LINUX_DIR}/.config + ( \ + echo "CONFIG_BLK_DEV_INITRD=y"; \ + echo 'CONFIG_INITRAMFS_SOURCE="${BIN_DIR}/${INITRAMFS}_list"'; \ + echo "CONFIG_INITRAMFS_COMPRESSION_GZIP=y"; \ + ) >> ${LINUX_DIR}/.config + @-rm $(LINUX_DIR)/usr/initramfs_data.cpio* $(MAKE_TRACE) echo N | \ $(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \ diff --git a/package/base-files/src/init b/package/base-files/src/init index 98d24c834..537a65352 100755 --- a/package/base-files/src/init +++ b/package/base-files/src/init @@ -14,7 +14,6 @@ mount -o remount,nosuid,size=128k,mode=0755 -t tmpfs mdev /dev [ -d /dev/shm ] || mkdir /dev/shm mount -o nosuid,noexec -t tmpfs tmpfs /dev/shm mount -o nosuid,noexec -t devpts devpts /dev/pts -exec 0<>/dev/console >&0 2>&0 echo >/dev/mdev.seq echo "/sbin/mdev" >/proc/sys/kernel/hotplug mdev -s diff --git a/target/arm/Makefile b/target/arm/Makefile index 9a0fb2459..0da655e9f 100644 --- a/target/arm/Makefile +++ b/target/arm/Makefile @@ -74,7 +74,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL) @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_TARGET_SYSTEM_QEMU_ARM),y) diff --git a/target/avr32/Makefile b/target/avr32/Makefile index c1ba25591..f33b0d854 100644 --- a/target/avr32/Makefile +++ b/target/avr32/Makefile @@ -22,7 +22,7 @@ imageinstall: $(BIN_DIR)/$(INITRAMFS) @echo 'The initramfs image is: ${BIN_DIR}/${INITRAMFS}' endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' endif diff --git a/target/cris/Makefile b/target/cris/Makefile index 21cf33c85..34e5ce542 100644 --- a/target/cris/Makefile +++ b/target/cris/Makefile @@ -66,7 +66,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_CRIS),y) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_TARGET_SYSTEM_QEMU_CRIS),y) diff --git a/target/mips/Makefile b/target/mips/Makefile index 215bb8e01..876c39352 100644 --- a/target/mips/Makefile +++ b/target/mips/Makefile @@ -131,7 +131,7 @@ ifneq ($(ADK_HARDWARE_QEMU),) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL) @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' ifneq ($(ADK_HARDWARE_QEMU),) diff --git a/target/native/Makefile b/target/native/Makefile index a36e26bb8..7d267a292 100644 --- a/target/native/Makefile +++ b/target/native/Makefile @@ -21,7 +21,7 @@ imageinstall: $(BIN_DIR)/$(INITRAMFS) @echo 'The initramfs image is: ${BIN_DIR}/${INITRAMFS}' endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: ${BIN_DIR}/${TARGET_KERNEL}' endif diff --git a/target/ppc/Makefile b/target/ppc/Makefile index 47a4b7df1..bbf95008f 100644 --- a/target/ppc/Makefile +++ b/target/ppc/Makefile @@ -33,7 +33,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC),y) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC),y) diff --git a/target/ppc64/Makefile b/target/ppc64/Makefile index 0e9ac9547..7f84cbfe4 100644 --- a/target/ppc64/Makefile +++ b/target/ppc64/Makefile @@ -26,7 +26,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC64),y) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_TARGET_SYSTEM_QEMU_PPC64),y) diff --git a/target/sh/Makefile b/target/sh/Makefile index 63a237839..86570eaeb 100644 --- a/target/sh/Makefile +++ b/target/sh/Makefile @@ -26,7 +26,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH),y) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_TARGET_SYSTEM_QEMU_SH),y) diff --git a/target/sparc/Makefile b/target/sparc/Makefile index 7a19300b4..010f6e3d7 100644 --- a/target/sparc/Makefile +++ b/target/sparc/Makefile @@ -32,7 +32,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC),y) diff --git a/target/sparc64/Makefile b/target/sparc64/Makefile index d3d46d571..d61633f6a 100644 --- a/target/sparc64/Makefile +++ b/target/sparc64/Makefile @@ -32,7 +32,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_TARGET_SYSTEM_QEMU_SPARC64),y) diff --git a/target/x86/Makefile b/target/x86/Makefile index dc17f0756..aa5bdc2d7 100644 --- a/target/x86/Makefile +++ b/target/x86/Makefile @@ -47,7 +47,7 @@ ifeq ($(ADK_HARDWARE_QEMU),y) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/${TARGET_KERNEL} @echo 'The kernel+initramfs file is: $(BIN_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_HARDWARE_QEMU),y) diff --git a/target/x86_64/Makefile b/target/x86_64/Makefile index 9a834219e..c5e488943 100644 --- a/target/x86_64/Makefile +++ b/target/x86_64/Makefile @@ -36,7 +36,7 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y) endif endif ifeq ($(ADK_TARGET_FS),initramfs-piggyback) -imageinstall: ${BUILD_DIR}/${INITRAMFS_PIGGYBACK} createinitramfs +imageinstall: createinitramfs @cp $(KERNEL) $(BIN_DIR)/$(TARGET_KERNEL) @echo 'The kernel file is: $(BIN_DIR)/${TARGET_KERNEL}' ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y) |