Kernel compiling for Pi 2

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=101188&p=807579&hilit=cross+compile+pi+source+code#p807579

by Seabug » Sat Feb 21, 2015 4:20 pm

Hi,

I am trying to compile the Raspbian kernel for my new Pi 2 ( I need support for ELO / Egalax Touch).
I can‘t find any hints how to configure the kernel sources / Makefile to generate me a kernel7.img
Anyone, who can help ?

Thanks, Steffen

Posts: 7
Joined: Sat Feb 21, 2015 3:55 pm

by n1ks » Sat Feb 21, 2015 10:06 pm

Steffen,

Hi, when compiling for the
RPI.v2 i used bcm2709_defconfig for the config instead of
bcmrpi_defconfig. Other than that, the steps are the same as compiling
for rpi.v1.
Once cross compile was complete i copied arch/arm/boot/Image (or zImage for a smaller kernel) to kernel7.img then copied it on to the sd card.

Hope that makes sense.

nik

Posts: 9
Joined: Sat Jan 24, 2015 8:51 pm

by Seabug » Sun Feb 22, 2015 1:25 pm

Thanks, Nik.
I got the kernel compiled now (build on the Pi 2 with the power of 4 processor kernels ).
Steffen

Posts: 7
Joined: Sat Feb 21, 2015 3:55 pm

by wyattwong » Sun Feb 22, 2015 3:01 pm

Seabug wrote:Thanks, Nik.
I got the kernel compiled now (build on the Pi 2 with the power of 4 processor kernels ).
Steffen

Can you provide the steps to compile the kernel and generate kernel.img and kernel7.img ? Maybe a simple tutorial ?

What‘s the difference between kernel.img and kernel7.img ?

Posts: 18
Joined: Fri Mar 15, 2013 3:18 pm
Location: Hong Kong

by Seabug » Mon Feb 23, 2015 12:27 pm

Actually I followed the instruction in the manual.
Since I was new to kernel compiling too, I made the assumption that the compiling generates both images, which is wrong.
The
difference is made by the .config file, which determins the
architecture. However, the make generates a compressed image and a
uncompressed image.
To generate a Pi2 Image, you can use bcm2709_defconfig instead of bcmrpi_defconfig to prepare your .config file.
After I used menuconfig to find and activate my modules.
It was quite time consuming, so I opened the .config with vi and just changed the entries for my elo and egalax touch.
The compiling worked fine. I had problems using the uncompressed kernel, but the zimage worked fine.
However, I still didn‘t get my touch-screens working, but this seems to bee a problem of the device aliases.
Still working on it.

Steffen

Posts: 7
Joined: Sat Feb 21, 2015 3:55 pm

by n1ks » Tue Feb 24, 2015 12:40 pm

If you run rpi-update you should find egalax
touchscreen module has now been added to the kernel. (Have tested on
vanilla Raspbian install using rpi v.2)

Cross-compile is no longer required.

You will however still need to calibrate the screen using xinput_calibrator.

nik

Posts: 9
Joined: Sat Jan 24, 2015 8:51 pm

by eriktheitalian » Tue Feb 24, 2015 12:47 pm

I‘m curious about BFS cpu scheduler patch. Is it effective or not ?

I cant using enough English language. My writings can be wrong grammer.$
"in micro$oft we not trust"

Posts: 355
Joined: Thu Feb 19, 2015 1:03 pm

by Seabug » Tue Feb 24, 2015 1:24 pm

n1ks wrote:If you run rpi-update you should find egalax touchscreen module has now been added to the kernel.
(Have tested on vanilla Raspbian install using rpi v.2)
Cross-compile is no longer required.
You will however still need to calibrate the screen using xinput_calibrator.

nik

Hi Nik,

I found some posts regarding the activated Egalax in the kernel config.
When I copied the sources, it was already activ in the config, but compiled kernels not yet available.
I am really looking forward to this. Anyway I still need ELO too, so I will have to compile my own kernel.
Compiling with make -j 6 is fast. I am to lazy to switch hard disks to Ubuntu in my PC and did not yet try to cross compile it under FreeBSD, even thought the ARM cross compiler is available under FreeBSD too. Maybe I will give it a try in the next days.
ELO/Penmount and Egal touch screens are quite cheap now and I see many Pi projects going on with it.
I actually plan to replace a ARM-Linux based PLC, which has touch support - but I don‘t need IO cards.
I will use remote IOs, so the Pi 2 is much more versatile, much faster and cheaper too.
I just could not yet find any help regarding the unrecognised Penmount touch.

Regards, Steffen

Update: I got it working
All touchscreens included, ELO, Egalax, Penmount.
Have some issues with xinput_calibration, values are in wrong order, but once you know, you can correct manually.
BTW: Compiling the kernel in exactly 2.5h

Posts: 7
Joined: Sat Feb 21, 2015 3:55 pm

by andrea.cane » Tue Aug 25, 2015 6:10 pm

Hello

is very interesting I‘m in the same situation, I have a LCD touchscrenn and would like to compile
a kernel with all drivers for supported touch because I do not know
what is the mine, but I can not find a guide that will explain step by
step clear how to fill the new kernel, you may share it with me and also with the group the steps or help you followed to be able to compile without error.

thanks in advance and good work

Posts: 3
Joined: Tue Jul 28, 2015 11:23 am

by Seabug » Wed Aug 26, 2015 8:24 am

Hi Andrea,

please take a look at my post
from February 23rd. I used vi (or any other editor) to modify the
.config file, rather than using the script. Currently I am in my Vietnam
office and I have not touchscreen here, but in around 10 days I will
return to Germany and compile a new kernel. I can send you the result or also the .config file for further modifications.

regards, Steffen

Posts: 7
Joined: Sat Feb 21, 2015 3:55 pm

by andrea.cane » Wed Aug 26, 2015 9:02 am

thanks
i am in the same situation that you
was in february, you talk to following the manual, which kind of manual
have you followed. i want to learn how compile the new kernels because in the future i will be able to replay and rebuild another to follow my different goals.
i can modify the file .config and add all driver for the touch screen with a command

mkdir ../kernel
make O=../kernel/ ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- bcmrpi_cutdown_defconfig
make O=../kernel/ ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- xconfig

after that, i can compile (20 minute) but i don‘t know what i have to do after.

best regard andrea

时间: 2024-12-18 22:44:28

Kernel compiling for Pi 2的相关文章

Linux Kernel Compiling

昨晚手贱,在ubuntu虚拟机里点了更新,结果更新了一晚上最后反倒进不去系统了. 博主几经百度无果,遂只好重装虚拟机,然后重新编译内核(第三次了%>_<%). 1. 从kernel.org上下 latest stable kernel 的压缩包:linux-4.0.tar.xz 2. 将压缩包复制到制定目录并解压: # sudo cp ./Downloads/linux-4.0.tar.xz /usr/src # cd /usr/src # sudo xz -d linux-4.0.tar.x

How to: Compile Linux kernel 2.6

  Compiling custom kernel has its own advantages and disadvantages. However, new Linux user / admin find it difficult to compile Linux kernel. Compiling kernel needs to understand few things and then just type couple of commands. This step by step ho

从源码编译rpi的内核

Kernel Building https://www.raspberrypi.org/documentation/linux/kernel/building.md There are two main methods for building the kernel. You can build locally on a Raspberry Pi which will take a long time; or you can cross-compile, which is much quicke

Raspberry Pi Kernel Compilation 内核编译官方文档

elinux.org/Raspberry_Pi_Kernel_Compilation#Use_the_provided_compiler Software & Distributions: Software - an overview. Distributions - operating systems and development environments for the Raspberry Pi. Kernel Compilation - advice on compiling a ker

Raspberry Pi 2 Raspbian kernel compile and install

$ git clone --depth=1 https://github.com/raspberrypi/linux $ cd linux$ KERNEL=kernel7$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs$ lsblk $ mkdir /mnt/fat32

香蕉派 banana pi github 最新Linux 代码升级到kernel 4.2.

https://github.com/BPI-SINOVOIP/BPI-Mainline-kernel ,以后4.2的内核将作为香蕉派开源硬件的稳定支持版本.现在已经在解决了WIFI兼容性问题,有兴趣的开发者可以自行下载编译自己的镜像

RASPBERRY PI 外设学习资源

参考: http://www.siongboon.com/projects/2013-07-08_raspberry_pi/index.html Raspberry Pi         Get started with Raspberry Pi (RPi), a step by step approach to get your Raspberry Pi with low level electronics hardware control. Make simple, step by step

Raspberry pi,一个好玩的派:第五季 无线网卡

Raspberry pi的板子由于成本原因是没有加无线模块的,不想被网线束缚的我们,需要自备USB无线模块.在购买板子时,看见官方推荐EDUP无线网卡,价格还算合适,就直接入手了. 采用REALTEK8188芯片,802.11n,传输速度150Mbps,适用范围130平方米. 将其插到任一U口即可,如下图: 由于外壳阻碍了电源插孔,所以只好先裸着了,图中已经加电,HDMI的另一头是电视机. 接下来的任务就是如何让这个无线网卡工作,连接到我已经开启的无线路由器. 一.wpa_gui 在进入Rasp

Raspberry Pi 3 with Openwrt

https://wiki.openwrt.org/toh/raspberry_pi_foundation/raspberry_pi#boot_log_raspberry_pi_3 Table of Contents Supported Versions Hardware Specifications Raspberry Pi SoCs Raspberry Pi Models Using I2C and SPI Power Notes Serial Boot Logs Boot Log (Rasp