Difference between revisions of "Linux"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
<h2> <span style="color:#0070c0">Getting Linux Source Code</span> </h2>
+
<span style="color:#0070c0">Getting Linux Source Code</span>
<p><pre class="fck_mw_syntaxhighlight"><syntaxhighlight lang="bash">
+
<p><pre class="fck_mw_syntaxhighlight">&lt;syntaxhighlight lang=&quot;bash&quot;&gt;
 
$ git clone https://github.com/rockchip-linux/repo.git
 
$ git clone https://github.com/rockchip-linux/repo.git
 
$ mkdir rk3399_linux
 
$ mkdir rk3399_linux
Line 6: Line 6:
 
$ ../repo/repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -m rk3399_linux_release.xml
 
$ ../repo/repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -m rk3399_linux_release.xml
 
$ ../repo/repo sync
 
$ ../repo/repo sync
</syntaxhighlight></pre>
+
&lt;/syntaxhighlight&gt;</pre>
 
</p>
 
</p>
<h2> <span style="color:#0070c0">Compiler u-boot</span> </h2>
+
<span style="color:#0070c0">Compiler u-boot</span>
<p><pre class="fck_mw_syntaxhighlight"><syntaxhighlight lang="bash">
+
<p><pre class="fck_mw_syntaxhighlight">&lt;syntaxhighlight lang=&quot;bash&quot;&gt;
 
$ ./make.sh evb-rk3399
 
$ ./make.sh evb-rk3399
</syntaxhighlight></pre>
+
&lt;/syntaxhighlight&gt;</pre>
 
</p>
 
</p>
<h2> <span style="color:#0070c0">Compiler Kernel</span> </h2>
+
<span style="color:#0070c0">Compiler Kernel</span>
<p><pre class="fck_mw_syntaxhighlight"><syntaxhighlight lang="bash">
+
<p><pre class="fck_mw_syntaxhighlight">&lt;syntaxhighlight lang=&quot;bash&quot;&gt;
 
$ cd kernel
 
$ cd kernel
 
$ make ARCH=arm64 rockchip_linux_defconfig
 
$ make ARCH=arm64 rockchip_linux_defconfig
 
$ make ARCH=arm64 rk3399-ds100.img -j12
 
$ make ARCH=arm64 rk3399-ds100.img -j12
</syntaxhighlight></pre>
+
&lt;/syntaxhighlight&gt;</pre>
 
</p>
 
</p>
<h2> <span style="color:#0070c0">Building base debian system by ubuntu-build-service from linaro</span> </h2>
+
<span style="color:#0070c0">Building base debian system by ubuntu-build-service from linaro</span>
<p><pre class="fck_mw_syntaxhighlight"><syntaxhighlight lang="bash">
+
<p><pre class="fck_mw_syntaxhighlight">&lt;syntaxhighlight lang=&quot;bash&quot;&gt;
 
$ 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
 
$ ARCH=armhf ./mk-base-debian.sh
 
$ ARCH=armhf ./mk-base-debian.sh
</syntaxhighlight></pre>
+
&lt;/syntaxhighlight&gt;</pre>
 
</p>
 
</p>
<h2> <span style="color:#0070c0">Building rk-debian rootfs</span> </h2>
+
<span style="color:#0070c0">Building rk-debian rootfs</span>
<p><pre class="fck_mw_syntaxhighlight"><syntaxhighlight lang="bash">
+
<p><pre class="fck_mw_syntaxhighlight">&lt;syntaxhighlight lang=&quot;bash&quot;&gt;
 
$ ARCH=armhf ./mk-rootfs.sh  
 
$ ARCH=armhf ./mk-rootfs.sh  
 
$ VERSION=debug ARCH=armhf ./mk-rootfs-stretch.sh
 
$ VERSION=debug ARCH=armhf ./mk-rootfs-stretch.sh
</syntaxhighlight></pre>
+
&lt;/syntaxhighlight&gt;</pre>
 
</p>
 
</p>
<h2> <span style="color:#0070c0">Creating the ext4 image</span> </h2>
+
<span style="color:#0070c0">Creating the ext4 image</span>
<p><pre class="fck_mw_syntaxhighlight"><syntaxhighlight lang="bash">
+
<p><pre class="fck_mw_syntaxhighlight">&lt;syntaxhighlight lang=&quot;bash&quot;&gt;
 
$ ./mk-image.sh
 
$ ./mk-image.sh
</syntaxhighlight></pre>
+
&lt;/syntaxhighlight&gt;</pre>
 
</p>
 
</p>
<h2> <span style="color:#0070c0">Creating the all image</span> </h2>
+
<span style="color:#0070c0">Creating the all image</span>
<p><pre class="fck_mw_syntaxhighlight"><syntaxhighlight lang="bash">
+
<p><pre class="fck_mw_syntaxhighlight">&lt;syntaxhighlight lang=&quot;bash&quot;&gt;
 
$ cd ..
 
$ cd ..
 
$ ./mkfirmware.sh debian
 
$ ./mkfirmware.sh debian
</syntaxhighlight></pre>
+
&lt;/syntaxhighlight&gt;</pre>
 
</p>
 
</p>

Revision as of 15:34, 13 June 2018

Getting Linux Source Code

<syntaxhighlight lang="bash">
$ git clone https://github.com/rockchip-linux/repo.git
$ mkdir rk3399_linux
$ cd rk3399_linux/
$ ../repo/repo init --repo-url=https://github.com/rockchip-linux/repo -u https://github.com/rockchip-linux/manifests -m rk3399_linux_release.xml
$ ../repo/repo sync
</syntaxhighlight>

Compiler u-boot

<syntaxhighlight lang="bash">
$ ./make.sh evb-rk3399
</syntaxhighlight>

Compiler Kernel

<syntaxhighlight lang="bash">
$ cd kernel
$ make ARCH=arm64 rockchip_linux_defconfig
$ make ARCH=arm64 rk3399-ds100.img -j12
</syntaxhighlight>

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

<syntaxhighlight lang="bash">
$ sudo apt-get install binfmt-support qemu-user-static live-build
$ sudo dpkg -i ubuntu-build-service/packages/*
$ sudo apt-get install -f
$ ARCH=armhf ./mk-base-debian.sh
</syntaxhighlight>

Building rk-debian rootfs

<syntaxhighlight lang="bash">
$ ARCH=armhf ./mk-rootfs.sh 
$ VERSION=debug ARCH=armhf ./mk-rootfs-stretch.sh
</syntaxhighlight>

Creating the ext4 image

<syntaxhighlight lang="bash">
$ ./mk-image.sh
</syntaxhighlight>

Creating the all image

<syntaxhighlight lang="bash">
$ cd ..
$ ./mkfirmware.sh debian
</syntaxhighlight>