dspahn Guru
Joined: 22 Jun 2006 Posts: 392
|
Posted: Thu Nov 05, 2015 4:17 pm Post subject: RPi2B- kernel compiling? |
|
|
Hi,
I've compiled the kernel a few times in the past for this Raspberry Pi 2 B and had no problems. Every time in the past week I have compiled it, the device will not boot to the new kernel- I have everything from the perpetual rainbow screen to no display init at all. I usually gauge success by whether the network lights come on, since I mostly run headless. I have tried Gentoo sources, but they are way back at 3.10 and the git has Rpi2B sources at 4.1.12. Here is my most recent process:
Code: | raspoo01 ~ # mkdir /usr/local/src
raspoo01 ~ # mkdir /usr/local/src/rpi
raspoo01 ~ # cd /usr/local/src/rpi
raspoo01 rpi # git clone --depth 1 git://github.com/raspberrypi/firmware/
Cloning into 'firmware'...
remote: Counting objects: 4083, done.
remote: Compressing objects: 100% (2200/2200), done.
remote: Total 4083 (delta 1706), reused 2298 (delta 1582), pack-reused 0
Receiving objects: 100% (4083/4083), 75.54 MiB | 5.42 MiB/s, done.
Resolving deltas: 100% (1706/1706), done.
Checking connectivity... done.
Checking out files: 100% (3783/3783), done.
raspoo01 rpi # cp -r /firmware/boot/* /boot/
raspoo01 rpi # cp -r /firmware/modules /lib
raspoo01 rpi # git clone --depth 1 git://github.com/raspberrypi/linux/
Cloning into 'linux'...
remote: Counting objects: 52884, done.
remote: Compressing objects: 100% (50367/50367), done.
remote: Total 52884 (delta 4015), reused 17594 (delta 1846), pack-reused 0
Receiving objects: 100% (52884/52884), 142.67 MiB | 4.04 MiB/s, done.
Resolving deltas: 100% (4015/4015), done.
Checking connectivity... done.
Checking out files: 100% (49955/49955), done.
raspoo01 rpi # cd
firmware/ linux/
raspoo01 rpi # cd
firmware/ linux/
raspoo01 rpi # cd linux/
raspoo01 linux # make ARCH=arm bcmrpi_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
raspoo01 linux # make ARCH=arm menuconfig
HOSTCC scripts/kconfig/mconf.o
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTLD scripts/kconfig/mconf
scripts/kconfig/mconf Kconfig
configuration written to .config
*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.
raspoo01 linux # make ARCH=arm -j5 && make ARCH=arm modules_install && cp arch/arm/boot/zImage /boot/linux-4.12-raspi-dan+ |
After this, I edit config.txt and add as the first line :
Code: | kernel=linux-4.12-raspi-dan+ |
What I am trying to do is first get a stock default kernel to boot, then modify that config to remove obviously unneeded modules (for example, I will never need an Intel ethernet adapter on my RPi). Then I want to make sure my wireless adapter works, and possibly an external USB hard drive- I haven't gotten that far yet though... for now I am hung up on the kernel- Any glaring mistakes? Do I need to patch the git repo with a Gentoo patchset? I appreciate any suggestions. For futher reference, I am using this guide:
https://wiki.jmk.hu/wiki/Raspberry_Pi_Gentoo_Linux_Installation
If it helps, the kernel that works right now yields the following response to uname -a:
Code: | Linux raspoo01 4.1.10-v7+ #821 SMP PREEMPT Sat Oct 10 00:16:28 BST 2015 armv7l BCM2709 GNU/Linux |
|
|