From owner-freebsd-arm@freebsd.org Sat Aug 11 15:25:19 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 8FC3C10705D9 for ; Sat, 11 Aug 2018 15:25:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (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 EC38D83854 for ; Sat, 11 Aug 2018 15:25:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id w11-v6so10365735iob.2 for ; Sat, 11 Aug 2018 08:25:18 -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=8oQAMi5fEdQLuvvM9obh3w8hlM8sushNaPJiGvazv9Y=; b=Fjv+M+fEcM79pauvjqgASUzfFRZXe4zKxvdpVC4NEkz0Y9Jg9R5CEWvyE+GmU/dl+Q wPxetGePsYx3tiZOlQfJVLLXeBDNZ3cnrDSPL++C9maeAzCoe5r14ipezB//bh04TaQu XciHSx+E7Tq0AarTPwmlQAtHCIFFz+3yqObDxBL4iL9vxRAIejgzvey89HGU/f2huzal PKQUdOW2LKZHTDTASu1BXgA+InYLslJm4icgMWMujrDEYgkvXiqYMR0MOmQG9YipNg+J p+MQNULgSIjoJodHNmEQ3sgtIwUfZImFXWblne5PUhZEJcjuS32bW6d5Az4Ia0TAVquK hHhw== 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=8oQAMi5fEdQLuvvM9obh3w8hlM8sushNaPJiGvazv9Y=; b=hKPQLzFIgq5/Pd7iYasooW3ndncH9fy+Rd8HVKq5bwVE3sCZPfEaTiEjLftKVeyff0 9GTi7FY9MFdw+zvFdboGIYxwR37gRCEwh7SU+IqCpNZykP0NtEx2NoF7h0r6vxWqDrEY y6o1YwQ9+acJdhU+c57wXOadq0sFkxfhDH/QIe2Rw71r0NPb6LbcmwLV3uDFKcvsnXES 7qPhNDS5dHnhoeJFymlLmloJxVKDdB2VCDAGBrdtaOgHp7m1jEbrqeojawx4FFGSk8sn ro0v6g+20xeIaAtnaECzLzJXR7S9JgifSWreMd+rTF/B7uxwPKHkx4yQ8iEkX1fg9hZz dEuA== X-Gm-Message-State: AOUpUlGYDwRTKOzGjMiFisaMz2wm9zk/liTk0X04Wn/7sRDfpCx2+6Lx mLwALdOtTOg8zM0100RsvEMhil9Lw93QbIcd0ursfE8QTby/mA== X-Google-Smtp-Source: AA+uWPxKE8iwAM0A3VtbB23Yvo/jafK844GVRBhis3/hCJd8ORjSquNF+JpVd1syCw3CR+00JY6SkT7JfYftd4ukCqQ= X-Received: by 2002:a6b:3902:: with SMTP id g2-v6mr9124527ioa.168.1534001117990; Sat, 11 Aug 2018 08:25:17 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:381a:0:0:0:0:0 with HTTP; Sat, 11 Aug 2018 08:25:17 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <920419.9428.qm@web103910.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> From: Warner Losh Date: Sat, 11 Aug 2018 09:25:17 -0600 X-Google-Sender-Auth: x6Ko-ryDTDqzlibU1Q6-LbAuDys 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: Sat, 11 Aug 2018 15:25:19 -0000 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/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, > 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 > 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" > >> > > > > > > >