- 04 May, 2016 6 commits
-
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Commit 73c20eea removed that symbol from fel.c - this adds it back (in the Makefile) to address #22. Caveat: This probably requires you to use "make OS=NetBSD". I have currently no way of testing it; we're only checking Linux and OSX builds. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
This also avoids a possible compiler warning (-Wstring-plus-int). Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
We'll be testing both gcc and clang builds on Linux. As for now, Travis CI only supports clang for OSX - so exclude gcc currently. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
- 03 May, 2016 5 commits
-
-
Bernhard Nortmann authored
Also add badges for license and build status. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
NiteHawk authored
Add continuous integration support (Travis CI), fix Mac OS X build
-
Bernhard Nortmann authored
The nand-part.c code tries to re-read the partition tables by issuing an ioctl(fd, BLKRRPART, NULL). This isn't available on non-Linux platforms, e.g. Mac OS X. Add preprocessor conditionals to prevent this from breaking the build. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
For Linux, this requires additional #defines, see https://gist.github.com/panzi/6856583#gistcomment-1656524 Placing those #defines into portable_endian.h would mean we depend on the specific order of #includes (whatever pulls in endian.h first, including other system includes). Avoid this by using symbols provided "globally" via the Makefile. Also nuke the _NETBSD_SOURCE definition in fel.c Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
- 20 Apr, 2016 11 commits
-
-
Bernhard Nortmann authored
Our previous include file only supplied a very limited set of wrapper redefinitions for platforms that define __APPLE__ (i.e. Mac OS). In particular, some needed big endian conversions were missing, causing "symbol(s) not found" errors when linking. Instead of patching the existing file, let's do away with it completely and replace it by something more sophisticated. The portable_endian.h used is in the public domain, and was taken from https://gist.github.com/panzi/6856583 Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Commit 472ac475 introduced a possible regression by relying on the availability of libusb_strerror(). There are libusb versions out there _not_ offering this function, which breaks compilation. Introducing a separate helper function allows us to work around this, refactor existing code and have more streamlined error reporting - avoiding the message string retrieval where needed. The usb_error() function can also optionally abort execution with a given exit code. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Move some lines so that the safeguards run (and exit, if needed) before the normal output of header information. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
When declaring 'signed' values for section count and version information in the script_bin_head structure, testing them to be below certain thresholds (SCRIPT_BIN_*_LIMIT) is insufficient; as 'negative' values like in "fexc-bin: script.bin: version: -404840454.-1074397186.-1073906177" would still pass. Fix this by making these member fields unsigned. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
instead of memset() and strcpy() to clear / assign member fields. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
Bernhard Nortmann authored
Gracefully shut down the FEL utility, instead of continuing execution. This avoids a possible "ERROR: Allwinner USB FEL device not found!" when doing a plain `./sunxi-fel` without any arguments (and no suitable USB device connected). Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
-
- 21 Mar, 2016 2 commits
-
-
Jens Kuske authored
The A80 has the V bit in SCTLR set to 0 because of the BROM being at 0x00000000 now, so the SCTLR check has to be relaxed. Signed-off-by: Jens Kuske <jenskuske@gmail.com> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Jens Kuske authored
This workaround is necessary for A80, which sometimes fails at reading DACR. Signed-off-by: Jens Kuske <jenskuske@gmail.com> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 20 Mar, 2016 2 commits
-
-
Bernhard Nortmann authored
See https://github.com/linux-sunxi/sunxi-tools/issues/37 The patch was originally inspired by https://github.com/NextThingCo/sunxi-tools/commit/16386a7 and https://github.com/NextThingCo/sunxi-tools/commit/47bafaf It introduces a "--dev" (-d) option to specify the desired FEL device. This is useful if multiple target devices are connected to the same host. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Lourens Rozema authored
Closes #24. See https://groups.google.com/forum/#!topic/linux-sunxi/sEJ1eTBoCvw Tested-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 17 Dec, 2015 3 commits
-
-
Bernhard Nortmann authored
The aw_fel_process_spl_and_uboot() was missing a free() for the file buffer. This patch also adds a proper libusb cleanup/shutdown. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Bernhard Nortmann authored
This patch forces relevant options to be placed at the beginning of the command line, but also makes sure that their specific order does not matter. Currently this applies to "-p" (--progress) and "-v" (--verbose). Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Bernhard Nortmann authored
Commit d99d59c0 introduces a bug when the "spl" command is used with a file that contains a U-Boot binary. "spl" will now try to execute it, while it's not supposed to. (The command should only start the SPL.) This patch brings back the `uboot_autostart` flag, which is meant to remain `false` for the "spl" command, and gets set by "uboot" only. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 16 Dec, 2015 6 commits
-
-
Justin Swartz authored
The meminfo example has been corrected to match the Makefile's "sunxi-meminfo" target, and an example has been added for the "sunxi-script_extractor" target. Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Justin Swartz authored
Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Bernhard Nortmann authored
This patch adds an "echo-gauge" command that is intended for use with sunxi-fel's output piped into the dialog utility. "echo-gauge" will output its string argument in a way that updates (i.e. overwrites) the prompt text that dialog displays, so it's possible to change that inbetween file transfers from sunxi-fel. Example: sunxi-fel uboot ${UBOOT} \ echo-gauge "Uploading kernel (1/2)" \ write-with-gauge 0x42000000 ${KERNEL} \ write 0x43100000 ${SCRIPT} \ echo-gauge "Uploading rootfs (2/2)" \ write-with-gauge 0x44000000 ${ROOTFS} \ | dialog --gauge "" 6 70 Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Bernhard Nortmann authored
This patch adds some additional commands, and implements corresponding progress callbacks that produce output for the 'dialog' utility: http://invisible-island.net/dialog/dialog.html The simple "*-with-gauge" just emits percentage numbers, line by line, while "*-with-xgauge" outputs extended information to update the dialog prompt. Both are meant for directly piping the output: sunxi-fel write-with-gauge <...> | dialog --gauge "FEL upload" 6 70 Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Bernhard Nortmann authored
The two new commands both imply that a (simple) progress bar display is requested. "multi[write]" allows to upload a group of files with a single command, resulting in their transfer showing a common, 'overall' progress status. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Bernhard Nortmann authored
This patch moves some code out of the "write" handler, with the intention to reuse it later for similar commands. At the same time, it also discards the previous transfer rate output when using "-v", as that has become redundant with the 'progress bar' display available by "-p". Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
- 08 Dec, 2015 1 commit
-
-
Hans de Goede authored
The script_extractor tool before this commit used to take a size argument on the cmdline, but the passed in size was only used in some places not in others. Leading to a segfault if the passed in argument was not exactly the same as SCRIPT_SIZE. This commit drops the argument, so that script_extractor will just work. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-
- 07 Dec, 2015 4 commits
-
-
Bernhard Nortmann authored
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Bernhard Nortmann authored
Add "--progress" option and a progress bar display for FEL transfers. This picks up on a suggestion from Alexander Kaplan and the discussion at https://groups.google.com/forum/#!topic/linux-sunxi/lz0oQBwjex0 Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Bernhard Nortmann authored
This patch adds a boolean parameter "progress" to several functions. When set (true), it will cause usb_bulk_send() to notify the progress framework, using progress_update() to convey the current transfer status. The feature gets enabled for the "write" command, and is forced inactive in most other places, e.g. aw_fel_write_uboot_image(). Also, we specifically want the internal use of aw_fel_write() to never use it. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-
Bernhard Nortmann authored
This patch introduces a new function aw_write_buffer() to allow a better distinction between FEL write operations. aw_fel_write() is meant for "privileged" internal use, while aw_write_buffer() now represents the preferred entry point for user code like the "write", "fill" or "clear" commands. There is some deliberate code duplication here that makes sense when combined with the next patch, where the aw_usb_write() call will differ. We want aw_fel_write() to enforce no progress update/callback, while aw_write_buffer() will (optionally) support it. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
-