[SOLVED] GCC 5.3.1 doesn't build a bootable kernel?
Slackware - ARMThis forum is for the discussion of Slackware ARM.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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
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. ;-)
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.
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?
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.