Modify ↓
Opened 4 years ago
Closed 4 years ago
#14417 closed defect (fixed)
TD-W8970 ramdisk does not boot
Reported by: | fld@… | Owned by: | developers |
---|---|---|---|
Priority: | normal | Milestone: | Chaos Calmer 15.05 |
Component: | toolchain | Version: | Trunk |
Keywords: | td-w8970, tdw8970, xrx200, vr9, lantiq | Cc: |
Description
$ svn info Path: . URL: svn://svn.openwrt.org/openwrt/trunk Repository Root: svn://svn.openwrt.org/openwrt Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73 Revision: 38578 Node Kind: directory Schedule: normal Last Changed Author: nbd Last Changed Rev: 38578 Last Changed Date: 2013-10-29 16:12:06 +0200 (Tue, 29 Oct 2013)
make menuconfig options used:
Target System -> Lantiq GPON/XWAY/SVIP Subtarget -> XRX200 Target Profile -> TP-LINK TD-W8970 Target Images -> ramdisk ---> Compression ---> lzma
Start the tftp server:
$ sudo dnsmasq -d --port=0 --enable-tftp --tftp-root=/home/fld/openwrt/trunk/bin/lantiq/ dnsmasq: started, version 2.62 DNS disabled dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack dnsmasq-tftp: TFTP root is /home/fld/openwrt/trunk/bin/lantiq/
In the TP-Link TD-W8970 serial console:
ROM VER: 1.1.4 CFG 05 ROM VER: 1.1.4 CFG 05 DDR autotuning Rev 0.3d DDR size from 0xa0000000 - 0xa3ffffff DDR check ok... start booting... U-Boot 2010.06-LANTIQ-v-2.0.40-svn2583 (Oct 26 2012 - 12:15:55) CLOCK CPU 500M RAM 250M DRAM: 64 MiB Using default environment In: serial Out: serial Err: serial Net: Internal phy(GE) firmware version: 0x841d vr9 Switch8192 KiB EN25Q64 at 0:3 is now current device Type "run flash_nfs" to mount root filesystem over NFS Hit any key to stop autoboot: 0 VR9 # ttt Unknown command 'ttt' - try 'help' VR9 # setenv ipaddr 192.168.0.3 VR9 # setenv serverip 192.168.0.99 VR9 # setenv bootargs 'board=WD8970' VR9 # tftpboot openwrt-lantiq-xrx200-vmlinux-initramfs.elf 8192 KiB EN25Q64 at 0:3 is now current device Using vr9 Switch device TFTP from server 192.168.0.99; our IP address is 192.168.0.3 Filename 'openwrt-lantiq-xrx200-vmlinux-initramfs.elf'. Load address: 0x80800000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############################################## done Bytes transferred = 8308268 (7ec62c hex) VR9 # go 0x80800000 ## Starting application at 0x80800000 ... ROM VER: 1.1.4 CFG 05 DDR autotuning Rev 0.3d DDR size from 0xa0000000 - 0xa3ffffff DDR check ok... start booting... U-Boot 2010.06-LANTIQ-v-2.0.40-svn2583 (Oct 26 2012 - 12:15:55) CLOCK CPU 500M RAM 250M DRAM: 64 MiB Using default environment In: serial Out: serial Err: serial Net: Internal phy(GE) firmware version: 0x841d vr9 Switch8192 KiB EN25Q64 at 0:3 is now current device Type "run flash_nfs" to mount root filesystem over NFS Hit any key to stop autoboot: 0 8192 KiB EN25Q64 at 0:3 is now current device 8192 KiB EN25Q64 at 0:3 is now current device Uncompressing ... Starting kernel ... Lantiq xDSL CPE VR9 mips_hpt_frequency = 250000000, counter_resolution = 2 Linux version 2.6.32.32 (wuzhiqin@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #13 Wed Nov 28 10:49:15 CST 2012
As we can see the device just resets when trying to boot the .elf image.
A workaround I found to work very well:
--- target/linux/lantiq/image/Makefile.orig 2013-11-02 15:35:59.263312561 +0200 +++ target/linux/lantiq/image/Makefile 2013-11-03 19:16:15.945276320 +0200 @@ -141,20 +141,23 @@ $(CP) $(KDIR)/vmlinux-initramfs-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs endif endef define Image/BuildKernelTPLink/Template $(call PatchKernelLzma,$(1)) $(call TPLinkImageLzma,$(1),$(2)) $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) $(call PatchKernelLzma,$(1),-initramfs) + $(call TPLinkImageLzma,$(1),$(2),-initramfs) + $(CP) $(KDIR)/uImage-$(1)-initramfs $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage-initramfs + $(call PatchKernelLzma,$(1),-initramfs) $(call Image/BuildLoader/Template,$(1),-initramfs) $(CP) $(KDIR)/loader-initramfs-$(1).bin $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs-loader $(CP) $(KDIR)/vmlinux-initramfs-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs endif endef define Image/BuildKernelEVA/Template $(call PatchKernelLzma,$(1)) $(call MkImageEVA,$(1)) $(CP) $(KDIR)/$(1).eva.align.64k $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva.align.64k
Now lets try it in the TD-W8970 serial console:
ROM VER: 1.1.4 CFG 05 ROM VER: 1.1.4 CFG 05 DDR autotuning Rev 0.3d DDR size from 0xa0000000 - 0xa3ffffff DDR check ok... start booting... U-Boot 2010.06-LANTIQ-v-2.0.40-svn2583 (Oct 26 2012 - 12:15:55) CLOCK CPU 500M RAM 250M DRAM: 64 MiB Using default environment In: serial Out: serial Err: serial Net: Internal phy(GE) firmware version: 0x841d vr9 Switch8192 KiB EN25Q64 at 0:3 is now current device Type "run flash_nfs" to mount root filesystem over NFS Hit any key to stop autoboot: 0 VR9 # VR9 # setenv ipaddr 192.168.0.3 VR9 # setenv serverip 192.168.0.99 VR9 # setenv bootargs 'board=WD8970' VR9 # tftpboot openwrt-lantiq-xrx200-TDW8970-uImage-initramfs 8192 KiB EN25Q64 at 0:3 is now current device Using vr9 Switch device TFTP from server 192.168.0.99; our IP address is 192.168.0.3 Filename 'openwrt-lantiq-xrx200-TDW8970-uImage-initramfs'. Load address: 0x80800000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ####### done Bytes transferred = 5818359 (58c7f7 hex) VR9 # bootm Uncompressing ... Starting kernel ... [ 0.000000] Linux version 3.10.17 (fld@HA) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2013.05 r38578) ) #40 Tue Nov 5 16:21:26 EET 2013 [ 0.000000] SoC: VR9 rev 1.2 [ 0.000000] bootconsole [early0] enabled [ 0.000000] CPU revision is: 00019556 (MIPS 34Kc) [ 0.000000] MIPS: machine is TDW8970 - TP-LINK TD-W8970 ...
Attachments (0)
Change History (3)
comment:1 Changed 4 years ago by anonymous
comment:2 Changed 4 years ago by fam@…
openwrt boot from flash spi TD8970
http://openrouter.info/forum/viewtopic.php?t=2727&p=32016#p32016
write sf command to flash
comment:3 Changed 4 years ago by blogic
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Thank you very much!! It works for me (TD-W8970)