From nobody Sun Aug 28 08:15:32 2022 X-Original-To: freebsd-mips@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MFmbj5sZrz4b5nW for ; Sun, 28 Aug 2022 08:15:45 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MFmbh5NgKz3kNj for ; Sun, 28 Aug 2022 08:15:44 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-340f82c77baso14715047b3.1 for ; Sun, 28 Aug 2022 01:15:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=j5mLzd443HkEqmN1VJJtz6Iqp5dpgsQ6M8wUlf1wurc=; b=E89aoNzLzrsPCx0RHIgzy1mIO4a46LGBujWgE3egTTySkf/pPOtspW1zqNweCw6all Fy7IXjJr5GG4/lU9JAJqg29lusCgOHt3uXrfnpfHqSKNOLm/sA6kw/XpS4qqVWI+Q9Yz 2o/84byQ9l/hhMUal+tMgAjRgTv5/3CrYtz0xYkcxa2r4aX0ArZIKcM8J0EAKch3pCvm Px+mlS2tYVuPnZw5TtO+vC3Gl2mhIkk7jBeiYLNodMIxhFwGa63p+KZw7mCYsAU7dpi/ fBaU9fB2JUM2U6cP4ilvOC7H/Y171OmYpLSJMJnr0OZ78qUl3aEggF8pO8R2l6O38P0e I5Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=j5mLzd443HkEqmN1VJJtz6Iqp5dpgsQ6M8wUlf1wurc=; b=Oq4xKR9/rzSgiHBfXWuOZRzMxD1xRyzZZLGF5WnkNlB1MhgbpIDog3f6g7KmKXVAte MlfZOEgLl/fdcxMQwMvnDBmn/xe9BNhC2En4rQc7xLrl9qKRFJMJ5OBGBV2xgr02Zgvj O7ZOHxYlDB9Z4cAZfMJJ/7v3nLclQ/mJAAbNMT9VdmfI4azcKq1ICBQP0rdS9bYGMcqy 6zsDS/NQDj2b3UDNFB88W/CebVY/6CRWH675M2YSMcyuEHwa0+odLMtzECc5XtvX1NvM UEpRTklBJ3fGnaR6RAOPL/v4RaIJCNLjuweL7C3hqaBNyZW0j4dfFAgQ6YeMxMVGokrz DOlg== X-Gm-Message-State: ACgBeo1NYYSh/2r7nRlBc1QXvfwP04xD8ayrsQHdAIXuhX3TyoU/K7wl 4hXghJPM3ZoXeMV5vl+B9B9xuW0KTiZjOLnqYa2lxWkoKKk= X-Google-Smtp-Source: AA6agR7QVnZ+Va2oaZH9P9JwmQl23w2FtxrrZnA3oREvpqP6Ju4+5XoOkHNWhlDWPJYaCtI1FR5uT8334oFB+WRzBLs= X-Received: by 2002:a0d:c007:0:b0:324:8274:24cf with SMTP id b7-20020a0dc007000000b00324827424cfmr6205988ywd.213.1661674543985; Sun, 28 Aug 2022 01:15:43 -0700 (PDT) List-Id: Porting FreeBSD to MIPS List-Archive: https://lists.freebsd.org/archives/freebsd-mips List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-mips@freebsd.org MIME-Version: 1.0 References: <1424252983.14315.1660869185156.JavaMail.yahoo@mail.yahoo.co.jp> In-Reply-To: From: Archimedes Gaviola Date: Sun, 28 Aug 2022 16:15:32 +0800 Message-ID: Subject: Re: Ralink RT3050F To: Mori Hiroki Cc: "freebsd-mips@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000ed388605e748c000" X-Rspamd-Queue-Id: 4MFmbh5NgKz3kNj X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=E89aoNzL; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedes.gaviola@gmail.com designates 2607:f8b0:4864:20::112a as permitted sender) smtp.mailfrom=archimedes.gaviola@gmail.com X-Spamd-Result: default: False [-3.94 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_LONG(-0.97)[-0.974]; NEURAL_HAM_MEDIUM(-0.97)[-0.969]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-mips@freebsd.org]; MLMMJ_DEST(0.00)[freebsd-mips@freebsd.org]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::112a:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; TAGGED_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[yahoo.co.jp]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000ed388605e748c000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3D10,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 =3D 1243362 (12f8e2 hex) NetBootFileXferSize=3D 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 =3D 1.2 MB Load Address: 80001100 Entry Point: 80001100 Verifying Checksum ... OK Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recove= r 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]=3DBF000000 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D 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 =3D 0, is_RT3352 =3D 0 is_RT3350 =3D 1, is_RT5350 =3D 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 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" >> To: "freebsd-mips@freebsd.org" >> Date: 2022/08/18 =E6=9C=A8 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 >> >> --000000000000ed388605e748c000 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

After I successfully acc= essed 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 - mus= t RESET board to recover.

Any idea what have I mis= sed? 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'.

= =C2=A0TIMEOUT_COUNT=3D10,Load address: 0x80800000
Loading: Got ARP REQUE= ST, return our IP

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

RT3052 # bootm 0x80800000## Booting image at 80800000 ...
=C2=A0 =C2=A0Image Name: =C2=A0 FreeBS= D Kernel Image
=C2=A0 =C2=A0Created: =C2=A0 =C2=A0 =C2=A02022-08-18 =C2= =A0 5:51:56 UTC
=C2=A0 =C2=A0Image Type: =C2=A0 MIPS Linux Kernel Image = (lzma compressed)
=C2=A0 =C2=A0Data Size: =C2=A0 =C2=A01243298 Bytes =3D= =C2=A01.2 MB
=C2=A0 =C2=A0Load Address: 80001100
=C2=A0 =C2=A0Entry = Point: =C2=A080001100
=C2=A0 =C2=A0Verifying Checksum ... OK
=C2=A0 = =C2=A0Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to rec= over


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

SVN re= vision: 482
Target board: WRG-N23

Board: Ralink APSoC DRAM: =C2= =A032 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
******************************
=C2=A0Set info->start[0]=3DBF000000
=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Ralink UBoot Version: 3.5.1.0
--------= ------------------------------------
ASIC 3052_MP2 (Port5<->None)<= br>DRAM component: 256 Mbits SDR
DRAM bus: 16 bit
Total memory: 32 MB= ytes
Flash component: NOR Flash
Date:Jan 12 2011 =C2=A0Time:21:35:28<= br>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
icache: set= s:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:3= 2 ,total:16384
## Powering down port 0 ~ 3.

Please choose the ope= ration:
=C2=A0 =C2=A01: Load system code to SDRAM via TFTP.
=C2=A0 = =C2=A02: Load system code then write to Flash via TFTP.
=C2=A0 =C2=A03: = Boot system code via Flash (default).
=C2=A0 =C2=A04: Entr boot command = line interface.
=C2=A0 =C2=A07: Load Boot Loader code then write to Flas= h via Serial.
=C2=A0 =C2=A09: Load Boot Loader code then write to Flash = via TFTP. =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00

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

Starti= ng kernel ...

LINUX started...

=C2=A0THIS IS ASIC
is_RT305= 2 =3D 0, is_RT3352 =3D 0
is_RT3350 =3D 1, is_RT5350 =3D 0
Linux versi= on 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 1= 9, 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:<= br>
Hi.

0x80800000=C2=A0 is only u-boot image load offset. You will do bootm comman= d
on u-boot then start at 0x80001100 if you create this address by uboot_mkim= age .

Hiroki Mori

Hi Hiroki Mori,

Oh I see, got it, thanks for = the explanation!

Best regards,
Archimede= s
=C2=A0

----- Original Message -----

From: "Archimedes Gaviola" <archimedes.gaviola@gmail.com>
To: "fre= ebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Date: 2022/08/18 =E6=9C=A8 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.o= rg/mips/RT3052F. However, I want to know how this value 0x80800000 is d= erived for the tftpboot? My generated image entry point value address is 80= 001100.

root@freebsd114:/usr/obj/mips.mipsel/usr/src/sys/RT305X # readelf -h kernel= | grep 'Entry point address:'
=C2=A0Entry point address:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A00x80001= 100

Thanks and best regards,
Archimedes

--000000000000ed388605e748c000--