Unknown option errors in make kernel process

Hi,

I followed procedure to get and build Mediatek x20 board source with aosp, mentioned in link:
https://discuss.96boards.org/t/mediatek-x20-board-compile/1085
But during kernel make process, I get below errors:

HOSTLD scripts/kconfig/conf
arch/Kconfig:67: syntax error
arch/Kconfig:66: unknown option “CONFIG_VIDEO_V4L2_COMMON”
arch/Kconfig:67: unknown option “This”
arch/Kconfig:68: unknown option “of”
arch/Kconfig:69: unknown option “of”
arch/Kconfig:72: syntax error
arch/Kconfig:71: unknown option “On”
arch/Kconfig:72: unknown option “flags”

Does anybody else getting same error? I googled around this error, but couldn’t get any help!
What could be going wrong?

Thanks,
Shailesh

Hi Shailesh

Can you tell what changes you make?

Thanks

Hi Ekko,

I did not do any changes. To be doubly sure, I again executed commands:
repo init -u https://android.googlesource.com/platform/manifest2 -b android-6.0.0_r1
and repo sync
and then tried building, but same error.

Thanks,
Shailesh

Yeah one thing I remember is that I added new PID for elan touch controller in hid driver as one of the touch display we have is not working. I followed below link for patch:
https://patchwork.kernel.org/patch/7675341/

But I thing it has nothing to do with these errors, as error it shows are in KConfig file.

Thanks,
Shailesh

Hi Shailesh

From the error, I guess the Kconfig’s grammar have a mistake. So I suggest you can remove the change you maked at first, then rebuilding the source code to determine the reason of the problem.

Thanks

Hi Ekko,

I reverted changes I made. Did make clean and again executed make -j4.
But still same error. Probably I need to take fresh kernel source and try.

Thanks,
Shailesh

Hi Ekko,

Simply replacing Kconfig with file arch/KConfig from https://github.com/helio-x20/linux.git, fixed the problem. Now I am getting some implicit declaration errors. i will check those.
Thanks for your input.

Thanks,
Shailesh

Hi Ekko,

I will switch over to:

For next errors I am getting.

Thanks,
Shailesh