From owner-freebsd-mips@freebsd.org Tue May 9 15:51:50 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 7BE1FD6505B for ; Tue, 9 May 2017 15:51:50 +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 B50F61F67 for ; Tue, 9 May 2017 15:51:49 +0000 (UTC) (envelope-from mike@wolman.co.uk) Received: from [192.168.3.50] ([80.229.66.11]) by avasout08 with smtp id JFrk1v0090EahWw01FrlJu; Tue, 09 May 2017 16:51:46 +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=N659UExz7-8A:10 a=UmSUZ3ptAAAA:8 a=4I05h4SrAAAA:8 a=6I5d2MoRAAAA:8 a=arpVtLJQAAAA:8 a=NEAV23lmAAAA:8 a=jdP34snFAAAA:8 a=LJ5NkaWEAAAA:8 a=bt8Zh30PAAAA:8 a=fkMMMrkkknrGvhzTCmkA:9 a=Doavq_CF_6984uKx:21 a=8gXCqPIf5elPA4Sq:21 a=pILNOxqGKmIA:10 a=FyGKTEvU35uc88vWBdgE:22 a=SXYKVUms7l59yVxtnTo9:22 a=IjZwj45LgO3ly-622nXo:22 a=86BuEF5rAmEUDcZwuOX_:22 a=jlphF6vWLdwq7oh3TaWq:22 a=eH83O4KjmLCfbRe1EArK:22 Subject: Re: onion omega2+ To: Mori Hiroki , Aleksandr Rybalko References: <694efc3a-e183-35a1-a0bf-9a9c0d708826@wolman.co.uk> <410144.69078.qm@web101716.mail.ssk.yahoo.co.jp> <128807.28836.qm@web101715.mail.ssk.yahoo.co.jp> <2d555385-8258-fd75-e4a3-a1e59bf86314@wolman.co.uk> <651873.78746.qm@web101702.mail.ssk.yahoo.co.jp> <2c5cd01a-a8d4-3ffa-4e9c-2aad170574c1@wolman.co.uk> <39222.11970.qm@web101719.mail.ssk.yahoo.co.jp> <6f1b2d35-5d17-765a-6138-0ab85455fc09@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> Cc: "freebsd-mips@freebsd.org" From: Mike Wolman Message-ID: <672be258-8fed-6317-1325-f9fccf2646c3@wolman.co.uk> Date: Tue, 9 May 2017 16:51:43 +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: <541011.41820.qm@web101719.mail.ssk.yahoo.co.jp> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 15:51:50 -0000 Ok I not sure what my next step or what Im looking for but here is some info about the serial stuff and readelf ouput [mike@f64-current ~/omega2/tftpboot]$ readelf -h kernel.MT7628_FDT 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: FreeBSD ABI Version: 0 Type: EXEC (Executable file) Machine: MIPS R3000 Big-Endian only Version: 0x1 Entry point address: 0x80001100 Start of program headers: 52 (bytes into file) Start of section headers: 5653480 (bytes into file) Flags: 0x50001001, mips32, o32, noreorder 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: 32 Section header string table index: 29 When booting into linux from flash: root@Omega-12BF:/dev# dmesg |grep tty [ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2 [ 0.276011] console [ttyS0] disabled [ 0.279438] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A [ 0.288217] console [ttyS0] enabled [ 0.303969] 10000d00.uart1: ttyS1 at MMIO 0x10000d00 (irq = 29, base_baud = 2500000) is a 16550A [ 0.313561] 10000e00.uart2: ttyS2 at MMIO 0x10000e00 (irq = 30, base_baud = 2500000) is a 16550A [mike@f64-current ~/omega2/src/sys/gnu/dts/mips]$ grep serial * LINKIT7688.dts: serial0 = &uart2; LINKIT7688.dts-orig: serial0 = &uart2; mt7620a.dtsi: serial0 = &uartlite; mt7620n.dtsi: serial0 = &uartlite; mt7621.dtsi: serial0 = &uartlite; mt7628an.dtsi: serial0 = &uartlite; <------ the included dtsi by OMEGA2.dtsi rt2880.dtsi: serial0 = &uartlite; rt3050.dtsi: serial0 = &uartlite; rt3352.dtsi: serial0 = &uartlite; rt3883.dtsi: serial0 = &uartlite; rt5350.dtsi: serial0 = &uartlite; [mike@f64-current ~/omega2/src/sys/gnu/dts/mips]$ grep tty * ArcherC20i.dts: bootargs = "console=ttyS0,115200"; CARAMBOLA.dts: bootargs = "console=ttyS0,115200"; CF-WR800N.dts: bootargs = "console=ttyS0,115200"; MicroWRT.dts: bootargs = "console=ttyS0,115200"; NA930.dts: bootargs = "console=ttyS1,57600"; OMEGA2.dtsi: bootargs = "console=ttyS0,115200"; <----- looks like all the others OY-0001.dts: bootargs = "console=ttyS0,115200"; PBR-M1.dts: bootargs = "console=ttyS0,115200"; SK-WB8.dts: bootargs = "console=ttyS0,57600"; ZBT-WG2626.dts: bootargs = "console=ttyS0,115200"; ZBT-WG3526.dts: bootargs = "console=ttyS0,115200"; mt7620a.dtsi: bootargs = "console=ttyS0,57600"; mt7620n.dtsi: bootargs = "console=ttyS0,57600"; mt7628an.dtsi: bootargs = "console=ttyS0,57600"; rt2880.dtsi: bootargs = "console=ttyS0,57600"; rt3050.dtsi: bootargs = "console=ttyS0,57600"; rt3352.dtsi: bootargs = "console=ttyS0,57600"; rt3883.dtsi: bootargs = "console=ttyS0,57600"; rt5350.dtsi: bootargs = "console=ttyS0,57600"; (i have removed some of the results from here as most files match) On 09/05/2017 15:07, Mori Hiroki wrote: > Hi. Mike > >> Starting kernel ... > > I think success to boot. > > Next is Entry point miss or uart console issue. > > > Entry point can check on ELF kernel file by readelf command. > > Uart console issue is in dts file. > > ----- Original Message ----- > >> From: Mike Wolman >> To: Mori Hiroki ; Aleksandr Rybalko >> Cc: "freebsd-mips@freebsd.org" >> Date: 2017/5/9, Tue 22:42 >> Subject: Re: onion omega2+ >> >> >> Ok got somewhere with this >> >> >> USB_STORAGE: 1 Storage Device(s) found >> Omega2 # fatload usb 0:1 0x80800000 kernel.MT7628_FDT.uImage >> * >> * >> Reading file "kernel.MT7628_FDT.uImage" >> * >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ****** >> ****** >> ****************************************************************************************************************************************************************************************************************** >> **** >> * >> FAT: 5654824 Bytes read >> Omega2 # go >> Usage: >> go - start application at address 'addr' >> >> Omega2 # go 0x80001000 >> ## Starting application at 0x80001000 ... >> >> >> >> I have tried with: >> >> Omega2 # go 0x80001100 >> ## Starting application at 0x80001100 ... >> >> >> >> I have tried using the 0x80001000 for fatload as well: >> >> >> USB_STORAGE: 1 Storage Device(s) found >> Omega2 # help fatload >> fatload >> [bytes] >> - load binary file 'filename' from 'dev' on >> 'interface' >> to address 'addr' from dos filesystem >> >> Reading file "kernel.MT7628_FDT.uImage" >> * >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ****** >> ****** >> ****************************************************************************************************************************************************************************************************************** >> **** >> * >> FAT: 5654824 Bytes read >> Omega2 # go 0x80001100 >> ## Starting application at 0x80001100 ... >> >> >> >> However: >> >> Omega2 # fatload usb 0:1 0x80800000 kernel.MT7628_FDT.uImage >> * >> * >> Reading file "kernel.MT7628_FDT.uImage" >> * >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ** >> ****** >> ****** >> ****************************************************************************************************************************************************************************************************************** >> **** >> * >> FAT: 5654824 Bytes read >> Omega2 # bootm 0x80800000 >> ## Booting image at 80800000 ... >> Image Name: FreeBSD >> Image Type: MIPS Linux Kernel Image (uncompressed) >> Data Size: 5654760 Bytes = 5.4 MB >> Load Address: 80001000 >> Entry Point: 80001100 >> Verifying Checksum ... OK >> OK >> No initrd >> ## Transferring control to Linux (at address 80001100) ... >> ## Giving linux memsize in MB, 128 >> >> Starting kernel ... >> >> >> But it doesnt go any further >> >> >> >> >> >> >> On 09/05/2017 14:20, Mori Hiroki wrote: >>> Hi. >>> >>> One more. >>> >>> Omega2 # fatload usb 0:1 0x80800000 kernel.MT7628_FDT.uImage >>> >>> Omega2 # bootm 0x80800000 >>> >>> ----- Original Message ----- >>>> From: Mike Wolman >>>> To: Mori Hiroki ; Aleksandr Rybalko >> >>>> Cc: "freebsd-mips@freebsd.org" >> >>>> Date: 2017/5/9, Tue 22:01 >>>> Subject: Re: onion omega2+ >>>> >>>> >>>> No joy >>>> >>>> Omega2 # fatload usb 0:1 0x80800000 kernel.MT7628_FDT.uImage >>>> * >>>> * >>>> Reading file "kernel.MT7628_FDT.uImage" >>>> * >>>> ** >>>> ** >>>> ** >>>> ** >>>> ** >>>> ** >>>> ** >>>> ** >>>> ** >>>> ** >>>> ****** >>>> ****** >>>> >> ****************************************************************************************************************************************************************************************************************** >>>> **** >>>> * >>>> FAT: 5654824 Bytes read >>>> Omega2 # bootm >>>> ## Booting image at 80100000 ... >>>> Bad Magic Number,CE6AE7C4 >>>> >>>> I am going to get a different usb memory stick and rebuild the kernel >>>> later on as i got an error when last writing to the usb memory key and >>>> its quite old now so just want to eliminate it from testing. >>>> >>>> >>>> On 09/05/2017 13:52, Mori Hiroki wrote: >>>>> Hi. >>>>> >>>>> This is my sample operation get image from network and boot. >>>>> >>>>> RT3052 # tftpboot 0x80800000 >> Planex_MZK-WNH_kernel.kbin.oldlzma.uboot >>>>> RT3052 # bootm >>>>> >>>>> >>>>> I don't use USB support U-Boot. But I think fatload command >> argument is >>>>> temporary memory address not kernel address. >>>>> >>>>> How about this. >>>>> >>>>> Omega2 # fatload usb 0:1 0x80800000 kernel.MT7628_FDT.uImage >>>>> Omega2 # bootm >>>>> >>>>> ----- Original Message ----- >>>>>> From: Mike Wolman >>>>>> To: Aleksandr Rybalko ; Mori Hiroki >>>> >>>>>> Cc: "freebsd-mips@freebsd.org" >>>> >>>>>> Date: 2017/5/9, Tue 20:48 >>>>>> Subject: Re: onion omega2+ >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Is it possible to exclude the compression of the kernel/image >> for >>>>> now eg: >>>>>> mkimage -A mips -C none -O linux -T kernel -a 0x80001000 -e >>>>> 0x80001100 -n "FreeBSD" -d kernel.MT7628_FDT >>>>> kernel.MT7628_FDT.uImage >>>>>> I have just tried the above but when booting I get a Bad >> Magic >>>>> Number. >>>>>> Omega2 # fatload usb 0:1 0x80001000 kernel.MT7628_FDT.uImage >>>>>> * >>>>>> * >>>>>> Reading file "kernel.MT7628_FDT.uImage" >>>>>> * >>>>>> ** >>>>>> ** >>>>>> ** >>>>>> ** >>>>>> ** >>>>>> ** >>>>>> ** >>>>>> ** >>>>>> ** >>>>>> ** >>>>>> ****** >>>>>> ****** >>>>>> >> ****************************************************************************************************************************************************************************************************************** >>>>>> **** >>>>>> * >>>>>> FAT: 5654824 Bytes read >>>>>> Omega2 # bootm 0x80001100 >>>>>> ## Booting image at 80001100 ... >>>>>> Bad Magic Number,1C994480 >>>>>> Omega2 # >>>>>> >>>>>> >>>>>> I have seen other examples starting a program directly with >> going to >>>>> the address but this didnt work either: >>>>>> Omega2 # go 0x80001100 >>>>>> ## Starting application at 0x80001100 ... >>>>>> >>>>>> omega freezes here. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On 09/05/2017 10:12, Aleksandr Rybalko wrote: >>>>>> >>>>>> Fix things in order :) >>>>> Currently you have problem with LZMA, serial port later. >>>>> So, find version of lzma used to build linux firmware, MIPS >> routers world >>>> use about 5 incompatible versions. One of them, you can find here: >>>> http://project.zrouter.org/hg/zrouter/file/9ac53695a44d/tools/oldlzma >>>>>>> >>>>>>> >>>>>>> 2017-05-09 7:03 GMT+03:00 Mori Hiroki >>>> : >>>>>>> Hi Mike >>>>>>>> Could you show u-boot printenv command result. >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>>> >>>>>>>> ----- Original Message ----- >>>>>>>>> From: Mike Wolman >>>>>>>>> To: Mori Hiroki ; >>>> "freebsd-mips@freebsd.org" >>>>>>>>> Cc: >>>>>>>>> Date: 2017/5/9, Tue 10:30 >>>>>>>>> Subject: Re: onion omega2+ >>>>>>>>> >>>>>>>>> Hi Mori, >>>>>>>>> >>>>>>>>> When I compiled the world/kernel etc I used: >>>>>>>>> >>>>>>>>> X_DTS_FILE=OMEGA2P.dts KERNCONF=MT7628_FDT >>>>>>>>> ../freebsd-wifi-build/build/ bin/build ralink >>>>> buildkernel >>>>>>>>> I checked the serial stuff was the same as the >>>>> other configs in: >>>>>>>>> https://github.com/freebsd/ freebsd-wifi-build/ >>>>>>>>> and they looked the same. >>>>>>>>> >>>>>>>>> The OMEGA2.dtsi file has: >>>>>>>>> >>>>>>>>> chosen { >>>>>>>>> bootargs = >>>> "console=ttyS0,115200"; >>>>>>>>> }; >>>>>>>>> >>>>>>>>> >>>>>>>>> And mt7628an.dtsi has: serial0 = &uartlite; >>>>>>>>> >>>>>>>>> I dont think im getting as far as worrying about >>>>> the serial console at >>>>>>>>> the moment and need to get the kernel to >> uncompress >>>>> first. >>>>>>>>> Mike. >>>>>>>>> >>>>>>>>> >>>>>>>>> On 09/05/2017 02:20, Mori Hiroki wrote: >>>>>>>>>> Hi Mike >>>>>>>>>> >>>>>>>>>> In FreeBSD is use serial0 dts item to >> console. >>>>>>>>>> I think good to use this at start. >>>>>>>>>> >>>>>>>>>> freebsd/sys/gnu/dts/mips/ MT7628.dts >>>>>>>>>> >>>>>>>>>> ----- Original Message ----- >>>>>>>>>>> From: Mike Wolman >> >>>>>>>>>>> To: Mori Hiroki >> ; >>>>>>>>> "freebsd-mips@freebsd.org" >>>> >>>>>>>>>>> Cc: >>>>>>>>>>> Date: 2017/5/9, Tue 09:25 >>>>>>>>>>> Subject: Re: onion omega2+ >>>>>>>>>>> >>>>>>>>>>> Hi Mori, >>>>>>>>>>> >>>>>>>>>>> I grabbed the dts files from: >>>>>>>>>>> >>>>>>>>>>> https://github.com/WereCatf/ >>>> source/tree/image/target/ linux/ramips/dts >>>>>>>>> https://github.com/WereCatf/ >> source/blob/image/target/ >>>> linux/ramips/dts/OMEGA2P.dts >>>>>>>>> https://github.com/WereCatf/ >> source/blob/image/target/ >>>> linux/ramips/dts/OMEGA2.dtsi >>>>>>>>>>> If this is of any use from the default >>>>> linux install on the flash: >>>>>>>>>>> root@Omega-12BF:/proc# cat /proc/mtd >>>>>>>>>>> dev: size erasesize name >>>>>>>>>>> mtd0: 00030000 00010000 >> "u-boot" >>>>>>>>>>> mtd1: 00010000 00010000 >> "u-boot-env" >>>>>>>>>>> mtd2: 00010000 00010000 >> "factory" >>>>>>>>>>> mtd3: 01fb0000 00010000 >> "firmware" >>>>>>>>>>> mtd4: 00148842 00010000 >> "kernel" >>>>>>>>>>> mtd5: 01e677be 00010000 >> "rootfs" >>>>>>>>>>> mtd6: 01950000 00010000 >> "rootfs_data" >>>>>>>>>>> >>>>>>>>>>> btw after posting i spotted and error >> in >>>>> what i did with: >>>>>>>>>>> mkimage -A mips -O linux -T kernel -C >> lzma >>>>> \ >>>>>>>>>>> -a 0x80001000 -e 0x80001100 \ >>>>>>>>>>> -n "FreeBSD" -d >>>>> kernel.MT7628_FDT.lzma >>>>>>>>>>> kernel.MT7628_FDT.ulzma.uImage >>>>>>>>>>> >>>>>>>>>>> I have redone this using the correct >>>>> compressed kernel ie: >>>>>>>>>>> mkimage -A mips -O linux -T kernel -C >> lzma >>>>> \ >>>>>>>>>>> -a 0x80001000 -e 0x80001100 \ >>>>>>>>>>> -n "FreeBSD" -d >>>>> kernel.MT7628_FDT.ulzma >>>>>>>>>>> kernel.MT7628_FDT.ulzma.uImage >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> But this didnt work. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On 09/05/2017 01:17, Mori Hiroki >> wrote: >>>>>>>>>>>> Hi. >>>>>>>>>>>> >>>>>>>>>>>> I think if U-Boot work memory >> make >>>>> broken then >>>>>>>>>>>> Uncompressing Kernel Image is NG. >>>>>>>>>>>> >>>>>>>>>>>> Some ARM U-Boot is use top >> address >>>>> in work memory. >>>>>>>>>>>> If this case your kernel start >>>>> address to move to >>>>>>>>>>>> after work memory. But I never >> see >>>>> in MIPS. >>>>>>>>>>>> And What is set FDT_DTS_FILE in >>>>> your kernel configuration ? >>>>>>>>>>>> ----- Original Message ----- >>>>>>>>>>>> >>>>>>>>>>>>> From: Mike Wolman >>>> >>>>>>>>>>>>> To: freebsd-mips@freebsd.org >>>>>>>>>>>>> Cc: >>>>>>>>>>>>> Date: 2017/5/9, Tue 07:48 >>>>>>>>>>>>> Subject: Re: onion omega2+ >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> More info in case anyone can >>>>> point me in the right direction. >>>>>>>>>>>>> I have found: >>>>>>>>>>>>> >>>>>>>>>>>>> https://forum.openwrt.org/ >>>> viewtopic.php?id=53865 >>>>>>>>>>>>> I have tried changing how >> lzma >>>>> compresses the kernel by >>>>>>>>> adding -d20 to >>>>>>>>>>>>> the build scripts eg: >>>>>>>>>>>>> >>>>>>>>>>>>> /usr/local/bin/lzma e >>>>>>>>>>>>> >>>>>>>>> /home/mike/omega2/src/../root/ >>>> mipsel_ap/boot/kernel.MT7628_ FDT/kernel >>>>>>>>>>> \ >>>>>>>>>>>>> /home/mike/omega2/src/../ >>>> tftpboot/kernel.MT7628_FDT. lzma >>>>> -d20 >>>>>>>>>>>>> This did not work. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> Looking at the onion omega >> conf >>>>> I see that it uses mkuzip and >>>>>>>>> not lzma >>>>>>>>>>>>> with the following settings: >>>>>>>>>>>>> >>>>>>>>>>>>> >> X_FSIMAGE_CMD="mkuzip" >>>>>>>>>>>>> X_FSIMAGE_ARGS="-L -d -s >> 65536 >>>>> -v" >>>>>>>>>>>>> >> X_FSIMAGE_SUFFIX=".ulzma" >>>>>>>>>>>>> So tried the following: >>>>>>>>>>>>> >>>>>>>>>>>>> mkuzip -L -d -s 65536 -v -o >>>>> kernel.MT7628_FDT.ulzma >>>>>>>>> kernel.MT7628_FDT >>>>>>>>>>>>> mkimage -A mips -O linux -T >>>>> kernel -C lzma \ >>>>>>>>>>>>> -a 0x80001000 -e >> 0x80001100 >>>>> \ >>>>>>>>>>>>> -n "FreeBSD" -d >>>>> kernel.MT7628_FDT.lzma >>>>>>>>>>>>> >> kernel.MT7628_FDT.ulzma.uImage >>>>>>>>>>>>> >>>>>>>>>>>>> But this did not work either. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On 08/05/2017 19:41, >> Aleksandr >>>>> Rybalko wrote: >>>>>>>>>>>>>> Hi Mike! >>>>>>>>>>>>>> >>>>>>>>>>>>>> I see you have no >> "OK" >>>>> after >>>>>>>>> "Uncompressing Kernel >>>>>>>>>>> Image >>>>>>>>>>>>> ...", so >>>>>>>>>>>>>> first point uboot >>>>> decompressor fail. >>>>>>>>>>>>>> Why fail? Because you >> have >>>>> wrong base address in image: >>>>>>>>>>>>>> Load Address: >> fffffff2 >>>>>>>>>>>>>> Entry Point: >> fffffff2 >>>>>>>>>>>>>> MIPS32 machines have >> RAM >>>>> mapped to 0x80000000 address, >>>>>>>>> so adding >>>>>>>>>>> its >>>>>>>>>>>>>> size, you will get max >>>>> address (if 16MB, it will be >>>>>>>>> 0x81000000), >>>>>>>>>>> but >>>>>>>>>>>>>> you uboot image was >>>>> created with 0xfffffff2. >>>>>>>>>>>>>> Even more, unpacked >> kernel >>>>> expects it will be called at >>>>>>>>>>> 0x80001100. so >>>>>>>>>>>>>> if you have ELF kernel >>>>> (file with ELF header, like >>>>>>>>> every >>>>>>>>>>> executable) >>>>>>>>>>>>>> that file have to be >>>>> loaded at (0x80001100 - >>>>>>>>> ELF_HEADER_SIZE). >>>>>>>>>>>>>> In most cases it will >> be >>>>> 0x80001100 - 0x100 = >>>>>>>>> 0x80001000. But >>>>>>>>>>> sometime >>>>>>>>>>>>>> (I did not found why) >> it >>>>> can be 0x20, you can find it >>>>>>>>> by looking >>>>>>>>>>> at >>>>>>>>>>>>>> .text section in >> readelf >>>>> -S. >>>>>>>>>>>>>> So if you have kernel >> with >>>>> entry point 0x80001100 and >>>>>>>>> .text >>>>>>>>>>> segment >>>>>>>>>>>>>> offset 0x100, you have >> to >>>>> create uboot image with load >>>>>>>>> address >>>>>>>>>>>>>> 0x80001000 and entry >> point >>>>> 0x80001100. >>>>>>>>>>>>>> If that step successful >>>>> you will get: >>>>>>>>>>>>>> /Uncompressing Kernel >>>>> Image/ ... OK >>>>>>>>>>>>>> Starting kernel ... >>>>>>>>>>>>>> >>>>>>>>>>>>>> Last line mean, uboot >> did >>>>> jump into kernel code. >>>>>>>>>>>>>> Good luck. >>>>>>>>>>>>>> >>>>>>>>>>>>>> 2017-05-07 18:20 >> GMT+03:00 >>>>> Mike Wolman >>>>>>>>> >>>>>>>>>>>>> >>>> >: >>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>> >>>>>>>>>>>>>> I am trying to get >>>>> FreeBSD working on this board - >>>>>>>>> I think I >>>>>>>>>>> am >>>>>>>>>>>>>> almost there in >>>>> getting it working but need some >>>>>>>>> help please. >>>>>>>>>>>>>> I have followed >>>>> instructions from the >>>>>>>>> freebsd-wifi-build and >>>>>>>>>>>>>> *think* I have got >>>>> everything correct - I am trying >>>>>>>>> to do >>>>>>>>>>> this on >>>>>>>>>>>>>> a CURRENT setup: >>>>>>>>>>>>>> >>>>>>>>>>>>>> FreeBSD >>>>> f64-current.mw.office 12.0-CURRENT FreeBSD >>>>>>>>>>> 12.0-CURRENT #0 >>>>>>>>>>>>>> r317887: Sun May 7 >>>>> 03:20:34 UTC 2017 >>>>>>>>>>>>>> >>>>>>>>>>> mike@f64-current.mw.office:/ >>>> usr/obj/usr/src/sys/GENERIC- NODEBUG amd64 >>>>>>>>>>>>>> $ cat >>>>> ~/.freebsd-wifi-build- settings.cfg >>>>>>>>>>>>>> >> X_SKIP_MORE_STUFF=YES >>>>>>>>>>>>>> >>>>> X_EXTRA_SRC_CONF=~/omega2/src. conf >>>>>>>>>>>>>> $ cat >>>>> ~/omega2/src.conf >>>>>>>>>>>>>> WITHOUT_CLANG=YES >>>>>>>>>>>>>> >> WITHOUT_CLANG_FULL=YES >>>>>>>>>>>>>> get dts files from >>>>> thread >>>>>>>>>>>>>> >>>>>>>>> http://community.onion.io/ >> topic/1099/openwrt-on-the- >>>> omega-2/8 >>>>>>>>>>>>>> >>>>>>>>>>> >>> topic/1099/openwrt-on-the- omega-2/8> >>>>>>>>>>>>>> cd >>>>> ~/omega2/src/sys/gnu/dts/mips >>>>>>>>>>>>>> fetch >>>>>>>>>>>>>> >>>>>>>>> https://raw.githubusercontent. >> com/WereCatf/source/image/ >>>> target/linux/ramips/dts/ OMEGA2.dtsi >>>>>>>>>>>>>> >>>>>>>>> >>> WereCatf/source/image/target/ linux/ramips/dts/OMEGA2.dtsi> >>>>>>>>>>>>>> fetch >>>>>>>>>>>>>> >>>>>>>>> https://raw.githubusercontent. >> com/WereCatf/source/image/ >>>> target/linux/ramips/dts/ OMEGA2.dts >>>>>>>>>>>>>> >>>>>>>>> >>> WereCatf/source/image/target/ linux/ramips/dts/OMEGA2.dts> >>>>>>>>>>>>>> fetch >>>>>>>>>>>>>> >>>>>>>>> https://raw.githubusercontent. >> com/WereCatf/source/image/ >>>> target/linux/ramips/dts/ OMEGA2P.dts >>>>>>>>>>>>>> >>>>>>>>> >>> WereCatf/source/image/target/ linux/ramips/dts/OMEGA2P.dts> >>>>>>>>>>>>>> >> X_DTS_FILE=OMEGA2P.dts >>>>> KERNCONF=MT7628_FDT >>>>>>>>>>>>>> >>>>> ../freebsd-wifi-build/build/ bin/build ralink >>>>>>>>> buildworld >>>>>>>>>>>>>> >> X_DTS_FILE=OMEGA2P.dts >>>>> KERNCONF=MT7628_FDT >>>>>>>>>>>>>> >>>>> ../freebsd-wifi-build/build/ bin/build ralink >>>>>>>>> buildkernel >>>>>>>>>>>>>> >> X_DTS_FILE=OMEGA2P.dts >>>>> KERNCONF=MT7628_FDT >>>>>>>>>>>>>> >>>>> ../freebsd-wifi-build/build/ bin/build ralink >>>>>>>>> installworld >>>>>>>>>>>>>> >> X_DTS_FILE=OMEGA2P.dts >>>>> KERNCONF=MT7628_FDT >>>>>>>>>>>>>> >>>>> ../freebsd-wifi-build/build/ bin/build ralink >>>>>>>>> installkernel >>>>>>>>>>>>>> >> X_DTS_FILE=OMEGA2P.dts >>>>> KERNCONF=MT7628_FDT >>>>>>>>>>>>>> >>>>> ../freebsd-wifi-build/build/ bin/build ralink >>>>>>>>> distribution >>>>>>>>>>>>>> >> X_DTS_FILE=OMEGA2P.dts >>>>> KERNCONF=MT7628_FDT >>>>>>>>>>>>>> >>>>> ../freebsd-wifi-build/build/ bin/build ralink >>>>>>>>> mfsroot >>>>>>>>>>>>>> >> X_DTS_FILE=OMEGA2P.dts >>>>> KERNCONF=MT7628_FDT >>>>>>>>>>>>>> >>>>> ../freebsd-wifi-build/build/ bin/build ralink >>>>>>>>> fsimage >>>>>>>>>>>>>> >> X_DTS_FILE=OMEGA2P.dts >>>>> KERNCONF=MT7628_FDT >>>>>>>>>>>>>> >>>>> ../freebsd-wifi-build/build/ bin/build ralink >> uboot >>>>>>>>>>>>>> Create flash: >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>> X_FLASH=kernel.MT7628_FDT. lzma.flash >>>>>>>>>>>>>> dd if=/dev/zero >> bs=$(( >>>>> 0x200000 )) count=1 >>>>>>>>> of=${X_FLASH} >>>>>>>>>>>>>> dd >>>>> if=kernel.MT7628_FDT.lzma. uImage of=${X_FLASH} >>>>>>>>>>> conv=notrunc >>>>>>>>>>>>>> dd if= >>>>> mfsroot-ralink.img.lzma >> ${X_FLASH} >>>>>>>>>>>>>> $ readelf -h >>>>> kernel.MT7628_FDT | grep Entry >>>>>>>>>>>>>> Entry point >>>>> address: 0x80001100 >>>>>>>>>>>>>> >>>>>>>>>>>>>> Now on the omega >> over >>>>> serial - I didnt get the >>>>>>>>> network >>>>>>>>>>> expansion >>>>>>>>>>>>>> doc thing so am >> doing >>>>> stuff with usb rather than >>>>>>>>> tftp >>>>>>>>>>>>>> I am not 100% sure >>>>> about the 0x80001100 and the >>>>>>>>> fatload and >>>>>>>>>>> have >>>>>>>>>>>>>> tried this >>>>>>>>>>>>>> >>>>>>>>>>>>>> Omega2 # fatload >> usb >>>>> 0:1 0x80001100 >>>>>>>>>>> /kernel.MT7628_FDT.lzma.flash >>>>>>>>>>>>>> * >>>>>>>>>>>>>> * >>>>>>>>>>>>>> Reading file >>>>>>>>> "/kernel.MT7628_FDT.lzma. flash" >>>>>>>>>>>>>> * >>>>>>>>>>>>>> ** >>>>>>>>>>>>>> ** >>>>>>>>>>>>>> ** >>>>>>>>>>>>>> ****** >>>>>>>>>>>>>> >>>>>>>>> ****************************** >>>> ****************************** ****************************** >>>> ****************************** ********************* >>>>>>>>>>>>>> ****** >>>>>>>>>>>>>> * >>>>>>>>>>>>>> FAT: 2108463 Bytes >>>>> read >>>>>>>>>>>>>> Omega2 # bootm >>>>> 0x80001100 >>>>>>>>>>>>>> ## Booting image at >>>>> 80001100 ... >>>>>>>>>>>>>> Image Name: >>>>> FreeBSD >>>>>>>>>>>>>> Image Type: >> MIPS >>>>> Linux Kernel Image (lzma >>>>>>>>> compressed) >>>>>>>>>>>>>> Data Size: >>>>> 1365122 Bytes = 1.3 MB >>>>>>>>>>>>>> Load Address: >>>>> fffffff2 >>>>>>>>>>>>>> Entry Point: >>>>> fffffff2 >>>>>>>>>>>>>> Verifying >> Checksum >>>>> ... OK >>>>>>>>>>>>>> Uncompressing >>>>> Kernel Image ... >>>>>>>>>>>>>> At this point >> nothing >>>>> happens and console hangs - >>>>>>>>> note in >>>>>>>>>>>>>> OMEGA2.dtsithe >> console >>>>> is set to ttyS0: >>>>>>>>>>>>>> bootargs = >>>>> "console=ttyS0,115200"; >>>>>>>>>>>>>> >>>>>>>>>>>>>> I have also tried >> with >>>>> just kernel.MT7628_FDT and >>>>>>>>>>>>>> >> kernel.MT7628_FDT.lzma >>>>> but both fail: >>>>>>>>>>>>>> Omega2 # fatload >> usb >>>>> 0:1 0x80001100 >>>>>>>>>>> /kernel.MT7628_FDT.lzma.uImage >>>>>>>>>>>>>> * >>>>>>>>>>>>>> * >>>>>>>>>>>>>> Reading file >>>>>>>>> "/kernel.MT7628_FDT.lzma. uImage" >>>>>>>>>>>>>> * >>>>>>>>>>>>>> ** >>>>>>>>>>>>>> ** >>>>>>>>>>>>>> ****** >>>>>>>>>>>>>> >>>>>>>>> ****************************** >>>> ****************************** ****************************** >>>> ****************************** ****** >>>>>>>>>>>>>> ********** >>>>>>>>>>>>>> * >>>>>>>>>>>>>> FAT: 1365186 Bytes >>>>> read >>>>>>>>>>>>>> Omega2 # bootm >>>>> 0x80001100 >>>>>>>>>>>>>> ## Booting image at >>>>> 80001100 ... >>>>>>>>>>>>>> Image Name: >>>>> FreeBSD >>>>>>>>>>>>>> Image Type: >> MIPS >>>>> Linux Kernel Image (lzma >>>>>>>>> compressed) >>>>>>>>>>>>>> Data Size: >>>>> 1365122 Bytes = 1.3 MB >>>>>>>>>>>>>> Load Address: >>>>> fffffff2 >>>>>>>>>>>>>> Entry Point: >>>>> fffffff2 >>>>>>>>>>>>>> Verifying >> Checksum >>>>> ... OK >>>>>>>>>>>>>> Uncompressing >>>>> Kernel Image ... >>>>>>>>>>>>>> A few comments on >> the >>>>> hardware for anyone who wants >>>>>>>>> to get >>>>>>>>>>> one: >>>>>>>>>>>>>> Get the expansion >> dock >>>>> with serial port access - >>>>>>>>> the power >>>>>>>>>>> dock >>>>>>>>>>>>>> does not provide >>>>> serial access - i think it is >>>>>>>>> possible to >>>>>>>>>>> use an >>>>>>>>>>>>>> ftdi ttl serial >>>>> chip/cable but have not tried. >>>>>>>>>>>>>> Stupidly I forgot >> this >>>>> only has wifi access so you >>>>>>>>> are not >>>>>>>>>>> able to >>>>>>>>>>>>>> tftp boot this >> without >>>>> getting the ethernet network >>>>>>>>> expansion >>>>>>>>>>> but >>>>>>>>>>>>>> loading stuff up >> from >>>>> a usb memory stick is seem >>>>>>>>> fine from >>>>>>>>>>> u-boot. >>>>>>>>>>>>>> I do not think that >> it >>>>> is possible to boot from the >>>>>>>>> SD card >>>>>>>>>>> on the >>>>>>>>>>>>>> Omega2+ - which is >> a >>>>> shame. >>>>>>>>>>>>>> Thanks for reading, >>>>>>>>>>>>>> >>>>>>>>>>>>>> Mike. >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>> ______________________________ _________________ >>>>>>>>>>>>>> >> freebsd-mips@freebsd.org >>>>>>>>>>> > org>mailing >>>>>>>>>>>>> list >>>>>>>>>>>>>> >>>>>>>>> https://lists.freebsd.org/ >> mailman/listinfo/freebsd-mips >>>>>>>>>>>>>> >>>>>>>>>>> >>> mailman/listinfo/freebsd-mips> >>>>>>>>>>>>>> To unsubscribe, >> send >>>>> any mail to >>>>>>>>>>>>>> >>>> "freebsd-mips-unsubscribe@ freebsd.org >>>>>>>>>>>>>> >>>>>>>>> > unsubscribe@freebsd.org>" >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> WBW >>>>>>>>>>>>>> ------- >>>>>>>>>>>>>> Rybalko Aleksandr >>>> >>>>>>>>>> > >>>>>>>>>>>>> >> ______________________________ >>>> _________________ >>>>>>>>>>>>> freebsd-mips@freebsd.org >> mailing list >>>>>>>>>>>>> https://lists.freebsd.org/ >>>> mailman/listinfo/freebsd-mips >>>>>>>>>>>>> To unsubscribe, send any mail >> to >>>>>>>>>>>>> >> "freebsd-mips-unsubscribe@ >>>> freebsd.org" >>>>>>>> ______________________________ _________________ >>>>>>>> freebsd-mips@freebsd.org mailing list >>>>>>>> https://lists.freebsd.org/ >> mailman/listinfo/freebsd-mips >>>>>>>> To unsubscribe, send any mail to >>>> "freebsd-mips-unsubscribe@ freebsd.org" >>>>>>> -- >>>>>>> >>>>>>> WBW >>>>>>> ------- >>>>>>> Rybalko Aleksandr >>>>>>> >>>>>>>