The same problem with the load address and Entry point of Make uimage in Linux3.6.7 __linux

Source: Internet
Author: User
The same problem with the load address and Entry point of make uimage in Linux3.6.7

This article turns from: http://blog.chinaunix.net/uid-28382924-id-3421282.html

Copy a mkimage tool from u-boot-2012.10 to the/usr/bin directory and find the load address and entry when make Uimage Point is 0x50008000. Results u-boot after BOOTM command stopped at starting kernel ...

Manually modified entry point=0x50008040 can be started. So, how do I let make uimage automatically set entry point to 50008040? There is information on the Internet that arch/arm/boot/inside the makefile file:

Put
$ (obj)/uimage:startaddr=$ (loadaddr)
To
$ (obj)/uimage:startaddr=$ (Shell echo $ (loadaddr) | sed-e s/... $$/40/")
Among them, sed-e "s/." $$/40/"means that the last two characters of the output string are deleted and supplemented with 40来, which can be understood as replacing the last two characters of the string with 40来.

By comparing versions 3.0.1 and 3.6.7, the former has this content, but the latter's make file is not found

STARTADDR this variable. Looking for a long time to find that the linux3.6.7 version of the set Mkimage passed parameters are not placed in the Arch/arm/boot directory makefile, but in the scripts directory in the Makefile.lib file, the contents are as follows:

# U-boot Mkimage
# ---------------------------------------------------------------------------

Mkimage: = $ (Srctree)/scripts/mkuboot.sh

# Srcarch just happens to match slightly more than ARCH (in SPARC), so reduces
# The number of overrides in Arch makefiles
Uimage_arch? = $ (Srcarch)
Uimage_compression? = $ (if $ (2), $ (2), none)
Uimage_opts-y? =
Uimage_type? = Kernel
Uimage_loadaddr? = Arch_must_set_this
#UIMAGE_ENTRYADDR? = $ (uimage_loadaddr) # #这是原来的配置
Uimage_entryaddr =$ (Shell echo $ (UIMAGE_LOADADDR) | sed-e "s/... $$/40/") # #这是我修改后的配置
Uimage_name? = ' linux-$ (kernelrelease) '
Uimage_in? = $<
Uimage_out? = $@

Quiet_cmd_uimage = Uimage $ (uimage_out)
Cmd_uimage = $ (Config_shell) $ (mkimage)-A $ (uimage_arch)-O linux \
-C $ (uimage_compression) $ (uimage_opts-y) \
-T $ (uimage_type) \
-A $ (uimage_loadaddr)-E $ (uimage_entryaddr) \
-N $ (uimage_name)-D $ (uimage_in) $ (uimage_out)

With the above modifications, make Uimage is as follows:

root@ubuntu:/home/my/linux-3.6.7# make Uimage
  chk     include/linux/version.h
  chk     include/generated/utsrelease.h
Make[1]: "Include/generated/mach-types.h" is up to date.
call    scripts/checksyscalls.sh
  chk     include/generated/ Compile.h
  Kernel:arch/arm/boot/image is ready
  kernel:arch/arm/boot/zimage are ready
  UIMA ge  arch/arm/boot/uimage
Image name:   Linux-3.6.7
created:      Mon Nov 12:37:17
Image type:   ARM Linux Kernel image (uncompressed)
Data size:    14 76744 Bytes = 1442.13 KB = 1.41 MB
Load address:50008000
Entry point:  50008040
  Image Arch/arm/boo T/uimage is ready
root@ubuntu:/home/my/linux-3.6.7#

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.