1. RK3399 CPU arm64
2. Firefly内核git:
内核配置
[lake@lake-aliyun -sh-china linux-stable]$ ls -l arch/arm64/configs/rk*
-rw-r--r-- 1 Lake sys 10958 Mar 29 09:35 arch/arm64/configs/rk1808_linux_defconfig
-rw-r- -r-- 1 湖系统 6025 Mar 29 09:35 arch/arm64/configs/rk1808_x4_linux_defconfig
-rw-r--r-- 1 湖系统 7622 3 月 29 日 09:35 arch/arm64/configs/rk3308_linux_defconfig
-rw-r--r-- 1 湖系统 11418 3 月 29 日 09:35 arch/arm64/configs/rk3326_linux_defconfig
-rw-r--r-- 1 lake sys 9174 Mar 29 09:35 arch/arm64/configs/rk3326_linux_robot_defconfig
-rw-r--r-- 1 lake sys 4490 Mar 29 09:35 arch/arm64/configs/rk3399pro_npu_defconfig
-rw-r--r-- 1 Lake sys 11134 Mar 29 09:35 arch/arm64/configs/rk3399pro_npu_pcie_defconfig
[lake@lake-aliyun-sh-china linux-stable]$ ls -l arch/arm64/configs/firefly *
-rw-r--r-- 1 湖系统 16336 3 月 29 日 09:35 arch/arm64/configs/firefly_linux_defconfig
-rw-r--r-- 1 湖系统 14966 3 月 29 日 09:35 arch/arm64/configs/萤火虫-roc-rk3328-pc_defconfig
-rw-r--r-- 1 Lake sys 15859 Mar 29 09:35 arch/arm64/configs/firefly_roc-rk3399-pc_defconfig
3. 构建工具
3.1 CROSS_COMPILE gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux- gnu
[lake@lake-aliyun-sh-china linux-stable]$ echo $PATH
/home/lake/opt/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin:/usr/local/bin :/usr/bin:/usr/local/***in:/usr/***in:/home/lake/.local/bin:/home/lake/bin
3.2 : 内核构建工具
sudo yum install openssl-devel
sudo yum install lz4
4. Build
4.1 build kernel
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- firefly_linux_defconfig
4.2 build dtb ###
### kernel with rk3399-firefly dtb
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- rk3399-firefly-linux.img
### kernel with rk3399-firefly-aioc dtb
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- rk3399-firefly-aioc.img
[ lake@lake-aliyun-sh-china linux-stable]$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- rk3399-firefly-linux.img
CHK scripts/mod/devicetable-offsets.h
CHK include/config/kernel.发布
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/检查系统调用.sh
make[1]: `include/generated/vdso-offsets.h' 是最新的。
CHK include/generated/compile.h
LZ4C arch/arm64/boot/Image.lz4
镜像:kernel.img 准备好了
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/ utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-
offsets.h CALL scripts/checksyscalls.sh
make[2]: `include/generated/vdso-offsets.h ' 已是最新。
CHK scripts/mod/devicetable-offsets.h
构建模块,第 2 阶段
。MODPOST 1 模块
CC drivers/net/wireless/rockchip_wlan/rtl8188eu/8188eu.mod.o
LD [M] drivers/net/wireless/rockchip_wlan/rtl8188eu/8188eu.ko
DTC arch/arm64/boot/dts/rockchip/rk3399-firefly-linux。 dtb
打包到resource.img 成功!
图片:resource.img(带有 rk3399-firefly-linux.dtb logo.bmp)已准备好
图片:boot.img(带有 Image resource.img)已准备好
图片:zboot.img(带有 Image.lz4 resource.img)已准备好
[lake@lake-aliyun-sh-china linux-stable]$ ls -l *.img
-rw-r--r-- 1 Lake sys 22702080 Mar 29 14:38 boot.img
-rw-r--r- - 1 湖系统 22466580 3 月 29 日 14:37 kernel.img
-rw-r--r-- 1 湖系统 230912 3 月 29 日 14:38 resource.img
-rw-r--r-- 1 湖系统 11249664 14 年 3 月 29 日:38 zboot.img
注:boot.img = kernel.img + resource.img (DTB)
For rk3399-firefly-aioc/EC-A3399C
[lake@ lake- aliyun-sh-china linux-stable]$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- rk3399-firefly-aioc.img
CHK scripts/mod/devicetable-offsets.h
CHK include/config/kernel.release
CHK include/ generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-
offsets.h CALL scripts/checksyscalls.sh
make [1]: `include/generated/vdso-offsets.h' 是最新的。
CHK include/generated/compile.h
make[1]: `arch/arm64/boot/Image.lz4' 是最新的。
图片:kernel.img 已准备好
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/bounds.h
CHK include/generated/timeconst。 h
CHK include/generated/asm-
offsets.h CALL scripts/checksyscalls.sh
make[2]: `include/generated/vdso-offsets.h' 是最新的。
CHK scripts/mod/devicetable-offsets.h
构建模块,阶段 2.
MODPOST 0 modules
DTC arch/arm64/boot/dts/rockchip/rk3399-firefly-aioc.dtb
打包到resource.img 成功!
图片:resource.img(带有 rk3399-firefly-aioc.dtb logo.bmp)已准备好
图片:boot.img(带有图片 resource.img)已准备好
图片:zboot.img(带有 Image.lz4 资源.img)已准备好
5.下载
官方解压/AIO-3399C-UBUNTU18.04-GPT-20190304-1225.img
AndroidTool_Release_v2.54OutputAndroidImage参数
FIRMWARE_VER: 8.1
MACHINE_MODEL: RK3399
MACHINE_ID: 007
MANUFACTURER: RK3399
MAGIC: 0x50452
: 0x00200800
机器:3399
CHECK_MASK:0x80
PWR_HLD:0,0,A,0,1
类型:GPT
cmdline:mtdparts = rk29xxnand:0x00002000 @ 0x00004000(Uboot),0x00002000 @ 0x00006000(trust),0x00010000 @ 0x0000a000(boot),0x00010000 @ 0x0002a000(备份), - @ 0x0005a000(rootfs:grow)
uuid:rootfs = 614e0000-0000- 4b53-8000-1d28000054a9
### 远程 ssh/dd/下载新的 boot.img => mmcblk0p3
firefly@firefly:~$ partx /dev/mmcblk0
partx: 无法打开 /dev/mmcblk0: Permission denied
firefly@firefly:~$ sudo partx的/ dev / mmcblk0
NR START END SECTORS尺寸名称UUID
1 16384 24575 8192 4M的uboot 80690000-0000-4568-8000-5dea000057bf
2 24576 32767 8192 4M信任cd3a0000-0000-4c5e-8000-6be60000034f
3 40960 106495 65536 32M引导9f6a0000- 0000-4e20-8000-6722000046d3
4点172032 237567 65536 32M备份5f590000-0000-4116-8000-0c0500007733
5 368640 30535646 30167007 14.4克的rootfs 614e0000-0000-4b53-8000-1d28000054a9
萤火虫萤火虫@:〜$ LS
桌面文档下载音乐图片公共模板影片的boot.img来源.list
firefly@firefly:~$ dd if=./boot.img of=/dev/mmcblk0
mmcblk0 mmcblk0boot1 mmcblk0p2 mmcblk0p4 mmcblk0rpmb
mmcblk0boot0 mmcblk0p1 mmcblk0p3 mmcblk0p5
firefly@firefly:~$ dd if=./boot.img of=/dev/ mmcblk0p3
dd: 无法打开 '/dev/mmcblk0p3': Permission denied
firefly@firefly:~$ sudo dd if=./boot.img of=/dev/mmcblk0p3
44340+0 records in
44340+0 records out
复制了 22702080 字节(23 MB,22 MiB),1.78948 秒,12.7 MB/秒
firefly@firefly:~$