Hi Alex!
Thanks for the reply. I've been wondering that, since the was no new soc_id
or special code to handle the R8 in sunxi-fel. I've added the R8 to the wiki
page accordingly.
Regards, B. Nortmann
Am 16.11.2015 um 23:26 schrieb Alexander Kaplan:
Hi Bernhard,
I observe roughly ~500 KB/s
Hello Alex!
Good catch, the AW_FEL_VERSION request caused by progress_chunk_size()
might in fact arrive in an untimely manner there.
Basically we'd have to make sure we retrieve the aw_fel_get_sram_info()
beforehand. I'm not sure there would be a more useful place for that
even earlier,
p 17 00:00:00 2001
From: Bernhard Nortmann <bernhard.nortm...@web.de>
Date: Mon, 16 Nov 2015 18:45:54 +0100
Subject: [PATCH v4 5/9] sunxi-tools: refine progress updates by adjusting
transfer chunk size
Signed-off-by: Bernhard Nortmann <bernhard.
there.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
Makefile | 2 +-
fel.c | 9 +
progress.c | 46 ++
progress.h | 34 ++
4 files changed, 82 insertions(+), 9 deletions(-)
creat
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)
suppo
the actual
progress callbacks. Instead, modified "total" values are fed to the
callback function.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
progress.c | 38 ++
progress.h | 1 +
2 files changed, 35 insertions(+),
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.c | 42 --
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/fel.c b/fel.c
index aa30fa6..9b9a622 100644
--- a/fel.c
+++ b/fel.c
@@ -79,12 +79,18 @@ static void pr_info
Also add "--noprogress" option to turn progress display off
again (for subsequent commands).
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.c | 5 +
progress.c | 52 +---
progress.h | 3 +++
3 f
progress of a full-featured system transferred
via FEL (kernel, DTB, boot script and initrd).
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.c | 63 +++
1 file changed, 51 insertions(+), 12 deletions(-)
diff
ill ignore any smaller transfers, i.e. those
that complete in a single loop iteration. In other words:
progress will only be shown if the transfer size requires
multiple chunks to be sent.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.c | 17 +
ced
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.nortm...@web.de>
---
fel.c | 37 +++--
1 file changed, 23 insertions(+), 1
@Alex:
Since you were the one initially proposing the progress display feature
(and seem to have actual use cases), I would appreciate if you could test
and/or possibly "ack" the relevant patches. I've done my own limited
testing but may not have covered everything, so any feedback is welcome.
le "--xgauge" outputs extended information to update
the dialog prompt. Both are meant for directly piping the
output:
sunxi-fel -g <...> | dialog --gauge "FEL upload progress" 6 70
Signed-off-by: Bernhard Nortmann <bernhard.nort
+ * that the BROM FEL protocol implementation relies on a memcpy loop somewhere
+ * on the perfromance critical path when transferring data over USB. The older
+ * SoC variants (A10/A13/A20/A31/A23) already have MMU enabled and we only need
nitpick: you have a typo in there -
Hi Siarhei!
Am 11.11.2015 um 01:16 schrieb Siarhei Siamashka:
[...]
Hello,
If I understand the problem correctly, it is all about slow USB
transfer speed. We have two possible ways to deal with it:
1. Improve the performance to finish the job faster
2. Entertain the user while the
I've transformed this into a pull request:
https://github.com/linux-sunxi/sunxi-tools/pull/35
Let me know if you'd prefer a set of patches sent to the mailing list
(@Siarhei?).
Regards, B. Nortmann
Am 29.10.2015 um 16:55 schrieb Alexander Kaplan:
Hi Bernhard,
thanks for picking this up.
Hi Alex!
Am Freitag, 23. Oktober 2015 22:22:24 UTC+2 schrieb kapla...@gmail.com:
Hi,
I added an option --progress (or -p for short) to display a progress bar during
large transfers.
Hope it is useful.
Alex
---
fel.c | 80 +--
oups.google.com/d/optout.
From 88e5f4235758a7ed6464c76a6135aaaec3b30ef4 Mon Sep 17 00:00:00 2001
From: Bernhard Nortmann <bernhard.nortm...@web.de>
Date: Wed, 28 Oct 2015 16:48:33 +0100
Subject: [PATCH v2] sunxi-tools: option --progress: shows progress bar for
large transfers
Based on
https://groups.google.com/forum/#!t
to call aw_fel_get_sram_info() wherever needed, while
avoiding additional aw_fel_get_version() lookups, and potential surplus
"no 'soc_sram_info' data for your SoC" warnings.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.c | 31 ---
Am 26.09.2015 um 22:06 schrieb Siarhei Siamashka:
What kind of problem are you trying to solve in the first place?
Is it just for suppressing multiple prints of the "unsupported soc
type" warning?
Basically: yes. Initially you got me triggered on that with your very
first comment. Admittedly I
new "sunxi" SPL header and some modifications to fel.c will allow
the fel utility to pass information to U-Boot. In case of an FEL boot,
our goal is to have a way of auto-executing a boot script that was
transferred to DRAM (via "fel") before actual U-Boot startup.
Regards, B.
This patch moves retrieving the image header type into a function
of its own. The idea is that fel "write" can and will also make
use of this function to detect boot scripts (by IH_TYPE_SCRIPT).
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
y location of the boot script file
(boot.scr) this way. A suitably modified U-Boot can adjust the
boot process accordingly and will auto-execute the script.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.c | 65 -
1
Am 16.09.2015 um 03:15 schrieb Siarhei Siamashka:
Yes, caching the pointer inside of aw_fel_get_sram_info() function and
avoiding repeated usb requests is a good idea. Just make it a static
variable instead of global.
Retrieving the version information (struct aw_fel_version) involves a
USB
e function multiple times / wherever needed.
What do you think?
Regards, B. Nortmann
Am 14.09.2015 um 11:55 schrieb Bernhard Nortmann:
Hello Siarhei!
Am 13.09.2015 um 23:42 schrieb Siarhei Siamashka:
With this change, we are going to print "Warning: no 'soc_sram_info'
data for your SoC"
FEL version information and SoC-specific memory layout are used
across several places in the fel utility code. To avoid having
to retrieve this information repeatedly, this patch introduces
suitable variables to the main() function scope.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web
. Nortmann
Bernhard Nortmann (3):
sunxi-tools: refactor image type detection/query
sunxi-tools: factor out persistent version and sram_info information
sunxi-tools: add a mechanism to provide boot information via FEL
fel.c | 181
This patch moves retrieving the image header type into a function
of its own. The idea is that fel "write" can and will also make
use of this function to detect boot scripts (by IH_TYPE_SCRIPT).
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
y location of the boot script file
(boot.scr) this way. A suitably modified U-Boot can adjust the
boot process accordingly and will auto-execute the script.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.c | 62 +-
1
Am 09.09.2015 um 06:33 schrieb Siarhei Siamashka:
+uint8_t get_image_type(const uint8_t *buf, int error)
IMHO, this is not the nicest looking API. We get a buffer pointer here,
but not the buffer size, so it is implicitly assumed to be large enough.
The use of the error flag is not very
Am 09.09.2015 um 07:00 schrieb Siarhei Siamashka:
Thanks. The commit messages are great and very detailed.
Functionality-wise, this looks good to me. Implementation-wise,
there are a few comments (posted as separate replies).
Also should we wait until the U-Boot changes are reviewed by Ian
or
Am 09.09.2015 um 06:52 schrieb Siarhei Siamashka:
I'm not sure if it is a good idea to add all these checks into the
'aw_fel_write()' function. This function is a low level primitive
operation and overloading it with extra functionality is not great.
On the other hand, we also support "write"
Am 08.09.2015 um 23:15 schrieb Siarhei Siamashka:
http://man7.org/linux/man-pages/man7/feature_test_macros.7.html
"To allow code that requires _BSD_SOURCE in glibc 2.19 and earlier
and _DEFAULT_SOURCE in glibc 2.20 and later to compile without
warnings, define both _BSD_SOURCE and
les/611162/.
This patch adds the required _DEFAULT_SOURCE.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.c | 2 ++
phoenix_info.c | 2 ++
pio.c | 2 ++
3 files changed, 6 insertions(+)
diff --git a/fel.c b/fel.c
index f96cc78..98e8d89 100644
--- a/f
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
Acked-by: Siarhei Siamashka <siarhei.siamas...@gmail.com>
---
fel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fel.c b/fel.c
index c29df86..f96cc78 100644
--- a/fel.c
+++ b/fel.c
@@ -863,7 +8
This patch moves retrieving the image header type into a function
of its own. The idea is that aw_fel_write() can and will also make
use of this function to detect boot scripts (by IH_TYPE_SCRIPT).
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.
FEL version information and SoC-specific memory layout are used
across several places in the fel utility code. To avoid having
to retrieve this information repeatedly, this patch introduces
suitable variables to the main() function scope.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web
by address and size.
Currently the typical use case is to provide the memory location
of the boot script file (boot.scr). A suitably modified U-Boot
can adjust the boot process accordingly and will auto-execute
the script.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
e actual U-Boot startup.
Regards, B. Nortmann
Bernhard Nortmann (3):
sunxi-tools: refactor image type detection/query
sunxi-tools: factor out persistent version and sram_info information
sunxi-tools: add a mechanism to provide boot informatio
les/611162/.
This patch contains the recommended changes from _BSD_SOURCE
to _DEFAULT_SOURCE.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.c | 4 ++--
phoenix_info.c | 4 ++--
pio.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fel
This patch moves retrieving the image header type into a function
of its own. The idea is that aw_fel_write() can and will also make
use of this function to detect boot scripts (by IH_TYPE_SCRIPT).
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
---
fel.
ow
the fel utility to pass information to U-Boot. In case of an FEL boot,
our goal is to have a way of auto-executing a boot script that was
transferred to DRAM (via "fel") before actual U-Boot startup.
Regards, B. Nortmann
Bernhard Nortmann (2):
sunxi-tools: refactor image type detection
by address and size.
Currently the typical use case is to provide the memory location
of the boot script file (boot.scr). A suitably modified U-Boot
can adjust the boot process accordingly and will auto-execute
the script.
Signed-off-by: Bernhard Nortmann <bernhard.nortm...@web.de>
Hi Siarhei!
Am 01.09.2015 um 15:54 schrieb Siarhei Siamashka:
The SPL header is Allwinner specific and we are kinda in control of it.
The U-Boot header is used for a wide range of devices and architectures
and you should be prepared to encounter a (perfectly justified) opposition
if you propose
Hi Siarhei, hello Hans!
Am 01.09.2015 um 00:58 schrieb Siarhei Siamashka:
> On Mon, 31 Aug 2015 13:57:54 +0200
> Hans de Goede wrote:
>
>> Hi,
>>
>> On 31-08-15 13:45, Siarhei Siamashka wrote:
>>> On Tue, 07 Jul 2015 10:54:36 +0100
>>> Ian Campbell
Am 21.08.2015 03:34, schrieb Siarhei Siamashka:
My compiler happens to be anal about this:
fel.c: In function ‘aw_fel_process_spl_and_uboot’:
fel.c:838:11: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare] if (size SPL_LEN_LIMIT)
^
This warning
Hi Siarhei!
Those are some good arguments. I have prepared two separate patches
to follow up on this, which should apply nicely/easily.
Regards, B. Nortmann
--
You received this message because you are subscribed to the Google Groups
linux-sunxi group.
To unsubscribe from this group and stop
Hello Siarhei!
We've been discussing that usb-boot script (and the Wiki stuff related)
on IRC.
I agree that it's pretty much obsolete now that fel uboot gracefully
handles
most of these tasks. You voted for (and I agreed on) removing the script in
the near future, and only reference it for
Am 19.08.2015 17:07, schrieb Siarhei Siamashka:
I guess, this patch is now superseded by the recent patches from
Vishnu Patekar, which add full support for H3, A83T and A33.
Full ACK. The patch was just there to introduce a better SoC ID
identification
for end user's convenience.
I'd still
Narrow down the scope of the uboot_autostart variable.
The flag can be made local to main(), there's no need to keep it global.
Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de
---
fel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fel.c b/fel.c
index a5cb99d
to
aw_fel_write_uboot_image() as size_t len. This might incorrectly let
that function assume a u-boot binary was passed, when actually it
isn't supposed to act on the buffer at all.
Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de
---
fel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
This is a set of two patches following up on
https://groups.google.com/d/msg/linux-sunxi/X9Vcg7dVt9w/rRPYv4sIBgAJ
Bernhard Nortmann (2):
sunxi-tools: prevent possible out-of-bounds memory access
sunxi-tools: make uboot_autostart local instead of global
fel.c | 5 +++--
1 file changed, 3
2001
From: Bernhard Nortmann bernhard.nortm...@web.de
Date: Mon, 17 Aug 2015 18:57:36 +0200
Subject: [PATCH 1/3 v2] sunxi-tools: Prevent signed values (fix possible
underflow) of len parameter for aw_fel_write_uboot_image(), and narrow down
scope for uboot_autostart
Signed-off-by: Bernhard
Am 04.08.2015 10:33, schrieb Siarhei Siamashka:
Hi,
If anyone wonders, that's a sunxi-tools patch. To avoid confusion in
the future, it's best to have this information in the subject line.
Yes, sorry - I forgot to add the sunxi-tools prefix, and also didn't
CC you as the maintainer.
Thanks
Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de
---
fel.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fel.c b/fel.c
index 41b19c9..bbaeec9 100644
--- a/fel.c
+++ b/fel.c
@@ -215,8 +215,7 @@ void aw_fel_write(libusb_device_handle *usb, void *buf
Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de
---
usb-boot | 116 +--
1 file changed, 61 insertions(+), 55 deletions(-)
diff --git a/usb-boot b/usb-boot
index 3881d29..be34004 100755
--- a/usb-boot
+++ b/usb-boot
@@ -20,72
Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de
---
fel.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/fel.c b/fel.c
index bbaeec9..95c3ee2 100644
--- a/fel.c
+++ b/fel.c
@@ -186,14 +186,20 @@ void aw_fel_print_version(libusb_device_handle
Am 15.07.2015 12:56, schrieb Siarhei Siamashka:
On Wed, 15 Jul 2015 11:21:45 +0100
Ian Campbell i...@hellion.org.uk wrote:
Perhaps a simpler thing which would get 80% of the benefit would be to
add an --exec flag to the existing command? (Or default on and a flag to
not do it, as people
is again based on the current
b80e7ce7bd5c2015465c2fd0e5990d47c05c7f8e commit within the github linux-sunxi
repo. Let me know in case that needs to be adjusted.)
Regards, B. Nortmann
Bernhard Nortmann (1):
sunxi-tools: extend fel utility to handle SPL + U-Boot binary
fel.c | 124
Looking at that code / diff, the test for (size_main 0) is
insufficient. If we're intending to access the header fields, it's
probably better/safer to test for (size_main HEADER_SIZE) instead:
Regards, B. Nortmann
diff --git a/fel.c b/fel.c
index de8afad..2fd215a 100644
--- a/fel.c
+++
Hello Siarhei!
Am 12.07.2015 13:49, schrieb Siarhei Siamashka:
Regarding the new uboot command. We can probably make it execute the
u-boot code too, but just postpone the execution (so that it is done
only after the command line parsing is fully finished). For additional
safety, the subsequent
to get a proper FEL
setup - e.g. it avoids having to select u-boot.bin vs. u-boot-dtb.bin,
see e.g. http://lists.denx.de/pipermail/u-boot/2015-June/217476.html
Original patch/RFC was here:
https://groups.google.com/forum/#!topic/linux-sunxi/wBEGUoLNRro
Signed-off-by: Bernhard Nortmann bernhard.nortm
Am 07.07.2015 11:19, schrieb Hans de Goede:
We could agree upon a special magic signature between the fel tool
and the sunxi u-boot code which means that u-boot should patch
its boot_cmd in the env to load a script from DRAM (at a fixed
offset). We could always do the boot_cmd patching when in
Am 06.07.2015 16:28, schrieb Ian Campbell:
On Mon, 2015-07-06 at 14:11 +0200, Hans de Goede wrote:
Ah right, I guess that makes sense, but if this is not going to
be a fire and forget command, and people still need to run more
fel commands after it then I'm wondering it this is worth the
Hello Hans!
Am 05.07.2015 11:54, schrieb Hans de Goede:
This seems like a good idea to me, am I reading both the --help
and the code correctly that this only writes u-boot but does not
do the necessary fel exe 0x. ? It seems to me that such a
command should also execute u-boot.
You're
, the idea of this modification
is to prevent users mixing up u-boot.bin and u-boot-dtb.bin (possibly
unconscious, e.g. by relying on outdated FEL scripts).
see e.g. http://lists.denx.de/pipermail/u-boot/2015-June/217476.html
Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de
---
fel.c | 68
, but they somehow didn't
make it upstream. The symbol is still present as of v4.1.
Signed-off-by: Bernhard Nortmann bernhard.nortm...@web.de
---
arch/arm/configs/multi_v7_defconfig | 1 -
arch/arm/configs/sunxi_defconfig| 1 -
2 files changed, 2 deletions(-)
diff --git a/arch/arm/configs/multi_v7_defconfig
101 - 167 of 167 matches
Mail list logo