Re: Ralink RT3050F

From: Archimedes Gaviola <archimedes.gaviola_at_gmail.com>
Date: Sun, 28 Aug 2022 08:15:32 UTC
Hi,

After I successfully accessed the serial console, I proceeded to load the
kernel image (this is an old D-link DIR-600 (B2) Wi-Fi device) and
encountered this error ->

Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover.

Any idea what have I missed? After this failure, it booted to the default
image of the Linux system. Haven't flashed the image yet when this error
occurred.

TFTP from server 192.168.1.209; our IP address is 192.168.1.188
Filename 'dlink/kernel.bin.lzma.uboot'.

 TIMEOUT_COUNT=10,Load address: 0x80800000
Loading: Got ARP REQUEST, return our IP

ArpTimeoutCheck
Got ARP REPLY, set server/gtwy eth addr (b8:27:eb:64:8b:57)
Got it
#################################################################
         #################################################################
         #################################################################
         ################################################
done
Bytes transferred = 1243362 (12f8e2 hex)
NetBootFileXferSize= 0012f8e2

RT3052 # bootm 0x80800000
## Booting image at 80800000 ...
   Image Name:   FreeBSD Kernel Image
   Created:      2022-08-18   5:51:56 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1243298 Bytes =  1.2 MB
   Load Address: 80001100
   Entry Point:  80001100
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover


U-Boot 1.1.3 (Jan 12 2011 - 21:35:28) (ALPHA)

SVN revision: 482
Target board: WRG-N23

Board: Ralink APSoC DRAM:  32 MB
config usb..*** Error: D+/D- is 1/1, config usb failed.
..*** Error: D+/D- is 1/1, config usb failed.

******************************
Software System Reset Occurred
******************************

 Set info->start[0]=BF000000
============================================
Ralink UBoot Version: 3.5.1.0
--------------------------------------------
ASIC 3052_MP2 (Port5<->None)
DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MBytes
Flash component: NOR Flash
Date:Jan 12 2011  Time:21:35:28
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
## Powering down port 0 ~ 3.

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.
                                                         0

3: System Boot system code via Flash.
## Booting image at bf050000 ...
addr:bf050000
We have SEAMA, Image Size = 3506208
Verifying Checksum ...
Uncompressing SEAMA linux.lzma ... OK
## Transferring control to Linux (at address 81f46ec0) ...
## Giving linux memsize in MB, 32

Starting kernel ...

LINUX started...

 THIS IS ASIC
is_RT3052 = 0, is_RT3352 = 0
is_RT3350 = 1, is_RT5350 = 0
Linux version 2.6.33.2 (kwest@enzo) (gcc version 4.3.3 (GCC) ) #1 Fri Dec
10 17:24:50 CST 2010
...

Thanks and best regards,
Archimedes



On Fri, Aug 19, 2022 at 8:56 AM Archimedes Gaviola <
archimedes.gaviola@gmail.com> wrote:

>
>
> On Fri, Aug 19, 2022 at 8:33 AM Mori Hiroki <yamori813@yahoo.co.jp> wrote:
>
>> Hi.
>>
>> 0x80800000  is only u-boot image load offset. You will do bootm command
>> on u-boot then start at 0x80001100 if you create this address by
>> uboot_mkimage .
>>
>> Hiroki Mori
>>
>
> Hi Hiroki Mori,
>
> Oh I see, got it, thanks for the explanation!
>
> Best regards,
> Archimedes
>
>
>>
>> ----- Original Message -----
>>
>> From: "Archimedes Gaviola" <archimedes.gaviola@gmail.com>
>> To: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
>> Date: 2022/08/18 木 21:38
>> Subject: Ralink RT3050F
>>
>>
>> Hi,
>>
>> I have successfully compiled an RT3050F SoC kernel image with FreeBSD
>> 11.4-RELEASE by following this reference here
>> https://wiki.freebsd.org/mips/RT3052F. However, I want to know how this
>> value 0x80800000 is derived for the tftpboot? My generated image entry
>> point value address is 80001100.
>>
>> root@freebsd114:/usr/obj/mips.mipsel/usr/src/sys/RT305X # readelf -h
>> kernel | grep 'Entry point address:'
>>  Entry point address:       0x80001100
>>
>> Thanks and best regards,
>> Archimedes
>>
>>