linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] powerpc: Add support for FIT uImages
@ 2009-11-18 20:57 Peter Tyser
  2009-11-18 20:57 ` [PATCH 1/3] powerpc: Use scripts/mkuboot.sh instead of 'mkimage' Peter Tyser
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peter Tyser @ 2009-11-18 20:57 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Peter Tyser, linux-kbuild

These patches add support for creating the "new" FIT uImage type
that U-Boot can use.  Additional info about FIT images can be
found in the doc/uImage.FIT/ directory of the U-Boot source.
Here's a link to a howto which gives an overview of the format:
http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=doc/uImage.FIT/howto.txt;h=8065e9e1d8d4d65a9b5fe0fce08d3709183d0ee4;hb=HEAD

I've only added support for PowerPC, but the arm, avr32, blackfin,
and sh arches could use the same framework in theory.  The change
is especially useful on PowerPC since it creates 1 FIT uImage that
combines the functionality of an "old" uImage format, a device
tree blob, and possibly a ramdisk.

Peter Tyser (3):
  powerpc: Use scripts/mkuboot.sh instead of 'mkimage'
  powerpc: Add support for creating FIT uImages
  powerpc: Add support for ram filesystems in FIT uImages

 arch/powerpc/Makefile        |    4 +-
 arch/powerpc/boot/.gitignore |    1 +
 arch/powerpc/boot/Makefile   |    8 ++-
 arch/powerpc/boot/wrapper    |   39 ++++++++++--
 scripts/mkits.sh             |  144 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 189 insertions(+), 7 deletions(-)
 create mode 100755 scripts/mkits.sh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] powerpc: Use scripts/mkuboot.sh instead of 'mkimage'
  2009-11-18 20:57 [PATCH 0/3] powerpc: Add support for FIT uImages Peter Tyser
@ 2009-11-18 20:57 ` Peter Tyser
  2009-11-18 20:57 ` [PATCH 2/3] powerpc: Add support for creating FIT uImages Peter Tyser
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Tyser @ 2009-11-18 20:57 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Peter Tyser, linux-kbuild

mkuboot.sh provides a basic wrapper for the 'mkimage' utility.  Using
mkuboot.sh provides clearer error reporting and allows a toolchain to
use its own 'mkimage' executable specified by ${CROSS_COMPILE}mkimage.
Additionally, this brings PowerPC in line with other architectures
which already call mkimage via mkuboot.sh.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
---
 arch/powerpc/boot/wrapper |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index ac9e9a5..1ee9448 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -43,6 +43,9 @@ gzip=.gz
 # cross-compilation prefix
 CROSS=
 
+# mkimage wrapper script
+MKIMAGE=$srctree/scripts/mkuboot.sh
+
 # directory for object and other files used by this script
 object=arch/powerpc/boot
 objbin=$object
@@ -263,7 +266,7 @@ membase=`${CROSS}objdump -p "$kernel" | grep -m 1 LOAD | awk '{print $7}'`
 case "$platform" in
 uboot)
     rm -f "$ofile"
-    mkimage -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
+    ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
 	$uboot_version -d "$vmz" "$ofile"
     if [ -z "$cacheit" ]; then
 	rm -f "$vmz"
@@ -323,7 +326,7 @@ coff)
     ;;
 cuboot*)
     gzip -f -9 "$ofile"
-    mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
+    ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
             $uboot_version -d "$ofile".gz "$ofile"
     ;;
 treeboot*)
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] powerpc: Add support for creating FIT uImages
  2009-11-18 20:57 [PATCH 0/3] powerpc: Add support for FIT uImages Peter Tyser
  2009-11-18 20:57 ` [PATCH 1/3] powerpc: Use scripts/mkuboot.sh instead of 'mkimage' Peter Tyser
@ 2009-11-18 20:57 ` Peter Tyser
  2009-11-18 20:57 ` [PATCH 3/3] powerpc: Add support for ram filesystems in " Peter Tyser
  2009-11-18 21:51 ` [PATCH 0/3] powerpc: Add support for " Peter Tyser
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Tyser @ 2009-11-18 20:57 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Peter Tyser, linux-kbuild

Recent U-Boot versions support booting a Flattened Image Tree (FIT)
image format.  The FIT uImage format uses a tree structure to describe a
kernel image as well as supporting device tree blobs, ramdisks, etc.
The 'mkimage' and 'dtc' utilities convert this tree description into a
binary blob that bootloaders such as U-Boot can execute.

This patch adds support for automatically creating a U-Boot FIT image
using the "make uImage.fit.<boardname>" command where <boardname> is
one of arch/powerpc/boot/dts/<boardname>.dts.  The resulting
arch/powerpc/boot/uImage.fit.<boardname> file will contain a kernel
image as well as a device tree blob.  U-Boot versions compiled with FIT
support can directly boot this image using the "bootm" command.

Additional information about the FIT format and its uses can be found in
doc/uImage.FIT/howto.txt of U-Boot's source tree.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
---
 arch/powerpc/Makefile        |    4 +-
 arch/powerpc/boot/.gitignore |    1 +
 arch/powerpc/boot/Makefile   |    5 ++-
 arch/powerpc/boot/wrapper    |   16 ++++++-
 scripts/mkits.sh             |  113 ++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 136 insertions(+), 3 deletions(-)
 create mode 100755 scripts/mkits.sh

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 1a54a3b..459aed5 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -158,7 +158,8 @@ drivers-$(CONFIG_OPROFILE)	+= arch/powerpc/oprofile/
 # Default to zImage, override when needed
 all: zImage
 
-BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.%
+BOOT_TARGETS = zImage zImage.initrd uImage uImage.fit.% zImage% dtbImage% \
+	       treeImage.% cuImage.% simpleImage.%
 
 PHONY += $(BOOT_TARGETS)
 
@@ -185,6 +186,7 @@ define archhelp
   @echo '* zImage          - Build default images selected by kernel config'
   @echo '  zImage.*        - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
   @echo '  uImage          - U-Boot native image format'
+  @echo '  uImage.fit.<dt> - U-Boot Flattened Image Tree image format'
   @echo '  cuImage.<dt>    - Backwards compatible U-Boot image for older'
   @echo '                    versions which do not support device trees'
   @echo '  dtbImage.<dt>   - zImage with an embedded device tree blob'
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore
index 3d80c3e..a443f1c 100644
--- a/arch/powerpc/boot/.gitignore
+++ b/arch/powerpc/boot/.gitignore
@@ -19,6 +19,7 @@ kernel-vmlinux.strip.c
 kernel-vmlinux.strip.gz
 mktree
 uImage
+uImage.fit.*
 cuImage.*
 dtbImage.*
 treeImage.*
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 7bfc8ad..57e4eee 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -307,6 +307,9 @@ $(obj)/zImage.iseries: vmlinux
 $(obj)/uImage: vmlinux $(wrapperbits)
 	$(call if_changed,wrap,uboot)
 
+$(obj)/uImage.fit.%: vmlinux $(obj)/%.dtb $(wrapperbits)
+	$(call if_changed,wrap,uboot.fit,,$(obj)/$*.dtb)
+
 $(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
 	$(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
 
@@ -346,7 +349,7 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
 
 # anything not in $(targets)
 clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
-	zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
+	uImage.* zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
 	zImage.iseries zImage.miboot zImage.pmac zImage.pseries \
 	simpleImage.* otheros.bld *.dtb
 
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 1ee9448..26a971e 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -46,6 +46,9 @@ CROSS=
 # mkimage wrapper script
 MKIMAGE=$srctree/scripts/mkuboot.sh
 
+# script to generate an .its file for uImage.fit.* images
+MKITS=$srctree/scripts/mkits.sh
+
 # directory for object and other files used by this script
 object=arch/powerpc/boot
 objbin=$object
@@ -157,7 +160,7 @@ coff)
     lds=$object/zImage.coff.lds
     link_address='0x500000'
     ;;
-miboot|uboot)
+miboot|uboot|uboot.fit)
     # miboot and U-boot want just the bare bits, not an ELF binary
     ext=bin
     objflags="-O binary"
@@ -273,6 +276,17 @@ uboot)
     fi
     exit 0
     ;;
+uboot.fit)
+    rm -f "$ofile"
+    ${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \
+	-d "$srctree/$dtb" -k "$srctree/$vmz" -o "$object/uImage.its"
+    ${MKIMAGE} -f "$object/uImage.its" "$ofile"
+    rm "$object/uImage.its"
+    if [ -z "$cacheit" ]; then
+	rm -f "$vmz"
+    fi
+    exit 0
+    ;;
 esac
 
 addsec() {
diff --git a/scripts/mkits.sh b/scripts/mkits.sh
new file mode 100755
index 0000000..a438cac
--- /dev/null
+++ b/scripts/mkits.sh
@@ -0,0 +1,113 @@
+#!/bin/bash
+#
+# Licensed under the terms of the GNU GPL License version 2 or later.
+#
+# Author: Peter Tyser <ptyser@xes-inc.com>
+#
+# U-Boot firmware supports the booting of images in the Flattened Image
+# Tree (FIT) format.  The FIT format uses a device tree structure to
+# describe a kernel image, device tree blob, ramdisk, etc.  This script
+# creates an Image Tree Source (.its file) which can be passed to the
+# 'mkimage' utility to generate an Image Tree Blob (.itb file).  The .itb
+# file can then be booted by U-Boot (or other bootloaders which support
+# FIT images).  See doc/uImage.FIT/howto.txt in U-Boot source code for
+# additional information on FIT images.
+#
+
+usage() {
+	echo "Usage: `basename $0` -A arch -C comp -a addr -e entry" \
+		"-v version -k kernel [-d dtb] -o its_file"
+	echo -e "\t-A ==> set architecture to 'arch'"
+	echo -e "\t-C ==> set compression type 'comp'"
+	echo -e "\t-a ==> set load address to 'addr' (hex)"
+	echo -e "\t-e ==> set entry point to 'entry' (hex)"
+	echo -e "\t-v ==> set kernel version to 'version'"
+	echo -e "\t-k ==> include kernel image 'kernel'"
+	echo -e "\t-d ==> include Device Tree Blob 'dtb'"
+	echo -e "\t-o ==> create output file 'its_file'"
+	exit 1
+}
+
+while getopts ":A:C:a:d:e:k:o:v:" OPTION
+do
+	case $OPTION in
+		A ) ARCH=$OPTARG;;
+		C ) COMPRESS=$OPTARG;;
+		a ) LOAD_ADDR=$OPTARG;;
+		d ) DTB=$OPTARG;;
+		e ) ENTRY_ADDR=$OPTARG;;
+		k ) KERNEL=$OPTARG;;
+		o ) OUTPUT=$OPTARG;;
+		v ) VERSION=$OPTARG;;
+		* ) echo "Invalid option passed to '$0' (options:$@)"
+		usage;;
+	esac
+done
+
+# Make sure user entered all required parameters
+if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \
+	[ -z "${ENTRY_ADDR}" ] || [ -z "${VERSION}" ] || [ -z "${KERNEL}" ] || \
+	[ -z "${OUTPUT}" ]; then
+	usage
+fi
+
+# Device trees need the leading '0x' stripped for hex numbers
+LOAD_ADDR=`echo $LOAD_ADDR | sed 's/0x//'`
+ENTRY_ADDR=`echo $ENTRY_ADDR | sed 's/0x//'`
+
+# Create a default, fully populated DTS file
+DATA="/ {
+	description = \"Linux kernel ${VERSION}\";
+	#address-cells = <1>;
+
+	images {
+		kernel@1 {
+			description = \"Linux Kernel ${VERSION}\";
+			data = /incbin/(\"${KERNEL}\");
+			type = \"kernel\";
+			arch = \"${ARCH}\";
+			os = \"linux\";
+			compression = \"${COMPRESS}\";
+			load = <${LOAD_ADDR}>;
+			entry = <${ENTRY_ADDR}>;
+			hash@1 {
+				algo = \"crc32\";
+			};
+			hash@2 {
+				algo = \"sha1\";
+			};
+		};
+
+		fdt@1 { /* start fdt */
+			description = \"Flattened Device Tree blob\";
+			data = /incbin/(\"${DTB}\");
+			type = \"flat_dt\";
+			arch = \"${ARCH}\";
+			compression = \"none\";
+			hash@1 {
+				algo = \"crc32\";
+			};
+			hash@2 {
+				algo = \"sha1\";
+			};
+		}; /* end fdt */
+
+	configurations {
+		default = \"config@1\";
+		config@1 {
+			description = \"Default Linux kernel\";
+			kernel = \"kernel@1\";
+			fdt = \"fdt@1\";
+			ramdisk = \"ramdisk@1\";
+		};
+	};
+};"
+
+# Conditionally strip fdt information out of tree
+if [ -z "${DTB}" ]; then
+	DATA=`echo "$DATA" | sed '/start fdt/,/end fdt/d'`
+	DATA=`echo "$DATA" | sed '/fdt/d'`
+fi
+
+# Write .its file to disk
+echo "$DATA" > ${OUTPUT}
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] powerpc: Add support for ram filesystems in FIT uImages
  2009-11-18 20:57 [PATCH 0/3] powerpc: Add support for FIT uImages Peter Tyser
  2009-11-18 20:57 ` [PATCH 1/3] powerpc: Use scripts/mkuboot.sh instead of 'mkimage' Peter Tyser
  2009-11-18 20:57 ` [PATCH 2/3] powerpc: Add support for creating FIT uImages Peter Tyser
@ 2009-11-18 20:57 ` Peter Tyser
  2009-11-18 21:51 ` [PATCH 0/3] powerpc: Add support for " Peter Tyser
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Tyser @ 2009-11-18 20:57 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Peter Tyser, linux-kbuild

The PowerPC architecture has the ability to embed the ramdisk located
at arch/powerpc/boot/ramdisk.image.gz into a bootable kernel image.  If
the bootable kernel is in the Flattened Image Tree (FIT) format, the
ramdisk should be a node in the tree instead of being embedded directly
in the kernel executable.

A FIT uImage with a ram filesystem can be generated using the command:
"make uImage.fit.initrd.<boardname>" where <boardname> is one of
arch/powerpc/boot/dts/<boardname>.dts.  The command will generate a FIT
uImage at arch/powerpc/boot/uImage.fit.initrd.<boardname> that contains
a kernel image, device tree blob, and a ram filesystem.

The ramdisk at arch/powerpc/boot/ramdisk.image.gz can either be an older
style "ramdisk" or a newer "ramfs" gzipped cpio archive.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
---
 arch/powerpc/boot/Makefile |    3 +++
 arch/powerpc/boot/wrapper  |   20 ++++++++++++++++----
 scripts/mkits.sh           |   35 +++++++++++++++++++++++++++++++++--
 3 files changed, 52 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 57e4eee..c2b6c25 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -310,6 +310,9 @@ $(obj)/uImage: vmlinux $(wrapperbits)
 $(obj)/uImage.fit.%: vmlinux $(obj)/%.dtb $(wrapperbits)
 	$(call if_changed,wrap,uboot.fit,,$(obj)/$*.dtb)
 
+$(obj)/uImage.fit.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
+	$(call if_changed,wrap,uboot.fit,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
+
 $(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
 	$(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
 
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 26a971e..8027ef9 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -266,6 +266,9 @@ fi
 # physical offset of kernel image
 membase=`${CROSS}objdump -p "$kernel" | grep -m 1 LOAD | awk '{print $7}'`
 
+# Size of uncompressed kernel is needed to calculate ramdisk location in RAM
+kernsize=`${CROSS}objdump -p "$kernel" | grep -m 1 rwx | awk '{print $4}'`
+
 case "$platform" in
 uboot)
     rm -f "$ofile"
@@ -278,8 +281,14 @@ uboot)
     ;;
 uboot.fit)
     rm -f "$ofile"
-    ${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \
-	-d "$srctree/$dtb" -k "$srctree/$vmz" -o "$object/uImage.its"
+    if [ -n "$initrd" ]; then
+	${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \
+	    -d "$srctree/$dtb" -k "$srctree/$vmz" -r "$srctree/$initrd" \
+	    -l $kernsize -o "$object/uImage.its"
+    else
+	${MKITS} -A ppc -C gzip -a $membase -e $membase -v $version \
+	    -d "$srctree/$dtb" -k "$srctree/$vmz" -o "$object/uImage.its"
+    fi
     ${MKIMAGE} -f "$object/uImage.its" "$ofile"
     rm "$object/uImage.its"
     if [ -z "$cacheit" ]; then
@@ -300,8 +309,11 @@ if [ -z "$cacheit" ]; then
     rm -f "$vmz"
 fi
 
-if [ -n "$initrd" ]; then
-    addsec $tmp "$initrd" $isection
+# FIT images have the initrd in the image tree structure
+if [ "$platform" != "uboot.fit" ]; then
+    if [ -n "$initrd" ]; then
+	addsec $tmp "$initrd" $isection
+    fi
 fi
 
 if [ -n "$dtb" ]; then
diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index a438cac..88411dd 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -16,7 +16,8 @@
 
 usage() {
 	echo "Usage: `basename $0` -A arch -C comp -a addr -e entry" \
-		"-v version -k kernel [-d dtb] -o its_file"
+		"-v version -k kernel [-d dtb] [-r ramfs -l ramfs_addr]" \
+		"-o its_file"
 	echo -e "\t-A ==> set architecture to 'arch'"
 	echo -e "\t-C ==> set compression type 'comp'"
 	echo -e "\t-a ==> set load address to 'addr' (hex)"
@@ -24,11 +25,13 @@ usage() {
 	echo -e "\t-v ==> set kernel version to 'version'"
 	echo -e "\t-k ==> include kernel image 'kernel'"
 	echo -e "\t-d ==> include Device Tree Blob 'dtb'"
+	echo -e "\t-r ==> include initrd/initramfs 'ramfs'"
+	echo -e "\t-l ==> load initrd/initramfs at 'ramfs_addr'"
 	echo -e "\t-o ==> create output file 'its_file'"
 	exit 1
 }
 
-while getopts ":A:C:a:d:e:k:o:v:" OPTION
+while getopts ":A:C:a:d:e:k:l:o:r:v:" OPTION
 do
 	case $OPTION in
 		A ) ARCH=$OPTARG;;
@@ -37,7 +40,9 @@ do
 		d ) DTB=$OPTARG;;
 		e ) ENTRY_ADDR=$OPTARG;;
 		k ) KERNEL=$OPTARG;;
+		l ) RAMFS_ADDR=$OPTARG;;
 		o ) OUTPUT=$OPTARG;;
+		r ) RAMFS=$OPTARG;;
 		v ) VERSION=$OPTARG;;
 		* ) echo "Invalid option passed to '$0' (options:$@)"
 		usage;;
@@ -49,11 +54,14 @@ if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \
 	[ -z "${ENTRY_ADDR}" ] || [ -z "${VERSION}" ] || [ -z "${KERNEL}" ] || \
 	[ -z "${OUTPUT}" ]; then
 	usage
+elif [ -n "${RAMFS}" ] && [ -z "${RAMFS_ADDR}" ]; then
+	usage
 fi
 
 # Device trees need the leading '0x' stripped for hex numbers
 LOAD_ADDR=`echo $LOAD_ADDR | sed 's/0x//'`
 ENTRY_ADDR=`echo $ENTRY_ADDR | sed 's/0x//'`
+RAMFS_ADDR=`echo $RAMFS_ADDR | sed 's/0x//'`
 
 # Create a default, fully populated DTS file
 DATA="/ {
@@ -92,6 +100,23 @@ DATA="/ {
 			};
 		}; /* end fdt */
 
+		ramdisk@1 { /* start ramdisk */
+			description = \"ramdisk\";
+			data = /incbin/(\"${RAMFS}\");
+			type = \"ramdisk\";
+			arch = \"${ARCH}\";
+			os = \"linux\";
+			load = <${RAMFS_ADDR}>;
+			compression = \"none\";
+			hash@1 {
+				algo = \"crc32\";
+			};
+			hash@2 {
+				algo = \"sha1\";
+			};
+		}; /* end ramdisk */
+	};
+
 	configurations {
 		default = \"config@1\";
 		config@1 {
@@ -103,6 +128,12 @@ DATA="/ {
 	};
 };"
 
+# Conditionally strip ramfs information out of tree
+if [ -z "${RAMFS}" ]; then
+	DATA=`echo "$DATA" | sed '/start ramdisk/,/end ramdisk/d'`
+	DATA=`echo "$DATA" | sed '/ramdisk/d'`
+fi
+
 # Conditionally strip fdt information out of tree
 if [ -z "${DTB}" ]; then
 	DATA=`echo "$DATA" | sed '/start fdt/,/end fdt/d'`
-- 
1.6.2.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] powerpc: Add support for FIT uImages
  2009-11-18 20:57 [PATCH 0/3] powerpc: Add support for FIT uImages Peter Tyser
                   ` (2 preceding siblings ...)
  2009-11-18 20:57 ` [PATCH 3/3] powerpc: Add support for ram filesystems in " Peter Tyser
@ 2009-11-18 21:51 ` Peter Tyser
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Tyser @ 2009-11-18 21:51 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: linux-kbuild

On Wed, 2009-11-18 at 14:57 -0600, Peter Tyser wrote:
> These patches add support for creating the "new" FIT uImage type
> that U-Boot can use.  Additional info about FIT images can be
> found in the doc/uImage.FIT/ directory of the U-Boot source.
> Here's a link to a howto which gives an overview of the format:
> http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=doc/uImage.FIT/howto.txt;h=8065e9e1d8d4d65a9b5fe0fce08d3709183d0ee4;hb=HEAD
> 
> I've only added support for PowerPC, but the arm, avr32, blackfin,
> and sh arches could use the same framework in theory.  The change
> is especially useful on PowerPC since it creates 1 FIT uImage that
> combines the functionality of an "old" uImage format, a device
> tree blob, and possibly a ramdisk.
> 
> Peter Tyser (3):
>   powerpc: Use scripts/mkuboot.sh instead of 'mkimage'
>   powerpc: Add support for creating FIT uImages
>   powerpc: Add support for ram filesystems in FIT uImages
> 
>  arch/powerpc/Makefile        |    4 +-
>  arch/powerpc/boot/.gitignore |    1 +
>  arch/powerpc/boot/Makefile   |    8 ++-
>  arch/powerpc/boot/wrapper    |   39 ++++++++++--
>  scripts/mkits.sh             |  144 ++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 189 insertions(+), 7 deletions(-)
>  create mode 100755 scripts/mkits.sh

Just realized I missed /Documentation/powerpc/bootwrapper.txt in this
series.  I'll wait for feedback and roll the documentation update and
any other requested changes into v2.

Sorry for the noise,
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-18 21:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-18 20:57 [PATCH 0/3] powerpc: Add support for FIT uImages Peter Tyser
2009-11-18 20:57 ` [PATCH 1/3] powerpc: Use scripts/mkuboot.sh instead of 'mkimage' Peter Tyser
2009-11-18 20:57 ` [PATCH 2/3] powerpc: Add support for creating FIT uImages Peter Tyser
2009-11-18 20:57 ` [PATCH 3/3] powerpc: Add support for ram filesystems in " Peter Tyser
2009-11-18 21:51 ` [PATCH 0/3] powerpc: Add support for " Peter Tyser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).