Re: [U-Boot] Low priority request for info about alternative to #ifdef
Did I make a mistake including "Low priority" in the subject? If anyone remembers this discussion, I'd appreciate a pointer. Thanks, Jim On 03/21/2017 07:08 AM, James Chargin wrote: Hi I've seen periodic discussion on the U-Boot mailing list of alternatives to #ifdef. I need a bit more information about one specific alternative, but in my searches of the source for 2017.03, I can't find examples that might help me. Also, my memory of this is a dim so I'm not sure I'm looking for the right thing. Is there something that is similar to "#ifdef CONFIG_*" but looks more like "if_defined(CONFIG_*)" and relies on compile/link time elimination of unused code? Thanks for your time. Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Low priority request for info about alternative to #ifdef
Hi I've seen periodic discussion on the U-Boot mailing list of alternatives to #ifdef. I need a bit more information about one specific alternative, but in my searches of the source for 2017.03, I can't find examples that might help me. Also, my memory of this is a dim so I'm not sure I'm looking for the right thing. Is there something that is similar to "#ifdef CONFIG_*" but looks more like "if_defined(CONFIG_*)" and relies on compile/link time elimination of unused code? Thanks for your time. Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] net: use random ethernet address if invalid and not zero
Hi Joe, Thanks for your reply. On 11/07/2016 10:20 AM, Joe Hershberger wrote: Hi Jim, On Wed, Nov 2, 2016 at 8:21 AM, James Chargin <jimccr...@gmail.com> wrote: Hi, Regarding "invalid" Ethernet address. Is there a reliable way to set the default environment that will prevent Ethernet communications from being attempted. That is, when an Ethernet capable system is brand new and before an Ethernet MAC address has been assigned to that system during manufacturing with the "setenv ethaddr" command, how can Ethernet comms be disabled? This would be a fail-safe to make sure that part of the manufacturing process is done correctly and that an Ethernet address is intentionally assigned. There is no feature like that as far as I know. Can you not just read back the ethaddr variable and compare it to what you intended to program? I don't understand what you are suggesting, sorry. A long time ago I wrote code /* * This is an invalid MAC address. * Having it be invalid prevents connection to * the network until the U-Boot "setenv ethaddr" * command is run, which selects a valid MAC * Refer to the section titled "Null values" in * http://standards.ieee.org/regauth/oui/tutorials/UseOfEUI.html. */ #define CONFIG_ETHADDR ff:ff:ff:ff:ff:ff The referenced section says, "... The all-zeros and all-ones EUI-64 values, 00-00-00-00-00-00-00-00hex and FF-FF-FF-FF-FF-FF-FF-FFhex, respectively, are owned by the IEEE Registration Authority and will never be assigned, and are invalid for use as identifiers. ..." (which doesn't really apply to my case, but I was hopeful that I could generalize to my case) At the time I wrote this code, I was trying to cope with a mfg process that was about to ship systems without setting correct MAC addresses. I was new to U-Boot at that time but found that U-Boot would not build without CONFIG_ETHADDR defined. I subsequently checked again and found that U-Boot connects to the network regardless of the value of CONFIG_ETHADDR and even when it is not defined at compile-time or run-time. I left it there, instead I made changes to the mfg process so that "setenv ethaddr" was more likely to always get done. I would have liked a way to configure the default U-Boot environment so that no network connection could be made until a MAC address had been set, but I wasn't willing to spend any more time figuring out how to make that happen (possibly by submitting a patch upstream) Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] dtc 1.4.2 warnings
On 11/03/2016 04:14 AM, Tom Rini wrote: On Thu, Nov 03, 2016 at 12:30:30PM +0800, Bin Meng wrote: Hi, After I switched to dtc 1.4.2, when building x86 boards, I got: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name [snip] Should we fix those warnings? I see some device tree files in the Linux kernel report the same warnings, wondering whether they should be fixed. So yes, this is what Heiko made patches for a while back. Since for x86 we are the authoritative source for the files, we should fix them here. For other arches we should push the fix up via Linux and merge them back in. Thanks! I see similar warnings for arch/arm/dts/zynq-*.dtb Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: use random ethernet address if invalid and not zero
Hi, Regarding "invalid" Ethernet address. Is there a reliable way to set the default environment that will prevent Ethernet communications from being attempted. That is, when an Ethernet capable system is brand new and before an Ethernet MAC address has been assigned to that system during manufacturing with the "setenv ethaddr" command, how can Ethernet comms be disabled? This would be a fail-safe to make sure that part of the manufacturing process is done correctly and that an Ethernet address is intentionally assigned. Thanks, Jim On 11/02/2016 04:52 AM, Michal Simek wrote: From: Siva Durga Prasad PaladuguUse random ethernet address if the ethernet address found is invalid, not zero and config for random address is defined. Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- net/eth-uclass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/eth-uclass.c b/net/eth-uclass.c index a32961e6ceaa..1d130110890e 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -512,7 +512,8 @@ static int eth_post_probe(struct udevice *dev) eth_setenv_enetaddr_by_index("eth", dev->seq, pdata->enetaddr); printf("\nWarning: %s using MAC address from ROM\n", dev->name); - } else if (is_zero_ethaddr(pdata->enetaddr)) { + } else if (is_zero_ethaddr(pdata->enetaddr) || + !is_valid_ethaddr(pdata->enetaddr)) { #ifdef CONFIG_NET_RANDOM_ETHADDR net_random_ethaddr(pdata->enetaddr); printf("\nWarning: %s (eth%d) using random MAC address - %pM\n", -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] fs:When 'go' run the program by 'fatload', added the cache flush to prevent cache mismatch.
Dear yoko, On 10/07/2016 08:20 PM, yoko wrote: Signed-off-by: yoko--- Changes for v2: - The commit message is changed. fs/fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fs.c b/fs/fs.c index 595ff1f..7607230 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -417,6 +417,8 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], } puts("\n"); + flush_cache(addr, len_read); + setenv_hex("fileaddr", addr); setenv_hex("filesize", len_read); @@ -535,4 +537,3 @@ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return CMD_RET_SUCCESS; } - The wiki includes information about cache considerations for the "go" command [1]. If possible, please check that information to be sure it remains consistent with this patch. Thanks, Jim [1] http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.3. -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] A command to discard saved environments?
Dear Wolfgang, On 08/03/2016 12:59 PM, Wolfgang Denk wrote: Dear James, In messageyou wrote: I know my non-volatile copy of the environment is in NOR flash so I use the command protect all off;erase +1 But, of course this is specific to NOR flash. I'm not aware of a way to do this in the general case, independent of NV environment storage media and redundancy. The idea applies to all kinds of persistent storage: just overwrite a few (4 or more) bytes at the beginning of each copy of the persistent envrionment. In your case, you could save the "erase" by overwriting the first 4 bytes (where the CRC32 checksum is stored) with 0x. In the case of my NOR flash storage, telling erase to do one byte actually causes the erasure of an entire flash sector, which we've reserved for the NV environment. You are of course correct that overwriting the CRC will have the same operational effect. In my shop, time is not critical, whereas simplicity of commands is valued by those I have to instruct to get this sort of operation done. It's a rare occurrence that we need to do this, we don't use this sort of operation as a normal part of doing business. I'd be supportive of having a way to do this. No, I don't think we want to support this. The persistent copy of the environment is a precious resource, and I cannot think of a regular use case to invalidate this. If you do, the result is that you will use the default settings at next boot - and the samve effect can be acchieved by using "env reset" + "env save" as already recommended. [The only difference is that you will not see the "invalid CRC, using the default env" warning then, but I consider this a pro, not a con.] Thank you for this perspective. I often feel a bit isolated in my way of doing things and I find it valuable to read things like this. I agree that there is not a regular use for an operation of this sort. During development and debug, I will occasionally need to restore a particular system to the physical state it would be in had we just received it from our contract manufacturer, which would include a blank area in NOR flash where the U-Boot environment is kept. This is done usually to "prove" that processes will work on those systems from the CM when production starts. Up to now, I've used the erase command to do this and I will continue to do things this way. I guess I've been at this long enough that the rare times I need to erase this area of flash has become noticeable as a pattern. Again, thank you for your reply. Regards, Jim Best regards, Wolfgang Denk -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] A command to discard saved environments?
I know my non-volatile copy of the environment is in NOR flash so I use the command protect all off;erase +1 But, of course this is specific to NOR flash. I'm not aware of a way to do this in the general case, independent of NV environment storage media and redundancy. I'd be supportive of having a way to do this. Jim On 08/02/2016 08:31 PM, Masahiro Yamada wrote: Hi. I am looking for a command that discards the saved environments, and takes me back to the "*** Warning - bad CRC, using default environment" state. In my case, the environment data is saved at sector 0x400 of the MMC device on my board. So, I can just do > mmc erase 400 10 But, beforehand, I need to know CONFIG_ENV_IS_IN_MMC CONFIG_ENV_OFFSET 0x8 in order to confirm if the above command is doing the right thing. (If I make a mistake in calculating the offset value, other data would be damaged.) Is there a nice command to do that? -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ARMv7 Execution Flow
Hi James, On 06/05/2016 08:48 PM, Lokesh Vutla wrote: Hi James, On Saturday 04 June 2016 12:25 AM, James Pollard wrote: Hi, I'm a new U-Boot user. I'm trying to follow the flow of execution for the ARMv7 architecture, and have found myself running into confusion. ... I've found, in my similar explorations for other architectures, that the link map can provide clues to where a particular function is linked from. In this case, based on the reply from Lokesh, I'd imagine the link map would show no definition. Also, perhaps there is an objdump option to display this info. I've noticed however, since the change to Kbuild, the names of all files contributing to the final link are "build-in.o" which decreases the usefulness of the link map for this purpose. Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com Thanks and regards, Lokesh Yours, James Pollard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] "make clean" not traversing into board-specific directories?
Dear Jörg, On 05/18/2016 02:06 AM, joerg.scheuerm...@continental-corporation.com wrote: Von: Masahiro Yamada <yamada.masah...@socionext.com> Datum: 14.05.2016 11:11 2016-05-14 7:41 GMT+09:00 James Chargin <jimccr...@gmail.com>: Hi, On 05/13/2016 01:50 PM, Fabio Estevam wrote: Hi Jörg, On Fri, May 13, 2016 at 1:57 PM, <joerg.scheuerm...@continental-corporation.com> wrote: Hello, I am using u-boot 2015.04 and have a mechanism implemented in the board-specific Makefile for our board, which uses xsltproc to generate header-files from xml input files - this part is working by now. what is still not working is the removal of those generated files upon calling "make clean", and after some initial inspection I found out, that the board-specific directories are completely ignored when calling "make clean"! ... Hi again, I 'solved' my case now by generating those headers into include/generated - as there is some existing magic already, that purges this directory upon "make distclean" (which actually is all I needed...) Nice hack, good work. is that ok that way or are there some "rules" to not write board-specific stuff into this directory perhaps? (this may not work when building consecutive u-boots for different boards WITHOUT "make distclean" in between - but in my understanding this needs to be done in this case anyway, correct?) In a U-Boot 2015.07 build I've got, the other files I see in include/generated seem like they have been derived from the "make _config". So, your work seems to me to be compatible with the way things work more recently (I shouldn't be considered an authority on this). I can't speak to what "rules" might say about it. I can't find any documented, which seems pretty much like "there are no rules" :) best regards, Jörg p.s. just a thought: maybe the reason for "make clean" ignoring the board-specific directories is to make it functional without the need to have a valid configuration at hand? (in other words: "make all" requires a "make xyz_config" before - "make clean/distclean/mrproper" does not) This is an excellent observation, thanks. I'd guess it means that if changes are ever made so "make clean" visits board directories, those changes will have be tolerant of there being no configuration established. Best regards, Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] "make clean" not traversing into board-specific directories?
Hi, On 05/13/2016 01:50 PM, Fabio Estevam wrote: Hi Jörg, On Fri, May 13, 2016 at 1:57 PM,wrote: Hello, I am using u-boot 2015.04 and have a mechanism implemented in the board-specific Makefile for our board, which uses xsltproc to generate header-files from xml input files - this part is working by now. what is still not working is the removal of those generated files upon calling "make clean", and after some initial inspection I found out, that the board-specific directories are completely ignored when calling "make clean"! - why is that the case, can't those directories not also be visited when cleaning things up? It works fine for me. I built mx7dsabresd_defconfig with mainline U-boot and after that I see: ls board/freescale/mx7dsabresd/ built-in.oimximage.cfg.cfgtmp MAINTAINERS mx7dsabresd.c mx7dsabresd.o imximage.cfg Kconfig Makefile mx7dsabresd.su Then after a 'make clean' ls board/freescale/mx7dsabresd/ imximage.cfg Kconfig MAINTAINERS Makefile mx7dsabresd.c ,which worked as expected. In March of 2015, I was told that the board directories are not visited for "make clean". Quoting Mr. Masahiro Yamada > > CLEAN_FILES is only available at the top-level Makefile. > > Add > CLEAN_FILES += board/my_board/test.img > to the top-level Makefile, and it should work. > > >> clean-files += test.img >> clean-files := test.img > > These are correct in sub-directory Makefiles in general, > but unfortunately, "make clean" does not descend into board/ directory > for some reason. > > So, they do not work in board/*/Makefile > This was quite a while ago, so changes may have been made for more recent releases. But at one time (v2014.07), "make clean" did not visit board directories. Regards, -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Fix various typos, scattered over the code.
Hi Robert, I appreciate this work on typos. Thanks. On 05/04/2016 01:47 AM, Robert P. J. Day wrote: Spelling corrections for (among other things): * environment * override * variable * ftd (should be "fdt", for flattened device tree) * embedded * FTDI * emulation * controller --- the fixes for "controller" here are independent of the previous patch. diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c index d580a43..a9b12a4 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fsl_lsch3_speed.c @@ -180,7 +180,7 @@ ulong get_ddr_freq(ulong ctrl_num) /* * DDR controller 0 & 1 are on memory complex 0 -* DDR controler 2 is on memory complext 1 +* DDR controller 2 is on memory complext 1 Should this be > + * DDR controller 2 is on memory complex 1 Jim */ ... Regards, -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] SAMA5D2 xplained SD/eMMC boot
On 04/18/2016 09:54 AM, Andreas Bießmann wrote: Hi Marek, On 2016-04-18 17:30, Marek Vasut wrote: Hi! I've been playing around with latest mainline u-boot on sama5d2 xplained ultra. I noticed that if I want to boot the board from SD card (SDHCI1), the board will indeed load the SPL from it, but SPL will try to load u-boot.img from eMMC (SDHCI0) and fail, as my eMMC is blank. This is a result of hard-coding boot device to BOOT_DEVICE_MMC1 in arch/arm/mach-at91/spl.c spl_boot_device() I think. Is there any way to discern from which SDHCI the board booted to continue loading u-boot.img from the correct one ? This would let us implement board_boot_order() and boot from correct SDHCI. AFIAK it is not possible to detect the boot medium in a running device. At least was this the case when I checked it the last time (for sama5d3). For the TI am5728 (ARM V7), there is a register, CTRL_CORE_BOOTSTRAP (0x4A0026C4) which contains the boot device selection at last power cycle. I'm new to ARM so I don't know how likely it is that the Atmel part has a similar register. Good luck. -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Missing flush_cache in do_load function
Hi, On 03/31/2016 11:24 PM, Borsodi Petr wrote: Hi all, I found a problem with load command on ARM based board. When I load hello_world standalone application using filesystem load command, the u-boot crashes. Loading with loads is OK. I think that the problem is caused by cache inconsistency. If I add calling the flush_cache function, problem is solved. I also ran into cache inconsistency problems when copying the stand alone from NOR flash to RAM. I was using Freescale 85xx SOC. Based on a few email conversations I had at the time, I added http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.3. Maybe you will find something useful. Jim Petr Borsodi ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Variable content dump to memory
Dear Nicolae, On 03/25/2016 02:12 AM, Nicolae Rosia wrote: On Thu, Mar 24, 2016 at 7:51 PM, James Chargin <jimccr...@gmail.com> wrote: [...] You weren't completely specific about your needs, but assuming you are wanting to write a U-Boot environment variable to memory, try something like You're right. I'm trying to do the following: U-Boot# setenv mytext 'This is a long text' U-Boot# printenv mytext mytext=This is a long text and somehow write it to a memory address so I can use it with ext4write. I don't have a solution to your needs, unfortunately. I thought my solution might be for a problem more simple than you were asking about. Perhaps someone else on the mailing list has an idea. Jim Best regards, Nicolae -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Variable content dump to memory
On 03/24/2016 03:30 AM, Nicolae Rosia wrote: Hello, I'm trying to write the contents of a variable to a file using ext4write but it requires a memory address as input. Is there an easy way to get the contents of a variable to a particular mem address? You weren't completely specific about your needs, but assuming you are wanting to write a U-Boot environment variable to memory, try something like => # set up a test value => setenv var 12345678 => printenv var var=12345678 => => # do the actual write => mw.l 8002 $var 1 => => # observe memory was set => md.l 8001fff0 c 8001fff0: 67ffedc4 dbc98df5 8e71cdd4 628fcacd...g..qb 8002: 12345678 a2fe8db5 df34c767 636dbd37xV4.g.4.7.mc 80020010: 375dfdcb fde86ca2 3f273cdf 1fe951f9..]7.l...<'?.Q.. Also, "help mw". This was done on something similar to beaglebone x15. You will need to use memory addresses that are valid for your target system. Jim Best regards, Nicolae ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Makefile: remove BUILD_TAG from KBUILD_CFLAGS
On 02/08/2016 05:32 PM, Stephen Warren wrote: From: Stephen WarrenIf BUILD_TAG is part of KBUILD_CFLAGS, then any time the value changes, all files get rebuilt. In a continuous integration environment, the value will change every build. This wastes time assuming that incremental builds would otherwise occur. To solve this, remove BUILD_TAG from KBUILD_FLAGS and add it to the end of "local version". This has other advantages too: - The special case for BUILD_TAG in display_options.c can be removed. - The version printed by the "version" command exactly matches what is printed at boot. Old sign-on message: U-Boot 2016.03-rc1-00044-g4085db5e767b (Feb ...), Build: bar-bas New sign-on message: U-Boot 2016.03-rc1-00044-g4085db5e767b-bar-baz (Feb ...) I would urge this not be done. The display of the BUILD_TAG on startup is pretty useful in my environment. It's been there for a long time and some of my users have grown used to it. Of all the parts of the sign-on message, I'd rather the git hash go away than the BUILD_TAG. None of my users really care about the level of detail of the git hash and won't spend the time required to use this hash to determine if they have the version they want. (Some don't have a repo clone, and don't care to, and so can't easily make the correspondence even if they wanted to). Thanks for your consideration. Jim Signed-off-by: Stephen Warren --- Makefile| 4 lib/display_options.c | 4 scripts/setlocalversion | 4 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 42fad45afee1..2265b8995a7b 100644 --- a/Makefile +++ b/Makefile @@ -562,10 +562,6 @@ else KBUILD_CFLAGS += -O2 endif -ifdef BUILD_TAG -KBUILD_CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"' -endif - KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks) diff --git a/lib/display_options.c b/lib/display_options.c index 29343fc00e3f..5dcdf4e429af 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -15,11 +15,7 @@ int display_options (void) { -#if defined(BUILD_TAG) - printf ("\n\n%s, Build: %s\n\n", version_string, BUILD_TAG); -#else printf ("\n\n%s\n\n", version_string); -#endif return 0; } diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 63d91e22ed7c..4ef6603b5c27 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -171,4 +171,8 @@ else fi fi +if test -n "${BUILD_TAG}"; then + res="$res-${BUILD_TAG}" +fi + echo "$res" -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Newbie to u-boot needs help! Please help if you can
Hello Kevin Alexander, On 01/11/2016 03:13 PM, Kevin Alexander wrote: Hello I am making a bigeffort to try to acquire knowledge regarding embedded Linux. A big effort is a great idea. A long association is also beneficial as a lot of stuff happens that is not documented well (or at all) and being around provides for exposure to this type of change. Myprimary reference is the book entitled 'Embedded Linux Primer, SecondEdition A Practical, Real-World Approach' by Christopher Hallinan,published 2010 U-Boot has recently (at least when compared to the time taken to write and publish a book) gone through three major changes that I'm aware of. My work includes some U-Boot customization so I have some exposure to this, but I'm anything but an expert or core U-Boot developer. 1) The configuration system has changed from one based primarily on large number of #define in header files to something based closely on KConfig as used in the Linux kernel. 2) The build system has moved quite close to KBuild as used in the Linux kernel. 3) A unified device driver model has been introduced and conversion of existing drivers is currently under way. I have reachedchapter 7, 'Bootloaders', and I am having a few problems with thischapter. In section 7.3 it starts to make mention of u-boot. Aftergit cloning and examining the latest u boot source tree, it isapparent that the description in the book about how to configure andbuild u-boot is not congruent the latest u-boot source tree. Cansomeone reply to this message, or point me to a(nother) mailing list(s),wikis or urls that would allow me to acquire a good understanding onhow configure and build u-boot as represented by the latest u-bootsource tree. I'm not sure official U-Boot documentation has been modified yet to reflect these changes. Even if it had, it is likely to assume familiarity with the Linux kernel KConfig and KBuild systems. Referring to the Linux documentation for these subsystems might be helpful in understanding how the similar U-Boot facilities operate. The main documentation for U-Boot is the README file at the top directory level. Also, see files in the doc subdirectory. However, as I said, don't be too surprised if these sources are not up to date. Many thanks in advance Good luck, and welcome to U-Boot. If you end up developing understanding of these parts of the system by exploration, others in the community (like me) and other newbie's could really benifit from your knowledge. Please consider writing up what you find and submitting patches to README (or the wiki at http://www.denx.de/wiki/DULG/Manual) Best Regards, Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] HUSH logical AND/OR expressions
Wolfgang, Thanks for your contributions. On 04/28/2015 03:51 PM, Wolfgang Denk wrote: Dear Joe, In message CANr=Z=YxsT-VOje5jA0k00BSxNROXBOPXMG-Q_8_7jAYN=f...@mail.gmail.com you wrote: I noticed you asked for a reference to the original hush code that is the origin for U-Boot's adaptation. I couldn't find a reply to that question. I also haven't been able to find anything with a quick we search. Do you know where it did come from? I never got a response, but it appears to be busybox... Oops, sorry. Yes, of course it is busybox. As far as I can tell, it was added around October 2001 to the PPCBoot project as part of the PPCBoot v1.1.0 release: * Added hush shell (from Busybox) as alternative command line interpreter, thus enabling powerful command line syntax like if...then...else...fi conditionals or `' and '||' constructs (shell scripts). See the README file for information about implementation and usage. I should have thought of this myself. I could have looked in the commit history or release notes. Just for completeness, I tried the commands using busybox: # busybox|head -1 BusyBox v1.20.2 (2013-07-02 15:49:59 PDT) multi-call binary. # false true || echo ECHO ECHO # false false || echo ECHO ECHO # true false || echo ECHO ECHO # -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] HUSH logical AND/OR expressions
Dear Joe Hershberger, On 04/28/2015 11:00 AM, Joe Hershberger wrote: Hi Joakim, On Mon, Apr 27, 2015 at 8:39 AM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Trying to get a better handle of HUSH shell expressions, this does not work as I expect: = false true || echo ECHO = false false || echo ECHO none prints ECHO, seems like a bug? I think it works as it should. false followed by will terminate always. This the only one that prints ECHO = true false || echo ECHO This also seems correct. Passing true into and false into || will always continue. I thought hush is supposed to be mostly similar to sh. On my Linux desktop, bash (which is supposed to be backward compatible with sh) says $ which sh /usr/bin/sh $ ls -l /usr/bin/sh lrwxrwxrwx 1 root root 4 Apr 17 14:43 /usr/bin/sh - bash $ sh --version GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. $ sh sh-4.2$ false true || echo ECHO ECHO sh-4.2$ false false || echo ECHO ECHO sh-4.2$ true false || echo ECHO ECHO sh-4.2$ exit exit Is this one of the places where hush and sh are not the same? Regards, Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] HUSH logical AND/OR expressions
Dear Joe, On 04/28/2015 11:35 AM, Joe Hershberger wrote: Hi James, On Tue, Apr 28, 2015 at 1:19 PM, James Chargin jimccr...@gmail.com wrote: Dear Joe Hershberger, On 04/28/2015 11:00 AM, Joe Hershberger wrote: Hi Joakim, On Mon, Apr 27, 2015 at 8:39 AM, Joakim Tjernlund joakim.tjernl...@transmode.se wrote: Trying to get a better handle of HUSH shell expressions, this does not work as I expect: = false true || echo ECHO = false false || echo ECHO ... I always just assumed this was a limitation of hush, but it's now looking like a bug instead. I haven't debugged into it, but I tend to stay away from hush these days. When I've submitted a bug fix to this area I've been told that we should upgrade wholesale instead, and I've haven't been up for that task so far. http://lists.denx.de/pipermail/u-boot/2012-November/139841.html That's a great conversation with Wolfgang, thanks for the reference. Like you, I have tended to use hush carefully. It is similar to sh/bash, but different enough that I never count on an easy port of bash script fragments. I noticed you asked for a reference to the original hush code that is the origin for U-Boot's adaptation. I couldn't find a reply to that question. I also haven't been able to find anything with a quick we search. Do you know where it did come from? Perhaps there is an easy, minor bugfix for this that would be palette-able. I've been afraid of the hush code for a while. I don't think I want to mess with it now. I'll just continue to work with what we've got, carefully. Thanks again for your attention, Jim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Question about board-specific Makefile actions
Dear Masahiro, Your help has enabled me to make my board Makefile do what I want (except for the clean target, see below). On 03/12/2015 09:20 PM, Masahiro Yamada wrote: Hi James, 2015-03-13 3:35 GMT+09:00 James Chargin jimccr...@gmail.com: I could still use some help with this from someone who really knows how the make system works. Tom and Simon provided hints that were helpful, as I note below. On 03/09/2015 08:34 AM, James Chargin wrote: So, is no one willing to offer a hint? Thanks, Jim On 03/03/2015 01:39 PM, James Chargin wrote: I have a custom board in a git workspace for U-Boot 2014.07. I've copied most of this from the .../board/ti/beagle. My board directory Makefile looks like 8--- obj-y := board.o 8--- I'd like to add a few files to this directory that are processed during make all and have any newly derived files deleted during make clean. ... Is there any documentation you could point me at that might explain the way these Makefiles interact? As Simon suggested, Documentation/kbuild/makefiles.txt of Linux Kernel is the best one. This document has been very helpful. Thank you both for pointing it out. I know most of this was derived from somewhere else (Linux kernel?) as part of the move to KConfig. But I have no ... To be precise, you should say Kbuild, not Kconfig. Kbuild and Kconfig should be considered separately. Kbuild - build system Kconfig - configuration system They both originate in Linux Kernel. U-Boot switched to Kbuild at 2014.04-rc1, and to Kconfig at 2014.10-rc1. You mentioned you are using u-boot v2014.07. So, you are building U-Boot with Kbuild, but using the old, conventional configuration system (mkconfig + boards.cfg). Your questions in this thread are all about Kbuild. I appreciate your clear explanation here. I have watched the Kbuild and KConfig conversion threads in the mailing list for some time. But having been previously working with U-Boot 2010.12, this is my first experience with either. It will be useful to know they are separate in this way. Remaining problems: 1) I can't figure out how to clean my newly created derived .img file. I've tried each of the following four lines (one at a time), but none worked CLEAN_FILES += test.img CLEAN_FILES := test.img CLEAN_FILES is only available at the top-level Makefile. Add CLEAN_FILES += board/my_board/test.img to the top-level Makefile, and it should work. clean-files += test.img clean-files := test.img These are correct in sub-directory Makefiles in general, but unfortunately, make clean does not descend into board/ directory for some reason. So, they do not work in board/*/Makefile Should this be considered a bug in the build system? Should make descend into the board directory? Or, at least, should there not be a way for a board directory to indicate which of any locally generated derived objects should be cleaned up? I hesitate to add to the top level Makefile for my specific board. 2) More generally, I'd like to be able to add some arbitrary make steps that are peculiar to my boards Makefile, but I can't figure this out either, so far. I've tried adding my_all to extra-y and then adding steps for my_all, similar to the following. 8--- extra-y := test.img my_all .PHONY my_all my_all : test1.txt # some arbitrary commands to be executed if test1.txt isn't present cp -f test.txt test1.txt 8--- In this case, make reports an error make[1]: *** No rule to make target `board/my_board/my_all', needed by `__build'. Stop. make: *** [board/my_board] Error 2 Any help would be appreciated. If you want to generate board/my_board/test1.txt from board/my_board/test.txt, the board/my_board/Makefile should look like this: 8 extra-y := test1.txt $(obj)/test1.txt: $(src)/test.txt cp -f $ $@ 8 This is actually the fix for many of my problems. Prepending $(obj) and $(src) apparently allows make to see the file dependencies as I intend. ... Add the following to the top-level Makefile 8 CLEAN_FILES += board/my_board/test1.txt 8 Again, I hesitate to add to the top level Makefile. I do not think you need to use PHONY target, but if you really want use it, you can do like this. 8 __build: my_all PHONY += my_all my_all: echo Hello, World 8 As you suggest, I did not use .PHONY. This explanation might be a nice addition to the Kbuild makefile.txt. Again, thank you very much for your attention. Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Question about board-specific Makefile actions
I could still use some help with this from someone who really knows how the make system works. Tom and Simon provided hints that were helpful, as I note below. On 03/09/2015 08:34 AM, James Chargin wrote: So, is no one willing to offer a hint? Thanks, Jim On 03/03/2015 01:39 PM, James Chargin wrote: I have a custom board in a git workspace for U-Boot 2014.07. I've copied most of this from the .../board/ti/beagle. My board directory Makefile looks like 8--- obj-y := board.o 8--- I'd like to add a few files to this directory that are processed during make all and have any newly derived files deleted during make clean. I've experimented with various Makefile contents but I can't get the new files processed or any newly derived files deleted. U-Boot's makefile system is quite large for my experience level and it seems I don't have enough understanding. A new file might contain some hush commands that are to be executed from the U-Boot command line. I'd like to use source to process these commands. The source command requires that its argument be an image (I get this into memory via TFTP), so I'd like make all to transform the text file containing the hush commands into the image file. I'd also like make clean to delete the derived image file. So, if my hush commands are in a text file called test.txt, I'd like make all to apply mkimage so that a test.img is generated. I'd also like make clean to delete test.img. I tried various changes to my Makefile, but the most likely seeming changes are 8--- IMG = test.img obj-y:= board.o board.o : $(IMG) %.img : %.txt $(srctree)/tools/mkimage -T script -n $* -C none -d $ $@ CLEAN_FILES += $(IMG) CLEAN_DIRS += . 8--- This doesn't work, nor has any other approach I've taken. mkimage is never run for make all and test.img doesn't get deleted if I create a fake one and run make clean Could someone offer a solution, either directly, or by pointing at an existing board that does something similar? On 03/09/2015 08:54 AM, Tom Rini wrote: Off the top of my head, try throwing test.img into obj-y ? Adding text.img to obj-y did cause the .img file to get generated, but it also added text.img to the list of files supplied to ld, causing the final u-boot link to fail On 03/09/2015 11:49 AM, Simon Glass wrote: Also you may want to add a command like cmd_img_txt (see Makefile.lib for examples). Did you need to add anything to ALL-y? Your mention of Makefile.lib prompted my to look there for other targets I might use. I discovered extra-y and adding extra-y := test.img to my board's Makefile caused the correct operations. As you suggest, I added cmd_my_mkimage, which while not actually needed, is a very nice way to have a non-verbose progress report in the make output. Another option is to put this outside the U-Boot build system, and just run mkimage later. I really want these steps to be part of the normal board make. Requiring a separate manual build step will inevitably result in that separate step being forgotten (most probably by me). Is there any documentation you could point me at that might explain the way these Makefiles interact? I know most of this was derived from somewhere else (Linux kernel?) as part of the move to KConfig. But I have no experience with the kernel build system and following make's debug output is difficult, at best. Some overview of how makes are done would be quite helpful to me and maybe to other non-U-Boot-developers. Remaining problems: 1) I can't figure out how to clean my newly created derived .img file. I've tried each of the following four lines (one at a time), but none worked CLEAN_FILES += board/aja/helo/helo_setupdeveloper.img CLEAN_FILES += test.img CLEAN_FILES := test.img clean-files += test.img clean-files := test.img 2) More generally, I'd like to be able to add some arbitrary make steps that are peculiar to my boards Makefile, but I can't figure this out either, so far. I've tried adding my_all to extra-y and then adding steps for my_all, similar to the following. 8--- extra-y := test.img my_all .PHONY my_all my_all : test1.txt # some arbitrary commands to be executed if test1.txt isn't present cp -f test.txt test1.txt 8--- In this case, make reports an error make[1]: *** No rule to make target `board/my_board/my_all', needed by `__build'. Stop. make: *** [board/my_board] Error 2 Any help would be appreciated. Thanks, Jim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Question about board-specific Makefile actions
So, is no one willing to offer a hint? Thanks, Jim On 03/03/2015 01:39 PM, James Chargin wrote: I have a custom board in a git workspace for U-Boot 2014.07. I've copied most of this from the .../board/ti/beagle. My board directory Makefile looks like 8--- obj-y := board.o 8--- I'd like to add a few files to this directory that are processed during make all and have any newly derived files deleted during make clean. I've experimented with various Makefile contents but I can't get the new files processed or any newly derived files deleted. U-Boot's makefile system is quite large for my experience level and it seems I don't have enough understanding. A new file might contain some hush commands that are to be executed from the U-Boot command line. I'd like to use source to process these commands. The source command requires that its argument be an image (I get this into memory via TFTP), so I'd like make all to transform the text file containing the hush commands into the image file. I'd also like make clean to delete the derived image file. So, if my hush commands are in a text file called test.txt, I'd like make all to apply mkimage so that a test.img is generated. I'd also like make clean to delete test.img. I tried various changes to my Makefile, but the most likely seeming changes are 8--- IMG = test.img obj-y:= board.o board.o : $(IMG) %.img : %.txt $(srctree)/tools/mkimage -T script -n $* -C none -d $ $@ CLEAN_FILES += $(IMG) CLEAN_DIRS += . 8--- This doesn't work, nor has any other approach I've taken. mkimage is never run for make all and test.img doesn't get deleted if I create a fake one and run make clean Could someone offer a solution, either directly, or by pointing at an existing board that does something similar? Thanks Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Question about board-specific Makefile actions
I have a custom board in a git workspace for U-Boot 2014.07. I've copied most of this from the .../board/ti/beagle. My board directory Makefile looks like 8--- obj-y := board.o 8--- I'd like to add a few files to this directory that are processed during make all and have any newly derived files deleted during make clean. I've experimented with various Makefile contents but I can't get the new files processed or any newly derived files deleted. U-Boot's makefile system is quite large for my experience level and it seems I don't have enough understanding. A new file might contain some hush commands that are to be executed from the U-Boot command line. I'd like to use source to process these commands. The source command requires that its argument be an image (I get this into memory via TFTP), so I'd like make all to transform the text file containing the hush commands into the image file. I'd also like make clean to delete the derived image file. So, if my hush commands are in a text file called test.txt, I'd like make all to apply mkimage so that a test.img is generated. I'd also like make clean to delete test.img. I tried various changes to my Makefile, but the most likely seeming changes are 8--- IMG = test.img obj-y := board.o board.o : $(IMG) %.img : %.txt $(srctree)/tools/mkimage -T script -n $* -C none -d $ $@ CLEAN_FILES += $(IMG) CLEAN_DIRS += . 8--- This doesn't work, nor has any other approach I've taken. mkimage is never run for make all and test.img doesn't get deleted if I create a fake one and run make clean Could someone offer a solution, either directly, or by pointing at an existing board that does something similar? Thanks Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [off-topic] LinuxCon/ELCE 2014 presentation on Redundant booting with U-Boot
Hello Tom, I'm not sure that this question really belongs on the U-Boot mailing list but I thought others might have a similar question. I was not able to attend LinuxCon/ELCE 2014, but I was very interested in your presentation titled Redundant booting with U-Boot. Is a recording, transcript, or slide deck of the presentation available on-line so that I can examine it? I was not able to find an archive on the conference web site. Best regards, and thank you, Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [off-topic] LinuxCon/ELCE 2014 presentation on Redundant booting with U-Boot
Dear Jagan Teki, On 10/31/2014 09:28 AM, Jagan Teki wrote: On 31 October 2014 21:06, James Chargin jimccr...@gmail.com wrote: Hello Tom, I'm not sure that this question really belongs on the U-Boot mailing list but I thought others might have a similar question. I was not able to attend LinuxCon/ELCE 2014, but I was very interested in your presentation titled Redundant booting with U-Boot. Is a recording, transcript, or slide deck of the presentation available on-line so that I can examine it? I was not able to find an archive on the conference web site. I just got it on last week [1] [1] http://events.linuxfoundation.org/sites/events/files/slides/Redundancy_0.pdf thanks! Thank you for the link. This is just what I was looking for. Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Newbies list?
On 08/12/2014 11:24 PM, Hannes Petermaier wrote: Hi Frank, Well I've got to say, as a User I'd surely like to learn some new tricks from time to time. I believe this new mailing list would be the right place for it. What is happening now: my Mailbox gets full of messages, that I barely read (because they are just too many), most of those I have read then weren't useful for me at all - and I guess I unintentionally deleted many interesting mails because of this. Surely I'm not the only one doing it this way. in this case you've the possibility to switch into digest mode on the mailing-list web-page. Then you get only a few emails per day and you can have a look to the headlines and read the rest if there is something interesting. Another option might be to set up an active email filter that moves the U-Boot mailing list messages from your inbox to a different folder. I have my Thunderbird installation set up this way. I don't get interrupted for U-Boot emails and I can easily scan the email subject lines to see what I might want to read, when I have time. I've been subscribed to the list for a few years, but I consider myself a newbie in that U-Boot is not my main job. I found that after a while I had a good idea of what I should look at and what I ignore. The context of what the active developers were doing has been valuable to me. I also have asked a few pretty basic questions on the list and have found the responses to be generally helpful and (mostly) patient. Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Standalone application on secondary cores
Dear Francesco Teodoro. On 05/30/2014 01:35 PM, Francesco Teodoro wrote: I'm using a SABRE SD board (from Freescale) based on i.MX6 and the u-boot version is the 2014.04 one. What I've been trying to do is to activate the secondary cores so that I would be able to use them. First of all I've imported the commands cpu status/release/reset, then I checked if they were working in this way: U-boot cpu 1 status (which gives as result: core1 disabled ...) U-boot cpu 1 release 0x1200 0 U-boot cpu 1 status (which gives as result: core1 enabled ...) Next step was to run a standalone application on secondary cores. First I checked the hello_world application, but it seems that the serial debug for secondary cores is not set (but I'm not sure). So I wrote an application to check if I could get changes in memory. This is the simple application (I just modified the hello_world one): Please refer to http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.4. One of the first things done by the example stand alone application is to attempt to call back into U-Boot. This will not work correctly for cores other than 0. Regards, Jim Chargin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot Loop
Dang, On 04/14/2014 03:11 PM, Tran, Dang wrote: Jim, I'm using TeraTerm version 2.3. I've also occasionally used TeraTerm successfully. Usually, I use the Linux cu. I can send Ctrl-C the board. However when I'm in this looping mode I can't. I have no other ideas for you to try, I'm sorry. Perhaps, looking at the networking retry code for your version will reveal if it watches for interruption. From what you descried, version 2010.12 works and maybe I should update to a later version and see if that fixes my issue. The common advice given on the mailing list is to update to a later version. Once you are running a relatively recent version, help is more likely to be available. Since most developers on the mailing list are running something very recent, it can be difficult to help with older versions. If you are going to update, choose something more recent than 2010.12, maybe something from 2013 or 2014. Perhaps, as you hope, a newer version will fix your problem. Thanks Dang Good luck. Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com -Original Message- From: James Chargin [mailto:jimccr...@gmail.com] Sent: Monday, April 14, 2014 2:10 PM To: Tran, Dang; u-boot@lists.denx.de Subject: Re: [U-Boot] U-Boot Loop On 04/14/2014 01:11 PM, Tran, Dang wrote: Hi James, I'm using U-Boot 2010.06 (Jun 18 2013 - 14:03:16) This is a version of U-Boot that is even older than the version I used for my demonstration that ctrl-c works. (I used 2010.12) You should make efforts towards using a more recent version. What information can you provide as to the settings of your serial terminal emulator? Is it known to send your ctrl-c to the target device? Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com Thanks Dang -Original Message- From: James Chargin [mailto:jimccr...@gmail.com] Sent: Friday, April 11, 2014 9:46 AM To: u-boot@lists.denx.de; Tran, Dang Subject: Re: [U-Boot] U-Boot Loop Greetings, On 04/11/2014 09:23 AM, Tran, Dang wrote: Hi, I'm running a PowerPC board that uses U-Boot and I get into this loop (see terminal output below). It doesn't matter how I get into this loop. What I really care about is how to break out of it without manually resetting the board. Is there a way to break out of this loop and reset the system via the terminal? Ctrl-X and Ctrl-C doesn't seem to do anything. It might be helpful to know which version of U-Boot you are using. TERMINAL OUTPUT Waiting for PHY auto negotiation to complete.. TIMEOUT ! eTSEC1: No link. Speed: 1000, full duplex Using eTSEC2 device TFTP from server 192.168.128.127; our IP address is 192.168.128.128 Filename 'oe/bsp/mvme2500/vxWorks'. Load address: 0x100 Loading: T T T T T T T T T T Retry count exceeded; starting again Waiting for PHY auto negotiation to complete.. TIMEOUT ! For U-Boot builds made from official sources, ctrl-C works for me to terminate the retry TFTP, as shown = # with no Ethernet connection... = tftp 50 test.txt Waiting for PHY auto negotiation to completeuser interrupt! eTSEC1: No link. show_boot_progress(-81) boot fail = # in the above, user interrupt! was the response to ^C = = # 10.10.0.10 is known to not exist = setenv serverip 10.10.0.10 = tftp 50 test.txt Speed: 1000, full duplex Using eTSEC1 device TFTP from server 10.10.0.10; our IP address is 10.10.0.15 Filename 'test.txt'. Load address: 0x50 Loading: T T Abort show_boot_progress(-81) boot fail = # in the above, Abort was the response to ^C = Please make sure your serial communication terminal emulator correctly transmits the ctrl-C when you type it. To see if this works, get to a U-Boot prompt and type ctrl-C, you should see INTERRUPT ... ... ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot Loop
On 04/14/2014 01:11 PM, Tran, Dang wrote: Hi James, I'm using U-Boot 2010.06 (Jun 18 2013 - 14:03:16) This is a version of U-Boot that is even older than the version I used for my demonstration that ctrl-c works. (I used 2010.12) You should make efforts towards using a more recent version. What information can you provide as to the settings of your serial terminal emulator? Is it known to send your ctrl-c to the target device? Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com Thanks Dang -Original Message- From: James Chargin [mailto:jimccr...@gmail.com] Sent: Friday, April 11, 2014 9:46 AM To: u-boot@lists.denx.de; Tran, Dang Subject: Re: [U-Boot] U-Boot Loop Greetings, On 04/11/2014 09:23 AM, Tran, Dang wrote: Hi, I'm running a PowerPC board that uses U-Boot and I get into this loop (see terminal output below). It doesn't matter how I get into this loop. What I really care about is how to break out of it without manually resetting the board. Is there a way to break out of this loop and reset the system via the terminal? Ctrl-X and Ctrl-C doesn't seem to do anything. It might be helpful to know which version of U-Boot you are using. TERMINAL OUTPUT Waiting for PHY auto negotiation to complete.. TIMEOUT ! eTSEC1: No link. Speed: 1000, full duplex Using eTSEC2 device TFTP from server 192.168.128.127; our IP address is 192.168.128.128 Filename 'oe/bsp/mvme2500/vxWorks'. Load address: 0x100 Loading: T T T T T T T T T T Retry count exceeded; starting again Waiting for PHY auto negotiation to complete.. TIMEOUT ! For U-Boot builds made from official sources, ctrl-C works for me to terminate the retry TFTP, as shown = # with no Ethernet connection... = tftp 50 test.txt Waiting for PHY auto negotiation to completeuser interrupt! eTSEC1: No link. show_boot_progress(-81) boot fail = # in the above, user interrupt! was the response to ^C = = # 10.10.0.10 is known to not exist = setenv serverip 10.10.0.10 = tftp 50 test.txt Speed: 1000, full duplex Using eTSEC1 device TFTP from server 10.10.0.10; our IP address is 10.10.0.15 Filename 'test.txt'. Load address: 0x50 Loading: T T Abort show_boot_progress(-81) boot fail = # in the above, Abort was the response to ^C = Please make sure your serial communication terminal emulator correctly transmits the ctrl-C when you type it. To see if this works, get to a U-Boot prompt and type ctrl-C, you should see INTERRUPT ... Thanks Dang This email is non-binding, is subject to contract, and neither Kulicke Soffa Industries Inc nor its subsidiaries shall have any obligation to you to consummate the transactions herein or to enter into any agreement, other than in accordance with the terms and conditions of a definitive agreement if and when negotiated, finalized and executed between the parties. This sort of disclaimer in email to the U-Boot mailing list is frowned upon. Please try to eliminate it for any future postings. Best regards, Jim --- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com This email is non-binding, is subject to contract, and neither Kulicke Soffa Industries Inc nor its subsidiaries shall have any obligation to you to consummate the transactions herein or to enter into any agreement, other than in accordance with the terms and conditions of a definitive agreement if and when negotiated, finalized and executed between the parties. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] U-Boot Loop
Greetings, On 04/11/2014 09:23 AM, Tran, Dang wrote: Hi, I'm running a PowerPC board that uses U-Boot and I get into this loop (see terminal output below). It doesn't matter how I get into this loop. What I really care about is how to break out of it without manually resetting the board. Is there a way to break out of this loop and reset the system via the terminal? Ctrl-X and Ctrl-C doesn't seem to do anything. It might be helpful to know which version of U-Boot you are using. TERMINAL OUTPUT Waiting for PHY auto negotiation to complete.. TIMEOUT ! eTSEC1: No link. Speed: 1000, full duplex Using eTSEC2 device TFTP from server 192.168.128.127; our IP address is 192.168.128.128 Filename 'oe/bsp/mvme2500/vxWorks'. Load address: 0x100 Loading: T T T T T T T T T T Retry count exceeded; starting again Waiting for PHY auto negotiation to complete.. TIMEOUT ! For U-Boot builds made from official sources, ctrl-C works for me to terminate the retry TFTP, as shown = # with no Ethernet connection... = tftp 50 test.txt Waiting for PHY auto negotiation to completeuser interrupt! eTSEC1: No link. show_boot_progress(-81) boot fail = # in the above, user interrupt! was the response to ^C = = # 10.10.0.10 is known to not exist = setenv serverip 10.10.0.10 = tftp 50 test.txt Speed: 1000, full duplex Using eTSEC1 device TFTP from server 10.10.0.10; our IP address is 10.10.0.15 Filename 'test.txt'. Load address: 0x50 Loading: T T Abort show_boot_progress(-81) boot fail = # in the above, Abort was the response to ^C = Please make sure your serial communication terminal emulator correctly transmits the ctrl-C when you type it. To see if this works, get to a U-Boot prompt and type ctrl-C, you should see INTERRUPT ... Thanks Dang This email is non-binding, is subject to contract, and neither Kulicke Soffa Industries Inc nor its subsidiaries shall have any obligation to you to consummate the transactions herein or to enter into any agreement, other than in accordance with the terms and conditions of a definitive agreement if and when negotiated, finalized and executed between the parties. This sort of disclaimer in email to the U-Boot mailing list is frowned upon. Please try to eliminate it for any future postings. Best regards, Jim --- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] How can I save U-Boot env vars to HUSH shell vars.
Dear Wolfgang, With your help, I have satisfied my need. On 04/09/2014 11:52 PM, Wolfgang Denk wrote: Dear James, In message 5345d493.4080...@gmail.com you wrote: Heh. As soon as you have to change _any_ code, you can as well upgrade. I was hoping (in vain perhaps) to do my work modifying only the environment. Yes, I understand this. But I have to admit that I don't see an easy way. Hm... thinking about it, you _can_ do this, but it's a bit ugly... POC code: = print ethaddr ipaddr serverip ethaddr=00:10:ec:01:08:84 ipaddr=192.168.100.6 serverip=192.168.1.1 = echo E=$foo_ethaddr I=$foo_ipaddr S=$foo_serverip E= I= S= = setenv setvar 'setenv tmp foo_$arg=$$arg' = for arg in ethaddr ipaddr serverip ; do run setvar run tmp echo E=$foo_ethaddr I=$foo_ipaddr S=$foo_serverip done E=00:10:ec:01:08:84 I= S= E=00:10:ec:01:08:84 I=192.168.100.6 S= E=00:10:ec:01:08:84 I=192.168.100.6 S=192.168.1.1 As you can see, I'm useing a two-step approach to first constuct a command and then to run it. This consumes 2 environment variables (tmp and arg), but this should be an acceptable price... Extending this a bit further to include yet another env var, I have the following that allows a list to be saved and restored. = setenv setvar 'setenv tmp v_$arg=$$arg' = setenv usevar 'setenv t v_$arg;setenv tmp setenv $arg $$t' = And testing these: = setenv list ipaddr ethaddr list = printenv ipaddr ethaddr ipaddr=10.3.134.80 ethaddr=00:00:17:88:09:36 = = # to save = for arg in $list; do run setvar; run tmp; done = showvar HUSH_VERSION=0.01 arg=list v_ipaddr=10.3.134.80 v_ethaddr=00:00:17:88:09:36 v_list=ipaddr ethaddr list = = # simulate env default -f = setenv ethaddr; setenv ipaddr; setenv list = = # to restore (note use of v_list rather than list) = for arg in $v_list; do run usevar; run tmp; done = printenv ipaddr ethaddr list ipaddr=10.3.134.80 ethaddr=00:00:17:88:09:36 list=ipaddr ethaddr list = Perhaps this isn't as nice looking as it could be. But, it does solve the problem at hand, which has value for me. The solution boils down to two definitions in the default environment (setvar and usevar) and then a single script line to save the values and another single script line to restore them. I don't consider this addition burdensome at all. And to paraphrase a former US Sec Def, You code with the tools you have rather than with the tools you might like to have. Setting temporaries to commands that are then executed as a means to getting evaluations done when needed seems like a great addition to the bag of tricks ... The new env command allows for a lot of interesting features, ... I look forward to using these new facilities. And, I appreciate you help very much. Best regards, Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] How can I save U-Boot env vars to HUSH shell vars.
I'd like to store the values of environment variables in HUSH shell variables and then restore them later. My ultimate goal is to preserve a few environment variables through a env default -f. I'm working with U-Boot 2010.12. Changing to a newer version is not possible at this time. I realize this is a very old U-Boot. I'm hoping that the relevant parts of U-Boot have not changed between that old version and versions you might provide help for. I tried a few things and haven't found the right combination. I think the following commands demonstrate my problem. Given the U-Boot commands = setenv e e ethaddr ipaddr rootpath = = printenv e ethaddr ipaddr rootpath e=e ethaddr ipaddr rootpath ethaddr=00:00:17:88:09:36 ipaddr=10.3.134.80 rootpath=/home/anyuser/a/device/tr/rootfs = = for i in $e; do v_$i=$i; done = What I get: = showvar HUSH_VERSION=0.01 v_e=e v_ethaddr=ethaddr v_ipaddr=ipaddr v_rootpath=rootpath = What I want: = showvar HUSH_VERSION=0.01 v_e=e ethaddr ipaddr rootpath v_ethaddr=00:00:17:88:09:36 v_ipaddr=10.3.134.80 v_rootpath=/home/anyuser/a/device/tr/rootfs = So, how do I re-write the for loop to get the desired results Thanks for any help, Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] How can I save U-Boot env vars to HUSH shell vars.
Dear Wolfgang, Thank you for your reply. On 04/09/2014 02:50 PM, Wolfgang Denk wrote: Dear James, In message 5345b6ec.6050...@gmail.com you wrote: I'd like to store the values of environment variables in HUSH shell variables and then restore them later. My ultimate goal is to preserve a few environment variables through a env default -f. It is probably easier to use env export to store this set of variables to some area in memory. You could even make this permanent by writing it to flash or some storage device. I hadn't thought of exporting the environment to memory, excellent idea. I'm working with U-Boot 2010.12. Changing to a newer version is not possible at this time. Heh. As soon as you have to change _any_ code, you can as well upgrade. I was hoping (in vain perhaps) to do my work modifying only the environment. I realize this is a very old U-Boot. I'm hoping that the relevant parts of U-Boot have not changed between that old version and versions you might provide help for. Well, a ton of bug fixes and improvements have been added since. One of the extensions you want and which has been added only after v2010.12 is the capability to export only a sub-set of the environment (i. e. a list of variables passed on the command line). This is a definite drawback to having an old U-Boot; I'm sure I would benefit from the bug fixes and other enhancements. Exporting a list of values sounds like a nice addition that would be helpful to me. = for i in $e; do v_$i=$i; done ... What I get: ...is exactly what you coded. You would get the same in any other shell, too. = showvar HUSH_VERSION=0.01 v_e=e ethaddr ipaddr rootpath v_ethaddr=00:00:17:88:09:36 v_ipaddr=10.3.134.80 v_rootpath=/home/anyuser/a/device/tr/rootfs = So, how do I re-write the for loop to get the desired results This would require an eval or command substitution, which we do not have in our implementation of the hush shell. eval seemed to me also to be what I wanted. I'm aware it isn't present in hush, but I was hoping for some magic from the community. :-) To me it seems the easiest way to get what you want is to use env export ... ethaddr ipaddr rootpath or similar. I suppose, with my 2010.12, I could export everything to memory and then parse through it to find the values I need then import them. Sounds vaguely possible but it's probably more complex than doing the U-Boot upgrade. Um... yes, this requires an update to more recent code. Yes, update is on my to-do list, but schedules dictate that the upgrade is not my first priority. The conclusion reached here adds to the argument for doing it sooner rather than later. Best regards, Wolfgang Denk Thank you again for you comments. Jim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot - timestamp
I have used information from the following to get a timestamped log of each message output by U-Boot. I imagine there is more discussion of this on the U-Boot wiki, http://www.denx.de/wiki/U-Boot/WebHome. http://u-boot.10912.n7.nabble.com/U-Boot-Users-decrease-boot-time-td91840.html Good luck and best regards, Jim On 02/10/2014 04:48 AM, Abdullah YILDIZ wrote: Sorry for the missing detail. I want to measure how long a specific process takes. For example, [3814526.197336] message-1 [3814527.234145] message-2 abdullah On Monday, February 10, 2014 2:08 PM, Albert ARIBAUD albert.u.b...@aribaud.net wrote: Hi Abdullah, On Mon, 10 Feb 2014 03:25:51 -0800 (PST), Abdullah YILDIZ yildiz.abdul...@yahoo.com wrote: I have a custom board which uses u-boot-1.3.3. I want to add timestamp information during booting. Do I have to use a patch for this? Note sure what exactly you mean by timestamp information, but AFAIR, each build of U-Boot includes the build date and time. abdullah Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Stack size
Dear Parimala Baggiri, I am able to provide a bit more information, based on your reply. Please forgive my assumption that you are even less familiar with U-Boot internals than I am. Again, I'm writing about the Freescale SOCs, undoubtedly ARM processors do some things differently. I hope my comments about my processors might lead you to the appropriate code for yours. Also, I should mention that I'm referring to a fairly old version of U-Boot and it is possible that things related to DDR layout have changed for newer versions. On 12/26/2013 09:37 PM, Parimala Baggiri wrote: Hello James, Thank you for the detailed explanations On Thu, Dec 26, 2013 at 8:13 PM, James Chargin jimccr...@gmail.com mailto:jimccr...@gmail.com wrote: I work with Freescale e300 and e500 SOCs, other processors may do things a bit differently. U-Boot places several things in very high RAM. leaving the lower areas of RAM available for loading the OS and/or application(s). The stand alone application uses the U-Boot stack; it does not have its own. For Freescale processors, the stack grows from higher addresses to lower. Among the several things U-Boot places in upper RAM are the RAM-based copy of U-Boot itself, the video display buffer (if used) and the stack used by U-Boot and any stand alone application. This will require around a few megabytes of RAM storage. In my case RAM-based copy of u-boot is mapped to 0x80E8(CONFIG_SYS_TEXT_BASE), which is not the upper RAM location. Is upper RAM means the last few megabytes of the total capacity? The stack is located below all other items placed in RAM by U-Boot and so is limited to the remaining size of RAM (less the amount of space needed by the OS or the stand alone application, usually in the very lowest address range). In my experience, this is an unusually large area for a stack; I've never gotten anywhere close to an overflow. In my case, U-Boot sets up the SDRAM allocations in the function board_init_f(), found in .../u-boot/arch/powerpc/lib/board.c. I assume there is a similar file and function for ARM. board_init_f() determines which things get put, and in which locations, in DDR. Following is a list, in decreasing address order, of things allocated in DDR hidden RAM kernel log buffer (optional) protected RAM (optional) video and/or LCD framebuffer (optional) U-Boot heap (for malloc) board info structure global data structure stack A similar procedure must be followed for ARM but I haven't looked at the details. In my case, there is a debug message that can be enabled that displays the location at which the stack is installed (Enable debug messages by adding #define DEBUG at the top of the file containing the message of interest. Then rebuild U-Boot). Can you supply more information about why you are asking about increasing stack size? Have you encountered a situation which seems to indicate a stack overflow? In my standalone application, some debugging messages(printfs) are added, which are not printing in one function and even the application is not terminating for any reason. Hence, suspecting the stack size. It might be possible from the debug messages in board_init_f() and from knowing where the stand alone application is placed in DDR (and how big it is) to make a better determination about how likely an overflow is. It might also be possible to do something like 1) Clear the DDR where the stand alone app is to be placed with a known value (mw command). The cleared area should extend beyond where the stand alone app is location. You should be able to examine memory (md command) after the stand alone is loaded, but before it is run, and clearly see the end of the stand alone code and the start of the known value. 2) Load and run the stand alone app. From what you've said, I presume this results in a reset being required. For me, when U-Boot starts, it doesn't clear DDR and if the DDR isn't power cycled, it should maintain its value through a reset. 3) Reset the board. 4) Examine DDR where the end of the stand alone is supposed to be (md command) and see if memory beyond this point has the known value in it. If not, this is a possible indication that overflow did occur. What processor and board are you interested in? Here are my processor details, Panda board ES which uses OMAP4460 processor, 4GB SDRAM, starts at 0x8000. 4 GiB is certainly enough RAM that you should be able to find a way to avoid any stack overflow. One other thing you could consider doing, is changing CONFIG_SYS_TEXT_BASE. This could leave a bigger area between where the stack starts and where the stand alone application gets loaded. Good luck if you try this; I myself am a bit too timid to try changing a CONFIG_SYS_ constant. Perhaps someone with more detailed knowledge of ARM can comment
Re: [U-Boot] Stack size
Dear Parimala Baggiri, To add a bit of context to Wolfgang Denk's reply... I work with Freescale e300 and e500 SOCs, other processors may do things a bit differently. U-Boot places several things in very high RAM. leaving the lower areas of RAM available for loading the OS and/or application(s). The stand alone application uses the U-Boot stack; it does not have its own. For Freescale processors, the stack grows from higher addresses to lower. Among the several things U-Boot places in upper RAM are the RAM-based copy of U-Boot itself, the video display buffer (if used) and the stack used by U-Boot and any stand alone application. This will require around a few megabytes of RAM storage. The stack is located below all other items placed in RAM by U-Boot and so is limited to the remaining size of RAM (less the amount of space needed by the OS or the stand alone application, usually in the very lowest address range). In my experience, this is an unusually large area for a stack; I've never gotten anywhere close to an overflow. Can you supply more information about why you are asking about increasing stack size? Have you encountered a situation which seems to indicate a stack overflow? What processor and board are you interested in? Best regards, Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com On 12/24/2013 02:11 PM, Wolfgang Denk wrote: Dear Parimala Baggiri, In message CAD6P=4hwjgozdwzhbk00fvgypry63sm4erexgpufsjpihd9...@mail.gmail.com you wrote: How to increase the user mode stack size which will be used by the standalone application in u-boot? Add more system RAM. Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot gerrit server
Is there an existing mailing list for some other open source project that uses a gerrit server in something like what would be a model for the way U-Boot would use it? It might be instructive to watch that list to see how the interaction with the developers goes. Thanks, Jim On 11/14/2013 03:43 PM, Vadim Bendebury (вб) wrote: On Thu, Nov 14, 2013 at 1:17 PM, Tom Rini tr...@ti.com wrote: On Thu, Nov 14, 2013 at 12:59:05PM -0800, Vadim Bendebury () wrote: On Thu, Nov 14, 2013 at 11:54 AM, Tom Rini tr...@ti.com wrote: On Tue, Nov 12, 2013 at 11:46:35AM -0800, Vadim Bendebury () wrote: Hello Wolfgang, [snip] Can you not pick up the patches directly from the mailing list? I mean, we know of the problems patchwork has (like silently dropping certain base64 / utf8 encoded messages), so we should rather try and get a more reliable feed for the patches? this is the thing: picking up patches from patchwork is not something you'd do regularly - this is just my way of populating the review site from a single test account. If this workflow were adopted, each user would push their patch to the gerrit server, creating a new review branch for that particular patch. In general, gerrit view of the branch matches the submitter's view of the branch - if the submitter has several patches in one branch, they will all be uploaded by gerrit to the same separate branch, maintaining the relationship between the patches. This is my biggest concern. On the one-off to infrequent contribution side (and we do have some of that), I worry about the infrastucture hurdle here. Sorry, I am not sure i understand what the biggest concern is: that the users would push their own patches? Why is this a problem - the patches would go into their own branches until reviewed and merged. Or did you mean something else? I mean, it's a higher hurdle to clear. Looking at other non-Android projects, I know some folks have said bah, not worth the effort to push trivial things, if it must come via gerrit. So some way to scrape the ML for things that don't come in via gerrit to start with would be handy. I guess if the submitters are still expected to do both, ML and gerrit, then yes, but the idea is that gerrit is the way to go, mailing list is whatever gerrit generates. This way sending an email to the mailing list or running 'git push' require pretty much similar efforts and BTW, I should have mentioned this earlier, there is a linux command line based utility to manipulate patch states on the gerrit server, I put its help output here: http://pastie.org/8481244 On the other side, what is the gerrit equivalent of 'git send-email --compose ...', and I'm focusing on the compose side here. Or is it just another mental switch the project makes, from that to push to gerrit / compose email saying hey, look at this This is how we usually do this: - upload all patches to gerrit - go to the web interface of the first patch in the series (by this time gerrit would have a stack of patches showing their dependencies), click on review - at this point gerrit would open a form to type the cover message in - once you finish composing the message you click on publish comments and it gets sent to everybody who was picked as the reviewer, and to default addresses, if any are configured (which of course could be u-boot@lists.denx.de, for instance) Right, and at that point we've mixed discussion of a concept with discussion of a particular change, and we're in web-only for writes. I guess (pending see below) one could just write the 0/N email separate, or in-reply-to 1/N, so that the concept discussion stays on the list and in the archives and so on. Once thing I have to mention: gerrit is notorious for sending tons of email, while this is being worked on, in the meantime some more rigorous email filtering might be very useful. Just how hard is it likely to be to filter things so that only: 1) new patches 2) reviews get sent to the ML? It is not hard, it's just a pain that it has to be done by every recipient (as opposed to cutting the emails on the server). We are working with gerrit community on that, but it goes quite slow. Any one can upload patches to this server after creating an account on it. Any Google account will do, or if you don't want to have a Google based email you can create the account using your existing email. Follow the prompts after clicking on 'Sign in' link on the top right. Is my understanding correct that I have to use or create a google account in any case to participate in this type of work? What if I am not willing to accept Google's Terms of Service, or to register an account with google for other reasons? This is correct, if you decide to use the google infrastructure based server. But you don't have to, gerrit is a stand alone application which can be easily installed on the same server or on a different server in the same location where the master u-boot git server is, with
Re: [U-Boot] [PATCH] cmd_nvedit.c: Add env exists command
Dear Andrew Ruder, On 10/22/2013 05:07 PM, Andrew Ruder wrote: env exists is a way to test (in hush) if an environment variable exists. A workaround existed using printenv but this new command doesn't require all the stdout/stderr redirection to prevent printing information to the screen. I was aware of the printenv workaround, and have used it. I share your misgivings about the stdout/stderr redirection, it seems clumsy, at best. I have, more recently, been using scripting of the form if test X != X${var}; then echo defined else echo undefined fi Example: $ set testexists 1 $ env exists testexists echo yes yes $ env exists testexists || echo no $ set testexists $ env exists testexists echo yes $ env exists testexists || echo no no $ I've often thought that a env exists command might be a nice, consistent, addition. Thanks for adding it. Jim Signed-off-by: Andrew Ruder andrew.ru...@elecsyscorp.com --- README | 1 + common/cmd_nvedit.c | 23 +++ 2 files changed, 24 insertions(+) diff --git a/README b/README index 09662a4..0718459 100644 --- a/README +++ b/README @@ -843,6 +843,7 @@ The following options need to be configured: CONFIG_CMD_ELF * bootelf, bootvx CONFIG_CMD_ENV_CALLBACK * display details about env callbacks CONFIG_CMD_ENV_FLAGS* display details about env flags + CONFIG_CMD_ENV_EXISTS * check existence of env variable CONFIG_CMD_EXPORTENV* export the environment CONFIG_CMD_EXT2 * ext2 command support CONFIG_CMD_EXT4 * ext4 command support diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index ba9ba16..0d4d02c 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -1059,6 +1059,23 @@ sep_err: } #endif +#if defined(CONFIG_CMD_ENV_EXISTS) +static int do_env_exists(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) +{ + ENTRY e, *ep; + + if (argc 2) + return CMD_RET_USAGE; + + e.key = argv[1]; + e.data = NULL; + hsearch_r(e, FIND, ep, env_htab, 0); + + return (ep == NULL) ? 1 : 0; +} +#endif + /* * New command line interface: env command with subcommands */ @@ -1094,6 +,9 @@ static cmd_tbl_t cmd_env_sub[] = { U_BOOT_CMD_MKENT(save, 1, 0, do_env_save, , ), #endif U_BOOT_CMD_MKENT(set, CONFIG_SYS_MAXARGS, 0, do_env_set, , ), +#if defined(CONFIG_CMD_ENV_EXISTS) + U_BOOT_CMD_MKENT(exists, 2, 0, do_env_exists, , ), +#endif }; #if defined(CONFIG_NEEDS_MANUAL_RELOC) @@ -1136,6 +1156,9 @@ static char env_help_text[] = #if defined(CONFIG_CMD_EDITENV) env edit name - edit environment variable\n #endif +#if defined(CONFIG_CMD_ENV_EXISTS) + env exists name - tests for existence of variable\n +#endif #if defined(CONFIG_CMD_EXPORTENV) env export [-t | -b | -c] [-s size] addr [var ...] - export environment\n #endif -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Problem with stand-alone apps
On 08/28/2013 08:07 AM, ANDY KENNEDY wrote: All, In an effort to play by the rules, we created a stand alone app that handles breaking the boot process with bootdelay set to 0. We require a special key sequence to break into the boot process to ensure security, and to ensure we do not interrupt the boot process with stray key strokes. We are seeing strange behavior from our applet. There are several API calls that we make from within the app that seem to make our processor go into a code violation error (even something as simple as a printf). I'm using a much older version of U-Boot (2010.12) for the P1022. I was seeing some flakiness a while back. My problems were solved when I started using bootm to start my stand alone application, rather than go. I don't know if this might be your problem but I thought it better to provide an attempt at help rather than nothing. This change was prompted by an extended mailing list discussion starting with an email from York Sun on 19Mar2013 (Message-ID: 1363724992-9803-1-git-send-email-york...@freescale.com). I added some short sections to the wiki about my experiences. See http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.3. Jim It seems that things were working better in 2010.12. We chose to move to 2013.04 for some additional fixes that we saw were pushed in by Freescale. BTW, this is also similar to my previous e-mail thread that I started a month or so ago in which I stated there was general flakiness. We are reasonably confidant that our timing for our NOR flash is correct. Likewise, for our DDR3. Both of these sets of parameters were done with the aid of Freescale themselves (given the tool they were using this is unlikely). Anyone else use the stand alone applications in 2013.04 successfully? Thanks, Andy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Documentation review request: Cache management and stand alone application
Based on some recent mailing list discussions about cache management for stand alone applications, and on my own recent experience, I've made two small additions to the documentation wiki. Since I can't find any procedure for having this work reviewed, I'm asking for a review here. Please see the new sections, _5.12.3. Processor cache considerations_ and _5.12.4 Running on core other than core 0_, at http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.3. and http://www.denx.de/wiki/view/DULG/UBootStandalone#Section_5.12.4., respectively. If there is a standard review process for the wiki that I have not seen, I'd appreciate a pointer. I'll be happy to retroactively make any adjustments needed. My additions reflect my concerns with the MPC85xx (P1022) which I am working with. I would not be surprised in the least if the discussion I have provided apply poorly for other architectures. Thank you and best regards, Jim -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [U-boot] shell script syntax
Try something like = for i in a b c; do echo $i done a b c = Regards, Jim On 07/22/2013 04:44 AM, tiger...@viatech.com.cn wrote: Hi, Albert: Did you try the commands live in your U-Boot console? Did you make sure hush shell is enabled in your U-boot? I am sure I have enabled hush shell. I think for iteration syntax is error: for(i=1;i10;i++) But I don't know how to write it correctly! Best wishes, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Jim Chargin AJA Video Systems j...@aja.com (530) 271-3334 http://www.aja.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] u-boot script test
In message 1327404627.60813.yahoomail...@web120202.mail.ne1.yahoo.com For now i got around this problem with a negative test set x if test $x != 1 then echo No; else echo Yes; fi with this if x is not present i get No, even in the case when x is present and set any other value (not 1) when i do set x 1 and run the test again i get Yes Thanks Sridhar I've experienced a similar situation. For now, I'm using U-Boot 2010.12. I want to test existence of environment var without any console output about the result, only control of conditional statement. I've found that the following provides what I need, even though it is a bit hackish. My configuration defines CONFIG_SYS_DEVICE_NULLDEV so I can redirect stdout and hide console output during existence testing. = setenv stderr nulldev = if printenv a; then echo yes; else echo no;fi ## Error: a not defined no = coninfo List of available devices: serial 8003 SIO stdin stdout nulldev 8003 SIO stderr This seems a bug, the error message goes to stdout, rather than stderr; but you decide how you think error messages should work. To work with this as it is: = setenv t 'setenv stdout nulldev;if printenv a; then setenv stdout serial; echo set; true; else setenv stdout serial;echo not set;false; fi' = = printenv a ## Error: a not defined = run t not set = setenv a 1 = run t set = run t echo 2 set 2 = setenv a = run t echo 2 not set = Notice that use of printenv does not expand the environment variable so there is never any issue with what that expands to. If the hush shell is present, a hush variable can be used as a parameter to the testing script = setenv t 'setenv stdout nulldev;if printenv $var;then setenv stdout serial;true;else setenv stdout serial;false;fi' = = setenv b = if var=b;run t; then echo yes; else echo no; fi no = setenv b 1 = if var=b;run t; then echo yes; else echo no; fi yes = I hope this is helpful. Jim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot