{"id":280,"url":"http://patchwork.ozlabs.org/api/1.0/patches/280/?format=json","project":{"id":2,"url":"http://patchwork.ozlabs.org/api/1.0/projects/2/?format=json","name":"Linux PPC development","link_name":"linuxppc-dev","list_id":"linuxppc-dev.lists.ozlabs.org","list_email":"linuxppc-dev@lists.ozlabs.org","web_url":"https://github.com/linuxppc/wiki/wiki","scm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git","webscm_url":"https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/"},"msgid":"<1221504833-5096-1-git-send-email-jacmet@sunsite.dk>","date":"2008-09-15T18:53:53","name":"bootwrapper: support u-boot multi component images","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":true,"hash":"fa0ffc2df6f77bf5f259fe1172e9d158b0d16408","submitter":{"id":103,"url":"http://patchwork.ozlabs.org/api/1.0/people/103/?format=json","name":"Peter Korsgaard","email":"jacmet@sunsite.dk"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1221504833-5096-1-git-send-email-jacmet@sunsite.dk/mbox/","series":[],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/280/checks/","tags":{},"headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org>","X-Original-To":["patchwork@ozlabs.org","linuxppc-dev@ozlabs.org"],"Delivered-To":["patchwork@ozlabs.org","linuxppc-dev@ozlabs.org"],"Received":["from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 8D2DBDE5E6\n\tfor <patchwork@ozlabs.org>; Tue, 16 Sep 2008 04:54:17 +1000 (EST)","from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27])\n\tby ozlabs.org (Postfix) with ESMTP id 22C7ADE291\n\tfor <linuxppc-dev@ozlabs.org>; Tue, 16 Sep 2008 04:53:58 +1000 (EST)","by ey-out-2122.google.com with SMTP id 6so968391eyi.15\n\tfor <linuxppc-dev@ozlabs.org>; Mon, 15 Sep 2008 11:53:56 -0700 (PDT)","by 10.210.109.20 with SMTP id h20mr10572721ebc.129.1221504836808; \n\tMon, 15 Sep 2008 11:53:56 -0700 (PDT)","from macbook.be.48ers.dk ( [88.197.163.5])\n\tby mx.google.com with ESMTPS id\n\tf13sm6661530gvd.10.2008.09.15.11.53.55\n\t(version=TLSv1/SSLv3 cipher=RC4-MD5);\n\tMon, 15 Sep 2008 11:53:55 -0700 (PDT)","by macbook.be.48ers.dk (Postfix, from userid 1000)\n\tid E58EC98C147; Mon, 15 Sep 2008 20:53:53 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; \n\th=domainkey-signature:received:received:received:from:to:cc:subject\n\t:date:message-id:x-mailer:sender;\n\tbh=eziJ8NHJQlR/nn2646pYeN61BtjyPA6d0HFEiemP/fM=;\n\tb=iKvYlz9FJyC4Z3SbT61C0mgPYSKLNL5PGkgaViUoxCwobqOThkdn01KoWvAmIWBV++\n\t9bKO7C/089cO2Z+p+stzS6yfkz5Y2OPru6f976loJxJJ4Ke+BD1eZafoQ2QHHzNhtJA3\n\tk0mlBNctCjfkWi8lPHr5srDq40/zAAiK1WODg=","DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\n\th=from:to:cc:subject:date:message-id:x-mailer:sender;\n\tb=JXbPfRYEu2iy45WFUvv9imkdpLQHhVJjReN6ae4r0L0k/ybp7BuYOaJ9HCksgUEGam\n\topQn73TB+e+RoY6CZSAzYON1L/znFcDdDRWGcZtAkh+578TH7QtyeRzp/LvJ712nZtlW\n\tkoS5RO48awOVzX7Z9eqimCza4i9Al+/s05ij0=","From":"Peter Korsgaard <jacmet@sunsite.dk>","To":"linuxppc-dev@ozlabs.org","Subject":"[PATCH] bootwrapper: support u-boot multi component images","Date":"Mon, 15 Sep 2008 20:53:53 +0200","Message-Id":"<1221504833-5096-1-git-send-email-jacmet@sunsite.dk>","X-Mailer":"git-send-email 1.5.6.3","X-BeenThere":"linuxppc-dev@ozlabs.org","X-Mailman-Version":"2.1.11","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>","List-Unsubscribe":"<https://ozlabs.org/mailman/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=unsubscribe>","List-Archive":"<http://ozlabs.org/pipermail/linuxppc-dev>","List-Post":"<mailto:linuxppc-dev@ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@ozlabs.org?subject=help>","List-Subscribe":"<https://ozlabs.org/mailman/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork=ozlabs.org@ozlabs.org"},"content":"From: peter Korsgaard <jacmet@sunsite.dk>\n\nSupport uImage.<platform>, which are U-Boot multi component images\ncontaining a kernel, dtb and possibly an initrd.\n\nSigned-off-by: Peter Korsgaard <jacmet@sunsite.dk>","diff":"diff --git a/Documentation/powerpc/bootwrapper.txt b/Documentation/powerpc/bootwrapper.txt\nindex d60fced..f0b34b3 100644\n--- a/Documentation/powerpc/bootwrapper.txt\n+++ b/Documentation/powerpc/bootwrapper.txt\n@@ -91,6 +91,10 @@ Currently, the following image format targets exist:\n \t\t\ta device tree to the kernel at boot.  If using an older\n \t\t\tversion of U-Boot, then you need to use a cuImage\n \t\t\tinstead.\n+   uImage.thinx:\tU-Boot multi component image. Similar to uImage,\n+\t\t\texcept device tree blob is embedded inside the\n+\t\t\timage together with the kernel (and potentially\n+\t\t\tan initrd).\n    zImage.%:\t\tImage format which does not embed a device tree.\n \t\t\tUsed by OpenFirmware and other firmware interfaces\n \t\t\twhich are able to supply a device tree.  This image\ndiff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile\nindex 717a3bc..41ab6aa 100644\n--- a/arch/powerpc/boot/Makefile\n+++ b/arch/powerpc/boot/Makefile\n@@ -282,8 +282,9 @@ image-y\t+= $(subst \",,$(CONFIG_EXTRA_TARGETS))\n initrd-  := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-))\n initrd-y := $(patsubst zImage%, zImage.initrd%, \\\n \t\t$(patsubst dtbImage%, dtbImage.initrd%, \\\n+\t\t$(patsubst uImage.%, uImage.initrd.%, \\\n \t\t$(patsubst simpleImage%, simpleImage.initrd%, \\\n-\t\t$(patsubst treeImage%, treeImage.initrd%, $(image-y)))))\n+\t\t$(patsubst treeImage%, treeImage.initrd%, $(image-y))))))\n initrd-y := $(filter-out $(image-y), $(initrd-y))\n targets\t+= $(image-y) $(initrd-y)\n \n@@ -316,6 +317,12 @@ $(obj)/zImage.iseries: vmlinux\n $(obj)/uImage: vmlinux $(wrapperbits)\n \t$(call if_changed,wrap,uboot)\n \n+$(obj)/uImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb\n+\t$(call if_changed,wrap,uboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)\n+\n+$(obj)/uImage.%: vmlinux $(wrapperbits) $(obj)/%.dtb\n+\t$(call if_changed,wrap,uboot-$*,,$(obj)/$*.dtb)\n+\n $(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)\n \t$(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb)\n \n@@ -352,7 +359,7 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))\n clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \\\n \tzImage zImage.initrd zImage.chrp zImage.coff zImage.holly \\\n \tzImage.iseries zImage.miboot zImage.pmac zImage.pseries \\\n-\totheros.bld *.dtb\n+\totheros.bld uImage.* *.dtb\n \n # clean up files cached by wrapper\n clean-kernel := vmlinux.strip vmlinux.bin\ndiff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper\nindex 965c237..b7c0b23 100755\n--- a/arch/powerpc/boot/wrapper\n+++ b/arch/powerpc/boot/wrapper\n@@ -153,7 +153,7 @@ coff)\n     lds=$object/zImage.coff.lds\n     link_address='0x500000'\n     ;;\n-miboot|uboot)\n+miboot|uboot|uboot-*)\n     # miboot and U-boot want just the bare bits, not an ELF binary\n     ext=bin\n     objflags=\"-O binary\"\n@@ -262,6 +262,24 @@ uboot)\n     fi\n     exit 0\n     ;;\n+uboot-*)\n+    rm -f \"$ofile\"\n+    # we always need an initrd - create a dummy initrd if none provided\n+    if [ ! -f \"initrd\" ]; then\n+\tinitrd=\"$tmpdir/dummy.initrd\"\n+\techo -n fill >$initrd\n+    fi\n+    mkimage -A ppc -O linux -T multi -C gzip -a $membase -e $membase \\\n+\t$uboot_version -d \"$vmz:$initrd:$dtb\" \"$ofile\"\n+    if [ \"$initrd\" == \"$tmpdir/dummy.initrd\" ]; then\n+\trm $initrd;\n+    fi\n+    if [ -z \"$cacheit\" ]; then\n+\trm -f \"$vmz\"\n+    fi\n+    exit 0\n+    ;;\n+\n esac\n \n addsec() {\n","prefixes":[]}