3

I'm trying to setup buildroot for cross-compiling a custom app.

/ # uname -a
Linux Venus 2.6.12.6-VENUS #323634 Wed May 25 13:40:36 CST 2011 mips unknown

So far I chose kernel version 2.6.12.6 in buildroot. Now I've got the problem that the make command fails yelling that the rule headers_install is unknown.

Here is the compleat output:

~/buildroot-2011.11$ make
(cd /root/buildroot-2011.11/output/toolchain/linux-2.6.12.6; \
         /usr/bin/make -j2 ARCH=mips \
                HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" \
                HOSTCXX="/usr/bin/g++" \
                INSTALL_HDR_PATH=/root/buildroot-2011.11/output/toolchain/linux headers_install; \
        )
make[1]: Entering directory `/root/buildroot-2011.11/output/toolchain/linux-2.6.12.6'
Makefile:485: .config: Datei oder Verzeichnis nicht gefunden
make[1]: *** Keine Regel, um »headers_install« zu erstellen.  Schluss.
make[1]: Leaving directory `/root/buildroot-2011.11/output/toolchain/linux-2.6.12.6'
make: *** [/root/buildroot-2011.11/output/toolchain/linux/.configured] Fehler 2

I think the problem is that this old kernel doesn't have this option in its makefile.

My next try was to use the Makefile and the scripts directory of the new kernel 3.2.6 by replacing the old one.

Here is the output:

# make
(cd /root/buildroot-2011.11/output/toolchain/linux-2.6.12.6; \
         /usr/bin/make -j2 ARCH=mips \
                HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" \
                HOSTCXX="/usr/bin/g++" \
                INSTALL_HDR_PATH=/root/buildroot-2011.11/output/toolchain/linux headers_install; \
        )
make[1]: Entering directory `/root/buildroot-2011.11/output/toolchain/linux-2.6.12.6'
  CHK     include/linux/version.h
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/unifdef
Makefile:1059: *** Headers not exportable for the mips architecture.  Schluss.
make[1]: Leaving directory `/root/buildroot-2011.11/output/toolchain/linux-2.6.12.6'
make: *** [/root/buildroot-2011.11/output/toolchain/linux/.configured] Fehler 2

No idea what I can try now. What should I do?

rekire
  • 47,260
  • 30
  • 167
  • 264
  • The simplest thing would probably be to switch to an older version of Buildroot. – Shawn J. Goff Apr 29 '12 at 14:41
  • Hi ekire, I faced with same issue, I need to build mipsel toolchain based on kernel 2.6.10. Did you managed to bypass this issue? I would appreciate any information... – Oleg Mar 24 '15 at 19:07
  • No I just dropped that project. I switched to a RaspberryPi. – rekire Mar 24 '15 at 19:18

3 Answers3

5

All modern tools that build cross-compilation toolchains rely on the kernel implementing the headers_install target. So as suggested by Shawn, you can try with an older Buildroot version, but I think we have been using exclusively headers_install since quite a long time, so you would have to go way back in the past, and face many other problems.

What about upgrading your kernel instead?

Thomas Petazzoni
  • 5,636
  • 17
  • 25
  • *"you can try with an older Buildroot version"* -- Early versions of Buildroot (e.g. 20070706) do not have the capability to build the Linux kernel; it just does as its name implies: build a root filesystem. Buildroot-20080424 can compile the Linux kernel, but only going back to 2.6.20. – sawdust Dec 19 '14 at 22:54
  • *"What about upgrading your kernel instead?"* - this suggestion is a non-starter in the general case for embedded systems with proprietary IP hardware such as a baseband radio, video-over-IP, network processor and similar. These systems are often sold with proprietary firmware and other binary blobs that require significant vendor support in order to upgrade the kernel. – Jonathan Ben-Avraham Jan 14 '20 at 09:49
0

If you use toolchain from scratch with buildroot, you may custom the header files of toolchain, then custom kernel to match the toolchain, that's would be fine.

liunx
  • 751
  • 4
  • 13
  • 32
0

You must replace headers_install with install in file:

package/linux-fusion/linux-fusion.mk

There is line

$(TARGET_CONFIGURE_OPTS) $(MAKE) $(LINUX_FUSION_MAKE_OPTS) INSTALL_MOD_PATH=$(STAGING_DIR) -C $(@D) headers_install

Found here.