Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 May 2016 16:46:05 +0200
From:      Willem Jan Withagen <wjw@digiware.nl>
To:        Stanislav Galabov <sgalabov@gmail.com>, freebsd-mips@freebsd.org
Subject:   Re: Mediatek / Ralink status
Message-ID:  <572616AD.4020706@digiware.nl>
In-Reply-To: <79DA8224-E857-4B86-81EC-D7A9E765E201@gmail.com>
References:  <79DA8224-E857-4B86-81EC-D7A9E765E201@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28-4-2016 16:11, Stanislav Galabov wrote:
> Hi all,
>
> Just to let you know, basic support for the following Mediatek/Ralink
> SoCs (with FDT) should now be in -head [1]: RT3050, RT3052, RT3350,
> RT3352, RT5350, RT3662, RT3883, RT5350, MT7620 (A and N versions),
> MT7621, MT7628 and MT7688.
>
> The following are the kernel configurations for the SoCs: RT3050_FDT
> -> for RT3050, RT3052 and RT3350 SoCs RT3352_FDT -> for RT3352 SoC
> RT3883_FDT -> for RT3662 and RT3883 SoCs RT5350_FDT -> for RT5350
> SoC MT7620A_FDT -> for MT7620A SoC MT7620N_FDT -> for MT7620N SoC
> MT7621_FDT -> for MT7621 SoC MT7628_FDT -> for MT7628 and MT7688
> SoCs
>
> The DTS files for the supported SoCs and boards can be found in
> sys/gnu/dts/mips.
>
> When compiling a kernel for a given board, the following should be
> taken into account: 1. Which SoC is the target board using. 2. Which
> DTS file describes the target board.
>
> For example, if we look at the WiTi board, the SoC is MT7621 and the
> DTS file name is WITI.dts.
>
> So, when building the kernel, we can follow the instructions at [2]
> (thanks, ray) and just replace the actual build line (the line after
> "Build mipsel toolchain and then kernel:”) with: bmake
> KERNCONF=<kern_name> FDT_DTS_FILE=<dts_name> TARGET=mips
> TARGET_ARCH=mipsel kernel-toolchain buildkernel where: - kern_name is
> the name of the kernel which supports the target SoC from the above
> list - dts_name is the name of the DTS file for the target board as
> found in sys/gnu/dts/mips.
>
> So, again, for the WiTi board, we’d have: bmake KERNCONF=MT7621_FDT
> FDT_DTS_FILE=WITI.dts TARGET=mips TARGET_ARCH=mipsel kernel-toolchain
> buildkernel
>
> Because this question was raised before, where the wiki page [2]
> refers to oldlzma or lzma 4.17, I actually have successfully used
> lzma-4.32.7 from here (built from source) [3].
>
> At the moment the following things are supposed to be supported,
> depending on whether the target SoC has support for them: interrupt
> controllers, pinmux, gpio, uart, spi, usb (otg/ehci, ohci/xhci),
> ethernet, pci.
>
> I would appreciate feedback on all this. I’ve tried to test with most
> of the SoCs listed above, but I don’t have RT3350 and MT7628 and I
> fried my last RT3052 in another experiment recently, so I haven’t
> tested specifically on these. I have, however, tested on RT3050
> (supported by the same kernel as the RT3052 and RT3350) and MT7688
> (supported by the same kernel as MT7628) and things seem fine on my
> boards. Who knows, though? I may have missed something..
>
> Best wishes, Stanislav
>
> [1] - https://svnweb.freebsd.org/changeset/base/298501 [2] -
> https://wiki.freebsd.org/FreeBSD/mips/RT3052F [3] -
> http://tukaani.org/lzma/lzma-4.32.7.tar.gz

Hi Stanislav,

I'm trying to boot my Witi board with the new -head.
On previous occasions I build a MT6720 version that booted. (I even
ignored the compression step for the time being, since lzma was giving
trouble)
And that worked for all things that were available then. (Even mounted a 
disk)

Got ARP REPLY, set server/gtwy eth addr (1c:6f:65:82:ec:12)
Got it
#################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          ###################################
done
Bytes transferred = 3838128 (3a90b0 hex)
NetBootFileXferSize= 003a90b0
Automatic boot of image at addr 0x80A00000 ...
## Booting image at 80a00000 ...
    Image Name:   FreeBSD Kernel Image
    Image Type:   MIPS Linux Kernel Image (uncompressed)
    Data Size:    3838064 Bytes =  3.7 MB
    Load Address: 80001100
    Entry Point:  80001100
    Verifying Checksum ... OK
OK
No initrd
## Transferring control to Linux (at address 80001100) ...
## Giving linux memsize in MB, 256

Starting kernel ...

FDT DTB at: 0x8037f570
CPU  clock:  880MHz
SYS  clock:  220MHz
UART clock:   50MHz

U-Boot args (from 0 args):
         None
Environment:
         memsize=256
         initrd_start=0x00000000
         initrd_size=0x0
         flash_start=0x00000000
         flash_size=0x1000000
entry: mips_init()
RAM size: 256MB (from memsize)
Cache info:
   picache_stride    = 4096
   picache_loopcount = 8
   pdcache_stride    = 4096
   pdcache_loopcount = 8
cpu0: MIPS Technologies processor v47.153
   MMU: Standard TLB, 32 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes)
   L1 i-cache: 4 ways of 256 sets, 32 bytes per line
   L1 d-cache: 4 ways of 256 sets, 32 bytes per line
   L2 cache: 8 ways of 1024 sets, 32 bytes per line, 256 KiB total size
   Config1=0xbea3519e<PerfCount,WatchRegs,MIPS16,EJTAG>
   Config2=0x80000447
   Config3=0x2000242c
Physical memory chunk(s):
0x434000 - 0xfffffff, 264028160 bytes (64460 pages)
Maxmem is 0x10000000
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2016 The FreeBSD Project.
[And the stuff boots.]

Now doing the same with the new kernel, it gets stuck at:

Bytes transferred = 5109292 (4df62c hex)
NetBootFileXferSize= 004df62c
Automatic boot of image at addr 0x80A00000 ...
## Booting image at 80a00000 ...
    Image Name:   FreeBSD Kernel Image
    Image Type:   MIPS Linux Kernel Image (uncompressed)
    Data Size:    5109228 Bytes =  4.9 MB
    Load Address: 80001100
    Entry Point:  80001100
    Verifying Checksum ... OK
OK
No initrd
## Transferring control to Linux (at address 80001100) ...
## Giving linux memsize in MB, 256

Starting kernel ...
[ And then the system freezes ]

Any suggestions on how to diagnose this freeze?

Thanx,
--WjW



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?572616AD.4020706>