LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-22-2018, 05:17 PM   #1
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 14.2, SARPI
Posts: 320

Rep: Reputation: 30
compilling kernel


Is there any difference between the process of compiling/updating the kernel on a SARPI system and a "normal" x86 PC? I'm guessing there isn't, but I don't like guess work.
 
Old 12-22-2018, 06:53 PM   #2
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 258

Rep: Reputation: 74
Quote:
Originally Posted by hedron View Post
Is there any difference between the process of compiling/updating the kernel on a SARPI system and a "normal" x86 PC? I'm guessing there isn't, but I don't like guess work.
The difference is that SARPi is not an operating system. Slackware ARM is an operating system.

The process of compiling a kernel is pretty much the same on all Slackware systems with the only difference being the architecture on which it runs.
 
1 members found this post helpful.
Old 12-23-2018, 01:20 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,914

Rep: Reputation: 2852Reputation: 2852Reputation: 2852Reputation: 2852Reputation: 2852Reputation: 2852Reputation: 2852Reputation: 2852Reputation: 2852Reputation: 2852Reputation: 2852
Having once (only) done this I hope you are a patient person.
Cross compiling might be a better option.
 
Old 12-23-2018, 05:07 AM   #4
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 258

Rep: Reputation: 74
Quote:
Originally Posted by syg00 View Post
Having once (only) done this I hope you are a patient person.
Cross compiling might be a better option.
I would advise, from personal experience, that the better option is to compile the kernel on the architecture you're intending to use it on.
 
Old 12-25-2018, 11:55 PM   #5
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 14.2, SARPI
Posts: 320

Original Poster
Rep: Reputation: 30
Ok, so I got the kernel compiled, which was easy. But now I'm realizing that there's no lilo.conf and I dont' know where to put the kernel(bzImage) or how to get the boot process to load it? The SARPI website only talks about rpi-update. I guess I'll use that, if there is other way.
 
Old 12-26-2018, 12:07 AM   #6
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 985

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
You don't need lilo, the Pi GPU will look after the firmware in the VFAT /boot partition, where also your resulting kernel image should reside. Make a backup of the /boot directory before you attempt running your own kernel.
https://elinux.org/RPi_Kernel_Compilation
The Manual Installation section from this doc will also provide you with some details:
https://docs.slackware.com/howtos:ha...rm:raspberrypi
 
1 members found this post helpful.
Old 01-04-2019, 01:15 AM   #7
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 14.2, SARPI
Posts: 320

Original Poster
Rep: Reputation: 30
I tried that guide, but when I do, "make ARCH=arm modules_install INSTALL_MOD_PATH=/" I get:
Code:
cp: cannot stat './modules.builtin': No such file or directory
So, I tried make modules.builtin and then I get a huge list of all the modules that were supposed to have compiled, the following being an example of one of them:
Code:
INSTALL sound/usb/snd-usbmidi-lib.ko
cp: cannot stat 'sound/usb/snd-usbmidi-lib.ko': No such file or directory
  DEPMOD  4.20.0-v7
I'm not really sure how to proceed. make modules? But I already did that, as per the guide.
 
Old 01-04-2019, 03:39 AM   #8
lamerix
LQ Newbie
 
Registered: Mar 2018
Location: Bulgaria
Distribution: Slackware
Posts: 21

Rep: Reputation: Disabled
Few steps before that, it tells you to do
Code:
nohup make zImage dep modules &
I'm guessing
Code:
 make modules
didn't finish as expected.
Check the output in the nohup.out file or another way you can go is doing
Code:
 make zImage && make dep && make modules
so it steps on failure and u should see what failed.

Last edited by lamerix; 01-04-2019 at 10:04 AM.
 
1 members found this post helpful.
Old 01-04-2019, 07:25 PM   #9
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 14.2, SARPI
Posts: 320

Original Poster
Rep: Reputation: 30
zImage compiles, but make dep fails.

Code:
make: *** No rule to make target 'dep'.  Stop.
I never had to make dep with x86. The method seems to work otherwise, but it boots with the old kernel. I tried moving the old kernel out of /boot, but then it doesn't boot. The directions there seem to overlook how to get the bootloader to recognize the new kernel. It sounds like that's what make dep is for? When it's only the new one, I get this rainbow cloud screen.

Last edited by hedron; 01-04-2019 at 07:26 PM.
 
Old 01-04-2019, 07:36 PM   #10
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 985

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
@hedron

There is already an existing thread that describes the kernel build procedure for Raspberry Pi, to be found on the second page of the Slackware ARM sub-forum.
https://www.linuxquestions.org/quest...is-4175621155/
Note that you have two firmware entities, the firmware for the Raspberry Pi board, provided by Raspberry and treated separately and the usual kernel firmware collection released by the kernel folks.
Although I was interested myself in building the kernel, participated in that thread, I still haven't followed the kernel building procedure, because the audio engine (emulating the snd_bcm2835 sound card) from the Raspberry Firmware is broken since the middle of 2017 and I got stuck with the Raspberry official kernel&firmware that was released before, specifically, the ones extracted from 2017-04-10-raspbian-jessie-lite.img
https://downloads.raspberrypi.org/raspbian_lite/images/
Just for orientation, if you use the Raspberry official kernel&firmware, you'll have these files (excepting the /boot/overlays/ subfolder) in the /boot folder/partition :
Code:
 	bootcode.bin 	firmware
	fixup.dat 	firmware
	fixup_cd.dat 	firmware
	fixup_db.dat 	firmware
	fixup_x.dat 	firmware
	start.elf 	firmware
	start_cd.elf 	firmware
	start_db.elf 	firmware
	start_x.elf 	firmware

	kernel.img 	kernel
	kernel7.img 	kernel
There's also an official How-To from Raspberry about compiling the kernel, but it doesn't handle the firmware:
https://www.raspberrypi.org/document...el/building.md

Some additional details about the boot procedure, since you were looking after lilo.conf some posts above:
https://www.raspberrypi.org/document...es/bootflow.md
And here you have a nice schematic too:
https://raspberrypi.stackexchange.co...-boot-sequence
 
1 members found this post helpful.
Old 01-23-2019, 01:29 PM   #11
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 14.2, SARPI
Posts: 320

Original Poster
Rep: Reputation: 30
>Although you could just compile the vanilla kernel from Kernel.org, it will not have the necessary drivers and modules for the Broadcom SoC on the Raspberry Pi
So, I'm supposed to download the github kernel, compile that, then apply the patches? Because I've just been using the "vanilla" kernel. I've tried all that I can think, looking through the links and so on, but still the boot process stalls at the rainbow cloud.

Code:
COPYING.linux              bcm2835-rpi-zero.dtb
LICENCE.broadcom           bcm2836-rpi-2-b.dtb
README                     bcm2837-rpi-3-b-plus.dtb
README.boot                bcm2837-rpi-3-b.dtb
README.initrd              bcm2837-rpi-cm3-io3.dtb
System Volume Information  bootcode.bin
System.map                 cmdline.txt
bcm2708-rpi-0-w.dtb        config.txt
bcm2708-rpi-b-plus.dtb     fixup.dat
bcm2708-rpi-b.dtb          fixup_cd.dat
bcm2708-rpi-cm.dtb         fixup_db.dat
bcm2709-rpi-2-b.dtb        fixup_x.dat
bcm2710-rpi-3-b-plus.dtb   kernel7.img
bcm2710-rpi-3-b.dtb        overlays
bcm2710-rpi-cm3.dtb        start.elf
bcm2835-rpi-a-plus.dtb     start_cd.elf
bcm2835-rpi-a.dtb          start_db.elf
bcm2835-rpi-b-plus.dtb     start_x.elf
bcm2835-rpi-b-rev2.dtb     version-kernel_sarpi3.txt
bcm2835-rpi-b.dtb          version-sarpi3-boot.txt
bcm2835-rpi-cm1-io1.dtb    version-sarpi3-installer.txt
bcm2835-rpi-zero-w.dtb
That's the contents of /boot. Keep in mind that I have tried numerous different ways with initrc.gz, deleting everything, not using the dtb files, and things I don't remember.
 
Old 01-24-2019, 11:51 AM   #12
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 14.2, SARPI
Posts: 320

Original Poster
Rep: Reputation: 30
Ok, that was the problem. I was using the kernel from kernel.org, instead of github.
 
Old 02-02-2019, 03:29 AM   #13
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,574
Blog Entries: 2

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
solved?

maybe a nice roundup post and then [solved]?

FWIW:

the Rpi kernel build process is all but obvious and transparent IMHO, and a nice roundup would help quite a newbie.


Last edited by SCerovec; 02-02-2019 at 03:30 AM. Reason: typo
 
Old 02-04-2019, 03:14 PM   #14
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 985

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Quote:
Originally Posted by SCerovec View Post
solved?

maybe a nice roundup post and then [solved]?

FWIW:

the Rpi kernel build process is all but obvious and transparent IMHO, and a nice roundup would help quite a newbie.

The instructions from this thread are pretty much complete:
https://www.linuxquestions.org/quest...is-4175621155/
However, I guess I'll soon need to go through this on my own and will maybe write down a concise, step by step guide, as a post. But I'll need to do some Frankenstein work, building the latest kernel source against an older, unbroken, firmware. They broke the audio generation engine in the firmware some 2 years ago and it doesn't look like they are keen to repair it:
https://www.raspberrypi.org/forums/v...83629&start=50
Due to these recent patches I feel like my otherwise rock solid and well performing 4.4.50 kernel needs some urgent upgrade:
https://www.linuxquestions.org/quest...es-4175647337/
The firmware I'm running now is:
Code:
/opt/vc/bin/vcgencmd version
Apr  5 2017 11:49:52
Copyright (c) 2012 Broadcom
version 3ca4cf4a663c5351eaec08b29d50d6e8324981b4 (clean) (release)
And I'll need to clone the firmware used for building the 4.4.50 kernel:
https://github.com/raspberrypi/firmw...d4acb39e8d+174
https://github.com/raspberrypi/firmw...e16c0194a8e54b
I read in the Raspberry forum, that you can use an older firmware, hope it also works.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Kernel re-installing/compilling Panagiotis_IOA Slackware 6 02-09-2006 10:27 AM
Compilling a new kernel, System.map and modules mimithebrain Linux - General 2 10-22-2005 05:07 PM
compilling 2.6.7 kernel Help props666999 Linux - General 2 11-12-2004 08:15 PM
error after compilling kernel greklas Slackware 2 09-06-2004 01:53 PM
compilling kernel 2.4.18 gusgorman Linux - General 2 06-18-2002 03:54 AM

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

All times are GMT -5. The time now is 06:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration