User Tools

Site Tools


f1c_mainline

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
f1c_mainline [2020/09/06 00:23] – [编译] mangogeekf1c_mainline [2025/10/14 06:22] (current) – external edit 127.0.0.1
Line 1: Line 1:
- +=====Buildroot编译=====
-===== Buildroot on Tiny200支持情况 ===== +
- +
-<WRAP group> +
-<WRAP half column> +
-====正常工作(已验证) ==== +
-=== 启动项: === +
-  * SPI NOR Flash (W25Qxx..) +
-  * SPI NAND Flash (GD5F1GQ4UAxxG..) +
-  * MMC 0 (4-bit TF卡或芯片) +
-  * MMC 1 (1-bit TF芯片,雷龙) +
-=== U-Boot: === +
-  * Basic LCD +
-  * GPIO Backlight +
-  * USB Peripheral +
-  * MTD Devices +
-=== Linux:=== +
-  * Simple Peripheral: GPIO, SPI, UART, IIC, SDIO, PWM +
-  * DMA Controller +
-  * Audio Codec: Playback, Mic-IN +
-  * USB: Peripheral Mode, Host Mode +
-  * DVP Camera: OV2640, OV5640 +
-  * Display Engine: Frontend, Backend, TCON +
-</WRAP> +
-<WRAP half column> +
-==== 应该正常工作但是没有经过测试==== +
-U-Boot 驱动: +
-  * PWM Backlight +
-Linux 驱动: +
-  * Audio Codec: FM-IN, Line-IN +
-  * USB: OTG Mode +
-  * IR Receiver +
-  * Keypad ADC +
-==== 正在开发中且部分功能可用==== +
-Linux 驱动: +
-  * TV(CVBS) Encoder +
-  * Touchscreen Sensor +
-  * Cedar Video Engine +
-====暂无计划支持==== +
-下方和其他没有提到的外设 +
-Linux 驱动: +
-  * TV(CVBS) Decoder +
-  * Digital Audio +
-  * DE-interlace +
-  * RSB Bus +
-  * OWA Bus +
-</WRAP> +
-</WRAP> +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
-=====准备环境===== +
-===编译系统==+
-Ubuntu 16~18 32/64位的真机或者虚拟机(不建议使用WSL,灵异问题较多)皆可已,尽量不要用root账户编译,先安装依赖: \\ +
-  sudo apt install wget unzip build-essential git bc swig libncurses5-dev libpython3-dev libssl-dev pkg-config zlib1g-dev libusb-dev libusb-1.0-0-dev python3-pip +
-   +
-下载主线代码至用户文件夹:  \\ +
-不建议下载zip方式,因为以后还需要用git pull拉代码更新。建议点star和watch,代码有更新可随时收到邮件提醒。  +
-  cd ~/ +
-  git clone https://github.com/aodzip/buildroot-tiny200 +
-  如果太慢就试用如下镜像地址 +
-  git clone https://github.com.cnpmjs.org/aodzip/buildroot-tiny200 +
-   +
- +
- +
-===加速编译,单独下载dl文件夹=== +
-到群662381849共享里下载“buildroot-dl.zip”,然后解压后,将文件夹改名为"dl"放到buildroot-tiny200/下 +
-{{ ::20200905153521.jpg? }}+
  
 =====编译===== =====编译=====
-注意:make -j4是多线程编译方式,后边的数字代表你的计算机内核线程数。 +cd到源码目录,然后调用defconfig,比如我这里源码目录是mpi-r 
-  cd buildroot-tiny200/ +  cd ~/mpi-r/ 
-  make widora_tiny200_defconfig+现在源码里做了三个defconfig,存放在源码的configs文件夹下,分别是widora_mangopi_r1_defconfig  widora_mangopi_r2_defconfig  widora_mangopi_r3_defconfig。 
 +  make widora_mangopi_r3_defconfig 
 +make -j4是多线程编译方式,后边的数字代表你的计算机内核线程数。
   make -j4   make -j4
    
 +
 编译完后,输出文件在 output/images/下: 编译完后,输出文件在 output/images/下:
-{{ ::20200906080232.jpg? |}}+  widora@Ubuntu:~/mpi-r$ ls output/images/*.img 
 +  output/images/sysimage-nand.img  output/images/sysimage-nor.img  output/images/sysimage-sdcard.img
  
 +<wrap hi>注意:</wrap>默认[[https://github.com/aodzip/buildroot-tiny200/blob/master/board/widora/mangopi/r3/devicetree/linux/devicetree.dts|dts]]编译出来的是nor版本,如需要nand版本,需要在55行后边加disabled
 +  55        spi-max-frequency = <50000000>;
 +  56        status = "disabled";
      
 +同时再将93行的注释掉
 +  93        //status = "disabled";
 +
 +<wrap hi>此修改方法在20210209之前有效,接下来代码库会有个大的更新</wrap>
 =====常用操作===== =====常用操作=====
-虽然做好了defconfig但也可以通过make menuconfig配置更多的软件包 +===修改dts后如何编译生效=== 
-  make menuconfig +  rm ./output/images/*.dtb 
-   +  make linux-clean-for-rebuild 
-  Target options  --->选择目标板架构特性。 +  make linux -j8 
-  Build options  --->配置编译选项。 +  make
-  Toolchain  ---> 配置交叉工具链,使用buildroot工具链还是外部提供。 +
-  System configuration  ---> +
-  Kernel  ---> +
-  Target packages  ---> +
-  Filesystem images  ---> +
-  Bootloaders  ---> +
-  Host utilities  ---> +
-  Legacy config options  ---> +
-进入这个界面后,可以用“/”直接搜索想要的软件包。+
  
-所有被支持的make命令可以通过make help打印出来,常用的几个如下+ 
 + 
 + 
 +===配置菜单=== 
 +所有被支持的make命令可以通过make help打印出来:
   make clean   (清理编译输出文件)   make clean   (清理编译输出文件)
   make distclean   (不仅清理编译输出,还清理dl目录以及config文件,慎用)   make distclean   (不仅清理编译输出,还清理dl目录以及config文件,慎用)
Line 109: Line 41:
   make uboot-menuconfig (uboot软件包配置)   make uboot-menuconfig (uboot软件包配置)
   make linux-menuconfig (linux软件包配置)   make linux-menuconfig (linux软件包配置)
-   +  make -j4  (4线程编译)
- +
  
-===== 问题 ===== 
-一般这个步骤不会碰到什么问题,请到 sns.widora.io 论坛发帖交流 
  
f1c_mainline.1599351799.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki