OpenWrt Forum Archive

Topic: U-Boot mod for routers with AR9331/AR9344

The content of this topic has been archived between 3 Apr 2015 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

hackru wrote:
vladizlat wrote:

Or: Use DDWRT, to flash Ubootmod. From web 192.168.1.1 set password and in Services check SSHd and SSH TCP Forwarding. Run telnet 192.168.1.1 and do uboot backup with the command:

cat /dev/mtd0 > /tmp/uboot_backup.bin

Then download uboot_backup.bin from the /tmp directory with WinSCP using SCP protocol. Uboot_backup.bin file is 128KB and open it with HEX editor (TinyHexer) and the part from 0x00 to 0x010000 replace with the contents (64KB) of ubootmod for wr740n v4. Save the file as ubootmod.bin. Upload ubootmod.bin with WinSCP to /tmp and flash it with telnet or Putty SSH:

mtd -r write /tmp/ubootmod.bin RedBoot

Sorry for stupid question, but why should i use dd-wrt if openwrt have mtd command too? Thanks.

This guy here http://code.google.com/p/wr703n-uboot-w … -failsafe/
says to use cat uboot_0x20000.bin >/dev/mtdblock0

So? Is uboot locked or not?

If you are using OpenWRT firmware uboot is locked.
Not sure about DD-WRT.

clearly when he wrote the guide uboot was not locked.
Idea that read-only uboot will prevent  what rootkit? is naive.
Just google around what happened to efi bios on windowze

etan wrote:

clearly when he wrote the guide uboot was not locked.
Idea that read-only uboot will prevent  what rootkit? is naive.
Just google around what happened to efi bios on windowze

It does prevent accidental erase...

Maybe next weekend.

Any chance of getting it working on TP-Link 1043nd v2.1? Atheros/Qualcomm QCA9558 inside.

-Jamie M.

toysareforboys wrote:

Any chance of getting it working on TP-Link 1043nd v2.1? Atheros/Qualcomm QCA9558 inside.

-Jamie M.

Yes, basic support is already on my disk.

pepe2k wrote:
Sharonbuss wrote:

I think the parameter for DDR1 memory has some different, 
I want to modify the driver strength and ddr frequency,
could you where to make modifications?

u-boot/cpu/mips/ar7240/meminit.c -> function wasp_ddr_initial_config
Don't ask me about registers values and definitions - I don't have access to AR9341 data sheet...

I have solve this issue by change the setting,
I think this will improve the DDR1 signal quality. and wider support different memory chip and PCB layout.
The board passed Memtest and running Trunk for several months.
In Ar7240_soc.h
change this line
#define CFG_934X_DDR1_EXT_MODE_VAL            0x2            // 0x0

to
#define CFG_934X_DDR1_EXT_MODE_VAL            0x0            // 0x0

Have you checked value of this field in factory version of U-Boot?

pepe2k wrote:

Have you checked value of this field in factory version of U-Boot?

From ap123 SDK

From my testing changing #define CFG_934X_DDR1_EXT_MODE_VAL does not affect my router operation but
changing #define CFG_934X_DDR1_CONFIG_VAL    0xc7d48cd0  and #define CFG_934X_DDR1_CONFIG2_VAL    0x9dd0e6a8 does.
#define CFG_934X_DDR1_CONFIG_VAL    0xc7d48cd0 
#define CFG_934X_DDR1_MODE_VAL_INIT    0x133
#define CFG_934X_DDR1_EXT_MODE_VAL    0x0
#define CFG_934X_DDR1_MODE_VAL        0x33
#define CFG_934X_DDR1_CONFIG2_VAL    0x9dd0e6a8

(Last edited by alphasparc on 27 Jun 2014, 10:17)

No, not in code... in runtime.

hackru wrote:
roger_ wrote:

Any chance of some updated binaries? The only ones on GitHub (https://github.com/pepe2k/u-boot_mod/releases) are pretty outdated.

I'm mainly interested in ones for the Tl-WR703N.

I compiled images for all supported routers today:
http://blog.hackru.ru/2014/07/fresh-u-b … 4-for.html
I flashed this image (3020 and 703) today, but still please use with caution and make backups.


Thanks a lot! I assume this is for an unmodded TL-WR703N?

(Last edited by roger_ on 3 Jul 2014, 02:48)

pepe2k wrote:

I have here WDR3600 which is working on 800/500/250 for couple of months smile

Hi, Would you please send me that overclocked.bin file for wdr3600? I don't know how to compile.
My WDR3600 hw version is 1.1 (blue light).

Can someone confirm if via DD-WRT is the only way to install this, without using the serial console?

roger_ wrote:

Can someone confirm if via DD-WRT is the only way to install this, without using the serial console?

No, new u-boot can be installed via network using special openwrt image with writable /dev/mtd0 partition.

dimonix wrote:
roger_ wrote:

Can someone confirm if via DD-WRT is the only way to install this, without using the serial console?

No, new u-boot can be installed via network using special openwrt image with writable /dev/mtd0 partition.

Where can I get this special image (preferably binaries)?

I'm looking for the most foolproof way to install the mod.

(Last edited by roger_ on 10 Jul 2014, 16:40)

roger_ wrote:
dimonix wrote:
roger_ wrote:

Can someone confirm if via DD-WRT is the only way to install this, without using the serial console?

No, new u-boot can be installed via network using special openwrt image with writable /dev/mtd0 partition.

Where can I get this special image (preferably binaries)?

I'm looking for the most foolproof way to install the mod.

You have to build such openwrt image for your specific router model by yourself. I have such image only for WR703N routers. PM me if you need this.

(Last edited by dimonix on 10 Jul 2014, 16:49)

dimonix wrote:
roger_ wrote:
dimonix wrote:

No, new u-boot can be installed via network using special openwrt image with writable /dev/mtd0 partition.

Where can I get this special image (preferably binaries)?

I'm looking for the most foolproof way to install the mod.

You have to build such openwrt image for your specific router model by yourself. I have such image only for WR703N routers. PM me if you need this.

Perfect, I have a WR703N and I'd love to get a copy of image.

(Does this forum have PMs?)

(Last edited by roger_ on 10 Jul 2014, 20:35)

Hi can you overclock the WD N750?or the WR1043ND. If so were can i find files. I will flash using ddwrt.

Any chance of supporting WDR4900v1 with PPC CPU arch ( 800Mhz Freescale PPC P1014 CPU ) ?

http://wiki.openwrt.org/toh/tp-link/tl-wdr4900

This looks like a great project. Well done !

(Last edited by bulanula on 13 Jul 2014, 13:29)

Knowing almost nothing about low-level coding, I wonder how much work it would be to be able to initialize the USB interface at the bootloader, so one could boot OpenWrt from an USB stick? As far as I know, U-Boot already provides the basic functionality for USB and filesystems (even for v1.1.4), but it sure will need some work to be able to use them on our boards. The way I see it, the benefit from booting off USB is that you can do a "real external root" (no idea how I should call it) and thus avoid any quirks related to the normal ext root methods. Of course routers with NAND memory are becoming more common, but the old routers could still benefit from this.

If I were to experiment with this, can I do bootloader chaining so that I won't brick my device? I mean first load the current version of the mod, then tftp my modifications and run the boot from the beginning (ie. set serverip 192.168.1.100; tftp 0x80800000 u-boot.bin; go 0x80800000). Sure it'll run the code, but how about hardware initialization when it happens twice, does it matter?

kirschwasser mentioned pushing patches for the boards upstream would be beneficial.. I wonder if it was easier to add USB support for my board based on a newer version of U-Boot?

EDIT: sure I can do kexec etc after booting OpenWrt, but that's not my current goal.

(Last edited by janil on 16 Jul 2014, 08:30)

My D-Link DIR-835 is currently in the mail, but its core is the AR9344 SoC. Hardwarewise, it's very close to the already supported WDR-4300. What information would I need to provide to ensure that it is supported? Wikidevi has a copy of the stock boot log if that is enough.

Edit: I found a copy of the raw U-boot from the web-failsafe project if that also helps: http://code.google.com/p/wr703n-uboot-w … t-gpl?r=14

(Last edited by Jocas on 23 Jul 2014, 22:01)

whether openWRT SDK could buid the U-Bott mod? 

openWRT SDK generates mips-openwrt-linux-uclibc- , but the makefile in uboot is mips-linux- .

Sorry, posts 351 to 350 are missing from our archive.