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. ie浏览器检测不到cookie的问题

    之前做项目由于客户的要求设置缓存必须由后台来设置必须使用cookie(session是没问题的),后期设置时出现了登录页面与首页来还跳转的局面.原因就是首页没检测到登录后的缓存,而后台验证到确实已经是 ...

  2. C#的常见算法(面试)(转)

    一.求以下表达式的值,写出您想到的一种或几种实现方法: 1-2+3-4+……+m //方法一,通过顺序规律写程序,同时也知道flag标志位的重要性. static int F1(int m) { ; ...

  3. Sql Server创建外键失败

    问题: 已成功保存“PPR_BasicInformation”表“PPR_PS”表- 无法创建关系“FK_PPR_PS_PPR_BasicInformation”. ALTER TABLE 语句与 F ...

  4. 【算法】Kruskal算法(解决最小生成树问题) 含代码实现

    Kruskal算法和Prim算法一样,都是求最小生成树问题的流行算法. 算法思想: Kruskal算法按照边的权值的顺序从小到大查看一遍,如果不产生圈或者重边,就把当前这条边加入到生成树中. 算法的正 ...

  5. 「JavaSE 重新出发」02.01 基本数据类型

    基本数据类型 1. 整型 注意:Java 没有任何无符号(unsigned)形式的 int.long.short 或 byte 类型. 不同进制的表示形式: 十六进制数值有一个前缀0x或0X(如0xC ...

  6. bat脚本启动exe并打开文件后退出 + 中文乱码

    写了个脚本用于复制模板到新的cpp文件. 将脚本路径加到环境变量里,只需在cmd窗口输入“new hdu 1419”,就会自动将模板拷贝到WORK_DIR下的hdu文件夹内一个名叫"1419 ...

  7. Debian9.5系统DNS服务器BIND软件配置说明

    DNS的出现的历史 网络出现的早期是使用IP地址通讯的,那时就几台主机通讯.但是随着接入网络主机的增多,这种数字标识的地址非常不便于记忆,UNIX上就出现了建立一个叫做hosts的文件(Linux和W ...

  8. javascript的var声明变量和不用var声明变量在全局作用域的区别;

    在全局作用域下,使用var定义的变量不可以delete,没有var 定义的变量可以delete.也就说明隐含全局变量严格来说不是真正的变量,而是全局对象的属性,因为属性可以通过delete删除,而变量 ...

  9. HTML一些标记

    4)a标签也可以转换样式为按钮 <a class="btn btn-primary" href="#" role="button"&g ...

  10. 三 概要模式 3) MR计数器计数 。无 reduce 计数

    计数器模式讲解:         先讲一下,就是说只用 Map 阶段  不需要 Reduce . 也就是说去掉了中间输出,而是Map 直接输出结果.大大提高了 MR 的效率且节省了 MR 中间输出读入 ...