From nobody Mon Aug 29 02:15:13 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 4MGDYm68tkz4ZyV6 for ; Mon, 29 Aug 2022 02:15:40 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) (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 4MGDYm1jF3z3Hq8 for ; Mon, 29 Aug 2022 02:15:40 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-33dce2d4bc8so163425637b3.4 for ; Sun, 28 Aug 2022 19:15:40 -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=hSE020nxYDPXBElTonBCEFrK2h5vW49c4FqGdlvrLso=; b=A9Vka31g78Wp+7ilppUcrUSTirKOg8CDq8y6pvtJT6JwCgiNmQdgoCwvf6XaqL7BQp rVSQbAPL+yduiM8JrfTno8dJE3xR/XMXyvHCfRUGSsMI6x13spcfh0jUUS92vZjROLUT yg2f1bvpaklbHt6hYVL7d5mEJ6dgCOoqtGGhegVLISuKVJe7Ls66RoVfN39chz2dhbgc kg07W0BygzjhCjtulWVBpAGa08wqUeDdAZT2nPidpYTP5G+9j5CFr67iMoUOuwyQwUAN bN+s8xIwFfNyfcKBNQlhWU71SzWXO78gYH4DNi/4Ms204LBC8mCgQryA9cug/G0A0CTV FedQ== 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=hSE020nxYDPXBElTonBCEFrK2h5vW49c4FqGdlvrLso=; b=kxGTJrsLsuHq9zIdKDL1Ah0S7/xFp1rtPCrXusSVZpFacKzOLtmo8V2WXjbaHFqaLl aTTPFqlffagbwiGkABcCCbteLL+Y3bPOc4g8sVAY2gftEuW2hTvNU8e3RAfhufW/kJnl OodPNNoinSGfYbFX6tv74VyrNB55HG08wfnlAFZgbCbYnFBPR48xTH6uGkHg5LTtTMt+ 0E/vm0uxf4pfaDHn/iTSP/sV6GhOJOebjn44tZVkb60wwBfbsxmlq1ydONxZ/CjceBJw jabgVtMsCNCVNKpV+Y4o3icE+QiNwx+CGMCyF7/IwqzNsGRUbUU2CtFh6Ki43vF7xlDg aJkQ== X-Gm-Message-State: ACgBeo1TdKOsXFBXJo2XNDl9lsmmXzbLmIb7ZKowqJtxQBQoaOMf8UQ0 YoLaOeAOQXXkL4v4dixUdischXw2RNFJshH1pUcX3WfENkA= X-Google-Smtp-Source: AA6agR7hbiVYhvbLkvTXbGhkBRImTmcfxqlDRIjhPS9xd4+Cd/vik100f1mzBedqFlHrcHbAHpXRivu15/zxn2UT8ms= X-Received: by 2002:a81:a708:0:b0:335:17af:e96a with SMTP id e8-20020a81a708000000b0033517afe96amr8576515ywh.34.1661739339396; Sun, 28 Aug 2022 19:15:39 -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: Mon, 29 Aug 2022 10:15:13 +0800 Message-ID: Subject: Re: Ralink RT3050F To: Mori Hiroki Cc: "freebsd-mips@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000008b9da05e757d71d" X-Rspamd-Queue-Id: 4MGDYm1jF3z3Hq8 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=A9Vka31g; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedes.gaviola@gmail.com designates 2607:f8b0:4864:20::112d as permitted sender) smtp.mailfrom=archimedes.gaviola@gmail.com X-Spamd-Result: default: False [-3.95 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_LONG(-0.98)[-0.977]; NEURAL_HAM_MEDIUM(-0.97)[-0.974]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; 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::112d: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 --00000000000008b9da05e757d71d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 > 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 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 >>> >>> --00000000000008b9da05e757d71d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Aug 28, 2022 at 4:15 PM Archimedes Gaviola <archimedes.gaviola@gmail.com> wro= te:
Hi,

After I successfully accessed the se= rial console, I proceeded to load the kernel image (this is an old D-link D= IR-600 (B2) Wi-Fi device) and encountered this error ->
<= br>
Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET boar= d to recover.

Any idea what have I missed? After t= his 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

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

--00000000000008b9da05e757d71d--