<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[PINE64 - Rock64 Tutorials]]></title>
		<link>https://forum.pine64.org/</link>
		<description><![CDATA[PINE64 - https://forum.pine64.org]]></description>
		<pubDate>Sat, 18 Apr 2026 12:00:05 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Setting up a Rock64 v3 for klipper / mainsail over serial]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=20169</link>
			<pubDate>Wed, 14 Jan 2026 13:06:32 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=29820">MinimumJargon</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=20169</guid>
			<description><![CDATA[Just thought if anyone was thinking/trying to use a rock64 to control their 3d printers with Klipper / Mainsail over serial, that this might help<br />
I did this with four rock64 v3 and got everyone working exactly like my pis, controlling 2 Prusa MK3S each.<br />
I am not a Linux user, I managed to piece this together for the first one and the other 3 went smoothly following this.<br />
Some of these steps may be redundant or unnecessary, but the result is that it works.<br />
<br />
Base Setup:<br />
<br />
Wipe SD card with SD Card Formatter<br />
Download and use Armbian Imager to image SD<br />
select board and OS<br />
I used OS Minimal 25.5.1 bookworm <br />
<br />
sudo apt update &amp;&amp; sudo apt upgrade<br />
sudo apt-get install git -y<br />
sudo apt install network-manager<br />
sudo reboot<br />
<br />
Set up wifi dongle: (you may need specific firmware for brand if not Linux native. Mine was, I used a Ralink dongle)<br />
<br />
nmcli device wifi list<br />
nmcli dev wifi connect "Your_WiFi_SSID" password "Your_WiFi_Password"<br />
nmcli device status<br />
sudo reboot<br />
<br />
<br />
Setup Mailsail and klipper, just follow prompts to install 1-3 or follow a guide for Kiauh:<br />
<br />
cd ~ &amp;&amp; git clone <a href="https://github.com/dw-0/kiauh.git" target="_blank" rel="noopener" class="mycode_url">https://github.com/dw-0/kiauh.git</a><br />
./kiauh/kiauh.sh<br />
(install 1, 2, and 3)<br />
sudo reboot<br />
sudo apt update &amp;&amp; sudo apt upgrade<br />
<br />
<br />
Reduced bootup time for no Lan connection from 2min to 10 sec:<br />
<br />
find / -name "systemd-networkd-wait-online.service"<br />
(This should be the location, but confirm with the find)<br />
sudo nano /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service<br />
<br />
(add text under [Service])<br />
TimeoutStartSec=10<br />
<br />
(At this point you could run klipper over a usb to the printer<br />
Mailsail/klipper web GUI is whatever IP the rock64 or wifi dongle grabs<br />
It will be at the top of the screen when you ssh/login)<br />
<br />
Tx/Rx setup on UART2/tty2:<br />
<br />
sudo apt update &amp;&amp; sudo apt upgrade<br />
<br />
1.Overlays<br />
sudo armbian-config<br />
system&gt;kernel&gt;boot01<br />
(added text to boot/armbianEvn.txt under overlay)<br />
overlays=rk3328-uart1 rk3328-uart2 rk3328-uart3<br />
<br />
2.Kernel<br />
sudo armbian-config<br />
system&gt;kernel&gt;ker001 - alt kernel<br />
updated to the newest rock kernel<br />
<br />
3.disabled console<br />
sudo systemctl mask serial-getty@ttyS2<br />
<br />
4. Added users to dialout group<br />
sudo usermod -a -G dialout &lt;username&gt;<br />
(confirm user is in dialout group)<br />
groups<br />
<br />
5. echo test with jumper if you want(jump the UART2 Tx and Rx pins(8,10) together with a wire, no ground needed)<br />
sudo apt install picocom<br />
sudo picocom -b 115200 -r -l /dev/ttyS2<br />
<br />
Type anything, if writing appears port is working<br />
ctrl a then ctrl x to exit<br />
<br />
In your printer.config file under the MCU you will use<br />
serial: /dev/ttyS2 <br />
<br />
<br />
Happy Printing!!!]]></description>
			<content:encoded><![CDATA[Just thought if anyone was thinking/trying to use a rock64 to control their 3d printers with Klipper / Mainsail over serial, that this might help<br />
I did this with four rock64 v3 and got everyone working exactly like my pis, controlling 2 Prusa MK3S each.<br />
I am not a Linux user, I managed to piece this together for the first one and the other 3 went smoothly following this.<br />
Some of these steps may be redundant or unnecessary, but the result is that it works.<br />
<br />
Base Setup:<br />
<br />
Wipe SD card with SD Card Formatter<br />
Download and use Armbian Imager to image SD<br />
select board and OS<br />
I used OS Minimal 25.5.1 bookworm <br />
<br />
sudo apt update &amp;&amp; sudo apt upgrade<br />
sudo apt-get install git -y<br />
sudo apt install network-manager<br />
sudo reboot<br />
<br />
Set up wifi dongle: (you may need specific firmware for brand if not Linux native. Mine was, I used a Ralink dongle)<br />
<br />
nmcli device wifi list<br />
nmcli dev wifi connect "Your_WiFi_SSID" password "Your_WiFi_Password"<br />
nmcli device status<br />
sudo reboot<br />
<br />
<br />
Setup Mailsail and klipper, just follow prompts to install 1-3 or follow a guide for Kiauh:<br />
<br />
cd ~ &amp;&amp; git clone <a href="https://github.com/dw-0/kiauh.git" target="_blank" rel="noopener" class="mycode_url">https://github.com/dw-0/kiauh.git</a><br />
./kiauh/kiauh.sh<br />
(install 1, 2, and 3)<br />
sudo reboot<br />
sudo apt update &amp;&amp; sudo apt upgrade<br />
<br />
<br />
Reduced bootup time for no Lan connection from 2min to 10 sec:<br />
<br />
find / -name "systemd-networkd-wait-online.service"<br />
(This should be the location, but confirm with the find)<br />
sudo nano /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service<br />
<br />
(add text under [Service])<br />
TimeoutStartSec=10<br />
<br />
(At this point you could run klipper over a usb to the printer<br />
Mailsail/klipper web GUI is whatever IP the rock64 or wifi dongle grabs<br />
It will be at the top of the screen when you ssh/login)<br />
<br />
Tx/Rx setup on UART2/tty2:<br />
<br />
sudo apt update &amp;&amp; sudo apt upgrade<br />
<br />
1.Overlays<br />
sudo armbian-config<br />
system&gt;kernel&gt;boot01<br />
(added text to boot/armbianEvn.txt under overlay)<br />
overlays=rk3328-uart1 rk3328-uart2 rk3328-uart3<br />
<br />
2.Kernel<br />
sudo armbian-config<br />
system&gt;kernel&gt;ker001 - alt kernel<br />
updated to the newest rock kernel<br />
<br />
3.disabled console<br />
sudo systemctl mask serial-getty@ttyS2<br />
<br />
4. Added users to dialout group<br />
sudo usermod -a -G dialout &lt;username&gt;<br />
(confirm user is in dialout group)<br />
groups<br />
<br />
5. echo test with jumper if you want(jump the UART2 Tx and Rx pins(8,10) together with a wire, no ground needed)<br />
sudo apt install picocom<br />
sudo picocom -b 115200 -r -l /dev/ttyS2<br />
<br />
Type anything, if writing appears port is working<br />
ctrl a then ctrl x to exit<br />
<br />
In your printer.config file under the MCU you will use<br />
serial: /dev/ttyS2 <br />
<br />
<br />
Happy Printing!!!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Help getting started]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=14998</link>
			<pubDate>Thu, 30 Sep 2021 18:22:42 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=23456">Flagtrax</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=14998</guid>
			<description><![CDATA[Greetings all, I'm a brand newbie to the Rock64, after purchasing one from an Ebay vendor. I have some exxperience with the Raspberry Pi, as well as some Ubuntu experience on one of my laptops. I therefore wanted to try Ubuntu 18.04 OS. but I'm having trouble understanding how to get it on an SD. I read the instructions, which sound very similar to the Raspberry Pi way of doing it, IE: downloading image, placing the image file on the microsd card via Win32 Imager (Using Win10 laptop) plug it in and go.<br />
The Win32 Imager is looking for a .img file. What was downloaded from the github site was a .img.tar file. Not being sure how to deal with that, I unzipped the .tar and lo and behold there were 7 different images in the tar. Can someone please explain to me how to deal with this? Thanks.]]></description>
			<content:encoded><![CDATA[Greetings all, I'm a brand newbie to the Rock64, after purchasing one from an Ebay vendor. I have some exxperience with the Raspberry Pi, as well as some Ubuntu experience on one of my laptops. I therefore wanted to try Ubuntu 18.04 OS. but I'm having trouble understanding how to get it on an SD. I read the instructions, which sound very similar to the Raspberry Pi way of doing it, IE: downloading image, placing the image file on the microsd card via Win32 Imager (Using Win10 laptop) plug it in and go.<br />
The Win32 Imager is looking for a .img file. What was downloaded from the github site was a .img.tar file. Not being sure how to deal with that, I unzipped the .tar and lo and behold there were 7 different images in the tar. Can someone please explain to me how to deal with this? Thanks.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Rock64 - Simple Bare-Metal Example]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=10079</link>
			<pubDate>Fri, 05 Jun 2020 13:27:29 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=8801">krjdev</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=10079</guid>
			<description><![CDATA[Hi,<br />
<br />
I wrote a simple Bare-Metal example for the Rock64.<br />
It just sends a few strings over the UART interface and if a special char will be received, the program resets the Rock64.<br />
<br />
The main entry point of the program (written in Assembler):<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#include &lt;asm.h&gt;<br />
<br />
IMPORT_C(kern_main)<br />
<br />
.text<br />
<br />
ENTRY(_start)<br />
    mrs x0, SCTLR_EL1<br />
    and x0, x0, #0xFFFFFFFFFFFFFFFC<br />
    msr SCTLR_EL1, x0<br />
    <br />
    mrs x0, SCTLR_EL2<br />
    and x0, x0, #0xFFFFFFFFFFFFFFFC<br />
    msr SCTLR_EL2, x0<br />
    <br />
    mrs x0, MPIDR_EL1<br />
    and x0, x0, #0x3<br />
    cmp x0, #0<br />
    beq L1<br />
L0:<br />
    wfe<br />
    b L0<br />
L1:<br />
    ldr x0, =_kern_stack_s<br />
    mov sp, x0<br />
    b kern_main<br />
L2:<br />
    wfe<br />
    b L2<br />
<br />
.end</code></div></div><br />
It's a minimal setup. It just disables the MMU and the Alignment checks.<br />
Then it reads the processor ID and let only CPU0 run the C main entry point (kern_main).<br />
<br />
The C main entry point:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#include &lt;dev/cru.h&gt;<br />
#include &lt;dev/uart.h&gt;<br />
<br />
void kern_main(void)<br />
{<br />
    int c;<br />
    <br />
    uart_init();<br />
    uart_puts("Pine64 Rock64&#92;r&#92;n");<br />
    uart_puts("Press 'r' to reset the board!&#92;r&#92;n");<br />
    <br />
    do {<br />
        c = uart_getc();<br />
    } while (c != 'r');<br />
    <br />
    uart_puts("Resetting...&#92;r&#92;n");<br />
    cru_reset();<br />
    <br />
    while (1)<br />
        ;<br />
}</code></div></div><br />
Should be self explaining.<br />
<br />
There is also as very simple UART driver and the CRU driver for resetting the board.<br />
The code includes a very minimal C String library.Only GCC for AArch64 is needed.<br />
<br />
To start the application, U-Boot is needed.<br />
<br />
I have attached the full code.<br />
The code is also on my <a href="https://github.com/krjdev/rock64_bare-metal" target="_blank" rel="noopener" class="mycode_url">GitHub</a> page available.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Edit:</span><br />
Oops! There is a bug in the attached archive.<br />
<br />
Simple change the following line in the file start.S...<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ldr x0, =_kern_stack_s</code></div></div><br />
to..<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ldr x0, =_kern_stack_e</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://forum.pine64.org/images/attachtypes/tar.png" title="GZIP Compressed File" border="0" alt=".gz" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1859" target="_blank" title="">bare-metal.tar.gz</a> (Size: 4.47 KB / Downloads: 706)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[Hi,<br />
<br />
I wrote a simple Bare-Metal example for the Rock64.<br />
It just sends a few strings over the UART interface and if a special char will be received, the program resets the Rock64.<br />
<br />
The main entry point of the program (written in Assembler):<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#include &lt;asm.h&gt;<br />
<br />
IMPORT_C(kern_main)<br />
<br />
.text<br />
<br />
ENTRY(_start)<br />
    mrs x0, SCTLR_EL1<br />
    and x0, x0, #0xFFFFFFFFFFFFFFFC<br />
    msr SCTLR_EL1, x0<br />
    <br />
    mrs x0, SCTLR_EL2<br />
    and x0, x0, #0xFFFFFFFFFFFFFFFC<br />
    msr SCTLR_EL2, x0<br />
    <br />
    mrs x0, MPIDR_EL1<br />
    and x0, x0, #0x3<br />
    cmp x0, #0<br />
    beq L1<br />
L0:<br />
    wfe<br />
    b L0<br />
L1:<br />
    ldr x0, =_kern_stack_s<br />
    mov sp, x0<br />
    b kern_main<br />
L2:<br />
    wfe<br />
    b L2<br />
<br />
.end</code></div></div><br />
It's a minimal setup. It just disables the MMU and the Alignment checks.<br />
Then it reads the processor ID and let only CPU0 run the C main entry point (kern_main).<br />
<br />
The C main entry point:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>#include &lt;dev/cru.h&gt;<br />
#include &lt;dev/uart.h&gt;<br />
<br />
void kern_main(void)<br />
{<br />
    int c;<br />
    <br />
    uart_init();<br />
    uart_puts("Pine64 Rock64&#92;r&#92;n");<br />
    uart_puts("Press 'r' to reset the board!&#92;r&#92;n");<br />
    <br />
    do {<br />
        c = uart_getc();<br />
    } while (c != 'r');<br />
    <br />
    uart_puts("Resetting...&#92;r&#92;n");<br />
    cru_reset();<br />
    <br />
    while (1)<br />
        ;<br />
}</code></div></div><br />
Should be self explaining.<br />
<br />
There is also as very simple UART driver and the CRU driver for resetting the board.<br />
The code includes a very minimal C String library.Only GCC for AArch64 is needed.<br />
<br />
To start the application, U-Boot is needed.<br />
<br />
I have attached the full code.<br />
The code is also on my <a href="https://github.com/krjdev/rock64_bare-metal" target="_blank" rel="noopener" class="mycode_url">GitHub</a> page available.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Edit:</span><br />
Oops! There is a bug in the attached archive.<br />
<br />
Simple change the following line in the file start.S...<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ldr x0, =_kern_stack_s</code></div></div><br />
to..<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ldr x0, =_kern_stack_e</code></div></div><br /><!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://forum.pine64.org/images/attachtypes/tar.png" title="GZIP Compressed File" border="0" alt=".gz" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=1859" target="_blank" title="">bare-metal.tar.gz</a> (Size: 4.47 KB / Downloads: 706)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Still trying to upgrade]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=8704</link>
			<pubDate>Sun, 05 Jan 2020 11:16:01 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=9760">georgetina1</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=8704</guid>
			<description><![CDATA[Manage to get the system to carry out upgrade to LXDE version 0.8.3 but on reboot the boot sequence runs and then the screen goes blank with the cursor flashing. Reboot gives the same result. Any help please.]]></description>
			<content:encoded><![CDATA[Manage to get the system to carry out upgrade to LXDE version 0.8.3 but on reboot the boot sequence runs and then the screen goes blank with the cursor flashing. Reboot gives the same result. Any help please.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Updating LXDE to latest version]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=8687</link>
			<pubDate>Fri, 03 Jan 2020 23:07:58 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=9760">georgetina1</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=8687</guid>
			<description><![CDATA[I have an early version of ayufan LXDE and have tried to update it to a later version using apt-get update but all I get is a number of errors. So for a relative beginner can you tell me how to achieve an update. I have loaded a later version on another micro sd and there are some improvements to the graphics performance but I have some software that I have bought and cannot run this on an entirely new system.  Thank You]]></description>
			<content:encoded><![CDATA[I have an early version of ayufan LXDE and have tried to update it to a later version using apt-get update but all I get is a number of errors. So for a relative beginner can you tell me how to achieve an update. I have loaded a later version on another micro sd and there are some improvements to the graphics performance but I have some software that I have bought and cannot run this on an entirely new system.  Thank You]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Manual: Howto cross-compile Upstream U-Boot for rock64]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=8174</link>
			<pubDate>Sat, 02 Nov 2019 20:59:01 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=14512">rock7</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=8174</guid>
			<description><![CDATA[<span style="font-weight: bold;" class="mycode_b">Step 1: Get the file bl31.elf</span><br />
You can build ATF with Upstream arm-trusted-firmware repository to get the file “bl31.elf” (Way 1) or you use the rk322xh_bl31_vXXX.elf file from rockchip rkbin repository (Way 2)<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Way 1</span> (build ATF with Upstream arm-trusted-firmware repository to get “bl31.elf”)<br />
Install the required packages (Debian / Ubuntu):<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install --no-install-suggests --no-install-recommends device-tree-compiler build-essential gcc make git libssl-dev</code></div></div><br />
To cross-compile:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install --no-install-suggests --no-install-recommends cpp-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu-base libasan6-arm64-cross libatomic1-arm64-cross libc6-arm64-cross libgcc-10-dev-arm64-cross libgcc-s1-arm64-cross libgomp1-arm64-cross libitm1-arm64-cross liblsan0-arm64-cross libstdc++6-arm64-cross libtsan0-arm64-cross libubsan1-arm64-cross cpp-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu gcc-10-cross-base</code></div></div><br />
Go into your Download folder and open Terminal there, then run:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone https://github.com/ARM-software/arm-trusted-firmware<br />
cd arm-trusted-firmware</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Optional 4:</span><br />
Verify code archive integrity (see also: <a href="https://restic.net/blog/2015-09-16/verifying-code-archive-integrity" target="_blank" rel="noopener" class="mycode_url">https://restic.net/blog/2015-09-16/verif...-integrity</a> ).<br />
<ul class="mycode_list"><li>Replace in the following Y.Y with the tag version number<br />
</li>
</ul>
<br />
Download pgp-key from the developer (you can find the gpg key ID on <a href="https://github.com/ARM-software/arm-trusted-firmware/tags" target="_blank" rel="noopener" class="mycode_url">https://github.com/ARM-software/arm-trus...mware/tags</a>) who has signed the tag, check fingerprints, import key and verify tag: Go into arm-trusted-firmware folder and run the following command and verify the fingerprint:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git tag --verify vY.Y</code></div></div><br />
Now create a archive that contain the same repository as the release with the tag version, run in arm-trusted-firmware folder the following command:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git archive --format=tar --prefix=arm-trusted-firmware-Y.Y/ vY.Y | gzip -n &gt; arm-trusted-firmware-Y.Y.tar.gz</code></div></div><br />
Show the sha256 checksum from the archive that contain the repository from the release with the tag version and show sha256 checksum from the same archive <a href="https://github.com/ARM-software/arm-trusted-firmware/archiv/vY.Y.tar.gz" target="_blank" rel="noopener" class="mycode_url">https://github.com/ARM-software/arm-trus...Y.Y.tar.gz</a> which belongs to the tag and compare the checksums:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sha256sum arm-trusted-firmware-Y.Y.tar.gz</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>curl -s -L https://github.com/ARM-software/arm-trusted-firmware/archiv/vY.Y.tar.gz | sha256sum</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">End of the optional section 4</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cd arm-trusted-firmware<br />
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328 DEBUG=1 bl31 ERRATA_A53_836870 ERRATA_A53_1530924</code></div></div><br />
Software Developers Errata Notice: developer.arm.com/documentation/epm048406/2100/<br />
<br />
Go into your Download folder and open Terminal, then run:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone git://git.denx.de/u-boot.git</code></div></div>or Download U-Boot source tree from <a href="https://ftp.denx.de/pub/u-boot/" target="_blank" rel="noopener" class="mycode_url">https://ftp.denx.de/pub/u-boot/</a> <br />
(How to verify downloaded file with .sig file: <a href="https://stackoverflow.com/questions/15331015/how-to-verify-downloaded-file-with-sig-file" target="_blank" rel="noopener" class="mycode_url">https://stackoverflow.com/questions/1533...h-sig-file</a> )<br />
<br />
Search now the “bl31.elf” file in the arm-trusted-firmware build folder and copy it in the U-Boot folder.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Way 2</span> (use “bl31.elf” file from rockchip rkbin repository)<br />
Go into your Download folder and open Terminal, then run:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone git://git.denx.de/u-boot.git</code></div></div>or Download U-Boot source tree from <a href="ftp://ftp.denx.de/pub/u-boot/" target="_blank" rel="noopener" class="mycode_url">ftp://ftp.denx.de/pub/u-boot/</a> <br />
(How to verify downloaded file with .sig file: <a href="https://stackoverflow.com/questions/15331015/how-to-verify-downloaded-file-with-sig-file" target="_blank" rel="noopener" class="mycode_url">https://stackoverflow.com/questions/1533...h-sig-file</a> )<br />
<br />
Go back into your Download folder and open Terminal, then run:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone https://github.com/rockchip-linux/rkbin<br />
cd rkbin</code></div></div><br />
Search the file „rk322xh_bl31_vX.XX.elf“ in the rkbin folder (current version is v1.42, this file is in bin/rk33/) and change the name of this file to „bl31.elf“ and copy it in the U-Boot folder.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 2: </span><br />
<span style="font-weight: bold;" class="mycode_b">Compile U-Boot</span> Install the required packages (for latest Debian):<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install --no-install-suggests --no-install-recommends bison dh-python flex gcc-10 libexpat1-dev libmpdec3 make mime-support swig4.0 u-boot-tools cpp-10 libpython3.9-stdlib libpython3.9-dev libpython3.9-minimal libpython3.9 python3.9 python3.9-minimal python3-distutils python3-lib2to3 python3-pkg-resources python3-setuptools python-pip-whl python3-pip python3.9-dev device-tree-compiler build-essential git libssl-dev</code></div></div><br />
To cross-compile:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install --no-install-suggests --no-install-recommends cpp-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu-base libasan6-arm64-cross libc6-arm64-cross libgcc-10-dev-arm64-cross libgcc-s1-arm64-cross libgomp1-arm64-cross libitm1-arm64-cross liblsan0-arm64-cross libstdc++6-arm64-cross libtsan0-arm64-cross libubsan1-arm64-cross cpp-aarch64-linux-gnu gcc-aarch64-linux-gnu gcc-10-cross-base libatomic1-arm64-cross swig</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cd u-boot<br />
make CROSS_COMPILE=aarch64-linux-gnu- BL31=bl31.elf rock64-rk3328_defconfig</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>make CROSS_COMPILE=aarch64-linux-gnu- BL31=bl31.elf all</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Flash U-Boot to microSD card</span> Create partition with fdisk:<br />
(replace sda1 with the name of your microSD card with number (you can find it with fdisk -l))<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo umount /dev/sda1</code></div></div>(replace sda with the name of your microSD card but now in the following without number (you can find it with fdisk -l))<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo fdisk /dev/sda<br />
d<br />
o<br />
n<br />
Enter<br />
Enter<br />
Enter<br />
First sector (2048-62333951, default 2048): 32768<br />
Enter<br />
w<br />
sudo mkfs.ext4 /dev/sda1 (with number!)</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo fdisk /dev/sda<br />
p</code></div></div><blockquote class="mycode_quote"><cite>Quote:</cite>At “Boot” must be a * if there is not a * then press “a” and then “w”</blockquote>
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>w</code></div></div><span style="font-weight: bold;" class="mycode_b">End of fdisk instructions.</span><br />
<br />
Now run this command:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo umount /dev/sda1</code></div></div><blockquote class="mycode_quote"><cite>Quote:</cite>Replace sda1 with the name of your microSD (with number at the end)</blockquote>
<br />
Open Terminal in the U-Boot folder and flash U-Boot to microSD card with following commands (you can find the name of your microSD card with e.g. gparted, we search for example /dev/sda (without number! not /dev/sda1)):<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo dd if=./idbloader.img of=/dev/sda seek=64<br />
sudo dd if=./u-boot.itb of=/dev/sda seek=16384</code></div></div><br />
<br />
<span style="font-weight: bold;" class="mycode_b">MIT License: </span><a href="https://avg7.de/forum/sicheres-alpine-linux-betriebs-system-usb-stick-speicherkarte/#kopierrechte" target="_blank" rel="noopener" class="mycode_url">https://avg7.de/forum/sicheres-alpine-li...pierrechte</a><br />
Copyright &copy; 2023 AVG7.de]]></description>
			<content:encoded><![CDATA[<span style="font-weight: bold;" class="mycode_b">Step 1: Get the file bl31.elf</span><br />
You can build ATF with Upstream arm-trusted-firmware repository to get the file “bl31.elf” (Way 1) or you use the rk322xh_bl31_vXXX.elf file from rockchip rkbin repository (Way 2)<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Way 1</span> (build ATF with Upstream arm-trusted-firmware repository to get “bl31.elf”)<br />
Install the required packages (Debian / Ubuntu):<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install --no-install-suggests --no-install-recommends device-tree-compiler build-essential gcc make git libssl-dev</code></div></div><br />
To cross-compile:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install --no-install-suggests --no-install-recommends cpp-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu-base libasan6-arm64-cross libatomic1-arm64-cross libc6-arm64-cross libgcc-10-dev-arm64-cross libgcc-s1-arm64-cross libgomp1-arm64-cross libitm1-arm64-cross liblsan0-arm64-cross libstdc++6-arm64-cross libtsan0-arm64-cross libubsan1-arm64-cross cpp-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu gcc-10-cross-base</code></div></div><br />
Go into your Download folder and open Terminal there, then run:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone https://github.com/ARM-software/arm-trusted-firmware<br />
cd arm-trusted-firmware</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Optional 4:</span><br />
Verify code archive integrity (see also: <a href="https://restic.net/blog/2015-09-16/verifying-code-archive-integrity" target="_blank" rel="noopener" class="mycode_url">https://restic.net/blog/2015-09-16/verif...-integrity</a> ).<br />
<ul class="mycode_list"><li>Replace in the following Y.Y with the tag version number<br />
</li>
</ul>
<br />
Download pgp-key from the developer (you can find the gpg key ID on <a href="https://github.com/ARM-software/arm-trusted-firmware/tags" target="_blank" rel="noopener" class="mycode_url">https://github.com/ARM-software/arm-trus...mware/tags</a>) who has signed the tag, check fingerprints, import key and verify tag: Go into arm-trusted-firmware folder and run the following command and verify the fingerprint:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git tag --verify vY.Y</code></div></div><br />
Now create a archive that contain the same repository as the release with the tag version, run in arm-trusted-firmware folder the following command:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git archive --format=tar --prefix=arm-trusted-firmware-Y.Y/ vY.Y | gzip -n &gt; arm-trusted-firmware-Y.Y.tar.gz</code></div></div><br />
Show the sha256 checksum from the archive that contain the repository from the release with the tag version and show sha256 checksum from the same archive <a href="https://github.com/ARM-software/arm-trusted-firmware/archiv/vY.Y.tar.gz" target="_blank" rel="noopener" class="mycode_url">https://github.com/ARM-software/arm-trus...Y.Y.tar.gz</a> which belongs to the tag and compare the checksums:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sha256sum arm-trusted-firmware-Y.Y.tar.gz</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>curl -s -L https://github.com/ARM-software/arm-trusted-firmware/archiv/vY.Y.tar.gz | sha256sum</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">End of the optional section 4</span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cd arm-trusted-firmware<br />
make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328 DEBUG=1 bl31 ERRATA_A53_836870 ERRATA_A53_1530924</code></div></div><br />
Software Developers Errata Notice: developer.arm.com/documentation/epm048406/2100/<br />
<br />
Go into your Download folder and open Terminal, then run:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone git://git.denx.de/u-boot.git</code></div></div>or Download U-Boot source tree from <a href="https://ftp.denx.de/pub/u-boot/" target="_blank" rel="noopener" class="mycode_url">https://ftp.denx.de/pub/u-boot/</a> <br />
(How to verify downloaded file with .sig file: <a href="https://stackoverflow.com/questions/15331015/how-to-verify-downloaded-file-with-sig-file" target="_blank" rel="noopener" class="mycode_url">https://stackoverflow.com/questions/1533...h-sig-file</a> )<br />
<br />
Search now the “bl31.elf” file in the arm-trusted-firmware build folder and copy it in the U-Boot folder.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Way 2</span> (use “bl31.elf” file from rockchip rkbin repository)<br />
Go into your Download folder and open Terminal, then run:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone git://git.denx.de/u-boot.git</code></div></div>or Download U-Boot source tree from <a href="ftp://ftp.denx.de/pub/u-boot/" target="_blank" rel="noopener" class="mycode_url">ftp://ftp.denx.de/pub/u-boot/</a> <br />
(How to verify downloaded file with .sig file: <a href="https://stackoverflow.com/questions/15331015/how-to-verify-downloaded-file-with-sig-file" target="_blank" rel="noopener" class="mycode_url">https://stackoverflow.com/questions/1533...h-sig-file</a> )<br />
<br />
Go back into your Download folder and open Terminal, then run:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone https://github.com/rockchip-linux/rkbin<br />
cd rkbin</code></div></div><br />
Search the file „rk322xh_bl31_vX.XX.elf“ in the rkbin folder (current version is v1.42, this file is in bin/rk33/) and change the name of this file to „bl31.elf“ and copy it in the U-Boot folder.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 2: </span><br />
<span style="font-weight: bold;" class="mycode_b">Compile U-Boot</span> Install the required packages (for latest Debian):<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install --no-install-suggests --no-install-recommends bison dh-python flex gcc-10 libexpat1-dev libmpdec3 make mime-support swig4.0 u-boot-tools cpp-10 libpython3.9-stdlib libpython3.9-dev libpython3.9-minimal libpython3.9 python3.9 python3.9-minimal python3-distutils python3-lib2to3 python3-pkg-resources python3-setuptools python-pip-whl python3-pip python3.9-dev device-tree-compiler build-essential git libssl-dev</code></div></div><br />
To cross-compile:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install --no-install-suggests --no-install-recommends cpp-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu-base libasan6-arm64-cross libc6-arm64-cross libgcc-10-dev-arm64-cross libgcc-s1-arm64-cross libgomp1-arm64-cross libitm1-arm64-cross liblsan0-arm64-cross libstdc++6-arm64-cross libtsan0-arm64-cross libubsan1-arm64-cross cpp-aarch64-linux-gnu gcc-aarch64-linux-gnu gcc-10-cross-base libatomic1-arm64-cross swig</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>cd u-boot<br />
make CROSS_COMPILE=aarch64-linux-gnu- BL31=bl31.elf rock64-rk3328_defconfig</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>make CROSS_COMPILE=aarch64-linux-gnu- BL31=bl31.elf all</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Flash U-Boot to microSD card</span> Create partition with fdisk:<br />
(replace sda1 with the name of your microSD card with number (you can find it with fdisk -l))<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo umount /dev/sda1</code></div></div>(replace sda with the name of your microSD card but now in the following without number (you can find it with fdisk -l))<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo fdisk /dev/sda<br />
d<br />
o<br />
n<br />
Enter<br />
Enter<br />
Enter<br />
First sector (2048-62333951, default 2048): 32768<br />
Enter<br />
w<br />
sudo mkfs.ext4 /dev/sda1 (with number!)</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo fdisk /dev/sda<br />
p</code></div></div><blockquote class="mycode_quote"><cite>Quote:</cite>At “Boot” must be a * if there is not a * then press “a” and then “w”</blockquote>
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>w</code></div></div><span style="font-weight: bold;" class="mycode_b">End of fdisk instructions.</span><br />
<br />
Now run this command:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo umount /dev/sda1</code></div></div><blockquote class="mycode_quote"><cite>Quote:</cite>Replace sda1 with the name of your microSD (with number at the end)</blockquote>
<br />
Open Terminal in the U-Boot folder and flash U-Boot to microSD card with following commands (you can find the name of your microSD card with e.g. gparted, we search for example /dev/sda (without number! not /dev/sda1)):<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo dd if=./idbloader.img of=/dev/sda seek=64<br />
sudo dd if=./u-boot.itb of=/dev/sda seek=16384</code></div></div><br />
<br />
<span style="font-weight: bold;" class="mycode_b">MIT License: </span><a href="https://avg7.de/forum/sicheres-alpine-linux-betriebs-system-usb-stick-speicherkarte/#kopierrechte" target="_blank" rel="noopener" class="mycode_url">https://avg7.de/forum/sicheres-alpine-li...pierrechte</a><br />
Copyright &copy; 2023 AVG7.de]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Debian Stretch Minimal complete install LXDE]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=7267</link>
			<pubDate>Fri, 15 Mar 2019 13:59:01 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=11255">Rafal</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=7267</guid>
			<description><![CDATA[<span style="font-size: x-large;" class="mycode_size">  Rock64 4Gb RAM <img src="https://forum.pine64.org/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" /> <img src="https://forum.pine64.org/images/smilies/huh.png" alt="Huh" title="Huh" class="smilie smilie_17" />  "Debian Stretch Minimal" How do install the complete LXDE graphic environment or other work ??</span>]]></description>
			<content:encoded><![CDATA[<span style="font-size: x-large;" class="mycode_size">  Rock64 4Gb RAM <img src="https://forum.pine64.org/images/smilies/lightbulb.png" alt="Idea" title="Idea" class="smilie smilie_18" /> <img src="https://forum.pine64.org/images/smilies/huh.png" alt="Huh" title="Huh" class="smilie smilie_17" />  "Debian Stretch Minimal" How do install the complete LXDE graphic environment or other work ??</span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Step by step guide PXE diskless configuration.]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=6814</link>
			<pubDate>Thu, 15 Nov 2018 21:30:09 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=2604">burglar_ot</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=6814</guid>
			<description><![CDATA[I haven't find a guide to setup a proper PXE boot for Rock64 (and Pine64) cards, so I will write down mine here hoping that it is useful.<br />
<br />
In this guide I assume that the user is familiar with Linux, another assumption is about the distributions:<br />
- on the Rock64 card we are going to install the Debian minimal;<br />
- on the server that will provide the operating system I use Debian.<br />
I think this guide can work for other distributions too but I haven't tried other combinations.<br />
For the rest of the guide<span style="font-weight: bold;" class="mycode_b"> all the commands will run on the server Debian.</span><br />
<br />
About the hardware I tried on a Rock64pro, I have also a Pine64 and a Rock64 but are in production and I needed a spare board to do the tests. Now that it works I will try also for the others, but for this guide I assume the Rock64pro.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 1: Flash the SPI</span><br />
This is actually the only step that requires an SD card.<br />
The SPI is a little memory (128MB) that can be flashed to add instruction at the boot time. Ayufan has a nice SPI image that adds the possibility to boot from network (PXE), and we are going to use it.<br />
<br />
So go to this <a href="https://github.com/ayufan-rock64/linux-u-boot/releases" target="_blank" rel="noopener" class="mycode_url">link</a> and download the image file that is useful for your system. I used the u-boot-flash-spi-rockpro64.img.xz file.<br />
Uncompress it with<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>unxz u-boot-flash-spi-rockpro64.img.xz</code></div></div>and flash it on the SD card with dd<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>dd bs=1M if=u-boot-flash-spi-rockpro64.img of=/dev/sd&lt;SOMETHING&gt;</code></div></div>Put the card into the Rock64 board and boot it. I had no monitor connected so I do not know what it writes on a screen, but it is enough that you wait some time (one minute is probably enough) and you will see the boot (white) led flashing once per second. It means that the SPI is flashed. You can now turn off the board and remove the SD card.<br />
<span style="font-weight: bold;" class="mycode_b">Step 2: find the ethernet address of the board.</span><br />
I assume that you have already a DHCP server installed in your network that assign the addresses to every device connected.<br />
If this DHCP server is the router of your internet connection you will have to change it later (unless is a very advanced router and you can specify advanced features). In any case to identify the mac address is sufficient that something assign an IP address to your board.<br />
So turn on your Rock64. It will now spin up and try to boot from SD, eMMC, USB and PXE, and it will fail in all of these tentatives because it has no cards installed and the network boot is not yet configured. Nevertheless, when it tries the PXE the board will get an IP and it will announce its existence to the local network. This means that after few seconds that the ethernet led flashes you can write on your Debian server<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>arp -a</code></div></div>and you will get the list of connected devices on the network with their IP address and hardware address.<br />
Write down the ethernet address; the one that I will use in my example is 56:31:cd:bb:92:7b.<br />
<span style="font-weight: bold;" class="mycode_b">Step 3: the DHCP server.</span><br />
We need a DHCP server capable of some advanced features if you have the DHCP on your router you have to disable it and from this moment on you will use the DHCP on your Debian server.<br />
Install it with<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install isc-dhcp-server</code></div></div>Once installed edit the /etc/dhcp/dhcpd.conf in this way<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ddns-update-style none;<br />
option domain-name "whatever.com";<br />
option domain-name-servers 192.168.0.1;<br />
default-lease-time 6000;<br />
max-lease-time 72000;<br />
log-facility local7;<br />
<br />
subnet 192.168.0.0 netmask 255.255.255.0 {<br />
   range 192.168.0.2 192.168.0.99;<br />
   option subnet-mask 255.255.255.0;<br />
   option broadcast-address 192.168.0.255;<br />
   option routers 192.168.0.1;<br />
   option domain-name-servers 192.168.0.1;<br />
}<br />
<br />
host rock64pro {<br />
  hardware ethernet 56:31:cd:bb:92:7b;<br />
  fixed-address 192.168.0.100;<br />
  next-server 192.168.0.1;<br />
}<br />
authoritative;</code></div></div>I don't want to go into the details but basically this configuration allocates random addresses between 192.168.0.2 and 192.168.0.99 for the normal devices (like computers or telephones) and assign the 192.168.0.100 to the rock64pro identifying it with the ethernet address that we find in the previous step. Moreover, and this is the advanced feature, the server will tell to the rock64pro that after it takes the address it has to communicate with 192.168.0.1 for "further instructions" (the next-server directive).<br />
<span style="font-weight: bold;" class="mycode_b">Here I am assuming that 192.168.0.1 is the IP address of the Debian server.</span><br />
Once this file is in place restart the DHCP server with<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo systemctl restart isc-dhcp-server</code></div></div> You can test if this configuration works turning on the Rock64pro board, waiting couple of seconds and try again the arp -a. If everything is fine you should see that now the Rock has the address 192.168.0.100.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 4: TFTP server</span><br />
We have now to instruct the Rock64pro for the next step. The way to take information is through a special version of an ftp server called tftp (t is for trivial). So we need a tftp server running on our Debian and to install it we do<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install tftp-hpa</code></div></div>once installed edit the file /etc/defaults/tftpd-hpa as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>TFTP_USERNAME="tftp"<br />
TFTP_DIRECTORY="/storage/pxe-boot/tftp"<br />
TFTP_ADDRESS="192.168.0.1:69"<br />
TFTP_OPTIONS="--secure"</code></div></div>here I am assuming that we will store the data to boot the Rock64pro into a directory /storage/pxe-boot and in this directory we will put all the files for the boot and for the operating system.<br />
So we need to do these steps<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mkdir /storage<br />
sudo mkdir /storage/rock64pro<br />
sudo mkdir /storage/tftp<br />
sudo mkdir /storage/tftp/pxelinux.cfg</code></div></div>  In rock64pro we will put the operating system (the content of the boot image) while in the tftp we will put all the files to the initial boot procedure (linux kernel and its configurations).<br />
Now we can restart the tftp server<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo systemctl restart tftpd-hpa</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Step 5: NFS server</span><br />
The kernel and the boot execution is provided through the tftp server, but the operating system will live entirely on a folder that will be served to the rock64pro through NFS, so we need a working NFS server.<br />
To install it<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install nfs-kernel-server rpcbind</code></div></div>the edit the file /etc/exports as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/storage/pxe-boot/rock64pro     *(rw,sync,no_root_squash)</code></div></div>and the file /etc/hosts.allow as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>portmap: 192.168.0.</code></div></div>The first file says to NFS server that has to export the directory <span style="font-size: small;" class="mycode_size"><span style="font-family: Monaco, Consolas, Courier, monospace;" class="mycode_font">/storage/pxe-boot/rock64pro to everyone with specific flags (read/write, sync, and no limitation for root). The second file allows the IPs of the subnet 192.168.0.x to connect to the NFS server. You may want to limit the NFS server only to the IP of the rock64pro substituting 192.168.0.100 to the * of the exports file and writing the full ip into the hosts.allow.</span></span><br />
Restart the NFS server with<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo systemctl restart nfs-kernel-server</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Step 6: setup the filesystem</span><br />
Download the Debian image for your Rock card from this <a href="https://github.com/ayufan-rock64/linux-build/releases" target="_blank" rel="noopener" class="mycode_url">link</a> (you can use wget). I used the stretch-minimal-rockpro64-0.7.11-1075-arm64.img.xz. Uncompress it with<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>unxz stretch-minimal-rockpro64-0.7.11-1075-arm64.img.xz</code></div></div><br />
Once downloaded you have to mount the linux partition contained in the img file. The file contains also another partition that is to boot and we are not interested in it, so we have to find the right position of the linux. To do it we use fdisk as<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo fdisk -l stretch-minimal-rockpro64-0.7.11-1075-arm64.img</code></div></div>the result is something like<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Disk stretch-minimal-rockpro64-0.7.11-1075-arm64.img: 2 GiB, 2144337920 bytes, 4188160 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: gpt<br />
Disk identifier: FB84DCAE-4E0E-486F-890C-A979BEECCFF9<br />
<br />
Device                                            Start     End Sectors  Size Type<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img1     64    8063    8000  3.9M Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img2   8064    8191     128   64K Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img3   8192   16383    8192    4M Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img4  16384   24575    8192    4M Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img5  24576   32767    8192    4M Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img6  32768  262143  229376  112M Microsoft basic data<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img7 262144 4186111 3923968  1.9G Linux filesystem</code></div></div>Here you have to identify two things: the first one is the size of one unit sector (512 bytes) and the second information is the begin of the filesystem that we are looking for. In our case it is the last one and we know because is the one of 1.9GB of size. Then this filesystem starts at the position 262144. Now we multiply these two numbers: 512x262144=134217728. This is the starting position of the linux partition. We can use it to mount the partition as<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mkdir /storage/tmpimage<br />
sudo mount -o loop,offset=134217728 stretch-minimal-rockpro64-0.7.11-1075-arm64.img /storage/tmpimage</code></div></div><br />
now we copy the content of the filesystem into our nfs server. I use rsync to do it because I trust the way it preserves permissions and links, but probably a simple cp -a can do the job.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo rsync -val /storage/tmpimage/* /storage/pxe-boot/rock64pro/</code></div></div>After the sync the image is no longer needed<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo umount /storage/tmpimage<br />
sudo rmdir /storage/tmpimage<br />
sudo rm stretch-minimal-rockpro64-0.7.11-1075-arm64.img</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Step 7: Finalize the boot</span><br />
We have now the system ready, we need only to put in the tftp directory the instructions to send the kernel to the board for the boot.<br />
To do this we first copy the boot folder of the rock64pro filesystem to the tftp directory. We need to do it because we need to provide the kernel via tftp before mounting the NFS root.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo rsync -val /storage/pxe-boot/rock64pro/boot /storage/pxe-boot/tftp/</code></div></div><br />
finally we need to provide to the board the extlinux.conf boot file. When the Rock boots it searches for a boot file with various names, we will use the pxelinux.cfg/default-arm-rockchip. So we first copy the extlinux.conf as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo cp /storage/pxe-boot/tftp/boot/extlinux/extlinux.conf /storage/pxe-boot/tftp/pxelinux.cfg/default-arm-rockchip</code></div></div>then we need to edit this file because by default it will try to load the kernel from the storage device (SD Card) but we want to mount the root directory from the nfs server. So edit it, remove the second block and modify the line of root as the following<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>timeout 10<br />
menu title select kernel<br />
<br />
label kernel-4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1<br />
    kernel /boot/vmlinuz-4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1<br />
    initrd /boot/initrd.img-4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1<br />
    devicetreedir /boot/dtbs/4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1<br />
    append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=&#36;{ethaddr} eth1addr=&#36;{eth1addr} serial=&#36;{serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=/dev/nfs nfsroot=&#36;{serverip}:/storage/pxe-boot/rock64pro rootwait rootfstype=ext4</code></div></div>the only part to modify is the root= and the nfsroot= the rest of the file is the same as the extlinux.conf.<br />
Finally, the SD card mounts the boot directory from a vfat partition while we are using our tftp boot, so we need to fix this.<br />
The way is to edit the file /storage/pxe-boot/rock64pro/etc/fstab and remove the line about the boot (that should be the only one, so the final file will be empty).<br />
<span style="font-weight: bold;" class="mycode_b">Known Issues.</span><br />
The reboot does't work always. It seems that the tftp server stucks and doesn't work in the next boot. I will try another tftp server.<br />
The workaround is to force kill the tftpd and restart it.<br />
<br />
If in the update process some component of the boot is upgraded, it is necessary to update the tftp boot folder and the pxelinux.cfg/default-arm-rockchip.]]></description>
			<content:encoded><![CDATA[I haven't find a guide to setup a proper PXE boot for Rock64 (and Pine64) cards, so I will write down mine here hoping that it is useful.<br />
<br />
In this guide I assume that the user is familiar with Linux, another assumption is about the distributions:<br />
- on the Rock64 card we are going to install the Debian minimal;<br />
- on the server that will provide the operating system I use Debian.<br />
I think this guide can work for other distributions too but I haven't tried other combinations.<br />
For the rest of the guide<span style="font-weight: bold;" class="mycode_b"> all the commands will run on the server Debian.</span><br />
<br />
About the hardware I tried on a Rock64pro, I have also a Pine64 and a Rock64 but are in production and I needed a spare board to do the tests. Now that it works I will try also for the others, but for this guide I assume the Rock64pro.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 1: Flash the SPI</span><br />
This is actually the only step that requires an SD card.<br />
The SPI is a little memory (128MB) that can be flashed to add instruction at the boot time. Ayufan has a nice SPI image that adds the possibility to boot from network (PXE), and we are going to use it.<br />
<br />
So go to this <a href="https://github.com/ayufan-rock64/linux-u-boot/releases" target="_blank" rel="noopener" class="mycode_url">link</a> and download the image file that is useful for your system. I used the u-boot-flash-spi-rockpro64.img.xz file.<br />
Uncompress it with<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>unxz u-boot-flash-spi-rockpro64.img.xz</code></div></div>and flash it on the SD card with dd<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>dd bs=1M if=u-boot-flash-spi-rockpro64.img of=/dev/sd&lt;SOMETHING&gt;</code></div></div>Put the card into the Rock64 board and boot it. I had no monitor connected so I do not know what it writes on a screen, but it is enough that you wait some time (one minute is probably enough) and you will see the boot (white) led flashing once per second. It means that the SPI is flashed. You can now turn off the board and remove the SD card.<br />
<span style="font-weight: bold;" class="mycode_b">Step 2: find the ethernet address of the board.</span><br />
I assume that you have already a DHCP server installed in your network that assign the addresses to every device connected.<br />
If this DHCP server is the router of your internet connection you will have to change it later (unless is a very advanced router and you can specify advanced features). In any case to identify the mac address is sufficient that something assign an IP address to your board.<br />
So turn on your Rock64. It will now spin up and try to boot from SD, eMMC, USB and PXE, and it will fail in all of these tentatives because it has no cards installed and the network boot is not yet configured. Nevertheless, when it tries the PXE the board will get an IP and it will announce its existence to the local network. This means that after few seconds that the ethernet led flashes you can write on your Debian server<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>arp -a</code></div></div>and you will get the list of connected devices on the network with their IP address and hardware address.<br />
Write down the ethernet address; the one that I will use in my example is 56:31:cd:bb:92:7b.<br />
<span style="font-weight: bold;" class="mycode_b">Step 3: the DHCP server.</span><br />
We need a DHCP server capable of some advanced features if you have the DHCP on your router you have to disable it and from this moment on you will use the DHCP on your Debian server.<br />
Install it with<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install isc-dhcp-server</code></div></div>Once installed edit the /etc/dhcp/dhcpd.conf in this way<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>ddns-update-style none;<br />
option domain-name "whatever.com";<br />
option domain-name-servers 192.168.0.1;<br />
default-lease-time 6000;<br />
max-lease-time 72000;<br />
log-facility local7;<br />
<br />
subnet 192.168.0.0 netmask 255.255.255.0 {<br />
   range 192.168.0.2 192.168.0.99;<br />
   option subnet-mask 255.255.255.0;<br />
   option broadcast-address 192.168.0.255;<br />
   option routers 192.168.0.1;<br />
   option domain-name-servers 192.168.0.1;<br />
}<br />
<br />
host rock64pro {<br />
  hardware ethernet 56:31:cd:bb:92:7b;<br />
  fixed-address 192.168.0.100;<br />
  next-server 192.168.0.1;<br />
}<br />
authoritative;</code></div></div>I don't want to go into the details but basically this configuration allocates random addresses between 192.168.0.2 and 192.168.0.99 for the normal devices (like computers or telephones) and assign the 192.168.0.100 to the rock64pro identifying it with the ethernet address that we find in the previous step. Moreover, and this is the advanced feature, the server will tell to the rock64pro that after it takes the address it has to communicate with 192.168.0.1 for "further instructions" (the next-server directive).<br />
<span style="font-weight: bold;" class="mycode_b">Here I am assuming that 192.168.0.1 is the IP address of the Debian server.</span><br />
Once this file is in place restart the DHCP server with<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo systemctl restart isc-dhcp-server</code></div></div> You can test if this configuration works turning on the Rock64pro board, waiting couple of seconds and try again the arp -a. If everything is fine you should see that now the Rock has the address 192.168.0.100.<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 4: TFTP server</span><br />
We have now to instruct the Rock64pro for the next step. The way to take information is through a special version of an ftp server called tftp (t is for trivial). So we need a tftp server running on our Debian and to install it we do<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install tftp-hpa</code></div></div>once installed edit the file /etc/defaults/tftpd-hpa as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>TFTP_USERNAME="tftp"<br />
TFTP_DIRECTORY="/storage/pxe-boot/tftp"<br />
TFTP_ADDRESS="192.168.0.1:69"<br />
TFTP_OPTIONS="--secure"</code></div></div>here I am assuming that we will store the data to boot the Rock64pro into a directory /storage/pxe-boot and in this directory we will put all the files for the boot and for the operating system.<br />
So we need to do these steps<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mkdir /storage<br />
sudo mkdir /storage/rock64pro<br />
sudo mkdir /storage/tftp<br />
sudo mkdir /storage/tftp/pxelinux.cfg</code></div></div>  In rock64pro we will put the operating system (the content of the boot image) while in the tftp we will put all the files to the initial boot procedure (linux kernel and its configurations).<br />
Now we can restart the tftp server<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo systemctl restart tftpd-hpa</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Step 5: NFS server</span><br />
The kernel and the boot execution is provided through the tftp server, but the operating system will live entirely on a folder that will be served to the rock64pro through NFS, so we need a working NFS server.<br />
To install it<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get install nfs-kernel-server rpcbind</code></div></div>the edit the file /etc/exports as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/storage/pxe-boot/rock64pro     *(rw,sync,no_root_squash)</code></div></div>and the file /etc/hosts.allow as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>portmap: 192.168.0.</code></div></div>The first file says to NFS server that has to export the directory <span style="font-size: small;" class="mycode_size"><span style="font-family: Monaco, Consolas, Courier, monospace;" class="mycode_font">/storage/pxe-boot/rock64pro to everyone with specific flags (read/write, sync, and no limitation for root). The second file allows the IPs of the subnet 192.168.0.x to connect to the NFS server. You may want to limit the NFS server only to the IP of the rock64pro substituting 192.168.0.100 to the * of the exports file and writing the full ip into the hosts.allow.</span></span><br />
Restart the NFS server with<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo systemctl restart nfs-kernel-server</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Step 6: setup the filesystem</span><br />
Download the Debian image for your Rock card from this <a href="https://github.com/ayufan-rock64/linux-build/releases" target="_blank" rel="noopener" class="mycode_url">link</a> (you can use wget). I used the stretch-minimal-rockpro64-0.7.11-1075-arm64.img.xz. Uncompress it with<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>unxz stretch-minimal-rockpro64-0.7.11-1075-arm64.img.xz</code></div></div><br />
Once downloaded you have to mount the linux partition contained in the img file. The file contains also another partition that is to boot and we are not interested in it, so we have to find the right position of the linux. To do it we use fdisk as<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo fdisk -l stretch-minimal-rockpro64-0.7.11-1075-arm64.img</code></div></div>the result is something like<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Disk stretch-minimal-rockpro64-0.7.11-1075-arm64.img: 2 GiB, 2144337920 bytes, 4188160 sectors<br />
Units: sectors of 1 * 512 = 512 bytes<br />
Sector size (logical/physical): 512 bytes / 512 bytes<br />
I/O size (minimum/optimal): 512 bytes / 512 bytes<br />
Disklabel type: gpt<br />
Disk identifier: FB84DCAE-4E0E-486F-890C-A979BEECCFF9<br />
<br />
Device                                            Start     End Sectors  Size Type<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img1     64    8063    8000  3.9M Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img2   8064    8191     128   64K Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img3   8192   16383    8192    4M Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img4  16384   24575    8192    4M Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img5  24576   32767    8192    4M Linux filesystem<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img6  32768  262143  229376  112M Microsoft basic data<br />
stretch-minimal-rockpro64-0.7.11-1075-arm64.img7 262144 4186111 3923968  1.9G Linux filesystem</code></div></div>Here you have to identify two things: the first one is the size of one unit sector (512 bytes) and the second information is the begin of the filesystem that we are looking for. In our case it is the last one and we know because is the one of 1.9GB of size. Then this filesystem starts at the position 262144. Now we multiply these two numbers: 512x262144=134217728. This is the starting position of the linux partition. We can use it to mount the partition as<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mkdir /storage/tmpimage<br />
sudo mount -o loop,offset=134217728 stretch-minimal-rockpro64-0.7.11-1075-arm64.img /storage/tmpimage</code></div></div><br />
now we copy the content of the filesystem into our nfs server. I use rsync to do it because I trust the way it preserves permissions and links, but probably a simple cp -a can do the job.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo rsync -val /storage/tmpimage/* /storage/pxe-boot/rock64pro/</code></div></div>After the sync the image is no longer needed<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo umount /storage/tmpimage<br />
sudo rmdir /storage/tmpimage<br />
sudo rm stretch-minimal-rockpro64-0.7.11-1075-arm64.img</code></div></div><br />
<span style="font-weight: bold;" class="mycode_b">Step 7: Finalize the boot</span><br />
We have now the system ready, we need only to put in the tftp directory the instructions to send the kernel to the board for the boot.<br />
To do this we first copy the boot folder of the rock64pro filesystem to the tftp directory. We need to do it because we need to provide the kernel via tftp before mounting the NFS root.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo rsync -val /storage/pxe-boot/rock64pro/boot /storage/pxe-boot/tftp/</code></div></div><br />
finally we need to provide to the board the extlinux.conf boot file. When the Rock boots it searches for a boot file with various names, we will use the pxelinux.cfg/default-arm-rockchip. So we first copy the extlinux.conf as<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo cp /storage/pxe-boot/tftp/boot/extlinux/extlinux.conf /storage/pxe-boot/tftp/pxelinux.cfg/default-arm-rockchip</code></div></div>then we need to edit this file because by default it will try to load the kernel from the storage device (SD Card) but we want to mount the root directory from the nfs server. So edit it, remove the second block and modify the line of root as the following<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>timeout 10<br />
menu title select kernel<br />
<br />
label kernel-4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1<br />
    kernel /boot/vmlinuz-4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1<br />
    initrd /boot/initrd.img-4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1<br />
    devicetreedir /boot/dtbs/4.4.154-1124-rockchip-ayufan-ged3ce4d15ec1<br />
    append rw panic=10 init=/sbin/init coherent_pool=1M ethaddr=&#36;{ethaddr} eth1addr=&#36;{eth1addr} serial=&#36;{serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 root=/dev/nfs nfsroot=&#36;{serverip}:/storage/pxe-boot/rock64pro rootwait rootfstype=ext4</code></div></div>the only part to modify is the root= and the nfsroot= the rest of the file is the same as the extlinux.conf.<br />
Finally, the SD card mounts the boot directory from a vfat partition while we are using our tftp boot, so we need to fix this.<br />
The way is to edit the file /storage/pxe-boot/rock64pro/etc/fstab and remove the line about the boot (that should be the only one, so the final file will be empty).<br />
<span style="font-weight: bold;" class="mycode_b">Known Issues.</span><br />
The reboot does't work always. It seems that the tftp server stucks and doesn't work in the next boot. I will try another tftp server.<br />
The workaround is to force kill the tftpd and restart it.<br />
<br />
If in the update process some component of the boot is upgraded, it is necessary to update the tftp boot folder and the pxelinux.cfg/default-arm-rockchip.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Install Standard Debian (upstream)]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=6433</link>
			<pubDate>Sun, 19 Aug 2018 20:26:56 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=7369">Catbot</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=6433</guid>
			<description><![CDATA[Greetings everybody,<br />
<br />
Today on my quest to enable the rock64 for my purposes I had just one goal:<br />
Install upstream debian testing (buster) without any customizations.<br />
<br />
Sadly I did not achieve this goal fully; However I believe I got extremely close. See below for the one bugreport I opened to have the last piece upstreamed.<br />
<br />
So here are the steps from an existing debian system running on the board (mostly in pseudo-code because the difficulty level isn't novice):<br />
<br />
0. Install U-Boot to SPI Flash<br />
- <a href="https://github.com/ayufan-rock64/linux-u-boot/releases" target="_blank" rel="noopener" class="mycode_url">https://github.com/ayufan-rock64/linux-u-boot/releases</a><br />
<br />
1. Partition (e)MMC<br />
 - 100MiB EFI partition (fat)<br />
 - 1GiB boot partition (ext4)<br />
 - 57GiB rootfs partition (f2fs)<br />
<br />
2. mount filesystems<br />
 - rootfs: /mnt<br />
 - boot: /mnt/boot<br />
 - efi: /mnt/boot/efi<br />
<br />
3. bootstrap debian<br />
 - debootstrap --arch=arm64 --variant=minbase buster /mnt <a href="http://deb/debian.org/debian" target="_blank" rel="noopener" class="mycode_url">http://deb/debian.org/debian</a><br />
<br />
4. mount additional filesystems<br />
 - mount -vt sysfs sysfs /mnt/sys<br />
 - mount -vt proc proc /mnt/proc<br />
 - mount --bind /dev /mnt/dev<br />
 - mount --bind /dev/pts /mnt/dev/pts<br />
 - mount --make-rslave /mnt/dev<br />
 - mount --make-rslave /mnt/dev/pts<br />
<br />
5. install additional software<br />
 - tasksel ssh-server (this is a little messy in a chroot)<br />
 - apt install linux-image-arm64 grub-efi-arm64<br />
 - apt install ifupdown locales<br />
<br />
6. configure system<br />
 - /etc/initramfs-tools/modules: f2fs<br />
 - /etc/default/grub: GRUB_CMDLINE_LINUX="earlycon=uart8250,mmio32,0xff130000 console=ttyS2,1500000"<br />
 - /etc/default/grub: if [ -z "&#36;GRUB_DEVICE_UUID" ] &amp;&amp; [ -n "&#36;GRUB_DEVICE" ]; then GRUB_DEVICE_UUID=`blkid -s UUID -o value "&#36;GRUB_DEVICE"`; fi<br />
 - dpkg-reconfigure locales<br />
 - dpkg-reconfigure tzdata<br />
 - /etc/network/interfaces: auto eth0<br />
 - /etc/network/interfaces: iface eth0 inet dhcp<br />
 - /etc/network/interfaces: iface eth0 inet6 auto<br />
<br />
7. make it bootable<br />
 - update-initramfs -u<br />
 - grub-install --target=arm64-efi --removable<br />
 - update-grub<br />
 - copy /usr/lib/linux-image-4.17.0-1-arm64/rockchip/rk3328-rock64.dtb to /boot/efi/rockchip/rk3328-rock64.dtb<br />
<br />
At this point the system could be rebooted and should automagically start up through grub.However one piece is still missing:<br />
When the DTB gets updated with a new debian kernel, the copy on the EFI partition has to be updated as well.<br />
For this we use the debian specific flash-kernel application by adding the following entry to /etc/flash-kernel/db:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Machine: Pine64 Rock64<br />
Boot-DTB-Path: /boot/efi/rockchip/rk3328-rock64.dtb<br />
DTB-Id: rockchip/rk3328-rock64.dtb</code></div></div><br />
This bit of magic makes sure that on every kernel update the rk3328-rock64.dtb gets copied to the EFI partition where U-Boot can load it *before* executing grub.<br />
This is necessary because grub-mkconfig can not guess where the devicetree is and how it is called.<br />
I have opened a bugreport against debian to have this piece included upstream: <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906696" target="_blank" rel="noopener" class="mycode_url">https://bugs.debian.org/cgi-bin/bugrepor...bug=906696</a><br />
<br />
I strongly believe that debian-installer could be used from a usb drive to install debian. It would be much easier than the instructions above, especially when a preseed file is used for automation.]]></description>
			<content:encoded><![CDATA[Greetings everybody,<br />
<br />
Today on my quest to enable the rock64 for my purposes I had just one goal:<br />
Install upstream debian testing (buster) without any customizations.<br />
<br />
Sadly I did not achieve this goal fully; However I believe I got extremely close. See below for the one bugreport I opened to have the last piece upstreamed.<br />
<br />
So here are the steps from an existing debian system running on the board (mostly in pseudo-code because the difficulty level isn't novice):<br />
<br />
0. Install U-Boot to SPI Flash<br />
- <a href="https://github.com/ayufan-rock64/linux-u-boot/releases" target="_blank" rel="noopener" class="mycode_url">https://github.com/ayufan-rock64/linux-u-boot/releases</a><br />
<br />
1. Partition (e)MMC<br />
 - 100MiB EFI partition (fat)<br />
 - 1GiB boot partition (ext4)<br />
 - 57GiB rootfs partition (f2fs)<br />
<br />
2. mount filesystems<br />
 - rootfs: /mnt<br />
 - boot: /mnt/boot<br />
 - efi: /mnt/boot/efi<br />
<br />
3. bootstrap debian<br />
 - debootstrap --arch=arm64 --variant=minbase buster /mnt <a href="http://deb/debian.org/debian" target="_blank" rel="noopener" class="mycode_url">http://deb/debian.org/debian</a><br />
<br />
4. mount additional filesystems<br />
 - mount -vt sysfs sysfs /mnt/sys<br />
 - mount -vt proc proc /mnt/proc<br />
 - mount --bind /dev /mnt/dev<br />
 - mount --bind /dev/pts /mnt/dev/pts<br />
 - mount --make-rslave /mnt/dev<br />
 - mount --make-rslave /mnt/dev/pts<br />
<br />
5. install additional software<br />
 - tasksel ssh-server (this is a little messy in a chroot)<br />
 - apt install linux-image-arm64 grub-efi-arm64<br />
 - apt install ifupdown locales<br />
<br />
6. configure system<br />
 - /etc/initramfs-tools/modules: f2fs<br />
 - /etc/default/grub: GRUB_CMDLINE_LINUX="earlycon=uart8250,mmio32,0xff130000 console=ttyS2,1500000"<br />
 - /etc/default/grub: if [ -z "&#36;GRUB_DEVICE_UUID" ] &amp;&amp; [ -n "&#36;GRUB_DEVICE" ]; then GRUB_DEVICE_UUID=`blkid -s UUID -o value "&#36;GRUB_DEVICE"`; fi<br />
 - dpkg-reconfigure locales<br />
 - dpkg-reconfigure tzdata<br />
 - /etc/network/interfaces: auto eth0<br />
 - /etc/network/interfaces: iface eth0 inet dhcp<br />
 - /etc/network/interfaces: iface eth0 inet6 auto<br />
<br />
7. make it bootable<br />
 - update-initramfs -u<br />
 - grub-install --target=arm64-efi --removable<br />
 - update-grub<br />
 - copy /usr/lib/linux-image-4.17.0-1-arm64/rockchip/rk3328-rock64.dtb to /boot/efi/rockchip/rk3328-rock64.dtb<br />
<br />
At this point the system could be rebooted and should automagically start up through grub.However one piece is still missing:<br />
When the DTB gets updated with a new debian kernel, the copy on the EFI partition has to be updated as well.<br />
For this we use the debian specific flash-kernel application by adding the following entry to /etc/flash-kernel/db:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>Machine: Pine64 Rock64<br />
Boot-DTB-Path: /boot/efi/rockchip/rk3328-rock64.dtb<br />
DTB-Id: rockchip/rk3328-rock64.dtb</code></div></div><br />
This bit of magic makes sure that on every kernel update the rk3328-rock64.dtb gets copied to the EFI partition where U-Boot can load it *before* executing grub.<br />
This is necessary because grub-mkconfig can not guess where the devicetree is and how it is called.<br />
I have opened a bugreport against debian to have this piece included upstream: <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906696" target="_blank" rel="noopener" class="mycode_url">https://bugs.debian.org/cgi-bin/bugrepor...bug=906696</a><br />
<br />
I strongly believe that debian-installer could be used from a usb drive to install debian. It would be much easier than the instructions above, especially when a preseed file is used for automation.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Using the Movidius NCS with rock64]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=6235</link>
			<pubDate>Mon, 02 Jul 2018 15:51:12 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=8883">markjay</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=6235</guid>
			<description><![CDATA[hello friends,<br />
<br />
Although the movidius NCS doesn't officially support the rock64, I was able to modify the install scripts to get it working. I went with the Bionic-LXDE operating system (since it appears to be the most stable DE). Note that this is version 1 of the SDK. Future plans is to convert version 2 soon.<br />
<br />
I created a github repo with instructions on how to set everything up<br />
<a href="https://github.com/markjay4k/ncsdk-aarch64" target="_blank" rel="noopener" class="mycode_url">https://github.com/markjay4k/ncsdk-aarch64</a><br />
<br />
basically just <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone https://github.com/markjay4k/ncsdk-aarch64.git<br />
cd ncsdk-aarch64<br />
sudo make install<br />
source ~/.bashrc<br />
sudo make api</code></div></div><br />
<br />
If you want to install tensorflow, I made an aarch64 version<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone https://github.com/markjay4k/Tensorflow-1.9rc0-py36-aarch64.git<br />
pip3 install Tensorflow-1.9rc0-py36-aarch64/tensorflow-1.9.0rc0-cp36-cp36m-linux_aarch64.whl</code></div></div><br />
then, to build the examples, run<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo make examples</code></div></div><br />
<br />
Also you can watch a video I made that goes through all the steps as well<br />
<a href="https://www.youtube.com/watch?v=AXzIYk7-lr8&amp;lc=z22ljlc4hsiqsdook04t1aokguwn3nd1c3lavrusjyhibk0h00410" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=AXzIYk7-...ibk0h00410</a><br />
<br />
good luck!!<br />
<br />
Mark Jay]]></description>
			<content:encoded><![CDATA[hello friends,<br />
<br />
Although the movidius NCS doesn't officially support the rock64, I was able to modify the install scripts to get it working. I went with the Bionic-LXDE operating system (since it appears to be the most stable DE). Note that this is version 1 of the SDK. Future plans is to convert version 2 soon.<br />
<br />
I created a github repo with instructions on how to set everything up<br />
<a href="https://github.com/markjay4k/ncsdk-aarch64" target="_blank" rel="noopener" class="mycode_url">https://github.com/markjay4k/ncsdk-aarch64</a><br />
<br />
basically just <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone https://github.com/markjay4k/ncsdk-aarch64.git<br />
cd ncsdk-aarch64<br />
sudo make install<br />
source ~/.bashrc<br />
sudo make api</code></div></div><br />
<br />
If you want to install tensorflow, I made an aarch64 version<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>git clone https://github.com/markjay4k/Tensorflow-1.9rc0-py36-aarch64.git<br />
pip3 install Tensorflow-1.9rc0-py36-aarch64/tensorflow-1.9.0rc0-cp36-cp36m-linux_aarch64.whl</code></div></div><br />
then, to build the examples, run<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo make examples</code></div></div><br />
<br />
Also you can watch a video I made that goes through all the steps as well<br />
<a href="https://www.youtube.com/watch?v=AXzIYk7-lr8&amp;lc=z22ljlc4hsiqsdook04t1aokguwn3nd1c3lavrusjyhibk0h00410" target="_blank" rel="noopener" class="mycode_url">https://www.youtube.com/watch?v=AXzIYk7-...ibk0h00410</a><br />
<br />
good luck!!<br />
<br />
Mark Jay]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[OMV - transmission watch fix]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=5732</link>
			<pubDate>Sun, 18 Feb 2018 23:18:20 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=8170">S3phi40T</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=5732</guid>
			<description><![CDATA[How to fix "watch" in OMV - transmission plugin:<br />
<br />
Watch option checks for *.torrent files in folder and starts downloading them straight away.<br />
<span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b">OMV by default doesn't let users use Internal memory.</span></span><br />
Yes, even home folders (if enabled) are stored on external drive (as a workaround they can be symlinked).<br />
<br />
<br />
<br />
For some reason if "watch" folder is pointed to external drive and file added by SMB share, it checks the "watch" folder only once when daemon start.<br />
<br />
Here is quick fix:<br />
<br />
In OMV Samba config add to additional options for symbolic links supoprt:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>follow symlinks = yes<br />
unix extensions = no<br />
wide links = yes<br />
allow insecure wide links = yes</code></div></div><br />
<br />
create symlink (either manually or via "openmediavault-symlinks" extension) <br />
<br />
make sure appropriate rights are given to linked folder (chmod 777)<br />
<br />
Point Watch directory to symlinked folder (as OMV doesn't support internal storage).<br />
<br />
Restart Rock64<br />
<br />
Now Watch should work properly. It does for me at least <img src="https://forum.pine64.org/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" />]]></description>
			<content:encoded><![CDATA[How to fix "watch" in OMV - transmission plugin:<br />
<br />
Watch option checks for *.torrent files in folder and starts downloading them straight away.<br />
<span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b">OMV by default doesn't let users use Internal memory.</span></span><br />
Yes, even home folders (if enabled) are stored on external drive (as a workaround they can be symlinked).<br />
<br />
<br />
<br />
For some reason if "watch" folder is pointed to external drive and file added by SMB share, it checks the "watch" folder only once when daemon start.<br />
<br />
Here is quick fix:<br />
<br />
In OMV Samba config add to additional options for symbolic links supoprt:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>follow symlinks = yes<br />
unix extensions = no<br />
wide links = yes<br />
allow insecure wide links = yes</code></div></div><br />
<br />
create symlink (either manually or via "openmediavault-symlinks" extension) <br />
<br />
make sure appropriate rights are given to linked folder (chmod 777)<br />
<br />
Point Watch directory to symlinked folder (as OMV doesn't support internal storage).<br />
<br />
Restart Rock64<br />
<br />
Now Watch should work properly. It does for me at least <img src="https://forum.pine64.org/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Guide - XRDP - Debian Stretch / Ubuntu Xenial / OMV]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=5671</link>
			<pubDate>Wed, 07 Feb 2018 11:02:15 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=8170">S3phi40T</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=5671</guid>
			<description><![CDATA[<span style="color: #333333;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Preface<br />
</span></span></span><br />
<br />
<span style="color: #333333;" class="mycode_color">This quick and simple guide will show how to connect to your Rock64 with Windows native Remote Desktop Connection client.</span><br />
<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="color: #333333;" class="mycode_color"><span style="font-size: medium;" class="mycode_size">Prerequisites</span></span></span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">ROCK64 board running Debian or Ubuntu, connected to the local network</span><br />
<br />
<span style="color: #333333;" class="mycode_color">Access to terminal, either locally or via SSH</span><br />
<br />
<span style="color: #333333;" class="mycode_color">Some basic understanding of using the linux terminal</span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">____________________</span></span><br />
<br />
<br />
<span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Debian</span>:</span></span><br />
<br />
Make sure you do not have any other VNC servers installed like vnc4server or tightvncserver.<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt remove xrdp vnc4server tightvncserver</code></div></div><br />
Install xrdp and tigervnc server<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install -y xrdp tigervnc-standalone-server</code></div></div><br />
<br />
Swap places Xorg with Xvnc so Xvnc goes first.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo nano /etc/xdrp/xdrp.ini</code></div></div><br />
<br />
Connect via Xvnc (first in the client list) with native Windows Remote Desktop client.<br />
<br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b">Ubuntu (the same setup as Raspberry PI):</span></span></span><br />
<br />
Remove other VNC servers<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get remove xrdp vnc4server tightvncserver</code></div></div><br />
Install tightvncserver and xrdp<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install -y tightvncserver xrdp</code></div></div><br />
Connect via Xorg (first in the client list) with native Windows Remote Desktop client.<br />
<br />
<br />
<span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">OMV armhf</span>:</span></span><br />
<br />
Download:<br />
libssl1.0.0_1.0.1t-1+deb8u7_armhf.deb<br />
<a href="https://packages.debian.org/jessie/armhf/libssl1.0.0/download" target="_blank" rel="noopener" class="mycode_url">https://packages.debian.org/jessie/armhf...0/download</a><br />
<br />
xrdp_0.6.1-2_armhf.deb<br />
<a href="https://packages.debian.org/jessie/armhf/xrdp/download" target="_blank" rel="noopener" class="mycode_url">https://packages.debian.org/jessie/armhf/xrdp/download</a><br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u7_armhf.deb<br />
sudo dpkg -i xrdp_0.6.1-2_armhf.deb</code></div></div>]]></description>
			<content:encoded><![CDATA[<span style="color: #333333;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Preface<br />
</span></span></span><br />
<br />
<span style="color: #333333;" class="mycode_color">This quick and simple guide will show how to connect to your Rock64 with Windows native Remote Desktop Connection client.</span><br />
<br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="color: #333333;" class="mycode_color"><span style="font-size: medium;" class="mycode_size">Prerequisites</span></span></span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">ROCK64 board running Debian or Ubuntu, connected to the local network</span><br />
<br />
<span style="color: #333333;" class="mycode_color">Access to terminal, either locally or via SSH</span><br />
<br />
<span style="color: #333333;" class="mycode_color">Some basic understanding of using the linux terminal</span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color"><span style="font-weight: bold;" class="mycode_b">____________________</span></span><br />
<br />
<br />
<span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">Debian</span>:</span></span><br />
<br />
Make sure you do not have any other VNC servers installed like vnc4server or tightvncserver.<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt remove xrdp vnc4server tightvncserver</code></div></div><br />
Install xrdp and tigervnc server<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install -y xrdp tigervnc-standalone-server</code></div></div><br />
<br />
Swap places Xorg with Xvnc so Xvnc goes first.<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo nano /etc/xdrp/xdrp.ini</code></div></div><br />
<br />
Connect via Xvnc (first in the client list) with native Windows Remote Desktop client.<br />
<br />
<br />
<br />
<span style="font-size: large;" class="mycode_size"><span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b">Ubuntu (the same setup as Raspberry PI):</span></span></span><br />
<br />
Remove other VNC servers<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt-get remove xrdp vnc4server tightvncserver</code></div></div><br />
Install tightvncserver and xrdp<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install -y tightvncserver xrdp</code></div></div><br />
Connect via Xorg (first in the client list) with native Windows Remote Desktop client.<br />
<br />
<br />
<span style="text-decoration: underline;" class="mycode_u"><span style="font-weight: bold;" class="mycode_b"><span style="font-size: large;" class="mycode_size">OMV armhf</span>:</span></span><br />
<br />
Download:<br />
libssl1.0.0_1.0.1t-1+deb8u7_armhf.deb<br />
<a href="https://packages.debian.org/jessie/armhf/libssl1.0.0/download" target="_blank" rel="noopener" class="mycode_url">https://packages.debian.org/jessie/armhf...0/download</a><br />
<br />
xrdp_0.6.1-2_armhf.deb<br />
<a href="https://packages.debian.org/jessie/armhf/xrdp/download" target="_blank" rel="noopener" class="mycode_url">https://packages.debian.org/jessie/armhf/xrdp/download</a><br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo dpkg -i libssl1.0.0_1.0.1t-1+deb8u7_armhf.deb<br />
sudo dpkg -i xrdp_0.6.1-2_armhf.deb</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[A guide for how I made RetroPie, RetroArch, and EmulationStation Work on the Rock64]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=5460</link>
			<pubDate>Fri, 15 Dec 2017 21:21:59 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=7764">Mrfixit2001</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=5460</guid>
			<description><![CDATA[So first off, while I'm a "professional computer guy", my expertise is Microsoft stuff, so before getting my raspberry pi 3 I had very little linux experience. The RPI3 has a lot of downloadable images that basically "just work" out of the box, but ROCK64 doesn't have that benefit yet. And with the more powerful hardware on this platform, I have been excited to figure this out... but to get it up and running I've had to learn quickly and do a lot of research. <br />
<br />
After banging my head against things, neglecting the family, angering the demon that is my wife, and having to start over again multiple times... I finally got RetroPie, RetroArch, and EmulationStation working. I figured I'd contrubute to the community with what steps I took, but I offer no support or guarantees. All I know is that now I'm "rock64ing" RP, RA, and ES <img src="https://forum.pine64.org/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
<br />
I wanted to use the newest linux builds available from ayufan but ran into problems booting (no video), so I ended up going back a few versions. I'm eventually planning to try to find a way to upgrade to the newest build without having to redo everything (if you know how, feel free to let me know, I'm still learning all this).<br />
<br />
I started with jessie using the 0.5.10 build from ayufan (jessie-minimal-rock64-0.5.10-118-arm64.img.xz). I was using a computer monitor and an HDMI-DVI converter to configure everything on jessie, but once it got it all working I tried it on my TV and got no display :<img src="https://forum.pine64.org/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" /> So I started over using stretch (stretch-minimal-rock64-0.5.10-118-arm64.img.xz). I'll post the details of both in case it helps anyone. And there's always a chance some of the steps I took were not necessary, but it worked out for me.<br />
<br />
First off, as a relatively linux noob, here's my notes on some helpful linux commands that I had to learn and use in my trials: <br />
----------------------<br />
To show version of installed package: apt-show-versions &lt;package&gt;<br />
<br />
After a fresh OS install, run these to get everything updated:<br />
  apt-get update<br />
  apt-get upgrade<br />
  apt-get dist-upgrade<br />
<br />
To install newer/unstable versions of packages (such as gcc):<br />
  echo "deb <a href="http://ftp.us.debian.org/debian" target="_blank" rel="noopener" class="mycode_url">http://ftp.us.debian.org/debian</a> unstable main contrib non-free" &gt;&gt; /etc/apt/sources.list.d/unstable.list<br />
  apt-get update<br />
  apt-get install -t unstable gcc-5<br />
<br />
To downgrade/install a specific version of packages: sudo apt-get install &lt;package-name&gt;=&lt;package-version-number&gt;<br />
<br />
To open compressed log files: zcat logfile.gz<br />
<br />
To show all versions available for a package: apt-cache madison &lt;package&gt;<br />
<br />
To show what packages depend on a specific package: apt-cache rdepends packagename<br />
<br />
To list all installed packages: apt list --installed<br />
<br />
To manually mount a USB drive: <br />
  mkdir /media/usb1 (if it doesn't already exist)<br />
  mount /dev/sda1 /media/usb1<br />
<br />
To Unmount a USB Drive: umount /media/usb1<br />
<br />
To get CPU detail: lscpu<br />
<br />
To get status of services: service --status-all<br />
<br />
To restart a service: service &lt;service name&gt; restart<br />
<br />
To force-overwrite packages after apt-get error: sudo dpkg -i  --force-overwrite  /var/cache/apt/archives/&lt;package file name&gt;.deb<br />
<br />
To download a package files only without installing: aptitude download &lt;package_name&gt; (note: had to install aptitude)<br />
<br />
Force network adapter to get DHCP address: dhclient eth0 -v <br />
<br />
To NEVER ALLOW DROP TO COMMAND and auto-start emulation station, add this to the bottom of ~/.profile:<br />
   [[ -z &#36;DISPLAY &amp;&amp; &#36;XDG_VTNR -eq 1 ]] &amp;&amp; exec emulationstation<br />
 (preferred method is to use retropie setup to tell ES to autorun in config)<br />
<br />
To set the timezone: dpkg-reconfigure tzdata<br />
<br />
To enable autologin: edit the file /lib/systemd/system/getty@.service and change the line<br />
    ExecStart=-/sbin/agetty --noclear %I &#36;TERM<br />
  to<br />
    ExecStart=-/sbin/agetty --noclear -a rock64 %I &#36;TERM<br />
<br />
Ways to build a debian package from source:<br />
  checkinstall (had to add this package manually, but makes ANY INSTALLATION into a debian package and replaces the make command!)<br />
  The next two are picky and require a true debian source package, needs to run from within the debian folder with a special file in it:<br />
   dpkg-buildpackage -us -uc -b (this one seems to work the best)<br />
   dpkg-deb --build &lt;package name&gt; <br />
<br />
 To add a root share after installing samba, add the below to the config /etc/samba/smb.conf (NOTE: retropie setup lets you do it without the console):<br />
    [root]<br />
    comment = root<br />
    path = "/"<br />
    writeable = yes<br />
    guest ok = yes<br />
    create mask = 0644<br />
    directory mask = 0755<br />
    force user = rock64<br />
-------------<br />
<br />
<br />
Now to the guts of the RP, RA, and ES installs:<br />
<br />
For both jessie and stretch you'll need the most recent retropie source from github. Then use this pull request to make the necessary changes to the code to support a rock64 install:<br />
<a href="https://github.com/RetroPie/RetroPie-Setup/pull/2205/files" target="_blank" rel="noopener" class="mycode_url">https://github.com/RetroPie/RetroPie-Set...2205/files</a><br />
<br />
<br />
ON JESSIE:<br />
-----------------<br />
First run the retropie-setup script after you've applied the pull request to source. This alone should allow you to run the retropie setup.<br />
<br />
The release of jessie that I used has an older version of GCC and causes build errors when installing retroarch and emulationstation (unknown value 'native' for -march).<br />
To build retroarch you'll need to upgrade GCC, so I added the unstable apt source (per my instructions above) and chose to install version 7.2.<br />
To build emulationstation you'll need to upgrade G++, so I added the unstable apt source (per my instructions above) and chose to install version 7.2.<br />
<br />
I attempt to install retroarch and emulationstation and after reviewing the logs find that they fail due to an attempt at overwriting existing libraries (because some are already included in the libmali-rk* packages). After the first failed installations I drop to console and apt-get remove the following:<br />
 libsdl2-dev<br />
 libmali-rk-utgard-2th-r7p0<br />
 libmali-rk-dev<br />
(don't reboot)<br />
<br />
I then return to retropie-setup and attempt retroarch and emulationstation installations again. If I run into any failures again, I note the log file it refers to and I drop back to console and review the log and manually force the failing package to overwrite the existing one using the below command and try the install again:<br />
  sudo dpkg -i  --force-overwrite  &lt;full path to DEB file&gt;<br />
<br />
Eventually both RA and ES install successfully. But... ES doesn't start due to a segmentation fault. So, REINSTALL both libmali-rk* packages with force-overwrite. For example:<br />
    sudo dpkg -i  --force-overwrite  /var/cache/apt/archives/libmali-rk-utgard-2th-r7p0_1.5-4ayufan12_arm64.deb<br />
----------------------<br />
<br />
<br />
ON STRETCH:<br />
-----------------------<br />
(for all below steps, whenever something doesn't install due to an overwrite, I use dpkg to force overwrite it, just like previously explained)<br />
Ran all updates, upgrades, and dist-upgrades after the fresh image booted.<br />
The first few times I tried this I ended up with the "unable to initialize SDL" errors and my attempts to fix it made things worse. This time I decided to be proactive and build a few packages first to try and get dependencies in place. I have no idea if this was absolutely necessary. But again, it worked.<br />
   apt-get install xorg-dev<br />
   apt-get build-dep xscreensaver vlc totem<br />
I ignored any package warnings it throws at this point since I was just looking for some dependencies to get installed.<br />
Now run the retropie-setup script after you apply the pull request from github.<br />
Try and install Retroarch and Emulationstation. Any failures, review the listed log file and force overwrite the failing library manually using dpkg like I previously explained.<br />
Eventually both will install, but emulationstation still returns unable to init SDL.<br />
Did some testing and found that the libsdl2-dev package was actually on hold. I figured I'd remove and reinstall the libmali-rk-utgard package...<br />
but it wouldn't let me due to a dependency issue. I installed aptitude to see what it recommended as a solution.<br />
So first I let it install libmali-rk-midgard-4th-r13p0. Then I was able to successfully remove libmali-rk-utgard. <br />
Then I reinstalled the libmali-rk-utgard package using dpkg with overwrite.<br />
Then I uninstalled and reinstalled libmali-dev.<br />
------------<br />
<br />
At this point, whether you're on jessie or stretch, you should be able to start ES and start installing your various emulators. Some will install just fine, and others will fail and you'll have to review logs and tend to the overwrites manually using the same methods we used during the install. I didn't test all the emulators but was able to get a good handful running without issues. Again, I can't make any promises or do much support on this, but I hope it helps some of you get up and rolling. If anyone has additions or runs into other required fixes, please post for the community benefit.<br />
<br />
Good luck everyone, and happy rock64ing!]]></description>
			<content:encoded><![CDATA[So first off, while I'm a "professional computer guy", my expertise is Microsoft stuff, so before getting my raspberry pi 3 I had very little linux experience. The RPI3 has a lot of downloadable images that basically "just work" out of the box, but ROCK64 doesn't have that benefit yet. And with the more powerful hardware on this platform, I have been excited to figure this out... but to get it up and running I've had to learn quickly and do a lot of research. <br />
<br />
After banging my head against things, neglecting the family, angering the demon that is my wife, and having to start over again multiple times... I finally got RetroPie, RetroArch, and EmulationStation working. I figured I'd contrubute to the community with what steps I took, but I offer no support or guarantees. All I know is that now I'm "rock64ing" RP, RA, and ES <img src="https://forum.pine64.org/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
<br />
I wanted to use the newest linux builds available from ayufan but ran into problems booting (no video), so I ended up going back a few versions. I'm eventually planning to try to find a way to upgrade to the newest build without having to redo everything (if you know how, feel free to let me know, I'm still learning all this).<br />
<br />
I started with jessie using the 0.5.10 build from ayufan (jessie-minimal-rock64-0.5.10-118-arm64.img.xz). I was using a computer monitor and an HDMI-DVI converter to configure everything on jessie, but once it got it all working I tried it on my TV and got no display :<img src="https://forum.pine64.org/images/smilies/sad.png" alt="Sad" title="Sad" class="smilie smilie_8" /> So I started over using stretch (stretch-minimal-rock64-0.5.10-118-arm64.img.xz). I'll post the details of both in case it helps anyone. And there's always a chance some of the steps I took were not necessary, but it worked out for me.<br />
<br />
First off, as a relatively linux noob, here's my notes on some helpful linux commands that I had to learn and use in my trials: <br />
----------------------<br />
To show version of installed package: apt-show-versions &lt;package&gt;<br />
<br />
After a fresh OS install, run these to get everything updated:<br />
  apt-get update<br />
  apt-get upgrade<br />
  apt-get dist-upgrade<br />
<br />
To install newer/unstable versions of packages (such as gcc):<br />
  echo "deb <a href="http://ftp.us.debian.org/debian" target="_blank" rel="noopener" class="mycode_url">http://ftp.us.debian.org/debian</a> unstable main contrib non-free" &gt;&gt; /etc/apt/sources.list.d/unstable.list<br />
  apt-get update<br />
  apt-get install -t unstable gcc-5<br />
<br />
To downgrade/install a specific version of packages: sudo apt-get install &lt;package-name&gt;=&lt;package-version-number&gt;<br />
<br />
To open compressed log files: zcat logfile.gz<br />
<br />
To show all versions available for a package: apt-cache madison &lt;package&gt;<br />
<br />
To show what packages depend on a specific package: apt-cache rdepends packagename<br />
<br />
To list all installed packages: apt list --installed<br />
<br />
To manually mount a USB drive: <br />
  mkdir /media/usb1 (if it doesn't already exist)<br />
  mount /dev/sda1 /media/usb1<br />
<br />
To Unmount a USB Drive: umount /media/usb1<br />
<br />
To get CPU detail: lscpu<br />
<br />
To get status of services: service --status-all<br />
<br />
To restart a service: service &lt;service name&gt; restart<br />
<br />
To force-overwrite packages after apt-get error: sudo dpkg -i  --force-overwrite  /var/cache/apt/archives/&lt;package file name&gt;.deb<br />
<br />
To download a package files only without installing: aptitude download &lt;package_name&gt; (note: had to install aptitude)<br />
<br />
Force network adapter to get DHCP address: dhclient eth0 -v <br />
<br />
To NEVER ALLOW DROP TO COMMAND and auto-start emulation station, add this to the bottom of ~/.profile:<br />
   [[ -z &#36;DISPLAY &amp;&amp; &#36;XDG_VTNR -eq 1 ]] &amp;&amp; exec emulationstation<br />
 (preferred method is to use retropie setup to tell ES to autorun in config)<br />
<br />
To set the timezone: dpkg-reconfigure tzdata<br />
<br />
To enable autologin: edit the file /lib/systemd/system/getty@.service and change the line<br />
    ExecStart=-/sbin/agetty --noclear %I &#36;TERM<br />
  to<br />
    ExecStart=-/sbin/agetty --noclear -a rock64 %I &#36;TERM<br />
<br />
Ways to build a debian package from source:<br />
  checkinstall (had to add this package manually, but makes ANY INSTALLATION into a debian package and replaces the make command!)<br />
  The next two are picky and require a true debian source package, needs to run from within the debian folder with a special file in it:<br />
   dpkg-buildpackage -us -uc -b (this one seems to work the best)<br />
   dpkg-deb --build &lt;package name&gt; <br />
<br />
 To add a root share after installing samba, add the below to the config /etc/samba/smb.conf (NOTE: retropie setup lets you do it without the console):<br />
    [root]<br />
    comment = root<br />
    path = "/"<br />
    writeable = yes<br />
    guest ok = yes<br />
    create mask = 0644<br />
    directory mask = 0755<br />
    force user = rock64<br />
-------------<br />
<br />
<br />
Now to the guts of the RP, RA, and ES installs:<br />
<br />
For both jessie and stretch you'll need the most recent retropie source from github. Then use this pull request to make the necessary changes to the code to support a rock64 install:<br />
<a href="https://github.com/RetroPie/RetroPie-Setup/pull/2205/files" target="_blank" rel="noopener" class="mycode_url">https://github.com/RetroPie/RetroPie-Set...2205/files</a><br />
<br />
<br />
ON JESSIE:<br />
-----------------<br />
First run the retropie-setup script after you've applied the pull request to source. This alone should allow you to run the retropie setup.<br />
<br />
The release of jessie that I used has an older version of GCC and causes build errors when installing retroarch and emulationstation (unknown value 'native' for -march).<br />
To build retroarch you'll need to upgrade GCC, so I added the unstable apt source (per my instructions above) and chose to install version 7.2.<br />
To build emulationstation you'll need to upgrade G++, so I added the unstable apt source (per my instructions above) and chose to install version 7.2.<br />
<br />
I attempt to install retroarch and emulationstation and after reviewing the logs find that they fail due to an attempt at overwriting existing libraries (because some are already included in the libmali-rk* packages). After the first failed installations I drop to console and apt-get remove the following:<br />
 libsdl2-dev<br />
 libmali-rk-utgard-2th-r7p0<br />
 libmali-rk-dev<br />
(don't reboot)<br />
<br />
I then return to retropie-setup and attempt retroarch and emulationstation installations again. If I run into any failures again, I note the log file it refers to and I drop back to console and review the log and manually force the failing package to overwrite the existing one using the below command and try the install again:<br />
  sudo dpkg -i  --force-overwrite  &lt;full path to DEB file&gt;<br />
<br />
Eventually both RA and ES install successfully. But... ES doesn't start due to a segmentation fault. So, REINSTALL both libmali-rk* packages with force-overwrite. For example:<br />
    sudo dpkg -i  --force-overwrite  /var/cache/apt/archives/libmali-rk-utgard-2th-r7p0_1.5-4ayufan12_arm64.deb<br />
----------------------<br />
<br />
<br />
ON STRETCH:<br />
-----------------------<br />
(for all below steps, whenever something doesn't install due to an overwrite, I use dpkg to force overwrite it, just like previously explained)<br />
Ran all updates, upgrades, and dist-upgrades after the fresh image booted.<br />
The first few times I tried this I ended up with the "unable to initialize SDL" errors and my attempts to fix it made things worse. This time I decided to be proactive and build a few packages first to try and get dependencies in place. I have no idea if this was absolutely necessary. But again, it worked.<br />
   apt-get install xorg-dev<br />
   apt-get build-dep xscreensaver vlc totem<br />
I ignored any package warnings it throws at this point since I was just looking for some dependencies to get installed.<br />
Now run the retropie-setup script after you apply the pull request from github.<br />
Try and install Retroarch and Emulationstation. Any failures, review the listed log file and force overwrite the failing library manually using dpkg like I previously explained.<br />
Eventually both will install, but emulationstation still returns unable to init SDL.<br />
Did some testing and found that the libsdl2-dev package was actually on hold. I figured I'd remove and reinstall the libmali-rk-utgard package...<br />
but it wouldn't let me due to a dependency issue. I installed aptitude to see what it recommended as a solution.<br />
So first I let it install libmali-rk-midgard-4th-r13p0. Then I was able to successfully remove libmali-rk-utgard. <br />
Then I reinstalled the libmali-rk-utgard package using dpkg with overwrite.<br />
Then I uninstalled and reinstalled libmali-dev.<br />
------------<br />
<br />
At this point, whether you're on jessie or stretch, you should be able to start ES and start installing your various emulators. Some will install just fine, and others will fail and you'll have to review logs and tend to the overwrites manually using the same methods we used during the install. I didn't test all the emulators but was able to get a good handful running without issues. Again, I can't make any promises or do much support on this, but I hope it helps some of you get up and rolling. If anyone has additions or runs into other required fixes, please post for the community benefit.<br />
<br />
Good luck everyone, and happy rock64ing!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Guide - Raid Array (Raid 0)]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=5231</link>
			<pubDate>Sat, 07 Oct 2017 15:22:04 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=7074">Ptheven</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=5231</guid>
			<description><![CDATA[<span style="color: #333333;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Preface</span></span></span><br />
<br />
<br />
In this guide, I will be showing how to create a raid array, using the raid 0 configuration. This allows you to have maximize storage available, however it comes at the risk of data loss in case of hardware failure. <br />
<br />
<br />
<br />
<br />
<img src="https://thumbs.gfycat.com/DifficultBitterAndeancondor-size_restricted.gif" loading="lazy"  alt="[Image: DifficultBitterAndeancondor-size_restricted.gif]" class="mycode_img" /><br />
<br />
It also has the benefit of having really pretty "blinkenlights" effect when the USB drives are being accessed. <br />
<br />
<br />
<br />
<span style="color: #333333;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Prerequisites</span></span></span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">ROCK64 board running Debian or Ubuntu, connected to the local network</span><br />
<br />
<span style="color: #333333;" class="mycode_color">Access to terminal, either locally or via SSH</span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">At least 2 Flash drives (or hard drives)</span><br />
<br />
<span style="color: #333333;" class="mycode_color">Recommended: USB Hub, for ease of access. </span><br />
<br />
<span style="color: #333333;" class="mycode_color">___________________</span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">Make sure your software and repositories are up to date: </span><br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt update &amp;&amp; sudo apt upgrade</code></div></div><br />
<br />
<span style="color: #333333;" class="mycode_color">Next, we install the <a href="https://linux.die.net/man/8/mdadm" target="_blank" rel="noopener" class="mycode_url">mdadm</a> package, used to monitor and implement software raid in linux: </span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install mdadm</code></div></div><br />
<br />
<span style="color: #333333;" class="mycode_color">After installing it, we can get our flashdrives and plug them directly into the ROCK64 board, or onto a USB hub and plug that into the board. </span><br />
<br />
<span style="color: #333333;" class="mycode_color">The USB drives that I used were previously erased by me, and thus, don't have any partitions. We can confirm that they've been detected by the system by issuing the "lsblk" command, showing the attached blocked devices. In my case, they are sdb, sdc, and sdd: </span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color"><img src="https://i.imgur.com/fJUNTyv.png" loading="lazy"  alt="[Image: fJUNTyv.png]" class="mycode_img" /></span><br />
<br />
<span style="color: #333333;" class="mycode_color">Since we can see the 3 (in my case) flash drives recognized by the system, we can now proceed and start to create a new raid array. </span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="color: #ff3333;" class="mycode_color">WARNING: BE VERY CAREFUL WITH THE FOLLOWING STEPS AND DOUBLE CHECK, USING THE WRONG NAMES COULD LEAD TO DATA LOSS</span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mdadm --create --verbose /dev/md0 --level=0 --raid-devices=3 /dev/sd{b,c,d}</code></div></div><br />
<span style="color: #333333;" class="mycode_color">"--level=0" denotes the <a href="https://en.wikipedia.org/wiki/Standard_RAID_levels" target="_blank" rel="noopener" class="mycode_url">raid level, or the type of raid</a>. "--raid-devices" flag states the number of devices. The last argument "/dev/sd{b,c,d}" is simply an easier way of saying "/dev/sdb /dev/sdc /dev/sdd" without having to type it all out (called <a href="https://ss64.com/bash/syntax-expand.html" target="_blank" rel="noopener" class="mycode_url">Brace Expansion</a>). </span><br />
<br />
<span style="color: #333333;" class="mycode_color"><img src="https://i.imgur.com/LAWNB9K.png" loading="lazy"  alt="[Image: LAWNB9K.png]" class="mycode_img" /></span><br />
<br />
<span style="color: #333333;" class="mycode_color">After the Array is created, you can invoke the "lsblk" command, to see the status of the USB drives. Notice that all three drives (sdb,sdc,sdd) are part of the partition (md0) and that the partition size is larger than the size of the physical disk: </span><br />
<br />
<span style="color: #333333;" class="mycode_color"><img src="https://i.imgur.com/RejMu5C.png" loading="lazy"  alt="[Image: RejMu5C.png]" class="mycode_img" /></span><br />
<br />
<span style="color: #333333;" class="mycode_color">Now, we can simply create a partition on the raid array, and mount it to a suitable location. </span><br />
I created an ext4 partition on my Raid array: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mkfs.ext4 -F /dev/md0</code></div></div><br />
Then, I created a mountpoint for my new Ext4 partition, and mounted it: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mkdir -p /mnt/md0<br />
 <br />
sudo mount /dev/md0 /mnt/md0</code></div></div><span style="color: #333333;" class="mycode_color"><br />
I also used this as an opportunity to check my RAID was succesfully created by checking the /proc/mdstat file (though, it was my mistake, I should have done this step right after creating the array. </span><br />
<br />
<br />
<img src="https://i.imgur.com/LPIHkQk.png?1" loading="lazy"  alt="[Image: LPIHkQk.png?1]" class="mycode_img" /><br />
Now that the RAID device is mounted, we can use the chown command to assume ownership of it so that we can write to it: <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo chown -R rock64: /mnt/md0/</code></div></div><br />
Again, this might vary depending on your username and mount location. <br />
Thats all there is to it! We're done! You should be able to access that device under your mountpoint. We can confirm that the RAID array is mounted using either "lsblk" or "df -h": <br />
<img src="https://i.imgur.com/5NRL2F7.png" loading="lazy"  alt="[Image: 5NRL2F7.png]" class="mycode_img" /><br />
<img src="https://i.imgur.com/nM0D8aD.png" loading="lazy"  alt="[Image: nM0D8aD.png]" class="mycode_img" />]]></description>
			<content:encoded><![CDATA[<span style="color: #333333;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Preface</span></span></span><br />
<br />
<br />
In this guide, I will be showing how to create a raid array, using the raid 0 configuration. This allows you to have maximize storage available, however it comes at the risk of data loss in case of hardware failure. <br />
<br />
<br />
<br />
<br />
<img src="https://thumbs.gfycat.com/DifficultBitterAndeancondor-size_restricted.gif" loading="lazy"  alt="[Image: DifficultBitterAndeancondor-size_restricted.gif]" class="mycode_img" /><br />
<br />
It also has the benefit of having really pretty "blinkenlights" effect when the USB drives are being accessed. <br />
<br />
<br />
<br />
<span style="color: #333333;" class="mycode_color"><span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Prerequisites</span></span></span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">ROCK64 board running Debian or Ubuntu, connected to the local network</span><br />
<br />
<span style="color: #333333;" class="mycode_color">Access to terminal, either locally or via SSH</span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">At least 2 Flash drives (or hard drives)</span><br />
<br />
<span style="color: #333333;" class="mycode_color">Recommended: USB Hub, for ease of access. </span><br />
<br />
<span style="color: #333333;" class="mycode_color">___________________</span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">Make sure your software and repositories are up to date: </span><br />
<br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt update &amp;&amp; sudo apt upgrade</code></div></div><br />
<br />
<span style="color: #333333;" class="mycode_color">Next, we install the <a href="https://linux.die.net/man/8/mdadm" target="_blank" rel="noopener" class="mycode_url">mdadm</a> package, used to monitor and implement software raid in linux: </span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install mdadm</code></div></div><br />
<br />
<span style="color: #333333;" class="mycode_color">After installing it, we can get our flashdrives and plug them directly into the ROCK64 board, or onto a USB hub and plug that into the board. </span><br />
<br />
<span style="color: #333333;" class="mycode_color">The USB drives that I used were previously erased by me, and thus, don't have any partitions. We can confirm that they've been detected by the system by issuing the "lsblk" command, showing the attached blocked devices. In my case, they are sdb, sdc, and sdd: </span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color"><img src="https://i.imgur.com/fJUNTyv.png" loading="lazy"  alt="[Image: fJUNTyv.png]" class="mycode_img" /></span><br />
<br />
<span style="color: #333333;" class="mycode_color">Since we can see the 3 (in my case) flash drives recognized by the system, we can now proceed and start to create a new raid array. </span><br />
<br />
<span style="font-weight: bold;" class="mycode_b"><span style="color: #ff3333;" class="mycode_color">WARNING: BE VERY CAREFUL WITH THE FOLLOWING STEPS AND DOUBLE CHECK, USING THE WRONG NAMES COULD LEAD TO DATA LOSS</span></span><br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mdadm --create --verbose /dev/md0 --level=0 --raid-devices=3 /dev/sd{b,c,d}</code></div></div><br />
<span style="color: #333333;" class="mycode_color">"--level=0" denotes the <a href="https://en.wikipedia.org/wiki/Standard_RAID_levels" target="_blank" rel="noopener" class="mycode_url">raid level, or the type of raid</a>. "--raid-devices" flag states the number of devices. The last argument "/dev/sd{b,c,d}" is simply an easier way of saying "/dev/sdb /dev/sdc /dev/sdd" without having to type it all out (called <a href="https://ss64.com/bash/syntax-expand.html" target="_blank" rel="noopener" class="mycode_url">Brace Expansion</a>). </span><br />
<br />
<span style="color: #333333;" class="mycode_color"><img src="https://i.imgur.com/LAWNB9K.png" loading="lazy"  alt="[Image: LAWNB9K.png]" class="mycode_img" /></span><br />
<br />
<span style="color: #333333;" class="mycode_color">After the Array is created, you can invoke the "lsblk" command, to see the status of the USB drives. Notice that all three drives (sdb,sdc,sdd) are part of the partition (md0) and that the partition size is larger than the size of the physical disk: </span><br />
<br />
<span style="color: #333333;" class="mycode_color"><img src="https://i.imgur.com/RejMu5C.png" loading="lazy"  alt="[Image: RejMu5C.png]" class="mycode_img" /></span><br />
<br />
<span style="color: #333333;" class="mycode_color">Now, we can simply create a partition on the raid array, and mount it to a suitable location. </span><br />
I created an ext4 partition on my Raid array: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mkfs.ext4 -F /dev/md0</code></div></div><br />
Then, I created a mountpoint for my new Ext4 partition, and mounted it: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mkdir -p /mnt/md0<br />
 <br />
sudo mount /dev/md0 /mnt/md0</code></div></div><span style="color: #333333;" class="mycode_color"><br />
I also used this as an opportunity to check my RAID was succesfully created by checking the /proc/mdstat file (though, it was my mistake, I should have done this step right after creating the array. </span><br />
<br />
<br />
<img src="https://i.imgur.com/LPIHkQk.png?1" loading="lazy"  alt="[Image: LPIHkQk.png?1]" class="mycode_img" /><br />
Now that the RAID device is mounted, we can use the chown command to assume ownership of it so that we can write to it: <br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo chown -R rock64: /mnt/md0/</code></div></div><br />
Again, this might vary depending on your username and mount location. <br />
Thats all there is to it! We're done! You should be able to access that device under your mountpoint. We can confirm that the RAID array is mounted using either "lsblk" or "df -h": <br />
<img src="https://i.imgur.com/5NRL2F7.png" loading="lazy"  alt="[Image: 5NRL2F7.png]" class="mycode_img" /><br />
<img src="https://i.imgur.com/nM0D8aD.png" loading="lazy"  alt="[Image: nM0D8aD.png]" class="mycode_img" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Guide - Setting up a NFS Share]]></title>
			<link>https://forum.pine64.org/showthread.php?tid=5177</link>
			<pubDate>Tue, 26 Sep 2017 10:44:00 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.pine64.org/member.php?action=profile&uid=7074">Ptheven</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.pine64.org/showthread.php?tid=5177</guid>
			<description><![CDATA[<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Preface<br />
</span></span><br />
<br />
<br />
This quick and simple guide will show how to create a NFS Share using your Rock64. NFS has a few advantages over SMB, if you know your network well and will use it with linux clients. Apart from marginally faster file transfers, NFS allows you to retain Unix File permissions. <br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Prerequisites</span></span><br />
<br />
<br />
ROCK64 board running Debian or Ubuntu, connected to the local network<br />
<br />
Access to terminal, either locally or via SSH<br />
<br />
Some basic understanding of using the linux terminal: Howtogeek<br />
<br />
Suggested: A basic comprehension of linux file permissions<br />
<br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">____________________</span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">As always before installing any software in linux, it is always good practise to ensure that your software is up to date: </span><br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt update &amp;&amp; sudo apt upgrade</code></div></div><span style="color: #333333;" class="mycode_color"> </span><br />
After ensuring your software is up to date, you will need to install the NFS kernel server. Some distros have this installed by default, but there is no harm in running the command regardless, if it isnt installed, it will give you the option to install it: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install nfs-kernel-server</code></div></div><br />
<br />
<img src="https://i.imgur.com/wl0jtOz.png" loading="lazy"  width="800" height="489" alt="[Image: wl0jtOz.png]" class="mycode_img" /><br />
<br />
After the server is installed, now its time to edit the configuration file, to add a share definition. <br />
<br />
You'll need to edit the exports file: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudoedit /etc/exports</code></div></div><br />
You can add a new share definition in the following format:<br />
<br />
Share-location Network-Access Share-options<br />
<br />
Here are mine. The location looks different to past tutorials because I accidentally formatted my flash drive: <br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/media/SDCZ45-016G/RockNFS 192.168.1.*(rw,sync,insecure,no_root_squash,no_subtree_check)</code></div></div>  <br />
The next field (192.168.1.*) simply defines what part of your local area network is allowed to access the share. I've configured it so that any computer with the IP address from 192.168.1.1 to 192.168.1.254 can access it. You can allow any (local) IP address to access the share using "*.*" or you can limit it to a specific IP address of a computer. <br />
<br />
The last options specify how the server should treat the share. If you'd like to read up more on their effects: <a href="https://linux.die.net/man/5/exports" target="_blank" rel="noopener" class="mycode_url">https://linux.die.net/man/5/exports</a><br />
<br />
<br />
This is how it would look like before you save and exit the file: <br />
<br />
<img src="https://i.imgur.com/NwOrMV8.png?1" loading="lazy"  width="800" height="413" alt="[Image: NwOrMV8.png?1]" class="mycode_img" /><br />
<br />
<br />
After you're done, restart the service: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo /etc/init.d/nfs-kernel-server restart</code></div></div><br />
or <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo service nfs-kernel-server restart</code></div></div><br />
Will do the job. <br />
<br />
<br />
The server will now be up and running! <br />
<br />
<br />
<br />
____________________<br />
<br />
On the client's side, you'll need to make sure that you've got the NFS client stuff: <br />
 <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install nfs-common</code></div></div><br />
<br />
After that, you can probe the server from the client PC to test/see if it hosts accessible NFS Shares. To do that, we use the showmount command, followed by an argument and the address of the server: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>showmount -e rock64.local</code></div></div><br />
<br />
Either IP address or hostname should work: <br />
<br />
<img src="https://i.imgur.com/8PkwEZO.png" loading="lazy"  width="800" height="471" alt="[Image: 8PkwEZO.png]" class="mycode_img" /><br />
<br />
The "e" arguments tells the showmount command to show the export list from the server. <br />
<br />
<br />
Next, you'll need to mount the share. I did this in my Home directory, making a new test folder for it. The mount command could be invoked now, and you can mount the NFS share to the new directory that you've made. The "-vv" means its verbose; it prints out status and progress. <br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mount -t nfs rock64.local:/media/SDCZ45-016G/RockNFS nfstest/ -vv</code></div></div><br />
The command you use will be different based on your host and client. When typing it out, after putting down the hostname (rock64.local:/), I was able to use tab completion to complete the rest of the location without manually typing it out. Simply hit the "tab" key, and it should autocomplete the rest of the path. <br />
<br />
<img src="https://i.imgur.com/ZAb7oj1.png" loading="lazy"  width="800" height="483" alt="[Image: ZAb7oj1.png]" class="mycode_img" /><br />
<br />
<br />
You can make a test file in the folder, either using the terminal, or a graphical file manager. I made a test file on my client using the "touch" command. <br />
<br />
Then to confirm that the changes are seen on the client side, I SSH'ed back into my server, navigated to the share location, and listed confirmed that the new file had been created: <br />
<br />
<img src="https://i.imgur.com/ZAVQvSa.png" loading="lazy"  width="800" height="409" alt="[Image: ZAVQvSa.png]" class="mycode_img" /><br />
<br />
You should now know how to whip up a NFS share on the Rock64 board, and mount/access it from a client OS. If you wish to permanently mount the NFS Share to your client, I would recommend doing it via fstab: <br />
<br />
<a href="https://askubuntu.com/questions/7117/which-to-use-nfs-or-samba" target="_blank" rel="noopener" class="mycode_url">https://askubuntu.com/questions/7117/which-to-use-nfs-or-samba </a>]]></description>
			<content:encoded><![CDATA[<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Preface<br />
</span></span><br />
<br />
<br />
This quick and simple guide will show how to create a NFS Share using your Rock64. NFS has a few advantages over SMB, if you know your network well and will use it with linux clients. Apart from marginally faster file transfers, NFS allows you to retain Unix File permissions. <br />
<br />
<br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="font-weight: bold;" class="mycode_b">Prerequisites</span></span><br />
<br />
<br />
ROCK64 board running Debian or Ubuntu, connected to the local network<br />
<br />
Access to terminal, either locally or via SSH<br />
<br />
Some basic understanding of using the linux terminal: Howtogeek<br />
<br />
Suggested: A basic comprehension of linux file permissions<br />
<br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">____________________</span><br />
<br />
<br />
<span style="color: #333333;" class="mycode_color">As always before installing any software in linux, it is always good practise to ensure that your software is up to date: </span><br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt update &amp;&amp; sudo apt upgrade</code></div></div><span style="color: #333333;" class="mycode_color"> </span><br />
After ensuring your software is up to date, you will need to install the NFS kernel server. Some distros have this installed by default, but there is no harm in running the command regardless, if it isnt installed, it will give you the option to install it: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install nfs-kernel-server</code></div></div><br />
<br />
<img src="https://i.imgur.com/wl0jtOz.png" loading="lazy"  width="800" height="489" alt="[Image: wl0jtOz.png]" class="mycode_img" /><br />
<br />
After the server is installed, now its time to edit the configuration file, to add a share definition. <br />
<br />
You'll need to edit the exports file: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudoedit /etc/exports</code></div></div><br />
You can add a new share definition in the following format:<br />
<br />
Share-location Network-Access Share-options<br />
<br />
Here are mine. The location looks different to past tutorials because I accidentally formatted my flash drive: <br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>/media/SDCZ45-016G/RockNFS 192.168.1.*(rw,sync,insecure,no_root_squash,no_subtree_check)</code></div></div>  <br />
The next field (192.168.1.*) simply defines what part of your local area network is allowed to access the share. I've configured it so that any computer with the IP address from 192.168.1.1 to 192.168.1.254 can access it. You can allow any (local) IP address to access the share using "*.*" or you can limit it to a specific IP address of a computer. <br />
<br />
The last options specify how the server should treat the share. If you'd like to read up more on their effects: <a href="https://linux.die.net/man/5/exports" target="_blank" rel="noopener" class="mycode_url">https://linux.die.net/man/5/exports</a><br />
<br />
<br />
This is how it would look like before you save and exit the file: <br />
<br />
<img src="https://i.imgur.com/NwOrMV8.png?1" loading="lazy"  width="800" height="413" alt="[Image: NwOrMV8.png?1]" class="mycode_img" /><br />
<br />
<br />
After you're done, restart the service: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo /etc/init.d/nfs-kernel-server restart</code></div></div><br />
or <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo service nfs-kernel-server restart</code></div></div><br />
Will do the job. <br />
<br />
<br />
The server will now be up and running! <br />
<br />
<br />
<br />
____________________<br />
<br />
On the client's side, you'll need to make sure that you've got the NFS client stuff: <br />
 <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo apt install nfs-common</code></div></div><br />
<br />
After that, you can probe the server from the client PC to test/see if it hosts accessible NFS Shares. To do that, we use the showmount command, followed by an argument and the address of the server: <br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>showmount -e rock64.local</code></div></div><br />
<br />
Either IP address or hostname should work: <br />
<br />
<img src="https://i.imgur.com/8PkwEZO.png" loading="lazy"  width="800" height="471" alt="[Image: 8PkwEZO.png]" class="mycode_img" /><br />
<br />
The "e" arguments tells the showmount command to show the export list from the server. <br />
<br />
<br />
Next, you'll need to mount the share. I did this in my Home directory, making a new test folder for it. The mount command could be invoked now, and you can mount the NFS share to the new directory that you've made. The "-vv" means its verbose; it prints out status and progress. <br />
<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>sudo mount -t nfs rock64.local:/media/SDCZ45-016G/RockNFS nfstest/ -vv</code></div></div><br />
The command you use will be different based on your host and client. When typing it out, after putting down the hostname (rock64.local:/), I was able to use tab completion to complete the rest of the location without manually typing it out. Simply hit the "tab" key, and it should autocomplete the rest of the path. <br />
<br />
<img src="https://i.imgur.com/ZAb7oj1.png" loading="lazy"  width="800" height="483" alt="[Image: ZAb7oj1.png]" class="mycode_img" /><br />
<br />
<br />
You can make a test file in the folder, either using the terminal, or a graphical file manager. I made a test file on my client using the "touch" command. <br />
<br />
Then to confirm that the changes are seen on the client side, I SSH'ed back into my server, navigated to the share location, and listed confirmed that the new file had been created: <br />
<br />
<img src="https://i.imgur.com/ZAVQvSa.png" loading="lazy"  width="800" height="409" alt="[Image: ZAVQvSa.png]" class="mycode_img" /><br />
<br />
You should now know how to whip up a NFS share on the Rock64 board, and mount/access it from a client OS. If you wish to permanently mount the NFS Share to your client, I would recommend doing it via fstab: <br />
<br />
<a href="https://askubuntu.com/questions/7117/which-to-use-nfs-or-samba" target="_blank" rel="noopener" class="mycode_url">https://askubuntu.com/questions/7117/which-to-use-nfs-or-samba </a>]]></content:encoded>
		</item>
	</channel>
</rss>