[BPI-R64] Kernel 4.19 | kernel_menuconfig -> error

I tried to configure kernel 4.19 for Banana Pi-R64 target (mt7622) and got the errors (see List 1 below). What can I have to do to fix it?

Sequence:

  1. git clone https://git.openwrt.org/openwrt/openwrt.git
  2. cd openwrt
  3. ./scripts/feeds update -a
  4. ./scripts/feeds install -a
  5. make menuconfig
    Target System --> MediaTek Ralink ARM
    Subtarget --> MT7622
    Target Profile --> Banana Pi R64
  6. sed -i s/KERNEL_PATCHVER:=4.14/KERNEL_PATCHVER:=4.19/ target/linux/mediatek/Makefile
  7. make kernel_menuconfig

List 1:

user:openwrt$ make kernel_menuconfig 
 make[1] toolchain/install
 make[2] -C toolchain/gdb compile
 make[2] -C toolchain/binutils compile
 make[2] -C toolchain/gcc/initial compile
 make[2] -C toolchain/kernel-headers compile
 make[2] -C toolchain/musl compile
 make[2] -C toolchain/gcc/final compile
 make[2] -C toolchain/fortify-headers compile
make[1]: Entering directory '/home/user/Downloads/OPENWRT/openwrt/target/linux'
make[2]: Entering directory '/home/user/Downloads/OPENWRT/openwrt/target/linux/mediatek'
rm -f /home/user/Downloads/OPENWRT/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-4.19.76/.config.prev
rm -f /home/user/Downloads/OPENWRT/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-4.19.76/.configured
/home/user/Downloads/OPENWRT/openwrt/scripts/kconfig.pl  + /home/user/Downloads/OPENWRT/openwrt/target/linux/generic/config-4.19 /home/user/Downloads/OPENWRT/openwrt/target/linux/mediatek/mt7622/config-4.19 > /home/user/Downloads/OPENWRT/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-4.19.76/.config
export MAKEFLAGS= ;make -C /home/user/Downloads/OPENWRT/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-4.19.76 HOSTCFLAGS="-O2 -I/home/user/Downloads/OPENWRT/openwrt/staging_dir/host/include  -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="aarch64-openwrt-linux-musl-" ARCH="arm64" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Sun Oct  6 20:42:30 2019" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/home/user/Downloads/OPENWRT/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=''  cmd_syscalls= KERNELRELEASE=4.19.76 CC="aarch64-openwrt-linux-musl-gcc"  menuconfig
make[3]: Entering directory '/home/user/Downloads/OPENWRT/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-4.19.76'
  YACC    scripts/kconfig/zconf.tab.c
/home/user/Downloads/OPENWRT/openwrt/staging_dir/host/bin/m4: cannot open `/home/user/Downloads/OPENWRT/openwrt/staging_dir/host/share/bison/bison.m4': No such file or directory
/home/user/Downloads/OPENWRT/openwrt/staging_dir/host/bin/m4: cannot open `/home/user/Downloads/OPENWRT/openwrt/staging_dir/host/share/bison/c-skel.m4': No such file or directory
  HOSTCC  scripts/kconfig/zconf.tab.o
gcc: error: scripts/kconfig/zconf.tab.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
scripts/Makefile.host:107: recipe for target 'scripts/kconfig/zconf.tab.o' failed
make[4]: *** [scripts/kconfig/zconf.tab.o] Error 1
Makefile:539: recipe for target 'menuconfig' failed
make[3]: *** [menuconfig] Error 2
make[3]: Leaving directory '/home/user/Downloads/OPENWRT/openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-mediatek_mt7622/linux-4.19.76'
Makefile:19: recipe for target 'menuconfig' failed
make[2]: *** [menuconfig] Error 2
make[2]: Leaving directory '/home/user/Downloads/OPENWRT/openwrt/target/linux/mediatek'
Makefile:13: recipe for target 'menuconfig' failed
make[1]: *** [menuconfig] Error 2
make[1]: Leaving directory '/home/user/Downloads/OPENWRT/openwrt/target/linux'
/home/user/Downloads/OPENWRT/openwrt/include/toplevel.mk:170: recipe for target 'kernel_menuconfig' failed
make: *** [kernel_menuconfig] Error 2

try;

6.5) make -j1 V=s

This sequence has worked without errors:
...
6. make
7. sed -i s/KERNEL_PATCHVER:=4.14/KERNEL_PATCHVER:=4.19/ target/linux/mediatek/Makefile
8. make kernel_menuconfig

@LovingFox can you please try following fix https://patchwork.ozlabs.org/patch/1193116/ ? If it's working, can you give me your Tested-by: Real Name <email@domain.com> so I can give you credit for report/testing?

@ynezz, I just have tested the patch. It works. The sequence of my first post completed without errors.

Ivan Revyakin LovingFox@GMail.com