Comments (10)
Hi @zwhfly,
Do you have the same problem with original U-Boot from TP-Link/Mercury?
Regards
from u-boot_mod.
Hi @pepe2k ,
Thanks for replying so fast.
Yes. Both the original and this u-boot_mod, both the TP-Link/Mercury, have this problem.
And I think I found the cause of this problem and I can fix it.
I will submit a pull request shortly. I'm learning how to use this thing - GitHub.
Regards
from u-boot_mod.
Hi @zwhfly,
OK :)
Piotr
from u-boot_mod.
I managed to read the "Divisor Latch Low" register (address 0x18020000).
In the Linux kernel of OpenWrt, where the serial works well, the value of this register is 0x00000016.
While in this u-boot, I read this register with the UDP console, the value is 0x00000015.
After I changed the value to 0x00000016, the serial starts to work, like a miracle!! (OK, I'm a newbie here.)
OK, this is the line:
div = (40 * 1000000) / (16 * CONFIG_BAUDRATE);
It should be 21.701388888888888888888888888889. Apparently, 22(0x16) works better.
In OpenWrt, the serial driver uses DIV_ROUND_CLOSEST, so let's use it here.
And it works:
root@OpenWrt:/# reboot
root@OpenWrt:/# [ 43.140000] br-lan: port 1(eth0.1) entered disabled state
[ 43.160000] device eth0.1 left promiscuous mode
[ 43.160000] device eth0 left promiscuous mode
[ 43.160000] br-lan: port 1(eth0.1) entered disabled state
[ 45.620000] Removing MTD device #3 (rootfs_data) with use count 1
[ 45.640000] Restarting system.
*********************************************
* U-Boot 1.1.4 (Mar 19 2014) *
*********************************************
DB120 (AR9344) U-Boot for TL-WDR3600/43x0
DRAM: 128 MB DDR2 32-bit
FLASH: Winbond W25Q64 (8 MB)
CLOCKS: 560/450/225/28 MHz (CPU/RAM/AHB/SPI)
LED on during eth initialization...
Hit any key to stop autobooting: 0
Booting image at: 0x9F020000
Image name: OpenWrt r36088
Image type: MIPS Linux Kernel Image (lzma compressed)
Data size: 957268 Bytes = 934.8 kB
Load address: 0x80060000
Entry point: 0x80060000
Uncompressing kernel image... OK!
Starting kernel...
[ 0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sat Mar 23 16:49:30 UTC 2013
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU revision is: 0001974c (MIPS 74Kc)
[ 0.000000] SoC: Atheros AR9344 rev 2
[ 0.000000] Clocks: CPU:560.000MHz, DDR:450.000MHz, AHB:225.000MHz, Ref:40.000MHz
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 08000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone PFN ranges:
[ 0.000000] Normal 0x00000000 -> 0x00008000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] Early memory PFN ranges
[ 0.000000] 0: 0x00000000 -> 0x00008000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: board=TL-WDR4300 console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 126464k/131072k available (2211k kernel code, 4608k reserved, 418k data, 212k init, 0k highmem)
[ 0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:51
[ 0.000000] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[ 0.070000] pid_max: default: 32768 minimum: 301
[ 0.070000] Mount-cache hash table entries: 512
[ 0.080000] NET: Registered protocol family 16
[ 0.080000] gpiochip_add: registered GPIOs 0 to 22 on device: ath79
[ 0.090000] MIPS: machine is TP-LINK TL-WDR3600/4300/4310
[ 0.090000] registering PCI controller with io_map_base unset
[ 0.310000] bio: create slab <bio-0> at 0
[ 0.310000] PCI host bridge to bus 0000:00
[ 0.320000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[ 0.320000] pci_bus 0000:00: root bus resource [io 0x0000]
[ 0.330000] pci 0000:00:00.0: invalid calibration data
[ 0.330000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[ 0.340000] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[ 0.340000] pci 0000:00:00.0: using irq 40 for pin 1
[ 0.350000] Switching to clocksource MIPS
[ 0.350000] NET: Registered protocol family 2
[ 0.360000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.360000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.370000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.370000] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.380000] TCP reno registered
[ 0.380000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.390000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.400000] NET: Registered protocol family 1
[ 0.410000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.420000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.430000] msgmni has been set to 247
[ 0.440000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[ 0.440000] io scheduler noop registered
[ 0.450000] io scheduler deadline registered (default)
[ 0.450000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.480000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[ 0.490000] console [ttyS0] enabled, bootconsole disabled
[ 0.490000] console [ttyS0] enabled, bootconsole disabled
[ 0.500000] m25p80 spi0.0: found s25fl064k, expected m25p80
[ 0.510000] m25p80 spi0.0: s25fl064k (8192 Kbytes)
[ 0.520000] 5 tp-link partitions found on MTD device spi0.0
[ 0.520000] Creating 5 MTD partitions on "spi0.0":
......
I have submitted a pull request.
Woo Hoo, this is my first commit to a open source project. I'm so happy!
Cheers
from u-boot_mod.
Hi @zwhfly,
Yep, you are right with that divider.
I have just tested your change on all supported SoCs and merged your pull request.
Woo Hoo, this is my first commit to a open source project. I'm so happy!
Congratulations! I hope it won't be your first and last commit :)
Regards!
from u-boot_mod.
Hi @pepe2k, thank you!
And thank you for this splendid project!
from u-boot_mod.
You're welcome!
from u-boot_mod.
👍
from u-boot_mod.
I have this problem too, but resolved now !
Connect your device using putty and set com port to 117000,n,8,1,none
from u-boot_mod.
I have this problem too, but resolved now !
Connect your device using putty and set com port to 117000,n,8,1,none
good , very helpful for me
from u-boot_mod.
Related Issues (20)
- uboot mod for Huawei B5328 HOT 10
- Mark Zbtlink ZBT-WE1526 image compatible with ZBT-WE2226
- bootloader stuck at reboot (Dragino) HOT 3
- support for ZBT WE826-Q HOT 1
- can't compile u-boot HOT 1
- MR3020 and 128kb u-boot image HOT 1
- no 955x.h 933x.h 934x.h found?
- support tp archer c7 qca9558 + ar8327n?
- if I hard-mod flash to 16MiB should I change this uboot? HOT 4
- Update u-boot HOT 9
- whether ar7242 support? HOT 2
- recovering from bad u-boot flash on Carambola 2 HOT 1
- u-boot for ZyXEL NBG6716 HOT 2
- Add improvements? HOT 1
- Does u-boot_mod can help me to revert to stock tp-link firmware? HOT 1
- MDIO_Busy Error after board revise HOT 3
- Caraboot 2.10 introduces startup fix to Carambola2 HOT 4
- Unbrick WR841N after wrong u-boot-flash HOT 4
- Firmware uploading is interrupted randomly by some packets HOT 4
- Your ftp server is down HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from u-boot_mod.