Date: Thu, 8 Oct 2020 20:33:48 +0200 From: Georg Bege <georg@bege.email> To: Kyle Evans <kevans@freebsd.org> Cc: freebsd-mips@freebsd.org Subject: Re: Compiling FreeBSD 12.0 for MIPS 14kc Message-ID: <0127f35e-d4eb-98a0-b56c-32de68d4addd@bege.email> In-Reply-To: <CACNAnaHv4aa3ZWWZYyWnnRzw%2B%2BfObLBgSQjCT6S=75akNAVJTQ@mail.gmail.com> References: <6579e5af-34d8-bbaa-f9ff-daf67f071de7@bege.email> <CACNAnaHv4aa3ZWWZYyWnnRzw%2B%2BfObLBgSQjCT6S=75akNAVJTQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hi, wanna give some heads up - conversation about this took mainly place in #bsdmips @EFnet and for a short time #FreeBSD-social @Freenode. I've posted the complete boot up here: https://pastebin.com/6HCFJRWD According to the Linux and /proc/cpuinfo, it says: --------------------------------snip-------------------------------- system type : MT7621 machine : Unknown processor : 0 cpu model : MIPS 1004Kc V2.15 BogoMIPS : 583.68 wait instruction : yes microsecond timers : yes tlb_entries : 32 extra interrupt vector : yes hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb] isa : mips1 mips2 mips32r1 mips32r2 ASEs implemented : mips16 dsp mt shadow register sets : 1 kscratch registers : 0 core : 0 VPE : 0 VCED exceptions : not available VCEI exceptions : not available --------------------------------snip-------------------------------- I've tried to build a FreeBSD12 along with a proper kernel, now Im stuck at loading the kernel via tftp in Uboot: https://pastebin.com/Ujx7t4SE Im not using compression, it seems the old U-Boot 1.1.5 only supports LZMA and using lzma from ports gives me a decompression error. As the paste says, Im using XIP (kernel in place) and trying to boot off 80001000, the 'md' output seems to be correct and that's where the bin also is located in memory. However upon start it just stucks and doesnt continue.... Im using a kernconf now which is inspired by the MT7621_FDT configuration, this seems to be not soo wrong as this seems to be the same chip. best regards, Georg Am 08.10.20 um 15:27 schrieb Kyle Evans: > On Thu, Oct 8, 2020 at 7:13 AM Georg Bege <georg@bege.email> wrote: >> Hello folks, >> >> Im trying to compile FreeBSD 12.0 for mips/mipshf and targetting >> specifically an mips 14kc CPU. >> >> I know this is not officially supported by any means, but I want to try >> it nonetheless. >> >> FreeBSD seem's to work on various platforms including a couple of MIPS >> families like 24kc. >> >> At least it's supposed to work on them... the device I have at hand is >> an EdgeRouter ER-X which is *not* an Octeon device. >> >> The steps buildworld seems to work fine so far, at least it compiles but >> on buildkernel I get an error upon linking: >> >> ld: unrecognised emulation mode: -Bdynamic >> >> It seems to come from an erroneous ld command which includes "ld -m >> -Bdynamic", which is obviously wong. >> >> I just dont understand why it is there :-( Im not super familiar with >> the inner details of the FreeBSD make files and building steps. >> >> Maybe someone can help me here... > 08:19 < kevans91> hmm > 08:20 < kevans91> actually, these are probably mostly legit > 08:20 < kevans91> You should still do a clean build, but that almost > certainly won't fix it on its own > 08:22 -!- Netsplit efnet.port80.se <-> se.hub quits: rap2, hugohagog, > @adalava, cognet, @dim, wkoszek, joneum3, > ganbold_, idwer, arrowd, (+23 more, use /NETSPLIT to show > all of them) > 08:22 < kevans91> DELAY is defined in mips/mips/tick.c, which isn't in > the standard sys/conf/files.mips because some > platforms have their own implementation > > So basically, you'll need to start building your own files.ERX to > include some of the stuff that isn't globally included; see, for > instance, sys/mips/mediatek/files.mediatek and copy the > mips/mips/tick.c line from that. Some of these are also being caused > by > > #device loop # Network loopback > #device ether # Ethernet support > > You'll need at least loop/ether for some things in the tree you're buiilding. > > Thanks, > > Kyle Evans [-- Attachment #2 --] # # MT7621_FDT -- Kernel configuration file for FreeBSD/MIPS MT7621 SoC # # This includes all the configurable parts of the kernel. # # $FreeBSD: releng/12.0/sys/mips/conf/MT7621_FDT 315141 2017-03-12 07:09:50Z manu $ # #NO_UNIVERSE # # FDT_DTS_FILE should be modified to suit the target board type. # #makeoptions ARCH_FLAGS="-EL -march=1004k" makeoptions FDT_DTS_FILE=UBNT-ERX.dts # Start with a base configuration include "../mediatek/std.mediatek" ident MT7621 #machine mips mipshf cpu CPU_MIPS1004K # Don't build any modules by default makeoptions MODULES_OVERRIDE="" # 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 # Interrupt controller support device mtk_intr_gic # UART device support is compiled in when uart_ns8250 is selected (default) # SPI and SPI flash support device mtk_spi_v2 device spibus device mx25l # GPIO and gpioled support device mtk_gpio_v2 device gpio device gpioled # PCI support device pci # USB (ehci, ohci) support #device usb #device xhci # USB umass(4) storage and da(4) support #device umass #device da # CAM support, required if umass(4) is enabled above device pass device scbus # Ethernet, BPF and bridge support device rt device bpf # berkeley packet filter device if_bridge # Extres options EXT_RESOURCES device clk # Pseudo devices. device loop # Network loopback device random # Entropy device device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device firmware # firmware assist module # crypto subsystem #device crypto # core crypto support #device cryptodev # /dev/crypto for access to h/w
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0127f35e-d4eb-98a0-b56c-32de68d4addd>
