Difference between revisions of "IoTGateway/BSP/Linux/Linux BSP User Guide Debian9 for rk"

From ESS-WIKI
Jump to: navigation, search
(Created page with "== <span style="color:#0070c0">Linux BSP Version</span> == Debian9 == <span style="color:#0070c0">Get Docker Image</span> == <br/><syntaxhighligh...")
 
Line 1: Line 1:
== &lt;span style="color:#0070c0"&gt;Linux BSP Version&lt;/span&gt; ==
+
== <span style="color:#0070c0">Linux BSP Version</span> ==
  
 
Debian9
 
Debian9
  
== &lt;span style="color:#0070c0"&gt;Get Docker Image&lt;/span&gt; ==
+
== <span style="color:#0070c0">Get Docker Image</span> ==
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$docker pull advrisc/u16.04-rklbv1<br/>&lt;/syntaxhighlight&gt;<br/>== &lt;span style="color:#0070c0"&gt;Run Docker example&lt;/span&gt; ==
 
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$docker run -it --name rk_linux --privileged -v /home/adv/rk3399_v20:/home/adv/BSP:rw advrisc/u16.04-rklbv1:latest /bin/bash&nbsp;<br/>&lt;/syntaxhighlight&gt;
+
<syntaxhighlight lang="bash">$docker pull advrisc/u16.04-rklbv1
 +
</syntaxhighlight>
 +
== <span style="color:#0070c0">Run Docker example</span> ==
  
<br/>== &lt;span style="color:#0070c0"&gt;Install Some tools For Rockchip Linux v2.07 version&lt;/span&gt; ==
 
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$sudo apt-get install ibssl-dev&nbsp;<br/>$sudo apt-get install texinfo<br/>$sudo apt-get install liblz4-tool&nbsp;<br/>$sudo apt-get install genext2fs<br/>$sudo apt-get install time<br/>&lt;/syntaxhighlight&gt;<br/>== &lt;span style="color:#0070c0"&gt;Build U-boot&lt;/span&gt; ==
+
<syntaxhighlight lang="bash">$docker run -it --name rk_linux --privileged -v /home/adv/rk3399_v20:/home/adv/BSP:rw advrisc/u16.04-rklbv1:latest /bin/bash 
 +
</syntaxhighlight>
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$cd u-boot/<br/>$./make.sh evb-rk3399<br/>&lt;/syntaxhighlight&gt;<br/>== &lt;span style="color:#0070c0"&gt;Build Kernel&lt;/span&gt; ==
 
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$cd kernel<br/>$make ARCH=arm64 rockchip_ds100_defconfig<br/>$make ARCH=arm64 rk3399-ds100.img -j8<br/>&lt;/syntaxhighlight&gt;<br/>== &lt;span style="color:#0070c0"&gt;Build Recovery&lt;/span&gt; ==
+
== <span style="color:#0070c0">Install Some tools For Rockchip Linux v2.07 version</span> ==
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$./build.sh recovery<br/>&lt;/syntaxhighlight&gt;In /output/rockchip_rk3399_recovery/images create recovery.img<br/>== &lt;span style="color:#0070c0"&gt;Build Buildroot rootfs&lt;/span&gt; ==
 
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$./build.sh rootfs<br/>&lt;/syntaxhighlight&gt;<br/>== &lt;span style="color:#0070c0"&gt;Build Rootfs&lt;/span&gt; ==
+
<syntaxhighlight lang="bash">$sudo apt-get install ibssl-dev
 +
$sudo apt-get install texinfo
 +
$sudo apt-get install liblz4-tool
 +
$sudo apt-get install genext2fs
 +
$sudo apt-get install time
 +
</syntaxhighlight>
 +
== <span style="color:#0070c0">Build U-boot</span> ==
  
=== &lt;span style="color:#0070c0"&gt;Building base debian system by ubuntu-build-service from linaro&lt;/span&gt; ===
 
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$cd rootfs/<br/>$sudo apt-get install binfmt-support qemu-user-static live-build<br/>$sudo dpkg -i ubuntu-build-service/packages/*<br/>$sudo apt-get install -f<br/>$RELEASE=stretch TARGET=desktop ARCH=arm64 ./mk-base-debian.sh<br/>&lt;/syntaxhighlight&gt;In rootfs creat linaro-stretch-alip-xxxxx-1.tar.gz<br/>=== &lt;span style="color:#0070c0"&gt;Building rk-debian rootfs&lt;/span&gt; ===
+
<syntaxhighlight lang="bash">$cd u-boot/
 +
$./make.sh evb-rk3399
 +
</syntaxhighlight>
 +
== <span style="color:#0070c0">Build Kernel</span> ==
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$VERSION=debug ARCH=arm64 ./mk-rootfs-stretch-arm64.sh<br/>&lt;/syntaxhighlight&gt;<br/>=== &lt;span style="color:#0070c0"&gt;Creating the ext4 image(&lt;/span&gt; ===
 
  
<br/>&lt;syntaxhighlight lang="bash"&gt;$./mk-image.sh<br/>&lt;/syntaxhighlight&gt; check All Debian Image in rockimg folder
+
<syntaxhighlight lang="bash">$cd kernel
 +
$make ARCH=arm64 rockchip_ds100_defconfig
 +
$make ARCH=arm64 rk3399-ds100.img -j8
 +
</syntaxhighlight>
 +
== <span style="color:#0070c0">Build Recovery</span> ==
 +
 
 +
 
 +
<syntaxhighlight lang="bash">$./build.sh recovery
 +
</syntaxhighlight>In /output/rockchip_rk3399_recovery/images create recovery.img
 +
== <span style="color:#0070c0">Build Buildroot rootfs</span> ==
 +
 
 +
 
 +
<syntaxhighlight lang="bash">$./build.sh rootfs
 +
</syntaxhighlight>
 +
== <span style="color:#0070c0">Build Rootfs</span> ==
 +
 
 +
=== <span style="color:#0070c0">Building base debian system by ubuntu-build-service from linaro</span> ===
 +
 
 +
 
 +
<syntaxhighlight lang="bash">$cd rootfs/
 +
$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
 +
</syntaxhighlight>In rootfs creat linaro-stretch-alip-xxxxx-1.tar.gz
 +
=== <span style="color:#0070c0">Building rk-debian rootfs</span> ===
 +
 
 +
 
 +
<syntaxhighlight lang="bash">$VERSION=debug ARCH=arm64 ./mk-rootfs-stretch-arm64.sh
 +
</syntaxhighlight>
 +
=== <span style="color:#0070c0">Creating the ext4 image(</span> ===
 +
 
 +
 
 +
<syntaxhighlight lang="bash">$./mk-image.sh
 +
</syntaxhighlight> check All Debian Image in rockimg folder

Revision as of 10:56, 11 October 2018

Linux BSP Version

Debian9

Get Docker Image

$docker pull advrisc/u16.04-rklbv1

Run Docker example

$docker run -it --name rk_linux --privileged -v /home/adv/rk3399_v20:/home/adv/BSP:rw advrisc/u16.04-rklbv1:latest /bin/bash 


Install Some tools For Rockchip Linux v2.07 version

$sudo apt-get install ibssl-dev 
$sudo apt-get install texinfo
$sudo apt-get install liblz4-tool 
$sudo apt-get install genext2fs
$sudo apt-get install time

Build U-boot

$cd u-boot/
$./make.sh evb-rk3399

Build Kernel

$cd kernel
$make ARCH=arm64 rockchip_ds100_defconfig
$make ARCH=arm64 rk3399-ds100.img -j8

Build Recovery

$./build.sh recovery
In /output/rockchip_rk3399_recovery/images create recovery.img

Build Buildroot rootfs

$./build.sh rootfs

Build Rootfs

Building base debian system by ubuntu-build-service from linaro

$cd rootfs/
$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
In rootfs creat linaro-stretch-alip-xxxxx-1.tar.gz

Building rk-debian rootfs

$VERSION=debug ARCH=arm64 ./mk-rootfs-stretch-arm64.sh

Creating the ext4 image(

$./mk-image.sh
check All Debian Image in rockimg folder