
rk3328调试
u-boot
Linux内核
根文件系统

book@100ask:~$ git clone https://git.dev.tencent.com/codebug8/repo.git book@100ask:~$ mkdir -p 100ask_firefly-rk3288 && cd 100ask_firefly-rk3288 book@100ask:~/100ask_firefly-rk3288$ ../repo/repo init -u https://dev.tencent.com/u/weidongshan/p/manifests/git -b linux-sdk -m rk3288/firefly-rk3288_linux_release.xml --no-repo-verify book@100ask:~/100ask_firefly-rk3288$ ../repo/repo sync -j4
永久生效 如需永久修改,请修改用户配置文件, Ubuntu系统下,修改如下: vim ~/.bashrc 在行尾添加或修改: export ARCH=arm export CROSS_COMPILE=arm-linux-gnueabihf- export PATH=$PATH:/home/book/100ask_firefly-rk3288/ToolChain/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin
准备
请参考Ubuntu环境配置以安装TFTP NFS服务. 设置以下参数uboot dhcp,以允许系统通过网络安装方法启动以方便调试.
假定TFTP目录为/ home / book / tftpboot,假定NFS目录为/ home / book / nfs_rootfs

注: 以下操作将破坏SD卡数据. 请先备份.
编译Firefly-rk3288开发板uboot命令 book@100ask:~$ cd ~/100ask_firefly-rk3288/uboot2017.09 book@100ask: ~/100ask_firefly-rk3288/uboot2017.09 $ make distclean book@100ask: ~/100ask_firefly-rk3288/uboot2017.09 $ make 100ask_firefly-rk3288_defconfig book@100ask: ~/100ask_firefly-rk3288/uboot2017.09 $ make book@100ask: ~/100ask_firefly-rk3288/uboot2017.09 $ ./make.sh trust book@100ask: ~/100ask_firefly-rk3288/uboot2017.09 $ ./make.sh uboot book@100ask: ~/100ask_firefly-rk3288/uboot2017.09 $ ./make.sh loader
准备
请参考Ubuntu环境配置以安装TFTP NFS服务. 设置以下参数,以允许系统通过网络安装方法启动以方便调试.

假定TFTP目录为/ home / book / tftpboot,假定NFS目录为/ home / book / nfs_rootfs
编译Firefly-rk3288开发板内核 book@100ask:~/100ask_firefly-rk3288$ cd linux-kernel book@100ask:~/100ask_firefly-rk3288/linux-4.4$ make mrproper book@100ask:~/100ask_firefly-rk3288/linux-4.4$ make 100ask_firefly-rk3288_defconfig book@100ask:~/100ask_firefly-rk3288/linux-4.4$ make zImage book@100ask:~/100ask_firefly-rk3288/linux-4.4$ make dtbs 编译内核模块 book@100ask:~/100ask_firefly-rk3288/linux-4.4$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules 安装内核模块到nfs根文件系统 book@100ask:~/100ask_firefly-rk3288/linux-4.4$ sudo make ARCH=arm INSTALL_MOD_PATH=/media/rootfs modules_install uboot通过tftp方式下载内核
将编译后的zImage文件和设备树rk3288-firefly.dtb复制到ubuntu的/ home / book / tftpboot目录中,
Uboot可以通过tftp下载并启动系统.

编译根文件系统
准备
请参考Ubuntu环境配置以安装TFTP NFS服务. 设置以下参数uboot dhcp,以允许系统通过网络安装方法启动以方便调试.
假定TFTP目录为/ home / book / tftpboot,假定NFS目录为/ home / book / nfs_rootfs
文件系统特征 配置文件 含义 100ask_firefly-rk3288_defconfig 文件系统版本(再默认版本支持了qt) 编译步骤 book@100ask:~/100ask_firefly-rk3288$ cd buildroot2018.02 book@100ask:~/100ask_firefly-rk3288/buildroot2018.02$ make clean book@100ask:~/100ask_firefly-rk3288/buildroot2018.02$ make 100ask_firefly-rk3288_defconfig book@100ask:~/100ask_firefly-rk3288/buildroot2018.02$ make menuconfig book@100ask:~/100ask_firefly-rk3288/buildroot2018.02$ make all 注意:机器性能不同,编译时间不同。性能差的电脑,有可能需要等待1 ~ 2个小时。 编译后生成文件介绍 buildroot2018.02 ├── output ├── images ├── idbloader.img <--u-boot镜像 ├── nfs_rootfs <--打包并压缩的根文件系统,适用于NFSROOT启动 │ └── rootfs.tar.gz ├── rk3288-firefly.dtb <--设备树文件 ├── rootfs.ext2 ├── rootfs.ext4 -> rootfs.ext2 <--ext2格式根文件系统 ├── rootfs.tar <--打包后的根文件系统 ├── sdcard.img <--完整的SD卡系统镜像 ├── trust.img <--u-boot镜像 ├── u-boot.bin ├── u-boot-dtb.img ├── uboot.img <--u-boot镜像 └── zImage <--内核镜像 buildroot详细的使用介绍请参考Buildroot 解压文件系统nfs目录 把使用buildroot构建得到的根文件系统nfs_rootfs/rootfs.tar.gz,复制、解压到ubuntu的/etc/exports文件中指定的目录里,即复制到/home/book目录下,得到/home/book/nfs_rootfs下众多文件: book@100ask:~/100ask_firefly-rk3288/buildroot2018.02/output/images$ cp -rf nfs_rootfs/ ~ book@100ask:~/100ask_firefly-rk3288/buildroot2018.02/output/images$ cd ~/nfs_rootfs book@100ask:~/nfs_rootfs$ sudo tar -zxvf rootfs.tar.gz
1. 按空格键进入uboot命令行并设置ip
=> setenv ipaddr 192.168.1.112 => setenv serverip 192.168.1.132 => setenv bootcmd 'tftpboot 0x01f00000 rk3288-firefly.dtb; tftpboot 0x02000000 zImage;bootz 0x02000000 - 0x01f00000' => setenv bootargs 'root=/dev/nfs nfsroot=192.168.124.31:/home/book/nfs_rootfs,vers=3 rw ip=dhcp'
=> saveenv
这将每次自动下载内核并挂载nfs文件系统.
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-145187-1.html
如果是包装漏气了
最爱的女神和最爱的男神配戏啦