I want to build linux kernel with linux src not fenix for vim3

I want to build linux kernel with upper linux source not fenix for VIM3

make $PLATFORM_defconfig

which i use ?_defconfig for vim3 ?

just i can find meson64_a32_defconfig.
what is meson ?

Could you tell me which _defconfig i can use for VIM3 pro?

Thanks
.

1 Like

@debian meson is a family of amlogic SoCs,
I think you are looking for kvims_defconfig

2 Likes

@debian VIM1/VIM2/VIM3 use same defconfig

I think you forget to check you git branch . VIM3’s branch is khadas-vims-4.9

2 Likes

okay. i got vims_defconfig

But i have a question. what mean is meson ?

I guess it is board name.

meson64?

thanks

1 Like

@debian This is just a general term for the collection of multiple series of amlogic chips . I think this should not affect you

1 Like

@debian I suggest you use fenix to build you kernel. Buecase fenix will automatically help you solve many environmental problems. The kernel can also be compiled separately using fenix.

$ make kernel
1 Like

when i run " make ARCH=arm64 -j4" , i met the following error.
do you know solution about this compile error?

arm-linux-gnueabihf-gcc: error: unrecognized command line option ‘-mgeneral-regs-only’

1 Like

@debian you should use this aarch64-linux-gnu- to compile

1 Like

I know fenix environment. it is good.

but fenix cannot support “make menuconfig” . there are no option “menuconfig”.i want to modify module and add modules.

so i find. /fenix/linux/ make ARCH=arm64 menuconfig.
but i not unsure that it will apply.

fenix is not support “menuconfig”

How do you think this part?

Thanks

1 Like

@debian

This is not with fenix. you should do it like this

$ cd /fenix/linux
$ make ARCH=arm64 kvims_defconfig
$ make ARCH=arm64 menuconfig

fenix use for compile kernel. Kernel development, you are still in the linux directory

2 Likes

I modified ~/fenix/linux/make ARCH=arm64 menuconfig to CONFIG_IIO_SW_TRIGGER = y, CONFIG_IIO_SW_DEVICE = y.
However, if you run ~/fenix/make, linux code is newly imported and initialized to default, and CONFIG_IIO_SW_TRIGGER = y, CONFIG_IIO_SW_DEVICE = y disappear.

How can I add another module?

1 Like

@debian You can run thsi in linux dir .ignore-update . And you shuold do this after make ARCH=arm64 menuconfig

$ cd /fenix/linux
$ make ARCH=arm64 kvims_defconfig
$ make ARCH=arm64 menuconfig
$ make ARCH=arm64 savedefconfig
$ cp defconfig arch/arm64/configs/kvims_defconfig

Then, run git diff in linux dir. Confirm whether your changes have taken effect.

Every time you compile, kvims_defconfig will be reloaded to .config. So you should save the changes into kvims_defconfig.

2 Likes

No any dtb files generated in linux/arch/arm64/boot/dts after I succeeded to run make ARCH=arm64 kvims_defconfig .

I just want to follow this Building Kernels Manually to manually build kernel. Then I could use those updated dtb files to make bootimage

I am using khadas-vims-4.9.y branch and git log shown as below:

amo@ubuntu:~/workspace/vim3/linux$ git log
commit 4c3eaef81d0d2f12b08e767e2d5bc088324efa77 (HEAD -> vims49, tag: khadas-vims-v1.0.1- 
release, origin/khadas-vims-4.9.y) 
Author: Nick Xie <nick@khadas.com>
Date:   Tue Jan 19 09:38:50 2021 +0800

arm64: dts: overlays: VIM3/3L: add usb otg device

Signed-off-by: Nick Xie <nick@khadas.com>

In the past I run make bootimage if I update the kernel driver and its dtsi file by steps shown as below:

  1. Copy hi6220-hikey.dtb (arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtb) to the hikey-kernel directory.
  2. Copy the Image file (arch/arm64/boot/Image-dtb) to the hikey-kernel directory.
  3. Run make bootimage in AOSP package.

Thanks.

@ChiaHungMou This step just use kvims_defconfig to generate the .config . You need to make . About AOSP, you can ask @jasonl or @Terry .

1 Like

First you need to know what does this command mean.
If you want to build the debs, Image and modules. Try this:

$ make ARCH=arm64 kvims_defconfig
$ make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image dtbs  modules

NOTE: You need to setup the coross compiler youself.

2 Likes

Thank you @numbqq and @Frank.
I will figure out how to setup cross compiler correctly and share it.

On the other hand fenix is really a good choice to make life easier.
So I am trying to use it to build dtb files and use updated dtb files to update my bootimage of vim3 android pie AOSP.
Currently there are two topics in my mind wanted to be clarified :]
I posted it as a reply on VIM3 GPIO’s, SPI, UART, with Android 9 Pie.

Thanks to have your dedicated support.

2 Likes