From owner-freebsd-mips@freebsd.org Tue May 9 00:18:08 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 54A04D64E52 for ; Tue, 9 May 2017 00:18:08 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from nh501-vm6.bullet.mail.kks.yahoo.co.jp (nh501-vm6.bullet.mail.kks.yahoo.co.jp [183.79.56.136]) by mx1.freebsd.org (Postfix) with SMTP id B1B7E121B for ; Tue, 9 May 2017 00:18:07 +0000 (UTC) (envelope-from yamori813@yahoo.co.jp) Received: from [183.79.100.138] by nh501.bullet.mail.kks.yahoo.co.jp with NNFMP; 09 May 2017 00:18:00 -0000 Received: from [183.79.100.134] by t501.bullet.mail.kks.yahoo.co.jp with NNFMP; 09 May 2017 00:17:59 -0000 Received: from [127.0.0.1] by omp503.mail.kks.yahoo.co.jp with NNFMP; 09 May 2017 00:17:59 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 929967.93581.bm@omp503.mail.kks.yahoo.co.jp Received: (qmail 69814 invoked by uid 60001); 9 May 2017 00:17:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.jp; s=yj20110701; t=1494289079; bh=Z6KGzNHYo4/wLLl2I0PTyAaOkGBf7PtMLIzf7golsHs=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:X-YMail-JAS:References:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=twZzEiTrej1ty2DYtKqsv91fLgm3diUXvIJIOmOQT1HQUhsk2yvF6gCD6uzZZfqtJSGdl0Mry+LIj17kxV8S/I4DVKxY9XHhSw6Mb33x7lydRk7J2AUWL6tf1p5Ml72yQ0OeLEng6tESaPjwNg1ZSGiTQK+f9qU9/m1Kvb7N8nc= 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:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=aW3OFfYVIlnGaVtYuSOpZcxe6hUYF3D5Hmhg42yBI4TU9nB3TCY/EQMeWsQNI/NTCbOptX92eK5qCRQdM5zY+Vem2/Bi5mPcnWaAhF3RlIqzhWVlQF43Ot/PxsSufL+Wv4fvtmoK7o28B1EYfwDQwMlN4FzeCvY8LrzLHyspR+k=; Message-ID: <410144.69078.qm@web101716.mail.ssk.yahoo.co.jp> X-YMail-OSG: BsNxO28VM1lXfRqNE66LYWqJExrAj.icfCEOSWXU0_NWuehlTCHy4fPLw7FR2spLlDlj_._L5NhuK5tnZzN8b8IL_clhdFsw6a3vsoHuuq0Us3n_KzVlLILyluLH_YhI12zP30ECVrO8_bCdV2DnwU4o0T8uDL80We_289pmndPlEgJ8EOy4IbicrFXJHgSfGOe6WNULFCsxE.k2HUNAlUSBQFpGF16JwzeAPLpZLltr70Vo1OTYgdmaIst1iR4nY_PWfE.GnD1m4f2uI4akJV6rcVYyiEhdrFgDu.7SAxPp7EMK0dvzaKWdQyDRJgKeEdtB_IVwjkh0nnTQIMaGwVnqyUYn8ICpJRpYV9ifRM8XLeiE8sWfuq8XXdK6utg1JNfa4EZGQNcB.dQQvd2licxQH8iWFzxKRLKZVsBw7gm6BL4b2zVZK_t3zRWIgbaEngffIJXSOSdPal3fACBwMPC6_w7qo64hI1oqmCdrjqi9UxWnqwYw25548Cb2QSgvpKBrN6JS.iJOyvBRsWFp.6p92Pbn6wZTzwAcp89hl3naHanjlDVe7taBIIc7.d.c8kl2wiHq9Ou9kGAajuCVqFej5sRAEiG48PqsfkNJ7L9dPEmdhKTOwH.FtznHiK2T0pvuOfCUIodT9vqasAf3acRAeAU5 Received: from [210.20.198.8] by web101716.mail.ssk.yahoo.co.jp via HTTP; Tue, 09 May 2017 09:17:58 JST X-Mailer: YahooMailWebService/0.8.111_71 X-YMail-JAS: wnoWJGYVM1nhjR5e.OwAxp1wiEQkVweK8xShITb_JO4TnDSQ_q1ZU8q1Qi.L8QG2tf_U31ePYToOP00Vhlv2yHPvqwU.784n72JhTyNgBb.3tN0HzA6rsClvEZucr.UtqIqY References: <694efc3a-e183-35a1-a0bf-9a9c0d708826@wolman.co.uk> Date: Tue, 9 May 2017 09:17:58 +0900 (JST) From: Mori Hiroki Reply-To: Mori Hiroki Subject: Re: onion omega2+ To: Mike Wolman , "freebsd-mips@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-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: Tue, 09 May 2017 00:18:08 -0000 Hi.=0A=0AI think if U-Boot work memory make broken then=A0=0AUncompressing = Kernel Image is NG.=0A=0ASome ARM U-Boot is use top address in work memory.= =0AIf this case your kernel start address=A0to move to=0Aafter work memory.= =A0But I never see in MIPS.=A0=0A=0AAnd What is set=A0FDT_DTS_FILE =A0in=A0= your kernel configuration ?=0A=0A----- Original Message -----=0A=0A> From: = Mike Wolman =0A> To: freebsd-mips@freebsd.org=0A> Cc: = =0A> Date: 2017/5/9, Tue 07:48=0A> Subject: Re: onion omega2+=0A> =0A> =0A>= More info in case anyone can point me in the right direction.=0A> =0A> I h= ave found:=0A> =0A> https://forum.openwrt.org/viewtopic.php?id=3D53865=0A> = =0A> I have tried changing how lzma compresses the kernel by adding -d20 to= =0A> the build scripts eg:=0A> =0A> /usr/local/bin/lzma e =0A> /home/mike/= omega2/src/../root/mipsel_ap/boot/kernel.MT7628_FDT/kernel \=0A> /home/mike= /omega2/src/../tftpboot/kernel.MT7628_FDT.lzma -d20=0A> =0A> This did not w= ork.=0A> =0A> =0A> Looking at the onion omega conf I see that it uses mkuzi= p and not lzma =0A> with the following settings:=0A> =0A> X_FSIMAGE_CMD=3D"= mkuzip"=0A> X_FSIMAGE_ARGS=3D"-L -d -s 65536 -v"=0A> X_FSIMAGE_SUFFIX=3D".u= lzma"=0A> =0A> So tried the following:=0A> =0A> mkuzip -L -d -s 65536 -v -o= kernel.MT7628_FDT.ulzma kernel.MT7628_FDT=0A> =0A> mkimage -A mips -O linu= x -T kernel -C lzma \=0A> =A0 -a 0x80001000 -e 0x80001100 \=0A> =A0 -n "F= reeBSD" -d kernel.MT7628_FDT.lzma =0A> kernel.MT7628_FDT.ulzma.uImage=0A> = =0A> =0A> But this did not work either.=0A> =0A> =0A> =0A> On 08/05/2017 19= :41, Aleksandr Rybalko wrote:=0A>> Hi Mike!=0A>> =0A>> I see you have no = "OK" after "Uncompressing Kernel Image =0A> ...", so =0A>> first point ubo= ot decompressor fail.=0A>> Why fail? Because you have wrong base address i= n image:=0A>> =A0 Load Address: fffffff2=0A>> =A0 Entry Point:=A0 fffffff= 2=0A>> MIPS32 machines have RAM mapped to 0x80000000 address, so adding it= s =0A>> size, you will get max address (if 16MB, it will be 0x81000000), b= ut =0A>> you uboot image was created with 0xfffffff2.=0A>> =0A>> Even mor= e, unpacked kernel expects it will be called at 0x80001100. so =0A>> if yo= u have ELF kernel (file with ELF header, like every executable) =0A>> that= file have to be loaded at (0x80001100 - ELF_HEADER_SIZE).=0A>> In most ca= ses it will be 0x80001100 - 0x100 =3D 0x80001000. But sometime =0A>> (I di= d not found why) it can be 0x20, you can find it by looking at =0A>> .text= section in readelf -S.=0A>> =0A>> So if you have kernel with entry point = 0x80001100 and .text segment =0A>> offset 0x100, you have to create uboot = image with load address =0A>> 0x80001000 and entry point 0x80001100.=0A>> = =0A>> If that step successful you will get:=0A>> /Uncompressing Kernel Im= age/ ... OK=0A>> Starting kernel ...=0A>> =0A>> Last line mean, uboot did= jump into kernel code.=0A>> =0A>> Good luck.=0A>> =0A>> 2017-05-07 18:20= GMT+03:00 Mike Wolman > = >:=0A>> =0A>> =A0 =A0 Hi,=0A>> =0A>> =A0 =A0 I am trying to get FreeBSD w= orking on this board - I think I am=0A>> =A0 =A0 almost there in getting i= t working but need some help please.=0A>> =0A>> =A0 =A0 I have followed in= structions from the freebsd-wifi-build and=0A>> =A0 =A0 *think* I have got= everything correct - I am trying to do this on=0A>> =A0 =A0 a CURRENT set= up:=0A>> =0A>> =A0 =A0 FreeBSD f64-current.mw.office 12.0-CURRENT FreeBSD = 12.0-CURRENT #0=0A>> =A0 =A0 r317887: Sun May=A0 7 03:20:34 UTC 2017=0A>> = =A0 =A0 mike@f64-current.mw.office:/usr/obj/usr/src/sys/GENERIC-NODEBUG amd= 64=0A>> =0A>> =0A>> =A0 =A0 $ cat ~/.freebsd-wifi-build-settings.cfg=0A>> = =A0 =A0 X_SKIP_MORE_STUFF=3DYES=0A>> =A0 =A0 X_EXTRA_SRC_CONF=3D~/omega2/= src.conf=0A>> =0A>> =A0 =A0 $ cat ~/omega2/src.conf=0A>> =A0 =A0 WITHOUT_= CLANG=3DYES=0A>> =A0 =A0 WITHOUT_CLANG_FULL=3DYES=0A>> =0A>> =A0 =A0 get = dts files from thread=0A>> =A0 =A0 http://community.onion.io/topic/1099/ope= nwrt-on-the-omega-2/8=0A>> =A0 =A0 =0A>> =0A>> =0A>> =A0 =A0 cd ~/omega2/src/sys/gnu/= dts/mips=0A>> =A0 =A0 fetch=0A>> =A0 =A0 =0A> https://raw.githubuserconten= t.com/WereCatf/source/image/target/linux/ramips/dts/OMEGA2.dtsi=0A>> =A0 = =A0 =0A> =0A>> =A0 =A0 fetch=0A>> =A0 =A0 =0A> https://r= aw.githubusercontent.com/WereCatf/source/image/target/linux/ramips/dts/OMEG= A2.dts=0A>> =A0 =A0 =0A> =0A>> =A0 =A0 fetch=0A>> =A0 =A0= =0A> https://raw.githubusercontent.com/WereCatf/source/image/target/linux/= ramips/dts/OMEGA2P.dts=0A>> =A0 =A0 =0A> =0A>> =0A>> =A0 = =A0 X_DTS_FILE=3DOMEGA2P.dts KERNCONF=3DMT7628_FDT=0A>> =A0 =A0 ../freebs= d-wifi-build/build/bin/build ralink buildworld=0A>> =A0 =A0 X_DTS_FILE=3DO= MEGA2P.dts KERNCONF=3DMT7628_FDT=0A>> =A0 =A0 ../freebsd-wifi-build/build/= bin/build ralink buildkernel=0A>> =A0 =A0 X_DTS_FILE=3DOMEGA2P.dts KERNCON= F=3DMT7628_FDT=0A>> =A0 =A0 ../freebsd-wifi-build/build/bin/build ralink i= nstallworld=0A>> =A0 =A0 X_DTS_FILE=3DOMEGA2P.dts KERNCONF=3DMT7628_FDT=0A= >> =A0 =A0 ../freebsd-wifi-build/build/bin/build ralink installkernel=0A>>= =A0 =A0 X_DTS_FILE=3DOMEGA2P.dts KERNCONF=3DMT7628_FDT=0A>> =A0 =A0 ../f= reebsd-wifi-build/build/bin/build ralink distribution=0A>> =0A>> =0A>> =A0 = =A0 X_DTS_FILE=3DOMEGA2P.dts KERNCONF=3DMT7628_FDT=0A>> =A0 =A0 ../freebs= d-wifi-build/build/bin/build ralink mfsroot=0A>> =A0 =A0 X_DTS_FILE=3DOMEG= A2P.dts KERNCONF=3DMT7628_FDT=0A>> =A0 =A0 ../freebsd-wifi-build/build/bin= /build ralink fsimage=0A>> =A0 =A0 X_DTS_FILE=3DOMEGA2P.dts KERNCONF=3DMT7= 628_FDT=0A>> =A0 =A0 ../freebsd-wifi-build/build/bin/build ralink uboot=0A= >> =0A>> =0A>> =A0 =A0 Create flash:=0A>> =0A>> =A0 =A0 X_FLASH=3Dkernel.= MT7628_FDT.lzma.flash=0A>> =A0 =A0 dd if=3D/dev/zero bs=3D$(( 0x200000 )) = count=3D1 of=3D${X_FLASH}=0A>> =A0 =A0 dd if=3Dkernel.MT7628_FDT.lzma.uIma= ge of=3D${X_FLASH} conv=3Dnotrunc=0A>> =A0 =A0 dd if=3D mfsroot-ralink.img= .lzma >> ${X_FLASH}=0A>> =0A>> =0A>> =A0 =A0 $ readelf -h kernel.MT7628_FD= T | grep Entry=0A>> =A0 =A0 =A0 Entry point address:=A0 =A0 =A0 =A0 =A0 = =A0 =A0 0x80001100=0A>> =0A>> =0A>> =0A>> =0A>> =A0 =A0 Now on the omega = over serial - I didnt get the network expansion=0A>> =A0 =A0 doc thing so = am doing stuff with usb rather than tftp=0A>> =0A>> =A0 =A0 I am not 100% = sure about the 0x80001100 and the fatload and have=0A>> =A0 =A0 tried this= =0A>> =0A>> =A0 =A0 Omega2 # fatload usb 0:1 0x80001100 /kernel.MT7628_FDT= .lzma.flash=0A>> =A0 =A0 *=0A>> =A0 =A0 *=0A>> =A0 =A0 Reading file "/ke= rnel.MT7628_FDT.lzma.flash"=0A>> =A0 =A0 *=0A>> =A0 =A0 **=0A>> =A0 =A0 = **=0A>> =A0 =A0 **=0A>> =A0 =A0 ******=0A>> =A0 =A0 =0A> ****************= ***************************************************************************= **************************************************=0A>> =A0 =A0 ******=0A>= > =A0 =A0 *=0A>> =A0 =A0 FAT: 2108463 Bytes read=0A>> =A0 =A0 Omega2 # b= ootm 0x80001100=0A>> =A0 =A0 ## Booting image at 80001100 ...=0A>> =A0 =A0= =A0 =A0 Image Name:=A0 FreeBSD=0A>> =A0 =A0 =A0 =A0 Image Type:=A0 MIPS = Linux Kernel Image (lzma compressed)=0A>> =A0 =A0 =A0 =A0 Data Size:=A0 =A0= 1365122 Bytes =3D=A0 1.3 MB=0A>> =A0 =A0 =A0 =A0 Load Address: fffffff2=0A= >> =A0 =A0 =A0 =A0 Entry Point:=A0 fffffff2=0A>> =A0 =A0 =A0 =A0 Verifying = Checksum ... OK=0A>> =A0 =A0 =A0 =A0 Uncompressing Kernel Image ...=0A>> = =0A>> =0A>> =A0 =A0 At this point nothing happens and console hangs - note= in=0A>> =A0 =A0 OMEGA2.dtsithe console is set to ttyS0:=0A>> =0A>> =A0 = =A0 bootargs =3D "console=3DttyS0,115200";=0A>> =0A>> =0A>> =0A>> =0A>> = =A0 =A0 I have also tried with just kernel.MT7628_FDT and=0A>> =A0 =A0 ke= rnel.MT7628_FDT.lzma but both fail:=0A>> =0A>> =A0 =A0 Omega2 # fatload us= b 0:1 0x80001100 /kernel.MT7628_FDT.lzma.uImage=0A>> =A0 =A0 *=0A>> =A0 = =A0 *=0A>> =A0 =A0 Reading file "/kernel.MT7628_FDT.lzma.uImage"=0A>> =A0= =A0 *=0A>> =A0 =A0 **=0A>> =A0 =A0 **=0A>> =A0 =A0 ******=0A>> =A0 =A0= =0A> *********************************************************************= *********************************************************=0A>> =A0 =A0 ***= *******=0A>> =A0 =A0 *=0A>> =A0 =A0 FAT: 1365186 Bytes read=0A>> =A0 =A0 = Omega2 # bootm 0x80001100=0A>> =A0 =A0 ## Booting image at 80001100 ...= =0A>> =A0 =A0 =A0 =A0 Image Name:=A0 FreeBSD=0A>> =A0 =A0 =A0 =A0 Image Ty= pe:=A0 MIPS Linux Kernel Image (lzma compressed)=0A>> =A0 =A0 =A0 =A0 Data= Size:=A0 =A0 1365122 Bytes =3D=A0 1.3 MB=0A>> =A0 =A0 =A0 =A0 Load Address= : fffffff2=0A>> =A0 =A0 =A0 =A0 Entry Point:=A0 fffffff2=0A>> =A0 =A0 =A0 = =A0 Verifying Checksum ... OK=0A>> =A0 =A0 =A0 =A0 Uncompressing Kernel Ima= ge ...=0A>> =0A>> =0A>> =A0 =A0 A few comments on the hardware for anyone = who wants to get one:=0A>> =0A>> =A0 =A0 Get the expansion dock with seria= l port access - the power dock=0A>> =A0 =A0 does not provide serial access= - i think it is possible to use an=0A>> =A0 =A0 ftdi ttl serial chip/cabl= e but have not tried.=0A>> =0A>> =A0 =A0 Stupidly I forgot this only has w= ifi access so you are not able to=0A>> =A0 =A0 tftp boot this without gett= ing the ethernet network expansion but=0A>> =A0 =A0 loading stuff up from = a usb memory stick is seem fine from u-boot.=0A>> =0A>> =A0 =A0 I do not t= hink that it is possible to boot from the SD card on the=0A>> =A0 =A0 Omeg= a2+ - which is a shame.=0A>> =0A>> =A0 =A0 Thanks for reading,=0A>> =0A>> = =A0 =A0 Mike.=0A>> =0A>> =0A>> =0A>> =A0 =A0 ____________________________= ___________________=0A>> =A0 =A0 freebsd-mips@freebsd.org mailing =0A> list=0A>> =A0 =A0 https://lists.freebsd.org/ma= ilman/listinfo/freebsd-mips=0A>> =A0 =A0 =0A>> =A0 =A0 To unsubscribe, send any mail to=0A>= > =A0 =A0 "freebsd-mips-unsubscribe@freebsd.org=0A>> =A0 =A0 "=0A>> =0A>> =0A>> =0A>> =0A>> -- =0A>> = WBW=0A>> -------=0A>> Rybalko Aleksandr >=0A>> =0A> =0A> _______________________________________________=0A> = freebsd-mips@freebsd.org mailing list=0A> https://lists.freebsd.org/mailman= /listinfo/freebsd-mips=0A> To unsubscribe, send any mail to =0A> "freebsd-m= ips-unsubscribe@freebsd.org"=0A>