summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove Whistler supportHEADmasterStephen Warren2017-04-132-12/+0
| | | | | | | | Whistler is an ancient Tegra 2 reference board. I may have been the only person who ever used it with upstream software, and I've just recycled the board hardware. Hence, it makes sense to remove support from software. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Remove obsolete comment about load addressMartin Michlmayr2016-06-291-1/+0
| | | | | | | | | Remove the obsolete comment about the hardcoded load address since it's determined from the binary as of commit 948b56e ("Determine SPL entry-point automatically"). Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Fix flash --flash-image optionMartin Michlmayr2016-06-171-1/+1
| | | | | | | | | | | Pass correct variable to avoid the following error: File "./tegra-uboot-flasher", line 139, in func_flash flash_img = args.flash_img AttributeError: 'Namespace' object has no attribute 'flash_img' Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Use non-zero address for CRC calculationsStephen Warren2016-02-021-4/+5
| | | | | | | | | | | | | | | | | Currently, U-Boot's itest command cannot read from address 0. On Tegra20, soc['ram-base'] can be 0, and is the address passed to itest. Modify the code to use an offset from this address, so as not to use address 0. Note that in Tegra30 and later, the RAM base is non-zero, so this issue does not occur. This issue also only affects the "flash" command, and not the "exec" command. A patch is also in progress to fix the itest command in U-Boot. However, fixing tegra-uboot-flasher not to use address 0 seems reasonable too, and will immediately solve the issue irrespective of which U-Boot code-base is in use. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Determine SPL entry-point automaticallyStephen Warren2015-12-083-4/+81
| | | | | | | | | | | tegra-uboot-flasher currently hard-codes the U-Boot SPL entry point. The chosen value works fine for upstream/mainline U-Boot. However, L4T U-Boot uses a different value for compatibility with L4T's flashing tools. This causes tegra-uboot-flasher to fail when using with and L4T U-Boot. Fix this by having tegra-uboot-flasher's build process introspect the U-Boot binaries to determine the actual load-/entry-address. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add support for tegrarcm's --usb-port-path cmdline optionStephen Warren2015-10-081-1/+6
| | | | | | | | | | This allows the user to specify which USB device to operate on. See the related tegrarcm commit for a full description of this option and how to calculate the required option value. An example is: ./tegra-uboot-flasher exec --usb-port-path 3-10.5 jetson-tk1 Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Fix "typo" in comment re: padding calculationsStephen Warren2015-08-181-1/+1
| | | | | | | | The binary format is U-Boot code + DTB + pad + flash image. U-Boot moves the DTB out of the way of BSS. The pad is to prevent U-Boot trashing the flash image, not the DTB. Fix the comment to reflect that. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Fix comment re: meaning of 0x00108000 constantStephen Warren2015-08-051-1/+1
| | | | | | | | This is the SPL base (which is essentially constant), not the base of the main CCPLEX binary (which varies according to the size needs of the SPL image). Signed-off-by: Stephen Warren <swarren@nvidia.com>
* add colibri_t20Marcel Ziswiler2015-04-017-0/+53
| | | | | | | | | | Now with most of the U-Boot side cleaned-up ready for merging actually make sure it can be used from within the tegra-uboot-flasher flasher. As a second step add the actual board configuration. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com> Tested-by: Marcel Ziswiler <marcel@ziswiler.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add a README fileStephen Warren2015-02-252-0/+31
| | | | | | | | | | A plain README.txt is a more commit name for a README file than the existing README-*.txt files. This will help direct users to the correct file they need to read. Also add a section describing how/where to send patches, etc. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add a --post-flash-cmd command line argumentJames Thomas2014-12-041-1/+6
| | | | | | | | This allows a user to specify the u-boot command to run after flashing is complete (e.g 'ums 0 mmc 0'), defaults to 'reset' if not set Signed-off-by: James Thomas <james.thomas@codethink.co.uk> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Use hex (x) type argument for fdtput when writing bootdelayJames Thomas2014-12-041-1/+1
| | | | | | | | This ensures the correct value (-2) is set on both 32-bit and 64-bit systems Signed-off-by: James Thomas <james.thomas@codethink.co.uk> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add support for colibri_t30Stefan Agner2014-08-062-0/+13
| | | | | | | | | | | This commit adds support for the Toradex Colibri T30 module. Since we use the same boot loader for all carrier board, in the boot loader world (U-Boot/BCT) the board name consists of the module name only, without any reference to the carrier board. Signed-off-by: Stefan Agner <stefan@agner.ch> [swarren, disabled board by default until U-Boot supports exists] Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Adapt to new U-Boot build commandsStephen Warren2014-08-011-1/+11
| | | | | | | | | | | | | | U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the commands required to configure U-Boot. Adapt the flasher build script to those changes, in a way that automatically works with either old or new U-Boot source trees. Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> -- v2: Check for the modified "make help" output rather than a file added by commit 51148790f26e. Hopefully this will be more independant from changes to U-Boot's implementation details.
* Explicitly ask for Python 2Stefan Agner2014-07-213-3/+3
| | | | | | | | | To make the scripts work without changes on distribution which "python" defaults to Python 3, we should explicitly ask for Python 2. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Wrap any env var settings in quotesStephen Warren2014-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | This allows the user to pass the following to the flashing script: --env bootcmd 'usb start ; dhcp zImage' rather than having to manually escape the commands for U-Boot: --env bootcmd 'usb start \; dhcp zImage' (The quoting in both cases is for the shell invoking tegra-uboot-flasher, not for U-Boot's command-line. The removed escaping was to work around the lack of quoting/escaping when passing the user's command to U-Boot's setenv command during flashing.) This change will interact badly with the user wanting to use single quotes in environment variable values, but hopefully that's less likely, and can be fixed later if needed. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Switch flasher script to subprocessStephen Warren2014-07-021-15/+11
| | | | | | | | | | This avoids any issues re: quoting the commands we execute, such as fdtput to modify the DTB sent to the flashing process. The build script already uses subprocess, so this doesn't introduce any new dependencies overall. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add support for Norrin boardAllen Martin2014-07-022-0/+14
| | | | | | | | Add support for Norrin (Tegra124 Chromebook reference design). Disabled by default until U-Boot patches make it upstream. Signed-off-by: Allen Martin <amartin@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Use actual U-Boot BSS size for padding when flashingStephen Warren2014-05-192-2/+28
| | | | | | | | | | | | | | | | | | | | In flashing mode, tegra-uboot-flasher downloads an image into RAM which consists of the U-Boot binary, board DTB, some padding, and the image to write into flash. The padding needs to be large enough so that the flash image doesn't overlap with U-Boot's BSS at run-time, since the BSS is zero'd out at boot, and stores variables that are written to at run-time. Any overlap would cause the flash image to be corrupted. tegra-uboot-flasher currently uses a guess of 1MB for the required padding size. However, when enabling DFU support in U-Boot, the BSS size balloons to well over 1MB, thus causing corruption to the flash image. Solve this by recording the actual BSS size at build time, and using the exact value at flashing time to calculate the padding. Add in an extra 4KB of padding just in case the DTB gets larger when adding in the flashing commands. Previously, this was also assumed to fit into the hard-coded 1MB of pad. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Enable Jetson TK1 board by defaultStephen Warren2014-05-141-1/+0
| | | | | | | Now that mainline U-Boot contains support for Jetson TK1, enable building for it by default. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Allow --boards to add to not replace the set of enabled boardsStephen Warren2014-04-301-1/+9
| | | | | | | | | | | | | | | | | The following already work: Build all boards that are enabled by default: ./build build Build a specific set of boards: ./build --boards beaver,jetson-tk1 build Sometimes it's nice to build all boards that are enabled by default, plus a few others which aren't. This patch enables the following syntax for that: ./build --boards +jetson-tk1 build Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add support for Jetson TK1 boardStephen Warren2014-03-202-0/+13
| | | | | | | | | | | | This board is currently disabled by default due to lack of U-Boot support in the mainline repository. If you wish to test this, do as follows: cd ../u-boot git checkout some-branch-with-jetson-tk1-support cd ../scripts ./build --boards venice2 build Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Support U-Boot's temporary output DTB pathStephen Warren2014-02-251-0/+2
| | | | | | | | | | Historically, U-Boot has generated $(obj)/u-boot.dtb. During the Kbuild conversion, this file was moved to $(obj)/dts/dt.dtb. While this change will be imminentely reverted in the U-Boot makefiles, it's quite easy to support in the flasher build scripts, so we may as well. This prevents user confusion and/or "git bisect" issues. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Use O= rather than BUILD_DIR= when building U-BootStephen Warren2014-02-251-2/+2
| | | | | | | "make O=" works both before and after U-Boot's conversion to Kbuild, whereas "make BUILD_DIR=" only works before. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add libtool to dependency list in READMEStephen Warren2014-02-241-0/+1
| | | | | | | libtools is required by some of the tools that tegra-uboot-flasher can build. Add it to the list of dependencies. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Enable Venice2 board by defaultStephen Warren2014-02-191-1/+0
| | | | | | | Now that mainline U-Boot contains support for Venice2, enable building for Venice2 by default. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Make all paths absoluteStephen Warren2014-01-201-3/+12
| | | | | | | | | | Convert all file and path names from the command line to absolute paths. This helps when running tegra-uboot-flasher out-of-tree with a local bootloader or flash image. This is needed, since tegra-uboot-flasher cd's to a temporary work directory when executing most commands, which causes relative path names to no longer be valid. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Provide progress messagesStephen Warren2013-12-061-3/+17
| | | | | | | | | | Print messages to the U-Boot console while executing the flashing process. For NAND and SPI at least, IO operations can be quite slow, and it's useful to know the U-Boot is executing what may be a long- running operation. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com>
* Allow overriding environment variables during flashingStephen Warren2013-12-061-0/+7
| | | | | | | | | | | | The flashing process resets the U-Boot environment to the built-in default. Allow the user to specify some non-default values to be set before saving the environment. This can be useful e.g. to set up the default boot target: ./tegra-uboot-flasher flash --env boot_targets dhcp beaver Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com>
* Increase padding between U-Boot binary and flash imageStephen Warren2013-12-061-2/+2
| | | | | | | | | | | | | The flasher currently places the flash image in RAM almost directly above the initial U-Boot binary location, with just a little padding/alignment in between. This is also where U-Boot's BSS is located, prior to U-Boot relocating itself to the top of RAM. Hence, if U-Boot touches its BSS, it will corrupt the flash image. Increase the padding between U-Boot/DT and the flash image to avoid this. U-Boot's BSS is roughly 300K at present. Make the pad size 1M to allow plenty of room for growth. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com>
* Add crc32 verification of the flash imageStephen Warren2013-12-061-6/+28
| | | | | | | | | | | | | Verify the CRC32 of the flash image at two points in time: 1) Before starting the flashing process, to validate the download of the image into Tegra's RAM. 2) After writing the image to flash, read it back into RAM, in order to validate that it was correctly written to flash. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com>
* Add command to import U-Boot binaries from an external locationStephen Warren2013-10-031-8/+28
| | | | | | | | | | | | This option is useful if the user already builds U-Boot in a directory not managed by the tegra-uboot-flasher manifest. This may happen when an active U-Boot developer wishes to use the flasher scripts without relocating their U-Boot development, or when performing separate automated builds of U-Boot and the flasher, with the flasher build picking up the result of an abitrary U-Boot build under the control of the automated build system. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Fix typo in variable nameStephen Warren2013-10-031-8/+8
| | | | | | | | | | | For some reason (likely cut/paste), all the ArgParser subparsers were stored in a variable named parser_list_configs. That variable name is at most appropriate for one subcommand, and in fact the subcommand it would be relevant for is not implemented by "build" but rather "tegra-uboot-flasher". Replace this variable name with something more appropriate and generic. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Document manifest change to use groupsStephen Warren2013-10-031-6/+13
| | | | | | | | | Rather than the manifest repo containing separate default.xml and default-notools.xml, there is now a single default.xml, and one may use repo init's -g option to cut down what gets synced. Update the README to document this. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Update URL to obtain the repo toolStephen Warren2013-10-031-1/+1
| | | | | | | | | | | | The repo tool's download location has changed. Update the README to contain the new location. For reference, see the equivalent chagne to Android and associated discussion: https://android-review.googlesource.com/#/c/66864/ https://groups.google.com/forum/#!topic/repo-discuss/4EsDRDRK5Lk Reported-by: kusma on IRC #tegra Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add config files for Venice2 boardStephen Warren2013-09-184-1/+19
| | | | | | | | | | | | This board is currently disabled by default due to lack of U-Boot support in the mainline repository. If you wish to test this, do as follows: cd u-boot git checkout some-branch-with-venice2-support cd ../scripts ./build --boards venice2 build Signed-off-by: Stephen Warren <swarren@nvidia.com>
* allow --boards/--socs to undisable boardsStephen Warren2013-09-111-7/+5
| | | | | | | | | | | | | | | Before this change, --boards/--socs only disabled more boards than were disabled in their configuration files. Now, those options explicitly set all boards/socs disabled state to match the --boards/socs option, if given. This is useful so that configurations may be added for boards that are not yet fully supported by projects such as U-Boot; the configuration can be added, but marked as disabled by default so that builds are not broken, but then explicitly re-enabled by those who wish to test local patches to enable that board in the other projects. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* readme: document dependenciesStephen Warren2013-08-012-1/+44
| | | | | | | | | | | In README-developer.txt, document some of the distro packages required to build the tools and flash images. Point out issues with libusb versions. Enhance README-user.txt to mention that the steps in README-developer.txt typically need to be followed first, and briefly describe what's contained in the flash images this tool handles. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* flasher: fix assignment of default data_dirStephen Warren2013-06-141-1/+1
| | | | | | | | The default value was being assigned to a global rather than a field in the argparser result. Reported-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
* build: restrict cmd_build_configs() to enabled objectsStephen Warren2013-06-141-1/+20
| | | | | | | | | Only install enabled SoC/board/config files in _out/configs. This may be useful if you want to create a _out directory containing a limited set of binaries; this way, only the relevant limited set of config files are installed too. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* build: implement --socs, --boards optionsStephen Warren2013-06-141-0/+33
| | | | | | | | | | | | This will restrict the build process to a subset of SoCs or boards, which can be useful if you want to: ./build --boards seaboard build ./tegra-uboot-flasher exec seaboard ... in order to iterate testing on a single board at a time. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Convert build script to argparseStephen Warren2013-06-142-28/+25
| | | | | | | | | | | | | Future patches will add some options. This will be easier with argparse. Unfortunately, argparse doesn't support a default sub-command. Hence, the shortcut "./build" for "./build build" is no longer supported. There are ways to work around this by treating the command name as an optional argument rather than sub-commands. However, this limits future flexibility, since the fake sub-commands won't be able to accept sub command- specific options. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Implement exec sub-commandStephen Warren2013-06-132-6/+58
| | | | | | | | | This mode of operation is a very simple wrapper around tegrarcm, which eliminates the need to remember which BCT to use for each configuration. This can be useful for quickly testing changes to U-Boot without writing it to flash every time. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Pre-calculate more in find_config_dir()Stephen Warren2013-06-131-12/+14
| | | | | | | Set more global variables in find_config_dir(). These remove duplicate lookups and/or will be re-used by a future "exec" sub-command. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Rework cmdline to use sub-commandsStephen Warren2013-06-122-23/+31
| | | | | | | | | | | | | | | | | Instead of using options like --list-confignames to select a specific sub-command/operation to perform, and assuming a default command of flash if none is specified, use explicit sub-commands. Old: tegra-uboot-flasher --list-confignames New: tegra-uboot-flasher list-configs Old: tegra-uboot-flasher CONFIG New: tegra-uboot-flasher flash CONFIG Later changes will introduce more sub-commands, e.g. "exec" to simply download and execute a bootloader. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Split flashing implementation into a separate functionStephen Warren2013-06-121-113/+115
| | | | | | Now, each sub-command is its own function Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Add parameters to gen_flashcmd_*Stephen Warren2013-06-121-4/+4
| | | | | | | This way, they don't rely on global variables, which won't be global once the flashing code is in a separate function. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Split list-confignames implementation into a separate functionStephen Warren2013-06-121-2/+5
| | | | | | This moves towards each sub-command being a separate function Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Separate out validation of config nameStephen Warren2013-06-121-8/+12
| | | | | | This function will be used by multiple sub-commands in the future. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Move functions and data to start of fileStephen Warren2013-06-121-46/+46
| | | | | | | | | Future changes will create separate functions for the sub-commands that tegra-uboot-flasher implements. This change prepares for that by moving other functions away from what will be the body of some of those functions. Signed-off-by: Stephen Warren <swarren@nvidia.com>