From nobody Tue Aug 30 15:03:42 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 4MH9Yt6HCbz4ZgNP for ; Tue, 30 Aug 2022 15:04:02 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) (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 4MH9Yt0Lslz3vfl for ; Tue, 30 Aug 2022 15:04:02 +0000 (UTC) (envelope-from ray@ddteam.net) Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-11e7e0a63e2so16494043fac.4 for ; Tue, 30 Aug 2022 08:04:02 -0700 (PDT) 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:subject:date; bh=ii/IiR5u5n4q2D7dPa9ld4AgKNA1f91JWgKstpSzENA=; b=DAa9vAXB7A6O/iJyDQFaOh4Zf/qhPWKyfbu1JN+VsvUUFpYFlt8AVKv878Cimxktih plqhE9KT+qeAHTxc9aqDp1+PW1PnfDiuGe9tOGkpJYbz9Q6daLxf2hwksLKNP8aLHsei PEp0RDN9cAmupWjS3iI/cOakoTmyAIcVaGfuxIQHYg+FtdHvGPkys8Q05tiL75H8upRN +/mIkBXfPC5nc/KaObv+oGmgCBO4xM75YdH+pGiTaFEevhr1dDRtAAuovyaB85YJBSvL OjmvjE3XZ2leGR7BSEO3DlBD4XZd39wMOjf+/Dt+jbGaZA8l+1R2ZNG3poMCuq/UJnvl 6hVg== X-Gm-Message-State: ACgBeo3FUjcBtHudeiZF8b3xzw4bljuWAgEVa64uDwZmeQTWO5ECUG/1 oaCvaF9P5TD0rkSy9vpz17gEJlq3DD4F7k2Tf+wWkg== X-Google-Smtp-Source: AA6agR43gfex6OyLEuoWqBaed98y6DdnvJUfcDIltrw1eijtD2j86N3oAeiqgoCq7me7s50UZCtTpWoa1stTWuFH0K4= X-Received: by 2002:a05:6870:961f:b0:10b:ad08:8909 with SMTP id d31-20020a056870961f00b0010bad088909mr10031249oaq.269.1661871839466; Tue, 30 Aug 2022 08:03:59 -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: Aleksandr Rybalko Date: Tue, 30 Aug 2022 18:03:42 +0300 Message-ID: Subject: Re: Ralink RT3050F To: Archimedes Gaviola Cc: Mori Hiroki , "freebsd-mips@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000a76d5905e776b021" X-Rspamd-Queue-Id: 4MH9Yt0Lslz3vfl X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 209.85.160.50 is neither permitted nor denied by domain of ray@ddteam.net) smtp.mailfrom=ray@ddteam.net X-Spamd-Result: default: False [-2.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[ray@dlink.ua,ray@ddteam.net]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.160.50:from]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_THREE(0.00)[3]; TAGGED_RCPT(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-mips@freebsd.org]; DMARC_NA(0.00)[dlink.ua]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[freebsd-mips@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.50:from]; FREEFALL_USER(0.00)[ray]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; R_SPF_SOFTFAIL(0.00)[~all]; TO_DN_SOME(0.00)[]; FREEMAIL_CC(0.00)[yahoo.co.jp,freebsd.org]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[ray@dlink.ua,ray@ddteam.net]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --000000000000a76d5905e776b021 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Archimedes, for a good start you can setup bootp, since network working. Otherwise use geom_map to split flash into parts and put ulzma compressed rootfs into a filesystem partition. After deletion of MIPS support from the tree, interest in it grew :) Thanks. =D0=BF=D0=BD, 29 =D1=81=D0=B5=D1=80=D0=BF. 2022 =D1=80. =D0=BE 05:21 Archim= edes Gaviola < archimedes.gaviola@gmail.com> =D0=BF=D0=B8=D1=88=D0=B5: > On Sun, Aug 28, 2022 at 4:15 PM Archimedes Gaviola < > archimedes.gaviola@gmail.com> wrote: > >> Hi, >> >> After I successfully accessed the serial console, I proceeded to load th= e >> 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 recove= r. >> >> Any idea what have I missed? After this failure, it booted to the defaul= t >> 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 >> 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]=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 >> > > Hi, > > Alright I made some progress, I used gzip compression instead of LZMA and > the kernel image is now booting. > > 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 ... > Image Name: FreeBSD Kernel Image > Created: 2022-08-29 1:55:22 UTC > Image Type: MIPS Linux Kernel Image (gzip compressed) > Data Size: 1724519 Bytes =3D 1.6 MB > Load Address: 80001100 > Entry Point: 80001100 > Verifying Checksum ... OK > Uncompressing Kernel Image ... OK > > Starting kernel ... > > U-Boot args (from 0 args): > None > Environment: > entry: mips_init() > Cache info: > picache_stride =3D 4096 > picache_loopcount =3D 8 > pdcache_stride =3D 4096 > pdcache_loopcount =3D 4 > cpu0: MIPS Technologies processor v76.150 > 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 128 sets, 32 bytes per line > L2 cache: disabled > Config1=3D0xbea3319e > Config2=3D0x80000000 > Config3=3D0x420 > Physical memory chunk(s): > 0x438000 - 0x1ffffff, 29130752 bytes (7112 pages) > Maxmem is 0x2000000 > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2020 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 11.4-RELEASE #1: Sun Aug 28 18:35:56 UTC 2022 > root@:/usr/obj/mips.mipsel/usr/src/sys/RT305X mips > gcc version 4.2.1 20070831 patched [FreeBSD] > Preloaded elf kernel "kernel" at 0x804323d0. > real memory =3D 33554432 (32768K bytes) > Physical memory chunk(s): > 0x004c4000 - 0x01f46fff, 27799552 bytes (6787 pages) > avail memory =3D 27365376 (26MB) > ULE: setup cpu 0 > wlan: <802.11 Link Layer> > random: entropy device external interface > mem: > null: > nfslock: pseudo-device > nexus0: > random: harvesting attach, 8 bytes (4 bits) from nexus0 > nvram2env0: base=3D0x1f030000 sig=3D0xe5e60a74 maxsize=3D0x00002000 > flags=3D0x00000003 > nvram2env1: base=3D0x1f032000 sig=3D0x5a045e94 maxsize=3D0x00004000 > flags=3D0x00000003 > clock0: on nexus0 > Timecounter "MIPS32" frequency 192000000 Hz quality 800 > Event timer "MIPS32" frequency 192000000 Hz quality 800 > random: harvesting attach, 8 bytes (4 bits) from clock0 > obio0 at mem 0x10000000-0x1fffffff on nexus0 > rt305x_sysctl0: at mem > 0x10000000-0x100000ff irq 0 on obio0 > Chip ID: "RT3350 " > SYSCTL_SYSCFG=3D0x3400000 > GE0 mode 3 > Boot from 0x1f000000 > Boot from 0 > Bootstrap test code 0 > SRAM_CS mode 0 > 8mA SDRAM_CLK driving > SYSCTL_CLKCFG0=3D0x40000000 > SDRAM_CLK_SKEW 1ns > SYSCTL_CLKCFG1=3D0x04283c > USB OTG clock is enabled > I2S clock is internal 15.625MHz > I2S clock divider 40 > PCM clock is internal 15.625MHz > PCM clock divider 60 > SYSCTL_GPIOMODE=3D0x00039c > random: harvesting attach, 8 bytes (4 bits) from rt305x_sysctl0 > rt305x_ic0: at mem > 0x10000200-0x100002ff on obio0 > random: harvesting attach, 8 bytes (4 bits) from rt305x_ic0 > uart0: at mem 0x10000500-0x100005ff irq 5 on obio0 > uart0: fast interrupt > uart0: PPS capture mode: DCDinvalid > random: harvesting attach, 8 bytes (4 bits) from uart0 > gpio0: at mem 0x10000600-0x100006ff irq 6 on obio0 > gpio0: Use reset_gpio 10 > gpiobus0: on gpio0 > gpiobus0: at pin 0 > gpiobus0: at pin 7 > gpioled0: at pin 8 on gpiobus0 > random: harvesting attach, 8 bytes (4 bits) from gpioled0 > gpioled1: at pin 9 on gpiobus0 > random: harvesting attach, 8 bytes (4 bits) from gpioled1 > gpiobus0: at pin 10 > gpiobus0: at pin 11 > gpioled2: at pin 14 on gpiobus0 > random: harvesting attach, 8 bytes (4 bits) from gpioled2 > random: harvesting attach, 8 bytes (4 bits) from gpiobus0 > gpioc0: on gpio0 > random: harvesting attach, 8 bytes (4 bits) from gpioc0 > random: harvesting attach, 8 bytes (4 bits) from gpio0 > uart1: at mem 0x10000c00-0x10000cff irq 12 on obio0 > uart1: console (115200,n,8,1) > uart1: fast interrupt > uart1: PPS capture mode: DCDinvalid > random: harvesting attach, 8 bytes (4 bits) from uart1 > random: harvesting attach, 8 bytes (4 bits) from obio0 > rt0: at mem 0x10100000-0x1010ffff > irq 3 on nexus0 > rt0: RT305XF Ethernet MAC (rev 0x00000000) > rt0: use hardcoded 00:18:e7:d5:83:90 macaddr > rt0: bpf attached > rt0: Ethernet address: 00:18:e7:d5:83:90 > random: harvesting attach, 8 bytes (4 bits) from rt0 > Device configuration finished. > Timecounters tick every 10.000 msec > vlan: initialized, using hash tables with chaining > lo0: bpf attached > tcp_init: net.inet.tcp.tcbhashsize auto tuned to 512 > bootpc_init: wired to interface 'rt0' > Sending DHCP Discover packet from interface rt0 (00:18:e7:d5:83:90) > Received DHCP Offer packet on rt0 from 192.168.1.1 (accepted) > Received DHCP Offer packet on rt0 from 192.168.1.1 (ignored) > Sending DHCP Request packet from interface rt0 (00:18:e7:d5:83:90) > Received DHCP Ack packet on rt0 from 192.168.1.1 (accepted) > rt0 at 192.168.1.225 server 192.168.1.1 > subnet mask 255.255.255.0 router 192.168.1.1 > Adjusted interface rt0 > Trying to mount root from cd9660:/dev/map/rootfs.uzip []... > mountroot: waiting for device /dev/map/rootfs.uzip... > Mounting from cd9660:/dev/map/rootfs.uzip failed with error 19. > > Loader variables: > > Manual root filesystem specification: > : [options] > Mount using filesystem > and with the specified (optional) option list. > > eg. ufs:/dev/da0s1a > zfs:tank > cd9660:/dev/cd0 ro > (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) > > ? List valid disk boot devices > . Yield 1 second (for background tasks) > Abort manual input > > mountroot> > > Another challenge is this last part on mounting the root filesystem? Any > ideas? I'm almost there. > > 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 comman= d >>>> 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 >>>> >>>> --=20 WBW ------- Rybalko Aleksandr aka Alex RAY D-Link.ua --000000000000a76d5905e776b021 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hey Archim= edes,
<= span>
for a good start you can setup bootp, since network working.
Otherw= ise use geom_map to split flash into parts and put ulzma compressed rootfs = into a filesystem partition.

After deletion of MIPS support from th= e tree, interest in it grew :)

Thanks.

=D0=BF=D0=BD, 29 =D1=81=D0=B5=D1=80=D0=BF. 2022 =D1=80. =D0=BE 05:21 Archi= medes Gaviola <archimede= s.gaviola@gmail.com> =D0=BF=D0=B8=D1=88=D0=B5:
On Sun, Aug 28, 2022 at 4:15 P= M Archimedes Gaviola <archimedes.gaviola@gmail.com> wrote:
Hi,
=

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

Uncom= pressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover.
=

Any idea what have I missed? After this failure, it boo= ted 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

Hi,

Alright I made some progress, I used gzip= compression instead of LZMA and the kernel image is now booting.

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 ...
=C2=A0 = =C2=A0Image Name: =C2=A0 FreeBSD Kernel Image
=C2=A0 =C2=A0Created: =C2= =A0 =C2=A0 =C2=A02022-08-29 =C2=A0 1:55:22 UTC
=C2=A0 =C2=A0Image Type: = =C2=A0 MIPS Linux Kernel Image (gzip compressed)
=C2=A0 =C2=A0Data Size:= =C2=A0 =C2=A01724519 Bytes =3D =C2=A01.6 MB
=C2=A0 =C2=A0Load Address: = 80001100
=C2=A0 =C2=A0Entry Point: =C2=A080001100
=C2=A0 =C2=A0Verify= ing Checksum ... OK
=C2=A0 =C2=A0Uncompressing Kernel Image ... OK
Starting kernel ...

U-Boot args (from 0 args):
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 None
Environment:
entry: mips_init()
Cache info:
= =C2=A0 picache_stride =C2=A0 =C2=A0=3D 4096
=C2=A0 picache_loopcount =3D= 8
=C2=A0 pdcache_stride =C2=A0 =C2=A0=3D 4096
=C2=A0 pdcache_loopcou= nt =3D 4
cpu0: MIPS Technologies processor v76.150
=C2=A0 MMU: Standa= rd TLB, 32 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes)
=C2=A0 L1 = i-cache: 4 ways of 256 sets, 32 bytes per line
=C2=A0 L1 d-cache: 4 ways= of 128 sets, 32 bytes per line
=C2=A0 L2 cache: disabled
=C2=A0 Conf= ig1=3D0xbea3319e<PerfCount,WatchRegs,MIPS16,EJTAG>
=C2=A0 Config2= =3D0x80000000
=C2=A0 Config3=3D0x420
Physical memory chunk(s):
0x4= 38000 - 0x1ffffff, 29130752 bytes (7112 pages)
Maxmem is 0x2000000
KD= B: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 199= 2-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, = 1989, 1991, 1992, 1993, 1994
=C2=A0 =C2=A0 =C2=A0 =C2=A0 The Regents of = the University of California. All rights reserved.
FreeBSD is a register= ed trademark of The FreeBSD Foundation.
FreeBSD 11.4-RELEASE #1: Sun Aug= 28 18:35:56 UTC 2022
=C2=A0 =C2=A0 root@:/usr/obj/mips.mipsel/usr/src/s= ys/RT305X mips
gcc version 4.2.1 20070831 patched [FreeBSD]
Preloaded= elf kernel "kernel" at 0x804323d0.
real memory =C2=A0=3D 3355= 4432 (32768K bytes)
Physical memory chunk(s):
0x004c4000 - 0x01f46fff= , 27799552 bytes (6787 pages)
avail memory =3D 27365376 (26MB)
ULE: s= etup cpu 0
wlan: <802.11 Link Layer>
random: entropy device ext= ernal interface
mem: <memory>
null: <full device, null devic= e, zero device>
nfslock: pseudo-device
nexus0: <MIPS32 root nex= us>
random: harvesting attach, 8 bytes (4 bits) from nexus0
nvram2= env0: base=3D0x1f030000 sig=3D0xe5e60a74 maxsize=3D0x00002000 flags=3D0x000= 00003
nvram2env1: base=3D0x1f032000 sig=3D0x5a045e94 maxsize=3D0x0000400= 0 flags=3D0x00000003
clock0: <Generic MIPS32 ticker> on nexus0
= Timecounter "MIPS32" frequency 192000000 Hz quality 800
Event = timer "MIPS32" frequency 192000000 Hz quality 800
random: harv= esting attach, 8 bytes (4 bits) from clock0
obio0 at mem 0x10000000-0x1f= ffffff on nexus0
rt305x_sysctl0: <RT305X System Control driver> at= mem 0x10000000-0x100000ff irq 0 on obio0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Ch= ip ID: "RT3350 =C2=A0"
=C2=A0 =C2=A0 SYSCTL_SYSCFG=3D0x3400000=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 GE0 mode 3
=C2=A0 =C2=A0 =C2=A0 =C2=A0 B= oot from 0x1f000000
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Boot from 0
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 Bootstrap test code 0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 S= RAM_CS mode 0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 8mA SDRAM_CLK driving
=C2= =A0 =C2=A0 SYSCTL_CLKCFG0=3D0x40000000
=C2=A0 =C2=A0 =C2=A0 =C2=A0 SDRAM= _CLK_SKEW 1ns
=C2=A0 =C2=A0 SYSCTL_CLKCFG1=3D0x04283c
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 USB OTG clock is enabled
=C2=A0 =C2=A0 =C2=A0 =C2=A0 I2S c= lock is internal 15.625MHz
=C2=A0 =C2=A0 =C2=A0 =C2=A0 I2S clock divider= 40
=C2=A0 =C2=A0 =C2=A0 =C2=A0 PCM clock is internal 15.625MHz
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 PCM clock divider 60
=C2=A0 =C2=A0 SYSCTL_GPIOM= ODE=3D0x00039c
random: harvesting attach, 8 bytes (4 bits) from rt305x_s= ysctl0
rt305x_ic0: <RT305X Interrupt Controller driver> at mem 0x1= 0000200-0x100002ff on obio0
random: harvesting attach, 8 bytes (4 bits) = from rt305x_ic0
uart0: <rt305x_uart> at mem 0x10000500-0x100005ff = irq 5 on obio0
uart0: fast interrupt
uart0: PPS capture mode: DCDinva= lid
random: harvesting attach, 8 bytes (4 bits) from uart0
gpio0: <= ;RT305X GPIO driver> at mem 0x10000600-0x100006ff irq 6 on obio0
gpio= 0: =C2=A0Use reset_gpio 10
gpiobus0: <GPIO bus> on gpio0
gpiobu= s0: <unknown device> at pin 0
gpiobus0: <unknown device> at = pin 7
gpioled0: <GPIO led> at pin 8 on gpiobus0
random: harvest= ing attach, 8 bytes (4 bits) from gpioled0
gpioled1: <GPIO led> at= pin 9 on gpiobus0
random: harvesting attach, 8 bytes (4 bits) from gpio= led1
gpiobus0: <unknown device> at pin 10
gpiobus0: <unknown= device> at pin 11
gpioled2: <GPIO led> at pin 14 on gpiobus0random: harvesting attach, 8 bytes (4 bits) from gpioled2
random: harv= esting attach, 8 bytes (4 bits) from gpiobus0
gpioc0: <GPIO controlle= r> on gpio0
random: harvesting attach, 8 bytes (4 bits) from gpioc0random: harvesting attach, 8 bytes (4 bits) from gpio0
uart1: <rt30= 5x_uart> at mem 0x10000c00-0x10000cff irq 12 on obio0
uart1: console = (115200,n,8,1)
uart1: fast interrupt
uart1: PPS capture mode: DCDinva= lid
random: harvesting attach, 8 bytes (4 bits) from uart1
random: ha= rvesting attach, 8 bytes (4 bits) from obio0
rt0: <Ralink RT3050 onCh= ip Ethernet driver> at mem 0x10100000-0x1010ffff irq 3 on nexus0
rt0:= RT305XF Ethernet MAC (rev 0x00000000)
rt0: use hardcoded 00:18:e7:d5:83= :90 macaddr
rt0: bpf attached
rt0: Ethernet address: 00:18:e7:d5:83:9= 0
random: harvesting attach, 8 bytes (4 bits) from rt0
Device configu= ration finished.
Timecounters tick every 10.000 msec
vlan: initialize= d, using hash tables with chaining
lo0: bpf attached
tcp_init: net.in= et.tcp.tcbhashsize auto tuned to 512
bootpc_init: wired to interface = 9;rt0'
Sending DHCP Discover packet from interface rt0 (00:18:e7:d5:= 83:90)
Received DHCP Offer packet on rt0 from 192.168.1.1 (accepted)
= Received DHCP Offer packet on rt0 from 192.168.1.1 (ignored)
Sending DHC= P Request packet from interface rt0 (00:18:e7:d5:83:90)
Received DHCP Ac= k packet on rt0 from 192.168.1.1 (accepted)
rt0 at 192.168.1.225 server = 192.168.1.1
subnet mask 255.255.255.0 router 192.168.1.1
Adjusted int= erface rt0
Trying to mount root from cd9660:/dev/map/rootfs.uzip []...mountroot: waiting for device /dev/map/rootfs.uzip...
Mounting from cd= 9660:/dev/map/rootfs.uzip failed with error 19.

Loader variables:
Manual root filesystem specification:
=C2=A0 <fstype>:<dev= ice> [options]
=C2=A0 =C2=A0 =C2=A0 Mount <device> using filesy= stem <fstype>
=C2=A0 =C2=A0 =C2=A0 and with the specified (optiona= l) option list.

=C2=A0 =C2=A0 eg. ufs:/dev/da0s1a
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 zfs:tank
=C2=A0 =C2=A0 =C2=A0 =C2=A0 cd9660:/dev/cd0 ro=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (which is equivalent to: mount -t cd966= 0 -o ro /dev/cd0 /)

=C2=A0 ? =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 List valid disk boot devices
=C2=A0 . =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 Yield 1 second (for background tasks)
=C2=A0= <empty line> =C2=A0 =C2=A0Abort manual input

mountroot>

Another challenge is this last part on mounting the = root filesystem? Any ideas? I'm almost there.

<= div>Thanks and best regards,
Archimedes
=C2=A0
=



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

On Fri, = Aug 19, 2022 at 8:33 AM Mori Hiroki <yamori813@yahoo.co.jp> wrote:
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



--
WBW
-------
Rybalko Aleksandr <ray@dlink.ua>
aka Alex RAY <ray@ddteam.net>
= D-Link.ua
--000000000000a76d5905e776b021--