summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release version 1.8HEADv1.8masterStephen Warren2018-06-182-3/+9
| | | | | | | | | | | | Changelog: - Support for production devices with PKC - Support for --gen-signed-msgs, --signed-msgs, and --download-signed-msgs options. - Support for --usb-timeout option. - Various man page and code cleanups. - Compilation fix when cryptopp isn't installed system-wide. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Correct spelling mistakeEdward Betts2017-10-031-1/+1
| | | | | | (Not signed-off-by the submitter, but the patch is trivial, so I don't believe it's an issue in this case) Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Don't assume cryptopp is system-wide installedThomas Petazzoni2017-10-034-31/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | The current build system adds "-isystem /usr/include/$(CRYPTOLIB)" to AM_CPPFLAGS, but this is wrong because cryptopp might not be installed in this location. Instead, the build system should simply include <cryptopp/...> or <crypto++/...> and rely on the compiler include path. The tricky part is that it can be <cryptopp/...> or <crypto++/...>. To solve this, we use a solution similar to the one used in https://github.com/bingmann/crypto-speedtest/blob/master/m4/cryptopp.m4 and https://github.com/bingmann/crypto-speedtest/blob/master/src/speedtest_cryptopp.cpp: the configure script fills in a variable called CRYPTOLIB_HEADER_PREFIX, and we use that in the C++ code to include the right header file. It is worth mentioning that doing #include <CRYPTOLIB_HEADER_PREFIX/foobar.h> doesn't work, and we have to use an intermediate #define'd constant to overcome this C preprocessor limitation. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (swarren, apply the same change to rsa-pss.cpp) Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Update miniloader licenseStephen Warren2017-04-285-168/+127
| | | | | | | | Update the miniloader license to match the license used for other firmware blobs in the Linux firmware git repository. This reduces the number of licenses used for different parts of Tegra-related software. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Avoid man warning about unknown macroMartin Michlmayr2016-06-241-2/+2
| | | | | | | | | | | | | | man --warnings shows this warning because some dots at the beginning of the line are not escaped: > usr/share/man/man1/tegrarcm.1.gz 111: warning: macro `..' not defined Put the ellipsis in brackets to avoid this. This was found thanks to lintian, the Debian package checker. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Fix command in man pageMartin Michlmayr2016-06-241-1/+1
| | | | | | | | The command .fi is used after .nf to turn on paragraph filling mode again. Fix the obvious typo. Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Manual page cleanups and expansionStephen Warren2016-03-162-23/+45
| | | | | | | | | | | Expand documentation of --pkc, --gen-signed-msgs, and --download-signed-msgs. Clean up various capitalization issues. Fix a typo, in the code too. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add option --usb-timeout=<value>Jimmy Zhang2016-03-152-3/+12
| | | | | | | | | | | | | | | | RCM communication sometimes fails if the USB timeout is short. The default timeout is 1000ms. Increasing the timeout value may avoid this issue. The exact cause is not yet diagnosed. This patch implements a --usb-timeout option to allow the value to be configured. A value of 0 means unlimited timeout. Example: $ sudo tegrarcm --bct=jetson-tk1-bct.bct --bootloader=u-boot.bin \ --loadaddr=0x83d88000 --pkc=rsa_priv.der --usb-timeout=5000 Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com> (swarren, commit description fixes) Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add option --download-signed-msgs to download signed blobsJimmy Zhang2016-03-152-74/+305
| | | | | | | | | | | | | | | | | | This feature allows user to download signed messages to devices secured with PKC. Example: tegrarcm --download-signed-msgs --signed-msgs-file rel_1001.bin \ --bct=jetson-tk1-bct.bct --bootloader=u-boot.bin --loadaddr=0x83d88000 Where the following blob files are downloaded to device sequentially: a) rel_1001.bin.qry b) rel_1001.bin.ml c) rel_1001.bin.bl Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add option --gen-signed-msgs and --signed-msgs-file to generate signed blobsJimmy Zhang2016-03-151-19/+240
| | | | | | | | | | | | | | | | | | | | | This feature allows generation of signed blobs that can later be used to communicate with a PKC-enabled Tegra device without access to the PKC. Option --bootloader, --soc and --pkc are also required when generating the blob. Example: tegrarcm --gen-signed-msgs --signed-msgs-file rel_1001.bin \ --bootloader u-boot.bin --loadaddr 0x83d88000 --soc 124 \ --pkc rsa_priv.der Where generated signed message files are: a) rel_1001.bin.qry b) rel_1001.bin.ml c) rel_1001.bin.bl Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add support for production devices secured with PKCAlban Bedel2016-03-156-18/+307
| | | | | | | | | | | | Add the support code needed to sign the RCM messages with RSA-PSS as needed to communicate with secured production devices. This mode is enabled by passing a key via the --pkc command line argument. If such a key is set the RCM messages will be signed with it as well as the bootloader. Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de> Signed-off-by: Jimmy Zhang <jimmzhang@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Release version 1.7v1.7Stephen Warren2015-10-162-1/+5
| | | | | | | | | | Changelog: - Documented patch submission process in this file - Added better USB debugging message - Require a specific minimum version of libusb - Added --usb-port-path cmdline option Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Implement --usb-port-path cmdline optionStephen Warren2015-10-082-0/+124
| | | | | | | | | This allows the user to specify which USB device to control, and in a manner that is most immune to the set of attached USB devices varying. See the manpage edit in this commit for a full description of how to use this option. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Match USB port ID on re-enumerationStephen Warren2015-10-083-6/+102
| | | | | | | | | | | | | | | | | When executing the RCM process, the Tegra device will be re-enumerated on the USB bus once the miniloader is booted. This requires tegrarcm to search for it again. In a system with multiple attached Tegra boards, all being booted/shutdown in parallel, it is possible that the second call to usb_open() will find a different Tegra device. Solve this issue by having usb_open() record the exact physical USB port path of the device, and match only that path on subsequent searches. This will be robust except in the case where the device being operated on is physically unplugged and replaced (not simply power-cycled) while tegrarcm is executing. This is much less likely that the previous failure modes. This feature also enables the next patch in this series. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Move all USB device matching logic into usb_match()Stephen Warren2015-10-081-14/+23
| | | | | | | This consolidates the matching logic into one place, which will make future enhancements to the logic simpler. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* configure.ac: Request at least libusb 1.0.9Tobias Klauser2015-04-131-1/+1
| | | | | | | | | | | | | tegrarcm needs at least libusb 1.0.9 which introduces libusb_error_name. Otherwise the build fails with the following linker error: usb.o: In function `usb_read': .../tegrarcm/src/usb.c:260: undefined reference to `libusb_error_name' usb.o: In function `usb_write': .../tegrarcm/src/usb.c:233: undefined reference to `libusb_error_name' Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Better usb debug messagesAllen Martin2015-03-192-3/+3
| | | | | | | Print more explicit messages when usb transition failed. Signed-off-by: Allen Martin <amartin@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add "submitting patches" section to READMEStephen Warren2015-02-241-4/+31
| | | | | | This tells users how/where to send patches, etc. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Version 1.6v1.6Allen Martin2014-04-112-1/+2
| | | | | | | | Update version number to 1.6 and update changelog in README for version 1.6 release notes. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add odm production secure mode supportPenny Chiu2014-04-042-1/+4
| | | | | | | | | tegrarcm should work if the operating mode is ODM production secure mode. Add the operating mode definition and description. Signed-off-by: Penny Chiu <pchiu@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Acked-by: Allen Martin <amartin@nvidia.com>
* tegrarcm: Bump version to 1.5v1.5Allen Martin2013-09-202-1/+5
| | | | | | | | Update README with change log for version 1.5, and bump version number. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add command to pass miniloader in from fileAllen Martin2013-09-202-25/+91
| | | | | | | | | Add --miniloader and --miniloader_entry commands which allow passing in the miniloader from a file and specifying the miniloader entry address from the command line instead of using built-in miniloader. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add readbct supportAllen Martin2013-09-204-21/+147
| | | | | | | | Add a new command "readbct" which will read the BCT from the target system and write it to bctfile. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Clean up usage infoAllen Martin2013-09-201-2/+9
| | | | | | | | Added --help and --version commands to usage. Made it more clear that --entryaddr is optional. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Assume nv3p server is running if RCM doesn't respondAllen Martin2013-09-201-67/+93
| | | | | | | | | | | Change the initialization logic so that if RCM protocol isn't repsonding but a tegra recovery USB is reported, assume the nv3p server is already running. This allows things like enumeration of devices via nv3p without having to reset into RCM mode to talk to the device again. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add timeout to USB xfersAllen Martin2013-09-201-2/+5
| | | | | | | | | | This prevents tegrarcm from just hanging in the event that the target gets in some bad state and stops responding to USB (like downloading a bad BCT). Set default timeout to 1s which should be plenty long enough for the max xfer size of 4096 bytes. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add Tegra124 supportAllen Martin2013-09-205-2/+24
| | | | | | | Add Tegra124 USB device id, miniloader, and chip SKU information. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add Tegra124 miniloaderAllen Martin2013-09-202-0/+8571
| | | | | Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add support for RCM protocol version 40Allen Martin2013-09-202-20/+112
| | | | | | | RCM protocol 40 is required for Tegra124 Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add missing SKU informationAllen Martin2013-09-202-12/+18
| | | | | | | | | Sync up SKU numbers with TOT tegra u-boot. Also change the default SKU print to just use the chip family name so it's more resistant to being out of sync in the future. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Change NVIDIA license to apply to all miniloader filesAllen Martin2013-09-201-2/+2
| | | | | | | | | Change the LICENSE file to make it clear that the NVIDIA proprietary license applies to all miniloader files, not just the ones explicitly listed. Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Bump version to 1.4v1.4Allen Martin2013-06-172-1/+4
| | | | | | | Bump the version number to 1.4 and update change log. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add SPI flash support to tegra114 miniloaderAllen Martin2013-06-171-7265/+6488
| | | | | | | | | Update tegra114 miniloader file with a version that supports boot from SPI flash. The previous version would hang if the board was configured to boot from SPI. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Move miniloader files to "miniloader" subdirAllen Martin2013-06-175-6/+6
| | | | | | | | | In preparation of changing the LICENSE file to refer to "miniloader" directory instead of individual filenames, move all miniloader files into "miniloader" subdir. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add help command to man pageAllen Martin2013-06-171-0/+3
| | | | | | | Add a description of the "--help" command to the man page. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* tegrarcm: Add version commandAllen Martin2013-06-172-0/+14
| | | | | | | | Add command line option "--version" that prints the version number and exits. Signed-off-by: Allen Martin <amartin@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com>
* Bump version to 1.3v1.3Allen Martin2013-05-022-1/+4
| | | | | | Bump the version number to 1.3 and update change log. Signed-off-by: Allen Martin <amartin@nvidia.com>
* Add -lpthread when looking for crypto++Alexandre Courbot2013-05-021-1/+1
| | | | | | | | | On some distributions (e.g. Arch Linux) configure will fail to find crypto++ because of the test program not linking due to undefined references to pthread functions. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Allen Martin <amartin@nvidia.com>
* Check return value of rcm_get_msg_len()Allen Martin2012-12-071-1/+5
| | | | | | | | | | | Add a check on the return value of rcm_get_msg_len() so if it fails it isn't passed into usb_write(). Change-Id: I31aedf9f1dcde8aeed34b23a020e83dddd3179b6 Signed-off-by: Allen Martin <amartin@nvidia.com> Reviewed-on: http://git-master/r/167827 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
* Return errno from download_bct() when stat() failsStephen Warren2012-11-301-1/+1
| | | | | | | | | | | | | | | | | | stat() returns a hard-coded -1 on error. Return errno instead, so that when main() calls error() with the returned value, the actual error can be decoded. This transforms the error message from: ...: Unknown error -1 to e.g.: ...: No such file or directory Signed-off-by: Stephen Warren <swarren@nvidia.com> Change-Id: I1c7503eeef2cebafeaf5d1cfba5626244979e3df Reviewed-on: http://git-master/r/167774 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Allen Martin <amartin@nvidia.com>
* Bump version to 1.2v1.2Allen Martin2012-11-302-2/+5
| | | | | | | | | | Bump the version number to 1.2 and update change log. Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: I188eba740904ba5f9cd43179e16a39c077900d19 Reviewed-on: http://git-master/r/164852 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
* Add man pageAllen Martin2012-11-292-0/+111
| | | | | | | | | | | Add a new man page for tegrarcm Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: If9f587d708b80311c814218dc268d91d7edb1055 Reviewed-on: http://git-master/r/167545 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* Add t114 supportAllen Martin2012-11-297-10/+9672
| | | | | | | | | | | Add support for t114. This includes a new T114 miniloader, new USB and nv3p device ids, and increased UID size. Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: I5b77549317cad73c4499fe7797a30f09fffaebfb Reviewed-on: http://git-master/r/164851 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
* Add support for RCM protocol version 35Allen Martin2012-11-293-14/+159
| | | | | | | | | | | | | | | T114 uses version 35 of RCM protocol, in preparation for adding T114 support to tegrarcm add support for this version of RCM protocol. The message size has changed because new fields were added and the version number was bumped to 0x35. None of the new fields are actually used by tegrarcm, so the only changes are to handle the size and version differences. Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: I2ff66205e5f1a9f2efbee711f7bad784ae297edf Reviewed-on: http://git-master/r/164850 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
* Add autom4te.cache to distclean targetAllen Martin2012-11-291-1/+4
| | | | | | | | | | | This allows a developer to run autoreconf and then put the package back into distclean state. Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: I384b3722cf877343f85b0ee6684a3d7aee55f0b8 Reviewed-on: http://git-master/r/167544 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
* Add autogen.sh scriptAllen Martin2012-11-291-0/+5
| | | | | | | | | | Add helper script to recreate all auto generated files for building. Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: Ia3b86bbfb73a6f7183a5422504bcb4c116eb6cda Reviewed-on: http://git-master/r/167543 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
* Remove autogenerated filesAllen Martin2012-11-298-10667/+0
| | | | | | | | | | | | Remove files that are generated by autoconf/automake. When packaging a tarball for release they can be included, but they don't need to be in source code control. Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: Ie21bbc93c6367fa3885e1c49f080a181d816bf03 Reviewed-on: http://git-master/r/167542 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
* Add descripton of nv3p packetsAllen Martin2012-11-291-0/+70
| | | | | | | | | | Add some documentation of nv3p packet formats as comments Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: I5685612b75bb2150ca5307497c5b83d18aa8da6b Reviewed-on: http://git-master/r/164849 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
* Update miniloaders to latest versionAllen Martin2012-11-294-7140/+16196
| | | | | | | | | | | | Update miniloaders for T20 and T30 to latest version. This bumps nv3p protocol to the latest version as well which changes some of the message packages and command numbers. Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: Ic16243f979ff505696aa97520f8b11a2cebf24fa Reviewed-on: http://git-master/r/164848 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
* Add more verbose debug/error messagesAllen Martin2012-11-292-12/+37
| | | | | | | | | | | Add more diagnostic information to some of the erorr/debug messages Signed-off-by: Allen Martin <amartin@nvidia.com> Change-Id: I6d2c996e02711fbf913e5f9332f7c2781c40a3a1 Reviewed-on: http://git-master/r/164847 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>