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

http://blog.retep.org/2012/07/08/compiling-a-kernel-on-the-raspberry-pi/

http://blog.csdn.net/jinzheng_2010/article/details/8676213

http://tieba.baidu.com/p/3285267721?pid=57194282015&cid=0#57194282015

http://blog.csdn.net/embbnux/article/details/17394793

http://bbs.elecfans.com/forum.php?mod=viewthread&tid=455214&extra=

https://github.com/notro/fbtft

http://www.eeboard.com/bbs/thread-41500-1-1.html

编译内核的时候,.config文件最好从现成的板子上拷贝出来,这样就免去了自己选择配置menuconfig的麻烦,具体参见:

http://blog.csdn.net/jinzheng_2010/article/details/8676213

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

Kernel compiling for Pi 2的更多相关文章

  1. 在ubuntu上编译rasbian kernel(for raspberry pi 1)

    raspberry pi官网的编译手册写的简洁有力,照着操作即可 https://www.raspberrypi.org/documentation/linux/kernel/building.md ...

  2. How to emulate a Raspberry Pi on your PC

    How to emulate a Raspberry Pi on your PC I am very interested in trying simulators and emulators for ...

  3. How to: Compile Linux kernel 2.6

      Compiling custom kernel has its own advantages and disadvantages. However, new Linux user / admin ...

  4. How to compile and install Linux Kernel 5.1.2 from source code

    How to compile and install Linux Kernel 5.1.2 from source code Compiling a custom kernel has its adv ...

  5. Using MultiPath TCP to enhance home networks

    Over the last few months I’ve been playing with MultiPath TCP and in this post I will show how I use ...

  6. 从源码编译rpi的内核

    Kernel Building https://www.raspberrypi.org/documentation/linux/kernel/building.md There are two mai ...

  7. Unity基础—Computer Shader

    Computer Shader是什么? Computer shader是一段运行在GPU上的一段程序. 什么时候用Computer shader? 假如我们把一个cube当作单独的点,用许多个(cub ...

  8. Compiling a kernel module for the raspberry pi 2 via Ubuntu host

    Compiling a kernel module for the raspberry pi 2 via Ubuntu host Normally compiling a kernel module ...

  9. Raspberry Pi 3 --- Kernel Building and Run in A New Version Kernal

    ABSTRACT There are two main methods for building the kernel. You can build locally on a Raspberry Pi ...

随机推荐

  1. shipyard docker 管理平台

    终于把shipyard弄好了. 我也是根据shipyard的官方文档,做的.在刚开始的时候觉得好难,也遇到了困难,查看了好多文档 但做完之后发现,只需要几步就能简单的配置成功,就能运行了. 修改tcp ...

  2. Linux Shell脚本之自动修改IP

    作为一名Linux SA,日常运维中很多地方都会用到脚本,而服务器的ip一般采用静态ip或者MAC绑定,当然后者比较操作起来相对繁琐,而前者我们可以设置主机名.ip信息.网关等配置.修改成特定的主机名 ...

  3. Python 函数式编程学习

    描述:通过将函数作为参数,使得功能类似的函数实现可以整合到同一个函数. Before def getAdd(lst): result = 0 for item in lst: result += it ...

  4. [BUGFIX]__import_pywin32_system_module__

    import_pywin32_system_module 修复方法: 编辑 X:/Python27/Lib/site-packages/win32/lib/pywintypes.py 第114行 if ...

  5. task_struct

    Linux中task_struct用来控制管理进程,结构如下: struct task_struct { //说明了该进程是否可以执行,还是可中断等信息    volatile long state; ...

  6. POJ 2635 The Embarrassed Cryptographer 大数模

    题目: http://poj.org/problem?id=2635 利用同余模定理大数拆分取模,但是耗时,需要转化为高进制,这样位数少,循环少,这里转化为1000进制的,如果转化为10000进制,需 ...

  7. cocos2dx3.4 导出节点树到XML文件

    l利用cocostudio做UI和场景时,经常要去获取某个节点,cocostudio2.1开始加入了文件的概念,可以创建场景,节点,层等文件,把公用的东西创建到文件里,然后把这个文件拖到场景里使用,达 ...

  8. 除了判断语句if switch 我们还可以怎么做?-b

    之前项目中有根据后台数据执行不同代码,根据不同的字符串返回不同UIViewController对象,最开始需要的vc 种类不多我用的是if else 做字符串比较再执行不同代码,但是如果需求的vc 有 ...

  9. Dynamips做CCNA的实验,说是找不到telnet的解决方案

    01.如果你的系统是32位的系统. 控制面板-程序与功能-启动或关闭windows功能-开启telnet(重启计算机就可以用telnet了) 02.如果你的系统是64位的系统. (1)控制面板-程序与 ...

  10. python JSON处理

    概念 序列化(Serialization):将对象的状态信息转换为可以存储或可以通过网络传输的过程,传输的格式可以是JSON.XML等. 反序列化:就是从存储区域(JSON,XML)读取反序列化对象的 ...