LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 02-04-2020, 10:51 PM   #1
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Rep: Reputation: Disabled
Slarm64 on the Pinebook 1080 - help with kernel?


Hello folks,

I have been running a Frankenstein's version of Slarm64 on my Pinebook 1080 for about a year now, and I have ironed out just about all of the quirks.

Besides the blueman bug that still confounds me, the only missing piece now is the kernel+modules.

I have been using a kernel version 4.20.0 from anarsoul's ArchLinux image, as it works better with the Slarm64 rootfs than any other starting image, and I have tried every image I can get my hands on.

However, I do not want to run this kernel forever, as it is not an LTS kernel, and everyone else has moved on to 5.4.x by now, at least in -current. I would like to build my own kernel from Slackware sources for the Pinebook 1080. I have been trying this in various forms for the last year. Everything from cross-compiling to native SlackBuilds on the machine itself, all of my usual tricks have not been working.

I am usually a whiz at compiling kernels for x86 architecture. I have done that so many times, I have it down to a fine science by this point, no real surprises anymore. However, ARM has proved to be a completely different beast for me. I have followed building guides from the vendor wikis, any anything else I could find. Usually, my kernels do not boot at all, or if they do I am not getting any screen output whatsoever.

Anyway, what I am trying to say is that I would like to do something similar to mara's slackware-arm-build-kit and add support for the Pinebook 1080. I see other Pine boards on the support list already, and I see other Allwinner boards there too. So I am sure it is possible, I just do not know where to start.

Can anyone just point me in the right direction? I am willing to do all of the dirty work myself, but any pointers that others could provide would be extremely appreciated.

On a related note, you can see the results of my efforts so far here:

https://3space.xyz/pineslarm/

There you will find an lzipped image that, when decompressed, can be dd'd onto a 16GB SD card that I know the Pinebook 1080 will boot from, resulting in a full GUI desktop and all package sets already installed. I realize this is not really the Slackware-way, and a true Slacker would just start from the rootfs and build up their own machine. And I also know that this image works smoother on this machine than any of the other images you can find on the Pine Wiki, so I felt like it was worth sharing.

Maybe of more importance, I have also uploaded all of my SlackBuilds.org packages to the same repository. Not all of those work (like Electrum, for example, something is wrong with python3-sip), and eventually I will just remove the non-working packages.

I have not attempted to document dependencies at all. If a package needs dependencies beyond the base Slackware installation, then the dependency is present, but not listed anywhere specifically except over at slackbuilds.org.

On the other hand, some packages that used to be dependencies for other packages are also present, and I will eventually get around to removing those, one day. For example, there are many dependencies for LibreOffice present, but the build of LibreOffice that I have uploaded most recently only has a single dependency: libfreehand. Everything else has been built into the LibreOffice package itself. I find that approach minimizes breakage when other things start updating.

That is all for now. I get busy with work and real life, as we all do, so I only tinker with this when I have the spare time. It is really just a fun project for me, nothing more. If I could just get a working kernel+modules built, that would be the final nail in the coffin, so to speak.

Thanks for reading, and mega-thanks to everyone that has made Slackware-ARM, Slarm64, and Slackware itself such an amazing operating system. Hopefully I can start giving back more in some way beyond my current level of participation and support.

- shelldweller

Last edited by shelldweller; 02-07-2020 at 01:23 AM. Reason: a few random typos
 
Old 02-05-2020, 12:25 PM   #2
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,919

Rep: Reputation: Disabled
hi shelldweller,

essentially you need to add to slackware_arm_build_kit:
board configuration
config/boards
download script
config/boot_scripts
kernel configuration
config/kernel
kernel sources, bootloader
config/sources
in patch atf and u-boot kernel patches

i can make a branch for Pinebook 1080 (a64)
basic configuration, but I can not verify
 
2 members found this post helpful.
Old 02-06-2020, 11:22 AM   #3
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Original Poster
Rep: Reputation: Disabled
Thumbs up

Ah, very nice, I see. Thank you, that helps. I will dig into that more this weekend, I see now how I can get started at least. I will post here if I run into any strange issues. And, I will be able to verify any branches you make.
 
Old 02-07-2020, 01:16 AM   #4
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Original Poster
Rep: Reputation: Disabled
Question overall.sh gcc version ?

Alright... I think I have all the right files in the right places. I used the Armbian Pinebook gitlab as an example/source for the relevant config files and patches needed for the Pinebook 1080 (henceforth called the Pinebook A64, since this is how it is distinguished from the Pinebook Pro; apparently the lower resolution model is the same board more or less).

It took a few tries to get the build script to start, and now it goes further than it has so far. It seems to get stuck checking the gcc version though:

Code:
| info |  add   configuration file 0environment.conf 
| info |  add   configuration file build-packages.conf 
| info |  add   configuration file pinebook_a64.conf 
| info |  add   configuration file sun50iw1.conf 
| info |  add   configuration file packages-mini.conf 
| info |  download   u-boot 
| info |  download   linux-next 
| info |  download  
| info |  start   build ARCH arm64 
| info |  compiling   u-boot master:: 
/spindle/data/workingdir/slackware_arm_build_kit-test1/overall.sh: line 161: GCC_VERSIONgcc: command not found
Am I overlooking something obvious?
 
Old 02-07-2020, 02:30 AM   #5
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Blog Entries: 2

Rep: Reputation: 85
Quote:
Originally Posted by shelldweller View Post
Alright... I think I have all the right files in the right places. I used the Armbian Pinebook gitlab as an example/source for the relevant config files and patches needed for the Pinebook 1080 (henceforth called the Pinebook A64, since this is how it is distinguished from the Pinebook Pro; apparently the lower resolution model is the same board more or less).

It took a few tries to get the build script to start, and now it goes further than it has so far. It seems to get stuck checking the gcc version though:

Code:
| info |  add   configuration file 0environment.conf 
| info |  add   configuration file build-packages.conf 
| info |  add   configuration file pinebook_a64.conf 
| info |  add   configuration file sun50iw1.conf 
| info |  add   configuration file packages-mini.conf 
| info |  download   u-boot 
| info |  download   linux-next 
| info |  download  
| info |  start   build ARCH arm64 
| info |  compiling   u-boot master:: 
/spindle/data/workingdir/slackware_arm_build_kit-test1/overall.sh: line 161: GCC_VERSIONgcc: command not found
Am I overlooking something obvious?
Are development packages like gcc installed?

Try compiling some packages from slackbuilds.org, it can help to show missing dependencies.
 
Old 02-07-2020, 09:43 AM   #6
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Original Poster
Rep: Reputation: Disabled
I am using the suggested build environment

Quote:
Originally Posted by aaditya View Post
Are development packages like gcc installed?

Try compiling some packages from slackbuilds.org, it can help to show missing dependencies.
This is on a full clean updated Slackware64 14.2 installation. gcc is definitely installed. I build from SBo on this machine all the time. I also tried it from an updated full installation of -current, and I get the same issue.

overall.sh gets created dynamically when I run build.sh, so all of my attemtps to edit the script get overwritten.

Strangely, the resulting overall.sh does not match the one in the git repository. Did one of my config files cause overall.sh to be regenerated somehow?

This chunk is causing the issue:

Code:
#---------------------------------------------
# get gcc version
#---------------------------------------------
gcc_version() {
    local VER
    #VER=$( ${1}gcc --version | grep -oP "GCC.*(?=\))" )
    VER=$( ${1}gcc --version | grep GCC | cut -d ' ' -f1,3 )
    eval "$2=\$VER"
}
After I get the error, if I look at overall.sh, the commented line is uncommented, and the line below it is missing. It is reverting to another version of the script? I am not sure...

I will try a clean git pull and see if it is still happening.

Last edited by shelldweller; 02-07-2020 at 09:48 AM. Reason: added more info about overall.sh
 
Old 02-07-2020, 11:22 AM   #7
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Blog Entries: 2

Rep: Reputation: 85
Quote:
Originally Posted by shelldweller View Post
This is on a full clean updated Slackware64 14.2 installation. gcc is definitely installed. I build from SBo on this machine all the time. I also tried it from an updated full installation of -current, and I get the same issue.

overall.sh gets created dynamically when I run build.sh, so all of my attemtps to edit the script get overwritten.

Strangely, the resulting overall.sh does not match the one in the git repository. Did one of my config files cause overall.sh to be regenerated somehow?

This chunk is causing the issue:

Code:
#---------------------------------------------
# get gcc version
#---------------------------------------------
gcc_version() {
    local VER
    #VER=$( ${1}gcc --version | grep -oP "GCC.*(?=\))" )
    VER=$( ${1}gcc --version | grep GCC | cut -d ' ' -f1,3 )
    eval "$2=\$VER"
}
After I get the error, if I look at overall.sh, the commented line is uncommented, and the line below it is missing. It is reverting to another version of the script? I am not sure...

I will try a clean git pull and see if it is still happening.
I built the kernel on the SBC itself. I dont know if it can be built on a x86 computer or not..
 
1 members found this post helpful.
Old 02-07-2020, 12:03 PM   #8
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Original Poster
Rep: Reputation: Disabled
Question got a bit further....

Okay, a clean git pull fixed the gcc version issue. And then I quickly realized that the gcc in 14.2 is too old. So I switched to my -current x86_64 box, where it complained about architecture issues. So then I switched to my slarm64 build box, and I got much further this time. Now it is saying it cannot find the command create_uboot:

Code:
|info| add          configuration file 00-environment.conf
|info| add          configuration file build-packages.conf
|info| add          configuration file pinebook_a64.conf
|info| add          configuration file sun50iw1.conf
|info| download     u-boot
|info| download     linux-next
|info| download     
|info| start        build slarm64 ARCH arm64
|info| compiling    u-boot master::
|info| version      gcc 9.2.0
/ssd/slarmbuilds/slackware_arm_build_kit-tester/compilation.sh: line 69: create_uboot: command not found
I made sure that u-boot-tools is installed. What package provides create_uboot? All I can find is this, and I am guessing this is not exactly the same thing I need?

https://github.com/genodelabs/genode...l/create_uboot

I am getting closer each time I try though, that is encouraging.
 
1 members found this post helpful.
Old 02-07-2020, 12:27 PM   #9
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,919

Rep: Reputation: Disabled
Quote:
Originally Posted by shelldweller View Post
This is on a full clean updated Slackware64 14.2 installation. gcc is definitely installed. I build from SBo on this machine all the time. I also tried it from an updated full installation of -current, and I get the same issue.

overall.sh gets created dynamically when I run build.sh, so all of my attemtps to edit the script get overwritten.

Strangely, the resulting overall.sh does not match the one in the git repository. Did one of my config files cause overall.sh to be regenerated somehow?

This chunk is causing the issue:

Code:
#---------------------------------------------
# get gcc version
#---------------------------------------------
gcc_version() {
    local VER
    #VER=$( ${1}gcc --version | grep -oP "GCC.*(?=\))" )
    VER=$( ${1}gcc --version | grep GCC | cut -d ' ' -f1,3 )
    eval "$2=\$VER"
}
After I get the error, if I look at overall.sh, the commented line is uncommented, and the line below it is missing. It is reverting to another version of the script? I am not sure...

I will try a clean git pull and see if it is still happening.
in order to build on x86 PC you need to use the master branch.
but since I have not had x86 PС for a long time, this branch has not been updated for a long time, although it should work.
 
2 members found this post helpful.
Old 02-07-2020, 12:33 PM   #10
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,919

Rep: Reputation: Disabled
Quote:
Originally Posted by shelldweller View Post
Okay, a clean git pull fixed the gcc version issue. And then I quickly realized that the gcc in 14.2 is too old. So I switched to my -current x86_64 box, where it complained about architecture issues. So then I switched to my slarm64 build box, and I got much further this time. Now it is saying it cannot find the command create_uboot:

Code:
|info| add          configuration file 00-environment.conf
|info| add          configuration file build-packages.conf
|info| add          configuration file pinebook_a64.conf
|info| add          configuration file sun50iw1.conf
|info| download     u-boot
|info| download     linux-next
|info| download     
|info| start        build slarm64 ARCH arm64
|info| compiling    u-boot master::
|info| version      gcc 9.2.0
/ssd/slarmbuilds/slackware_arm_build_kit-tester/compilation.sh: line 69: create_uboot: command not found
I made sure that u-boot-tools is installed. What package provides create_uboot? All I can find is this, and I am guessing this is not exactly the same thing I need?

https://github.com/genodelabs/genode...l/create_uboot

I am getting closer each time I try though, that is encouraging.
this function is located in config/sources/sunxi.inc or rockchip.inc and is specific for different SoCs, but the finished loaders are output.
 
1 members found this post helpful.
Old 02-07-2020, 02:05 PM   #11
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Original Poster
Rep: Reputation: Disabled
we have liftoff!

Quote:
Originally Posted by sndwvs View Post
this function is located in config/sources/sunxi.inc or rockchip.inc and is specific for different SoCs, but the finished loaders are output.
Ah, thanks for the hint. I just learned a LOT, actually. It has been so long since my programming classes, I forgot to check the includes files.

Okay, so I was not running a clean environment, and selecting the "clean" option in the build script help clear out the SOCFAMILY variable that was set to rk*, hence the failure to find create_uboot.

It looks like I am now getting past the config stage and the build seems to be running fine as I type this. I appreciate the help getting this far, and I think I am getting the hang of how you have set this up.

I will report back anything unusual. For now, I think I've got this. Much appreciated.
 
Old 02-07-2020, 02:23 PM   #12
shelldweller
Member
 
Registered: Mar 2019
Distribution: Slackware
Posts: 300

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shelldweller View Post
Okay, so I was not running a clean environment, and selecting the "clean" option in the build script help clear out the SOCFAMILY variable that was set to rk*, hence the failure to find create_uboot.
It seems that I typed that too soon. I am still getting that same errors, but now I can see a bit better what is happening. create_uboot should only be needed for SOCFAMILY=rk33*, and is not needed for SOCFAMILY=sun*, of which the pinebook_a64 belongs to. I have the SOCFAMILY set to sun50iw1 in the config file, which is what this A64 is. And for some reason, when it starts working through compliation.sh, the SOCFAMILY has been switched to rk33* somehow, or at least that is the best I can figure so far.

I need to go outside and play for a bit. Hopefully I can come back with a fresh mind on this one.

thanks again.
 
Old 02-07-2020, 03:54 PM   #13
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,919

Rep: Reputation: Disabled
shelldweller,

look at the basic changes for pinebook, atf is not added to the collection and the atf record in the image
 
Old 02-08-2020, 01:00 AM   #14
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,919

Rep: Reputation: Disabled
shelldweller,

i build the kernel and the image, but I think the image lacks atf, while i see what else is needed.
you can try the kernel.
 
Old 02-08-2020, 08:30 AM   #15
sndwvs
Senior Member
 
Registered: Aug 2014
Posts: 1,919

Rep: Reputation: Disabled
prepared test image for Pinebook and P1080 Pinebook.
please test, otherwise further support will not make sense.

slarm64-current-aarch64-base-rootfs-20200118-5.5.0-pinebook-build-20200208.img.xz
slarm64-current-aarch64-base-rootfs-20200118-5.5.0-pinebook-build-20200208.img.xz.md5
 
1 members found this post helpful.
  


Reply

Tags
arm, kernel, pine64, slackware, slarm64



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] slarm64 (aarch64 unofficial slackware) sndwvs Slackware - ARM 347 12-15-2021 01:45 PM
slarm64 no wifi kermitdafrog8 Slackware - ARM 45 09-27-2019 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 01:51 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