| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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 (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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Now that mainline U-Boot contains support for Jetson TK1, enable building
for it by default.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
"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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Now that mainline U-Boot contains support for Venice2, enable building
for Venice2 by default.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Now, each sub-command is its own function
Signed-off-by: Stephen Warren <swarren@nvidia.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This moves towards each sub-command being a separate function
Signed-off-by: Stephen Warren <swarren@nvidia.com>
|
|
|
|
|
|
| |
This function will be used by multiple sub-commands in the future.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
|
|
|
|
|
|
|
|
|
| |
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>
|