U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Ibai Erkiaga <ibai.erkiaga-elorza@amd.com>, u-boot@lists.denx.de
Subject: Re: [U-Boot][PATCH 1/2] fpga: fix alignment on fpga cmd usage info
Date: Tue, 14 Jan 2025 09:10:35 +0100	[thread overview]
Message-ID: <5d81e09f-2cb6-4298-8aa3-1728c954e08b@amd.com> (raw)
In-Reply-To: <20250108140357.969380-2-ibai.erkiaga-elorza@amd.com>



On 1/8/25 15:03, Ibai Erkiaga wrote:
> The current implementation generates some alignment issues as well as
> some overlapping when all the fpga command options are enabled. The fix
> is intended to improve readability of the usage info.
> 
> Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@amd.com>
> 
> ---
> 
> The current output looks like this:
>    loadbp        [dev] [address] [size]  Load device from bitstream buffer with partial bitstream(Xilinx only)
> Load device from filesystem (FAT by default) (Xilinx only)
>    loadfs [dev] [address] [image size] [blocksize] <interface>
>          [<dev[:part]>] <filename>
>    loadmk [dev] [address]        Load device generated with mkimage
>          For loadmk operating on FIT format uImage address must include
>          subimage unit name in the form of addr:<subimg_uname>Load encrypted bitstream (Xilinx only)
>    loads [dev] [address] [size] [auth-OCM-0/DDR-1/noauth-2]
>          [enc-devkey(0)/userkey(1)/nenc(2) [Userkey address]
> Loads the secure bistreams(authenticated/encrypted/both
> 
> The new output lools like this:
> loadb  [dev] [address] [size]  Load device from bitstream buffer (Xilinx only)
>   loadbp [dev] [address] [size]  Load device from bitstream buffer with partial bitstream (Xilinx only)
>   loadfs [dev] [address] [size] [blocksize] <interface> [<dev[:part]>] <filename>
>          Load device from filesystem (FAT by default) (Xilinx only)
>   loadmk [dev] [address]         Load device generated with mkimage
>          NOTE: loadmk operating on FIT format uImage address must include
>          subimage unit name in the form of addr:<subimg_uname>
>   loads  [dev] [address] [size] [auth-OCM-0/DDR-1/noauth-2]
>          [enc-devkey(0)/userkey(1)/nenc(2) [Userkey address]
>          Loads the secure bistreams(authenticated/encrypted/both

this is not the full look. Full log looks like this.
You can see that some of that lines are longer then 80 that's why they are on 
the next line. I think you should stay inside 80 chars per line.
Second loadp is in front of loadb which looks weird.

There should be description about meaning of [] or <> in help message

[ ] should means optional parameter
< > should means required parameter

Below all of them are optional which is not truth. It is correct in fpga info 
but not in fpga dump. It means I think when you are on this descriptions should 
be also fixed.

Also line
fpga [operation type] [device number] [image address] [image size]
is not covering all commands. It means you should consider if make sense to have 
this line.


Usage:
fpga [operation type] [device number] [image address] [image size]
fpga operations:
  dump	[dev] [address] [size]	Load device to memory buffer
  info	[dev]			List known device information
  load	[dev] [address] [size]	Load device from memory buffer
  loadp	[dev] [address] [size]	Load device from memory buffer with partial bitstream
  loadb	[dev] [address] [size]	Load device from bitstream buffer (Xilinx only)
  loadbp	[dev] [address] [size]	Load device from bitstream buffer with partial 
bitstream (Xilinx only)
  loadfs	[dev] [address] [size] [blocksize] <interface> [<dev[:part]>] <filename>
	Load device from filesystem (FAT by default) (Xilinx only)
  loadmk	[dev] [address]		Load device generated with mkimage
	NOTE: loadmk operating on FIT format uImage address must include
	subimage unit name in the form of addr:<subimg_uname>
  loads	[dev] [address] [size] [authflag] [encflag] [Userkey address]
	Load device from memory buffer with secure bistream 
(authenticated/encrypted/both)(Xilinx only)
	 -authflag: 0 for OCM, 1 for DDR, 2 for no authentication (specifies where to 
perform authentication)
	 -encflag: 0 for device key, 1 for user key, 2 for no encryption
	 -Userkey address: specifies the address where user key is stored when user key 
is selected
	NOTE: the secure bitstream has to be created using Xilinx bootgen tool only.

Thanks,
Michal

  parent reply	other threads:[~2025-01-14  8:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 14:03 [U-Boot][PATCH 0/2] Improve fpga cmd usage information Ibai Erkiaga
2025-01-08 14:03 ` [U-Boot][PATCH 1/2] fpga: fix alignment on fpga cmd usage info Ibai Erkiaga
2025-01-09  7:52   ` Alexander Dahl
2025-01-09 12:45     ` Erkiaga Elorza, Ibai
2025-01-14  7:53       ` Michal Simek
2025-01-14  8:10   ` Michal Simek [this message]
2025-01-08 14:03 ` [U-Boot][PATCH 2/2] fpga: improve loads usage information Ibai Erkiaga
2025-01-14  7:58   ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d81e09f-2cb6-4298-8aa3-1728c954e08b@amd.com \
    --to=michal.simek@amd.com \
    --cc=ibai.erkiaga-elorza@amd.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox