From owner-freebsd-mips@freebsd.org Thu May 11 13:32:48 2017 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59FEAD674A0 for ; Thu, 11 May 2017 13:32:48 +0000 (UTC) (envelope-from mike@wolman.co.uk) Received: from avasout08.plus.net (avasout08.plus.net [212.159.14.20]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Bizanga Labs SMTP Client Certificate", Issuer "Bizanga Labs CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DB6D61A1E for ; Thu, 11 May 2017 13:32:47 +0000 (UTC) (envelope-from mike@wolman.co.uk) Received: from [192.168.3.50] ([80.229.66.11]) by avasout08 with smtp id K1Yd1v00B0EahWw011Yebr; Thu, 11 May 2017 14:32:39 +0100 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.2 cv=JPdLi4Cb c=1 sm=1 tr=0 a=sNOkzuqjfbpz3c/qSHODpA==:117 a=sNOkzuqjfbpz3c/qSHODpA==:17 a=r77TgQKjGQsHNAKrUKIA:9 a=NOXaJoz1W5epnK5WgsYA:9 a=HwnZxz3SP31qpyj8:21 a=WSWapo6lRVslRfvj:21 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=DmkYlkv94dxvIbivmI4A:9 a=zcewMMQvTUVTd3Oa:21 a=_W_S_7VecoQA:10 a=6kGIvZw6iX1k4Y-7sg4_:22 Subject: Re: onion omega2+ To: Aleksandr Rybalko References: <694efc3a-e183-35a1-a0bf-9a9c0d708826@wolman.co.uk> <5866.49154.qm@web101718.mail.ssk.yahoo.co.jp> <102de390-63ca-a156-2208-bea3d5eea0f9@wolman.co.uk> <541011.41820.qm@web101719.mail.ssk.yahoo.co.jp> <672be258-8fed-6317-1325-f9fccf2646c3@wolman.co.uk> <369335.16286.qm@web101716.mail.ssk.yahoo.co.jp> <711a889d-9701-2441-5c9c-98e0ac607ffb@wolman.co.uk> <456721.9572.qm@web101705.mail.ssk.yahoo.co.jp> <8b21a15c-3af8-bdba-cc70-6bd0e3a65f39@wolman.co.uk> <05065E4E-1D0F-49DE-B14D-D45ECCEA251F@gmail.com> <2b8211f6-9f42-0f11-678f-a2ed830b2430@wolman.co.uk> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Mike Wolman Message-ID: <3959d9ed-5bbc-0b79-f63a-502080f91cbf@wolman.co.uk> Date: Thu, 11 May 2017 14:32:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2017 13:32:48 -0000 On 11/05/2017 12:32, Aleksandr Rybalko wrote: > BTW, Mike, join us on IRC in EFNet network, channel #bsdmips. There is > a lot of guys who able to help. > Ahh great thank will get myself on there - not used irc in quite some time! I think I am almost there now just having a spot of trouble with getting the root mounting off the md device: The standard kernel conf for MT7628_FDT has: # Default rootfs device configuration, should be changed to suit target board options ROOTDEVNAME=\"ufs:md0.uzip\" # Support geom_uzip(4) compressed disk images device geom_uzip options GEOM_UZIP # Support md(4) and md-based rootfs device md options MD_ROOT On booting I see: random: harvesting attach, 8 bytes (4 bits) from uhub1 ugen1.2: at usbus1 umass0 on uhub0 umass0: on usbus1 umass0:0:0: Attached to scbus0 random: harvesting attach, 8 bytes (4 bits) from umass0 mountroot: waiting for device md0.uzip... (probe0:umass-sim0:0:0:0): Down reving Protocol Version from 2 to 0? pass0 at umass-sim0 bus 0 scbus0 target 0 lun 0 pass0: Removable Direct Access SCSI device pass0: Serial Number 070B00012340350 pass0: 1.000MB/s transfers GEOM: new disk da0 da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Removable Direct Access SCSI device da0: Serial Number 070B00012340350 da0: 1.000MB/s transfers da0: 495MB (1015805 512 byte sectors) da0: quirks=0x2 da0: Delete methods: (da0:umass-sim0:0:0:0): PREVENT ALLOW MEDIUM REMOVAL not supported. Mounting from ufs:md0.uzip failed with error 19. I have created a kernel.MT7628_FDT.lzma.uImage which is compressed and boots from uboot. The mfsroot was created with: X_DTS_FILE=OMEGA2P.dts KERNCONF=MT7628_FDT ../freebsd-wifi-build/build/bin/build ralink mfsroot and fsimage: X_DTS_FILE=OMEGA2P.dts KERNCONF=MT7628_FDT ../freebsd-wifi-build/build/bin/build ralink fsimage From digging about and looking at the build scripts I have made a geom_uzip image from the fsimage with: mkuzip -L -d -s 65536 -v -o mfsroot-ralink.img.ulzma ../img/mfsroot-ralink.img and then joined this to the kernel with: ( dd if=kernel.MT7628_FDT.lzma.uImage bs=65536 conv=sync dd if=mfsroot-ralink.img.ulzma ) > MT7628_FDT.lzma.flash Am I missing something in the stage between making the mfsroot and fsimage where I need to add a some config somewhere or give the kernel a hint or set something in the u-boot env to where the fs image is? I tried to use: ../freebsd-wifi-build/build/bin/build ralink ubnt But this fails as there is no specified firmware description - i have tried to run this without the build script with: ../freebsd-wifi-build/programs/ubnt-mkfwimage/mkfwimage -B -v \ -k kernel.MT7628_FDT.lzma.uImage \ -r /home/mike/omega2/tftpboot/mfsroot-ralink.img.lzma \ -C -c ../cfgfs-ralink.img -B "" mips -o MT7628_FDT.initial.img