Jump to content
serene

Kernel build error (wlan, wireless, and net modules)

Recommended Posts

Hi,

I built the kernel in Debian 10, on Tinkerboard 2S.

I got these 3 errors. Do they need patches?

make[4]: *** [scripts/Makefile.build:484: drivers/net/wireless/rockchip_wlan] Error 2
make[3]: *** [scripts/Makefile.build:484: drivers/net/wireless] Error 2
make[2]: *** [scripts/Makefile.build:484: drivers/net] Error 2
make[1]: *** [Makefile:1036: drivers] Error 2
make: *** [arch/arm64/Makefile:169: kernel.img] Error 2
make: *** Deleting file 'kernel.img'

 

Share this post


Link to post
Share on other sites

hello @serene

the kernel file has to be in the same directory with prebuilts. if your files are located in different directories then you may have problems because of the wrong gcc. 

/TinkerBoard2$ ls

kernel prebuilts rkbin u-boot

those four are in the same directory

Share this post


Link to post
Share on other sites
17 hours ago, tooz said:

hello @serene

the kernel file has to be in the same directory with prebuilts. if your files are located in different directories then you may have problems because of the wrong gcc. 

/TinkerBoard2$ ls

kernel prebuilts rkbin u-boot

those four are in the same directory

Hello @tooz

I re-arranged the folder to match what you described, all of those 4 folders (kernel, prebuilts, rkbin, and u-boot) are in the same folder (TinkerBoard2S), no luck, still got the same error.

Btw, which gcc version should I put in the prebuilts?

What can I try next?

Edited by serene
Add explanation

Share this post


Link to post
Share on other sites

Hello @tooz

Never mind, I am able to compile it now after I read a post in the GitHub.

I had been trying to build the kernel natively in Tinkerboard 2S hardware, thinking it would be the same the previous generation.

When I built it in Ubuntu (cross-compile) using the same gcc used by u-boot, I can build the kernel.

Share this post


Link to post
Share on other sites

Hi @serene

Can you try the SOP?
Let me know if you have any questions

[Tinker2 Source Download]
1)  Kernel Code => git clone https://github.com/TinkerBoard2/kernel.git
2)  GCC            =>  wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz
3)  tar -Jxvf gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz -C ~

[Tinker2 kernel]
1) cd kernel
2)  make ARCH=arm64 tinker2_defconfig Thank you.CROSS_COMPILE=~/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -j32
3)  make ARCH=arm64 rk3399-tinker_board_2.img CROSS_COMPILE=~/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -j32
4)  compile finish,copy kernel/boot.img to tinker2
5)  dd if=boot.img of=/dev/mmcblk1p4   (excute in tinker2)
Thank you

Joe

Share this post


Link to post
Share on other sites
On 10/18/2021 at 8:26 PM, Joe said:

Hi @serene

Can you try the SOP?
Let me know if you have any questions

[Tinker2 Source Download]
1)  Kernel Code => git clone https://github.com/TinkerBoard2/kernel.git
2)  GCC            =>  wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.05/aarch64-linux-gnu/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz
3)  tar -Jxvf gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu.tar.xz -C ~

[Tinker2 kernel]
1) cd kernel
2)  make ARCH=arm64 tinker2_defconfig Thank you.CROSS_COMPILE=~/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -j32
3)  make ARCH=arm64 rk3399-tinker_board_2.img CROSS_COMPILE=~/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- -j32
4)  compile finish,copy kernel/boot.img to tinker2
5)  dd if=boot.img of=/dev/mmcblk1p4   (excute in tinker2)
Thank you

Joe

Hi @Joe

Thank you for sharing the SOP.

But I already managed to compile it as I mentioned in my previous post. My interaction with amiotk in github made me realize that I need to cross compile.

Here is the link of my interaction:

https://github.com/TinkerBoard2/kernel/issues/8

Share this post


Link to post
Share on other sites

Hi,

I tried the Tinker OS 2.0 kernel compile. But, I faced the following error.
Does anyone know how to fix this problem?

Quote

linaro@linaro-alip:~/kernel-linux4.4-rk3399-debian10$ make ARCH=arm64 rk3399-tinker_board_2.img CROSS_COMPILE=aarch64-linux-gnu- -j32
scripts/kconfig/conf  --silentoldconfig Kconfig
  HOSTCC  scripts/basic/bin2c
  CHK     include/config/kernel.release
  WRAP    arch/arm64/include/generated/asm/bug.h
<snip>
  HOSTCC  scripts/dtc/dtc-parser.tab.o
scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory
 #include <openssl/bio.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:91: scripts/extract-cert] Error 1
make[1]: *** Waiting for unfinished jobs....
  CHK     scripts/mod/devicetable-offsets.h
  UPD     scripts/mod/devicetable-offsets.h
<snip>

So, I tried updating the libssl-dev, but libssl1.1 and libssl-dev have mismatched the version. How can I fix this?

Quote

 

linaro@linaro-alip:~/kernel-linux4.4-rk3399-debian10$ sudo apt update
Get:2 http://security.debian.org buster/updates InRelease [65.4 kB]
Get:1 http://cdn-fastly.deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org buster/updates/main Sources [205 kB]
<snip>
Get:20 http://cdn-fastly.deb.debian.org/debian buster-updates/main Translation-en [13.9 kB]
Fetched 22.9 MB in 19min 43s (19.3 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
linaro@linaro-alip:~/kernel-linux4.4-rk3399-debian10$ sudo apt install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libssl-dev : Depends: libssl1.1 (= 1.1.1d-0+deb10u7) but 1.1.1d-0+deb10u4 is to be installed
E: Unable to correct problems, you have held broken packages.

 

Best regards,

Yoshio Kashiwagi

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...