From owner-freebsd-arm@freebsd.org Sat Aug 11 19:14: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 111B110772C3 for ; Sat, 11 Aug 2018 19:14:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (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 746518D967 for ; Sat, 11 Aug 2018 19:14:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22b.google.com with SMTP id y10-v6so10703718ioa.10 for ; Sat, 11 Aug 2018 12:14: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=HeygdkXhe0gwl4n1Px+evdbYW7zmzrqBp5FmMv/5C10=; b=Uz+RWbXr9W6vz4d3G4C3aNlAFaHu5mp4braUgT4PaD8zqJ125GAICEw0gRdGFpmLIf tNbmgSsAMThzv/YX4DJzW24dUfqmCGys5/ls8NbiI/9znqAE6sn4VkMEMBOvzry6ZWtx K3dVyl+wkohZ8G/VOeIAxAZoqVvsV2trwUnvjMg7deZ20uzNsiGnnT6FAqW0Beqtlwot XcWRFc12FpxlyquQEuOmsV1SaRisiaJurH8l+0OI9c7sMnjAshccWinD19AlmliKJY1g XEShJcR9LbSI+LxD4SKZ+YYMF/tZEU7RWm23zUn47uPQDjdxpmYFRtWbFmZIZtu6Wh1Y 0Zhg== 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=HeygdkXhe0gwl4n1Px+evdbYW7zmzrqBp5FmMv/5C10=; b=g+fwEwuN//BxPujB+RcVFr5F+zSuJmg0M2fyG/giT4fwnsP+UpopoTcoXPlX/ug5Jn bWBrf16wUzIfp9s1JF43pWI/ks8xjhuAM35o7trGP05xycZvg2BO+Xcm5KeNXhk8ZdwT dX7TkWGPIMdGy/Z3VEIdmsEZYvDn8SDhUL3wgsq0Lf69jOxpuDhlOmDdwPqX9b+YTxyb gBUv2h+kEfbYtJ7GTfb66bVLq0NELk6TL9GzjDY/l9VetXAHLz20ZMVFplaRa6yyCHJI 2jfrSIdLNHyxks+PDsGHSzz8VOpEd52/zs4BoHdJaWu1wXRTK0cb5263MLTsFILDFItv nevg== X-Gm-Message-State: AOUpUlGOX/YTtYh+PdevOXgb810x9KG3OEx5gWehStOp5hd4u+7YdLUW 8CpRkD3dbjzO7TNgbcPHgJpPmlAbuPDz4Nm36pMBKA== X-Google-Smtp-Source: AA+uWPw65yCT2BKBPNeJjWisRhBdqa0zZ2nickyyA8jD7/hpyblXkkT+bQoe9WaK9tpxmIGNwjEWq5MGPMM5npr6eBc= X-Received: by 2002:a6b:3902:: with SMTP id g2-v6mr9627337ioa.168.1534014863629; Sat, 11 Aug 2018 12:14:23 -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 12:14:23 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: 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 13:14:23 -0600 X-Google-Sender-Auth: bF7821FZHm4Sl5aZs6zVdF8LCt0 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 19:14:25 -0000 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/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... > I built oldlzma from zrouter and have the same results... Warner > 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" >> >> >> > >> > >> > >> > >