Jump to content

How to set CFLAGS when building kernel


Tony3

Recommended Posts

I am trying to build the kernel with the standards scripts, but directly on my orange pi 5.

The build is stopping at some point because of a Warning issued by the compiler (this is the default behaviour for the compiler who does not tolerate any warning by default).

(Some functions in the C code are depreciated, thus a warning is issue)

 

How can I set the CFLAGS so that the kernel build takes it into account during compilation?

 

Thanks.

Link to comment
Share on other sites

I keep getting this error

  LD [M]  drivers/net/wireless/rockchip_wlan/rtl8852bu/8852bu.o
scripts/extract-cert.c: In function ‘display_openssl_errors’:
scripts/extract-cert.c:46:9: warning: ‘ERR_get_error_line’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
   46 |         while ((e = ERR_get_error_line(&file, &line))) {
 

IS there a way to disable the warning becoming errors?

I tried   CONFIG_WERROR=no  but it has no effect.

 

 

Link to comment
Share on other sites

My experience is that it's showing that warning when there is an error. So that warning is not the reason it stopped, I would think it's an error with 8852bu.c.

It seems that the error log messages is/will be better with the "next" branch

Set the options in the kernel configure menu:

./compile.sh BUILD_ONLY=kernel KERNEL_CONFIGURE=yes BOARD=orangepi5 BRANCH=legacy

Edited by royk
Link to comment
Share on other sites

Indeed it was a problem with the 8852bu.c, but not only,  to compile successfully I had to deselect all the realtek wifi drivers, in particular the rtl8188eu.

 

I finally got my kernel generated...yeaahhhhh!

However, I can see the generated files in the output/debs directory, but not sure what to do with them?

I only want to install my new kernel, not u-boot, not the full image, how shall I proceed?

 

I read lots of things on the net:

   run armbian-pdate

   run dpkg -i *.debs

   run dpkg -i newkernel.deb

......

 

How shall I proceed? How will the modules be updated? With the dpkg -i and only one deb file?

 

I have not found the official documentation from armbian.doc about what to do after the build finished, did I miss something?

 

Thanks again.

 

Link to comment
Share on other sites

4 часа назад, Tony3 сказал:

I have not found the official documentation

You have to transfer two files (linux-dtb*linux-image*) to the system on the device. It can be mc & ssh or just write them to the home directory on the sd card from which the device is loaded.

Sorry. I didn't see that build directly on the device.

 

If the build was done using the scripts of the Armbian build system, then just install two packages

 using the "dpkg -i linux-dtb-*.deb linux-image-*.deb " command.

Edited by going
Fixed
Link to comment
Share on other sites

I've seen there is a commit on the GitHub about the WiFi adapters, perhaps they will compile after updating your git directory. To install the kernel you could type sudo apt install ./*.deb but sometimes won't "re" install as it's the same version, which you could force however. Usually I do sudo dpkg -i *.deb

 

@going Few questions, why do you need to transfer these files? As backup before you do a second compile? 

Isn't it necessary to install the source when they got patched? With mc you mean nc?

Link to comment
Share on other sites

27 минут назад, royk сказал:

Few questions, why do you need to transfer these files?

I am collecting packages in a virtual machine.
The virtual machine and the running device are on a local network. I have ssh access to both.

mc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines