LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-10-2016, 02:21 PM   #1
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 431

Rep: Reputation: Disabled
GCC 5.3.1 doesn't build a bootable kernel?


Running Slackware ARM on RPi2, using the latest GCC from -current. I haven't been able to boot anything but stock firmware from the raspberrypi repo on github.com. Even if I use all the default configuration for the RPi2 (but marked as a local build so working modules don't get clobbered), the build completes, I can install the kernel modules, install the kernel7.img, but rebooting only gets to the color splash. Not even any error messages on the serial port.

Is it just me, or is there some conflict between GCC 5.3.1 and the kernel code for the Raspberry Pi?

(edit: fixed gcc version)

Last edited by gus3; 05-10-2016 at 02:49 PM.
 
Old 05-10-2016, 04:14 PM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 1,048

Rep: Reputation: 853Reputation: 853Reputation: 853Reputation: 853Reputation: 853Reputation: 853Reputation: 853
Quote:
Originally Posted by gus3 View Post
Running Slackware ARM on RPi2, using the latest GCC from -current. I haven't been able to boot anything but stock firmware from the raspberrypi repo on github.com. Even if I use all the default configuration for the RPi2 (but marked as a local build so working modules don't get clobbered), the build completes, I can install the kernel modules, install the kernel7.img, but rebooting only gets to the color splash. Not even any error messages on the serial port.

Is it just me, or is there some conflict between GCC 5.3.1 and the kernel code for the Raspberry Pi?
Unlikely to be to do with the compiler given that it's built the official Kernels in the tree.
It might be because your Kernel is too large or you didn't include the serial console report into the Kernel.

Code:
 > Device Drivers > Character devices > Serial drivers
   Serial drivers[*] Serial port on Open Firmware platform bus
That's where I look if the console goes missing, as it has on several occasions when moving between major Kernel versions.
 
Old 05-11-2016, 10:05 AM   #3
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 431

Original Poster
Rep: Reputation: Disabled
The default configuration builds that into the kernel (CONFIG_SERIAL_OF_PLATFORM=y). But even with that, I get no sign of a live, running kernel several minutes later. No flickering to show MMC activity, no response to a network ping, no response to CapsLock or NumLock on the keyboard. Nothing. The kernel never actually started.
 
Old 05-11-2016, 11:14 AM   #4
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 1,048

Rep: Reputation: 853Reputation: 853Reputation: 853Reputation: 853Reputation: 853Reputation: 853Reputation: 853
Quote:
Originally Posted by gus3 View Post
The default configuration builds that into the kernel (CONFIG_SERIAL_OF_PLATFORM=y). But even with that, I get no sign of a live, running kernel several minutes later. No flickering to show MMC activity, no response to a network ping, no response to CapsLock or NumLock on the keyboard. Nothing. The kernel never actually started.
Yes this is one of the most challenging aspects of working with ARM. I spent so many hours with this sort of crap.
It could also be a misconfiguration with the boot loader - not enough RAM allocated for the Kernel, perhaps.
On some occasions I'd pull the Fedora or Debian kernel config for a similar Kernel release and try building theirs just for a sanity check, then work out the differences between Kernel config options and whittle it down until I found the differences that mattered.
 
1 members found this post helpful.
Old 05-16-2016, 12:26 PM   #5
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 264

Rep: Reputation: 74
Quote:
Originally Posted by gus3 View Post
No flickering to show MMC activity, no response to a network ping, no response to CapsLock or NumLock on the keyboard. Nothing. The kernel never actually started.
So if you're seeing the RPi2 hang on the rainbow splash screen at least you know the bootloader is working as intended, which indicates the firmware is good. You need to be booting the kernel7.img (and not the kernel.img) for the RPi2. Most of the time when it's hanging on the rainbow splash screen for me is because I'm trying to boot the wrong kernel. Either that or I've completely fudged the kernel config before building. I *always* make sure I've got the latest boot-firmware installed and all the latest Slackware ARM packages before compiling, just for good measure.

When I build a RPi2/3 kernel using the Github RPi source, I start off with 'make bcm2709_defconfig' and then I usually 'make menuconfig' and set CONFIG_CMDLINE="dwc_otg.lpm_enable=0 console=tty1 nofont root=/dev/mmcblk0p3 rootfstype=ext4 rootwait ro" without any other modifications to the default settings. After that I just compile it.

And what Mozes advises...

Quote:
Originally Posted by drmozes View Post
On some occasions I'd pull the Fedora or Debian kernel config for a similar Kernel release and try building theirs just for a sanity check, then work out the differences between Kernel config options and whittle it down until I found the differences that mattered.
Ah, this is a great tip! I've done this quite a few times but mainly out of curiosity more than education and/or desperation.

<edit> I am going to do a test-build of the SARPi3 installer using -current. Will let you know the results. ;-)

Last edited by Penthux; 05-16-2016 at 12:28 PM.
 
Old 05-21-2016, 05:22 PM   #6
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 431

Original Poster
Rep: Reputation: Disabled
Penthux, yes to "kernel7.img" and yes to the command-line, although I'm using /boot/cmdline.txt instead of embedding it in the kernel config. The firmware is from the GitHub raspberrypi repo, about ten days ago or so.
 
Old 05-22-2016, 02:03 AM   #7
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 264

Rep: Reputation: 74
Quote:
Originally Posted by gus3 View Post
Penthux, yes to "kernel7.img" and yes to the command-line, although I'm using /boot/cmdline.txt instead of embedding it in the kernel config. The firmware is from the GitHub raspberrypi repo, about ten days ago or so.
Then perhaps try setting CONFIG_CMDLINE (under boot options in the kernel config) as well?
 
Old 05-24-2016, 11:43 AM   #8
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 431

Original Poster
Rep: Reputation: Disabled
It's already in CONFIG_CMDLINE, just over-ridden by config.txt. So I tried booting my kernel7.img with no config.txt. Same results.

No wonder drmozes wants his life back.
 
Old 05-30-2016, 03:47 AM   #9
OldHolborn
Member
 
Registered: Jul 2012
Posts: 193

Rep: Reputation: 159Reputation: 159
Similar problem, not being able to boot a homebuilt v7 kernel

Updating the firmware to the latest from git however has fixed it.

Now running 4.4.11+ from a cutdown version of bcm2709_defconfig

Last edited by OldHolborn; 05-30-2016 at 03:49 AM.
 
Old 05-31-2016, 12:29 PM   #10
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 431

Original Poster
Rep: Reputation: Disabled
Is it a custom configuration? Oh, and did you build it on your RPi, or did you use a cross-compiler on a PC?
 
Old 05-31-2016, 01:22 PM   #11
OldHolborn
Member
 
Registered: Jul 2012
Posts: 193

Rep: Reputation: 159Reputation: 159
Initially couldn't buid a booting V7 kernel same as you.

After upgrading the firmware I tried with bcm2709_defconfig as is, ie, with all the modules etc you are never likely to need. When this worked I then slimmed down that config closer to what I want, it too works.

All this was done on the Rpi2 itself.

Unfortunately I don't know what was the fix, just that it is fixed!
 
Old 06-07-2016, 01:36 PM   #12
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware (x86 and ARM)
Posts: 431

Original Poster
Rep: Reputation: Disabled
Updating the firmware seems to have resolved the issue. I built, installed, and booted a Linux kernel using the bcm2709 defconfig.

Marking as "solved."
 
  


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
build-essential's gcc often different to what kernel was compiled with urentity Debian 4 07-21-2009 04:03 PM
Build kernel with GCC, errors? newtovanilla Linux - Newbie 19 05-05-2008 03:17 PM
kernel build problems -how to install older gcc version? kpachopoulos Fedora 3 07-04-2005 08:56 AM
kernel build from gcc 3.3.2 to gcc 3.4.1 alcarbone Linux - Software 1 09-13-2004 08:19 AM

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

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