From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Tue, 27 May 2014 00:12:32 +0200 Subject: [U-Boot] =?utf-8?q?=5BU-Boot=2Cv3=2C1/3=5D_mkimage=3A_add_atmelim?= =?utf-8?q?age?= In-Reply-To: <1400502221-6955-2-git-send-email-andreas.devel@googlemail.com> from Andreas Devel on Mon, 19 May 2014 14:23:39 +0200 References: <1400502221-6955-2-git-send-email-andreas.devel@googlemail.com> Message-ID: <1401142352-9200-1-git-send-email-andreas.devel@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Andreas Bie?mann, Andreas Bie?mann writes: >The new atmelimage converts a machine code BLOB to bootable ROM image. Atmel >ROM has no sophisticated image format, it only checks the first 7 ARM vectors. >The vectors can contain valid B or LDR opcodes, the 6'th vector contains the >image size to load. > >Additionally the PMECC header can be written by the atmelimage target. The >parameters must be given via the -n switch as a coma separated list. For >example: > >mkimage -T atmelimage \ > -n usePmecc=1,sectorPerPage=4,sectorSize=512,spareSize=64,eccBits=4,eccOffset=36 \ > -d spl/u-boot-spl.bin boot.bin > >A provided image can be checked for correct header setup. It prints out the >PMECC header parameters if it has one and the 6'th interrupt vector content. > >---8<--- >Image Type: ATMEL ROM-Boot Image with PMECC Header > PMECC header > ==================== > eccOffset: 36 > sectorSize: 512 > eccBitReq: 4 > spareSize: 64 > nbSectorPerPage: 4 > usePmecc: 1 > ==================== > 6'th vector has 17044 set >--->8--- > >A SPL binary modified with the atmelimage mkimage target was succesfully >booted on a sama5d34ek via MMC and NAND. > >Signed-off-by: Andreas Bie?mann >Cc: Bo Shen >Cc: Heiko Schocher >Tested-by: Bo Shen >Acked-by: Bo Shen > >--- >Changes in v3: >* remove check for 'usePmecc=y' > >Changes in v2: >* do not check filesize in atmelimage >* add PMECC header generation and printout >* add printout of 6'th vector > > common/image.c | 1 + > include/image.h | 1 + > tools/Makefile | 1 + > tools/atmelimage.c | 342 ++++++++++++++++++++++++++++++++++++++++++++++++++++ > tools/imagetool.c | 2 + > tools/imagetool.h | 1 + > 6 files changed, 348 insertions(+) > create mode 100644 tools/atmelimage.c applied to u-boot-atmel/master, thanks! Best regards, Andreas Bie?mann