BPI-M3内核编译过程 - 炫Q香蕉派

BPI-M3内核编译过程

首先下载最新的ubuntu 16.04 x64的安装盘http://www.ubuntu.com/download/server
ubuntu-16.04-server-amd64.iso大小为686,817,280 字节
下载VirtualBox 5.0.20虚拟机https://www.virtualbox.org/wiki/Downloads
VirtualBox-5.0.20-106931-Win.exe大小为113,110,496 字节
Oracle_VM_VirtualBox_Extension_Pack-5.0.20-106931.vbox-extpack大小为16,421,439 字节

英文系统,主机名MikuQ,用户名bpi

18.jpg

打开ssh,首先用bpi登录,然后

sudo passwd

好啦可以开始了,

mkdir bpi
cd bpi
git clone https://github.com/BPI-SINOVOIP/BPI-M3-bsp.git

du -sh BPI-M3-bsp 竟然 2.1G

sudo apt-get install gcc-arm-linux-gnueabi
sudo apt-get install gcc-arm-linux-gnueabihf
sudo apt-get install build-essential libncurses5-dev u-boot-tools qemu-user-static debootstrap git binfmt-support libusb-1.0-0-dev pkg-config 
sudo apt-get install build-essential u-boot-tools binutils-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf-base g++-4.7-arm-linux-gnueabihf  
sudo apt-get install gcc-arm-linux-gnueabihf cpp-arm-linux-gnueabihf libusb-1.0-0 libusb-1.0-0-dev git wget fakeroot kernel-package  zlib1g-dev libncurses5-dev  
sudo apt-get install lib32stdc++6 lib32z1 lib32z1-dev

add from gitbook https://bananapi.gitbooks.io/bpi-m3/content/bpi-m3crosscompileteach.html

sudo apt-get install build-essential u-boot-tools binutils-arm-linux-gnueabihf gcc-4.7-arm-linux-gnueabihf-base g++-4.7-arm-linux-gnueabihf gcc-arm-linux-gnueabihf gcc-arm-linux-gnueabi cpp-arm-linux-gnueabihf libusb-1.0-0 libusb-1.0-0-dev git wget fakeroot kernel-package zlib1g-dev libncurses5-dev

接下来

cd BPI-M3-bsp
./build.sh

选择1 720P; 1 build all, 这次竟然历时50分钟

19.jpg

以下是摘录,正在尝试

cd download/BPI_M3_720P
sudo dd if=boot0_sdcard.fex  of=/dev/sdb bs=1k seek=8  
sudo dd if=u-boot.fex  of=/dev/sdb bs=1k seek=19096  
sudo dd if=sunxi_mbr.fex   of=/dev/sdb bs=1k seek=20480  
sudo dd if=boot-resource.fex   of=/dev/sdb bs=1k seek=36864  
sudo dd if=env.fex  of=/dev/sdb bs=1k seek=69632  
sudo dd if=boot.fex  of=/dev/sdb bs=1k seek=86016  

拷贝文件

cd lib/modules/
sudo mount /dev/sdb2 /mnt  
sudo cp 3.4.39-BPI-M3-Kernel/.  /mnt/lib/modules/3.4.39-BPI-M3-Kernel/  -r
umount /dev/sdb2
sudo eject /dev/sdb

以前是,server系统没有自动挂载

sudo cp 3.4.39-BPI-M3-Kernel/.  /media/u14/BPI_ROOT/lib/modules/3.4.39-BPI-M3-Kernel/  -r

传说中的配置文件,改了要重新编译的,BPI-M3-bsp/sunxi-pack/chips/sun8iw6p1/configs/BPI_M3_720P下的sys_config.fex文件,实测结果,启动成功
71.png

参考文献:http://forum.eepw.com.cn/thread/279199/1

标签: none

添加新评论