(我假设你在使用ARM时提到了U-Boot和LOADADDR的值.)
Can you please help to understand what is the use of this?
LOADADDR指定链接器将内核映像定位的地址. (对于一些架构(例如Blackfin)来说这是事实,但对于ARM则不然.
LOADADDR通过U-Boot指定内核映像所在的地址,并由mkimage实用程序存储在U-Boot头中.通常,加载地址(用于放置在存储器中)也是起始地址(用于执行).请注意,uImage文件通常只是带有U-Boot包装器的(自解压缩的)zImage文件.
Can I change the LOADADDR,
是的,但根据(Vincent Sanders’)Booting ARM Linux,这将违反ARM惯例:
>尽管能够将zImage放置在内存中的任何位置,
约定它是在物理RAM加上的基础上加载的
偏移量为0x8000(32K).这为参数块留出了空间
通常放在偏移量0x100,零页面异常向量和页面
表.这种惯例很常见.
(你问题中提到的uImage可能只是带有U-Boot包装器的zImage,所以引用确实适用.)
is there any restriction on the length of the LOADADDR?
长度”?如果您使用的是32位处理器,则该地址的长度为32位.
附录
arch / arm / boot / Makefile仅使用LOADADDR从zImage构建uImage.
从(Russel King’s)Booting ARM Linux开始,对此LOADADDR的限制是:
The
kernel should be placed in the first 128MiB of RAM. It is recommended
that it is loaded above 32MiB in order to avoid the need to relocate
prior to decompression, which will make the boot process slightly
faster.
When booting a raw (non-zImage) kernel the constraints are tighter.
In this case the kernel must be loaded at an offset into system equal
to TEXT_OFFSET – PAGE_OFFSET.
设备树或ATAG或initramfs的预期位置可以在此LOADADDR上添加更多约束.