Solved The compiler does not compile the kernel for MIPS

ogogon

Member

Thanks: 1
Messages: 52

#1
I want to build a kernel for the MIPS processor.
Naturally, I performed all the rites - said "config", "make cleandepend && make depend". Then I do build the kernel.
Code:
ogogon@ot:/usr/src11/sys/mips/compile/TL-WR1043NDv2# make
cc -c -O -pipe -g -nostdinc -I. -I../../.. -I../../../contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-pic -mno-abicalls -G0 -DKERNLOADADDR=0x80050000 -march=mips32 -MD -MF.depend.genassym.o -MTgenassym.o -msoft-float -ffreestanding -fwrapv -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -std=iso9899:1999 ../../../mips/mips/genassym.c
cc: error: unknown argument: '-mno-abicalls'
*** Error code 1

Stop.
make: stopped in /usr/src11/sys/mips/compile/TL-WR1043NDv2

ogogon@ot:/usr/src11/sys/mips/compile/TL-WR1043NDv2#
I use the default compiler.
Code:
ogogon@ot:/usr/src11/sys/mips/compile/TL-WR1043NDv2# cc -v
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: x86_64-unknown-freebsd10.4
Thread model: posix
Selected GCC installation: 
ogogon@ot:/usr/src11/sys/mips/compile/TL-WR1043NDv2#
I installed in the system gcc49.
Code:
ogogon@ot:/usr/src11/sys/mips/compile/TL-WR1043NDv2# pkg info gcc49
gcc49-4.9.4_6
Name           : gcc49
Version        : 4.9.4_6
Installed on   : Tue Apr  3 14:10:48 2018 MSK
Origin         : lang/gcc49
Architecture   : FreeBSD:10:amd64
Prefix         : /usr/local
Categories     : lang
Licenses       : GPLv3, GPLv3RLE
Maintainer     : gerald@FreeBSD.org
WWW            : https://gcc.gnu.org
Comment        : GNU Compiler Collection 4.9
Options        :
    BOOTSTRAP      : on
Shared Libs required:
    libmpfr.so.4
    libmpc.so.3
    libgmp.so.10
Shared Libs provided:
    libitm.so.1
    libssp.so.0
    libatomic.so.1
    libgfortran.so.3
    libgcc_s.so.1
    libquadmath.so.0
    libcilkrts.so.5
    liblto_plugin.so.0
    libstdc++.so.6
    libgomp.so.1
Annotations    :
    FreeBSD_version: 1004000
    cpe            : cpe:2.3:a:gnu:gcc:4.9.4:::::freebsd10:x64:6
    deprecated     : Unsupported by upstream. Use GCC 6 or newer instead.
Flat size      : 110MiB
Description    :
GCC, the GNU Compiler Collection, supports a number of languages.  This
port installs the C, C++, and Fortran front ends as gcc49, g++49, and
gfortran49, respectively.

WWW: https://gcc.gnu.org

Gerald Pfeifer <gerald@FreeBSD.org>

ogogon@ot:/usr/src11/sys/mips/compile/TL-WR1043NDv2# cat /etc/make.conf

.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc49)
CC=gcc49
CXX=g++49
CPP=cpp49
.endif
ogogon@ot:/usr/src11/sys/mips/compile/TL-WR1043NDv2# cat /etc/libmap.conf
# $FreeBSD: releng/10.4/etc/libmap.conf 253853 2013-08-01 05:50:42Z jlh $
includedir /usr/local/etc/libmap.d

libgcc_s.so.1   gcc49/libgcc_s.so.1
libgomp.so.1    gcc49/libgomp.so.1
libobjc.so.3    gcc49/libobjc.so.4
libssp.so.0     gcc49/libssp.so.0
libstdc++.so.6  gcc49/libstdc++.so.6
ogogon@ot:/usr/src11/sys/mips/compile/TL-WR1043NDv2#
Nothing changed.

Colleagues, tell me please what I'm doing wrong.

Ogogon
 
OP
OP
ogogon

ogogon

Member

Thanks: 1
Messages: 52

#4
I don't know where you got your instructions from but these are at least 15-20 years old.
It's just that I have lived in this world for a long time already. And 15-20 years ago this method worked perfectly!

Handbook: 8.5. Building and Installing a Custom Kernel
Thank you. This wise handbook teaches me to act like this: "make buildkernel KERNCONF=MYKERNEL". I'm a trusting person. I'm doing it.

Code:
ogogon@ot:/usr/src11# make buildkernel KERNCONF=TL-WR1043NDv2  
make[1]: "/usr/src11/Makefile.inc1" line 1230: Missing KERNCONF /usr/src11/sys/amd64/conf/TL-WR1043NDv2
*** Error code 1

Stop.
make: stopped in /usr/src11
ogogon@ot:/usr/src11#
How can he explain that I am building a kernel for another hardware platform?

Ogogon.
 
OP
OP
ogogon

ogogon

Member

Thanks: 1
Messages: 52

#6
append TARGET_ARCH=$arch to you make buildkernel, or add it to /etc/make.conf as a temporary measure
Thank you.
The compilation began, but it ended abruptly for the same reason. cc: error: unknown argument: '-mno-abicalls'

The task was reduced to the previous one!

Code:
ogogon@ot:/usr/src11# make TARGET_ARCH=mips buildkernel KERNCONF=TL-WR1043NDv2

--------------------------------------------------------------
>>> Kernel build for TL-WR1043NDv2 started on Tue Apr  3 21:13:38 MSK 2018
--------------------------------------------------------------
===> TL-WR1043NDv2
mkdir -p /usr/obj/mips.mips/usr/src11/sys

--------------------------------------------------------------
>>> stage 1: configuring the kernel
--------------------------------------------------------------
cd /usr/src11/sys/mips/conf;  PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/sbin:/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/bin:/usr/obj/mips.mips/usr/src11/tmp/legacy/bin:/usr/obj/mips.mips/usr/src11/tmp/usr/sbin:/usr/obj/mips.mips/usr/src11/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin  config  -d /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2  -I '/usr/src11/sys/mips/conf' '/usr/src11/sys/mips/conf/TL-WR1043NDv2'
WARNING: duplicate option `AH_DEBUG_ALQ' encountered.
Kernel build directory is /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2
Don't forget to do ``make cleandepend && make depend''

--------------------------------------------------------------
>>> stage 2.1: cleaning up the object tree
--------------------------------------------------------------
cd /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2; MAKEOBJDIRPREFIX=/usr/obj/mips.mips  MACHINE_ARCH=mips  MACHINE=mips  CPUTYPE= GROFF_BIN_PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/bin  GROFF_FONT_PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/share/tmac CC="cc " CXX="c++  "  CPP="cpp "  AS="as" AR="ar" LD="ld" NM=nm  OBJDUMP=objdump OBJCOPY="objcopy"  RANLIB=ranlib STRINGS=  SIZE="size"  INSTALL="sh /usr/src11/tools/install.sh"  PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/sbin:/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/bin:/usr/obj/mips.mips/usr/src11/tmp/legacy/bin:/usr/obj/mips.mips/usr/src11/tmp/usr/sbin:/usr/obj/mips.mips/usr/src11/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make  -m /usr/src11/share/mk  KERNEL=kernel cleandir
rm -f *.o *.so *.pico *.ko *.s eddep errs  kernel.full kernel kernel.debug  linterrs tags vers.c  vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h  eisa_if.c etherswitch_if.c fb_if.c gpio_if.c gpiobus_if.c mdio_if.c miibus_if.c mmcbr_if.c mmcbus_if.c card_if.c power_if.c pci_if.c pci_iov_if.c pcib_if.c spibus_if.c uart_if.c usb_if.c g_part_if.c isa_if.c bus_if.c clock_if.c cpufreq_if.c device_if.c linker_if.c serdev_if.c eisa_if.h etherswitch_if.h fb_if.h gpio_if.h gpiobus_if.h mdio_if.h miibus_if.h mmcbr_if.h mmcbus_if.h card_if.h power_if.h pci_if.h pci_iov_if.h pcib_if.h spibus_if.h uart_if.h usb_if.h g_part_if.h isa_if.h bus_if.h clock_if.h cpufreq_if.h device_if.h linker_if.h serdev_if.h  miidevs.h pccarddevs.h usbdevs.h usbdevs_data.h ldscript.mips ldscript.mips.tramp.noheader  kernel.tramp.elf kernel.tramp.bin
rm -f .depend .depend.* machine
cd /usr/src11/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules KMODDIR=/boot/kernel MACHINE_CPUARCH=mips MACHINE=mips MACHINE_ARCH=mips MODULES_EXTRA="" WITHOUT_MODULES="" ARCH_FLAGS="-march=mips32" MODULES_OVERRIDE="if_vlan ipfw if_gre if_gif if_bridge bridgestp" DEBUG_FLAGS="-g" __MPATH="/usr/src11/sys/net/ifdi_if.m /usr/src11/sys/pc98/pc98/canbus_if.m /usr/src11/sys/opencrypto/cryptodev_if.m /usr/src11/sys/xen/xenbus/xenbusb_if.m /usr/src11/sys/xen/xenbus/xenbus_if.m /usr/src11/sys/xen/xenmem/xenmem_if.m /usr/src11/sys/isa/isa_if.m /usr/src11/sys/kgssapi/kgss_if.m /usr/src11/sys/geom/raid/g_raid_tr_if.m /usr/src11/sys/geom/raid/g_raid_md_if.m /usr/src11/sys/geom/part/g_part_if.m /usr/src11/sys/powerpc/powerpc/mmu_if.m /usr/src11/sys/powerpc/powerpc/iommu_if.m /usr/src11/sys/powerpc/powerpc/platform_if.m /usr/src11/sys/powerpc/powerpc/pic_if.m /usr/src11/sys/powerpc/aim/moea64_if.m /usr/src11/sys/libkern/iconv_converter_if.m /usr/src11/sys/mips/beri/fdt_ic_if.m /usr/src11/sys/mips/mediatek/fdt_reset_if.m /usr/src11/sys/sparc64/pci/ofw_pci_if.m /usr/src11/sys/kern/linker_if.m /usr/src11/sys/kern/serdev_if.m /usr/src11/sys/kern/clock_if.m /usr/src11/sys/kern/bus_if.m /usr/src11/sys/kern/cpufreq_if.m /usr/src11/sys/kern/msi_if.m /usr/src11/sys/kern/pic_if.m /usr/src11/sys/kern/device_if.m /usr/src11/sys/arm/arm/hdmi_if.m /usr/src11/sys/arm/arm/platform_if.m /usr/src11/sys/arm/ti/ti_gpio_if.m /usr/src11/sys/arm/nvidia/tegra_soctherm_if.m /usr/src11/sys/arm/allwinner/sunxi_dma_if.m /usr/src11/sys/dev/fdt/fdt_clock_if.m /usr/src11/sys/dev/fdt/fdt_pinctrl_if.m /usr/src11/sys/dev/altera/pio/pio_if.m /usr/src11/sys/dev/fb/fb_if.m /usr/src11/sys/dev/agp/agp_if.m /usr/src11/sys/dev/uart/uart_if.m /usr/src11/sys/dev/ata/ata_if.m /usr/src11/sys/dev/pci/pci_iov_if.m /usr/src11/sys/dev/pci/pci_if.m /usr/src11/sys/dev/pci/pcib_if.m /usr/src11/sys/dev/nand/nfc_if.m /usr/src11/sys/dev/nand/nand_if.m /usr/src11/sys/dev/nand/nandbus_if.m /usr/src11/sys/dev/mmc/mmcbr_if.m /usr/src11/sys/dev/mmc/mmcbus_if.m /usr/src11/sys/dev/smbus/smbus_if.m /usr/src11/sys/dev/hyperv/vmbus/vmbus_if.m /usr/src11/sys/dev/vnic/lmac_if.m /usr/src11/sys/dev/mdio/mdio_if.m /usr/src11/sys/dev/adb/adb_if.m /usr/src11/sys/dev/adb/adb_hb_if.m /usr/src11/sys/dev/pccard/power_if.m /usr/src11/sys/dev/pccard/card_if.m /usr/src11/sys/dev/usb/usb_if.m /usr/src11/sys/dev/usb/controller/generic_usb_if.m /usr/src11/sys/dev/virtio/virtio_if.m /usr/src11/sys/dev/virtio/mmio/virtio_mmio_if.m /usr/src11/sys/dev/virtio/virtio_bus_if.m /usr/src11/sys/dev/spibus/spibus_if.m /usr/src11/sys/dev/ppbus/ppbus_if.m /usr/src11/sys/dev/scc/scc_if.m /usr/src11/sys/dev/extres/regulator/regnode_if.m /usr/src11/sys/dev/extres/regulator/regdev_if.m /usr/src11/sys/dev/extres/clk/clkdev_if.m /usr/src11/sys/dev/extres/clk/clknode_if.m /usr/src11/sys/dev/extres/phy/phy_if.m /usr/src11/sys/dev/extres/hwreset/hwreset_if.m /usr/src11/sys/dev/mvs/mvs_if.m /usr/src11/sys/dev/sdhci/sdhci_if.m /usr/src11/sys/dev/acpi_support/acpi_wmi_if.m /usr/src11/sys/dev/sound/midi/mpufoi_if.m /usr/src11/sys/dev/sound/midi/synth_if.m /usr/src11/sys/dev/sound/midi/mpu_if.m /usr/src11/sys/dev/sound/pcm/mixer_if.m /usr/src11/sys/dev/sound/pcm/channel_if.m /usr/src11/sys/dev/sound/pcm/feeder_if.m /usr/src11/sys/dev/sound/pcm/ac97_if.m /usr/src11/sys/dev/sound/pci/hda/hdac_if.m /usr/src11/sys/dev/iicbus/iicbus_if.m /usr/src11/sys/dev/iicbus/iicbb_if.m /usr/src11/sys/dev/ntb/ntb_if.m /usr/src11/sys/dev/ofw/ofw_bus_if.m /usr/src11/sys/dev/ofw/ofw_if.m /usr/src11/sys/dev/gpio/gpio_if.m /usr/src11/sys/dev/gpio/gpiobus_if.m /usr/src11/sys/dev/etherswitch/etherswitch_if.m /usr/src11/sys/dev/iscsi/icl_conn_if.m /usr/src11/sys/dev/ow/owll_if.m /usr/src11/sys/dev/ow/own_if.m /usr/src11/sys/dev/cxgbe/t4_if.m /usr/src11/sys/dev/acpica/acpi_if.m /usr/src11/sys/dev/dwc/if_dwc_if.m /usr/src11/sys/dev/eisa/eisa_if.m /usr/src11/sys/dev/bhnd/bhnd_bus_if.m /usr/src11/sys/dev/bhnd/cores/chipc/bhnd_chipc_if.m /usr/src11/sys/dev/bhnd/bhndb/bhndb_bus_if.m /usr/src11/sys/dev/bhnd/bhndb/bhndb_if.m /usr/src11/sys/dev/bhnd/nvram/bhnd_nvram_if.m /usr/src11/sys/dev/mbox/mbox_if.m /usr/src11/sys/dev/mii/miibus_if.m" KERNBUILDDIR="/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2" SYSDIR="/usr/src11/sys" make  cleandir
===> bridgestp (cleandir)
rm -rf /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/bridgestp
===> if_bridge (cleandir)
rm -rf /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/if_bridge
===> if_gif (cleandir)
rm -rf /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/if_gif
===> if_gre (cleandir)
rm -rf /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/if_gre
===> if_vlan (cleandir)
rm -rf /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/if_vlan
===> ipfw (cleandir)
rm -rf /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/ipfw

--------------------------------------------------------------
>>> stage 2.2: rebuilding the object tree
--------------------------------------------------------------
cd /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2; MAKEOBJDIRPREFIX=/usr/obj/mips.mips  MACHINE_ARCH=mips  MACHINE=mips  CPUTYPE= GROFF_BIN_PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/bin  GROFF_FONT_PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/share/tmac CC="cc " CXX="c++  "  CPP="cpp "  AS="as" AR="ar" LD="ld" NM=nm  OBJDUMP=objdump OBJCOPY="objcopy"  RANLIB=ranlib STRINGS=  SIZE="size"  INSTALL="sh /usr/src11/tools/install.sh"  PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/sbin:/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/bin:/usr/obj/mips.mips/usr/src11/tmp/legacy/bin:/usr/obj/mips.mips/usr/src11/tmp/usr/sbin:/usr/obj/mips.mips/usr/src11/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make  -m /usr/src11/share/mk  KERNEL=kernel obj
cd /usr/src11/sys/modules; MAKEOBJDIRPREFIX=/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules KMODDIR=/boot/kernel MACHINE_CPUARCH=mips MACHINE=mips MACHINE_ARCH=mips MODULES_EXTRA="" WITHOUT_MODULES="" ARCH_FLAGS="-march=mips32" MODULES_OVERRIDE="if_vlan ipfw if_gre if_gif if_bridge bridgestp" DEBUG_FLAGS="-g" __MPATH="/usr/src11/sys/net/ifdi_if.m /usr/src11/sys/pc98/pc98/canbus_if.m /usr/src11/sys/opencrypto/cryptodev_if.m /usr/src11/sys/xen/xenbus/xenbusb_if.m /usr/src11/sys/xen/xenbus/xenbus_if.m /usr/src11/sys/xen/xenmem/xenmem_if.m /usr/src11/sys/isa/isa_if.m /usr/src11/sys/kgssapi/kgss_if.m /usr/src11/sys/geom/raid/g_raid_tr_if.m /usr/src11/sys/geom/raid/g_raid_md_if.m /usr/src11/sys/geom/part/g_part_if.m /usr/src11/sys/powerpc/powerpc/mmu_if.m /usr/src11/sys/powerpc/powerpc/iommu_if.m /usr/src11/sys/powerpc/powerpc/platform_if.m /usr/src11/sys/powerpc/powerpc/pic_if.m /usr/src11/sys/powerpc/aim/moea64_if.m /usr/src11/sys/libkern/iconv_converter_if.m /usr/src11/sys/mips/beri/fdt_ic_if.m /usr/src11/sys/mips/mediatek/fdt_reset_if.m /usr/src11/sys/sparc64/pci/ofw_pci_if.m /usr/src11/sys/kern/linker_if.m /usr/src11/sys/kern/serdev_if.m /usr/src11/sys/kern/clock_if.m /usr/src11/sys/kern/bus_if.m /usr/src11/sys/kern/cpufreq_if.m /usr/src11/sys/kern/msi_if.m /usr/src11/sys/kern/pic_if.m /usr/src11/sys/kern/device_if.m /usr/src11/sys/arm/arm/hdmi_if.m /usr/src11/sys/arm/arm/platform_if.m /usr/src11/sys/arm/ti/ti_gpio_if.m /usr/src11/sys/arm/nvidia/tegra_soctherm_if.m /usr/src11/sys/arm/allwinner/sunxi_dma_if.m /usr/src11/sys/dev/fdt/fdt_clock_if.m /usr/src11/sys/dev/fdt/fdt_pinctrl_if.m /usr/src11/sys/dev/altera/pio/pio_if.m /usr/src11/sys/dev/fb/fb_if.m /usr/src11/sys/dev/agp/agp_if.m /usr/src11/sys/dev/uart/uart_if.m /usr/src11/sys/dev/ata/ata_if.m /usr/src11/sys/dev/pci/pci_iov_if.m /usr/src11/sys/dev/pci/pci_if.m /usr/src11/sys/dev/pci/pcib_if.m /usr/src11/sys/dev/nand/nfc_if.m /usr/src11/sys/dev/nand/nand_if.m /usr/src11/sys/dev/nand/nandbus_if.m /usr/src11/sys/dev/mmc/mmcbr_if.m /usr/src11/sys/dev/mmc/mmcbus_if.m /usr/src11/sys/dev/smbus/smbus_if.m /usr/src11/sys/dev/hyperv/vmbus/vmbus_if.m /usr/src11/sys/dev/vnic/lmac_if.m /usr/src11/sys/dev/mdio/mdio_if.m /usr/src11/sys/dev/adb/adb_if.m /usr/src11/sys/dev/adb/adb_hb_if.m /usr/src11/sys/dev/pccard/power_if.m /usr/src11/sys/dev/pccard/card_if.m /usr/src11/sys/dev/usb/usb_if.m /usr/src11/sys/dev/usb/controller/generic_usb_if.m /usr/src11/sys/dev/virtio/virtio_if.m /usr/src11/sys/dev/virtio/mmio/virtio_mmio_if.m /usr/src11/sys/dev/virtio/virtio_bus_if.m /usr/src11/sys/dev/spibus/spibus_if.m /usr/src11/sys/dev/ppbus/ppbus_if.m /usr/src11/sys/dev/scc/scc_if.m /usr/src11/sys/dev/extres/regulator/regnode_if.m /usr/src11/sys/dev/extres/regulator/regdev_if.m /usr/src11/sys/dev/extres/clk/clkdev_if.m /usr/src11/sys/dev/extres/clk/clknode_if.m /usr/src11/sys/dev/extres/phy/phy_if.m /usr/src11/sys/dev/extres/hwreset/hwreset_if.m /usr/src11/sys/dev/mvs/mvs_if.m /usr/src11/sys/dev/sdhci/sdhci_if.m /usr/src11/sys/dev/acpi_support/acpi_wmi_if.m /usr/src11/sys/dev/sound/midi/mpufoi_if.m /usr/src11/sys/dev/sound/midi/synth_if.m /usr/src11/sys/dev/sound/midi/mpu_if.m /usr/src11/sys/dev/sound/pcm/mixer_if.m /usr/src11/sys/dev/sound/pcm/channel_if.m /usr/src11/sys/dev/sound/pcm/feeder_if.m /usr/src11/sys/dev/sound/pcm/ac97_if.m /usr/src11/sys/dev/sound/pci/hda/hdac_if.m /usr/src11/sys/dev/iicbus/iicbus_if.m /usr/src11/sys/dev/iicbus/iicbb_if.m /usr/src11/sys/dev/ntb/ntb_if.m /usr/src11/sys/dev/ofw/ofw_bus_if.m /usr/src11/sys/dev/ofw/ofw_if.m /usr/src11/sys/dev/gpio/gpio_if.m /usr/src11/sys/dev/gpio/gpiobus_if.m /usr/src11/sys/dev/etherswitch/etherswitch_if.m /usr/src11/sys/dev/iscsi/icl_conn_if.m /usr/src11/sys/dev/ow/owll_if.m /usr/src11/sys/dev/ow/own_if.m /usr/src11/sys/dev/cxgbe/t4_if.m /usr/src11/sys/dev/acpica/acpi_if.m /usr/src11/sys/dev/dwc/if_dwc_if.m /usr/src11/sys/dev/eisa/eisa_if.m /usr/src11/sys/dev/bhnd/bhnd_bus_if.m /usr/src11/sys/dev/bhnd/cores/chipc/bhnd_chipc_if.m /usr/src11/sys/dev/bhnd/bhndb/bhndb_bus_if.m /usr/src11/sys/dev/bhnd/bhndb/bhndb_if.m /usr/src11/sys/dev/bhnd/nvram/bhnd_nvram_if.m /usr/src11/sys/dev/mbox/mbox_if.m /usr/src11/sys/dev/mii/miibus_if.m" KERNBUILDDIR="/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2" SYSDIR="/usr/src11/sys" make  obj
===> bridgestp (obj)
/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/bridgestp created for /usr/src11/sys/modules/bridgestp
===> if_bridge (obj)
/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/if_bridge created for /usr/src11/sys/modules/if_bridge
===> if_gif (obj)
/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/if_gif created for /usr/src11/sys/modules/if_gif
===> if_gre (obj)
/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/if_gre created for /usr/src11/sys/modules/if_gre
===> if_vlan (obj)
/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/if_vlan created for /usr/src11/sys/modules/if_vlan
===> ipfw (obj)
/usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2/modules/usr/src11/sys/modules/ipfw created for /usr/src11/sys/modules/ipfw

--------------------------------------------------------------
>>> stage 2.3: build tools
--------------------------------------------------------------
cd /usr/src11; TOOLS_PREFIX=/usr/obj/mips.mips/usr/src11/tmp MAKEOBJDIRPREFIX=/usr/obj/mips.mips/usr/src11/tmp  INSTALL="sh /usr/src11/tools/install.sh"  PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/sbin:/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/bin:/usr/obj/mips.mips/usr/src11/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/mips.mips/usr/src11/tmp make  -f Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1004000  SSP_CFLAGS=  MK_HTML=no -DNO_LINT MK_MAN=no  -DNO_PIC MK_PROFILE=no -DNO_SHARED  -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no kernel-tools
mkdir -p /usr/obj/mips.mips/usr/src11/tmp/usr
mtree -deU -f /usr/src11/etc/mtree/BSD.usr.dist  -p /usr/obj/mips.mips/usr/src11/tmp/usr >/dev/null

--------------------------------------------------------------
>>> stage 3.1: building everything
--------------------------------------------------------------
cd /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2; MAKEOBJDIRPREFIX=/usr/obj/mips.mips  MACHINE_ARCH=mips  MACHINE=mips  CPUTYPE= GROFF_BIN_PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/bin  GROFF_FONT_PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/share/tmac CC="cc " CXX="c++  "  CPP="cpp "  AS="as" AR="ar" LD="ld" NM=nm  OBJDUMP=objdump OBJCOPY="objcopy"  RANLIB=ranlib STRINGS=  SIZE="size"  INSTALL="sh /usr/src11/tools/install.sh"  PATH=/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/sbin:/usr/obj/mips.mips/usr/src11/tmp/legacy/usr/bin:/usr/obj/mips.mips/usr/src11/tmp/legacy/bin:/usr/obj/mips.mips/usr/src11/tmp/usr/sbin:/usr/obj/mips.mips/usr/src11/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make  -m /usr/src11/share/mk  KERNEL=kernel all -DNO_MODULES_OBJ
machine -> /usr/src11/sys/mips/include
cc  -c -O -pipe -g -nostdinc -I. -I/usr/src11/sys -I/usr/src11/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-pic -mno-abicalls -G0 -DKERNLOADADDR=0x80050000 -march=mips32 -MD -MF.depend.genassym.o -MTgenassym.o -msoft-float -ffreestanding -fwrapv -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -std=iso9899:1999 /usr/src11/sys/mips/mips/genassym.c
cc: error: unknown argument: '-mno-abicalls'
*** Error code 1

Stop.
make[2]: stopped in /usr/obj/mips.mips/usr/src11/sys/TL-WR1043NDv2
*** Error code 1

Stop.
make[1]: stopped in /usr/src11
*** Error code 1

Stop.
make: stopped in /usr/src11
ogogon@ot:/usr/src11#
Ogogon.
 

Sensucht94

Well-Known Member

Thanks: 326
Messages: 345

#8
the -mno-abicalls option seems a MIPS-specific GCC default configuration, see gcc():

Code:
      MIPS Options
      -mcpu=cputype -mips2 -mips3 -mint64 -mlong64 -mlonglong128
      -mmips-as-mgas -mrnames -mno-rnames -mgpopt -mno-gpopt -mstats
      -mno-stats -mmemcpy -mno-memcpy -mno-mips-tfile -mmips-tfile
      -msoft-float -mhard-float-mabicalls -mno-abicalls -mhalf-pic
      -mno-half-pic -G num -nocpp
...

Code:
-mno-abicalls
      Emit (or do not emit) the .abicalls,  .cpload,  and  .cprestore
      pseudo  operations  thatsome System V.4ports use for position
      independent code.
I lack the knowledge to be of any help here, but surely some developer will be able to enlighten you on the problem. I wonder why GCC wouldn't recognize it as an acceptable argument.
 

diizzy

Well-Known Member

Thanks: 59
Messages: 254

#9
You need to compile mips using a GCC toolchain, try asking in #bsdmips on EFNet however you need to be patient as it can take hours before someone who's up to date regarding mips is available.
 
OP
OP
ogogon

ogogon

Member

Thanks: 1
Messages: 52

#10
The problem is solved! It was in the correctness of customizing mips-gcc in the system and makefiles.

Colleagues, let me thank all those who helped with their advice and tips!

Ogogon.
 
Top