[Study notes] began compiling the AIO-3399J

Author

Author: Lu Dongdong
mail: [email protected]

platform

System: Ubuntu 16.04 64bit
board: AIO-3399J (4GB LDDR3 16GB eMMC)

note

If Ubuntu virtual machine, you need to set aside at least 64GB of hard disk space

content

1. Preparations

2. Compile start

  • Download compilation dependencies packages

New premake.shfile, copy the file to the following contents.

#!/bin/bash

# 更新系统
sudo apt-get update

# 根据官方文档安装Kernel及U-Boot编译需要依赖的软件包
sudo apt-get install \
    git-core \
    gnupg \
    flex \
    bison \
    gperf \
    build-essential \
    zip \
    curl \
    zlib1g-dev \
    gcc-multilib \
    g++-multilib \
    libc6-dev-i386 \
    lib32ncurses5-dev \
    x11proto-core-dev \
    libx11-dev \
    lib32z1-dev \
    ccache \
    libgl1-mesa-dev \
    libxml2-utils \
    xsltproc \
    unzip \
    device-tree-compiler

# 用以解决编译内核时出现的"scripts/extract-cert.c:21:25: fatal error: openssl/bio.h: No such file or directory"错误
sudo apt-get install libssl-dev

# 用以解决编译内核时出现的"/bin/sh: 1: lz4c: not found ..."错误
sudo apt-get install liblz4-tool

Then use the following command to increase the premake.shexecute permissions and run.

chmod +x premake.sh

./premake.sh
  • Unzip the downloaded linux-sdk.7zfile
# 安装7z支持
sudo apt-get install p7zip-full

# 解压linux-sdk.7z
7z x linux-sdk.7z linux-sdk
  • The UBUNTU downloaded image into a specified directory of the SDK
# 解压
tar -xvf ubuntu_16.04_arm64_20190226150448.img.tar.gz
    
# SDK根目录下
mkdir ubunturootfs
mv ubuntu_16.04_arm64_20190226150448.img ubunturootfs/
    
# 修改aio-3399j-ubuntu.mk文件
vim device/rockchip/rk3399/aio-3399j-ubuntu.mk
    
# 把RK_ROOTFS_IMG属性改成ubuntu文件系统镜像的路径(也就是ubuntu_16.04_arm64_20190226150448.img)
RK_ROOTFS_IMG=ubunturootfs/ubuntu_16.04_arm64_20190226150448.img
  • Start compiling
# 第1步
./build.sh aio-3399j-ubuntu.mk

# 第2步
./build.sh uboot

# 第3步
./build.sh kernel
    
# 第4步
./mkfirmware.sh
    
# 第5步
./build.sh updateimg

If successful, you can rockdevget the next folder update.imgfile for later use to upgrade.

Guess you like

Origin www.cnblogs.com/drobot/p/11074993.html