From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 13/13] fit: make sha256 support optional
Date: Fri, 04 Jul 2014 06:17:33 +0200 [thread overview]
Message-ID: <53B62ADD.30105@denx.de> (raw)
In-Reply-To: <20140703191759.GI29202@bill-the-cat>
Hello Dirk, Tom, Simon,
Am 03.07.2014 21:17, schrieb Tom Rini:
> On Thu, Jul 03, 2014 at 09:14:01AM -0700, Simon Glass wrote:
>> Hi,
>>
>> On 3 July 2014 00:03, Heiko Schocher<hs@denx.de> wrote:
>>>
>>> Hello Dirk,
>>>
>>> Am 03.07.2014 08:27, schrieb dirk.eibach at gdsys.cc:
>>>
>>>> From: Dirk Eibach<dirk.eibach@gdsys.cc>
>>>>
>>>> sha256 has some beefy memory footprint.
>>>> Make it optional for constrained systems.
>>>>
>>>>
>>>> Signed-off-by: Dirk Eibach<dirk.eibach@gdsys.cc>
>>>> ---
>>>>
>>>> Changes in v3: None
>>>> Changes in v2:
>>>> - make sha256 support optional
>>>>
>>>> include/configs/dlvision-10g.h | 1 +
>>>> include/configs/io.h | 1 +
>>>> include/configs/iocon.h | 1 +
>>>> include/configs/neo.h | 1 +
>>>> include/image.h | 5 +++++
>>>> 5 files changed, 9 insertions(+)
>>>
>>>
>>> Sorry, some nitpick. As you introduce here the new define "CONFIG_FIT_DISABLE_SHA256",
>>> can you please add a short description in the README, thanks!
>>
>> I wonder if it would be better to make the option off by default? You
>> could perhaps use the existing CONFIG_SHA256 option, and check in
>> image.h to enable/disable support.
>>
>> Heiko what do you think?
Yes, that would be good, it would safe a lot of code ...
> I think I like this unless there's a problem...
... IIRC, as I did the sha256-rsa2048, sha256-rsa4096 adaptions,
I had this in mind, but there was a problem or just forgot it
to do it at the end ... so I just tried to compile the ids8313
board with having this options off by default, precisly on
current mainline I did:
$ git diff
diff --git a/include/image.h b/include/image.h
index 0a072f5..389423e 100644
--- a/include/image.h
+++ b/include/image.h
@@ -72,6 +72,9 @@ struct lmb;
# define IMAGE_ENABLE_SHA256 1
# endif
+#undef CONFIG_SHA256
+#undef IMAGE_ENABLE_SHA256
+
#ifndef IMAGE_ENABLE_CRC32
#define IMAGE_ENABLE_CRC32 0
#endif
-------------------------------------------------------
make mrproper
make ids8313_config
make CROSS_COMPILE=powerpc-linux- env
make CROSS_COMPILE=powerpc-linux- cross_tools
works without errors, but
$ ./MAKEALL ids8313
Configuring for ids8313 - Board: ids8313, Options: SYS_TEXT_BASE=0xFFF00000
powerpc-linux-size: './u-boot': No such file
lib/built-in.o: In function `sha256_calculate':
/home/hs/ids/u-boot/lib/rsa/rsa-checksum.c:159: undefined reference to `sha256_starts'
/home/hs/ids/u-boot/lib/rsa/rsa-checksum.c:161: undefined reference to `sha256_update'
/home/hs/ids/u-boot/lib/rsa/rsa-checksum.c:162: undefined reference to `sha256_finish'
make: *** [u-boot] Fehler 1
same for am335x_boneblack_vboot, sandbox.
So there must be also looked at this sha256_calculate() in
lib/rsa/rsa-checksum.c and common/image-sig.c checksum_algos[] and
image_sig_algos[] must be adjusted, reworked ...
If we do this for CONFIG_SHA256 I vote for doing this for all
checksum algorithms ... and we must look to the boards, which use
FIT support, that we enable all options bayk they use again.
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2014-07-04 4:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 6:27 [U-Boot] [PATCH v3 0/13] Fixes on gdsys boards and some new functionality dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 01/13] board: controlcenterd: Fix pci access dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 02/13] board: gdsys: Adapt sdhc_boot.c to mmc_get_env_addr API change dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 03/13] board: controlcenterd: Use new API for setting i2c bus dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 04/13] board: iocon: Support DisplayPort hardware dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 05/13] i2c: IHS I2C master driver dirk.eibach at gdsys.cc
2014-07-03 7:01 ` Heiko Schocher
2014-07-03 6:27 ` [U-Boot] [PATCH v3 06/13] board: gdsys: Fix dlvision-10g I2C configuration dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 07/13] board: gdsys: Increase iocon and dlv10g version string dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 08/13] board: gdsys: Configure bridge on DP501 to support DDC only dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 09/13] board: gdsys: Make gdsys osd hardware detection more robust dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 10/13] board: gdsys: Enable scrambling on DP501 dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 11/13] board: iocon: Modify iocon hardware startup dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 12/13] board: gdsys: Remove commands to reduce footprint dirk.eibach at gdsys.cc
2014-07-03 6:27 ` [U-Boot] [PATCH v3 13/13] fit: make sha256 support optional dirk.eibach at gdsys.cc
2014-07-03 7:03 ` Heiko Schocher
2014-07-03 16:14 ` Simon Glass
2014-07-03 19:17 ` Tom Rini
2014-07-04 4:17 ` Heiko Schocher [this message]
2014-07-04 5:04 ` Dirk Eibach
2014-07-03 6:40 ` [U-Boot] [PATCH v3 0/13] Fixes on gdsys boards and some new functionality Stefan Roese
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=53B62ADD.30105@denx.de \
--to=hs@denx.de \
--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