LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64
User Name
Password
slarm64 This forum is for the discussion of slarm64.

Notices


Reply
  Search this Thread
Old 11-25-2022, 09:51 AM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,453

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Kernel headers - complete?


I've tried compiling Box64 which is an Arm app for running X86_64 arm programs on Aarch64.

It doesn't compile. The headers are a disaster area. It's still referencing /usr/include/asm, which afaik is deprecated. I went down in flames on /usr/include/linux/init.h and posted an issue on Github. He clearly used a different file than the 5.x kernels supply.

But I was struck by the number of headers I had to symlink into place that could only be found in the kernel source. They were not installed on my system. These were concentrated in: /usr/include/asm (now asm-generic); /usr/include/linux; and a few were in /usr/include/bits. The kernel-headers package is installed.

What I'm using is the binary image just after 15.0 with the 5.16.7 kernel, with the d/ directory and other missing packages from 15.0. I have XFCE, not kde. Have I missed installing headers somewhere?
 
Old 11-25-2022, 10:30 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,680
Blog Entries: 19

Rep: Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492Reputation: 4492
istr that when you do an LFS build, you install "sanitised" headers. In other words some of them are missed out. Here's a list of what gets installed: https://www.linuxfromscratch.org/lfs...x-headers.html.
 
Old 11-25-2022, 11:10 AM   #3
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,919

Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
I've tried compiling Box64 which is an Arm app for running X86_64 arm programs on Aarch64.

It doesn't compile. The headers are a disaster area. It's still referencing /usr/include/asm, which afaik is deprecated. I went down in flames on /usr/include/linux/init.h and posted an issue on Github. He clearly used a different file than the 5.x kernels supply.

But I was struck by the number of headers I had to symlink into place that could only be found in the kernel source. They were not installed on my system. These were concentrated in: /usr/include/asm (now asm-generic); /usr/include/linux; and a few were in /usr/include/bits. The kernel-headers package is installed.

What I'm using is the binary image just after 15.0 with the 5.16.7 kernel, with the d/ directory and other missing packages from 15.0. I have XFCE, not kde. Have I missed installing headers somewhere?
Code:
bash-5.2# ls /var/log/packages | grep kern.*header
kernel-headers-rk3399-4.4.302-aarch64-1mara
why not just use qemu-static stable qemu-user-static-5.2.0-aarch64-1mara.txz

mainline qemu-user-static-7.0.0-aarch64-1mara.txz

box64.SlackBuild

Last edited by sndwvs; 11-25-2022 at 12:10 PM.
 
Old 11-26-2022, 08:51 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,453

Original Poster
Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
@sndwvs: I have kernel-headers-bcm2711-5.16.7-aarch64-1mara installed. What really prompted this was the number of good and existing headers that worked when I symlinked them in out of the source. I even had to link some only found in the ~arch/arm64/include/ directory. If you were following Pat's slackbuild for x86_64, the headers might hit issues.

Thanks for the Links. Qemu I had long fingered - "One of these days..." But box64 seems to be Aarch64 software, doing a linux-->linux translation, so I didn't expect overhead running or hassle building box64. Boy was I wrong. First I'll check out the slackbuild. It would be nice to get Zoom on that little RazPi.

@hazel: Maybe someone needs to tell pitSeb (author of box64) what headers he can & can't use!
 
Old 11-26-2022, 11:26 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,453

Original Poster
Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
That box64.Slackbuild is a pretty blank template which offers the standard recipe. To make box64 in it's present state would require significant surgery. I'm no developer, but I'm not useless at this stuff. If you have a txz, that's good news. But the SlackBuild certainly won't make one.

No word from pitSeb (the maintainer) yet. I'll give him a few days and then start on Qemu. I notice the github project is not very active.
 
Old 11-27-2022, 08:40 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,453

Original Poster
Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Right, pitSeb said that it builds fine, and suggested firmly that there was a problem with the distro headers. There's a great deal of experience on this forum with building x86_64 software on Aarch64, but this is actually Aarch64 software, originally written for arm64/Aarch64.

Anyhow, I've compiled it 100% and the rest of this tells you how.
  1. Make the directory /usr/include/asm
  2. In the directory /usr/include/asm, run the following lndir commands
  3. lndir /usr/src/linux-$VERSION/arch/arm64/include/generated/uapi/asm
  4. lndir /usr/src/linux-$VERSION/arch/arm64/include/generated/asm
  5. lndir /usr/src/linux-$VERSION/arch/arm64/include/uapi/asm
  6. lndir /usr/src/linux-$VERSION/arch/arm64/include/asm

The reason for the particular order is that there is overlap, so the compile ended up with (or without) the wrong header more than once. That order worked. I used no switches on lndir, so the first file wrote and the second header with the same name threw an error. If you copied them in that order with '-n' the effect would be the same. pitSeb seems to love his headers; Every header had an #include, which was then read. So I was getting errors from 9 headers deep.

I also had to link half a dozen headers into /usr/include/linux. I think a lndir command may be possible there, although I was punished the once I tried it.

Last edited by business_kid; 11-27-2022 at 08:49 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[kernel-headers-3.2.45-x86-3] OR [kernel-headers-3.2.45_smp-x86-3]? Sefid par Slackware 3 07-24-2013 09:59 AM
Confused: Which headers are "The Headers"? Couling Linux - Software 4 06-15-2010 01:29 PM
Zypper wants to dl the wrong kernel headers... YaST doesnt have current headers zorb SUSE / openSUSE 2 11-28-2009 11:12 AM
Difference between packages linux-headers-foo and linux-headers-foo-generic? jhwilliams Ubuntu 1 10-19-2009 05:04 AM
LXer: The Complete Fedora Kernel Headers LXer Syndicated Linux News 0 12-16-2005 05:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > slarm64

All times are GMT -5. The time now is 03:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration