开发者

use fw_setenv for set U-boot's env (U-boot)

开发者 https://www.devze.com 2023-02-11 19:30 出处:网络
I used the source code (version:u-boot 1.2) want to corss compiler fw_setenv . so. I enter to uboot/ubo开发者_如何学Goot-1.2-dm9000/tools/env

I used the source code (version:u-boot 1.2)

want to corss compiler fw_setenv .

so. I enter to uboot/ubo开发者_如何学Goot-1.2-dm9000/tools/env

and

arm-linux-gcc -Wall -DUSE_HOSTCC -I/include crc32.c fw_env.c fw_env_main.c -o fw_setenv

but..It's not work.

$ fw_setenv SN envotouch194
Unlocking flash...
Done
Cannot malloc -114688 bytes: Cannot allocate memory
Error: can't write fw_env to flash

thanks a lot.


Looks like your strlen() implementation is wrong in your cross platform. Here

[ strlen("SN") + 2 + strlen("envotouch194") + 1 ] - strlen("SN") = -114688. Should be some issue in calculating the length of the string.

0

精彩评论

暂无评论...
验证码 换一张
取 消