Ya tengo el u-boot arrancando desde la memoria nand de un ad1018 con SoC BCM6328.
El cferom.bin, de 16KB, lo he grabado en el bloque 0 de la nand y a un u-boot.bin renombrado como cferam.000 le he añadido 12 bytes de cabecera con la dirección de entrada de memoria.
Este cferam.000 se lo he pasado al mkfs.jffs2 para que creara una imagen JFFS2 y la he grabado en los bloques 1,2,3,4 y 5 (ocupa unos 600KB)
Vamos, lo que se hace con el cferam.bin lo he hecho con el u-boot.bin.
Al u-boot.bin le cambié en el make menuconfig la dirección de entrada (CONFIG_SYS_TEXT_BASE) de 0x80010000 a 0x80600000, porque la primera me machacaba los punteros debido a que un cferam es bastante más pequeño.
Pero no se cómo añadir al cferom.bin los datos por defecto de la NVRAM cuando compilo ¿Alguna idea?
Un saludo
HELO
CPUI
L1CI
DRAM
----
PHYS
ZQDN
PHYE
DINT
LSYN
USYN
MSYN
LMBE
PASS
----
ZBSS
CODE
DATA
L12F
MAIN
NAN0
NAN6
NAN7
BT00
NAN9
NAN3
RFS1
NAN5
U-Boot 2020.01-rc2 (Dec 01 2019 - 21:33:56 +0100)
CPU: BCM63283B0
Model: Comtrend AR-5387un
DRAM: 128 MiB
NAND: 128 MiB
In: serial@10000100
Out: serial@10000100
Err: serial@10000100
Model: Comtrend AR-5387un
Net:
Warning: ethernet@10e00000 (eth0) using random MAC address - 82:e0:24:1d:c2:50
eth0: ethernet@10e00000
AR-5387un # help
? - alias for 'help'
base - print or set address offset
bdinfo - print Board Info structure
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
chpart - change active partition
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
cpu - display information about CPUs
dm - Driver model low level access
echo - echo args to console
env - environment handling commands
exit - exit script
false - do nothing, unsuccessfully
fdt - flattened device tree utility commands
fstype - Look up a filesystem type
go - start application at address 'addr'
help - print command description/usage
iminfo - print header information for application image
itest - return true/false on integer compare
led - manage LEDs
license - print GPL license text
ln - Create a symbolic link
load - load binary file from a filesystem
loadb - load binary file over serial line (kermit mode)
loadx - load binary file over serial line (xmodem mode)
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls - list files in a directory (default /)
md - memory display
meminfo - display memory information
mii - MII utility commands
mm - memory modify (auto-incrementing address)
mtd - MTD utils
mtdparts - define flash/nand partitions
mw - memory write (fill)
nand - NAND sub-system
nboot - boot from NAND device
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv - print environment variables
random - fill memory with random pattern
reset - Perform RESET of the CPU
run - run commands in an environment variable
save - save file to a filesystem
setenv - set environment variables
setexpr - set environment variable as the result of eval expression
sf - SPI flash sub-system
showvar - print local hushshell variables
size - determine a file's size
source - run script from memory
sspi - SPI utility command
test - minimal test like /bin/sh
tftpboot - boot image via network using TFTP protocol
true - do nothing, successfully
ubi - ubi commands
ubifsload - load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsmount- mount UBIFS volume
ubifsumount- unmount UBIFS volume
version - print monitor, compiler and linker version
AR-5387un # setenv ipaddr 192.168.3.130
AR-5387un # setenv serverip 192.168.3.40
AR-5387un # printenv
baudrate=115200
bootdelay=2
fdtcontroladdr=87d5b94c
ipaddr=192.168.3.130
serverip=192.168.3.40
stderr=serial@10000100
stdin=serial@10000100
stdout=serial@10000100
Environment size: 164/8188 bytes
AR-5387un # sspi
SF: Detected s25fl129p1 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
AR-5387un # mtd list
List of MTD devices:
* nand0
- type: NAND flash
- block size: 0x20000 bytes
- min I/O: 0x800 bytes
- OOB size: 64 bytes
- OOB available: 51 bytes
- ECC strength: 15 bits
- ECC step size: 512 bytes
- bitflip threshold: 1 bits
- 0x000000000000-0x000008000000 : "nand0"
* nor0
- type: NOR flash
- block size: 0x10000 bytes
- min I/O: 0x1 bytes
- 0x000000000000-0x000001000000 : "nor0"
AR-5387un # meminfo
DRAM: 128 MiB
AR-5387un # cpu list
0: cpu@0 BCM63283B0
1: cpu@1 BCM63283B0
AR-5387un # bdinfo
boot_params = 0x87d65d08
memstart = 0x80000000
memsize = 0x08000000
flashstart = 0x00000000
flashsize = 0x00000000
flashoffset = 0x00000000
ethaddr = (not set)
IP addr = 192.168.3.130
baudrate = 115200 bps
relocaddr = 0x87f60000
reloc off = 0x07960000
AR-5387un # coninfo
List of available devices:
serial@10000100 00000007 IO stdin stdout stderr
serial 00000003 IO
AR-5387un #