| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
|
|
|
|
|
|
|
| |
Add the i.MX6SL USB id to the list of known ids.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
For better readability sort the list of known USB ids by VID and PID.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Add imximg support for i.MX50 processors which use the i.MX flash
header v2 format.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Re-Implement the DCD v2 processing.
Processing for the DCD write command went into a separate function enabling
the over-all DCD processing to handle check, nop and unlock commands as well.
The trivial NOP command is supported right away.
Further changes: put in some data consistancy checks and error handling, do
structured member access and proper endianess handling and direct error
messages to stderr.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
DCD v1 elements are encoded little endian.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
Do some cleanup which enables DCDv1 16 bit write access as side effect.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Only the first encountered DCD block should be processed, optional DCD
processing may be switched off by command option.
Clean up the corresponding logic.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Improve code understandability: extract the "jump application" Serial
Download Protocol access method and file-to-buffer reader functionality
out of do_irom_download().
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Do some cleanup and access the elements of Serial Download Protocol
messages in endianess-portable manner using proper typed struct members.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
Remove a variable raising complexity for no reason.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
The configuration interface for struct usb_work is not implemented here
leaving the options set on fixed settings or even uninitialized.
Do some cleanup and remove those half-cooked dead code passages.
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
| |
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
| |
Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
Now that we can use set_bits/clear_bits in the DCD tables, add support
for this in the imx-usb-loader aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
- print write_memory message only in verbose mode, but in all
cases when memory is written
- print more information about the DCD section just executed
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The i.MX SoCs support setting bits and clearing bits in their DCD table.
This adds commands for these in the imx-image tool.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
This shouldn't be necessary. So far it didn't hurt either, but now
this invalidates the signature of the image, so keep the image
unmodified.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
We invalidate the dcd data in the uploaded image since we already
processed it manually. To do so we have set the dcd pointer to 0.
Doing it this way prevents the ROM from executing the HAB code in
debug mode. Use the dcd length instead to invalidate the dcd data.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally imx-usb-loader interprets and executes the DCD table from
an uploaded image and invalidates the DCD before uploading the image
itself to prevent the i.MX ROM code from executing it again. With HAB
signed images this is not possible since invalidating the DCD table
modifies the image which also makes the signature invalid.
To support this usecase add two new options to imx-usb-loader:
The -i option allows to pass in an external config file which can be
used to setup SDRAM. The DCD table in the image can then be made empty
so that the ROM does not see a second SDRAM setup.
The -s option allows to skip interpreting the DCD table in the image.
This may when some setup stuff is still in the images DCD table but
shall be executed by the ROM and not by imx-usb-loader.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
No need to pass the libusb context through from function to function.
Make them globally visible.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Both imx-image and imx-usb-loader use their own variants of the
i.MX flash header definitions. Consolidate them to avoid code
duplication.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
To avoid forward declaration in a later patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
imx-usb-loader tries to safe memory by reading the image in chunks.
This is unnecessarily complicated. The images are small, so fully read
them into memory and store them in a single buffer. This makes handling
them a lot easier.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
The macros are needed earlier in a later patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The buffers passed to dump_long and dump_bytes are not (and shouldn't
be) modified. Make the arguments const.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Use the common definition of ARRAY_SIZE and offsetof.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
| |
Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Not much to do here, only add the Product ID.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
Instead of bailing out skip unknown tags. These tags are usually
doing operations to poll for a certain register state. The correct
solution is to implement this register polling, but for now delay
execution for a while and assume the register has the correct
state afterwards.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
| |
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\
| |
| |
| |
| | |
Conflicts:
scripts/Makefile
|
| |
| |
| |
| |
| |
| |
| |
| | |
"%i" in format string requires a signed integer.
"%d" in format string requires a signed integer.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
| |
The i.MX25 works like the i.MX51, just add the SoC magic and the USB product
id.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
This adds host tools for i.MX to generate the i.MX internal
flash header format and a tool to upload these images to an
i.MX SoC via USB.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|