Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Aug 2018 09:25:17 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Mori Hiroki <yamori813@yahoo.co.jp>
Cc:        Michael Zhilin <mizhka@gmail.com>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: solved Re: still hang up arm/ralink
Message-ID:  <CANCZdfpzd2c-4oOyO=toZ6WbNA=dRr8%2BHumqLWTGuu-wEXa7HA@mail.gmail.com>
In-Reply-To: <920419.9428.qm@web103910.mail.ssk.yahoo.co.jp>
References:  <64850.63077.qm@web101706.mail.ssk.yahoo.co.jp> <CAF19XBKfP-Ld6Sdn1OMLsyO-tEw5Mio4fKp8C4pkL5LzdhvUAA@mail.gmail.com> <387823.67007.qm@web101711.mail.ssk.yahoo.co.jp> <812183.70978.qm@web101705.mail.ssk.yahoo.co.jp> <CAF19XBK9FtM92WehWNtVXkyA5p-iOCfD1NeQ2kGPWvCemZAUSw@mail.gmail.com> <892631.23713.qm@web101718.mail.ssk.yahoo.co.jp> <408.23467.qm@web101707.mail.ssk.yahoo.co.jp> <CANCZdfo6KFb7UF=-F5Y8fzcmkeLiK975%2BNXC9TQvgtrCXM75yA@mail.gmail.com> <920419.9428.qm@web103910.mail.ssk.yahoo.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 9, 2018 at 11:52 PM, Mori Hiroki <yamori813@yahoo.co.jp> wrote:

> Hi.
>
> ----- Original Message -----
> >From: Warner Losh <imp@bsdimp.com>
> >To: Mori Hiroki <yamori813@yahoo.co.jp>
> >Cc: Michael Zhilin <mizhka@gmail.com>; "freebsd-arm@freebsd.org" <
> freebsd-arm@freebsd.org>
> >Date: 2018/8/10, Fri 11:16
> >Subject: Re: solved Re: still hang up arm/ralink
> >
> >
> >Mori-san
> >
> >
> >I took your advice and bought a Buffalo WZR2-G300N off ebay. It arrived
> while I was on vacation. So, I spent a few minutes with it today. I've
> installed header for serial port, puzzled out the pins, found your blog
> that had the pins and the piece I was missing (the baud rate). I now have
> added it to my test lab's terminal server and hope to start building images
> for it once I get my test lab's CI infrastructure up and running.
> >
>
> Thanks for your cooperation.
>
> >
> >So, now I'm sitting at the "RT2860-EVB#" prompt from uboot hoping to boot
> the RT1310 kernel. However, I lack instructions and can't seem to find all
> the details in your posts or on your blog. How do I load/create the RAM
> disk referenced in the kernel config file "options
>  ROOTDEVNAME=\"cd9660:/dev/cfid0s.rootfs.uzip\"" ? what address do I load
> the kernel at (0x40800000 is listed in a diagram, but 0x40000100 is shown
> in the dmesg) and which variation of the kernel should I use? Thanks for
> any help you can offer.
> >
>
> I use ZRouter build system. But I am a suggestion normal build system.
>
> I think Buffalo WZR2-G300N is different u-boot on US and Japan model.
> Because of my target prompt is "5VT1310-EVB#".  Be careful operation.
> You can find some information in printenv at u-boot.
>
> Sorry I forget memory address setting in build system. I add this to
> review.
>
> https://reviews.freebsd.org/D16622
>
> In this setting build kernel header is this.
>
> % readelf -h Buffalo_WZR2-G300N_kernel
> ELF Header:
>   Magic:   7f 45 4c 46 01 01 01 09 00 00 00 00 00 00 00 00
>   Class:                             ELF32
>   Data:                              2's complement, little endian
>   Version:                           1 (current)
>   OS/ABI:                            UNIX - FreeBSD
>   ABI Version:                       0
>   Type:                              EXEC (Executable file)
>   Machine:                           ARM
>   Version:                           0x1
>   Entry point address:               0xc0000100
>   Start of program headers:          52 (bytes into file)
>   Start of section headers:          3633180 (bytes into file)
>   Flags:                             0x5000202, has entry point, Version5
> EABI, <unknown>
>   Size of this header:               52 (bytes)
>   Size of program headers:           32 (bytes)
>   Number of program headers:         6
>   Size of section headers:           40 (bytes)
>   Number of section headers:         37
>   Section header string table index: 34
>
> Do opjcopy and compress and make u-boot image by load and entry address
> is 0x40000100.
>
> % file Buffalo_WZR2-G300N_kernel.kbin.oldlzma.uboot
>
> Buffalo_WZR2-G300N_kernel.kbin.oldlzma.uboot: u-boot legacy uImage,
> FreeBSD Kernel Image, Linux/ARM, OS Kernel Image (lzma), 999004 bytes, Wed
> Aug  8 22:50:36 2018, Load Address: 0x40000100, Entry Point: 0x40000100,
> Header CRC: 0xFEC4D6B9, Data CRC: 0xE650EDDF
>
> It can execute on memory. (not flash)
> You need set ipaddr and serverip on u-boot.
>
> 5VT1310-EVB# tftpboot 00800000 Buffalo_WZR2-G300N_kernel.
> kbin.oldlzma.uboot
> TFTP from server 10.10.10.3; our IP address is 10.10.10.190
> Filename 'Buffalo_WZR2-G300N_kernel.kbin.oldlzma.uboot'.
> Load address: 0x800000
> Loading: #################################################################
> #################################################################
> #################################################################
> #
> done
> Bytes transferred = 999068 (f3e9c hex)
> 5VT1310-EVB# bootm
> ## Booting image at 00800000 ...
>    Image Name:   FreeBSD Kernel Image
>    Image Type:   ARM Linux Kernel Image (lzma compressed)
>    Data Size:    999004 Bytes = 975.6 kB
>    Load Address: 40000100
>    Entry Point:  40000100
>    Verifying Checksum ... OK
>    Uncompressing LZMA Kernel Image ..............................
> ............OK
>
> Starting kernel @40000100...
>
> KDB: debugger backends: ddb
> KDB: current backend: ddb
> Copyright (c) 1992-2018 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.
>
> If you can execute kernel then stop at rootfs mount.
>
> I think this is first step.
>

Where do I find oldlzma utility? The current one produces an unbootable
image:

% objcopy -S -O binary kernel kernel.kbin
% lzma kernel.kbin
% mkimage -A arm -O FreeBSD -T kernel -C lzma -a 0x40000100 -e 0x40000100
-n rt1310 -d kernel.kbin.lzma kernel.kbin.lzma.u-boot
Image Name:   rt1310
Created:      Sat Aug 11 09:06:27 2018
Image Type:   ARM FreeBSD Kernel Image (lzma compressed)
Data Size:    1317305 Bytes = 1286.43 KiB = 1.26 MiB
Load Address: 40000100
Entry Point:  40000100
% scp kernel.kbin.lzma.u-boot tftp:tftpboot
...
RT2860-EVB# bootm
## Booting image at 00800000 ...
   Image Name:   rt1310
   Image Type:   ARM Unknown OS Kernel Image (lzma compressed)
   Data Size:    1317305 Bytes =  1.3 MB
   Load Address: 40000100
   Entry Point:  40000100
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover
OK

I see you have 'oldlzma' and online instructions use an oldlzma command...

Warner


> Thanks
>
> Hiroki Mori
>
> >
> >Warner
> >
> >
> >On Sat, Mar 10, 2018 at 2:31 AM, Mori Hiroki <yamori813@yahoo.co.jp>
> wrote:
> >
> >Hi
> >>
> >>I do try to todays current. It' work find on RT1310.
> >>
> >>https://gist.github.com/ yamori813/ 88224f1c96c9c592fb611b12a15e4a b5
> >>
> >>
> >>Thanks
> >>
> >>Hiroki Mori
> >>______________________________ _________________
> >>freebsd-arm@freebsd.org mailing list
> >>https://lists.freebsd.org/ mailman/listinfo/freebsd-arm
> >>To unsubscribe, send any mail to "freebsd-arm-unsubscribe@ freebsd.org"
> >>
> >
> >
> >
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpzd2c-4oOyO=toZ6WbNA=dRr8%2BHumqLWTGuu-wEXa7HA>