Difference between revisions of "IoTGateway/BSP/Linux/Linux BSP User Guide SGI"

From ESS-WIKI
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
== <span style="color:#0070c0">Preparation</span> ==
 
  
=== <span style="color:#0070c0">Getting Debian Source Code</span> ===
+
== <span data-darkreader-inline-color="" style="color: rgb(0, 112, 192); --darkreader-inline-color: #46b2ff;">Preparation</span> ==
 +
 
 +
=== <span data-darkreader-inline-color="" style="color: rgb(0, 112, 192); --darkreader-inline-color: #46b2ff;">Getting Debian Source Code</span> ===
  
 
Download codebase
 
Download codebase
Line 11: Line 12:
 
$ ../bin/repo init -u https://github.com/ADVANTECH-Rockchip/linux-manifest.git -b rk3399_v220_dmssa53
 
$ ../bin/repo init -u https://github.com/ADVANTECH-Rockchip/linux-manifest.git -b rk3399_v220_dmssa53
 
$ ../bin/repo sync
 
$ ../bin/repo sync
</syntaxhighlight>Kernel git branch
 
<syntaxhighlight lang="bash">$ cd ~/kernel
 
$ git checkout -b rk3399_linux_v220_dmssa53 remotes/advantech-github/rk3399_linux_v220_dmssa53$ cd ../
 
</syntaxhighlight>
 
Rootfs git branch
 
<syntaxhighlight lang="bash">$ cd ~/rootfs
 
git checkout -b rk3399_v220_dmssa53 remotes/m/rk3399_v220_dmssa53
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== <span style="color:#0070c0">Buid environment</span> ===
+
=== <span data-darkreader-inline-color="" style="color: rgb(0, 112, 192); --darkreader-inline-color: #46b2ff;">Buid environment</span> ===
  
 
Ubuntu 16.04 - Buildroot
 
Ubuntu 16.04 - Buildroot
 
<syntaxhighlight lang="bash">sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools linaro-image-tools autoconf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make binutils build-essential gcc g++ bash patch gzi
 
<syntaxhighlight lang="bash">sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools linaro-image-tools autoconf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make binutils build-essential gcc g++ bash patch gzi
 
p bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client subversion asciidoc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev texinfo liblz4-tool genext2fs
 
p bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client subversion asciidoc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev texinfo liblz4-tool genext2fs
</syntaxhighlight>Ubuntu 16.04 - Debian<syntaxhighlight lang="bash">sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools linaro-image-tools gcc-4.8-multilib-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libssl-dev gcc-aarch64-linux-gnu g+conf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client subversion ascii doc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev texinfo liblz4-tool genext2fs
 
</syntaxhighlight> Ubuntu 17.04 or newer<syntaxhighlight lang="bash">sudo apt-get install lib32gcc-7-dev g++-7 libstdc++-7-dev
 
 
</syntaxhighlight>
 
</syntaxhighlight>
== <span style="color:#0070c0">Buid Image</span> ==
+
 
 +
Ubuntu 16.04 - Debian
 +
<syntaxhighlight lang="bash">sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools linaro-image-tools gcc-4.8-multilib-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libssl-dev gcc-aarch64-linux-gnu g+conf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client subversion ascii doc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev texinfo liblz4-tool genext2fs
 +
</syntaxhighlight>
 +
 
 +
Ubuntu 17.04 or newer
 +
<syntaxhighlight lang="bash">sudo apt-get install lib32gcc-7-dev g++-7 libstdc++-7-dev
 +
</syntaxhighlight>
 +
 
 +
== <span data-darkreader-inline-color="" style="color: rgb(0, 112, 192); --darkreader-inline-color: #46b2ff;">Buid Image</span> ==
  
 
Bootloader
 
Bootloader
 
<syntaxhighlight lang="bash">$./build.sh uboot
 
<syntaxhighlight lang="bash">$./build.sh uboot
</syntaxhighlight> Kernel<syntaxhighlight lang="bash">$ cd kernel
+
</syntaxhighlight>
 +
 
 +
Kernel
 +
<syntaxhighlight lang="bash">$ cd kernel
 
$ make ARCH=arm64 rockchip_dmssa53_defconfig
 
$ make ARCH=arm64 rockchip_dmssa53_defconfig
 
$ make ARCH=arm64 rk3399-dmssa53.img -j8
 
$ make ARCH=arm64 rk3399-dmssa53.img -j8
</syntaxhighlight>  
+
</syntaxhighlight>
Buildroot rootfs<syntaxhighlight lang="bash">$./build.sh rootfs
+
 
</syntaxhighlight> Debian rootfs<syntaxhighlight lang="bash">$cd rootfs/
+
Buildroot rootfs
 +
<syntaxhighlight lang="bash">$./build.sh rootfs
 +
</syntaxhighlight>
 +
 
 +
Debian rootfs
 +
<syntaxhighlight lang="bash">$cd rootfs/
 +
$sudo apt-get update
 
$sudo apt-get install binfmt-support qemu-user-static live-build
 
$sudo apt-get install binfmt-support qemu-user-static live-build
 
$sudo dpkg -i ubuntu-build-service/packages/*
 
$sudo dpkg -i ubuntu-build-service/packages/*
 
$sudo apt-get install -f
 
$sudo apt-get install -f
 
$RELEASE=stretch TARGET=desktop ARCH=arm64 ./mk-base-debian.sh
 
$RELEASE=stretch TARGET=desktop ARCH=arm64 ./mk-base-debian.sh
$VERSION=debug ARCH=arm64 ./mk-rootfs-stretch-arm64.sh
+
$VERSION=debug ARCH=arm64 ./mk-rootfs-stretch.sh
 
</syntaxhighlight>
 
</syntaxhighlight>
== <span style="color:#0070c0">Reference</span> ==
+
 
 +
== <span data-darkreader-inline-color="" style="color: rgb(0, 112, 192); --darkreader-inline-color: #46b2ff;">Reference</span> ==
  
 
[https://github.com/rockchip-linux/docs Rockchip Linux Document]
 
[https://github.com/rockchip-linux/docs Rockchip Linux Document]

Latest revision as of 07:29, 24 October 2023

Preparation

Getting Debian Source Code

Download codebase

$ mkdir rk3399
$ mkdir bin
$ cd rk3399/
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ../bin/repo
$ chmod a+x ../bin/repo
$ ../bin/repo init -u https://github.com/ADVANTECH-Rockchip/linux-manifest.git -b rk3399_v220_dmssa53
$ ../bin/repo sync

Buid environment

Ubuntu 16.04 - Buildroot

sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools linaro-image-tools autoconf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make binutils build-essential gcc g++ bash patch gzi
p bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client subversion asciidoc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev texinfo liblz4-tool genext2fs

Ubuntu 16.04 - Debian

sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools linaro-image-tools gcc-4.8-multilib-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libssl-dev gcc-aarch64-linux-gnu g+conf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client subversion ascii doc w3m dblatex graphviz python-matplotlib libc6:i386 libssl-dev texinfo liblz4-tool genext2fs

Ubuntu 17.04 or newer

sudo apt-get install lib32gcc-7-dev g++-7 libstdc++-7-dev

Buid Image

Bootloader

$./build.sh uboot

Kernel

$ cd kernel
$ make ARCH=arm64 rockchip_dmssa53_defconfig
$ make ARCH=arm64 rk3399-dmssa53.img -j8

Buildroot rootfs

$./build.sh rootfs

Debian rootfs

$cd rootfs/
$sudo apt-get update
$sudo apt-get install binfmt-support qemu-user-static live-build
$sudo dpkg -i ubuntu-build-service/packages/*
$sudo apt-get install -f
$RELEASE=stretch TARGET=desktop ARCH=arm64 ./mk-base-debian.sh
$VERSION=debug ARCH=arm64 ./mk-rootfs-stretch.sh

Reference

Rockchip Linux Document