Commit Graph

2484 Commits

Author SHA1 Message Date
Suguru Saito 31b79b2ed6 sharp: add pwa7200 2021-12-25 02:46:39 +09:00
Suguru Saito 35192f5638 sharp: add pwg4200 2021-12-25 02:46:39 +09:00
Suguru Saito 37663da595 pwg5300: add boot logo 2021-12-25 02:46:39 +09:00
Takumi Sueda 209485c91d sharp: fix lack of PW-SH7 logo 2021-12-25 02:46:39 +09:00
Takumi Sueda 138765c390 sharp: add pwsh6 2021-12-25 02:46:38 +09:00
Takumi Sueda 6d638024ad sharp: add pwsh5 2021-12-25 02:46:38 +09:00
Takumi Sueda a49c42dc41 sharp: add pwsh4 2021-12-25 02:46:38 +09:00
Takumi Sueda 2badb893f7 pwsh1: update logo 2021-12-25 02:46:38 +09:00
Takumi Sueda 48f4bdd196 sharp: add pwsh3 2021-12-25 02:46:38 +09:00
Takumi Sueda 9c4b8637ca sharp: add pwsh2 2021-12-25 02:46:38 +09:00
Takumi Sueda da8e30c97f pwsh1: add BMP logo 2021-12-25 02:46:38 +09:00
Heinrich Schuchardt 99f45acc2a imx6: icorem6: chmod 644 enigcam.bmp
Bitmap files should not be executable.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
2021-04-27 15:13:59 -03:00
Peng Fan bb6b1f68ed tools: imx image: fix write warning
Fix the warning by set the variable zero to uint64_t
"warning: ‘write’ reading 5 bytes from a region of size 4"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Jessica Clarke 3b142045e8 Support building on macOS/arm64
On Arm-based Macs, -no_pie is ignored and gives a linker warning.
Moreover, the build falls over with:

  ld: Absolute addressing not allowed in arm64 code but used in '_image_type_ptr_aisimage' referencing '_image_type_aisimage'

for dumpimage and mkimage, since we put data structs in text sections
not data sections and so cannot have dynamic relocations. Instead, move
the sections to __DATA and drop disabling PIE.

Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2021-03-28 17:30:35 -04:00
Simon Glass ad09004ac4 mkeficapsule: Correct printf() strings
Use %z when printing size_t values. This avoids errors on 32-bit
machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
Use a conversion to size_t for printing stat.st_size.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-03-16 09:37:04 +01:00
Pali Rohár 15942805b7 arm: mvebu: a38x: Remove dead code ARMADA_39X
Config option ARMADA_39X is never set so remove all dead code hidden under
ifdef CONFIG_ARMADA_39X blocks.

Also remove useless checks for CONFIG_ARMADA_38X define as this macro is
always defined for a38x code path.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-03-12 07:44:21 +01:00
Simon Glass b82492bbcc buildman: Support single-threaded operation
At present even if only a single thread is in use, buildman still uses
threading.

For some debugging it is helpful to do everything in the main process.
Allow -T0 to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-03-04 17:51:43 -05:00
Bernhard Kirchen 67637d4b5a fix patman --limit-cc option
patman's --limit-cc option parses its argument to an integer and uses
that to trim the list of CC recipients to a particular maximum. but that
only works if the cc variable is a list, which it is not.

Signed-off-by: Bernhard Kirchen <bernhard.kirchen@mbconnectline.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-03-03 19:17:25 -07:00
Tom Rini 52ba373b78 i.MX for 2021.04
----------------
 
 - new boards:
 	- i.MX8MN Beacon EmbeddedWorks (2GB)
 	- Gateworks Venice imx8mm
 - convert to DM:
 	- imx53-qsb, mx53loco, mx51evk, mx23-evk
 - Fixes :
 	- Network : FEC ethernet quirks
 	- DH dh-imx6
 
 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/6597
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQS2TmnA27QKhpKSZe309WXkmmjvpgUCYD+asg8cc2JhYmljQGRl
 bnguZGUACgkQ9PVl5Jpo76YI0QCeLhbpWfZM7sixvsEsLNt6DLvEiEQAnRqSjFsQ
 BEcRslPhjQc+mALAHDYD
 =7fLb
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-imx-20210303' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

i.MX for 2021.04
----------------

- new boards:
	- i.MX8MN Beacon EmbeddedWorks (2GB)
	- Gateworks Venice imx8mm
- convert to DM:
	- imx53-qsb, mx53loco, mx51evk, mx23-evk
- Fixes :
	- Network : FEC ethernet quirks
	- DH dh-imx6

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/6597
2021-03-03 10:10:34 -05:00
Fabio Estevam 325bb40f21 tools: imx8mimage: Restore the original __ALIGN_MASK() macro
Since commit c738adb8db ("tool: Move ALIGN_MASK to header as common MACRO")
the i.MX8MQ EVK board no longer boots.

The reason is that imx8mimage.c used a custom __ALIGN_MASK() macro, so
restore the original macro to fix the boot and rename it accordingly.

Reported-by: Lukas Rusak <lorusak@gmail.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Ye Li <ye.li@nxp.com>
2021-03-01 10:21:36 +01:00
Klaus Heinrich Kiwi 95cacc86f2 tools/mkeficapsule.c: fix DEBUG build
Fix a missing comma sign (,) from a printf(), that is only
reachable if DEBUG is defined, in which case the build fails with:

    tools/mkeficapsule.c:266:36: error: expected ‘)’ before ‘bin’
      266 |  printf("\tbin: %s\n\ttype: %pUl\n" bin, guid);
          |                                    ^~~~
          |                                    )

Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-02-26 16:17:43 +01:00
Simon Glass c5819701a3 image: Adjust the workings of fit_check_format()
At present this function does not accept a size for the FIT. This means
that it must be read from the FIT itself, introducing potential security
risk. Update the function to include a size parameter, which can be
invalid, in which case fit_check_format() calculates it.

For now no callers pass the size, but this can be updated later.

Also adjust the return value to an error code so that all the different
types of problems can be distinguished by the user.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Bruce Monroe <bruce.monroe@intel.com>
Reported-by: Arie Haenel <arie.haenel@intel.com>
Reported-by: Julien Lenoir <julien.lenoir@intel.com>
2021-02-15 22:31:52 -05:00
Heinrich Schuchardt fd434f47d4 buildman: 'Thread' object has no attribute 'isAlive'
The isAlive() method was deprecated in Python 3.8 and has been removed in
Python 3.9. See https://bugs.python.org/issue37804. Use is_alive() instead.

Since Python 2.6 is_alive() has been a synonym for isAlive(). So there
should be no problems for users using elder Python 3 versions.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-02-14 11:32:04 +01:00
Ilies CHERGUI 2b139b3992 tools/fit_check_sign.c: Update usage function.
Add "-c" option to set the configuration name when
checking the FIT image signature.

Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
2021-02-01 16:32:06 -05:00
Tom Rini 242ef48ea7 tpm fixes for coral
binman fixes support for symbols in sub-sections
 support for additional cros_ec commands
 various minor fixes / tweaks
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmAV6K8RHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreYERgf/QbwOL87yPbf9SyXBQ0EMTmn1ve9HCiv9
 yeXrijvA0/wtTVoM44d/z7THb+7Zqw6LbsVOXUSicdGqaogy10xIuz5we0CoGJm6
 iwYWV6kaAqjCxDTlSToGnR/TCjiOVgXC6u5QPCZC0LGbAmDbAl4jyCuQxxq2eXYD
 hrLSzZPHDe0s2BeWZKRQJ26qyPfWIribXNJXG78/FsvDrdWPPc5K+/ZEb2IWawWR
 nEZ8GTEYZpik/niEJ3gFozwCwpJQi3PyukjZvzTGn6tBqg12YXE4dbSzcj48Uj4o
 prwUFAGKRR97zFB6c4+NUvd3VBUgPtPdZrtzZ1nNCppiMq1E4BKiDg==
 =kijh
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-30jan21' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

tpm fixes for coral
binman fixes support for symbols in sub-sections
support for additional cros_ec commands
various minor fixes / tweaks
2021-01-31 08:49:53 -05:00
Simon Glass 5c6ba71bbe binman: Allow for skip_at_start when reading entries
The offset of an entry needs to be adjusted by its skip-at-start value.
This is currently missing when reading entry data. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Simon Glass 6eb9932668 binman: Support alignment of files
When packing files it is sometimes useful to align the start of each file,
e.g. if the flash driver can only access 32-bit-aligned data. Provides a
new property to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Simon Glass 5af9ebc4bc binman: Allow vblock to include devicetree blobs
At present if a devicetree blob is included in a vblock it does not deal
with updates. This is because the vblock is created once at the start and
does not have a method to update itself later, after all the entry
contents are finalised.

Fix this by adjusting how the vblock is created.

Also simplify Image.ProcessEntryContents() since it effectively duplicates
the code in Section.ProcessContents().

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Simon Glass 939d1062d0 binman: Support reading an image with entry args
Normally when an entry is created, any entry arguments it has are required
to be provided, so it can actually generate its contents correctly.

However when an existing image is read, Entry objects are created for each
of the entries in the image. This happens as part of the process of
reading the image into binman.

In this case we don't need the entry arguments, since we do not intend to
regenerate the entries, or at least not unless requested. So there is no
sense in reporting an error for missing entry arguments.

Add a new property for the Image to handle this case. Update the error
reporting to be conditional on this property.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Simon Glass 870a9ead56 binman: Support finding symbols in sub-sections
At present binman only supports resolving symbols in the same section as
the binary that uses it. This is quite limited because we often need to
group entries into different sections.

Enhance the algorithm to search the entire image for symbols.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Simon Glass 1ecf3b8f27 binman: Fix a few file comments
Two files have the wrong comment at the top of them. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Simon Glass 5b378e4d0b binman: Show the size when writing entries
Update the log output to show the size, since this is useful information.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Simon Glass 397a770254 binman: Update the TODO list
Two of the items have been completed and I thought of another one. Update
the list.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Simon Glass 6deff872cf patman: Correct lz4 compression parameters
At present on large files, lz4 uses a larger block size (e.g. 256KB) than
the 64KB supported by the U-Boot decompression implementation. Also it is
optimised for maximum compression speed, producing larger output than we
would like.

Update the parameters to correct these problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Simon Glass 9fc6ebd8fe dtoc: binman: Drop Python 2 code
Drop a few more Python 2 relics that are no-longer needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-01-30 14:25:41 -07:00
Heinrich Schuchardt 850d27b4b9 tools: add mkeficapsule to .gitignore
mkeficapsule is a build product. Add it to .gitignore

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-29 20:22:40 +01:00
Tom Rini 69d29fe1c0 Pull request for UEFI sub-system for efi-2021-04-rc1-3
Bug fixes for UEFI sub-system:
 
 * correct value of  EFI_BLOCK_IO_PROTOCOL.Media.LastBlock
 * correct GUID when closing of EFI_LOAD_FILE_PROTOCOL
 * error handling in mkeficapsule tool
 
 Bug fixes for FAT file system:
 
 * consistent error handling for flush dir()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmAMM8AACgkQxIHbvCwF
 GsTryQ//Q1e8uAw+M78k8T1Mhkiz734WPfVooCyn+d+WYeTLQKNPN2AjVNMa7dYq
 HpROrQ++4Q9fdBIRyDe0KAfoJ2TWFa3UARxBTXEvjC9RrMQBgrgeBZTxiFsaLrL2
 GI3a9qVioHfBqrWdwKjlQLD79rL4ZQW0OfG7JgnPIBQvM/12e+C4kxQ9JmBZIxVc
 0ENbr4CttX4Tbp70XvtjXDnrqpv4vv+nv6hDw5rmh8pb37OdCnVeYPuAxqHhpqHP
 KrSF/N/Xmi4XRVxu3UrVJX5g/A2+aM69D8vy3tcl7Es5gs/VoqCOyx4+1/GaalNa
 7cLEfb2DECDy6rIyvCeoFYrRNcT9m6d8COAbGDOonGbRtHFV2WsS/1J1ZkMG18pc
 O6gJcNdMYyK9B9Jt4FmsHIWzz8FFKw+4ro9gKfIm8bMIgPZ1txGkn7/4LRxj/VxS
 qNWLiYEnIJtAPV1aiDIxRINh4icewwM8tteBfJB5AlPVodWmWmc3J+RsbIU0yQcK
 T7pqj8zX4eL0SSMMZYir9pFhqZcr2SQP9V8fuPLdeILFF7V+M83dRlb8kLf0sb3f
 CWC56JDV6iVWkPDpYe0ZolqMUW01FdxDIaa1X3dBvn5PWbl4CubxudPCWtLK69FM
 azoIgrcBaFu3KgYA9sZF8/BXEJ1viYKwe8Qg9Vkl2fBAX8+75jA=
 =S6wx
 -----END PGP SIGNATURE-----

Merge tag 'efi-2021-04-rc1-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2021-04-rc1-3

Bug fixes for UEFI sub-system:

* correct value of  EFI_BLOCK_IO_PROTOCOL.Media.LastBlock
* correct GUID when closing of EFI_LOAD_FILE_PROTOCOL
* error handling in mkeficapsule tool

Bug fixes for FAT file system:

* consistent error handling for flush dir()
2021-01-23 19:07:00 -05:00
Sughosh Ganu d33f31816f mkeficapsule: Miscellaneous fixes in the utility
Miscellaneous fixes in the mkeficapsule utility -- these include a few
resource leak issues flagged by Coverity along with some additional
code improvements suggested by Heinrich during code review.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2021-01-23 07:56:54 +01:00
AKASHI Takahiro f7cd8b7b55 tools: mkeficapsule: fill reserved members of structure
Fill reserved members of efi_firmware_management_capsule_image_header
structure with zero's for safety.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fixes: CID 316354
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-23 07:56:53 +01:00
Martin Hundebøll 09779488a9 tools: env: return error if ubi_update_start() fails
The UBI_IOCVOLUP ioctl can fail if exclusive access to the volume isn't
obtained. If this happens, the flush operation doesn't return error,
leaving the caller without knowledge of missing flush.

Fix this by forwarding the error (-1) from ubi_update_start().

Fixes: 34255b92e6 ("tools: env: Add support for direct read/write UBI volumes")
Signed-off-by: Martin Hundebøll <martin@geanix.com>
2021-01-22 16:58:55 -05:00
Joel Stanley 603e26f763 mkimage: Move padding commands outside of FIT_SIGNATURE
These commands were disabled when CONFIG_FIT_SIGNATURE is disabled, but
they do not depend on crypto support so they can be unconditionally
enabled.

Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-01-22 16:17:53 -05:00
Joel Stanley 5d40d5f12e tools/Makefile: FIT_CIPHER requires libssl
If CONFIG_FIT_CIPHER is enabled without CONFIG_FIT_SIGNATURE then
mkimage/dumpimage will fail to link:

 /usr/bin/ld: tools/common/image-cipher.o: in function `fit_image_decrypt_data':
 image-cipher.c:(.text+0x9a): undefined reference to `image_get_host_blob'
 /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x10): undefined reference to `EVP_aes_128_cbc'
 /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x40): undefined reference to `EVP_aes_192_cbc'
 /usr/bin/ld: tools/common/image-cipher.o:(.data.rel+0x70): undefined reference to `EVP_aes_256_cbc'
 /usr/bin/ld: tools/lib/aes/aes-encrypt.o: in function `image_aes_encrypt':
 aes-encrypt.c:(.text+0x22): undefined reference to `EVP_CIPHER_CTX_new'
 /usr/bin/ld: aes-encrypt.c:(.text+0x6f): undefined reference to `EVP_EncryptInit_ex'
 /usr/bin/ld: aes-encrypt.c:(.text+0x8d): undefined reference to `EVP_EncryptUpdate'
 /usr/bin/ld: aes-encrypt.c:(.text+0xac): undefined reference to `EVP_CIPHER_CTX_free'
 /usr/bin/ld: aes-encrypt.c:(.text+0xf2): undefined reference to `EVP_EncryptFinal_ex'
 collect2: error: ld returned 1 exit status

Signed-off-by: Joel Stanley <joel@jms.id.au>
2021-01-22 16:17:52 -05:00
Philippe Reynes edfeba7538 tools: image-host: add support for several sub-images
The propoerty sign-images points to images in the configuration
node. But thoses images may references severals "sub-images" (for
example for images loadable). This commit adds the support of
severals sub-images.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2021-01-22 16:17:52 -05:00
Philippe Reynes 5a4116f1a2 tools: image-host: clean function fit_config_get_hash_list
This commit creates a function fit_config_add_hash that will be
used in the next commit to support several 'sub-images'.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-22 16:17:52 -05:00
Fabien Parent 44165e4c67 tools: mtk_image: add support for booting ARM64 images
mkimage is only able to package aarch32 binaries. Add support for
AArch64 images.

One can create a ARM64 image using the following command line:
mkimage -T mtk_image -a 0x201000 -e 0x201000 -n "media=emmc;arm64=1"
-d bl2.bin bl2.img

Signed-off-by: Fabien Parent <fparent@baylibre.com>
2021-01-18 14:59:29 -05:00
Tom Rini 83e13c3469 Merge branch '2021.04-rc' of https://github.com/lftan/u-boot
- Add ATF flow for SoC64 devices
- Update socfpgaimage to support print header and update padding flow
2021-01-15 07:55:11 -05:00
Ley Foon Tan 40551cf99c tools: socfpgaimage: update padding flow
The existing socfpgaimage always pads the image to the maximum size of
OCRAM size. This will break in the encryption flow where it expects the
image to be un-padded. The encryption tool will do the encryption for
the whole image and append the signature key at end of the image.
The signature key will append to beyond the size of OCRAM if the image
is padded with the maximum size before encryption.

Move the padding step from socfpgaimage to Makefile and pads with objcopy
command.

socfpgaimage will pad the image with 16 bytes aligned (including CRC word),
this is a requirement in encryption flow.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2021-01-15 17:48:39 +08:00
Ley Foon Tan bcf33fac64 tools: socfpgaimage: Print image header information
Print image header information if the header is verified.

Example output from mkimage "-l" option:

$ ./tools/mkimage -l spl/u-boot-spl.sfp
Image Type      : Cyclone V / Arria V SoC Image
Validation word : 0x31305341
Version         : 0x00000000
Flags           : 0x00000000
Program length  : 0x00003a59
Header checksum : 0x00000188

$ ./tools/mkimage -l spl/u-boot-spl.sfp
Image Type      : Arria 10 SoC Image
Validation word : 0x31305341
Version         : 0x00000001
Flags           : 0x00000000
Header length   : 0x00000014
Program length  : 0x000138e0
Program entry   : 0x00000014
Header checksum : 0x00000237

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2021-01-15 17:48:39 +08:00
Heinrich Schuchardt 4961ceefbf tools: efivar.py unused variable
Unused variables should be called '_'.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
2021-01-13 02:38:00 +01:00
Heinrich Schuchardt 33abdb9836 tools: efivar.py should check GUID when deleting
When deleting a variable we must check that the GUID provided by the
user matches the GUID of the variable.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
2021-01-13 02:38:00 +01:00