Re: [U-Boot] Compiling fw_printenv tool
On 2014.01.17. 16:30, Detlev Zundel wrote: Hi Alexey, [...] I've googled it and sorted it out. The problem was that executable was dynamically linked and the *.so was not found on the embedded system. I compiled it with -static and it runs. I'm glad you solved the problem. I only like for such answers to show up in archives so that other people can profit from the answer in DuckDuckGo searches yet to come ;) Cheers Detlev In case someone needs that (before the Makefile changes are accepted), I used the make HOSTCC='arm-none-linuex-gnueabi-gcc -static' env command to get it working. Best regards, Alexey ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Compiling fw_printenv tool
Hello Detlev, On 2014.01.14. 12:54, Detlev Zundel wrote: Hi Alexey, Dear Detlev, I ran $ make HOSTCC=arm-none-linux-gnueabi-gcc env and got the tools/env/fw_printenv executable. But the Make command returned error: strip: Unable to recognise the format of the input file `fw_printenv' make[1]: *** [fw_printenv] Error 1 I guess, HOSTSTRIP variable also has to be set. However, I uploaded the unstripped executable to my embedded device, and ran: $ chmod a+x fw_printenv $ ./fw_printenv -sh: ./fw_printenv: not found I tried also manually stripping the executable. What could be this error related to? Oops, I really missed that mail, sorry. This error message means that your cross-compiled binary does not run on the embedded device (maybe the device uses different libraries than your cross toolchain links agains). To troubleshoot that, start with a regular "hello-world.c" and continue to fw_printenv only if you have this working. Cheers Detlev I've googled it and sorted it out. The problem was that executable was dynamically linked and the *.so was not found on the embedded system. I compiled it with -static and it runs. Best regards, Alexey ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Creating U-Boot env image
Hello Mats, On 2013.12.10. 15:33, Mats Kärrman wrote: On: Tuesday, December 10, 2013 1:32 PM, Alexey Smishlayev wrote: I'm not sure, if that's not something simple, that's why I wrote to this list. I just don't know every little detail about using U-Boot. I was thinking something like: [flash-sector-size] <= [U-Boot-configured-env-size] and you must give the right number to the env image generation program. That's what I've thought also - if I just dd the environment contents to a file, can I then use it as a valid image for production? That could be the most simple way to achieve what I want. Yes, should be possible. If you're using redundant environments, you probably want to use the env copy that has "0x01" in the 5:th byte. See common/env_flash.c and include/environment.h. Thank you, I will check that. How can I see if I'm compiling U-Boot with redundant environment, or not? Best regards, Alexey ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Creating U-Boot env image
Hello, Mats, On 2013.12.10. 13:39, Mats Kärrman wrote: Hi Alexey, I can definitely see the use case in producing a complete flash image, e.g. for production use and maybe be able to select the env image from one of many depending on some factor. Yes, the use case is exactly as you described. What you describe should definitely be possible. Are you sure that it's not something simple like a missmatch in env size? I'm not sure, if that's not something simple, that's why I wrote to this list. I just don't know every little detail about using U-Boot. You could use U-Boots Linux fw_printenv tools and/or dd to read the flashed env image and perhaps compare it to an image saved by U-Boot to figure out what is going wrong. That's what I've thought also - if I just dd the environment contents to a file, can I then use it as a valid image for production? That could be the most simple way to achieve what I want. Best regards, Alexey Smishlayev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Creating U-Boot env image
Dear Wolfgang Denk, On 2013.12.09. 22:12, Wolfgang Denk wrote: Dear Alexey Smishlayev, In message <52a5d4f1.7020...@xtech2.lv> you wrote: What should I do to flash environment values directly to the board's NAND? Why don't you just use "env import"? I didn't have any information about that. Also, I would like to get done without entering the U-Boot prompt. I am flashing my board using the J-TAG - USB cable, and it will be much more simple and convenient if I'd be able to just write the binary images on the NAND flash. So, there is no way to do something like that straight away? Best regards, Alexey Smishlayev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Creating U-Boot env image
Hello! I would like to flash the environment variable values to my board, rather than setting them at the prompt. I've founa a tool mkenvimage is made specially for that. I used it to create a binary image of the U-Boot environment. However, when I flash it to my board, I get the message *** Warning - bad CRC, using default environment I thought it is due to that redundant memory wasn't written aswell, so I commented out #define CONFIG_ENV_REDUND_OFFSET in the include/configs/at91sam9g20ek.h, and tried once again, but I'm still getting this error. What should I do to flash environment values directly to the board's NAND? Best regards, Alexey Smishlayev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Compiling fw_printenv tool
Dear Detlev, I ran $ make HOSTCC=arm-none-linux-gnueabi-gcc env and got the tools/env/fw_printenv executable. But the Make command returned error: strip: Unable to recognise the format of the input file `fw_printenv' make[1]: *** [fw_printenv] Error 1 I guess, HOSTSTRIP variable also has to be set. However, I uploaded the unstripped executable to my embedded device, and ran: $ chmod a+x fw_printenv $ ./fw_printenv -sh: ./fw_printenv: not found I tried also manually stripping the executable. What could be this error related to? Best regards, Alexey Smishlayev On 2013.11.29. 13:17, Detlev Zundel wrote: Hi Alexey, I'm trying to compile fw_printenv, to work with U-Boot environment variables under my linux os. I'm using commands: $ cd u-boot/ $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- env The tool compiles successfully, I get the executable under u-boot/tools/env/fw_printenv, but it seem to be compiled for my host machine. On my device it says: # ./fw_printenv: line 1: syntax error: "(" unexpected How do I cross compile it for my embedded system? Do I just set the HOSTCC environment variable in the Makefile? No changes in any makefiles are needed, just do make HOSTCC=arm-none-linuex-gnueabi-gcc env We should really turn this into an documentation item. Does anybody hava a good idea where to put it? Cheers Detlev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Compiling fw_printenv tool
Hello! I'm trying to compile fw_printenv, to work with U-Boot environment variables under my linux os. I'm using commands: $ cd u-boot/ $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- env The tool compiles successfully, I get the executable under u-boot/tools/env/fw_printenv, but it seem to be compiled for my host machine. On my device it says: # ./fw_printenv: line 1: syntax error: "(" unexpected How do I cross compile it for my embedded system? Do I just set the HOSTCC environment variable in the Makefile? Best regards, Alexey Smishlayev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Compiling U-Boot
Dear Andreas Bießmann, On 2013.11.27. 15:39, Andreas Bießmann wrote: crt0.S:70 subtracts the GD_SIZE from current stack pointer. The code written seems to miss the Rn according to [1]. Could you please test to change it from to: 'sub sp, sp, #GD_SIZE'? Yes, thank you! Now it successfully compiles crt0.S. Although, I get another error later on the compilation: cd /home/alexey/xtech2/u-boot-2013.10 && /usr/local/arm/gcc-4.2.3-glibc-2.3.3/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-ld -pie -T u-boot.lds --gc-sections -Bstatic -Ttext 0x21f0 arch/arm/cpu/arm926ejs/start.o --start-group api/libapi.o arch/arm/cpu/arm926ejs/at91/libat91.o arch/arm/cpu/arm926ejs/libarm926ejs.o arch/arm/lib/libarm.o common/libcommon.o disk/libdisk.o drivers/bios_emulator/libatibiosemu.o drivers/block/libblock.o drivers/crypto/libcrypto.o drivers/dfu/libdfu.o drivers/dma/libdma.o drivers/fpga/libfpga.o drivers/gpio/libgpio.o drivers/hwmon/libhwmon.o drivers/i2c/libi2c.o drivers/input/libinput.o drivers/misc/libmisc.o drivers/mmc/libmmc.o drivers/mtd/libmtd.o drivers/mtd/nand/libnand.o drivers/mtd/onenand/libonenand.o drivers/mtd/spi/libspi_flash.o drivers/mtd/ubi/libubi.o drivers/net/libnet.o drivers/net/phy/libphy.o drivers/pci/libpci.o drivers/pcmcia/libpcmcia.o drivers/power/battery/libbattery.o drivers/power/fuel_gauge/libfuel_gauge.o drivers/power/libpower.o drivers/power/mfd/libmfd.o drivers/power/pmic/libpmic.o drivers/rtc/librtc.o drivers/serial/libserial.o drivers/sound/libsound.o drivers/spi/libspi.o drivers/tpm/libtpm.o drivers/twserial/libtws.o drivers/usb/eth/libusb_eth.o drivers/usb/gadget/libusb_gadget.o drivers/usb/host/libusb_host.o drivers/usb/musb-new/libusb_musb-new.o drivers/usb/musb/libusb_musb.o drivers/usb/phy/libusb_phy.o drivers/usb/ulpi/libusb_ulpi.o drivers/video/libvideo.o drivers/watchdog/libwatchdog.o fs/cbfs/libcbfs.o fs/cramfs/libcramfs.o fs/ext4/libext4fs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o fs/libfs.o fs/reiserfs/libreiserfs.o fs/sandbox/libsandboxfs.o fs/ubifs/libubifs.o fs/yaffs2/libyaffs2.o fs/zfs/libzfs.o lib/libfdt/libfdt.o lib/libgeneric.o lib/lzma/liblzma.o lib/lzo/liblzo.o lib/rsa/librsa.o lib/zlib/libz.o net/libnet.o post/libpost.o test/libtest.o board/atmel/at91sam9260ek/libat91sam9260ek.o --end-group /home/alexey/xtech2/u-boot-2013.10/arch/arm/lib/eabi_compat.o -L /usr/local/arm/gcc-4.2.3-glibc-2.3.3/arm-unknown-linux-gnu/lib/gcc/arm-unknown-linux-gnu/4.2.3 -lgcc -Map u-boot.map -o u-boot /usr/local/arm/gcc-4.2.3-glibc-2.3.3/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-ld: -static and -shared may not be used together make: *** [u-boot] Error 1 Any clues on how to correct this one? Best regards Alexey Smishlayev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Compiling U-Boot
Hello! I would like to compile U-Boot with custom configuration. I downloaded source from the master git repository (http://git.denx.de/?p=u-boot.git;a=summary). I am trying to compile using following commands: $ cd u-boot/ $ make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- at91sam9g20ek_nandflash_config $ make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnu- all It goes on for a while, and then I get the error: crt0.S: Assembler messages: crt0.S:70: Error: register expected, not '#(184)' -- `sub sp,#(184)' make[1]: *** [crt0.o] Error 1 make[1]: Leaving directory `/root/u-boot/arch/arm/lib' make: *** [arch/arm/lib/built-in.o] Error 2 The "arm-unknown-linux-gnu-" is a toolchain prefix for my devboard. I am trying to compile on 64bit Ubuntu computer. I have also tried 32bit debian lenny virtual machine. Can I correct this error or is there something I am doing wrong? Best regards, Alexey Smishlayev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot