raspberry pi官网的编译手册写的简洁有力,照着操作即可

https://www.raspberrypi.org/documentation/linux/kernel/building.md

CROSS-COMPILING

First you are going to require a suitable Linux cross-compilation host. We tend to use Ubuntu; since Raspbian is also a Debian distribution it means using similar command lines and so on.

You can either do this using VirtualBox (or VMWare) on Windows, or install it directly onto your computer. For reference you can follow instructions online at Wikihow.
INSTALL TOOLCHAIN Use the following command: git clone https://github.com/raspberrypi/tools You can then copy the toolchain to a common location such as/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian, and add/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin to your $PATH in the .bashrc in your home directory. For 64-bit host systems, use /tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin. While this step is not strictly necessary, it does make it easier for later command lines!
GET SOURCES To get the sources, refer to the original GitHub repository for the various branches. $ git clone --depth=1 https://github.com/raspberrypi/linux BUILD SOURCES To build the sources for cross-compilation there may be extra dependencies beyond those you've installed by default with Ubuntu. If you find you need other things please submit a pull request to change the documentation. Enter the following commands to build the sources and Device Tree files. For Pi 1 or Compute Module: cd linux
KERNEL=kernel
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig For Pi 2/3: cd linux
KERNEL=kernel7
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig Then for both: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs Note: To speed up compilation on multiprocessor systems, and get some improvement on single processor ones, use -j n where n is number of processors * 1.5. Alternatively, feel free to experiment and see what works!

中间碰到了一点小麻烦:

arm-linux-gnueabihf-gcc: error while loading shared libraries:
libstdc++.so.6: cannot open shared object file: No such file or directory

解决方案也不难:

sudo apt-get install libc6-i386 lib32z1 lib32stdc++6

在ubuntu上编译rasbian kernel(for raspberry pi 1)的更多相关文章

  1. 在ubuntu上编译chrome

    在ubuntu上编译chrome 在ubuntu上编译chrome 红心地瓜 1.获取代码 1)下载tarball,http://chromium-browser-source.commondatas ...

  2. 【转】Ubuntu 上编译Android出现cannot find -lstdc++解决办法

    [转]Ubuntu 上编译Android出现cannot find -lstdc++解决办法 在Ubuntu 12.04 x86_64机器上编译Android出现下面错误,是因为找不到32bit的li ...

  3. (原)ubuntu上编译PANet/Detectron.pytorch时-std=c99的错误

    转载请注明出处: https://www.cnblogs.com/darkknightzh/p/10494787.html 在ubuntu上编译PANet/Detectron.pytorch时,总提示 ...

  4. .NET跨平台:在Linux Ubuntu上编译coreclr/corefx/dnx(20150617)

    编译时间:北京2015年6月17日上午 操作系统:Ubuntu 14.04.2 LTS Mono版本:Mono JIT compiler version 4.3.0 (master/3445ac5 T ...

  5. Qt+MPlayer音乐播放器开发笔记(一):ubuntu上编译MPlayer以及Demo演示

    前言   在ubuntu上实现MPlayer播放器播放音乐.   Demo                Mplayer   MPlayer是一款开源多媒体播放器,以GNU通用公共许可证发布.此款软件 ...

  6. 在Linux Ubuntu上编译DNX

    DNX是.NET Execution Environment,前身是XRE,XRE的前身是KRuntime,项目网址:https://github.com/aspnet/DNX . 签出DNX的代码: ...

  7. Ubuntu 上编译opencv_contrib模块for Android

    https://blog.csdn.net/ipfpm/article/details/81132144 [ubuntu]Ubuntu中Android SDK下载跟配置 android24的版本 (1 ...

  8. 在64位Ubuntu上编译32位程序常见错误

    问       题1: 找不到头文件 asm/errno.h 解决办法 : [/usr/lib/gcc$ ]sudo ln -s x86_64-linux-gnu/asm asm 问题2:找不到gcc ...

  9. 在Windows7和Ubuntu上编译安装MICO

    MICO是CORBA标准的一个实现.开源并且被广泛使用. 首先的首先,看用户手册,在页面"http://www.mico.org/docu.html"找到一本教材"MIC ...

随机推荐

  1. Java基础——protected访问修饰符探讨

    Java基础——protected访问修饰符探讨 根据官方说法:(如图) protected修饰符是可以修饰其他包中的子孙类的,但是我做了个实验,结果发现了一个有趣的现象! 具体请往下看: packa ...

  2. dev c++与VC assist的杂记

    最近要处理一些数据,于是把旧本拿出来用用.但是发现旧本运行速度很慢. 分析之后发现是瑞星的老版本程序里面加了游戏的云存储节点的注册表键.果断把该键删了之后,CPU使用率从66%以上降到24%左右. 然 ...

  3. 如何解决bib的一些问题

    胡老师留的大作业要求综述,因而有很多文献引用.但是当使用bibtex的方法,特别是中文文献的引用会遇到一些问题. 网上相关的解答有: http://blog.sciencenet.cn/blog-10 ...

  4. Servlet学习(三)——实例:用户登录并记录登陆次数

    1.前提:在Mysql数据库下建立数据库web13,在web13下创建一张表user,插入几条数据如下: 2.创建HTML文件,命名为login,作为登录界面(以post方式提交) <!DOCT ...

  5. Android程序能够构建和运行,但是报以下报错,为什么?

    安卓程序写完之后能够构建和运行,但是会报以下的错误.不知道原因为何?求大神解答. 网上说的是混淆编译的原因,不过程序没有开启混淆编译. Error:warning: Ignoring InnerCla ...

  6. 【原创】关于not in的一些事情

    早上到公司,收到一条cocall消息,是某哥们遇到的疑惑,可能很多新手并不知情: 请教个问题 我执行 . select * from t_htgl_htpswj t where t.c_wjmc = ...

  7. CSS3———linear-gradient() 线性渐变

    线性渐变linear-gradient() 遇到了这样的css样式 body { height: 100%; background-color: #ffffff; background-image: ...

  8. Node_进阶_8

    Node进阶第八天 一.复习 Node.js特点:单线程.异步I/O(非阻塞I/O).事件驱动(事件环). 适合的程序:就是没有太多的计算,I/O比较多的业务. 举例:留言本.考试系统.说说.图片裁切 ...

  9. BZOJ 4896 [Thusc2016]补退选 (Trie树维护vector)

    题目大意:略 这竟然是$thusc$的题... 先把询问里加入的串全拎出来,建出$Trie$树,$Trie$里每个节点都开一个$vector$记录操作标号,再记录操作数量$sum$ 然后瞎**搞搞就行 ...

  10. ajaxFileUpload 返回的数据报错

    $.ajaxFileUpload({ url : '/updateMallGoods', data : { "goodsName":goodsName, "proDesc ...