From owner-freebsd-arm@freebsd.org Sun Aug 12 16:27:25 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 620951075ABC for ; Sun, 12 Aug 2018 16:27:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD4198EDD4 for ; Sun, 12 Aug 2018 16:27:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x234.google.com with SMTP id d16-v6so9337796itj.0 for ; Sun, 12 Aug 2018 09:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8ZyWNFaDJVm/oO+ALW4I9ZKnhZnrwPNS+YL6Pqrjiz0=; b=jpG7A/Dtp0K6JvdfSvY2vJfDC59KkZiji12pcibIaVt+BAmkQ7niPvLX4J+eY0rEfm 63CCGkdudPfvMjWpsyITILefkoLi6tVjmxkGDGShhWCsI15fvC8WMKhZjIEhiNPYDtf1 R2KpcG4u8i80R7yAeZzUGPO8ipNM3kwo1dddHGvuhTo/uGaJWFSyZ0PNuLuMOGyFk+G5 8ts+VUZjcVZq6SnuV1LAvaJn0KV2uJgjqN5ikcsvPp1OxKkUs5OPRK60fo651RFIs8F/ /ZaYBbkCK3rjWGN2h/gZg4gArKqEqvme/ZOw1Nnl6jcSVTiQLYqxbLgRv9DujsmTWxd5 +C0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8ZyWNFaDJVm/oO+ALW4I9ZKnhZnrwPNS+YL6Pqrjiz0=; b=qd571XGf+8HyzDHFezMPSvW65rndJ2Cg0K8+eBg569lvUolV9wSW5cGJTLtwyFJMhJ iGfXFyX+hQCuZf3KSLfIfBsR7kmOOWb78Ax4aRuDJSEsrGTXkvPpTUIPwXPUB1505eZR cFrnUvUQ49ukKxjxcQxe/zKvJ2oC4S/CCeC6IEpHCU7fffCfppZifonu9+L1VPPyRYOo mdpv49IUQ8Ln4xMHaA4J1MfzizTG+RvZ61COjDRhQSTl9UZtvcQDBO4xEl6CCQ6Ql+Lz OUsrxd73NyA0DQSbBuKs/R3o8LnTp7OEKiMLhgTBP64doGJxwheX6Xz27BCmNFq4nYIR 0Fuw== X-Gm-Message-State: AOUpUlEtKHVFEOT/NlNCWlwV7/cbWYM3rE9wjGeGckFu327xs8c2Sei/ zN4Z1EUFdHhghxZ3wLdgAclaAXhEsTO6M3jsLy3CiQ== X-Google-Smtp-Source: AA+uWPwBqsemklSJd544NhOPm6q6HQ74i/1Z3z07O2nbnaT5bQxp4DRtw5kuV1flfkijtvx1VxywCIYZTbHBfnfQ46g= X-Received: by 2002:a02:3344:: with SMTP id k4-v6mr12760079jak.45.1534091243876; Sun, 12 Aug 2018 09:27:23 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:381a:0:0:0:0:0 with HTTP; Sun, 12 Aug 2018 09:27:23 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <197535.81645.qm@web103907.mail.ssk.yahoo.co.jp> References: <64850.63077.qm@web101706.mail.ssk.yahoo.co.jp> <387823.67007.qm@web101711.mail.ssk.yahoo.co.jp> <812183.70978.qm@web101705.mail.ssk.yahoo.co.jp> <892631.23713.qm@web101718.mail.ssk.yahoo.co.jp> <408.23467.qm@web101707.mail.ssk.yahoo.co.jp> <920419.9428.qm@web103910.mail.ssk.yahoo.co.jp> <197535.81645.qm@web103907.mail.ssk.yahoo.co.jp> From: Warner Losh Date: Sun, 12 Aug 2018 10:27:23 -0600 X-Google-Sender-Auth: 0MVbEUPdas0OD3Q8HdTq_le6ZaU Message-ID: Subject: Re: solved Re: still hang up arm/ralink To: Mori Hiroki Cc: Michael Zhilin , "freebsd-arm@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Aug 2018 16:27:25 -0000 On Sat, Aug 11, 2018 at 11:07 PM, Mori Hiroki wrote: > Hi > > Sorry I lost your mail. Because of arm ML is so many mail more than mips. > > ----- Original Message ----- > >From: Warner Losh > >To: Mori Hiroki > >Cc: Michael Zhilin ; "freebsd-arm@freebsd.org" < > freebsd-arm@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 wrote: > > > > > >> > >> > >> > >>On Thu, Aug 9, 2018 at 11:52 PM, Mori Hiroki > wrote: > >> > >>Hi. > >>> > >>>----- Original Message ----- > >>>>From: Warner Losh > >>>>To: Mori Hiroki > >>>>Cc: Michael Zhilin ; "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/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, > >>> 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 > 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 > 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" > >>>>> > >>>> > >>>> > >>>> > >>> > >> > > > > > > >