diff options
author | Stefano Babic <sbabic@denx.de> | 2016-05-17 17:51:44 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-05-17 17:51:44 +0200 |
commit | 52b1eaf93d6b55e1467f97b8eefdc2f8b6031c43 (patch) | |
tree | 73357539a8382b406c29b1826dc17012f267f2cb /tools | |
parent | aaeadd3f7b248aeb1c72c36183ab9c6e77da6ce2 (diff) | |
parent | aeaec0e682f45b9e0c62c522fafea353931f73ed (diff) | |
download | talos-obmc-uboot-52b1eaf93d6b55e1467f97b8eefdc2f8b6031c43.tar.gz talos-obmc-uboot-52b1eaf93d6b55e1467f97b8eefdc2f8b6031c43.zip |
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'tools')
-rw-r--r-- | tools/atmel_pmecc_params.c | 2 | ||||
-rw-r--r-- | tools/atmelimage.c | 2 | ||||
-rw-r--r-- | tools/env/fw_env.c | 3 | ||||
-rw-r--r-- | tools/fit_image.c | 1 | ||||
-rw-r--r-- | tools/mkimage.c | 38 | ||||
-rwxr-xr-x | tools/moveconfig.py | 4 | ||||
-rw-r--r-- | tools/tbot/README | 10 | ||||
-rw-r--r-- | tools/tbot/README.install | 246 |
8 files changed, 123 insertions, 183 deletions
diff --git a/tools/atmel_pmecc_params.c b/tools/atmel_pmecc_params.c index 8eaf27f804..eb97229bbc 100644 --- a/tools/atmel_pmecc_params.c +++ b/tools/atmel_pmecc_params.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2014 Andreas Bießmann <andreas.devel@googlemail.com> + * (C) Copyright 2014 Andreas Bießmann <andreas@biessmann.org> * * SPDX-License-Identifier: GPL-2.0+ */ diff --git a/tools/atmelimage.c b/tools/atmelimage.c index 6b5603eb87..9b3600d62d 100644 --- a/tools/atmelimage.c +++ b/tools/atmelimage.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2014 - * Andreas Bießmann <andreas.devel@googlemail.com> + * Andreas Bießmann <andreas@biessmann.org> * * SPDX-License-Identifier: GPL-2.0+ */ diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index 1420ac58a3..06cf63daa4 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -1325,6 +1325,9 @@ static int parse_config () struct stat st; #if defined(CONFIG_FILE) + if (!common_args.config_file) + common_args.config_file = CONFIG_FILE; + /* Fills in DEVNAME(), ENVSIZE(), DEVESIZE(). Or don't. */ if (get_config(common_args.config_file)) { fprintf(stderr, "Cannot parse config file '%s': %m\n", diff --git a/tools/fit_image.c b/tools/fit_image.c index ddefa72f34..0551572b04 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -343,7 +343,6 @@ static int fit_build(struct image_tool_params *params, const char *fname) if (ret != size) { fprintf(stderr, "%s: Can't write %s: %s\n", params->cmdname, fname, strerror(errno)); - close(fd); goto err; } close(fd); diff --git a/tools/mkimage.c b/tools/mkimage.c index 29317830d1..93d1c16c7c 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -85,8 +85,8 @@ static void usage(const char *msg) " -x ==> set XIP (execute in place)\n", params.cmdname); fprintf(stderr, - " %s [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b <dtb_list>] fit-image\n" - " <dtb_list> is used with -f auto, and is a space-separated list of .dtb files\n", + " %s [-D dtc_options] [-f fit-image.its|-f auto|-F] [-b <dtb> [-b <dtb>]] fit-image\n" + " <dtb> file is used with -f auto, it may occour multiple times.\n", params.cmdname); fprintf(stderr, " -D => set all options for device tree compiler\n" @@ -133,12 +133,10 @@ static void process_args(int argc, char **argv) char *ptr; int type = IH_TYPE_INVALID; char *datafile = NULL; - int expecting; int opt; - expecting = IH_TYPE_COUNT; /* Unknown */ while ((opt = getopt(argc, argv, - "-a:A:bcC:d:D:e:Ef:Fk:K:ln:O:rR:sT:vVx")) != -1) { + "a:A:b:cC:d:D:e:Ef:Fk:K:ln:O:rR:sT:vVx")) != -1) { switch (opt) { case 'a': params.addr = strtoull(optarg, &ptr, 16); @@ -154,7 +152,12 @@ static void process_args(int argc, char **argv) usage("Invalid architecture"); break; case 'b': - expecting = IH_TYPE_FLATDT; + if (add_content(IH_TYPE_FLATDT, optarg)) { + fprintf(stderr, + "%s: Out of memory adding content '%s'", + params.cmdname, optarg); + exit(EXIT_FAILURE); + } break; case 'c': params.comment = optarg; @@ -232,7 +235,6 @@ static void process_args(int argc, char **argv) show_image_types(); usage("Invalid image type"); } - expecting = type; break; case 'v': params.vflag++; @@ -243,29 +245,15 @@ static void process_args(int argc, char **argv) case 'x': params.xflag++; break; - case 1: - if (expecting == type || optind == argc) { - params.imagefile = optarg; - expecting = IH_TYPE_INVALID; - } else if (expecting == IH_TYPE_INVALID) { - fprintf(stderr, - "%s: Unknown content type: use -b before device tree files", - params.cmdname); - exit(EXIT_FAILURE); - } else { - if (add_content(expecting, optarg)) { - fprintf(stderr, - "%s: Out of memory adding content '%s'", - params.cmdname, optarg); - exit(EXIT_FAILURE); - } - } - break; default: usage("Invalid option"); } } + /* The last parameter is expected to be the imagefile */ + if (optind < argc) + params.imagefile = argv[optind]; + /* * For auto-generated FIT images we need to know the image type to put * in the FIT, which is separate from the file's image type (which diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 6f71b55363..68631b7fae 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -273,12 +273,12 @@ def log_msg(color_enabled, color, defconfig, msg): color_text(color_enabled, color, msg) + '\n' def update_cross_compile(): - """Update per-arch CROSS_COMPILE via enviroment variables + """Update per-arch CROSS_COMPILE via environment variables The default CROSS_COMPILE values are available in the CROSS_COMPILE list above. - You can override them via enviroment variables + You can override them via environment variables CROSS_COMPILE_{ARCH}. For example, if you want to override toolchain prefixes diff --git a/tools/tbot/README b/tools/tbot/README index a637a63d32..49b9e95f8f 100644 --- a/tools/tbot/README +++ b/tools/tbot/README @@ -92,6 +92,16 @@ https://github.com/hsdenx/tbot/blob/master/doc/tbot_structure.png ) It is possible to switch in a single TC between board states. +- Events + tbot creates while executing testcases so called events. + After tbot ended with the testcase it can call event_backends, + which convert the events to different formats. more info: + + https://github.com/hsdenx/tbot/blob/master/doc/README.event + + demo for a event backend: + http://xeidos.ddns.net/tests/test_db_auslesen.php + - tbot cmdline parameters: $ python2.7 src/common/tbot.py --help diff --git a/tools/tbot/README.install b/tools/tbot/README.install index 24c67bc661..a68e70524d 100644 --- a/tools/tbot/README.install +++ b/tools/tbot/README.install @@ -93,12 +93,6 @@ $ cp src/tc/tc_lab_denx_connect_to_board.py src/tc/tc_lab_denx_connect_to_board_XXX.py and adapt the commands to your needs. - As this TC powers on the board for all your boards in your VL, - you can differ between the boards through the tbot class - variable "tb.boardlabname" (which is in the default case the - same as "tb.boardname"), but you may need to name the power target - with an other name than boardname, so you can configure this case. - If connect fails end this TC with "tb.end_tc(False)" else call "tb.end_tc(True)" @@ -150,12 +144,6 @@ $ if (user == 'root'): password = '' - In the above example passwords for logging into the Lab PC tbot finds - through: - if (board == 'lab'): - user = 'name': - password = 'gnlmpf' # password 'gnlmpf' for login of user 'name' - - prepare board config file Each board which is found in the VL needs a tbot configuration file pass the config file name with the option '-c' to tbot, tbot searches @@ -187,13 +175,8 @@ $ keepalive message. line 14: channel_timeout: passed to paramiko line 15: loglevel: tbots loglevel for adding entries into the logfile. - line 16: lap_api: used lap API (currently only 'ssh_std') - Should be declared as standard -> this line would be not needed - longer. line 17: wdt_timeout: timeout in seconds for tbots watchdog. Watchdog gets triggered if prompt get read. - line 20,21: include 'ssh_std' api - should be removed. line 24: tc_lab_denx_connect_to_board_tc: Which TC is used for connecting to the boards console the TC, here: https://github.com/hsdenx/tbot/blob/master/src/tc/tc_workfd_connect_with_kermit.py @@ -215,156 +198,113 @@ TC (and hopefully share them), so continue with: u-boot:tools/tbot/README.create_a_new_testcase Heiko Schocher <hs@denx.de> -v1 2016.01.22 +v2 2016.04.26 -------------- [1] tbot Dokumentation: [2] u-boot:/tools/tbot/README https://github.com/hsdenx/tbot/blob/master/README.md + tbot-devel@googlegroups.com [3] Example for a first U-Boot TC which should always work: (with commandline option "-v" for verbose output): - -hs@localhost:tbot [master] $ python2.7 src/common/tbot.py -c tbot_dxr2.cfg -t tc_ub_setenv.py -v -l log/tbot.log +hs@localhost:tbot [event-devel] $ python2.7 src/common/tbot.py -c tbot_dxr2.cfg -t tc_ub_setenv.py -v -l log/tbot.log **** option cfg: tbot_dxr2.cfg log: log/tbot.log tc: tc_ub_setenv.py v 1 ('CUR WORK PATH: ', '/home/hs/data/Entwicklung/tbot') ('CFGFILE ', 'tbot_dxr2.cfg') ('LOGFILE ', '/home/hs/data/Entwicklung/tbot/log/tbot.log') -(<denx.tbot_lab_api object at 0x7f53ac1808d0>, <tbotlib.tbot object at 0x7f53a45fd410>, True) -(<denx.tbot_lab_api object at 0x7f53ac1808d0>, <tbotlib.tbot object at 0x7f53a45fd410>, True) -read 0: Last login: Fri Jan 22 12:20:12 2016 from 87.97.28.177 -read 0: -read 0: ************************************************************* -read 0: BDI2000 Assignment: (last updated: 2015-11-20 12:30 MET) -read 0: bdi1 => techem bdi2 => cetec_mx25 bdi3 => lpc3250 -read 0: bdi4 => - bdi5 => --Rev.B!-- bdi6 => tqm5200s -read 0: bdi7 => [stefano] bdi8 => smartweb bdi9 => sigmatek-nand -read 0: bdi10 => pcm052 bdi11 => socrates bdi12 => aristainetos -read 0: bdi13 => imx53 bdi14 => ib8315 bdi15 => cairo -read 0: bdi16 => g2c1 bdi17 => lwe090 bdi18 => symphony -read 0: bdi19 => dxr2 bdi20 => ima3-mx6 bdi21 => sama5d3 -read 0: bdi98 => - bdi99 => - bdi0 => - -read 0: Please power off unused systems when you leave! Thanks, wd. -read 0: ************************************************************* -read no ret 0: -pollux:~ hs $ -write 0: export PS1="\u@\h [\$(date +%k:%M:%S)] ttbott >" -read 0: export PS1="\u@\h [\$(date +%k:%M:%S)] ttbott >" -read 0: hs@pollux [12:21:00] ttbott > -read 1: Last login: Fri Jan 22 12:20:59 2016 from 87.97.28.177 -read 1: -read 1: ************************************************************* -read 1: BDI2000 Assignment: (last updated: 2015-11-20 12:30 MET) -read 1: bdi1 => techem bdi2 => cetec_mx25 bdi3 => lpc3250 -read 1: bdi4 => - bdi5 => --Rev.B!-- bdi6 => tqm5200s -read 1: bdi7 => [stefano] bdi8 => smartweb bdi9 => sigmatek-nand -read 1: bdi10 => pcm052 bdi11 => socrates bdi12 => aristainetos -read 1: bdi13 => imx53 bdi14 => ib8315 bdi15 => cairo -read 1: bdi16 => g2c1 bdi17 => lwe090 bdi18 => symphony -read 1: bdi19 => dxr2 bdi20 => ima3-mx6 bdi21 => sama5d3 -read 1: bdi98 => - bdi99 => - bdi0 => - -read 1: Please power off unused systems when you leave! Thanks, wd. -read 1: ************************************************************* -read no ret 1: -pollux:~ hs $ -write 1: export PS1="\u@\h [\$(date +%k:%M:%S)] ttbott >" -read 1: export PS1="\u@\h [\$(date +%k:%M:%S)] ttbott >" -read 1: hs@pollux [12:21:02] ttbott > -write 0: remote_power dxr2 -l -read 0: hs@pollux [12:21:00] ttbott >remote_power dxr2 -l -read 0: dxr2 ON -read 0: hs@pollux [12:21:02] ttbott > -read no ret 1: -hs@pollux [12:21:02] ttbott > -write 1: ssh hs@lena -read 1: ssh hs@lena -read no ret 1: -hs@lena's password: -read 1: -read 1: Last login: Fri Jan 22 12:20:17 2016 from 192.168.1.1 -read 1: -read no ret 1: -[hs@lena ~]$ -write 1: export PS1="\u@\h [\$(date +%k:%M:%S)] ttbott >" -read 1: export PS1="\u@\h [\$(date +%k:%M:%S)] ttbott >" -read 1: hs@lena [12:21:07] ttbott > -read no ret 1: -hs@lena [12:21:07] ttbott > -write 1: stty cols 200 -read 1: stty cols 200 -read 1: hs@lena [12:21:08] ttbott > -write 1: export TERM=vt200 -read 1: hs@lena [12:21:08] ttbott >export TERM=vt200 -read 1: hs@lena [12:21:08] ttbott > -write 1: echo $COLUMNS -read 1: hs@lena [12:21:08] ttbott >echo $COLUMNS -read 1: 200 -read 1: hs@lena [12:21:08] ttbott > -write 1: kermit -read 1: hs@lena [12:21:08] ttbott >kermit -read 1: C-Kermit 8.0.211, 10 Apr 2004, for Linux -read 1: -read 1: Copyright (C) 1985, 2004, -read 1: Trustees of Columbia University in the City of New York. -read 1: Type ? or HELP for help. -read 1: -read 1: (/home/hs/) C-Kermit> -read 1: -read no ret 1: (/home/hs/) C-Kermit> -write 1: set line /dev/ttyUSB0 -read 1: set line /dev/ttyUSB0 -read 1: -read 1: (/home/hs/) C-Kermit> -write 1: set speed 115200 -read 1: -read 1: (/home/hs/) C-Kermit>set speed 115200 -read 1: /dev/ttyUSB0, 115200 bps -read 1: -read 1: (/home/hs/) C-Kermit> -write 1: set flow-control none -read 1: -read 1: (/home/hs/) C-Kermit>set flow-control none -read 1: -read 1: (/home/hs/) C-Kermit> -write 1: set carrier-watch off -read 1: -read 1: (/home/hs/) C-Kermit>set carrier-watch off -read 1: -read 1: (/home/hs/) C-Kermit> -write 1: connect -read 1: -read 1: (/home/hs/) C-Kermit>connect -read 1: Connecting to /dev/ttyUSB0, speed 115200 -read 1: -read 1: Escape character: Ctrl-\ (ASCII 28, FS): enabled -read 1: -read 1: Type the escape character followed by C to get back, -read 1: -read 1: or followed by ? to see other options. -read 1: -read 1: ---------------------------------------------------- -read no ret 1: - -write no ret 1: - -read 1: -read 1: Heiko=Schocher -read no ret 1: +tb_ctrl: Last login: Mon Apr 25 14:52:42 2016 from 87.97.29.27 +************************************************************* +BDI2000 Assignment: (last updated: 2015-11-20 12:30 MET) +bdi1 => techem bdi2 => cetec_mx25 bdi3 => lpc3250 +bdi4 => - bdi5 => --Rev.B!-- bdi6 => tqm5200s +bdi7 => [stefano] bdi8 => smartweb bdi9 => sigmatek-nand +bdi10 => pcm052 bdi11 => socrates bdi12 => aristainetos +bdi13 => imx53 bdi14 => ib8315 bdi15 => cairo +bdi16 => g2c1 bdi17 => lwe090 bdi18 => symphony +bdi19 => dxr2 bdi20 => ima3-mx6 bdi21 => sama5d3 +bdi98 => - bdi99 => - bdi0 => - +Please power off unused systems when you leave! Thanks, wd. +************************************************************* +tb_ctrl: pollux:~ hs $ +tb_ctrl: export PS1=ttbott +ttbott +tb_ctrl: stty cols 200 +ttbott +tb_ctrl: export TERM=vt200 +ttbott +tb_ctrl: echo $COLUMNS +200 +ttbott +tb_con: Last login: Tue Apr 26 06:28:59 2016 from 87.97.29.27 +************************************************************* +BDI2000 Assignment: (last updated: 2015-11-20 12:30 MET) +bdi1 => techem bdi2 => cetec_mx25 bdi3 => lpc3250 +bdi4 => - bdi5 => --Rev.B!-- bdi6 => tqm5200s +bdi7 => [stefano] bdi8 => smartweb bdi9 => sigmatek-nand +bdi10 => pcm052 bdi11 => socrates bdi12 => aristainetos +bdi13 => imx53 bdi14 => ib8315 bdi15 => cairo +bdi16 => g2c1 bdi17 => lwe090 bdi18 => symphony +bdi19 => dxr2 bdi20 => ima3-mx6 bdi21 => sama5d3 +bdi98 => - bdi99 => - bdi0 => - +Please power off unused systems when you leave! Thanks, wd. +************************************************************* +tb_con: pollux:~ hs $ +tb_con: export PS1=ttbot +tb_con: t +ttbott +tb_con: stty cols 200 +ttbott +tb_con: export TERM=vt200 +ttbott +tb_con: echo $COLUMNS +200 +ttbott +tb_con: ssh hs@lena +tb_con: hs@lena's password: +tb_con: +tb_con: Last login: Mon Apr 25 07:03:29 2016 from 192.168.1.1 +tb_con: [hs@lena ~]$ +tb_con: export PS1=ttbott +ttbott +tb_con: stty cols 200 +ttbott +tb_con: export TERM=vt200 +ttbott +tb_con: echo $COLUMNS +200 +ttbott +tb_con: kermit +C-Kermit 8.0.211, 10 Apr 2004, for Linux + Copyright (C) 1985, 2004, + Trustees of Columbia University in the City of New York. +Type ? or HELP for help. +(/home/hs/) C-Kermit> +tb_con: set line /dev/ttyUSB0 +(/home/hs/) C-Kermit> +tb_con: set speed 115200 +/dev/ttyUSB0, 115200 bps +(/home/hs/) C-Kermit> +tb_con: set flow-control none +(/home/hs/) C-Kermit> +tb_con: set carrier-watch off +(/home/hs/) C-Kermit> +tb_con: connect +Connecting to /dev/ttyUSB0, speed 115200 + Escape character: Ctrl-\ (ASCII 28, FS): enabled +Type the escape character followed by C to get back, +or followed by ? to see other options. +---------------------------------------------------- +tb_con: <INTERRUPT> +U-Boot# +tb_con: U-Boot# U-Boot# -write no ret 1: -write no ret 1: - -read 1: <INTERRUPT> -read 1: U-Boot# -write 1: setenv Heiko Schocher -read 1: U-Boot# setenv Heiko Schocher -read no ret 1: +tb_con: setenv Heiko Schocher U-Boot# -write 1: printenv Heiko -read 1: printenv Heiko -read 1: Heiko=Schocher -read no ret 1: +tb_con: printenv Heiko +Heiko=Schocher U-Boot# +[('tc_workfd_ssh.py', 1, 0), ('tc_workfd_connect_with_kermit.py', 1, 0), ('tc_ub_setenv.py', 1, 0)] End of TBOT: success -hs@localhost:tbot [master] $ +hs@localhost:tbot [event-devel] $ |