solved Re: still hang up arm/ralink

Mori Hiroki yamori813 at yahoo.co.jp
Mon Aug 13 07:38:55 UTC 2018


Hi.

----- Original Message -----
>From: Warner Losh <imp at bsdimp.com>
>To: Mori Hiroki <yamori813 at yahoo.co.jp> 
>Cc: Michael Zhilin <mizhka at gmail.com>; "freebsd-arm at freebsd.org" <freebsd-arm at freebsd.org>
>Date: 2018/8/13, Mon 01:27
>Subject: Re: solved Re: still hang up arm/ralink
> 
>
>
>
>
>
>On Sat, Aug 11, 2018 at 11:07 PM, Mori Hiroki <yamori813 at yahoo.co.jp> wrote:
>
>Hi
>>
>>Sorry I lost your mail. Because of arm ML is so many mail more than mips.
>>
>>----- Original Message -----
>>>From: Warner Losh <imp at bsdimp.com>
>>>To: Mori Hiroki <yamori813 at yahoo.co.jp> 
>>>Cc: Michael Zhilin <mizhka at gmail.com>; "freebsd-arm at freebsd.org" <freebsd-arm at freebsd.org>
>>>Date: 2018/8/12, Sun 04:14
>>>Subject: Re: solved Re: still hang up arm/ralink
>>> 
>>>
>>>
>>>
>>>
>>>
>>>On Sat, Aug 11, 2018 at 9:25 AM, Warner Losh <imp at bsdimp.com> wrote:
>>>
>>>
>>>>
>>>>
>>>>
>>>>On Thu, Aug 9, 2018 at 11:52 PM, Mori Hiroki <yamori813 at yahoo.co.jp> wrote:
>>>>
>>>>Hi.
>>>>>
>>>>>----- Original Message -----
>>>>>>From: Warner Losh <imp at bsdimp.com>
>>>>>>To: Mori Hiroki <yamori813 at yahoo.co.jp> 
>>>>>>Cc: Michael Zhilin <mizhka at gmail.com>; "freebsd-arm at freebsd.org" <freebsd-arm at 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/cfi d0s.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/D1 6622
>>>>>
>>>>>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.kbi n.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 MiBLoad 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...
>>>
>>>
>>>I built oldlzma from zrouter and have the same results...
>>>
>>>
>>>Warner
>>
>>You need make small rootfs because of this target flash is too small.
>>ZRouter is make cd9660 rootfs image by limited files and uzip.
>>And 64Kbyte synced kernel image append rootfs uzip.
>>
>>+-------------------+------+-- ---------+
>>|u-boot kernel image|synced|rootfs uzip|
>>+-------------------+------+-- ---------+
>>
>>This is complete image.
>>
>>Also you need fixed rootfs address in dts.
>>
>>sys/dts/arm/wzr2-g300n.dts
>>
>>This is flash u-boot command.
>>
>>5VT1310-EVB# tftpboot 0x00800000 Buffalo_WZR2-G300N.zimage
>>
>>5VT1310-EVB# erase 0x1F010000 0x1F3CFFFF
>>
>>5VT1310-EVB# cp.b 0x00800000 0x1F010000 $(filesize)
>>
>>5VT1310-EVB# reset
>>
>
>
>Do I need it to successfully uncompress the kernel? So far I can't get a kernel to uncompress w/o the LZMA ERROR 1 message. I have no doubt I'll need it eventually, but right now I can't even get the kernel to start....
>
>
>Warner

Please use zrouter lzma command by this.

% oldlzma e kernel.kbin kernel.kbin.lzma

This is ray's magic.

Hiroki Mori
> 
>I make auto scan rootfs partition patch at geom_flashmap.
>>
>>https://reviews.freebsd.org/ D13648
>>
>>This patch scan rootfs in named firmware partition.
>>
>>I have many time stop at mountroot. This patch is solution this.
>>
>>Regards
>>
>>Hiroki Mori
>>
>>> 
>>>Warner
>>>> 
>>>>Thanks
>>>>>
>>>>>Hiroki Mori
>>>>>
>>>>>
>>>>>>
>>>>>>Warner
>>>>>>
>>>>>>
>>>>>>On Sat, Mar 10, 2018 at 2:31 AM, Mori Hiroki <yamori813 at 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 at freebsd.org mailing list
>>>>>>>https://lists.freebsd. org/ mailman/listinfo/freebsd-arm
>>>>>>>To unsubscribe, send any mail to "freebsd-arm-unsubscribe@ freebsd.org"
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
>
>


More information about the freebsd-arm mailing list