工具/软件:
您好、
之前、我使用 EMIF 工具指南中提供的内容编译了 SDK 5.03 中的 uboot 并支持 4GIB EMIF、并向我的 board.c 文件和 evm.h 文件添加了必要的更改
board.c-
const struct dmm_lisa_map_regs beagle_x15_lisa_regs = {
.dmm_lisa_map_0 = 0x00000000,
.dmm_lisa_map_1 = 0x00000000,
.dmm_lisa_map_2 = 0x80740300,
.dmm_lisa_map_3 = 0xFF020100,
.is_ma_present = 0x1
};
int dram_init_banksize(void)
{
u64 ram_size;
ram_size = 0x100000000;
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_dram[0].size = get_effective_memsize();
if (ram_size > CONFIG_MAX_MEM_MAPPED) {
gd->bd->bi_dram[1].start = 0x200000000;
gd->bd->bi_dram[1].size = ram_size - CONFIG_MAX_MEM_MAPPED;
}
return 0;
}
evm.h
#define CONFIG_VERY_BIG_RAM
#define CONFIG_MAX_MEM_MAPPED 0x80000000
#define CONFIG_PHYS_64BIT
随着上述更改,我的电路板用于引导与 SDK5.03 uboot ,现在我尝试使相同的发生在 SDK 9.02 版本,它不起作用.
我注意到 config_phys_64bit 已添加在配置中、因此我在 evm.h 中跳过了它并进行了其他更改、但在编译期间、我遇到了以下错误
board/ti/am57xx/board.c: In function ‘dram_init_banksize’:
board/ti/am57xx/board.c:757:36: error: ‘CONFIG_SYS_SDRAM_BASE’ undeclared (first use in this function); did you mean ‘CONFIG_SYS_SRAM_BASE’?
757 | gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
| ^~~~~~~~~~~~~~~~~~~~~
| CONFIG_SYS_SRAM_BASE
board/ti/am57xx/board.c:757:36: note: each undeclared identifier is reported only once for each function it appears in
board/ti/am57xx/board.c:760:36: warning: unsigned conversion from ‘long long int’ to ‘phys_addr_t’ {aka ‘long unsigned int’} changes value from ‘8589934592’ to ‘0’ [-Woverflow]
760 | gd->bd->bi_dram[1].start = 0x200000000;
| ^~~~~~~~~~~
At top level:
board/ti/am57xx/board.c:1618:12: warning: ‘board_bootmode_has_emmc’ defined but not used [-Wunused-function]
1618 | static int board_bootmode_has_emmc(void)
| ^~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.build:257: board/ti/am57xx/board.o]
我来注释掉 int dram_init_banksize (void) 一节从 board.c 编译我的 u-boot.img 和 MLO、但电路板仅使用 2gib 部分启动、如下所示
U-Boot SPL 2023.04-dirty (Jun 17 2025 - 19:24:32 +0530)
DRA752-GP ES2.0
Trying to boot from MMC1
Loading Environment from FAT... *** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment
Loading Environment from MMC... *** Warning - bad CRC, using default environment
U-Boot 2023.04-dirty (Jun 17 2025 - 19:24:32 +0530)
CPU : DRA752-GP ES2.0
Model: FA SBC5728
Board: FA SBC 5728
DRAM: 2 GiB
Core: 65 devices, 21 uclasses, devicetree: separate
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... *** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment
Loading Environment from MMC... *** Warning - bad CRC, using default environment
Net: eth2: ethernet@48484000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
4035072 bytes read in 200 ms (19.2 MiB/s)
100159 bytes read in 29 ms (3.3 MiB/s)
Working FDT set to 88000000
Kernel image @ 0x82000000 [ 0x000000 - 0x3d9200 ]
Working FDT set to 88000000
OK
Working FDT set to 8fee4000
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.79-ge669d52447 (rajatrao@rajatrao) (gcc versi1
[ 0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: FA SBC5728
[ 0.000000] Memory policy: Data cache
所以、如果我保留 int dram_init_banksize (void) 部分并添加 #define CONFIG_SYS_SDRAM_BASE 0x80000000 在 evm.h 中,它编译但我的主板无法启动,我只得到下面的
U-Boot 2023.04-dirty (Jun 17 2025 - 19:32:19 +0530)
CPU : DRA752-GP ES2.0
Model: FASBC5728
Board: FA SBC5728
DRAM: 2 GiB (effective 4GiB)
此后、电路板停止引导。
您能帮助我在 SDK 9.03 uboot 中通过 4GIB EMIF 配置启动电路板吗?
此致、
Roshan Rajagopal
