Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

Problem in flashing NSA325 u-boot (8 replies)

$
0
0
@bodhi
My device has different partition, The expected behavior was different from the guide.
When I'm deleting 4 blocks it only deletes one.

/e-data/4089-AD8E/tools # flash_erase /dev/mtd0 0 4
Erasing 128 Kibyte @ 60000 -- 100 % complete

now when I flash the uboot I get this
/e-data/4089-AD8E # nandwrite /dev/mtd0 kirkwood/generic/u-boot-nsa325/u-boot.kw
b
Input file is not page aligned
Data did not fit into device, due to bad blocks
: Success

/etc/fw_env.config
MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
NAND example
/dev/mtd1               0x0000          0x20000         0x20000                 4

cat /proc/mtd
mtd0: 00100000 00020000 "uboot"
mtd1: 00080000 00020000 "uboot_env"
mtd2: 00080000 00020000 "key_store"
mtd3: 00080000 00020000 "info"
mtd4: 00a00000 00020000 "etc"
mtd5: 00a00000 00020000 "kernel_1"
mtd6: 02fc0000 00020000 "rootfs1"
mtd7: 00a00000 00020000 "kernel_2"
mtd8: 02fc0000 00020000 "rootfs2"

original env
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
kernel_addr=C80000
MODEL_ID=AA03
PRODUCT_NAME=NSA-325
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=FC:F5:28:00:00:00

after flashing uboot
Warning: Bad CRC, using default environment
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
nandEcc=1bit
kernel_addr=480000
MODEL_ID=A203
PRODUCT_NAME=NSA-310
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=ZyXEL Communications Corp.

I have backup of mtd0
What should I do now?

Viewing all articles
Browse latest Browse all 3247

Trending Articles