From owner-freebsd-arm@freebsd.org Mon Aug 13 07:38:55 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 AF57A1068E61 for ; Mon, 13 Aug 2018 07:38:55 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from nh501-vm9.bullet.mail.kks.yahoo.co.jp (nh501-vm9.bullet.mail.kks.yahoo.co.jp [183.79.56.139]) by mx1.freebsd.org (Postfix) with SMTP id 9FDA98E7B4 for ; Mon, 13 Aug 2018 07:38:54 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from [183.79.100.139] by nh501.bullet.mail.kks.yahoo.co.jp with NNFMP; 13 Aug 2018 07:36:16 -0000 Received: from [183.79.100.137] by t502.bullet.mail.kks.yahoo.co.jp with NNFMP; 13 Aug 2018 07:36:16 -0000 Received: from [127.0.0.1] by omp506.mail.kks.yahoo.co.jp with NNFMP; 13 Aug 2018 07:36:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 366415.72483.bm@omp506.mail.kks.yahoo.co.jp Received: (qmail 85452 invoked by uid 60001); 13 Aug 2018 07:36:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.jp; s=yj20110701; t=1534145776; bh=9xp7qMr0Y3RsMgQSYYXZsUYO/CnZITYRgLNDEws6lOg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Yknt2VK2Z17OKytRvJWL+Xt9i7A7n4ltyb0kpX+kjNLgNHaXcKaVaXMGMSJX7c7AB7h81momnNlJymS7JwQV2PAh66ZrZHEHuPphcRa1cSU9vF80uJNF+ASKDUo4zze80qF413DDsMCGo2cV8SZUQn4dJDZbJ6QTKYalnzyvh0Y= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=yj20110701; d=yahoo.co.jp; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=U0g0XmAYBZoO24zalq91Ru7ZBSgm4FDzqOkrCcCSrBotGPYVWOD2RzAkjEsW8M1obru8Fz18l+aArxDVGuIdjTMz97n4BTmCtjrLw0yLND6tVYjHLwIcBBb1xlAz/oTfj+NUvWs3qmJ0pljaqBojnGPdlmRo1lx5GZz34TfY0Yw=; Message-ID: <14732.80527.qm@web103913.mail.ssk.yahoo.co.jp> X-YMail-OSG: wo49KG4VM1kCCA0rUw5V0jcqJ.NHkBOw_NvNh.08uVe53hOd2TQT6pJi7DeYjrVpaI6XRDKMxErBqj.iZELLdtCWSyu0vW6v37lK1GE.dds5vm3FLwoR.An7NZ.D2tS_geoDImWhsoCY.M6zWANpixZTPapJrazAhYBSE4YY8wbatygCH0r0FD7g2jOo0eEHrpf21Q7qUkPZ_6SVFgAo1nhjD9Jw.apUNvt9RgKuXemZcrFV__.V33Kb2_oUgXvlckXJncOUOV8Ht9iPpCKNCvA6yG6FZ1P9GlkjTzQ39nG7U2LXKaT1ZWSvZm.cfdEbHG7fslnavfwmxNWgQ17LoLpFz2ulKWDNEnYhX6n00knEHjHJQCjNoylV7D0nGNpRSs.g_Uoj_pEXliyK18XLm3DC5fiqMVQU2_Dst_uIFJfPCP17JrRVemeF4XTtAs4Tr5GzOfCU48sUl.5IEQ5mQq_JDNd99M8FejQtjSJxgDqO.K0mF9EIzw8.0lG6AF_fbsdOCLbNwG0pEfPMSXx8xmouDxvmeIFBRoiCK9.E7L1eAWaS2ReeLr0VSdKtBCuhD8Amb0yGvhaVtEI88WYD4fD9uMU7wJZzkkr1iyPS0sXcUR9wQizqMnbipTN0Eyg6 Received: from [203.165.91.75] by web103913.mail.ssk.yahoo.co.jp via HTTP; Mon, 13 Aug 2018 16:36:14 JST X-Mailer: YahooMailWebService/0.8.111_74 X-YMail-JAS: Yj1bYG4VM1ka5ZhjWRXuVHnX8JgTNBcCaFzQxVSkzGeyFMFA0l1o2Mf_cWn.404flZL7r8jVwVp3NEB8EXQZ5ag4J3lUNAR9tV4Vrilxy2iTFRSu60iKtc8ZyRKJINFy9DDs 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> Date: Mon, 13 Aug 2018 16:36:14 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki Subject: Re: solved Re: still hang up arm/ralink To: Warner Losh Cc: Michael Zhilin , "freebsd-arm@freebsd.org" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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: Mon, 13 Aug 2018 07:38:55 -0000 Hi.=0A=0A----- Original Message -----=0A>From: Warner Losh = =0A>To: Mori Hiroki =0A>Cc: Michael Zhilin ; "freebsd-arm@freebsd.org" =0A>Date: 20= 18/8/13, Mon 01:27=0A>Subject: Re: solved Re: still hang up arm/ralink=0A> = =0A>=0A>=0A>=0A>=0A>=0A>On Sat, Aug 11, 2018 at 11:07 PM, Mori Hiroki wrote:=0A>=0A>Hi=0A>>=0A>>Sorry I lost your mail. Becaus= e of arm ML is so many mail more than mips.=0A>>=0A>>----- Original Message= -----=0A>>>From: Warner Losh =0A>>>To: Mori Hiroki =0A>>>Cc: Michael Zhilin ; "freebsd-arm@= freebsd.org" =0A>>>Date: 2018/8/12, Sun 04:14=0A>>= >Subject: Re: solved Re: still hang up arm/ralink=0A>>> =0A>>>=0A>>>=0A>>>= =0A>>>=0A>>>=0A>>>On Sat, Aug 11, 2018 at 9:25 AM, Warner Losh wrote:=0A>>>=0A>>>=0A>>>>=0A>>>>=0A>>>>=0A>>>>On Thu, Aug 9, 2018 at 1= 1:52 PM, Mori Hiroki wrote:=0A>>>>=0A>>>>Hi.=0A>>>>= >=0A>>>>>----- Original Message -----=0A>>>>>>From: Warner Losh =0A>>>>>>To: Mori Hiroki =0A>>>>>>Cc: Michael = Zhilin ; "freebsd-arm@freebsd.org" =0A>>>>>>Date: 2018/8/10, Fri 11:16=0A>>>>>>Subject: Re: solved Re: stil= l hang up arm/ralink=0A>>>>>> =0A>>>>>>=0A>>>>>>Mori-san=0A>>>>>>=0A>>>>>>= =0A>>>>>>I took your advice and bought a Buffalo WZR2-G300N off ebay. It ar= rived while I was on vacation. So, I spent a few minutes with it today. I'v= e installed header for serial port, puzzled out the pins, found your blog t= hat had the pins and the piece I was missing (the baud rate). I now have ad= ded it to my test lab's terminal server and hope to start building images f= or it once I get my test lab's CI infrastructure up and running.=0A>>>>>>= =0A>>>>>=0A>>>>>Thanks for your cooperation.=0A>>>>>=0A>>>>>>=0A>>>>>>So, n= ow I'm sitting at the "RT2860-EVB#" prompt from uboot hoping to boot the RT= 1310 kernel. However, I lack instructions and can't seem to find all the de= tails in your posts or on your blog. How do I load/create the RAM disk refe= renced in the kernel config file "options=A0 =A0 =A0 =A0 =A0ROOTDEVNAME=3D\= "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) a= nd which variation of the kernel should I use? Thanks for any help you can = offer.=0A>>=0A>>>>>>=0A>>>>>=0A>>>>>I use ZRouter build system. But I am a = suggestion normal build system.=0A>>>>>=0A>>>>>I think=A0Buffalo WZR2-G300N= is different u-boot on US and Japan model.=0A>>>>>Because of my target pro= mpt is "5VT1310-EVB#".=A0 Be careful operation.=0A>>>>>You can find some in= formation=A0in printenv at u-boot.=0A>>>>>=0A>>>>>Sorry I forget memory add= ress setting in build system. I add this to review.=0A>>>>>=0A>>>>>https://= reviews.freebsd. org/D1 6622=0A>>>>>=0A>>>>>In this setting build kernel he= ader is this.=0A>>>>>=0A>>>>>% readelf -h Buffalo_WZR2-G300N_kernel=0A>>>>>= ELF Header:=0A>>>>>=A0 Magic: =A0 7f 45 4c 46 01 01 01 09 00 00 00 00 00 00= 00 00=A0=0A>>>>>=A0 Class: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 ELF32=0A>>>>>=A0 Data:=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 2's complement, little endian=0A>>>>>=A0 Version: =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 (current)=0A>>>>>=A0 OS/ABI:= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 UNIX - FreeBSD=0A>>= >>>=A0 ABI Version: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 0=0A>>>>>= =A0 Type:=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 EXEC (= Executable file)=0A>>>>>=A0 Machine: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 ARM=0A>>>>>=A0 Version: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 0x1=0A>>>>>=A0 Entry point address: =A0 =A0 =A0 =A0 =A0 = =A0 =A0 0xc0000100=0A>>>>>=A0 Start of program headers:=A0 =A0 =A0 =A0 =A0 = 52 (bytes into file)=0A>>>>>=A0 Start of section headers:=A0 =A0 =A0 =A0 = =A0 3633180 (bytes into file)=0A>>>>>=A0 Flags: =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 0x5000202, has entry point, Version5 EABI, =0A>>>>>=A0 Size of this header: =A0 =A0 =A0 =A0 =A0 =A0 =A0 52 (byte= s)=0A>>>>>=A0 Size of program headers: =A0 =A0 =A0 =A0 =A0 32 (bytes)=0A>>>= >>=A0 Number of program headers: =A0 =A0 =A0 =A0 6=0A>>>>>=A0 Size of secti= on headers: =A0 =A0 =A0 =A0 =A0 40 (bytes)=0A>>>>>=A0 Number of section hea= ders: =A0 =A0 =A0 =A0 37=0A>>>>>=A0 Section header string table index: 34= =0A>>>>>=0A>>>>>Do opjcopy and compress and make u-boot image by load and e= ntry address is=A00x40000100.=0A>>>>>=0A>>>>>% file Buffalo_WZR2-G300N_kern= el.kbin .oldlzma.uboot=0A>>>>>=0A>>>>>Buffalo_WZR2-G300N_kernel. kbin .oldl= zma.uboot: u-boot legacy uImage, FreeBSD Kernel Image, Linux/ARM, OS Kernel= Image (lzma), 999004 bytes, Wed Aug=A0 8 22:50:36 2018, Load Address: 0x40= 000100, Entry Point: 0x40000100, Header CRC: 0xFEC4D6B9, Data CRC: 0xE650ED= DF=0A>>>>>=0A>>>>>It can execute on memory. (not flash)=0A>>>>>You need set= ipaddr and serverip on u-boot.=0A>>>>>=0A>>>>>5VT1310-EVB# tftpboot 008000= 00 Buffalo_WZR2-G300N_kernel.kbin .oldlzma.uboot=0A>>>>>TFTP from server 10= .10.10.3; our IP address is 10.10.10.190=0A>>>>>Filename 'Buffalo_WZR2-G300= N_kernel.kbi n.oldlzma.uboot'.=0A>>=0A>>>>>Load address: 0x800000=0A>>>>>Lo= ading: ############################## ############################## #####= =0A>>>>>########################### ### ############################## ####= #=0A>>>>>########################### ### ############################## ###= ##=0A>>>>>#=0A>>>>>done=0A>>>>>Bytes transferred =3D 999068 (f3e9c hex)=0A>= >>>>5VT1310-EVB# bootm=0A>>>>>## Booting image at 00800000 ...=0A>>>>>=A0= =A0 Image Name: =A0 FreeBSD Kernel Image=0A>>>>>=A0=A0 Image Type: =A0 ARM = Linux Kernel Image (lzma compressed)=0A>>>>>=A0=A0 Data Size:=A0 =A0 999004= Bytes =3D 975.6 kB=0A>>>>>=A0=A0 Load Address: 40000100=0A>>>>>=A0=A0 Entr= y Point:=A0 40000100=0A>>>>>=A0=A0 Verifying Checksum ... OK=0A>>>>>=A0=A0 = Uncompressing LZMA Kernel Image .............................. ............= OK=0A>>>>>=0A>>>>>Starting kernel @40000100...=0A>>>>>=0A>>>>>KDB: debugger= backends: ddb=0A>>>>>KDB: current backend: ddb=0A>>>>>Copyright (c) 1992-2= 018 The FreeBSD Project.=0A>>>>>Copyright (c) 1979, 1980, 1983, 1986, 1988,= 1989, 1991, 1992, 1993, 1994=0A>>>>>The Regents of the University of Calif= ornia. All rights reserved.=0A>>>>>=0A>>>>>If you can execute kernel then s= top at rootfs mount.=0A>>>>>=0A>>>>>I think this is first step.=0A>>>>>=0A>= >>>=0A>>>>=0A>>>>Where do I find oldlzma utility? The current one produces = an unbootable image:=0A>>>>=0A>>>>=0A>>>>%=A0objcopy -S -O binary kernel ke= rnel.kbin=0A>>>>% lzma kernel.kbin=0A>>>>% mkimage -A arm -O FreeBSD -T ker= nel -C lzma -a 0x40000100 -e 0x40000100 -n rt1310 -d kernel.kbin.lzma kerne= l.kbin.lzma.u-boot=0A>>>>Image Name:=A0 =A0rt1310=0A>>>>Created:=A0 =A0 =A0= Sat Aug 11 09:06:27 2018=0A>>>>Image Type:=A0 =A0ARM FreeBSD Kernel Image = (lzma compressed)=0A>>>>Data Size:=A0 =A0 1317305 Bytes =3D 1286.43 KiB =3D= 1.26 MiBLoad Address: 40000100=0A>>>>Entry Point:=A0 40000100=0A>>>>% scp = kernel.kbin.lzma.u-boot tftp:tftpboot=0A>>>>...=0A>>>>RT2860-EVB# bootm## B= ooting image at 00800000 ...=0A>>>>=A0 =A0Image Name:=A0 =A0rt1310=0A>>>>= =A0 =A0Image Type:=A0 =A0ARM Unknown OS Kernel Image (lzma compressed)=0A>>= >>=A0 =A0Data Size:=A0 =A0 1317305 Bytes =3D=A0 1.3 MB=A0 =A0Load Address: = 40000100=0A>>>>=A0 =A0Entry Point:=A0 40000100=0A>>>>=A0 =A0Verifying Check= sum ... OK=0A>>>>=A0 =A0Uncompressing Kernel Image ... LZMA ERROR 1 - must = RESET board to recover=0A>>>>OK=0A>>>>=0A>>>>=0A>>>>I see you have 'oldlzma= ' and online instructions use an oldlzma command...=0A>>>=0A>>>=0A>>>I buil= t oldlzma from zrouter and have the same results...=0A>>>=0A>>>=0A>>>Warner= =0A>>=0A>>You need make small rootfs because of this target flash is too sm= all.=0A>>ZRouter is make cd9660 rootfs image by limited files and uzip.=0A>= >And 64Kbyte synced kernel image append rootfs uzip.=0A>>=0A>>+------------= -------+------+-- ---------+=0A>>|u-boot kernel image|synced|rootfs uzip|= =0A>>+-------------------+------+-- ---------+=0A>>=0A>>This is complete im= age.=0A>>=0A>>Also you need fixed rootfs address in dts.=0A>>=0A>>sys/dts/a= rm/wzr2-g300n.dts=0A>>=0A>>This is flash u-boot command.=0A>>=0A>>5VT1310-E= VB#=A0tftpboot 0x00800000 Buffalo_WZR2-G300N.zimage=0A>>=0A>>5VT1310-EVB#= =A0erase 0x1F010000 0x1F3CFFFF=0A>>=0A>>5VT1310-EVB#=A0cp.b 0x00800000 0x1F= 010000 $(filesize)=0A>>=0A>>5VT1310-EVB# reset=0A>>=0A>=0A>=0A>Do I need it= to successfully uncompress the kernel? So far I can't get a kernel to unco= mpress w/o the LZMA ERROR 1 message. I have no doubt I'll need it eventuall= y, but right now I can't even get the kernel to start....=0A>=0A>=0A>Warner= =0A=0APlease use zrouter lzma command by this.=0A=0A% oldlzma e kernel.kbin= kernel.kbin.lzma=0A=0AThis is ray's magic.=0A=0AHiroki Mori=0A>=A0=0A>I ma= ke auto scan rootfs=A0partition patch at geom_flashmap.=0A>>=0A>>https://re= views.freebsd.org/ D13648=0A>>=0A>>This patch scan rootfs in named firmware= =A0partition.=0A>>=0A>>I have many time stop at mountroot. This patch is so= lution this.=0A>>=0A>>Regards=0A>>=0A>>Hiroki Mori=0A>>=0A>>>=A0=0A>>>Warne= r=0A>>>>=A0=0A>>>>Thanks=0A>>>>>=0A>>>>>Hiroki Mori=0A>>>>>=0A>>>>>=0A>>>>>= >=0A>>>>>>Warner=0A>>>>>>=0A>>>>>>=0A>>>>>>On Sat, Mar 10, 2018 at 2:31 AM,= Mori Hiroki wrote:=0A>>>>>>=0A>>>>>>Hi=0A>>>>>>>= =0A>>>>>>>I do try to todays current. It' work find on RT1310.=0A>>>>>>>=0A= >>>>>>>https://gist.github.com/ yamori813/ 88224f1c96c9c592fb611b12a15e4a b= 5=0A>>>>>>>=0A>>>>>>>=0A>>>>>>>Thanks=0A>>>>>>>=0A>>>>>>>Hiroki Mori=0A>>>>= >>>_________________________ ___ __ _________________=0A>>=0A>>>>>>>freebsd= -arm@freebsd.org mailing list=0A>>>>>>>https://lists.freebsd. org/ mailman/= listinfo/freebsd-arm=0A>>>>>>>To unsubscribe, send any mail to "freebsd-arm= -unsubscribe@ freebsd.org"=0A>>>>>>>=0A>>>>>>=0A>>>>>>=0A>>>>>>=0A>>>>>=0A>= >>>=0A>>>=0A>>>=0A>>>=0A>>=0A>=0A>=0A>