[U-Boot] [PATCH] env: allow people to force envcrc building
Mike Frysinger
vapier at gentoo.org
Sun Apr 24 19:51:34 CEST 2011
On Sun, Apr 24, 2011 at 10:28 AM, Wolfgang Denk wrote:
> Mike Frysinger wrote:
>> For people who want to manually extract the embedded environment so that
>> it can be manually packed into the final u-boot image, add a config opt
>> to force building of the envcrc tool.
>>
>> Signed-off-by: Mike Frysinger <vapier at gentoo.org>
>> ---
>> README | 5 +++++
>> common/env_embedded.c | 2 +-
>> include/common.h | 5 +++++
>> tools/Makefile | 1 +
>> tools/envcrc.c | 10 +++++++---
>> 5 files changed, 19 insertions(+), 4 deletions(-)
>
> How would that be used? Can you please provide an example?
for Blackfin targets, i have to generate an LDR format. this is the
file that is ultimately burned into the flash. since i cant embed the
env in the original ELF/binary (since offsets in that will not
correlate to actual flash offsets), i have to let the ldr-utils do the
embedding.
so after the final ELF has been linked, Blackfin targets run:
tools/envcrc --binary > env-ldr.o
bfin-uclinux-ldr -T bf548-0.0 -c u-boot.ldr u-boot --bmode PARA
--use-vmas --initcode arch/blackfin/cpu/initcode.o -J --punchit
$((0x2000)):$((0x2000)):env-ldr.o --dma 6
and this produces the LDR:
DXE 1 at 0x00000000:
Offset BlockCode Address Bytes Argument
Block 1 0x00000000: 0xADC85006 0xFFA00000 0x00000000 0x00049CF4 (
16bit-dma-from-16bit ignore first )
Block 2 0x00000010: 0xADAF0806 0xFFA00000 0x00000170 0xDEADBEEF (
16bit-dma-from-16bit init )
Block 3 0x00000190: 0xAD340006 0x03F00000 0x00001E50 0xDEADBEEF (
16bit-dma-from-16bit )
Block 4 0x00001FF0: 0xAD711006 0x00000000 0x00002000 0xBAADF00D (
16bit-dma-from-16bit ignore )
Block 5 0x00004000: 0xADE50006 0x03F01E50 0x000061B0 0xDEADBEEF (
16bit-dma-from-16bit )
.... more Blocks ....
and now the embedded environment is at the right offset -- 0x2000
(it's Block 4 in the above output)
-mike
More information about the U-Boot
mailing list