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


    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
  • 相关阅读:
    python基础--选择排序
    python基础--冒泡排序
    python基础----以面向对象的思想编写游戏技能系统
    python基础知识整理
    输入一个整数n,输出该整数中重复的数字,如果没有重复出现的数字则输出no repeat number!
    输入今天以前一个日期,算离今天的天数
    有1020个西瓜,第一天卖一半多两个,以后每天卖剩下的一半多两个,问几天以后能卖完?
    筛选法求素数
    冒泡、选择、插入、二分插入、希尔排序、快排、二分查找、去掉重复值
    n进制转m进制
  • 原文地址:https://www.cnblogs.com/PhoenixMY/p/5281296.html
Copyright © 2020-2023  润新知