On 9/25/21 2:12 AM, Marek Behún wrote:
On Fri, 24 Sep 2021 22:09:15 +0200
Marek Vasut wrote:
I have a feeling the discussion is again banking toward "mtdparts" and
"DT", which really is a solved problem, or at least we agreed upon the
solution.
I was trying to explain to Patrick how he can
Hi Mark,
On Sat, 18 Sept 2021 at 07:54, Mark Kettenis wrote:
>
> This series adds basic support for Apple's M1 SoC to U-Boot.
> This builds a basic U-Boot that can be used as a payload
> for the m1n1 boot loader being developed by the Asahi Linux
> project.
>
> The goal here is to privide an
From: Marek Behún
After getting MTD device via get_mtd_device_nm(), we need to put it with
put_mtd_device(), otherwise we get
Removing MTD device #0 (mx25l6405d) with use count 1
before booting kernel.
Signed-off-by: Marek Behún
---
board/CZ.NIC/turris_omnia/turris_omnia.c | 3 +++
1 file
At present each of these has its own static variable and helper functions.
Move them into a shared file.
Signed-off-by: Simon Glass
---
(no changes since v1)
include/efi.h | 21 +
lib/efi/efi.c | 29 +
lib/efi/efi_app.c | 21
This should return false when the EFI app is running, since UEFI has done
the required low-level init. Fix it.
Signed-off-by: Simon Glass
---
(no changes since v1)
include/init.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/init.h b/include/init.h
index
WIth EFI we must embed the devicetree in an ELF image so that it is loaded
as part of the executable file. We want it to include the binman
definition in there also, which in some cases cannot be created until the
ELF (u-boot) is built. Add an option to binman to support writing the
updated dtb to
On Fri, Sep 10, 2021 at 08:19:19AM +0200, Kristian Amlie wrote:
> Signed-off-by: Kristian Amlie
> Reviewed-by: Tom Rini
Applied to u-boot/next, thanks!
--
Tom
signature.asc
Description: PGP signature
On Wed, Sep 08, 2021 at 12:38:01PM +0100, Paul Barker wrote:
> Collect the code for printing the full help message of patman, buildman
> and binman into a single function in patman.tools.
>
> Signed-off-by: Paul Barker
Applied to u-boot/next, thanks!
--
Tom
signature.asc
Description: PGP
At present this code is inline in the app and stub. But they do the same
thing. The difference is that the stub does it immediately and the app
doesn't want to do it until the end (when it boots a kernel) or not at
all, if returning to UEFI.
Move it into a function so it can be called as needed.
If the 'bootm' command is not enabled then this code is not available and
this causes a link error. Fix it.
Note that for the EFI app, there is no indication of missing code. It just
hangs!
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/lib/zimage.c | 13 -
1 file
The stub checks for failure with efi_init(). Add this for the app as well.
It is unlikely that anything can be done, but we may as well stop.
Signed-off-by: Simon Glass
---
(no changes since v1)
lib/efi/efi_app.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
On Wed, Sep 08, 2021 at 12:38:02PM +0100, Paul Barker wrote:
> When printing full help output from a tool, we should be able to handle
> a PAGER variable which includes arguments, e.g. PAGER='less -F'.
>
> Signed-off-by: Paul Barker
Applied to u-boot/next, thanks!
--
Tom
signature.asc
On Tue, Sep 07, 2021 at 08:37:51AM +0200, Kristian Amlie wrote:
> vexpress_ca9x4 is seemingly the only board except for qemu_arm which
> is able to run U-Boot correctly, using the `-M vexpress-a9` option to
> QEMU. Building for qemu_arm and running qemu-system-arm with the `-M
> virt` argument
On Fri, Sep 03, 2021 at 10:24:39AM +0200, Patrick Delaunay wrote:
> Simplify the bootm and the spl code by using the new config
> CONFIG_SUPPORT_PASSING_ATAGS.
>
> Signed-off-by: Patrick Delaunay
> Reviewed-by: Tom Rini
Applied to u-boot/next, thanks!
--
Tom
signature.asc
Description: PGP
On Thu, Jun 03, 2021 at 12:40:26PM +0200, Jorge Ramirez-Ortiz wrote:
> Use the more generic reset-gpios property name.
>
> Signed-off-by: Jorge Ramirez-Ortiz
> Acked-by: Michal Simek
> Acked-by: Ilias Apalodimas
Applied to u-boot/next, thanks!
--
Tom
signature.asc
Description: PGP
Add a message here so that both paths of memory allocation are reported.
Signed-off-by: Simon Glass
---
Changes in v2:
- Use log_info() instead of printf()
lib/efi/efi_app.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index
At present this is disabled, but it should work so long as the kernel does
not need EFI services. Enable it and add a note about remaining work.
Signed-off-by: Simon Glass
---
Changes in v2:
- Update documentation
arch/x86/lib/bootm.c | 11 +++
It is quite complicating to run U-Boot on qemu since we have four
different builds and they must use different versions of qemu and the
UEFI binaries.
Add a script to help.
Signed-off-by: Simon Glass
---
Changes in v2:
- Add MAINTAINERS entry
- Add support for creating a partition table with a
For the EFI app, we must embed the devicetree in the ELF file since that
is the only thing that is run by UEFI. Drop the warning to avoid
confusion.
Signed-off-by: Simon Glass
---
Changes in v2:
- Add new patch to drop the OF_EMBED warning for EFI
Makefile | 2 +-
1 file changed, 1
At present the 'efi' command only works in the EFI payload. Update it to
work in the app too, so the memory map can be examined.
Signed-off-by: Simon Glass
---
Changes in v2:
- Add new patch to support the efi command in the app
cmd/Makefile | 2 +-
cmd/efi.c | 46
At present this function requires a pointer to struct efi_entry_memmap
but the only field used in there is the desc_size. We want to be able
to use it from the app, so update it to use desc_size directly.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/cpu/efi/payload.c | 8
Add info about how to select vidconsole or serial.
Also set up a demo boot command.
Signed-off-by: Simon Glass
---
Changes in v2:
- Add a better boot command too
include/configs/efi-x86_app.h | 25 +
1 file changed, 25 insertions(+)
diff --git
This provides access to EFI tables after U-Boot has exited boot services.
It is not needed in the app since boot services remain alive and we can
just call them whenever needed.
Add a comment to explain this.
Signed-off-by: Simon Glass
---
Changes in v2:
- Fix 'as' typo
include/efi.h | 4
This structure is uncommented. Fix it.
Signed-off-by: Simon Glass
---
(no changes since v1)
include/efi.h | 26 +-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/include/efi.h b/include/efi.h
index 908c5dc6ebd..3c215618dab 100644
--- a/include/efi.h
+++
At present only 4KB of spare space is left in the DTB when building the
EFI app. Increase this to 32KB so there is plenty of space to insert the
binman definition. This cannot be expanded later (as with OF_SEPARATE)
because the ELF image has already been built.
Signed-off-by: Simon Glass
---
Typically the bloblist is positioned at a fixed address in memory until
relocation. This is convenient when it is set up in SPL or before
relocation.
But for EFI we want to set it up only when U-Boot proper is running. Add
a way to allocate it using malloc() and update the documentation to cover
At present only the backspace key is supported in U-Boot, when running as
an EFI app. Add support for arrows, home and end as well, to make the CLI
more friendly.
Signed-off-by: Simon Glass
---
(no changes since v1)
drivers/serial/serial_efi.c | 11 +--
1 file changed, 9
At present testThreadTimeout() assumes that the expected timeout happens
first when building the section, but it can just as easily happen at the
top-level image. Update the test to cope with both.
Signed-off-by: Simon Glass
---
(no changes since v1)
tools/binman/ftest.py | 3 +--
1 file
The comment for this function is missing an argument and the return value.
Fix it.
Signed-off-by: Simon Glass
---
(no changes since v1)
tools/binman/ftest.py | 5 +
1 file changed, 5 insertions(+)
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 8199a4fc7e0..39a4b94cd0b
Binman needs to be able to update the contents of an ELF file after it has
been build. To support this, add a function to locate the position of a
symbol's contents within the file.
Fix the comments on bss_data.c and Symbol while we are here.
Signed-off-by: Simon Glass
---
(no changes since
At present any error from the 'make' command is silently swallowed by the
test system. Fix this by showing it when detected.
Signed-off-by: Simon Glass
---
(no changes since v1)
tools/binman/elf_test.py | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
The Exception base class is a very vague and could be confusing to the
test system. Use the more specific ValueError exception instead.
Signed-off-by: Simon Glass
---
(no changes since v1)
tools/patman/tools.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
When starting the app, locate all block devices and make them available
to U-Boot. This allows listing partitions and accessing files in
filesystems.
EFI also has the concept of 'disks', meaning boot media. For now, this
is not obviously useful in U-Boot, but add code to at least locate these.
At present UCLASS_EFI is used to represent an EFI filesystem among other
things. The description of this uclass is "EFI managed devices" which is
pretty vague. The only driver that uses this uclass is in fact not a real
U-Boot driver, since its operations do not include a struct udevice.
Rather
Add a block driver which handles read/write for EFI block devices. This
driver actually already exists ('efi_block') but is not really suitable
for use as a real U-Boot driver:
- The operations do not provide a udevice
- The code is designed for running as part of EFI loader, so uses
The current EFI video driver only works when running in the stub. In that
case the stub calls boot services (before jumping to U-Boot proper) and
copies the graphics info over to the efi table. This is necessary because
the stub exits boot services before jumping to U-Boot.
The app maintains
Add a function to return this information along with a stub for the
efi_info_get() function, since calling it otherwise hangs U-Boot.
Signed-off-by: Simon Glass
---
(no changes since v1)
include/efi.h | 8 +++-
lib/efi/efi_app.c | 10 ++
2 files changed, 17 insertions(+), 1
Most modern platforms use 64-bit EFI so it is useful to have a U-Boot app
that runs under that. Add a (non-functional) build for this.
Note that --whole-archive causes the gcc 9.2 linker to crash, so disable
this for now. Once this is resolved, things should work.
For now, avoid mentioning the
This variable is already defined by the EFI code. Drop the duplicate
definition when building a 64-bit EFI app.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/cpu/x86_64/cpu.c | 16
arch/x86/cpu/x86_64/misc.c | 16
lib/efi/efi.c |
Most EFI implementations use 64-bit but U-Boot only supports running as
a 32-bit app at present. While efi-x86_payload64 does boot from 64-bit
UEFI it immediately changes back to 32-bit before starting U-Boot.
In order to support a 64-bit U-Boot app, update the Kconfig to add an
option for 32/64
Add an extern declaration so that it is possible to use this macro in
files other than the one that defines it.
Signed-off-by: Simon Glass
Reviewed-by: Heinrich Schuchardt
---
(no changes since v1)
arch/x86/cpu/x86_64/cpu.c | 3 +++
arch/x86/include/asm/global_data.h | 2 ++
2 files
There is no need to avoid driver model for networking. Drop this.
Signed-off-by: Simon Glass
---
Changes in v2:
- Add new patch to enable DM_ETH for the app
configs/efi-x86_app_defconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/configs/efi-x86_app_defconfig
It is useful to see some basic EFI info with the command as it forms part
of the information about a board.
Add a hook for this and show the table address as a start.
While here, fix an invalid cast in setup_efi_info(). Note that this
function is using a data structure defined by Linux so we
The setup routines are called from zimage but don't really belong in the
zimage header. Add a new EFI header to house these. Add comments so it is
clear what the functions do.
Note that these functions are x86-specific. The zimage business is not
used on other architectures.
Signed-off-by: Simon
Separate this out slightly from the payload, with a new entry.
We might consider renaming EFI PAYLOAD to EFI LOADER, but that would
require quite a lot of file changes.
Signed-off-by: Simon Glass
---
Changes in v2:
- Add new patch with maintainer entry
MAINTAINERS | 7 +++
1 file
At present this information is stripped when linking. It is useful to keep
it around. Strip it from the .efi files instead.
Signed-off-by: Simon Glass
---
(no changes since v1)
arch/x86/config.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/config.mk
This code should never have been added as it builds a new feature on top
of legacy code. This has already been improved with the dependency on BLK.
Add a dependency on DM_ETH also, to avoid needing to deal with this old
code.
Boards which want EFI_LOADER should migrate to driver model first.
At present U-Boot can be built as an EFI app, but it is really just for
testing, with very few features. Instead, the payload build is used for
booting on top of UEFI, where U-Boot takes over the machine immediately
and supplies its own drivers.
But the app could be made more useful.
This series
On Fri, 24 Sep 2021 20:00:31 -0400
Tom Rini wrote:
> On Sat, Sep 25, 2021 at 01:49:26AM +0200, Marek Behún wrote:
>
> > Hi Tom, Jagan,
> >
> > in July I resent the series
> > Fix `mtd erase` when used with mtdpart
> > https://patchwork.ozlabs.org/project/uboot/list/?series=253565=*
> >
> >
On Fri, 24 Sep 2021 22:09:15 +0200
Marek Vasut wrote:
> I have a feeling the discussion is again banking toward "mtdparts" and
> "DT", which really is a solved problem, or at least we agreed upon the
> solution.
I was trying to explain to Patrick how he can convert the ST board so
that the
On Sat, Sep 25, 2021 at 01:49:26AM +0200, Marek Behún wrote:
> Hi Tom, Jagan,
>
> in July I resent the series
> Fix `mtd erase` when used with mtdpart
> https://patchwork.ozlabs.org/project/uboot/list/?series=253565=*
>
> There was a build error in CI, more info at
>
Hi Tom, Jagan,
in July I resent the series
Fix `mtd erase` when used with mtdpart
https://patchwork.ozlabs.org/project/uboot/list/?series=253565=*
There was a build error in CI, more info at
https://lists.denx.de/pipermail/u-boot/2021-July/455851.html
The CI link mentioned
Hi Ilias,
On Thu, 23 Sept 2021 at 03:17, Ilias Apalodimas
wrote:
>
> Hi Simon,
>
> On Wed, 22 Sept 2021 at 19:19, Simon Glass wrote:
> >
> > Hi Masahisa,
> >
> > On Tue, 21 Sept 2021 at 01:17, Masahisa Kojima
> > wrote:
> > >
> > > TCG PC Client spec requires to measure the SMBIOS
> > > table
Hi Tom,
On Fri, 24 Sept 2021 at 08:55, Tom Rini wrote:
>
> On Fri, Sep 24, 2021 at 08:38:49AM -0600, Simon Glass wrote:
> > Hi Tom,
> >
> > On Fri, 24 Sept 2021 at 08:20, Tom Rini wrote:
> > >
> > > On Fri, Sep 24, 2021 at 04:01:21PM +0200, Harald Seiler wrote:
> > > > Hi Simon,
> > > >
> > > >
On Fri, Sep 24, 2021 at 09:08:15PM +0200, Pali Rohár wrote:
> Hello!
>
> On Monday 13 September 2021 18:11:38 Tom Rini wrote:
> > On Mon, Sep 13, 2021 at 05:03:13PM -0500, Alex G. wrote:
> > >
> > >
> > > On 9/13/21 4:24 PM, Tom Rini wrote:
> > > > In order to move CONFIG_SYS_BAUDRATE_TABLE to
From: Marek Behún
Add entry for these tools with Marek, Pali and Stefan as maintainers.
Signed-off-by: Marek Behún
---
MAINTAINERS | 10 ++
1 file changed, 10 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 67c96a6045..6f103230da 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
From: Marek Behún
Create macro
for_each_opt_hdr_v1
and functions
opt_hdr_v1_size(),
opt_hdr_v1_valid_size(),
opt_hdr_v1_ext(),
opt_hdr_v1_first() and
opt_hdr_v1_next()
to simplify iteration over version 1 optional headers.
This prevents ugly code repetition and makes it nicer to
From: Marek Behún
Update man page for the kwboot utility.
Signed-off-by: Marek Behún
---
doc/kwboot.1 | 60 ++--
1 file changed, 39 insertions(+), 21 deletions(-)
diff --git a/doc/kwboot.1 b/doc/kwboot.1
index 1e9ca268f7..acdea891d9 100644
---
From: Pali Rohár
The kwboot utility does not handle EAGAIN / EBUSY errors, it expects
blocking mode on tty - it uses select() to check if data is available.
Disable non-blocking mode by clearing O_NDELAY flag which was set by
open().
We can't just take O_NDELAY from open(), because it is
From: Pali Rohár
Add Pali and Marek as another authors of the kwboot utility.
Signed-off-by: Pali Rohár
Signed-off-by: Marek Behún
---
tools/kwboot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 6fa6dff04d..6a1a030308 100644
--- a/tools/kwboot.c
From: Marek Behún
Add spaces around the | operator.
Signed-off-by: Marek Behún
---
tools/kwboot.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 5e491f31a4..9eb007f1bb 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -644,7
From: Pali Rohár
These structures are relevant for several other platforms, mention them
all.
Signed-off-by: Pali Rohár
Signed-off-by: Marek Behún
---
tools/kwbimage.c | 3 ++-
tools/kwbimage.h | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/tools/kwbimage.c
From: Marek Behún
Change kwboot_img_patch() to avoid code repetition of setting errno to
EINVAL.
Signed-off-by: Marek Behún
---
tools/kwboot.c | 55 ++
1 file changed, 20 insertions(+), 35 deletions(-)
diff --git a/tools/kwboot.c
From: Marek Behún
Mention all supported platforms in file header.
Signed-off-by: Marek Behún
---
tools/kwboot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 9da5b42ebf..6fa6dff04d 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
From: Pali Rohár
Retrieve current terminal settings via tcgetattr(), set to raw mode with
cfmakeraw(), enable receiver via CREAD and ignore modem control lines
via CLOCAL.
Signed-off-by: Pali Rohár
Signed-off-by: Marek Behún
---
tools/kwboot.c | 9 +
1 file changed, 5 insertions(+),
From: Pali Rohár
Function kwboot_tty_recv() has its own handling of read timeout, we
don't need to do set it in tty settings.
Signed-off-by: Pali Rohár
Signed-off-by: Marek Behún
---
tools/kwboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/kwboot.c
From: Pali Rohár
Some image types have source address in non-bytes unit; for example for
SATA images, it is in 512 B units.
We need to multiply by unit size when patching image type to UART.
Signed-off-by: Pali Rohár
[ refactored ]
Signed-off-by: Marek Behún
---
tools/kwboot.c | 40
From: Pali Rohár
It is not possible to modify image with secure header due to
cryptographic signature.
Signed-off-by: Pali Rohár
[ refactored ]
Signed-off-by: Marek Behún
---
tools/kwboot.c | 30 +-
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git
From: Pali Rohár
SPI/NOR kwbimage may have destination address set to 0x, which
means that the image is not downloaded to DDR but rather it is executed
directly from SPI/NOR. In this case execution address is set to SPI/NOR
area.
When patching image to UART type, change destination and
From: Pali Rohár
The A38x platform supports more baudrates than just those defined by the
Bn constants, and some of them are higher than the highest Bn baudrate
(the highest is 4 MBd while A38x support 5.15 MBd).
On Linux, add support for arbitrary baudrates. (Since there is no
standard POSIX
From: Marek Behún
The tcsetattr() function can return 0 even if baudrate was not changed.
Check whether baudrate was changed to requested value, and in case of
arbitrary baudrate, check whether the set value is within 3% tolerance.
Signed-off-by: Marek Behún
---
tools/kwboot.c | 32
From: Pali Rohár
Add support for uploading the boot image (the data part only) at higher
baudrate than the standard one.
The kwboot utility already has -B option, but choosing other baudrate
than the standard one (115200 Bd) can only work for debug mode, not for
booting the device. The BootROM
From: Marek Behún
Explicitly check the image size against size of struct main_hdr_v1.
This way the check is more readable, since the `hdrsz` variable
may semantically contain another value.
Signed-off-by: Marek Behún
---
tools/kwboot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Pali Rohár
The beginning of image data must be sent in a separate xmodem block;
the block must not contain end of header with the beginning of data.
Therefore we need to ensure that the image header size is a multiple of
xmodem block size (which is 128 B).
Read the file into a malloc()ed
From: Marek Behún
Add functions kwbheader_size() and kwbheader_size_for_csum().
Refactor code determining header size to use these functions.
Refactor header checksum determining function.
Remove stuff that is not needed anymore.
This simplifies the code a little and fixes one instance of
From: Marek Behún
Rename this function to kwbimage_version() and don't cast argument if
not needed.
Signed-off-by: Marek Behún
---
tools/kwbimage.c | 8
tools/kwbimage.h | 4 ++--
tools/kwboot.c | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git
From: Pali Rohár
The kwboot_img_patch_hdr() function already decides if header patching
is needed. Always call this function and deprecate the unneeded command
line option `-p`.
Signed-off-by: Pali Rohár
Reviewed-by: Marek Behún
---
tools/kwboot.c | 23 ++-
1 file
From: Marek Behún
Currently if BootROM fails to respond with ACK/NAK to a xmodem block, we
will be waiting indefinitely for such response.
Make sure that we only wait at most 1 second (blk_rsp_timeo) for ACK/NAK
for each block in case non-xmodem text output is not being expected.
Interpret this
From: Pali Rohár
After kwboot sends EOT, BootROM sends back ACK. Add code for handling
this and retry sending EOT on error.
Signed-off-by: Pali Rohár
[ refactored ]
Signed-off-by: Marek Behún
---
tools/kwboot.c | 62 --
1 file changed, 45
From: Pali Rohár
When sending image header / image data, BootROM does not send any
non-xmodem text output. We should therefore interpret unknown bytes in
the xmodem protocol as errors and resend current packet. This should
improve the transfer in case there are errors on the UART line.
Text
From: Marek Behún
When executing header code (which contains U-Boot SPL in most cases),
wait 10s after every non-xmodem character received (i.e. printed by
U-Boot SPL) before timing out.
Sometimes DDR training, which runs in SPL, may be slow.
Signed-off-by: Marek Behún
---
tools/kwboot.c |
From: Marek Behún
There is no separation between output from the code from binary header
(U-Boot SPL in most cases) and subsequent kwboot output.
Print '\n' to make distinguishing these two easier.
Signed-off-by: Marek Behún
---
tools/kwboot.c | 11 +--
1 file changed, 9
From: Marek Behún
This is a non-functional change that should make the code more readable.
Signed-off-by: Marek Behún
---
tools/kwboot.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 7f231c0823..2e5684b91c 100644
---
From: Pali Rohár
This change is required to implement other features in kwboot.
Split sending header and data parts of the image into two stages.
Signed-off-by: Pali Rohár
[ refactored ]
Signed-off-by: Marek Behún
---
tools/kwbimage.h | 8 +++--
tools/kwboot.c | 84
From: Pali Rohár
When progress was not completed, current terminal position is in progress
bar. So print newline before printing error message to make error message
more readable.
Signed-off-by: Pali Rohár
Reviewed-by: Marek Behún
---
tools/kwboot.c | 1 +
1 file changed, 1 insertion(+)
From: Pali Rohár
Ensure that `pos` is still in range up to the `width` so printing 100%
works also for bigger images. After printing 100% progress reset it to
zero, so that next progressbar can be started.
Signed-off-by: Pali Rohár
Reviewed-by: Marek Behún
---
tools/kwboot.c | 9 +++--
1
From: Pali Rohár
When kwboot_tty_recv() fails or times out, it does not set the `c`
variable to NAK. The variable is then compared, while it holds either
an undefined value or a value from previous iteration. Set `c` to NAK so
that the other side will try to resend current block, and remove the
From: Pali Rohár
Print kwboot's (U-Boot's) version when printing usage.
Signed-off-by: Pali Rohár
Reviewed-by: Marek Behún
---
tools/kwboot.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 22cdd137ad..454339db14 100644
--- a/tools/kwboot.c
+++
From: Marek Behún
There are 3 instances in kwboot.c where we need to write() a given
buffer whole (iteratively writing until all data are written), and 2 of
those instances are wrong, for they do not increment the buffer pointer.
Refactor the code into a new function kwboot_write() where it is
From: Pali Rohár
Function kwboot_xm_makeblock() always returns length of xmodem block. It
is always non-negative and calculated from variable with size_t type. Set
return type of this function to size_t and remove dead code which checks
for negative value.
Signed-off-by: Pali Rohár
From: Marek Behún
The compiler complains that we are comparing int with size_t when
compiled with -W.
Signed-off-by: Marek Behún
---
tools/kwboot.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/kwboot.c b/tools/kwboot.c
index 88353d19c0..3d9f73e697 100644
---
From: Marek Behún
On 32-bit ARM the compiler complains:
tools/kwbimage.c:547: warning: format ‘%lu’ expects argument of type
‘long unsigned int’, but argument 4 has
type ‘unsigned int’
Fix this by using %zu instead of %lu
From: Marek Behún
This buffer is never written to. Make it const.
Signed-off-by: Marek Behún
---
tools/kwboot.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/kwboot.c b/tools/kwboot.c
index e6e99849a7..f18f6d2134 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
From: Marek Behún
The `in` variable is set to -1 in kwboot_terminal() if stdin is not a
tty. In this case we should not look whether -1 is set in fd_set, for it
can lead to a buffer overflow, which can be reproduced with
echo "xyz" | ./tools/kwboot -t /dev/ttyUSB0
Signed-off-by: Marek Behún
From: Marek Behún
Hello Stefan and others,
here's v3 of series adding support for booting Marvell platforms via
UART (those bootable with kwboot) at higher baudrates.
Tested on Turris Omnia up to 5.15 MBd, which is 44x faster than
115200 Bd.
The user can direct kwboot to use higher baudrate
From: Pali Rohár
Remove unused PCIe functions from SerDes code. They are unused and are
duplicated either from generic PCIe code or from pci_mvebu.c.
Remove also unused PCIe macros from SerDes code. They are just obfuscated
variants of standards macros in include/pci.h or in pci_mvebu.c.
From: Pali Rohár
This code is trying to parse PCIe config space of PCIe card connected on
the other end of link and then is trying to force 5.0 GT/s speed via Target
Link Speed bits in PCIe Root Port Link Control 2 Register on the local part
of link if it sees that card supports 5.0 GT/s via Max
From: Pali Rohár
These are part of SOC_CONTROL_REG1 register, not PEX_CAPABILITIES_REG.
Signed-off-by: Pali Rohár
Reviewed-by: Marek Behún
---
arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Pali Rohár
Device/Port Type bits of PCIe Root Port PCI Express Capabilities Register
are read-only SAR registers and are initialized according to current mode
configured by PCIe controller. Changing PCIe controller mode (from Root
Complex mode to Endpoint mode or the other way) is possible
From: Pali Rohár
PCI device ID is part of the PCIe controller SoC / revision. For Root
Complex mode (which is the default and the only mode supported currently
by U-Boot and Linux kernel), it is PCI device ID of PCIe Root Port device.
If there is some issue with this device ID, it should be set
1 - 100 of 162 matches
Mail list logo