[U-Boot-Users] [PATCH] add output of 'size' to build

patch adds a call to the appropriate version of 'size' and prints output like so during make:
cd /home/adyer/Projects/u-boot && arm-linux-size u-boot text data bss dec hex filename 128878 7843 20532 157253 26645 u-boot
just before making the srec and bin versions. I find it handy to keep track of how big things are getting.
Signed-off-by: Andrew Dyer amdyer@gmail.com

In message c166aa9f0702261446g2f449c7bmfe0f76492ac76b94@mail.gmail.com you wrote:
patch adds a call to the appropriate version of 'size' and prints output like so during make:
cd /home/adyer/Projects/u-boot && arm-linux-size u-boot text data bss dec hex filename 128878 7843 20532 157253 26645 u-boot
NAK.
This patch violates the rule that "make -s" must not produce any output for succcesful builds.
Best regards,
Wolfgang Denk

On 2/26/07, Wolfgang Denk wd@denx.de wrote:
NAK.
This patch violates the rule that "make -s" must not produce any output for succcesful builds.
OK. New version is attached that tests for the silent flag and omits running the command if it is set. If you would, maybe add a comment at the top of the makefile with a note about the silent flag.

In message c166aa9f0702261642q5b2eab1bo852502891af43847@mail.gmail.com you wrote:
OK. New version is attached that tests for the silent flag and omits running the command if it is set. If you would, maybe add a comment at the top of the makefile with a note about the silent flag.
One more question. You're just duplicating the function of the MAKEALL script. Is there any reason you cannot use this instead?
Frankly, I don't think this belongs into the standard make output.
Best regards,
Wolfgang Denk

On 2/26/07, Wolfgang Denk wd@denx.de wrote:
One more question. You're just duplicating the function of the MAKEALL script. Is there any reason you cannot use this instead?
I don't usually run MAKEALL, I didn't even notice it in there.
Frankly, I don't think this belongs into the standard make output.
It would have been nice had you mentioned it before I took the time to fix the patch...

Hi, I want to write a function like check_iamge(char * iamgefile) which
Returns 0 if the image file is in u-boot image format and validated by CRC checksum. Otherwise it returns non-zero error number. So someone can help me how to write this function. I am using X86_64 2.16.X Fedora 5. and UBoot 1.1.6. Thanks in advance. Suhas
--------------------------------- Have a burning question? Go to Yahoo! Answers and get answers from real people who know.

Hi Suhas,
On 27.02.2007 03:45, MoonMoon Ghosh wrote:
Hi, I want to write a function like check_iamge(char * iamgefile) which returns 0 if the image file is in u-boot image format and validated by CRC checksum. Otherwise it returns non-zero error number. So someone can help me how to write this function. I am using X86_64 2.16.X Fedora 5. and UBoot 1.1.6.
There already is such a funtion in U-Boot. It is invoked when using the command "iminfo" and provides a return value which can be processed by (Hush) shell scripts. For an example, see:
http://www.denx.de/wiki/view/DULG/CommandLineParsing
Content-Type: text/html; charset=iso-8859-1
Please don't post HTML on this list.
Regards, Daniel

Hi, Thank you very much Daniel for your information. But My requirement is quite different.I know the use if iminfo and mkimage but I can not use those commands. Actually I have to test the Uboot kernel Image(checking of crc and other many other fields) from my fedora 5 through a c program in which kernel image file need to be passed as command line argument.I can use the header files of Uboot source code like image.h and common.h and also the c code of Uboot source but I have to write my own program and need to compile using gcc. I am trying with the source of mkimage.c but I want also the source of iminfo but I can not find it. Hope my problem is now clear. Want valuable information and advice from you. Thanking you in advance. Suhas
--------------------------------- Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

In message 332616.23043.qm@web57712.mail.re3.yahoo.com you wrote:
But My requirement is quite different.I know the use if iminfo and mkimage but I can not use those commands. Actually I have to test the Uboot kernel Image(checking of crc and other many other fields) from my fedora 5 through a c program in which kernel image file need to be passed as command line argument.I can use the header files of Uboot source code like image.h and common.h and also the c code of Uboot source but I have to write my own program and need to compile using gcc.
"mkimage -l" will do this for you. Don't reinvent the wheel.
I am trying with the source of mkimage.c but I want also the source of iminfo but I can not find it.
Use grep.
Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Stop posting HTML!!!
Best regards,
Wolfgang Denk

HI, Thank you very much Denk and Cohen for your response and valuable information. Extremelly sorry for posting HTML message. My requirements don't allow me to use iminfo or mkimage -i so I have to write my own code but I can use code and headers from UBoot source. I have also got the code of iminfo but then also getting problem in these two lines- addr = simple_strtoul(argv[1],NULL,16); here what is argv[1]? and memmove(hdr,(char *)addr, sizeof(image_header_t)); I am getting segmentation fault in the above line.
I want to pass the Uboot kernel image as command line argument and check its header info. Hope to receive your useful and important advice.
Thanking you in advance. Suhas Ghosh Laser5 Co Ltd. Tokyo Japan.
____________________________________________________________________________________ The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

In message 423675.69544.qm@web57709.mail.re3.yahoo.com you wrote:
use code and headers from UBoot source. I have also got the code of iminfo but then also getting problem in these two lines- addr = simple_strtoul(argv[1],NULL,16); here what is argv[1]?
I'm afraid you need a basic understanding of the C programming language before you can handle such a task.
Best regards,
Wolfgang Denk

Hi, Thank you very much Denk for your response. I have already solved the problem today.I used the source code from Uboot source(image.h and crc32.c) and create my own code though I modified crc32.c It is working well.My code tests for ARM cpu and linux kernel image. I am giving my sample test result.
[suhas@l5ac197 Imagecheck]$ gcc -o ucheck Sample.c [suhas@l5ac197 Imagecheck]$ ./ucheck uImage
-----Kernel Image Information--------- Correct Magic Number-- crc check is OK Kernel Image Type=2 Correct image type!! Cpu Arch=2 Correct cpu architecture type!! OS type=5 Correct os type!! Compression Type=1 Correct compression type!! ---------------------------------- <Check Pass> [suhas@l5ac197 Imagecheck]$ ./ucheck uImage2
-----Kernel Image Information--------- Correct Magic Number-- crc is OK Kernel Image Type=2 Correct image type!! Cpu Arch=7 Bad architecture type
OS type=5 Correct os type!! Compression Type=1 Correct compression type!! ---------------------------------- <Check Fail> [suhas@l5ac197 Imagecheck]$ ./ucheck uImage3
-----Kernel Image Information--------- Correct Magic Number-- crc is OK Kernel Image Type=2 Correct image type!! Cpu Arch=7 Bad architecture type
OS type=5 Correct os type!! Compression Type=1 Correct compression type!! ---------------------------------- [suhas@l5ac197 Imagecheck]$ ./ucheck uImage3bad
-----Kernel Image Information--------- Bad magic number--
Bad header crc
Kernel Image Type=133 Bad image type
Cpu Arch=184 Bad architecture type
OS type=34 Bad os type
Compression Type=180 Bad compression type ---------------------------------- <Check Fail> [suhas@l5ac197 Imagecheck]$ ./ucheck uImagebad
-----Kernel Image Information--------- Bad magic number--
Bad header crc
Kernel Image Type=146 Bad image type
Cpu Arch=178 Bad architecture type
OS type=19 Bad os type
Compression Type=121 Bad compression type ---------------------------------- <Check Fail>
*Note: for uImagebad and uImage3bad I have deleted some data and then save it.
Thanking you again WITH REGARDS Suhas Ghosh
____________________________________________________________________________________ Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097
participants (4)
-
Andrew Dyer
-
Daniel Hobi
-
MoonMoon Ghosh
-
Wolfgang Denk