aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2020-04-21buildman: Update the 'theory of operation' a littleSimon Glass1-30/+39
Make a few updates to this important section of the documentation, to make things clearer. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Show a summary of the build resultSimon Glass2-3/+20
When buildman finishes it leaves the last summary line visible, which shows the number of successful builds, builds with warnings and builds with errors. It is useful also to see how many builds were done in total along with the time taken. Show these on a separate line before buildman finishes. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Limit the length of progress messagesSimon Glass1-1/+1
If a progress message is longer than the terminal line it will scroll the terminal. Limit the messages to the terminal width. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Show the number of builds remainingSimon Glass1-4/+9
It is nice to see the actual number of builds remaining to complete. Add this in the progress message, using a different colour. Drop the unnecessary 'name' variable while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Drop unused output codeSimon Glass1-5/+0
The commit counter is a hangover from when buildman processed each board for a commit. Now buildman processes each commit for a board, so this output is never triggered. Delete it. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Show a message when fetching a repoSimon Glass1-1/+4
Fetching updated versions of a repo can take time. At present buildman gives no indication that it is doing this. Add a message to explain the delay. Tidy up a few other messages while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Drop the line-clearing code in BuilderSimon Glass1-25/+3
The new feature in terminal can be used by buildman. Update the Builder class accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21patman: Support limiting output to a single lineSimon Glass1-1/+57
When outputing a progress line we don't want it to go past the end of the current terminal line, or it will not be possible to erase it. Add an option to Print() which allows limiting the output to the terminal width. Since ANSI sequences do not take up space on the terminal, these are removed. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21patman: Support erasing a previously unfinished text lineSimon Glass2-1/+48
When printing progress it is useful to print a message and leave the cursor at the end of the line until the operation is finished. When it is finished, the line needs to be erased so a new line can start in its place. Add a function to handle clearing a line previously written by terminal.Print() Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21patman: Update flushing Print() for Python 3Simon Glass1-3/+2
This does not seem to work on Python 3. Update the code to use the built-in support. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Use spaces in the board listSimon Glass2-4/+4
At present the board names shown with -l are separated by commas. This makes it hard to double-click to select a particular board. Also it is not possible to select all boards and paste them as arguments to a subsequent buildman run, since buildman requires spaces to separate the list on the command line, not commas. Change the output format to use spaces instead of commas. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Show the list of boards in magentaSimon Glass2-41/+44
It is quite hard to see the list of board for each error line since the colour is the same as the actual error line. Show the board list in magenta so that it is easier to distinguish them. There is no point in checking the colour of the overall line, since there are now multiple colours. So drop those tests. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Use an object to hold error linesSimon Glass1-17/+52
At present the string for each error line is created in _CalcErrorDelta() and used to create the summary output. This is inflexible since all the information (error/warning character, error line, list of boards with that error line) is munged together in a string. Create an object to hold this information and only convert it to a string when printing the actual output. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Use yellow consistently for warning linesSimon Glass2-4/+4
At present warnings are shown in yellow in the summary (-s) but magenta in the detail listing (-e). Use yellow in both. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Test the output with --list-error-boardsSimon Glass1-14/+32
Add a test to cover this flag, which adds the name of each board to each error/warning line. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Add a test helper for creating a line prefixSimon Glass1-20/+31
The split/join code is repeated in a lot of places. Add a function to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Split out testOutput() into separate functionsSimon Glass1-6/+28
We want to add a few more tests similar to testOutput(). Split its logic into a function which runs buildman to get the output and another which checks the output. This will make it easier to reuse the code. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Create temp directory in test setupSimon Glass1-16/+10
Rather than having a few tests handle this themselves, create the temporary directory in the setUp() method and remove it in tearDown(). This will make it easier to add more tests. Only testOutput and testGit() actually need it, but it doesn't add to the test time noticeably to do this for all tests in this file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Use an iterator to check test outputSimon Glass1-42/+52
Rather than using the absolute array index, use an interator to work through the expected output lines. This is easier to follow. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Add test coverage for error/warning colourSimon Glass1-0/+7
Buildman should output the right colours for each error/warning line. Some of these checks are missing. Add them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-21buildman: Refactor error-line output int a functionSimon Glass1-13/+19
Reduce the amount of repeated code by creating an _OutputErrLines() function to hold this code. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-17doc: fix references to driver-modelHeinrich Schuchardt2-3/+3
Fix some errors pointed out by 'make refcheckdocs'. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-04-17mkimage: fit: don't create image with 0700 permissionsThomas Hebb1-1/+1
commit 7298e422504e ("mkimage: fit: add support to encrypt image with aes") added a new copyfile() function as part of the FIT image creation flow. This function as currently written creates the final image with a mode of 0700 (before umask), differing from the old behavior of 0666. Since there doesn't seem to be any reason to make the image executable or non-group, non-other readable, change the mask to 0666 to preserve the old behavior. Fixes: 7298e422504e ("mkimage: fit: add support to encrypt image with aes") Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2020-04-16patman: Apply the cc limit to the cover letter alsoSimon Glass1-2/+4
Quite often on a series that has clean-up patches, the individual patches may fit within the cc limit but the cover letter does not. Apply the same limit to the cover letter. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Chris Packham <judge.packham@gmail.com>
2020-04-10buildman: Drop the -a optionSimon Glass3-15/+8
There is no point in setting the ARCH environment variable since the U-Boot build system no-longer uses it. It seems safe to drop this feature since it was only recently added. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10buildman: Allow building within a subdir of the current dirSimon Glass3-33/+2
This is useful in some situations, in particular with -w and when building in-tree. Now that we are more careful about what we remove in _PrepareOutputSpace(), it should be safe to relax this restriction. Update the progress information also so it is clear what buildman is doing. Remove files can take a long time. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-10buildman: Be more selective about which directories to removeSimon Glass2-5/+42
At present buildman removes any directory it doesn't intend to write output into. This is overly expansive since if the output directory happens to be somewhere with existing files, they may be removed. Using an existing directory for buildman is not a good practice, but since the result might be catastrophic, it is best to guard against it. A previous commit[1] fixed this by refusing to write to a subdirectory of the current directory, assumed to have U-Boot source code. But we can do better by only removing directories that look like the ones buildman creates. Update the code to do this and add a test. Signed-off-by: Simon Glass <sjg@chromium.org> [1] 409fc029c40 tools: buildman: Don't use the working dir as build dir
2020-04-10buildman: Allow ignoring warnings in the return codeSimon Glass3-3/+21
Sometimes we don't want buildman to return failure if it seems warnings. Add a -W option to support this. If buildman detects warnings (and no errors) it will return an exit code of 0 (success). Note that the definition of 'warnings' includes the migration warnings produced by U-Boot, such as: ===================== WARNING ====================== This board does not use CONFIG_DM_MMC. Please update ... ==================================================== Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10buildman: Update help for -dSimon Glass2-4/+4
This help is a bit ambiguous. It only does anything if asked to show size changes with -S. Update the help and the function comments. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-10bulidman: Add support for a simple buildSimon Glass6-15/+90
It is useful to run a simple build and put all the output in a single directory. Add a -w option to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-10buildman: Document the members of BuilderJobSimon Glass1-1/+5
This class has a few more members now. Add documentation for them and fix a nit in the 'commits' comment. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-10buildman: Support fetching gcc 9.2.0Bin Meng1-1/+1
This adds support to fetch gcc 9.2.0 toolchains. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2020-04-10kconfig / kbuild: Re-sync with Linux 4.19Tom Rini1-4/+4
Align Kconfig and Kbuild logic to Linux 4.19 release with minimal impact on files outside of this scope. Our previous Kconfig sync was done by commit 5972ff077e0f ("kconfig / kbuild: re-sync with Linux 4.18"). In this particular re-sync in order to keep clang support working a number of related changes needed to be pulled in that had been missed previously. Not all of these changes we easily traceable and so have been omitted from the list below. The imported Linux commits are: [From prior to v4.18] 9f3f1fd29976 kbuild: Add __cc-option macro d7f14c66c273 kbuild: Enable Large File Support for hostprogs 6d79a7b424a5 kbuild: suppress warnings from 'getconf LFS_*' 24403874316a Shared library support 86a9df597cdd kbuild: fix linker feature test macros when cross compiling with Clang 0294e6f4a000 kbuild: simplify ld-option implementation [From v4.18 to v4.19] 96f14fe738b6 kbuild: Rename HOSTCFLAGS to KBUILD_HOSTCFLAGS 10844aebf448 kbuild: Rename HOSTCXXFLAGS to KBUILD_HOSTCXXFLAGS b90a368000ab kbuild: Rename HOSTLDFLAGS to KBUILD_HOSTLDFLAGS 8377bd2b9ee1 kbuild: Rename HOST_LOADLIBES to KBUILD_HOSTLDLIBS f92d19e0ef9b kbuild: Use HOST*FLAGS options from the command line 4ab3b80159d4 kconfig: check for pkg-config on make {menu,n,g,x}config 693359f7ac90 kconfig: rename SYMBOL_AUTO to SYMBOL_NO_WRITE f60b992e30ff kbuild: replace $(LDFLAGS) $(ldflags-y) with $(ld_flags) 2fb9279f2c3e kbuild: change ld_flags to contain LDFLAGS_$(@F) c931d34ea085 arm64: build with baremetal linker target instead of Linux when available 5accd7f3360e kconfig: handle format string before calling conf_message_callback() a2ff4040151a kconfig: rename file_write_dep and move it to confdata.c 0608182ad542 kconfig: split out useful helpers in confdata.c adc18acf42a1 kconfig: remove unneeded directory generation from local*config 79123b1389cc kconfig: create directories needed for syncconfig by itself 16952b77d8b5 kconfig: make syncconfig update .config regardless of sym_change_count d6c6ab93e17f kbuild: remove deprecated host-progs variable 56869d45e364 kconfig: fix the rule of mainmenu_stmt symbol c151272d1687 kconfig: remove unused sym_get_env_prop() function 1880861226c1 kconfig: remove P_ENV property type e3fd9b5384f3 scripts/dtc: consolidate include path options in Makefile 4bf6a9af0e91 kconfig: add build-only configurator targets f1575595d156 kconfig: error out when seeing recursive dependency 5e8c5299d315 kconfig: report recursive dependency involving 'imply' f498926c47aa kconfig: improve the recursive dependency report 98a4afbfafd2 kconfig: fix "Can't open ..." in parallel build 9a9ddcf47831 kconfig: suppress "configuration written to .config" for syncconfig 87a32e624037 kbuild: pass LDFLAGS to recordmcount.pl d503ac531a52 kbuild: rename LDFLAGS to KBUILD_LDFLAGS 217c3e019675 disable stringop truncation warnings for now bc8d2e20a3eb kconfig: remove a spurious self-assignment fd65465b7016 kconfig: do not require pkg-config on make {menu,n}config 5a4630aadb9a ftrace: Build with CPPFLAGS to get -Qunused-arguments Note that this adds new cleanup work to do in that we should adapt the shared library support we have to what is now upstream. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
2020-04-07Merge tag 'xilinx-for-v2020.07' of ↵Tom Rini3-10/+18
https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2020.07 common: - Align ENV_FAT_INTERFACE - Fix MAC address source print log - Improve based autodetection code xilinx: - Enable netconsole Microblaze: - Setup default ENV_OFFSET/ENV_SECT_SIZE Zynq: - Multiple DT updates/fixes - Use DEVICE_TREE environment variable for DTB selection - Switch to single zynq configuration - Enable NOR flash via DM - Minor SPL print removal - Enable i2c mux driver ZynqMP: - Print multiboot register - Enable cache commands in mini mtest - Multiple DT updates/fixes - Fix firmware probing when driver is not enabled - Specify 3rd backup RAM boot mode in SPL - Add SPL support for zcu102 v1.1 and zcu111 revA - Redesign debug uart enabling and psu_init delay - Enable full u-boot run from EL3 - Enable u-boot.itb generation without ATF with U-Boot in EL3 Versal: - Enable distro default - Enable others SPI flashes - Enable systems without DDR Drivers: - Gem: - Flush memory after freeing - Handle mdio bus separately - Watchdog: - Get rid of unused global data pointer - Enable window watchdog timer - Serial: - Change reinitialization logic in zynq serial driver Signed-off-by: Tom Rini <trini@konsulko.com>
2020-04-01image: Use constants for 'required' and 'key-name-hint'Simon Glass1-4/+4
These are used in multiple places so update them to use a shared #define. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-04-01fit_check_sign: Allow selecting the configuration to verifySimon Glass3-5/+12
This tool always verifies the default configuration. It is useful to be able to verify a specific one. Add a command-line flag for this and plumb the logic through. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-01image: Be a little more verbose when checking signaturesSimon Glass1-1/+2
It is useful to be a little more specific about what is being checked. Update a few messages to help with this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-03-31Merge branch 'next' of git://git.denx.de/u-boot-usb into nextTom Rini1-2/+4
2020-03-26rockchip: mkimage: Use an existing macro instead of a decimal valueMiquel Raynal1-2/+4
Depending on the SoC, a header of four characters is prepended to the image. There is already a macro defining the number of characters: RK_SPL_HDR_SIZE, so use it instead of hardcoding "4". Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-03-12lib: rsa: decouple rsa from FIT image verificationAKASHI Takahiro1-1/+1
Introduce new configuration, CONFIG_RSA_VERIFY which will decouple building RSA functions from FIT verification and allow for adding a RSA-based signature verification for other file formats, in particular PE file for UEFI secure boot. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-02-25moveconfig: convert ps.stderr to stringMarkus Klotzbuecher1-1/+1
Printing the error message in verbose mode fails, since python3 doesn't implicitely convert bytes to strings. Signed-off-by: Markus Klotzbuecher <mk@mkio.de> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-02-25moveconfig: replace unsafe eval with astevalMarkus Klotzbuecher1-1/+3
Commit b237d358b425 ("moveconfig: expand simple expressions") added support for expanding expressions in configs, but used the unsafe python built-in "eval". This patch fixes this by replacing eval with the asteval module. Signed-off-by: Markus Klotzbuecher <mk@mkio.de> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-02-25tools: image-host.c: remove uboot_aes.hPhilippe Reynes1-1/+0
The include uboot_aes.h is not useful and it breaks the compilation on android, so we remove it. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reported-by: Praneeth Bajjuri <praneeth@ti.com>
2020-02-13tools: mkimage: fix STM32 image format for big endian hostsAntonio Borneo1-2/+3
Two header fields are not properly converted to little endian before assignment, resulting in incorrect header while executing mkimage on big endian hosts. Convert the value of the header fields image_checksum and edcsa_algorithm to little endian before the assignment. Signed-off-by: Antonio Borneo <antonio.borneo@st.com> Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-02-11Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini1-0/+2
sandbox conversion to SDL2 TPM TEE driver Various minor sandbox video enhancements New driver model core utility functions
2020-02-09tools: imx8m_image: fix warning messageSébastien Szymanski1-4/+2
When a firmware file is missing the warning message doesn't indicate the firmware file name because '$tmp' var doesn't exist. Fix the warning message and while at it reduce the if/else statement. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2020-02-05buildman: Enable buildman on aarch64 hostsMatthias Brugger1-0/+2
At kernel.org aarch64 toolchains are published in folder arm64. Fix the URL for that case, so that we can fetch toolchains on aarch64 machines. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-01-30tools: buildman: fix typoFlavio Suligoi1-1/+1
Signed-off-by: Flavio Suligoi <f.suligoi@asem.it> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-01-30tools: correct Markdown in concurrencytest/README.mdHeinrich Schuchardt1-2/+2
Remove incorrect indentation. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-01-25genboardscfg.py: drop python version commentBaruch Siach1-2/+0
genboardscfg.py requires python 3.x since commit 3bc14098d8fb ("genboardscfg.py: Convert to Python 3"). Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>