荔枝派Nano 编译

参考网址:https://whycan.cn/t_3138.html

 

1.用的ydh的虚拟机

2.建一个lichi文件夹

3.先设置一下代理,不然卡死 注意只能当前终端用

git config --global http.proxy 192.168.11.105:1080  git  

export http_proxy=192.168.11.105:1080 wget 的http

export https_proxy=192.168.11.105:1080 wget 的https

 

 

 

4.获取交叉编译工具链 wget http://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz

放opt sudo -xvjf 解压掉

5.获取uboot git clone https://github.com/Lichee-Pi/u-boot.git -b nano-v2018.01  载入默认配置 make ARCH=arm licheepi_nano_defconfig

 安装库   sudo apt-get install libncurses5-dev libncursesw5-dev
            sudo apt-get install swig python-dev python3-dev

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4

 

6.

主线linux

git clone https://github.com/Icenowy/linux.git

或者只拉分支

git clone --depth=1 -b f1c100s-480272lcd-test https://github.com/Icenowy/linux.git

 

下载配置文件 http://dl.sipeed.com/LICHEE/Nano/SDK/config  放主目录 改成 .config

配置编译

make ARCH=arm menuconfig

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 #请自行修改编译线程数


7.build root

可参考

http://nano.lichee.pro/build_sys/rootfs.html

(1)获取buildroot源码
    wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
    tar xvf buildroot-2017.08.tar.gz
    cd buildroot-2017.08/

这里额外加一下

将.confg拷贝一下过去

 

 

 


(2) 配置bulidroot
    make menuconfig
    -----------------------------------------------
Target options  --->
    Target Architecture Variant (arm926t)  --->   // arm926ejs架构
    Enable VFP extension support                  // Nano 没有 VFP单元,勾选会导致某些应用无法运行
    Target ABI (EABI)  --->
    Floating point strategy (Soft float)  --->    // 软浮点

 

 

 

(3)编译
    make

这里 make menuconfig 和 make 出现了Makefile:182: *** output directory "" does not exist.  Stop 错误 

这里先将 buildroot 的权限改一下

sudo  chmod -R 777 

 

然后可能出现

Makefile:79: recipe for target '_all' failed

参考:http://www.voidcn.com/article/p-kubilmsa-bnx.html

内存不足? 尝试一下 mak -j1

 

build出来。。95m 蛋疼 重新下载一下.config 和 configin

 

posted @ 2020-06-02 17:22  XZHDJH  阅读(749)  评论(0)    收藏  举报