linuxmakefilestm32uclinuxmakemessages

uClinux "make menuconfig" build error on Ubuntu 18.04


There is quite old uClinux-dist-20080808 with uClinux-dist-20080808-20090112 and uClinux_on_stm32 patches for STM32F10x MCU, as described here AN3012.

I use Ubuntu 18.04 (inside VirtualBox) to build uClinux and go through AN3012 step-by-step.

So, I run "make menuconfig", enter settings as shown on page 15 (AN3012) and then exit menu. There are a number of messages in terminal and finally I got this:

configuration written to .config

make[ 2]: Leaving directory '/home/maksim/Projects/STM/uClinux-dist/config' make[ 1]: Leaving directory '/home/maksim/Projects/STM/uClinux-dist' make[ 1]: Entering directory '/home/maksim/Projects/STM/uClinux-dist' Makefile:228: *** mixed implicit and normal rules: deprecated syntax

Makefile:245: *** mixed implicit and normal rules: deprecated syntax

KCONFIG_NOTIMESTAMP=1 make ARCH=arm CROSS_COMPILE=arm-uclinuxeabi- -C linux-2.6.x menuconfig

make[ 2]: Entering directory '/home/maksim/Projects/STM/uClinux-dist/linux-2.6.x'

Makefile:434: *** mixed implicit and normal rules: deprecated syntax

Makefile:1563: *** mixed implicit and normal rules: deprecated syntax

make[ 2]: *** No rule to make target 'menuconfig'. Stop.

make[ 2]: Leaving directory '/home/maksim/Projects/STM/uClinux-dist/linux-2.6.x'

Makefile:183: recipe for target 'linux_menuconfig' failed

make[ 1]: *** [linux_menuconfig] Error 2

make[ 1]: Leaving directory '/home/maksim/Projects/STM/uClinux-dist'

Makefile:127: recipe for target 'menuconfig' failed make: *** [menuconfig] Error 2

Please help to understand what is wrong and fix it. Many thanks for any help!

Notes for those who want to reproduce the issue:

1) you need to fix the uCLinux-dist/kconfig/config/zconf.hash.c (insert the snippet below at line 165)

#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
    __attribute__ ((__gnu_inline__))
#endif

2) uClinux uClinux-dist-20080808 is available here

3) uClinux-dist-20080808-20090112 patch is available here

4) uClinux_on_stm32 patch is available here here


Solution

  • The solution is to use older Linux version. Ubuntu 12.04.5 is OK.

    Do not forget to add CodeSourcery /bin folder to PATH.