Home > OS >  Uboot how to set up the kernel boot address
Uboot how to set up the kernel boot address

Time:09-17

Bosses could you tell me how to set up the kernel under uboot start address? Because some kernel burn at this address 0 x800000, some kernel burn at this address 0 x200000, must tell uboot from which to start the kernel, uboot compile now how to tell uboot from which to start the kernel??

CodePudding user response:

You should be more wrong, burn address and running are two concepts, burn the address is written to FLASH (ROM) offset on the piece of media, such as a partition on the NandFlash or NorFlash location, operating address, general is in RAM position; If FLASH support on a chip, also can be the address of the FLASH, but, generally run after the uboot, SoC uboot will be responsible for the initialization of RAM chips, and then copy the kernel from FLASH partition it to a memory location ADDR, then calls the bootm ADDR boot the kernel and handed over to the CPU control,

CodePudding user response:

reference 1st floor Golden_Chen response:
you should be more wrong, burn address and running are two concepts, burn the address is written to FLASH (ROM) offset on the piece of media, such as a partition on the NandFlash or NorFlash location, operating address, general is in RAM position; If FLASH support on a chip, also can be the address of the FLASH, but, generally run after the uboot, SoC uboot will be responsible for the initialization of RAM chips, and then copy the kernel from FLASH partition it to a memory location ADDR, then calls the bootm ADDR boot the kernel and handed over to the CPU control,

I only to you say I am confused now uboot to the kernel from the copy in the flash, how do you know from the flash which position uboot copy kernel??
If there are two boards with the same version of the uboot, but starts a bat uboot from the position of flash0x20000 kernel copy out, another from the position of flash0x1000000 kernel copy out, the uboot? How did you do it? How to set up the uboot copy the kernel's address? Sure you can set the

CodePudding user response:

You said the address is the address of the offset value in FLASH, is generally uboot configuration inside the FLASH partition table, such as the uboot + + KERNL ENV + ROOTFS, these four partitions, size and location is fixed, the latest uboot support DTB, partition can. DTS file definition,
You said that very few, if you want to do, is not can't, but according to the characters of a value is required to choose a different partition table, such as FLASH size, a hardware GPIO default value,

CodePudding user response:

reference Golden_Chen reply: 3/f
you said the address is the address of the offset value in FLASH, is generally uboot configuration inside the FLASH partition table, such as the uboot + + KERNL ENV + ROOTFS, these four partitions, size and location is fixed, the latest uboot support DTB, partition can. DTS file definition,
You said that very few, if you want to do, is not can't, but according to the characters of a value is required to choose a different partition table, such as FLASH size, a hardware GPIO default values,

Don't know can please the uboot configuration flash partition table of the location of the relevant code (directory path) thank you tell me I look at the code

CodePudding user response:

The ultimate load the kernel, is the bootcmd
The static char default_environment []={
.
# ifdef CONFIG_BOOTCOMMAND
"Bootcmd=" CONFIG_BOOTCOMMAND "\ 0
"# endif
.

CONFIG_BOOTCOMMAND similar: "nand read x100000 x50008000 0 0 0 x500000; X50008000 bootz 0,
"Offset 0 x100000 is FLASH, 0 x500000 is FLASH on the partition size

As for the other partitions, speaking, reading and writing, and ordered them to do like this, the partition table is also based on their projects by doing additional, uboot default code is not,

CodePudding user response:

reference 5 floor Golden_Chen reply:
load the kernel, finally is the bootcmd
The static char default_environment []={
.
# ifdef CONFIG_BOOTCOMMAND
"Bootcmd=" CONFIG_BOOTCOMMAND "\ 0
"# endif
.

CONFIG_BOOTCOMMAND similar: "nand read x100000 x50008000 0 0 0 x500000; X50008000 bootz 0,
"Offset 0 x100000 is FLASH, 0 x500000 is FLASH on the partition size

As for the other partitions, speaking, reading and writing, and ordered them to do like this, the partition table is also based on their projects by doing additional, uboot is not the default code,

Well well thank you bosses
  • Related