diff options
author | Bernhard Walle <walle@corscience.de> | 2012-02-09 18:20:31 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-02-14 09:11:54 +0100 |
commit | d6e1d08398c2210a6c5ac21f10dfb40be2b3f9d2 (patch) | |
tree | 0df82eb63b596f89b20ad0787704800fd5cfd61b | |
parent | f65960a6316e2c4713b7508cda16f2fcc392605b (diff) | |
download | ptxdist-d6e1d08398c2210a6c5ac21f10dfb40be2b3f9d2.tar.gz ptxdist-d6e1d08398c2210a6c5ac21f10dfb40be2b3f9d2.tar.xz |
platforms: Make it possible to create a uRamdisk with an initramfs
This patch adds a choice to make it possible to create the uRamdisk file
not as initrd but as initramfs. One advantage is that you don't have to
know the maximum size in advance.
The patch also beautifies the output a bit (all other images are created
silently, so we can also run this mkimage silently).
Signed-off-by: Bernhard Walle <walle@corscience.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | platforms/image_uimage.in | 26 | ||||
-rw-r--r-- | rules/post/image_uramdisk.make | 14 |
2 files changed, 35 insertions, 5 deletions
diff --git a/platforms/image_uimage.in b/platforms/image_uimage.in index 62119c4c0..e273726df 100644 --- a/platforms/image_uimage.in +++ b/platforms/image_uimage.in @@ -4,13 +4,35 @@ menuconfig IMAGE_UIMAGE bool prompt "Generate images/uRamdisk " select HOST_UMKIMAGE - select IMAGE_EXT2 - select IMAGE_EXT2_GZIP help The file images/uRamdisk can be loaded separatly by the bootloader U-Boot if IMAGE_UIMAGE +choice + prompt "Type of uRamdisk" + default IMAGE_UIMAGE_RAMDISK + help + specify the type of the uRamdisk that is used. + +config IMAGE_UIMAGE_RAMDISK + bool + prompt "ramdisk" + select IMAGE_EXT2 + select IMAGE_EXT2_GZIP + help + Use a gzip-compressed ext2 ramdisk image. + +config IMAGE_UIMAGE_INITRAMFS + bool + prompt "initramfs" + select IMAGE_CPIO + select IMAGE_CPIO_GZ + help + Use a gzip-compressed initramfs (cpio). + +endchoice + config IMAGE_UIMAGE_NAME string default "Application Ramdisk" diff --git a/rules/post/image_uramdisk.make b/rules/post/image_uramdisk.make index 2dc70ba1f..3de62c1aa 100644 --- a/rules/post/image_uramdisk.make +++ b/rules/post/image_uramdisk.make @@ -21,11 +21,19 @@ else MKIMAGE_ARCH := $(PTXCONF_ARCH_STRING) endif +ifdef PTXCONF_IMAGE_UIMAGE_RAMDISK +URAMDISK_IMAGEFILE := $(IMAGEDIR)/root.ext2.gz +endif + +ifdef PTXCONF_IMAGE_UIMAGE_INITRAMFS +URAMDISK_IMAGEFILE := $(IMAGEDIR)/root.cpio.gz +endif + # # TODO # -$(IMAGEDIR)/uRamdisk: $(IMAGEDIR)/root.ext2.gz - @echo -n "Creating U-Boot ramdisk from root.ext2.gz..."; +$(IMAGEDIR)/uRamdisk: $(URAMDISK_IMAGEFILE) + @echo -n "Creating U-Boot ramdisk from $(notdir $(URAMDISK_IMAGEFILE))..."; @$(PTXCONF_SYSROOT_HOST)/bin/mkimage \ -A $(MKIMAGE_ARCH) \ -O Linux \ @@ -33,7 +41,7 @@ $(IMAGEDIR)/uRamdisk: $(IMAGEDIR)/root.ext2.gz -C gzip \ -n $(PTXCONF_IMAGE_UIMAGE_NAME) \ -d $< \ - $@ + $@ > /dev/null @echo "done." # vim: syntax=make |