Quantcast

[PATCH] Kconfig: Add support for hash and sha1sum commands

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] Kconfig: Add support for hash and sha1sum commands

Daniel Thompson
Currently these (board agnostic) commands cannot be selected using
menuconfig and friends. Fix this the obvious way.

Signed-off-by: Daniel Thompson <[hidden email]>
---
 cmd/Kconfig | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index d9f7151bacdc..f459f8440346 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -338,6 +338,19 @@ config CMD_CRC32
  help
   Compute CRC32.

+config CMD_HASH
+ bool "hash"
+ default n
+ help
+  Compute a hash using any algorithm supported by hash_lookup_algo().
+
+config HASH_VERIFY
+ bool "hash -v"
+ default n
+ depends on CMD_HASH
+ help
+  Add -v option to verify data against a hash.
+
 config CMD_MD5SUM
  bool "md5sum"
  default n
@@ -352,6 +365,20 @@ config MD5SUM_VERFIY
  help
   Add -v option to verify data against an MD5 checksum.

+config CMD_SHA1SUM
+ bool "sha1sum"
+ default n
+ select SHA1
+ help
+  Compute SHA1 checksum.
+
+config SHA1SUM_VERFIY
+ bool "sha1sum -v"
+ default n
+ depends on CMD_SHA1SUM
+ help
+  Add -v option to verify data against an SHA1 checksum.
+
 config LOOPW
  bool "loopw"
  help
--
2.9.4

_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Kconfig: Add support for hash and sha1sum commands

Simon Glass-3
Hi Daniel,

On 19 May 2017 at 10:26, Daniel Thompson <[hidden email]> wrote:
> Currently these (board agnostic) commands cannot be selected using
> menuconfig and friends. Fix this the obvious way.
>
> Signed-off-by: Daniel Thompson <[hidden email]>
> ---
>  cmd/Kconfig | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)

Great to see this. However CMD_HASH is already in progress at
u-boot-dm/kconfig-working. I hope it will make it to mainline soon.
But in the meantime could you please  rebase on that and send v2?

Regards,
Simon
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Kconfig: Add support for hash and sha1sum commands

Tom Rini-4
On Mon, May 22, 2017 at 02:26:57PM -0600, Simon Glass wrote:

> Hi Daniel,
>
> On 19 May 2017 at 10:26, Daniel Thompson <[hidden email]> wrote:
> > Currently these (board agnostic) commands cannot be selected using
> > menuconfig and friends. Fix this the obvious way.
> >
> > Signed-off-by: Daniel Thompson <[hidden email]>
> > ---
> >  cmd/Kconfig | 27 +++++++++++++++++++++++++++
> >  1 file changed, 27 insertions(+)
>
> Great to see this. However CMD_HASH is already in progress at
> u-boot-dm/kconfig-working. I hope it will make it to mainline soon.
> But in the meantime could you please  rebase on that and send v2?
Since this needs moveconfig.py run as well, I'll just v2 it, thanks!

--
Tom

_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Kconfig: Add support for hash and sha1sum commands

Daniel Thompson
On 22/05/17 22:17, Tom Rini wrote:

> On Mon, May 22, 2017 at 02:26:57PM -0600, Simon Glass wrote:
>> Hi Daniel,
>>
>> On 19 May 2017 at 10:26, Daniel Thompson <[hidden email]> wrote:
>>> Currently these (board agnostic) commands cannot be selected using
>>> menuconfig and friends. Fix this the obvious way.
>>>
>>> Signed-off-by: Daniel Thompson <[hidden email]>
>>> ---
>>>   cmd/Kconfig | 27 +++++++++++++++++++++++++++
>>>   1 file changed, 27 insertions(+)
>>
>> Great to see this. However CMD_HASH is already in progress at
>> u-boot-dm/kconfig-working. I hope it will make it to mainline soon.
>> But in the meantime could you please  rebase on that and send v2?
>
> Since this needs moveconfig.py run as well, I'll just v2 it, thanks!

Does that translate into "Daniel, don't worry about the rebase there are
other things that I'd need to change as well and its quicker and easier
for me just to do them".

I totally happy with that translation but just want to check it's correct.


Daniel.

_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Kconfig: Add support for hash and sha1sum commands

Tom Rini-4
On Tue, May 23, 2017 at 11:10:35AM +0100, Daniel Thompson wrote:

> On 22/05/17 22:17, Tom Rini wrote:
> >On Mon, May 22, 2017 at 02:26:57PM -0600, Simon Glass wrote:
> >>Hi Daniel,
> >>
> >>On 19 May 2017 at 10:26, Daniel Thompson <[hidden email]> wrote:
> >>>Currently these (board agnostic) commands cannot be selected using
> >>>menuconfig and friends. Fix this the obvious way.
> >>>
> >>>Signed-off-by: Daniel Thompson <[hidden email]>
> >>>---
> >>>  cmd/Kconfig | 27 +++++++++++++++++++++++++++
> >>>  1 file changed, 27 insertions(+)
> >>
> >>Great to see this. However CMD_HASH is already in progress at
> >>u-boot-dm/kconfig-working. I hope it will make it to mainline soon.
> >>But in the meantime could you please  rebase on that and send v2?
> >
> >Since this needs moveconfig.py run as well, I'll just v2 it, thanks!
>
> Does that translate into "Daniel, don't worry about the rebase there
> are other things that I'd need to change as well and its quicker and
> easier for me just to do them".
>
> I totally happy with that translation but just want to check it's correct.
Correct, I'll pick it up and rebase it and so forth.

--
Tom

_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot

signature.asc (836 bytes) Download Attachment
Loading...