does anybody know how to access u-boot environment at dir-825 (I mean /etc/fw_env.conf file parameters) or how to interrupt autoboot ?
(Last edited by shlema on 1 Dec 2010, 19:42)
The content of this topic has been archived on 1 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.
does anybody know how to access u-boot environment at dir-825 (I mean /etc/fw_env.conf file parameters) or how to interrupt autoboot ?
(Last edited by shlema on 1 Dec 2010, 19:42)
Modify u-boot-env partition from linux could be risky. Besides, the uboot-envtools-20081215-2 package doesn't include fw_setenv binary.
Some idea for you but not related to uboot-envtools.
Look at "TP-Link TL-WR1043ND - OpenWrt Wiki - U-Boot Mods" and "mach-dir-825-b1.c".
root@OpenWrt:/# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 "uboot"
mtd1: 00010000 00010000 "config"
mtd2: 00100000 00010000 "kernel"
mtd3: 00510000 00010000 "rootfs"
mtd4: 00390000 00010000 "rootfs_data"
mtd5: 00010000 00010000 "caldata"
mtd6: 00190000 00010000 "unknown"
mtd7: 00610000 00010000 "firmware"
I think the u-boot environment is stored in the config partition. If you build you own kernel, you might be able to apply the U-Boot Mods skill to modify the config partition.
probably in config partition. but I am not able to read it with the fw_printenv:
# cat /etc/fw_env.config
root@OpenWrt:~# cat /etc/fw_env.config
MTD device name Device offset Env. size Flash sector size
/dev/mtd1 0x0000 0x10000 0x10000
root@OpenWrt:~# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
I dumped config partition and did not find anything that looks like u-boot configuration.
From the other side I found something in /dev/mtd0 near offset 0x000269e0:
bootargs=console=ttyS0,115200 root=31:03 mem=64M rootfstype=squashfs,jffs2 init=/sbin/init
mtdparts=ar7100-nor0:256k(uboot),64k(Config),1024k(vmlinux),5184k(rootfs),64k(caldata).
bootcmd=bootm 0xbf050000.
bootdelay=1.
baudrate=115200.
ipaddr=192.168.0.1.
serverip=192.168.0.107
root@OpenWrt:~# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200I dumped config partition and did not find anything that looks like u-boot configuration.
Looks like config partition is empty and U-Boot applies the default settings.
OpenWrt / Memory mod on Dlink DIR-825
U-Boot 1.1.4 (Apr 9 2009 - 12:01:01)
AP94 (ar7100) U-boot 0.0.12
HTTP-UID AP94: DRAM: b8050000: 0xc0140180
64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 214k for U-Boot at: 83fc8000
Reserving 192k for malloc() at: 83f98000
Reserving 44 Bytes for Board Info at: 83f97fd4
Reserving 36 Bytes for Global Data at: 83f97fb0
Reserving 128k for boot params() at: 83f77fb0
Stack Pointer at: 83f77f98
Now running in RAM - U-Boot at: 83fc8000
ar7100 flash_init: start
ar7100_spi_flash_unblock: start
ar7100_flash: id read: start
flash size 8MB, sector count = 128
Flash: 8 MB
Using default environment
Usually it should read:
*** Warning - bad CRC, using default environment
And the serial console does not take input:
ramponis wrote:Hi vavasik
Now i have the output from the serial working on my dir-825
But not the input.
Do you know if the serial input is working with dlink u-boot?
Or i need to replace the bootloader?Hi, you need replace bootloader, because in dlink uboot console input was disabled
You have to build your own uboot-envtools or kernel in order to modify config partition.
So:
1. dlink uboot is uninterruptable,
2. It seems that there is no u-boot configuration at dir-825 flash and config is compiled in
dlink u-boot. mtd "config" partition does not seems to contain any u-boot configuration.
the only way to access to boot loader is to reprogram it.
(Last edited by shlema on 6 Dec 2010, 17:21)
The discussion might have continued from here.