summaryrefslogtreecommitdiffstats
path: root/tools/mksunxiboot.c
Commit message (Collapse)AuthorAgeFilesLines
* sunxi: Ensure that 'mksunxiboot' tool produces deterministic outputSiarhei Siamashka2015-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | Currently some uninitialized padding bytes are written to the output file, as can be confirmed with valgrind: $ valgrind tools/mksunxiboot spl/u-boot-spl.bin spl/sunxi-spl.bin ==5581== Syscall param write(buf) points to uninitialised byte(s) ==5581== at 0x4F0F940: __write_nocancel (in /lib64/libc-2.20.so) ==5581== by 0x400839: main (in /tmp/u-boot/tools/mksunxiboot) ==5581== Address 0xffeff5d3c is on thread 1's stack ==5581== in frame #1, created by main (???) This patch fixes the problem by clearing the whole structure instead of just a portion of it. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* sunxi/nand: change BLOCK_SIZE in mksunxiboot to match NAND block sizeDaniel Kochmański2015-05-291-1/+7
| | | | | | | | | | | This change is necessary to calculate correct checksum for NAND boot. Works both for MMC and NAND. Without it BROM rejects boot image as invalid (bad checksum). (Changes block size from 0x200 to 0x2000). Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu> Signed-off-by: Roy Spliet <r.spliet@ultimaker.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* tools: mksunxiboot: Fix problems on big endian systemsSiarhei Siamashka2015-02-161-6/+8
| | | | | | | | Now my PS3 can be also used to build u-boot for sunxi devices. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* sunxi: mksunxiboot: Fix loading of files with a size which is not a multiple ↵Hans de Goede2014-07-061-6/+4
| | | | | | | | | | | | | of 4 We should not be aligning the amount of bytes which we try to read from the disk, this leads to trying to read more bytes then there are which fails. file_size is already aligned to BLOCK_SIZE before being stored in img.header.length, so there is no need for load_size at all. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: non-FEL SPL boot support for sun7iIan Campbell2014-05-251-0/+142
Add support for booting from an MMC card. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Henrik Nordström <henrik@henriknordstrom.net> Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Reviewed-by: Marek Vasut <marex@denx.de> Cc: Tom Cubie <Mr.hipboi@gmail.com> Reviewed-by: Tom Rini <trini@ti.com>
OpenPOWER on IntegriCloud