如何更改U-Boot内存映射?

时间:2021-04-16 23:45:54

The U-Boot(2009.03) on MS104-SH4 has the RAM memory map shown below.

MS104-SH4上的U-Boot(2009.03)具有如下所示的RAM内存映射。

0x8c000000 Not for use (4kB)
0x8c001000 for Linux kernel & root file system (3MB)
0x8c400000 for Linux process (28MB)

0x8c000000不用于Linux内核和根文件系统(3MB) 0x8c001000用于Linux进程(28MB)

For me, 3MB for Linux kernel & root file system is too small because Linux kernel & ramdisk has 1MB and 3.5MB respectively. So I'd like to change above memory map, for example like shown below.

对于我来说,3MB的Linux内核和根文件系统太小了,因为Linux内核和ramdisk分别有1MB和3.5MB。因此,我希望改变上面的内存映射,例如如下所示。

0x8c000000 Not for use (4KB)
0x8c001000 for Linux kernel & root file system (16MB)
0x8cf60000 for Linux process (16MB)

0x8c000000不用于Linux内核&根文件系统(16MB) 0x8c001000用于Linux进程(16MB)

In my guess, I have to modify uboot source code, but cannot find where I should modify. Does somebody tell me if it is possible to modify u-boot memory map? If yes, please also tell me how to do it. Thanks for your help!

在我的猜测中,我必须修改uboot源代码,但是找不到我应该修改的地方。是否有人告诉我是否可以修改u-boot内存映射?如果是,请告诉我怎么做。谢谢你的帮助!

I found a similar question on How to find the memory map of a device?, but my SH4 iomem is empty (0 size) so looks like other topic.

我发现了一个类似的问题关于如何找到一个设备的记忆地图?但我的SH4 iomem是空的(0号),所以看起来像其他主题。

1 个解决方案

#1


10  

It is possible to modify U-boot memory map. you need to modify source code of U-boot .U-boot/include/configs/<board_name.h> is the place where you can configure memory map . where <board_name.h> is your architecture specific file and has #define entries which you can change to desirable values. u-boot/arch/<architecture_name>/lib/board.c perform the memory map initialization.

可以修改U-boot内存映射。您需要修改U-boot .U-boot/include/configs/ 是可以配置内存映射的地方。在< board_name。h>是您的架构特定的文件,并且有#define条目,您可以将其更改为可取的值。u-boot / arch / < architecture_name > / lib /板。执行内存映射初始化。 的源代码。h>

#1


10  

It is possible to modify U-boot memory map. you need to modify source code of U-boot .U-boot/include/configs/<board_name.h> is the place where you can configure memory map . where <board_name.h> is your architecture specific file and has #define entries which you can change to desirable values. u-boot/arch/<architecture_name>/lib/board.c perform the memory map initialization.

可以修改U-boot内存映射。您需要修改U-boot .U-boot/include/configs/ 是可以配置内存映射的地方。在< board_name。h>是您的架构特定的文件,并且有#define条目,您可以将其更改为可取的值。u-boot / arch / < architecture_name > / lib /板。执行内存映射初始化。 的源代码。h>