embedded linux ARM booting address

后端 未结 3 1693
不知归路
不知归路 2021-01-20 05:28

I follow some document to boot embedded Linux on ARM board (ex: Freescale Vybrid tower) via sdcard. in the document there are steps to build uImage and write u-boot into sdc

相关标签:
3条回答
  • 2021-01-20 05:41

    Please also explain what Load address/entry point address mean?

    Load address : Refers to from where the kernel is loaded. This is the kernel "load address". U-Boot shall copy the image to that region of memory. The address is dependent on the board design/architecture. In general design, this shall refer to RAM address. You need to check your board specification.

    Entry point : This is where the control/execution is transferred once the image is written into RAM. (The code at this location shall will be executed first when the kernel in RAM is invoked by bootloader.)

    0 讨论(0)
  • 2021-01-20 05:45

    What I would like to know is from which datasheet/UM/RM or any document they get the number: bs=512 seek=2, -a 0x81000000 (Load address), -e 0x81000000 (Entry point)

    The bs=512 seek=2 specification should be from the NXP/Freescale reference manual for the SoC (e.g. the "Expansion Device: SD, eSD and SDXC" section of the System Boot chapter).

    When configured to boot from an SDcard, the ROM boot program (of the SoC) will look for a program image (e.g. U-Boot) at byte offset 0x400 (or 2 * 512 = 1024), which is the third 512-byte sector.
    The first sector is presumed to be the MBR, and the second sector is reserved for an optional Secondary Image Table (using terminology from NXP document).

    Allwinner SoCs use a similar booting scheme for SDcard (i.e. the U-Boot image is at a fixed location in raw sectors not part of a partition), but the image starts at the 17th sector.
    Instead of loading raw sectors, some SoCs (e.g. Atmel) boot from SDcard by loading a file from a FAT partition.

    Please also explain what Load address/entry point address mean?

    These values are specified to the mkimage utility so that they can be installed in the uImage header. U-Boot will then use these values when the uImage is loaded and unpacked.

    The load address specifies to U-Boot the required memory address to locate the image. The image is copied to that memory address.
    The entry point specifies to U-Boot the memory address to jump/branch to in order to execute the image. This value is typically the same address as the load address.

    For an ARM Linux kernel the recommended load and entry-point addresses are 0x8000 from the start of physical memory, according to (Vincent Sanders') Booting ARM Linux.
    See Building kernel uImage using LOADADDR for more details.

    0 讨论(0)
  • 2021-01-20 05:59

    What I would like to know is from which datasheet/UM/RM or any document they get the number: bs=512 seek=2, -a 0x81000000 (Load address), -e 0x81000000 (Entry point)

    Please also explain what Load address/entry point address mean?

    The bs=512 seek=2 is to skip the first sector of the SD card. This has some sort of boot information (MBR - master boot record or partition table are similar concepts) and you will brick the card if you overwrite this information (or at least need other tools to fix it). It is defined in an MMC/SD card standard. I think the JEDEC web sight has it.

    The load address is where to move the SD card image to memory (Ie SDRAM). The entry point is where to hand control once the image is loaded. Often they are the same if the boot code is written in assembler and a linker is used. However, sometimes a hard coded vector table is at the start of the image and the entry point is somewhere in the middle. In any case, both are physical addresses. It could be 'IRAM' (internal static ram) for the case of a smaller kernel but must be SDRAM for Linux (which requires your SDRAM to be working). You may have issue with this if it is a custom board and not an off the shelf Vybrid Tower. Also, there are different Tower board revisions and they work differently. Check the errata on them. Finally, different U-boot versions support different boot modes. Ie, where is u-boot stored and executed from? The address are in the Vybrid TRM in the physical memory map for the Cortex-A5 CPU.

    0 讨论(0)
提交回复
热议问题