![theobroma systems RK3399-Q7 User Manual Download Page 29](http://html.mh-extra.com/html/theobroma-systems/rk3399-q7/rk3399-q7_user-manual_1101597029.webp)
cd puma
-
linux
export ARCH
=
arm64
export CROSS_COMPILE
=/
opt
/
gcc
-
linaro
-
6.3
.
1
-
2017.02
-
x86_64_aarch64
-
linux
-
gnu
/
bin
/
aarch64
-
linux
-
gnu
-
make puma
-
rk3399_defconfig
make
-
j4 rockchip
/
rk3399
-
puma
.
dtb Image
This will create the two files needed for booting with U-Boot (paths are relative to the
puma-linux
directory):
• The device tree: “
arch/arm64/boot/dts/rockchip/rk3399-puma.dtb
“
• The kernel image: “
arch/arm64/boot/Image
“
4.8 Building the root filesystem
A filesystem can be created using Debootstrap, specifying arm64 as architecture in the command line.
Supposing the target dir is called
rk3399-rootfs
and the chosen distro is xenial (recommended):
export targetdir=/opt/rk3399-rootfs
export distro=xenial
sudo mkdir -p $targetdir
sudo debootstrap --arch=arm64 --foreign $distro $targetdir
Next, copy the qemu-arm-static binary into the right place for the binfmt packages to find it and copy the resolv.conf file
from the host system:
sudo cp /usr/bin/qemu-aarch64-static $targetdir/usr/bin/
sudo cp /etc/resolv.conf $targetdir/etc
This will provide a very basic arm64 rootfs in the targetdir. For the next stages, we
chroot
to the target dir and set up the
environment again:
cd $targetdir
sudo mount -t proc chproc $targetdir/proc
sudo mount -t sysfs chsys $targetdir/sys
sudo mount -t devtmpfs chdev $targetdir/dev
sudo mount -t devpts chpts $targetdir/dev/ptsd
sudo chroot $targetdir
export LC_ALL=C
export LANG=C
RK3399-Q7 User Manual
© Theobroma Systems Design und Consulting GmbH
Release v0.2-3-g574c114
Page
25
Summary of Contents for RK3399-Q7
Page 2: ......