<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RemDogKap</id>
	<title>PINE64 - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pine64.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RemDogKap"/>
	<link rel="alternate" type="text/html" href="https://wiki.pine64.org/wiki/Special:Contributions/RemDogKap"/>
	<updated>2026-05-09T18:40:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=21044</id>
		<title>User:RemDogKap/SandBox/Build U-Boot and OpenSBI From Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=21044"/>
		<updated>2023-10-29T03:01:13Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Removed placeholder text&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing the Build Environment==&lt;br /&gt;
Fist, install the cross-compiler and if not already installed, git. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install gcc-riscv64-linux-gnu git&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-gcc-version-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;[Optional] Check the version of the &amp;lt;code&amp;gt;riscv64-linux-gnu-gcc&amp;lt;/code&amp;gt; compiler.&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-gcc-version-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 $ riscv64-linux-gnu-gcc -v&lt;br /&gt;
The output should looks something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using built-in specs.&lt;br /&gt;
COLLECT_GCC=riscv64-linux-gnu-gcc&lt;br /&gt;
COLLECT_LTO_WRAPPER=usr/lib/gcc-cross/riscv64-linux-gnu/10/lto-wrapper&lt;br /&gt;
Target: riscv64-linux-gnu&lt;br /&gt;
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libsanitizer --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --disable-werror --disable-multilib --with-arch=rv64imafdc --with-abi=lp64d --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=riscv64-linux-gnu --program-prefix=riscv64-linux-gnu- --includedir=/usr/riscv64-linux-gnu/include --with-build-config=bootstrap-lto-lean --enable-link-mutex&lt;br /&gt;
Thread model: posix&lt;br /&gt;
Supported LTO compression algorithms: zlib&lt;br /&gt;
gcc version 10.2.1 20210110 (Debian 10.2.1-6)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create or enter the directory where the files used in this guide will be stored. This tutorial will be using the Linux home directory. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-home-directory-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Home Directory Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-home-directory-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd ~&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-new-directory-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;New Directory Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-new-directory-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ mkdir ~/Star64-Firmware&lt;br /&gt;
 $ cd ~/Star64-Firmware/&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Clone the StarFive Tools GitHub repository. This will be used to create the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL image and provide the &amp;lt;code&amp;gt;.its&amp;lt;/code&amp;gt; FIT image tree source file which provides the configuration for the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image file. &lt;br /&gt;
&lt;br /&gt;
 $ git clone --depth 1 https://github.com/starfive-tech/Tools&lt;br /&gt;
Compile the SPL Tool used to create the SPL image in the &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/Tools/spl_tool/&amp;lt;/code&amp;gt; directory using &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;. &lt;br /&gt;
 $ make -C Tools/spl_tool/&lt;br /&gt;
==U-Boot==&lt;br /&gt;
&lt;br /&gt;
Clone the U-Boot GitHub repository. The entire history is not needed (&amp;lt;code&amp;gt;--depth 1&amp;lt;/code&amp;gt;) and we want the Star64 branch (&amp;lt;code&amp;gt;-b Star64&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ git clone --depth 1 -b Star64 &amp;lt;nowiki&amp;gt;https://github.com/Fishwaldo/u-boot.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Enter the U-Boot directory.&lt;br /&gt;
 $ cd u-boot/&lt;br /&gt;
Select the U-Boot configuration for the Star64, marking the architecture as RISC-V (&amp;lt;code&amp;gt;ARCH=riscv&amp;lt;/code&amp;gt;) and using the cross-compiler installed earlier(&amp;lt;code&amp;gt;CROSS_COMPILE=riscv64-linux-gnu-&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ make pine64_star64_defconfig ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-&lt;br /&gt;
Finally, compile U-Boot. &lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-&lt;br /&gt;
This should create three files. &lt;br /&gt;
# The U-Boot binary, later packaged as an OpenSBI payload, located at &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/u-boot.bin&amp;lt;/code&amp;gt;. &lt;br /&gt;
# The device tree blob (binary), which contains information on the characteristics of the device and is passed to the operating system instead of hard-coding device configurations into the operating system, and is located at &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/arch/riscv/dts/pine64_star64.dtb&amp;lt;/code&amp;gt;.&lt;br /&gt;
# The U-Boot secondary program loader which will later be packaged into the &amp;lt;code&amp;gt;u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt; file and is located at &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/spl/u-boot-spl.bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
==OpenSBI==&lt;br /&gt;
Return to the directory where the files for this build are stored. In this case it is the Linux home directory. Unless you have since changed directories, &lt;br /&gt;
 $ cd ..&lt;br /&gt;
should return to to the directory before the U-Boot section. &lt;br /&gt;
&lt;br /&gt;
Clone the OpenSBI U-Boot repository and enter its directory. The entire history is not needed (&amp;lt;code&amp;gt;--depth 1&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ git clone --depth 1 &amp;lt;nowiki&amp;gt;https://github.com/riscv/opensbi.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ cd opensbi/&lt;br /&gt;
Compile OpenSBI using &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;. Make sure to set &lt;br /&gt;
# the architecture as RISC-V (&amp;lt;code&amp;gt;ARCH=riscv&amp;lt;/code&amp;gt;) &lt;br /&gt;
# the compiler as the cross-compiler installed earlier (&amp;lt;code&amp;gt;CROSS_COMPILE=riscv64-linux-gnu-&amp;lt;/code&amp;gt;)&lt;br /&gt;
# the platform as generic (&amp;lt;code&amp;gt;PLATFORM=generic&amp;lt;/code&amp;gt;)&lt;br /&gt;
# the OpenSBI payload path as the path to the &amp;lt;code&amp;gt;u-boot.bin&amp;lt;/code&amp;gt; file created in the [[#U-Boot|U-Boot]] step (&amp;lt;code&amp;gt;FW_PAYLOAD_PATH=&amp;lt;working_directory&amp;gt;/u-boot/u-boot.bin&amp;lt;/code&amp;gt;)&lt;br /&gt;
# the flattened device tree (device tree blob) as the &amp;lt;code&amp;gt;pine64_star64.dtb&amp;lt;/code&amp;gt; file created in the [[#U-Boot|U-Boot]] step (&amp;lt;code&amp;gt;FW_FDT_PATH=&amp;lt;working_directory&amp;gt;/u-boot/arch/riscv/dts/pine64_star64.dtb&amp;lt;/code&amp;gt;)&lt;br /&gt;
# &amp;lt;code&amp;gt;FW_TEXT_START&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;0x40000000&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;FW_TEXT_START=0x40000000&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=generic FW_PAYLOAD_PATH=&amp;lt;working_directory&amp;gt;/u-boot/u-boot.bin FW_FDT_PATH=&amp;lt;working_directory&amp;gt;/u-boot/arch/riscv/dts/pine64_star64.dtb FW_TEXT_START=0x40000000&lt;br /&gt;
Make sure to replace &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;&amp;lt;/code&amp;gt; with the directory created or chosen in [[#Preparing_the_Build_Environment|Preparing the Build Environment]]. &lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-compile-opensbi-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-compile-opensbi-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=generic FW_PAYLOAD_PATH=~/u-boot/u-boot.bin FW_FDT_PATH=~/u-boot/arch/riscv/dts/pine64_star64.dtb FW_TEXT_START=0x40000000&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
This should create one file, &amp;lt;code&amp;gt;fw_payload.bin&amp;lt;/code&amp;gt;, which contains OpenSBI with U-Boot as the payload. The file is located at &amp;lt;code&amp;gt;opensbi/build/platform/generic/firmware/fw_payload.bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Creating the SPL File==&lt;br /&gt;
Go to the directory the SPL Tool compiled earlier is located in. If these instructions were followed exactly the following should work: &lt;br /&gt;
 $ cd ../Tools/spl_tool/&lt;br /&gt;
Use the SPL Tool to create the &amp;lt;code&amp;gt;u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt; SPL image. &lt;br /&gt;
 $ ./spl_tool -c -f &amp;lt;working_directory&amp;gt;/u-boot/spl/u-boot-spl.bin&lt;br /&gt;
Make sure to replace &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;&amp;lt;/code&amp;gt; with the directory created or chosen in [[#Preparing_the_Build_Environment|Preparing the Build Environment]]. &lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-spl-tool-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-spl-tool-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ ./spl_tool -c -f ~/u-boot/spl/u-boot-spl.bin&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
This should produce a &amp;lt;code&amp;gt;u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt; file located at &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/spl/u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt;&lt;br /&gt;
==Creating the fw_payload File==&lt;br /&gt;
Return to the directory where the files for this build are stored. In this case it is the Linux home directory. Unless you have since changed directories, &lt;br /&gt;
 $ cd ..&lt;br /&gt;
should work. &lt;br /&gt;
&lt;br /&gt;
Enter the &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/Tools/uboot_its/&amp;lt;/code&amp;gt; directory which holds the &amp;lt;code&amp;gt;.its&amp;lt;/code&amp;gt; FIT image tree source file which provides the configuration for the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image file. &lt;br /&gt;
 $ cd Tools/uboot_its/&lt;br /&gt;
The process of making the U-Boot image requires the &amp;lt;code&amp;gt;fw_payload.bin&amp;lt;/code&amp;gt; created earlier so copy that to the current directory. &lt;br /&gt;
 $ cp &amp;lt;working_directory&amp;gt;/opensbi/build/platform/generic/firmware/fw_payload.bin ./&lt;br /&gt;
Make sure to replace &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;&amp;lt;/code&amp;gt; with the directory created or chosen in [[#Preparing_the_Build_Environment|Preparing the Build Environment]]. &lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-fw_payload-cp-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-fw_payload-cp-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ cp ~/opensbi/build/platform/generic/firmware/fw_payload.bin ./&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Make the &amp;lt;code&amp;gt;star64_fw_payload.img&amp;lt;/code&amp;gt; U-Boot image file using the U-Boot &amp;lt;code&amp;gt;mkimage&amp;lt;/code&amp;gt; tool. The &amp;lt;code&amp;gt;mkimage&amp;lt;/code&amp;gt; tool is located in the &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/tools/&amp;lt;/code&amp;gt; directory but requires the &amp;lt;code&amp;gt;visionfive2-uboot-fit-image.its&amp;lt;/code&amp;gt; file which is located in &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/Tools/uboot_its/&amp;lt;/code&amp;gt; so should be executed in the &amp;lt;code&amp;gt;uboot_its&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
 $ &amp;lt;working_directory&amp;gt;/tools/mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware star64_fw_payload.img&lt;br /&gt;
Make sure to replace &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;&amp;lt;/code&amp;gt; with the directory created or chosen in [[#Preparing_the_Build_Environment|Preparing the Build Environment]]. &lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-mkimage-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-mkimage-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ ~/u-boot/tools/mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware star64_fw_payload.img&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
There is currently no &amp;lt;code&amp;gt;.its&amp;lt;/code&amp;gt; file specifically for the Star64 so the VisionFive2's &amp;lt;code&amp;gt;.its&amp;lt;/code&amp;gt; file is used instead as they share a processor.&lt;br /&gt;
&lt;br /&gt;
This should produce a file called &amp;lt;code&amp;gt;star64_fw_payload.img&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/Tools/uboot_its/&amp;lt;/code&amp;gt; directory&lt;br /&gt;
==Credits==&lt;br /&gt;
https://doc-en.rvspace.org/VisionFive2/SWTRM/VisionFive2_SW_TRM/compiling_u-boot_and_kernel%20-%20vf2.html&lt;br /&gt;
https://wiki.pine64.org/wiki/User:Vitali/Create_a_bootable_Debian/Linux_SDCard_for_the_Pine64/Star64_from_scratch&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=19976</id>
		<title>User:RemDogKap/SandBox/Build U-Boot and OpenSBI From Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=19976"/>
		<updated>2023-06-26T05:12:09Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: completed writing guide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Placeholder intro and explanation, I'm tired don't want to write now, contributions welcome&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;br /&gt;
* Must use linux, can use wsl &lt;br /&gt;
&lt;br /&gt;
==Preparing the Build Environment==&lt;br /&gt;
Fist, install the cross-compiler and if not already installed, git. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install gcc-riscv64-linux-gnu git&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-gcc-version-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;[Optional] Check the version of the &amp;lt;code&amp;gt;riscv64-linux-gnu-gcc&amp;lt;/code&amp;gt; compiler.&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-gcc-version-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 $ riscv64-linux-gnu-gcc -v&lt;br /&gt;
The output should looks something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using built-in specs.&lt;br /&gt;
COLLECT_GCC=riscv64-linux-gnu-gcc&lt;br /&gt;
COLLECT_LTO_WRAPPER=usr/lib/gcc-cross/riscv64-linux-gnu/10/lto-wrapper&lt;br /&gt;
Target: riscv64-linux-gnu&lt;br /&gt;
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libsanitizer --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --disable-werror --disable-multilib --with-arch=rv64imafdc --with-abi=lp64d --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=riscv64-linux-gnu --program-prefix=riscv64-linux-gnu- --includedir=/usr/riscv64-linux-gnu/include --with-build-config=bootstrap-lto-lean --enable-link-mutex&lt;br /&gt;
Thread model: posix&lt;br /&gt;
Supported LTO compression algorithms: zlib&lt;br /&gt;
gcc version 10.2.1 20210110 (Debian 10.2.1-6)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create or enter the directory where the files used in this guide will be stored. This tutorial will be using the Linux home directory. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-home-directory-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Home Directory Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-home-directory-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd ~&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-new-directory-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;New Directory Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-new-directory-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ mkdir ~/Star64-Firmware&lt;br /&gt;
 $ cd ~/Star64-Firmware/&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Clone the StarFive Tools GitHub repository. This will be used to create the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL image and provide the &amp;lt;code&amp;gt;.its&amp;lt;/code&amp;gt; FIT image tree source file which provides the configuration for the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image file. &lt;br /&gt;
&lt;br /&gt;
 $ git clone --depth 1 https://github.com/starfive-tech/Tools&lt;br /&gt;
Compile the SPL Tool used to create the SPL image in the &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/Tools/spl_tool/&amp;lt;/code&amp;gt; directory using &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;. &lt;br /&gt;
 $ make -C Tools/spl_tool/&lt;br /&gt;
==U-Boot==&lt;br /&gt;
&lt;br /&gt;
Clone the U-Boot GitHub repository. The entire history is not needed (&amp;lt;code&amp;gt;--depth 1&amp;lt;/code&amp;gt;) and we want the Star64 branch (&amp;lt;code&amp;gt;-b Star64&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ git clone --depth 1 -b Star64 &amp;lt;nowiki&amp;gt;https://github.com/Fishwaldo/u-boot.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Enter the U-Boot directory.&lt;br /&gt;
 $ cd u-boot/&lt;br /&gt;
Select the U-Boot configuration for the Star64, marking the architecture as RISC-V (&amp;lt;code&amp;gt;ARCH=riscv&amp;lt;/code&amp;gt;) and using the cross-compiler installed earlier(&amp;lt;code&amp;gt;CROSS_COMPILE=riscv64-linux-gnu-&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ make pine64_star64_defconfig ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-&lt;br /&gt;
Finally, compile U-Boot. &lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-&lt;br /&gt;
This should create three files. &lt;br /&gt;
# The U-Boot binary, later packaged as an OpenSBI payload, located at &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/u-boot.bin&amp;lt;/code&amp;gt;. &lt;br /&gt;
# The device tree blob (binary), which contains information on the characteristics of the device and is passed to the operating system instead of hard-coding device configurations into the operating system, and is located at &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/arch/riscv/dts/pine64_star64.dtb&amp;lt;/code&amp;gt;.&lt;br /&gt;
# The U-Boot secondary program loader which will later be packaged into the &amp;lt;code&amp;gt;u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt; file and is located at &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/spl/u-boot-spl.bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
==OpenSBI==&lt;br /&gt;
Return to the directory where the files for this build are stored. In this case it is the Linux home directory. Unless you have since changed directories, &lt;br /&gt;
 $ cd ..&lt;br /&gt;
should return to to the directory before the U-Boot section. &lt;br /&gt;
&lt;br /&gt;
Clone the OpenSBI U-Boot repository and enter its directory. The entire history is not needed (&amp;lt;code&amp;gt;--depth 1&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ git clone --depth 1 &amp;lt;nowiki&amp;gt;https://github.com/riscv/opensbi.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ cd opensbi/&lt;br /&gt;
Compile OpenSBI using &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;. Make sure to set &lt;br /&gt;
# the architecture as RISC-V (&amp;lt;code&amp;gt;ARCH=riscv&amp;lt;/code&amp;gt;) &lt;br /&gt;
# the compiler as the cross-compiler installed earlier (&amp;lt;code&amp;gt;CROSS_COMPILE=riscv64-linux-gnu-&amp;lt;/code&amp;gt;)&lt;br /&gt;
# the platform as generic (&amp;lt;code&amp;gt;PLATFORM=generic&amp;lt;/code&amp;gt;)&lt;br /&gt;
# the OpenSBI payload path as the path to the &amp;lt;code&amp;gt;u-boot.bin&amp;lt;/code&amp;gt; file created in the [[#U-Boot|U-Boot]] step (&amp;lt;code&amp;gt;FW_PAYLOAD_PATH=&amp;lt;working_directory&amp;gt;/u-boot/u-boot.bin&amp;lt;/code&amp;gt;)&lt;br /&gt;
# the flattened device tree (device tree blob) as the &amp;lt;code&amp;gt;pine64_star64.dtb&amp;lt;/code&amp;gt; file created in the [[#U-Boot|U-Boot]] step (&amp;lt;code&amp;gt;FW_FDT_PATH=&amp;lt;working_directory&amp;gt;/u-boot/arch/riscv/dts/pine64_star64.dtb&amp;lt;/code&amp;gt;)&lt;br /&gt;
# &amp;lt;code&amp;gt;FW_TEXT_START&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;0x40000000&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;FW_TEXT_START=0x40000000&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=generic FW_PAYLOAD_PATH=&amp;lt;working_directory&amp;gt;/u-boot/u-boot.bin FW_FDT_PATH=&amp;lt;working_directory&amp;gt;/u-boot/arch/riscv/dts/pine64_star64.dtb FW_TEXT_START=0x40000000&lt;br /&gt;
Make sure to replace &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;&amp;lt;/code&amp;gt; with the directory created or chosen in [[#Preparing_the_Build_Environment|Preparing the Build Environment]]. &lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-compile-opensbi-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-compile-opensbi-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=generic FW_PAYLOAD_PATH=~/u-boot/u-boot.bin FW_FDT_PATH=~/u-boot/arch/riscv/dts/pine64_star64.dtb FW_TEXT_START=0x40000000&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
This should create one file, &amp;lt;code&amp;gt;fw_payload.bin&amp;lt;/code&amp;gt;, which contains OpenSBI with U-Boot as the payload. The file is located at &amp;lt;code&amp;gt;opensbi/build/platform/generic/firmware/fw_payload.bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Creating the SPL File==&lt;br /&gt;
Go to the directory the SPL Tool compiled earlier is located in. If these instructions were followed exactly the following should work: &lt;br /&gt;
 $ cd ../Tools/spl_tool/&lt;br /&gt;
Use the SPL Tool to create the &amp;lt;code&amp;gt;u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt; SPL image. &lt;br /&gt;
 $ ./spl_tool -c -f &amp;lt;working_directory&amp;gt;/u-boot/spl/u-boot-spl.bin&lt;br /&gt;
Make sure to replace &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;&amp;lt;/code&amp;gt; with the directory created or chosen in [[#Preparing_the_Build_Environment|Preparing the Build Environment]]. &lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-spl-tool-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-spl-tool-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ ./spl_tool -c -f ~/u-boot/spl/u-boot-spl.bin&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
This should produce a &amp;lt;code&amp;gt;u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt; file located at &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/spl/u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt;&lt;br /&gt;
==Creating the fw_payload File==&lt;br /&gt;
Return to the directory where the files for this build are stored. In this case it is the Linux home directory. Unless you have since changed directories, &lt;br /&gt;
 $ cd ..&lt;br /&gt;
should work. &lt;br /&gt;
&lt;br /&gt;
Enter the &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/Tools/uboot_its/&amp;lt;/code&amp;gt; directory which holds the &amp;lt;code&amp;gt;.its&amp;lt;/code&amp;gt; FIT image tree source file which provides the configuration for the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image file. &lt;br /&gt;
 $ cd Tools/uboot_its/&lt;br /&gt;
The process of making the U-Boot image requires the &amp;lt;code&amp;gt;fw_payload.bin&amp;lt;/code&amp;gt; created earlier so copy that to the current directory. &lt;br /&gt;
 $ cp &amp;lt;working_directory&amp;gt;/opensbi/build/platform/generic/firmware/fw_payload.bin ./&lt;br /&gt;
Make sure to replace &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;&amp;lt;/code&amp;gt; with the directory created or chosen in [[#Preparing_the_Build_Environment|Preparing the Build Environment]]. &lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-fw_payload-cp-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-fw_payload-cp-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ cp ~/opensbi/build/platform/generic/firmware/fw_payload.bin ./&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Make the &amp;lt;code&amp;gt;star64_fw_payload.img&amp;lt;/code&amp;gt; U-Boot image file using the U-Boot &amp;lt;code&amp;gt;mkimage&amp;lt;/code&amp;gt; tool. The &amp;lt;code&amp;gt;mkimage&amp;lt;/code&amp;gt; tool is located in the &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/u-boot/tools/&amp;lt;/code&amp;gt; directory but requires the &amp;lt;code&amp;gt;visionfive2-uboot-fit-image.its&amp;lt;/code&amp;gt; file which is located in &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/Tools/uboot_its/&amp;lt;/code&amp;gt; so should be executed in the &amp;lt;code&amp;gt;uboot_its&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
 $ &amp;lt;working_directory&amp;gt;/tools/mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware star64_fw_payload.img&lt;br /&gt;
Make sure to replace &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;&amp;lt;/code&amp;gt; with the directory created or chosen in [[#Preparing_the_Build_Environment|Preparing the Build Environment]]. &lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-mkimage-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-mkimage-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ ~/u-boot/tools/mkimage -f visionfive2-uboot-fit-image.its -A riscv -O u-boot -T firmware star64_fw_payload.img&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
There is currently no &amp;lt;code&amp;gt;.its&amp;lt;/code&amp;gt; file specifically for the Star64 so the VisionFive2's &amp;lt;code&amp;gt;.its&amp;lt;/code&amp;gt; file is used instead as they share a processor.&lt;br /&gt;
&lt;br /&gt;
This should produce a file called &amp;lt;code&amp;gt;star64_fw_payload.img&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;/Tools/uboot_its/&amp;lt;/code&amp;gt; directory&lt;br /&gt;
==Credits==&lt;br /&gt;
https://doc-en.rvspace.org/VisionFive2/SWTRM/VisionFive2_SW_TRM/compiling_u-boot_and_kernel%20-%20vf2.html&lt;br /&gt;
https://wiki.pine64.org/wiki/User:Vitali/Create_a_bootable_Debian/Linux_SDCard_for_the_Pine64/Star64_from_scratch&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=19975</id>
		<title>User:RemDogKap/SandBox/Build U-Boot and OpenSBI From Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=19975"/>
		<updated>2023-06-26T00:22:34Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: OpenSBI section written&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Placeholder intro and explanation, I'm tired don't want to write now, contributions welcome&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;br /&gt;
* Must use linux, can use wsl &lt;br /&gt;
&lt;br /&gt;
==Preparing the Build Environment==&lt;br /&gt;
Fist, install the cross-compiler and if not already installed, git. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install gcc-riscv64-linux-gnu git&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-gcc-version-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;[Optional] Check the version of the &amp;lt;code&amp;gt;riscv64-linux-gnu-gcc&amp;lt;/code&amp;gt; compiler.&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-gcc-version-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 $ riscv64-linux-gnu-gcc -v&lt;br /&gt;
The output should looks something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using built-in specs.&lt;br /&gt;
COLLECT_GCC=riscv64-linux-gnu-gcc&lt;br /&gt;
COLLECT_LTO_WRAPPER=usr/lib/gcc-cross/riscv64-linux-gnu/10/lto-wrapper&lt;br /&gt;
Target: riscv64-linux-gnu&lt;br /&gt;
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libsanitizer --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --disable-werror --disable-multilib --with-arch=rv64imafdc --with-abi=lp64d --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=riscv64-linux-gnu --program-prefix=riscv64-linux-gnu- --includedir=/usr/riscv64-linux-gnu/include --with-build-config=bootstrap-lto-lean --enable-link-mutex&lt;br /&gt;
Thread model: posix&lt;br /&gt;
Supported LTO compression algorithms: zlib&lt;br /&gt;
gcc version 10.2.1 20210110 (Debian 10.2.1-6)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create or enter the directory where the files used in this guide will be stored. This tutorial will be using the Linux home directory. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-home-directory-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Home Directory Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-home-directory-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd ~&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-new-directory-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;New Directory Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-new-directory-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ mkdir ~/Star64-Firmware&lt;br /&gt;
 $ cd ~/Star64-Firmware&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
==U-Boot==&lt;br /&gt;
&lt;br /&gt;
Clone the U-Boot GitHub repository. The entire history is not needed (&amp;lt;code&amp;gt;--depth 1&amp;lt;/code&amp;gt;) and we want the Star64 branch (&amp;lt;code&amp;gt;-b Star64&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ git clone --depth 1 -b Star64 &amp;lt;nowiki&amp;gt;https://github.com/Fishwaldo/u-boot.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Enter the U-Boot directory.&lt;br /&gt;
 $ cd u-boot&lt;br /&gt;
Select the U-Boot configuration for the Star64, marking the architecture as RISC-V (&amp;lt;code&amp;gt;ARCH=riscv&amp;lt;/code&amp;gt;) and using the cross-compiler installed earlier(&amp;lt;code&amp;gt;CROSS_COMPILE=riscv64-linux-gnu-&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ make pine64_star64_defconfig ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-&lt;br /&gt;
Finally, compile U-Boot. &lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-&lt;br /&gt;
This should create three files. &lt;br /&gt;
# The U-Boot binary, later packaged as an OpenSBI payload, located at &amp;lt;code&amp;gt;u-boot/u-boot.bin&amp;lt;/code&amp;gt;. &lt;br /&gt;
# The device tree blob (binary), which contains information on the characteristics of the device and is passed to the operating system instead of hard-coding device configurations into the operating system, and is located at &amp;lt;code&amp;gt;u-boot/arch/riscv/dts/pine64_star64.dtb&amp;lt;/code&amp;gt;.&lt;br /&gt;
# The U-Boot secondary program loader which will later be packaged into the &amp;lt;code&amp;gt;u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt; file and is located at &amp;lt;code&amp;gt;u-boot/spl/u-boot-spl.bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
==OpenSBI==&lt;br /&gt;
Return to the directory where the files for this build are stored. In this case it is the Linux home directory. Unless you have since changed directories, &lt;br /&gt;
 $ cd ..&lt;br /&gt;
should return to to the directory before the U-Boot section. &lt;br /&gt;
&lt;br /&gt;
Clone the OpenSBI U-Boot repository and enter its directory. The entire history is not needed (&amp;lt;code&amp;gt;--depth 1&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ git clone --depth 1 &amp;lt;nowiki&amp;gt;https://github.com/riscv/opensbi.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ cd opensbi&lt;br /&gt;
Compile OpenSBI using &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;. Make sure to set &lt;br /&gt;
# the architecture as RISC-V (&amp;lt;code&amp;gt;ARCH=riscv&amp;lt;/code&amp;gt;) &lt;br /&gt;
# the compiler as the cross-compiler installed earlier (&amp;lt;code&amp;gt;CROSS_COMPILE=riscv64-linux-gnu-&amp;lt;/code&amp;gt;)&lt;br /&gt;
# the platform as generic (&amp;lt;code&amp;gt;PLATFORM=generic&amp;lt;/code&amp;gt;)&lt;br /&gt;
# the OpenSBI payload path as the path to the &amp;lt;code&amp;gt;u-boot.bin&amp;lt;/code&amp;gt; file created in the [[#U-Boot|U-Boot]] step (&amp;lt;code&amp;gt;FW_PAYLOAD_PATH=&amp;lt;working_directory&amp;gt;/u-boot/u-boot.bin&amp;lt;/code&amp;gt;)&lt;br /&gt;
# the flattened device tree (device tree blob) as the &amp;lt;code&amp;gt;pine64_star64.dtb&amp;lt;/code&amp;gt; file created in the [[#U-Boot|U-Boot]] step (&amp;lt;code&amp;gt;FW_FDT_PATH=&amp;lt;working_directory&amp;gt;/u-boot/arch/riscv/dts/pine64_star64.dtb&amp;lt;/code&amp;gt;)&lt;br /&gt;
# &amp;lt;code&amp;gt;FW_TEXT_START&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;0x40000000&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;FW_TEXT_START=0x40000000&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=generic FW_PAYLOAD_PATH=&amp;lt;working_directory&amp;gt;/u-boot/u-boot.bin FW_FDT_PATH=&amp;lt;working_directory&amp;gt;/u-boot/arch/riscv/dts/pine64_star64.dtb FW_TEXT_START=0x40000000&lt;br /&gt;
Make sure to replace &amp;lt;code&amp;gt;&amp;lt;working_directory&amp;gt;&amp;lt;/code&amp;gt; with the directory created or chosen in [[#Preparing_the_Build_Environment|Preparing the Build Environment]], in this case the Linux home directory. &lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-compile-opensbi-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-compile-opensbi-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- PLATFORM=generic FW_PAYLOAD_PATH=~/u-boot/u-boot.bin FW_FDT_PATH=~/u-boot/arch/riscv/dts/pine64_star64.dtb FW_TEXT_START=0x40000000&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
This should create one file, &amp;lt;code&amp;gt;fw_payload.bin&amp;lt;/code&amp;gt;, which contains OpenSBI with U-Boot as the payload. The file is located at &amp;lt;code&amp;gt;opensbi/build/platform/generic/firmware/fw_payload.bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Credits==&lt;br /&gt;
https://doc-en.rvspace.org/VisionFive2/SWTRM/VisionFive2_SW_TRM/compiling_u-boot_and_kernel%20-%20vf2.html&lt;br /&gt;
1&lt;br /&gt;
https://wiki.pine64.org/wiki/User:Vitali/Create_a_bootable_Debian/Linux_SDCard_for_the_Pine64/Star64_from_scratch&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=19973</id>
		<title>User:RemDogKap/SandBox/Build U-Boot and OpenSBI From Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=19973"/>
		<updated>2023-06-25T23:02:54Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: set up compilation environment and build u-boot sections written&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Placeholder intro and explanation, I'm tired don't want to write now, contributions welcome&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;br /&gt;
* Must use linux, can use wsl &lt;br /&gt;
&lt;br /&gt;
==Preparing the Build Environment==&lt;br /&gt;
Fist, install the cross-compiler and if not already installed, git. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install gcc-riscv64-linux-gnu git&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-gcc-version-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;[Optional] Check the version of the &amp;lt;code&amp;gt;riscv64-linux-gnu-gcc&amp;lt;/code&amp;gt; compiler.&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-gcc-version-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 $ riscv64-linux-gnu-gcc -v&lt;br /&gt;
The output should looks something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Using built-in specs.&lt;br /&gt;
COLLECT_GCC=riscv64-linux-gnu-gcc&lt;br /&gt;
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/riscv64-linux-gnu/10/lto-wrapper&lt;br /&gt;
Target: riscv64-linux-gnu&lt;br /&gt;
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libsanitizer --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --disable-werror --disable-multilib --with-arch=rv64imafdc --with-abi=lp64d --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=riscv64-linux-gnu --program-prefix=riscv64-linux-gnu- --includedir=/usr/riscv64-linux-gnu/include --with-build-config=bootstrap-lto-lean --enable-link-mutex&lt;br /&gt;
Thread model: posix&lt;br /&gt;
Supported LTO compression algorithms: zlib&lt;br /&gt;
gcc version 10.2.1 20210110 (Debian 10.2.1-6)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create or enter the directory where the files used in this guide will be stored. This tutorial will be using the Linux home directory. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-home-directory-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Home Directory Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-home-directory-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ cd ~&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-new-directory-example&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;New Directory Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-new-directory-example&amp;quot;&amp;gt;&lt;br /&gt;
 $ mkdir ~/Star64-Firmware&lt;br /&gt;
 $ cd ~/Star64-Firmware&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
==U-Boot==&lt;br /&gt;
&lt;br /&gt;
Clone the U-Boot GitHub repository. The entire history is not needed (&amp;lt;code&amp;gt;--depth 1&amp;lt;/code&amp;gt;) and we want the Star64 branch (&amp;lt;code&amp;gt;-b Star64&amp;lt;/code&amp;gt;).&lt;br /&gt;
 $ git clone --depth 1 -b Star64 &amp;lt;nowiki&amp;gt;https://github.com/Fishwaldo/u-boot.git&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Enter the U-Boot directory.&lt;br /&gt;
 $ cd u-boot&lt;br /&gt;
Select the U-Boot configuration for the Star64, marking the architecture as RISC-V and using the cross-compiler installed earlier.&lt;br /&gt;
 $ make pine64_star64_defconfig ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-&lt;br /&gt;
Finally, compile U-Boot. &lt;br /&gt;
 $ make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu-&lt;br /&gt;
This should create three files. &lt;br /&gt;
# The U-Boot binary, later packaged as an OpenSBI payload, located at &amp;lt;code&amp;gt;/u-boot/u-boot.bin&amp;lt;/code&amp;gt;. &lt;br /&gt;
# The device tree blob (binary), which contains information on the characteristics of the device and is passed to the operating system instead of hard-coding device configurations into the operating system, and is located at &amp;lt;code&amp;gt;/u-boot/arch/riscv/dts/pine64_star64.dtb&amp;lt;/code&amp;gt;.&lt;br /&gt;
# The U-Boot secondary program loader which will later be packaged into the &amp;lt;code&amp;gt;u-boot-spl.bin.normal.out&amp;lt;/code&amp;gt; file and is located at &amp;lt;code&amp;gt;/u-boot/spl/u-boot-spl.bin&amp;lt;/code&amp;gt;.&lt;br /&gt;
==&lt;br /&gt;
&lt;br /&gt;
==Credits==&lt;br /&gt;
https://doc-en.rvspace.org/VisionFive2/SWTRM/VisionFive2_SW_TRM/compiling_u-boot_and_kernel%20-%20vf2.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.pine64.org/wiki/User:Vitali/Create_a_bootable_Debian/Linux_SDCard_for_the_Pine64/Star64_from_scratch&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=19972</id>
		<title>User:RemDogKap/SandBox/Build U-Boot and OpenSBI From Source</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_U-Boot_and_OpenSBI_From_Source&amp;diff=19972"/>
		<updated>2023-06-25T18:31:22Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Created page with &amp;quot;Placeholder intro and explanation, I'm tired don't want to write now, contributions welcome  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Placeholder intro and explanation, I'm tired don't want to write now, contributions welcome&lt;br /&gt;
&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&lt;br /&gt;
* Must use linux, can use wsl &lt;br /&gt;
&lt;br /&gt;
==Preparing the Build Environment==&lt;br /&gt;
Fist, set up the build environment. &lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install gcc-riscv64-linux-gnu&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-gcc-version-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;[Optional] Check the version of the &amp;lt;code&amp;gt;riscv64-linux-gnu-gcc&amp;lt;/code&amp;gt; compiler.&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 riscv64-linux-gnu-gcc -v&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ riscv64-linux-gnu-gcc -v&lt;br /&gt;
Using built-in specs.&lt;br /&gt;
COLLECT_GCC=riscv64-linux-gnu-gcc&lt;br /&gt;
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/riscv64-linux-gnu/10/lto-wrapper&lt;br /&gt;
Target: riscv64-linux-gnu&lt;br /&gt;
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libsanitizer --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --disable-werror --disable-multilib --with-arch=rv64imafdc --with-abi=lp64d --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=riscv64-linux-gnu --program-prefix=riscv64-linux-gnu- --includedir=/usr/riscv64-linux-gnu/include --with-build-config=bootstrap-lto-lean --enable-link-mutex&lt;br /&gt;
Thread model: posix&lt;br /&gt;
Supported LTO compression algorithms: zlib&lt;br /&gt;
gcc version 10.2.1 20210110 (Debian 10.2.1-6)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19969</id>
		<title>User:RemDogKap/SandBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19969"/>
		<updated>2023-06-25T02:47:46Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: added Build U-Boot and OpenSBI From Source&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
Links to documentation pages I am currently working on for the Star64 SBC&lt;br /&gt;
&lt;br /&gt;
ToDo:&lt;br /&gt;
*Explain that SD Card does not work at full speed&lt;br /&gt;
*Tutorial for loading disk images onto eMMC&lt;br /&gt;
*How to update XSPI U-Boot&lt;br /&gt;
*How to use NVME drives&lt;br /&gt;
*working state of various USB ports &lt;br /&gt;
*list hardware bugs&lt;br /&gt;
**SD Card Voltage &lt;br /&gt;
**USB over current&lt;br /&gt;
*Armbian Install &lt;br /&gt;
*Memory DTB fix/recompile eeprom thing&lt;br /&gt;
*How to flash eMMC from SD card if possible&lt;br /&gt;
*Things needed to build you own working image&lt;br /&gt;
*How to connect over serial &lt;br /&gt;
&lt;br /&gt;
[[/First Setup]]&lt;br /&gt;
&lt;br /&gt;
[[/Status of Features]]&lt;br /&gt;
&lt;br /&gt;
[[/Build Your Own Image]]&lt;br /&gt;
&lt;br /&gt;
[[/Update XSPI Flash SPL and U-Boot]]&lt;br /&gt;
&lt;br /&gt;
[[/Build U-Boot and OpenSBI From Source]]&lt;br /&gt;
&lt;br /&gt;
[[Recovering the Bootloader for STAR64 JH7710 over serial using screen]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19877</id>
		<title>User:RemDogKap/SandBox/Update XSPI Flash SPL and U-Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19877"/>
		<updated>2023-06-17T02:58:54Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
{{Warning | Attempting these instructions may permanently brick (make nonfunctional) your device. Do not attempt unless you know what you are doing.}}&lt;br /&gt;
{{Warning | These instructions have not been tested or verified. Use at your own risk.}}&lt;br /&gt;
&lt;br /&gt;
The Star64 ships with an integrated 128 megabit (16 megabyte) xSPI NOR flash. Loaded on this flash from the factory is firmware called U-Boot and SPL but an old version designed for the StarFive VisionFive 2 SBC which may have incompatibilities with the Star64. The firmware on this flash is known as Das U-Boot, commonly just U-Boot which is an open-source primary boot loader. It performs similar functions to the BIOS on x86 platforms. The SPL or Secondary Program Loader is the software that loads U-Boot, which in turn loads the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
There are two main ways to update the xSPI flash. The first uses the &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt; command which requires the Star64 to first boot into an OS. This method may not work on older versions of [firmware, os, something else????]. The other method requires only the ability to load U-Boot and uses TFTP and the U-Boot &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Required:&lt;br /&gt;
*Star64 SBC&lt;br /&gt;
*Computer running Linux, MacOS, or Windows&lt;br /&gt;
Possibly required:&lt;br /&gt;
*Ability to communicate over TTL (transistor to transistor logic) UART&lt;br /&gt;
*Ability to network the Star64 to a computer over ethernet&lt;br /&gt;
&lt;br /&gt;
==flashcp==&lt;br /&gt;
First, connect to your Star64 over UART or with a mouse, keyboard, and monitor. &lt;br /&gt;
Next, install the &amp;lt;code&amp;gt;mtd-utils&amp;lt;/code&amp;gt; package onto the Star64 if not already installed. This package is a set of tools that allow access to raw flash storage devices such as the xSPI flash. Also install &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if not already installed. These instructions assume that you are using the &amp;lt;code&amp;gt;deb&amp;lt;/code&amp;gt; package manager. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install mtb-utils wget&lt;br /&gt;
&lt;br /&gt;
Next, using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; download the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image onto the.&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, print out the list of MTD (Memory Technology Device) raw flash devices using &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ cat /proc/mtd&lt;br /&gt;
&lt;br /&gt;
The output should look something like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dev:    size   erasesize  name&lt;br /&gt;
mtd0: 00020000 00001000 &amp;quot;spl&amp;quot;&lt;br /&gt;
mtd1: 00300000 00001000 &amp;quot;uboot&amp;quot;&lt;br /&gt;
mtd2: 00100000 00001000 &amp;quot;data&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, write the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image. to the respective partitions using &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt;, a command which writes to raw flash devices with more protections than &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ flashcp -v [fishwaldo spl file name here].bin.normal.out /dev/&amp;lt;SPL Partition&amp;gt;&lt;br /&gt;
 $ flashcp -v [fishwaldo uboot img file name here].img /dev/&amp;lt;U-Boot Partition&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;SPL Partition&amp;gt;&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;spl&amp;quot; from the cat printout, in this case &amp;lt;code&amp;gt;mtd0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;U-Boot Partition&amp;gt;&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;uboot&amp;quot; in the cat printout, in this case &amp;lt;code&amp;gt;mtd1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
At this point your xSPI flash has been rewritten and only a system restart is needed for the changes to take effect. &lt;br /&gt;
&lt;br /&gt;
==tftpboot==&lt;br /&gt;
The &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; method uses a TFTP (Trivial File Transfer Protocol, a protocol which allows for basic file transfer functionality without authentication) server to transfer the SPL file and U-Boot image from a host computer to the Star64 running U-Boot and using the &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command and then written to flash using the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; command which is a U-Boot command used to access SPI flash. &lt;br /&gt;
&lt;br /&gt;
===Preparing The TFTP Server===&lt;br /&gt;
====Linux====&lt;br /&gt;
First, on your computer (not the Star64) install a TFTP server and &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if you do not already have it.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install tftpd-hpa wget&lt;br /&gt;
Next, check that the TFPT server is running using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo systemctl status tftpd-hpa&lt;br /&gt;
This should output somethng like &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;●&amp;lt;/span&amp;gt; tftpd-hpa.service - LSB: HPA's tftp server&lt;br /&gt;
      Loaded: loaded (/etc/init.d/tftpd-hpa; generated)&lt;br /&gt;
      Active: &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;active (running)&amp;lt;/span&amp;gt; since Sat 2023-06-10 20:51:28 CDT; 17min ago&lt;br /&gt;
        Docs: man:systemd-sysv-generator(8)&lt;br /&gt;
     Process: 1016 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=0/SUCCESS)&lt;br /&gt;
       Tasks: 1 (limit: 2306)&lt;br /&gt;
      Memory: 588.0K&lt;br /&gt;
         CPU: 23ms&lt;br /&gt;
      CGroup: /system.slice/tftpd-hpa.service&lt;br /&gt;
             └─1023 /usr/sbin/in.tftpd --listen --user tftp --address :69 --secure /srv/tftp&lt;br /&gt;
 &lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Starting tftpd-hpa.service - LSB: HPA's tftp server...&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm tftpd-hpa[1016]: Starting HPA's tftpd: in.tftpd.&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Started tftpd-hpa.service - LSB: HPA's tftp server.           &lt;br /&gt;
&lt;br /&gt;
If the service is not running, try&lt;br /&gt;
 $ sudo systemctl start tftpd-hpa&lt;br /&gt;
and check the status again. If it is still not running please join the #star64 channel in the Pine64 IRC, Discord, or Matrix.&lt;br /&gt;
&lt;br /&gt;
Next, edit the configuration file for &amp;lt;code&amp;gt;tftpd-hpa&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo nano /etc/default/tftpd-hpa&lt;br /&gt;
by default it should look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&amp;lt;/code&amp;gt;. The final file should look like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/home/&amp;lt;user&amp;gt;/tftp_share&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is your username. &lt;br /&gt;
After that, save and close the file then restart the TFTP server.&lt;br /&gt;
 $ sudo systemctl restart tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
Next in your home directory (&amp;lt;code&amp;gt;/home/user&amp;lt;/code&amp;gt;) create a folder called &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt;&lt;br /&gt;
 $ mkdir /home/user/tftp_share&lt;br /&gt;
In this folder, download  the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. &lt;br /&gt;
 $ cd /home/user/tftp_share&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before connecting to the Star64 and updating the firmware install minicom, virtual console software, so it will be possible to communicate with the Star64.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install minicom &lt;br /&gt;
Next connect the your USB to TTL UART adapter to the computer and list the connected serial devices. &lt;br /&gt;
 $ dmesg | grep tty&lt;br /&gt;
Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
to be&lt;br /&gt;
filled in&lt;br /&gt;
later &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Find the address of the TTL UART to USB adapter in the list (example: &amp;lt;code&amp;gt;ttyUSB0&amp;lt;/code&amp;gt;) and connect to the serial device with a baud rate of 115200. &lt;br /&gt;
 $ sudo minicom -D /dev/&amp;lt;Device Address&amp;gt; -b 115200&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;Device Address&amp;gt;&amp;lt;/code&amp;gt; is the address found in the step above. &amp;lt;span class=&amp;quot;mw-customtoggle-device-address-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-device-address-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 $ sudo minicom -D /dev/ttyUSB0 -b 115200&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
First, install two pieces of software, [https://pjo2.github.io/tftpd64/ tftpd64], a TFTP server for windows, and [http://ttssh2.osdn.jp/index.html.en Tera Term], a virtual console for interacting with the Star64 in U-Boot.&lt;br /&gt;
Next on your desktop, create a folder called &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt;&lt;br /&gt;
In this folder, download  the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image from [https://pine64.my-ho.st:8443/ here].&lt;br /&gt;
&lt;br /&gt;
Next, load tftpd64 and configure the settings to have the &amp;quot;Current Directory&amp;quot; as the &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt; folder on the desktop and &amp;quot;Server interfaces&amp;quot; is set to &amp;lt;code&amp;gt;127.0.0.1 Software Loopback Interface 1&amp;lt;/code&amp;gt;. The path should look something like &amp;lt;code&amp;gt;C:\Users\${Username}\Desktop\tftp_share&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;${Username}&amp;lt;/code&amp;gt; is your username on Windows. &lt;br /&gt;
[[File:Star64 tftpd64 settings.png|none|500px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
===Updating the SPI Flash===&lt;br /&gt;
&lt;br /&gt;
Next, connect a TTL UART to USB cable to to the Star64 with the GND cable on pin 6 of the GPIO header, TXD on pin 8, and RXD on pin 10 as well as ethernet. Note that depending on your UART adapter you may have to switch TXD and RXD. Now power on the Star64 and enter U-Boot. You will need to press a key to prevent it from autobooting and instead enter the U-Boot command prompt.&lt;br /&gt;
Once you are in the U-Boot shell set some environment variables. &lt;br /&gt;
First, set the IP address of the Star64 and connect it to the network using the &amp;lt;code&amp;gt;dhcp&amp;lt;/code&amp;gt; command.&lt;br /&gt;
 # dhcp &lt;br /&gt;
&lt;br /&gt;
Set an environment variable of the TFTP server to make future command easier. If you don't what the IP address of your TFTP server is you can see connected devices in your router's configuration which can usually be accessed by typing in the IP address found on the router itself.&lt;br /&gt;
 # setenv &amp;lt;server IP&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;server IP&amp;lt;/code&amp;gt; is the IP address of the TFTP server. &amp;lt;span class=&amp;quot;mw-customtoggle-set-ip-addr-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-set-ip-addr-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 # setenv 192.168.1.199&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
Ping the TFTP server from the Star64 to make sure the connection works where &amp;lt;code&amp;gt;&amp;lt;Server IP&amp;gt;&amp;lt;/code&amp;gt; refers to the IP address of your TFTP server.  Note that if you are hosting the TFTP server on Windows, you may need to configure Windows firewall to allow &amp;lt;code&amp;gt;‘File and Printer Sharing (Echo Request – ICMPv4 – In)’&amp;lt;/code&amp;gt;. This is only needed to test the network connection with &amp;lt;code&amp;gt;ping&amp;lt;/code&amp;gt; and not for the actual &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command so if &amp;lt;code&amp;gt;ping&amp;lt;/code&amp;gt; fails &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; may still succeed. &lt;br /&gt;
 # ping &amp;lt;Server IP&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mw-customtoggle-ping-ip-addr-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt; &lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-ping-ip-addr-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 # ping 192.168.1.228&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
The result should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Star64 # ping 192.168.1.199&lt;br /&gt;
Using ethernet@16030000 device&lt;br /&gt;
host 192.168.1.199 is alive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If ping fails, please try again or please join the #star64 channel in the Pine64 IRC, Discord, or Matrix for help. &lt;br /&gt;
&lt;br /&gt;
Finally, it is time to update the xSPI flash. &lt;br /&gt;
&lt;br /&gt;
First, initialize the flash with the &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt; command.&lt;br /&gt;
 # sf probe&lt;br /&gt;
The output should be something like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Star64 # sf probe&lt;br /&gt;
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Next copy the SPL &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; file to memory address 0xa0000000 from our TFTP server.&lt;br /&gt;
 # tftpboot 0xa0000000 ${serverip}:[name of fishwaldo spl file]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
Then use &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; to erase and update the SPI flash from memory. In this case we are copying from memory address 0xa0000000 which we wrote to earlier with an offset of 0x0.&lt;br /&gt;
&lt;br /&gt;
 # sf update 0xa0000000 0x0 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, copy the U-Boot &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; binary to memory address 0xa0000000 from the TFTP server. &lt;br /&gt;
 # tftpboot 0xa0000000 ${serverip}:[name of fishwaldo uboot image]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
&lt;br /&gt;
Finally, write the new U-Boot binary using &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; from memory address 0xa0000000 with an offset of 0x100000. &lt;br /&gt;
 # sf update 0xa0000000 0x100000 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the Star64 and the changes should have taken effect.&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19876</id>
		<title>User:RemDogKap/SandBox/Update XSPI Flash SPL and U-Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19876"/>
		<updated>2023-06-17T02:45:20Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: minor formatting updates&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
{{Warning | Attempting these instructions may permanently brick (make nonfunctional) your device. Do not attempt unless you know what you are doing.}}&lt;br /&gt;
{{Warning | These instructions have not been tested or verified. Use at your own risk.}}&lt;br /&gt;
&lt;br /&gt;
The Star64 ships with an integrated 128 megabit (16 megabyte) xSPI NOR flash. Loaded on this flash from the factory is firmware called U-Boot and SPL but an old version designed for the StarFive VisionFive 2 SBC which may have incompatibilities with the Star64. The firmware on this flash is known as Das U-Boot, commonly just U-Boot which is an open-source primary boot loader. It performs similar functions to the BIOS on x86 platforms. The SPL or Secondary Program Loader is the software that loads U-Boot, which in turn loads the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
There are two main ways to update the xSPI flash. The first uses the &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt; command which requires the Star64 to first boot into an OS. This method may not work on older versions of [firmware, os, something else????]. The other method requires only the ability to load U-Boot and uses TFTP and the U-Boot &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Required:&lt;br /&gt;
*Star64 SBC&lt;br /&gt;
*Computer running Linux, MacOS, or Windows&lt;br /&gt;
Possibly required:&lt;br /&gt;
*Ability to communicate over TTL (transistor to transistor logic) UART&lt;br /&gt;
*Ability to network the Star64 to a computer over ethernet&lt;br /&gt;
&lt;br /&gt;
==flashcp==&lt;br /&gt;
First, connect to your Star64 over UART or with a mouse, keyboard, and monitor. &lt;br /&gt;
Next, install the &amp;lt;code&amp;gt;mtd-utils&amp;lt;/code&amp;gt; package onto the Star64 if not already installed. This package is a set of tools that allow access to raw flash storage devices such as the xSPI flash. Also install &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if not already installed. These instructions assume that you are using the &amp;lt;code&amp;gt;deb&amp;lt;/code&amp;gt; package manager. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install mtb-utils wget&lt;br /&gt;
&lt;br /&gt;
Next, using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; download the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image onto the.&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, print out the list of MTD (Memory Technology Device) raw flash devices using &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ cat /proc/mtd&lt;br /&gt;
&lt;br /&gt;
The output should look something like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dev:    size   erasesize  name&lt;br /&gt;
mtd0: 00020000 00001000 &amp;quot;spl&amp;quot;&lt;br /&gt;
mtd1: 00300000 00001000 &amp;quot;uboot&amp;quot;&lt;br /&gt;
mtd2: 00100000 00001000 &amp;quot;data&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, write the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image. to the respective partitions using &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt;, a command which writes to raw flash devices with more protections than &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ flashcp -v [fishwaldo spl file name here].bin.normal.out /dev/&amp;lt;SPL Partition&amp;gt;&lt;br /&gt;
 $ flashcp -v [fishwaldo uboot img file name here].img /dev/&amp;lt;U-Boot Partition&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;SPL Partition&amp;gt;&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;spl&amp;quot; from the cat printout, in this case &amp;lt;code&amp;gt;mtd0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;U-Boot Partition&amp;gt;&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;uboot&amp;quot; in the cat printout, in this case &amp;lt;code&amp;gt;mtd1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
At this point your xSPI flash has been rewritten and only a system restart is needed for the changes to take effect. &lt;br /&gt;
&lt;br /&gt;
==tftpboot==&lt;br /&gt;
The &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; method uses a TFTP (Trivial File Transfer Protocol, a protocol which allows for basic file transfer functionality without authentication) server to transfer the SPL file and U-Boot image from a host computer to the Star64 running U-Boot and using the &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command and then written to flash using the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; command which is a U-Boot command used to access SPI flash. &lt;br /&gt;
&lt;br /&gt;
===Preparing The TFTP Server===&lt;br /&gt;
====Linux====&lt;br /&gt;
First, on your computer (not the Star64) install a TFTP server and &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if you do not already have it.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install tftpd-hpa wget&lt;br /&gt;
Next, check that the TFPT server is running using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo systemctl status tftpd-hpa&lt;br /&gt;
This should output somethng like &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;●&amp;lt;/span&amp;gt; tftpd-hpa.service - LSB: HPA's tftp server&lt;br /&gt;
      Loaded: loaded (/etc/init.d/tftpd-hpa; generated)&lt;br /&gt;
      Active: &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;active (running)&amp;lt;/span&amp;gt; since Sat 2023-06-10 20:51:28 CDT; 17min ago&lt;br /&gt;
        Docs: man:systemd-sysv-generator(8)&lt;br /&gt;
     Process: 1016 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=0/SUCCESS)&lt;br /&gt;
       Tasks: 1 (limit: 2306)&lt;br /&gt;
      Memory: 588.0K&lt;br /&gt;
         CPU: 23ms&lt;br /&gt;
      CGroup: /system.slice/tftpd-hpa.service&lt;br /&gt;
             └─1023 /usr/sbin/in.tftpd --listen --user tftp --address :69 --secure /srv/tftp&lt;br /&gt;
 &lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Starting tftpd-hpa.service - LSB: HPA's tftp server...&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm tftpd-hpa[1016]: Starting HPA's tftpd: in.tftpd.&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Started tftpd-hpa.service - LSB: HPA's tftp server.           &lt;br /&gt;
&lt;br /&gt;
If the service is not running, try&lt;br /&gt;
 $ sudo systemctl start tftpd-hpa&lt;br /&gt;
and check the status again. If it is still not running please join the #star64 channel in the Pine64 IRC, Discord, or Matrix.&lt;br /&gt;
&lt;br /&gt;
Next, edit the configuration file for &amp;lt;code&amp;gt;tftpd-hpa&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo nano /etc/default/tftpd-hpa&lt;br /&gt;
by default it should look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&amp;lt;/code&amp;gt;. The final file should look like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/home/&amp;lt;user&amp;gt;/tftp_share&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;user&amp;lt;/code&amp;gt; is your username. &lt;br /&gt;
After that, save and close the file then restart the TFTP server.&lt;br /&gt;
 $ sudo systemctl restart tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
Next in your home directory (&amp;lt;code&amp;gt;/home/user&amp;lt;/code&amp;gt;) create a folder called &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt;&lt;br /&gt;
 $ mkdir /home/user/tftp_share&lt;br /&gt;
In this folder, download  the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. &lt;br /&gt;
 $ cd /home/user/tftp_share&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before connecting to the Star64 and updating the firmware install minicom, virtual console software, so it will be possible to communicate with the Star64.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install minicom &lt;br /&gt;
Next connect the your USB to TTL UART adapter to the computer and list the connected serial devices. &lt;br /&gt;
 $ dmesg | grep tty&lt;br /&gt;
Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
to be&lt;br /&gt;
filled in&lt;br /&gt;
later &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Find the address of the TTL UART to USB adapter in the list (example: &amp;lt;code&amp;gt;ttyUSB0&amp;lt;/code&amp;gt;) and connect to the serial device with a baud rate of 115200. &lt;br /&gt;
 $ sudo minicom -D /dev/&amp;lt;Device Address&amp;gt; -b 115200&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;Device Address&amp;gt;&amp;lt;/code&amp;gt; is the address found in the step above. &amp;lt;span class=&amp;quot;mw-customtoggle-device-address-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-device-address-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 $ sudo minicom -D /dev/ttyUSB0 -b 115200&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
First, install two pieces of software, [https://pjo2.github.io/tftpd64/ tftpd64], a TFTP server for windows, and [http://ttssh2.osdn.jp/index.html.en Tera Term], a virtual console for interacting with the Star64 in U-Boot.&lt;br /&gt;
Next on your desktop, create a folder called &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt;&lt;br /&gt;
In this folder, download  the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image from [https://pine64.my-ho.st:8443/ here].&lt;br /&gt;
&lt;br /&gt;
Next, load tftpd64 and configure the settings to have the &amp;quot;Current Directory&amp;quot; as the &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt; folder on the desktop and &amp;quot;Server interfaces&amp;quot; is set to &amp;lt;code&amp;gt;127.0.0.1 Software Loopback Interface 1&amp;lt;/code&amp;gt;. The path should look something like &amp;lt;code&amp;gt;C:\Users\${Username}\Desktop\tftp_share&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;${Username}&amp;lt;/code&amp;gt; is your username on Windows. &lt;br /&gt;
[[File:Star64 tftpd64 settings.png|none|500px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
===Updating the SPI Flash===&lt;br /&gt;
&lt;br /&gt;
Next, connect a TTL UART to USB cable to to the Star64 with the GND cable on pin 6 of the GPIO header, TXD on pin 8, and RXD on pin 10 as well as ethernet. Note that depending on your UART adapter you may have to switch TXD and RXD. Now power on the Star64 and enter U-Boot. You will need to press a key to prevent it from autobooting and instead enter the U-Boot command prompt.&lt;br /&gt;
Once you are in the U-Boot shell set some environment variables. &lt;br /&gt;
First, set the IP address of the Star64 and connect it to the network using the &amp;lt;code&amp;gt;dhcp&amp;lt;/code&amp;gt; command.&lt;br /&gt;
 # dhcp &lt;br /&gt;
&lt;br /&gt;
Ping the TFTP server from the Star64 to make sure the connection works where &amp;lt;code&amp;gt;${Server IP}&amp;lt;/code&amp;gt; refers to the IP address of your TFTP server. If you don't what the IP address of your TFTP server is you can see connected devices in your router's configuration which can usually be accessed by typing in the IP address found on the router itself. Note that if you are hosting the TFTP server on Windows, you may need to configure Windows firewall to allow &amp;lt;code&amp;gt;‘File and Printer Sharing (Echo Request – ICMPv4 – In)’&amp;lt;/code&amp;gt;. This is only needed to test the network connection with &amp;lt;code&amp;gt;ping&amp;lt;/code&amp;gt; and not for the actual &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command so if &amp;lt;code&amp;gt;ping&amp;lt;/code&amp;gt; fails &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; may still succeed. &lt;br /&gt;
 # ping ${Server IP}&lt;br /&gt;
Example: &lt;br /&gt;
 # ping 192.168.1.228&lt;br /&gt;
The result should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Star64 # ping 192.168.1.199&lt;br /&gt;
Using ethernet@16030000 device&lt;br /&gt;
host 192.168.1.199 is alive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If ping fails, please try again or please join the #star64 channel in the Pine64 IRC, Discord, or Matrix for help. &lt;br /&gt;
&lt;br /&gt;
Finally, it is time to update the xSPI flash. &lt;br /&gt;
&lt;br /&gt;
First, initialize the flash with the &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt; command.&lt;br /&gt;
 # sf probe&lt;br /&gt;
The output should be something like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Star64 # sf probe&lt;br /&gt;
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Next copy the SPL &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; file to memory address 0xa0000000 from our TFTP server.&lt;br /&gt;
 # tftpboot 0xa0000000 ${serverip}:[name of fishwaldo spl file]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
Then use &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; to erase and update the SPI flash from memory. In this case we are copying from memory address 0xa0000000 which we wrote to earlier with an offset of 0x0.&lt;br /&gt;
&lt;br /&gt;
 # sf update 0xa0000000 0x0 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, copy the U-Boot &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; binary to memory address 0xa0000000 from the TFTP server. &lt;br /&gt;
 # tftpboot 0xa0000000 ${serverip}:[name of fishwaldo uboot image]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
&lt;br /&gt;
Finally, write the new U-Boot binary using &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; from memory address 0xa0000000 with an offset of 0x100000. &lt;br /&gt;
 # sf update 0xa0000000 0x100000 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the Star64 and the changes should have taken effect.&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19875</id>
		<title>User:RemDogKap/SandBox/First Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19875"/>
		<updated>2023-06-17T01:29:33Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: changed example sections to be collapsible, fixed typos, changed to be filled in things from ${} to &amp;lt;&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Star64 is a 64 bit, 4 core Single Board Computer. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
*[https://pine64.com/product-category/star64/ Star64 SBC]&lt;br /&gt;
*[https://pine64.com/product-category/star64-accessories/ 12V 3A to 5A Power Supply] (Any 12V 3A or 5A type M 5.5mm OD/2.1mm ID barrel type DC Jack Power Supply will work)&lt;br /&gt;
*One or more types of removeable flash memory&lt;br /&gt;
**[https://pine64.com/product/64gb-class10-microsd-card/ SD card] of at least ??GB, no greater than 256GB&lt;br /&gt;
**[https://pine64.com/product-category/star64-accessories/ eMMC Module] with [https://pine64.com/product/usb-adapter-for-emmc-module/ USB adapter]&lt;br /&gt;
*Ability to flash a storage device with a disk image. [https://etcher.balena.io/ Balena Etcher] is recommended, but advanced users can also use dd in a Unix-like OS&lt;br /&gt;
&lt;br /&gt;
==Choosing Your Distribution==&lt;br /&gt;
There are currently two working distributions of Linux compatible with the Star64, pinix and Armbian. Both distributions use the same kernel[???].The pinix distribution is a custom distribution built by Fishwaldo using Yocto which is an open source project used to create Linux distributions for embedded devices. The pinix distribution is currently focusing on support for GPU and VGPU acceleration for desktop environments. Both distributions use the deb package manager. The Armbian distribution is based on Debian/Ubuntu with changes to make it lightweight and compatible with ARM/RISC-V development boards. &lt;br /&gt;
&lt;br /&gt;
While there are other RISC-V compatible distributions, none of these have the required device tree entries for the Star64 meaning that none will work fully on the Star64. This includes images for the StarFive2, a sister board which uses the same processor, due to other hardware differences. It may be possible to get other distributions to run on the Star64 by cross compiling the working kernel into another distribution. &lt;br /&gt;
&lt;br /&gt;
More information about support for features can be accessed [[User:RemDogKap/SandBox/Status of Features | here]].&lt;br /&gt;
&lt;br /&gt;
==pinix==&lt;br /&gt;
There are currently three prebuilt versions of pinix. one command line only and two desktop environments. Choose one to use for this setup. &lt;br /&gt;
*star64-image-minimal - A command line only image.&lt;br /&gt;
*star64-image-weston - A Weston/Wayland &amp;quot;Demo&amp;quot; image.&lt;br /&gt;
*star64-image-plasma- A Plasma Based Image.&lt;br /&gt;
&lt;br /&gt;
===Flashing the Image===&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
&lt;br /&gt;
First, if not already installed, install &amp;lt;code&amp;gt;bzip2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install bzip2 wget&lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (&amp;lt;code&amp;gt;.wic.bz2&amp;lt;/code&amp;gt;) of your chosen version (minimal, weston, or plasma) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) using wget. &lt;br /&gt;
&lt;br /&gt;
 $ wget  &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/&amp;lt;Name of Image File&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;Name of Image File&amp;gt;&amp;lt;/code&amp;gt; is the name of your chosen image file. &amp;lt;span class=&amp;quot;mw-customtoggle-if-dl-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-if-dl-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/star64-image-minimal-star64-1.2.wic.bz2&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, decompress the file using bzip2.&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d &amp;lt;Path to Image File&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;Path to Image File&amp;gt;&amp;lt;/code&amp;gt; is the path to your image file. &amp;lt;span class=&amp;quot;mw-customtoggle-if-unzip-toggle&amp;quot; style=&amp;quot;text-decoration:underline;color:#0645ad&amp;quot;&amp;gt;Example&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible mw-collapsed&amp;quot; id=&amp;quot;mw-customcollapsible-if-unzip-toggle&amp;quot;&amp;gt;&lt;br /&gt;
 $ bzip2 -d star64-image-minimal-star64-1.2.wic.bz2&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, flash the image to the SD card or eMMC module. The open source Balena Etcher with GUI support is recommended but dd will work as well if you are an advanced user. &lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
First, make sure that you have [https://7-zip.org/ 7zip] installed and if not, install it. &lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (&amp;lt;code&amp;gt;.wic.bz2&amp;lt;/code&amp;gt;) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) by clicking on the files. &lt;br /&gt;
&lt;br /&gt;
Third, right click on the downloaded file and select 7-zip. Next click extract. &lt;br /&gt;
&lt;br /&gt;
Finally, use Balena Etcher to write your disk image to the SD Card or eMMC module . &lt;br /&gt;
&lt;br /&gt;
===Booting the Image===&lt;br /&gt;
&lt;br /&gt;
First, make sure that the Star64 is powered off, then set the boot dip switches to SD Card or eMMC, whichever applies to you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Star64_SD_switch_map.png|thumb|left|Dip switch settings to boot from SD Card.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Star64_EMMC_switch_map.png|thumb|Dip switch settings to boot from eMMC module.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, insert your flash media of choice and connect your peripherals. These can be a keyboard mouse and monitor or a TTL UART cable connected to the GPIO header. Finally, power on the system.&lt;br /&gt;
&lt;br /&gt;
After boot, you should be met with a login screen. The default credentials here for a root user are root as a username and Star64 as a password. The default credentials for a regular user are Star64 as a username and Star64 as a password. If you do not see the troublshooting section below&lt;br /&gt;
&lt;br /&gt;
==Troubeshooting==&lt;br /&gt;
{{:STAR64}}&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19857</id>
		<title>User:RemDogKap/SandBox/Update XSPI Flash SPL and U-Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19857"/>
		<updated>2023-06-13T02:13:21Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: switched the structure, completed the section on using windows.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
{{Warning | Attempting these instructions may permanently brick (make nonfunctional) your device. Do not attempt unless you know what you are doing.}}&lt;br /&gt;
{{Warning | These instructions have not been tested or verified. Use at your own risk.}}&lt;br /&gt;
&lt;br /&gt;
The Star64 ships with an integrated 128 megabit (16 megabyte) xSPI NOR flash. Loaded on this flash from the factory is firmware called U-Boot and SPL but an old version designed for the StarFive VisionFive 2 SBC which may have incompatibilities with the Star64. The firmware on this flash is known as Das U-Boot, commonly just U-Boot which is an open-source primary boot loader. It performs similar functions to the BIOS on x86 platforms. The SPL or Secondary Program Loader is the software that loads U-Boot, which in turn loads the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
There are two main ways to update the xSPI flash. The first uses the &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt; command which requires the Star64 to first boot into an OS. This method may not work on older versions of [firmware, os, something else????]. The other method requires only the ability to load U-Boot and uses TFTP and the U-Boot &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Required:&lt;br /&gt;
*Star64 SBC&lt;br /&gt;
*Computer running Linux, MacOS, or Windows&lt;br /&gt;
Possibly required:&lt;br /&gt;
*Ability to communicate over TTL (transistor to transistor logic) UART&lt;br /&gt;
*Ability to network the Star64 to a computer over ethernet&lt;br /&gt;
&lt;br /&gt;
==flashcp==&lt;br /&gt;
First, connect to your Star64 over UART or with a mouse, keyboard, and monitor. &lt;br /&gt;
Next, install the &amp;lt;code&amp;gt;mtd-utils&amp;lt;/code&amp;gt; package onto the Star64 if not already installed. This package is a set of tools that allow access to raw flash storage devices such as the xSPI flash. Also install &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if not already installed. These instructions assume that you are using the &amp;lt;code&amp;gt;deb&amp;lt;/code&amp;gt; package manager. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install mtb-utils wget&lt;br /&gt;
&lt;br /&gt;
Next, using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; download the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image onto the.&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, print out the list of MTD (Memory Technology Device) raw flash devices using &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ cat /proc/mtd&lt;br /&gt;
&lt;br /&gt;
The output should look something like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dev:    size   erasesize  name&lt;br /&gt;
mtd0: 00020000 00001000 &amp;quot;spl&amp;quot;&lt;br /&gt;
mtd1: 00300000 00001000 &amp;quot;uboot&amp;quot;&lt;br /&gt;
mtd2: 00100000 00001000 &amp;quot;data&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, write the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image. to the respective partitions using &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt;, a command which writes to raw flash devices with more protections than &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ flashcp -v [fishwaldo spl file name here].bin.normal.out /dev/${SPL Partition}&lt;br /&gt;
 $ flashcp -v [fishwaldo uboot img file name here].img /dev/${U-Boot Partition}&lt;br /&gt;
Where &amp;lt;code&amp;gt;${SPL Partition}&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;spl&amp;quot; from the cat printout, in this case &amp;lt;code&amp;gt;mtd0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;${U-Boot Partition}&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;uboot&amp;quot; in the cat printout, in this case &amp;lt;code&amp;gt;mtd1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
At this point your xSPI flash has been rewritten and only a system restart is needed for the changes to take effect. &lt;br /&gt;
&lt;br /&gt;
==tftpboot==&lt;br /&gt;
The &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; method uses a TFTP (Trivial File Transfer Protocol, a protocol which allows for basic file transfer functionality without authentication) server to transfer the SPL file and U-Boot image from a host computer to the Star64 running U-Boot and using the &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command and then written to flash using the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; command which is a U-Boot command used to access SPI flash. &lt;br /&gt;
&lt;br /&gt;
===Preparing The TFTP Server===&lt;br /&gt;
====Linux====&lt;br /&gt;
First, on your computer (not the Star64) install a TFTP server and &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if you do not already have it.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install tftpd-hpa wget&lt;br /&gt;
Next, check that the TFPT server is running using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo systemctl status tftpd-hpa&lt;br /&gt;
This should output somethng like &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;●&amp;lt;/span&amp;gt; tftpd-hpa.service - LSB: HPA's tftp server&lt;br /&gt;
      Loaded: loaded (/etc/init.d/tftpd-hpa; generated)&lt;br /&gt;
      Active: &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;active (running)&amp;lt;/span&amp;gt; since Sat 2023-06-10 20:51:28 CDT; 17min ago&lt;br /&gt;
        Docs: man:systemd-sysv-generator(8)&lt;br /&gt;
     Process: 1016 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=0/SUCCESS)&lt;br /&gt;
       Tasks: 1 (limit: 2306)&lt;br /&gt;
      Memory: 588.0K&lt;br /&gt;
         CPU: 23ms&lt;br /&gt;
      CGroup: /system.slice/tftpd-hpa.service&lt;br /&gt;
             └─1023 /usr/sbin/in.tftpd --listen --user tftp --address :69 --secure /srv/tftp&lt;br /&gt;
 &lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Starting tftpd-hpa.service - LSB: HPA's tftp server...&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm tftpd-hpa[1016]: Starting HPA's tftpd: in.tftpd.&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Started tftpd-hpa.service - LSB: HPA's tftp server.           &lt;br /&gt;
&lt;br /&gt;
If the service is not running, try&lt;br /&gt;
 $ sudo systemctl start tftpd-hpa&lt;br /&gt;
and check the status again. If it is still not running please join the #star64 channel in the Pine64 IRC, Discord, or Matrix.&lt;br /&gt;
&lt;br /&gt;
Next, edit the configuration file for &amp;lt;code&amp;gt;tftpd-hpa&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo nano /etc/default/tftpd-hpa&lt;br /&gt;
by default it should look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&amp;lt;/code&amp;gt;. The final file should look like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After that, save and close the file then restart the TFTP server.&lt;br /&gt;
 $ sudo systemctl restart tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
Next in your home directory (&amp;lt;code&amp;gt;/home/user&amp;lt;/code&amp;gt;) create a folder called &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt;&lt;br /&gt;
 $ mkdir /home/user/tftp_share&lt;br /&gt;
In this folder, download  the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. &lt;br /&gt;
 $ cd /home/user/tftp_share&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before connecting to the Star64 and updating the firmware install minicom, virtual console software, so it will be possible to communicate with the Star64.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install minicom &lt;br /&gt;
Next connect the your USB to TTL UART adapter to the computer and list the connected serial devices. &lt;br /&gt;
 $ dmesg | grep tty&lt;br /&gt;
Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
to be&lt;br /&gt;
filled in&lt;br /&gt;
later &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Find the address of the TTL UART to USB adapter in the list (example: &amp;lt;code&amp;gt;ttyUSB0&amp;lt;/code&amp;gt;) and connect to the serial device with a baud rate of 115200. &lt;br /&gt;
 $ sudo minicom -D /dev/${Device Address} -b 115200&lt;br /&gt;
Where ${Device Address} is the address found in the step above. Example:&lt;br /&gt;
 $ sudo minicom -D /dev/ttyUSB0 -b 115200&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
First, install two pieces of software, [https://pjo2.github.io/tftpd64/ tftpd64], a TFTP server for windows, and [http://ttssh2.osdn.jp/index.html.en Tera Term], a virtual console for interacting with the Star64 in U-Boot.&lt;br /&gt;
Next on your desktop, create a folder called &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt;&lt;br /&gt;
In this folder, download  the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image from [https://pine64.my-ho.st:8443/ here]&lt;br /&gt;
&lt;br /&gt;
Next, load tftpd64 and configure the settings to have the &amp;quot;Current Directory&amp;quot; as the &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt; folder on the desktop and &amp;quot;Server interfaces&amp;quot; is set to &amp;lt;code&amp;gt;127.0.0.1 Software Loopback Interface 1&amp;lt;/code&amp;gt;. The path should look something like &amp;lt;code&amp;gt;C:\Users\${Username}\Desktop\tftp_share&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;${Username}&amp;lt;/code&amp;gt; is your username on Windows. &lt;br /&gt;
[[File:Star64 tftpd64 settings.png|none|500px|thumb|left]]&lt;br /&gt;
&lt;br /&gt;
===Updating the SPI Flash===&lt;br /&gt;
&lt;br /&gt;
Next, connect a TTL UART to USB cable to to the Star64 with the GND cable on pin 6 of the GPIO header, TXD on pin 8, and RXD on pin 10 as well as ethernet. Note that depending on your UART adapter you may have to switch TXD and RXD. Now power on the Star64 and enter U-Boot. You will need to press a key to prevent it from autobooting and instead enter the U-Boot command prompt.&lt;br /&gt;
Once you are in the U-Boot shell set some environment variables. &lt;br /&gt;
First, set the IP address of the Star64 and connect it to the network using the &amp;lt;code&amp;gt;dhcp&amp;lt;/code&amp;gt; command.&lt;br /&gt;
 # dhcp &lt;br /&gt;
&lt;br /&gt;
Ping the TFTP server from the Star64 to make sure the connection works where &amp;lt;code&amp;gt;${Server IP}&amp;lt;/code&amp;gt; refers to the IP address of your TFTP server. If you don't what the IP address of your TFTP server is you can see connected devices in your router's configuration which can usually be accessed by typing in the IP address found on the router itself. Note that if you are hosting the TFTP server on Windows, you may need to configure Windows firewall to allow &amp;lt;code&amp;gt;‘File and Printer Sharing (Echo Request – ICMPv4 – In)’&amp;lt;/code&amp;gt;. This is only needed to test the network connection with &amp;lt;code&amp;gt;ping&amp;lt;/code&amp;gt; and not for the actual &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command so if &amp;lt;code&amp;gt;ping&amp;lt;/code&amp;gt; fails &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; may still succeed. &lt;br /&gt;
 # ping ${Server IP}&lt;br /&gt;
Example: &lt;br /&gt;
 # ping 192.168.1.228&lt;br /&gt;
The result should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Star64 # ping 192.168.1.199&lt;br /&gt;
Using ethernet@16030000 device&lt;br /&gt;
host 192.168.1.199 is alive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If ping fails, please try again or please join the #star64 channel in the Pine64 IRC, Discord, or Matrix for help. &lt;br /&gt;
&lt;br /&gt;
Finally, it is time to update the xSPI flash. &lt;br /&gt;
&lt;br /&gt;
First, initialize the flash with the &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt; command.&lt;br /&gt;
 # sf probe&lt;br /&gt;
The output should be something like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Star64 # sf probe&lt;br /&gt;
SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Next copy the SPL &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; file to memory address 0xa0000000 from our TFTP server.&lt;br /&gt;
 # tftpboot 0xa0000000 ${serverip}:[name of fishwaldo spl file]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
Then use &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; to erase and update the SPI flash from memory. In this case we are copying from memory address 0xa0000000 which we wrote to earlier with an offset of 0x0. [what is $filesize???? does the user need to replace it, will it just work?????]&lt;br /&gt;
&lt;br /&gt;
 # sf update 0xa0000000 0x0 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, copy the U-Boot &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; binary to memory address 0xa0000000 from the TFTP server. &lt;br /&gt;
 # tftpboot 0xa0000000 ${serverip}:[name of fishwaldo uboot image]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
&lt;br /&gt;
Finally, write the new U-Boot binary using &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; from memory address 0xa0000000 with an offset of 0x100000. [what is $filesize???? does the user need to replace it, will it just work?????]&lt;br /&gt;
 # sf update 0xa0000000 0x100000 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the Star64 and the changes should have taken effect.&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=File:Star64_tftpd64_settings.png&amp;diff=19856</id>
		<title>File:Star64 tftpd64 settings.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=File:Star64_tftpd64_settings.png&amp;diff=19856"/>
		<updated>2023-06-13T01:22:38Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: screenshot of settings for tftpd64 server on windows to flash U-Boot to Star64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
screenshot of settings for tftpd64 server on windows to flash U-Boot to Star64&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{PD|PD}}&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19855</id>
		<title>User:RemDogKap/SandBox/Update XSPI Flash SPL and U-Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19855"/>
		<updated>2023-06-13T00:06:06Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: minor syntax and grammar edits, introduced section on setting up minicom&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
{{Warning | Attempting these instructions may permanently brick (make nonfunctional) your device. Do not attempt unless you know what you are doing.}}&lt;br /&gt;
{{Warning | These instructions have not been tested or verified. Use at your own risk.}}&lt;br /&gt;
&lt;br /&gt;
The Star64 ships with an integrated 128 megabit (16 megabyte) xSPI NOR flash. Loaded on this flash from the factory is firmware called U-Boot and SPL but an old version designed for the StarFive VisionFive 2 SBC which may have incompatibilities with the Star64. The firmware on this flash is known as Das U-Boot, commonly just U-Boot which is an open-source primary boot loader. It performs similar functions to the BIOS on x86 platforms. The SPL or Secondary Program Loader is the software that loads U-Boot, which in turn loads the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
There are two main ways to update the xSPI flash. The first uses the &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt; command which requires the Star64 to first boot into an OS. This method may not work on older versions of [firmware, os, something else????]. The other method requires only the ability to load U-Boot and uses TFTP and the U-Boot &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Required:&lt;br /&gt;
*Star64 SBC&lt;br /&gt;
*Computer running Linux, MacOS, or Windows&lt;br /&gt;
Possibly required:&lt;br /&gt;
*Ability to communicate over TTL (transistor to transistor logic) UART&lt;br /&gt;
*Ability to network the Star64 to a computer over ethernet&lt;br /&gt;
&lt;br /&gt;
==flashcp==&lt;br /&gt;
First, connect to your Star64 over UART or with a mouse, keyboard, and monitor. &lt;br /&gt;
Next, install the &amp;lt;code&amp;gt;mtd-utils&amp;lt;/code&amp;gt; package onto the Star64 if not already installed. This package is a set of tools that allow access to raw flash storage devices such as the xSPI flash. Also install &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if not already installed. These instructions assume that you are using the &amp;lt;code&amp;gt;deb&amp;lt;/code&amp;gt; package manager. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install mtb-utils wget&lt;br /&gt;
&lt;br /&gt;
Next, using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; download the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image onto the.&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, print out the list of MTD (Memory Technology Device) raw flash devices using &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ cat /proc/mtd&lt;br /&gt;
&lt;br /&gt;
The output should look something like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dev:    size   erasesize  name&lt;br /&gt;
mtd0: 00020000 00001000 &amp;quot;spl&amp;quot;&lt;br /&gt;
mtd1: 00300000 00001000 &amp;quot;uboot&amp;quot;&lt;br /&gt;
mtd2: 00100000 00001000 &amp;quot;data&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, write the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image. to the respective partitions using &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt;, a command which writes to raw flash devices with more protections than &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ flashcp -v [fishwaldo spl file name here].bin.normal.out /dev/${SPL Partition}&lt;br /&gt;
 $ flashcp -v [fishwaldo uboot img file name here].img /dev/${U-Boot Partition}&lt;br /&gt;
Where &amp;lt;code&amp;gt;${SPL Partition}&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;spl&amp;quot; from the cat printout, in this case &amp;lt;code&amp;gt;mtd0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;${U-Boot Partition}&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;uboot&amp;quot; in the cat printout, in this case &amp;lt;code&amp;gt;mtd1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
At this point your xSPI flash has been rewritten and only a system restart is needed for the changes to take effect. &lt;br /&gt;
&lt;br /&gt;
==tftpboot==&lt;br /&gt;
The &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; method uses a TFTP (Trivial File Transfer Protocol, a protocol which allows for basic file transfer functionality without authentication) server to transfer the SPL file and U-Boot image from a host computer to the Star64 running U-Boot and using the &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command and then written to flash using the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; command which is a U-Boot command used to access SPI flash. &lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
First, on your computer (not the Star64) install a TFTP server and &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if you do not already have it.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install tftpd-hpa wget&lt;br /&gt;
Next, check that the TFPT server is running using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo systemctl status tftpd-hpa&lt;br /&gt;
This should output somethng like &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;●&amp;lt;/span&amp;gt; tftpd-hpa.service - LSB: HPA's tftp server&lt;br /&gt;
      Loaded: loaded (/etc/init.d/tftpd-hpa; generated)&lt;br /&gt;
      Active: &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;active (running)&amp;lt;/span&amp;gt; since Sat 2023-06-10 20:51:28 CDT; 17min ago&lt;br /&gt;
        Docs: man:systemd-sysv-generator(8)&lt;br /&gt;
     Process: 1016 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=0/SUCCESS)&lt;br /&gt;
       Tasks: 1 (limit: 2306)&lt;br /&gt;
      Memory: 588.0K&lt;br /&gt;
         CPU: 23ms&lt;br /&gt;
      CGroup: /system.slice/tftpd-hpa.service&lt;br /&gt;
             └─1023 /usr/sbin/in.tftpd --listen --user tftp --address :69 --secure /srv/tftp&lt;br /&gt;
 &lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Starting tftpd-hpa.service - LSB: HPA's tftp server...&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm tftpd-hpa[1016]: Starting HPA's tftpd: in.tftpd.&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Started tftpd-hpa.service - LSB: HPA's tftp server.           &lt;br /&gt;
&lt;br /&gt;
If the service is not running, try&lt;br /&gt;
 $ sudo systemctl start tftpd-hpa&lt;br /&gt;
and check the status again. If it is still not running please join the #star64 channel in the Pine64 IRC, Discord, or Matrix.&lt;br /&gt;
&lt;br /&gt;
Next, edit the configuration file for &amp;lt;code&amp;gt;tftpd-hpa&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo nano /etc/default/tftpd-hpa&lt;br /&gt;
by default it should look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&amp;lt;/code&amp;gt;. The final file should look like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After that, save and close the file then restart the TFTP server.&lt;br /&gt;
 $ sudo systemctl restart tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
Next in your home directory (&amp;lt;code&amp;gt;/home/user&amp;lt;/code&amp;gt;) create a folder called &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt;&lt;br /&gt;
 $ mkdir /home/user/tftp_share&lt;br /&gt;
In this folder, download  the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. &lt;br /&gt;
 $ cd /home/user/tftp_share&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before connecting to the Star64 and updating the firmware set up minicom, a virtual console software, so it will be possible to communicate with the Star64.&lt;br /&gt;
&lt;br /&gt;
First install minicom.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install minicom &lt;br /&gt;
Next connect the your USB to TTL UART adapter to the computer and list the connected serial devices. &lt;br /&gt;
 $ dmesg |grep tty&lt;br /&gt;
Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
to be&lt;br /&gt;
filled in&lt;br /&gt;
later &lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
Find the address of the adapter in the list (example: &amp;lt;code&amp;gt;ttyUSB0&amp;lt;/code&amp;gt;) and connect to the serial device with a baud rate of 115200. &lt;br /&gt;
 $ sudo minicom -D /dev/${Device Address} -b 115200&lt;br /&gt;
Where ${Device Address} is the address found in the step above. Example:&lt;br /&gt;
 $ sudo minicom -D /dev/ttyUSB0 -b 115200&lt;br /&gt;
&lt;br /&gt;
Next, connect a TTL UART to USB cable to to the Star64 with the GND cable on pin 6 of the GPIO header, TXD on pin 8, and RXD on pin 10. Note that depending on your UART adapter you may have to switch TXD and RXD. Now power on the Star64 and enter U-Boot. You will need to press a key to prevent it from autobooting and instead enter the U-Boot command prompt.&lt;br /&gt;
Once you are in the U-Boot shell set some environment variables. &lt;br /&gt;
First, set the IP address of your Star64 where &amp;lt;code&amp;gt;${IP Address}&amp;lt;/code&amp;gt; is the IP address you have chosen.&lt;br /&gt;
 $ setenv ipaddr ${IP Address}&lt;br /&gt;
An example IP address would be:&lt;br /&gt;
 $ setenv ipaddr 192.168.1.158&lt;br /&gt;
Next set the IP address of your TFTP server. If you don't what the IP address of your TFTP server is you can see connected devices in your router configuration which can usually be accessed by typing in the IP address found on the router itself. In this case &amp;lt;code&amp;gt;${Server IP}&amp;lt;/code&amp;gt; refers to the IP address of your TFTP server. &lt;br /&gt;
 # setenv serverip ${Server IP}&lt;br /&gt;
An example would be:&lt;br /&gt;
 $ setenv serverip 192.168.1.228&lt;br /&gt;
Note that it is important that the first three sets of numbers (in the examples &amp;lt;code&amp;gt;192.168.1&amp;lt;/code&amp;gt;) must be the same for your Star64, router, and TFTP server. The numbers may not be the same as in the example. &lt;br /&gt;
Ping the TFTP server from the Star64 to make sure the connection works where &amp;lt;code&amp;gt;${Server IP}&amp;lt;/code&amp;gt; refers to the IP address of your TFTP server.&lt;br /&gt;
 $ ping ${Server IP}&lt;br /&gt;
Example: &lt;br /&gt;
 $ ping 192.168.1.228&lt;br /&gt;
The result should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If ping fails, please try again or please join the #star64 channel in the Pine64 IRC, Discord, or Matrix for help. &lt;br /&gt;
&lt;br /&gt;
Finally, it is time to update the xSPI flash. &lt;br /&gt;
&lt;br /&gt;
First, initialize the flash with the &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt; command.&lt;br /&gt;
 $ sf probe&lt;br /&gt;
The output should be something like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Next copy the SPL &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; file to memory address 0xa0000000 from our TFTP server.&lt;br /&gt;
 $ tftpboot 0xa0000000 ${serverip}:[name of fishwaldo spl file]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
Then use &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; to erase and update the SPI flash from memory. In this case we are copying from memory address 0xa0000000 which we wrote to earlier with an offset of 0x0. [what is $filesize???? does the user need to replace it, will it just work?????]&lt;br /&gt;
&lt;br /&gt;
 $ sf update 0xa0000000 0x0 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, copy the U-Boot &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; binary to memory address 0xa0000000 from the TFTP server. &lt;br /&gt;
 $ tftpboot 0xa0000000 ${serverip}:[name of fishwaldo uboot image]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
&lt;br /&gt;
Finally, write the new U-Boot binary using &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; from memory address 0xa0000000 with an offset of 0x100000. [what is $filesize???? does the user need to replace it, will it just work?????]&lt;br /&gt;
 $ sf update 0xa0000000 0x100000 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the Star64 and the changes should have taken effect. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19847</id>
		<title>User:RemDogKap/SandBox/Update XSPI Flash SPL and U-Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19847"/>
		<updated>2023-06-11T03:32:04Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Finished initial writing of tftpboot linux instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
{{Warning | Attempting these instructions may permanently brick (make nonfunctional) your device. Do not attempt unless you know what you are doing.}}&lt;br /&gt;
{{Warning | These instructions have not been tested or verified. Use at your own risk.}}&lt;br /&gt;
&lt;br /&gt;
The Star64 ships with an integrated 128 megabit (16 megabyte) xSPI NOR flash. Loaded on this flash from the factory is firmware called U-Boot and SPL but an old version designed for the StarFive VisionFive 2 SBC which may have incompatibilities with the Star64. The firmware on this flash is known as Das U-Boot, commonly just U-Boot which is an open-source primary boot loader. It performs similar functions to the BIOS on x86 platforms. The SPL or Secondary Program Loader is the software that loads U-Boot, which in turn loads the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
There are two main ways to update the xSPI flash. The first uses the &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt; command which requires the Star64 to first boot into an OS. This method may not work on older versions of [firmware, os, something else????]. The other method requires only the ability to load U-Boot and uses TFTP and the U-Boot &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Required:&lt;br /&gt;
*Star64 SBC&lt;br /&gt;
*Computer running Linux, MacOS, or Windows&lt;br /&gt;
Possibly required:&lt;br /&gt;
*Ability to communicate over TTL (transistor to transistor logic) UART&lt;br /&gt;
*Ability to network the Star64 to a computer over ethernet&lt;br /&gt;
&lt;br /&gt;
==flashcp==&lt;br /&gt;
First, connect to your Star64 over UART or with a mouse, keyboard, and monitor. &lt;br /&gt;
Next, install the &amp;lt;code&amp;gt;mtd-utils&amp;lt;/code&amp;gt; package onto the Star64 if not already installed. This package is a set of tools that allow access to raw flash storage devices such as the xSPI flash. Also install &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if not already installed. These instructions assume that you are using the &amp;lt;code&amp;gt;deb&amp;lt;/code&amp;gt; package manager. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install mtb-utils wget&lt;br /&gt;
&lt;br /&gt;
Next, using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; download the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image onto the.&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, print out the list of MTD (Memory Technology Device) raw flash devices using &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ cat /proc/mtd&lt;br /&gt;
&lt;br /&gt;
The output should look something like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dev:    size   erasesize  name&lt;br /&gt;
mtd0: 00020000 00001000 &amp;quot;spl&amp;quot;&lt;br /&gt;
mtd1: 00300000 00001000 &amp;quot;uboot&amp;quot;&lt;br /&gt;
mtd2: 00100000 00001000 &amp;quot;data&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, write the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image. to the respective partitions using &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt;, a command which writes to raw flash devices with more protections than &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ flashcp -v [fishwaldo spl file name here].bin.normal.out /dev/${SPL Partition}&lt;br /&gt;
 $ flashcp -v [fishwaldo uboot img file name here].img /dev/${U-Boot Partition}&lt;br /&gt;
Where &amp;lt;code&amp;gt;${SPL Partition}&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;spl&amp;quot; from the cat printout, in this case &amp;lt;code&amp;gt;mtd0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;${U-Boot Partition}&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;uboot&amp;quot; in the cat printout, in this case &amp;lt;code&amp;gt;mtd1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point your xSPI flash has been rewritten and only a system restart is needed for the changes to take effect. &lt;br /&gt;
&lt;br /&gt;
==tftpboot==&lt;br /&gt;
The &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; method uses a TFTP (Trivial File Transfer Protocol, a protocol which allows for basic file transfer functionality without authentication) server to transfer the SPL file and U-Boot image from a host computer to the Star64 running U-Boot and using the &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command and then written to flash using the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; command which is a U-Boot command used to access SPI flash. &lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
First, on your computer (not the Star64) install a TFTP server and &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if you do not already have it.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install tftpd-hpa wget&lt;br /&gt;
Next, check that the TFPT server is running using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo systemctl status tftpd-hpa&lt;br /&gt;
This should output somethng like &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;●&amp;lt;/span&amp;gt; tftpd-hpa.service - LSB: HPA's tftp server&lt;br /&gt;
      Loaded: loaded (/etc/init.d/tftpd-hpa; generated)&lt;br /&gt;
      Active: &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;active (running)&amp;lt;/span&amp;gt; since Sat 2023-06-10 20:51:28 CDT; 17min ago&lt;br /&gt;
        Docs: man:systemd-sysv-generator(8)&lt;br /&gt;
     Process: 1016 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=0/SUCCESS)&lt;br /&gt;
       Tasks: 1 (limit: 2306)&lt;br /&gt;
      Memory: 588.0K&lt;br /&gt;
         CPU: 23ms&lt;br /&gt;
      CGroup: /system.slice/tftpd-hpa.service&lt;br /&gt;
             └─1023 /usr/sbin/in.tftpd --listen --user tftp --address :69 --secure /srv/tftp&lt;br /&gt;
 &lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Starting tftpd-hpa.service - LSB: HPA's tftp server...&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm tftpd-hpa[1016]: Starting HPA's tftpd: in.tftpd.&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Started tftpd-hpa.service - LSB: HPA's tftp server.           &lt;br /&gt;
&lt;br /&gt;
If the service is not running, try&lt;br /&gt;
 $ sudo systemctl start tftpd-hpa&lt;br /&gt;
and check the status again. If it is still not running please join the #star64 channel in the Pine64 IRC, Discord, or Matrix.&lt;br /&gt;
&lt;br /&gt;
Next, edit the configuration file for &amp;lt;code&amp;gt;tftpd-hpa&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo nano /etc/default/tftpd-hpa&lt;br /&gt;
by default it should look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&amp;lt;/code&amp;gt;. The final file should look like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After that, save and close the file then restart the TFTP server.&lt;br /&gt;
 $ sudo systemctl restart tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
Next in your home directory (&amp;lt;code&amp;gt;/home/user&amp;lt;/code&amp;gt;) create a folder called &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt;&lt;br /&gt;
 $ mkdir /home/user/tftp_share&lt;br /&gt;
In this folder, download  the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. &lt;br /&gt;
 $ cd /home/user/tftp_share&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now power on the Star64 and enter U-Boot. You may need to [press shift??? press any key????] during boot to enter U-Boot.&lt;br /&gt;
Once you are in the U-Boot shell set some environment variables. &lt;br /&gt;
First, set the IP address of your Star64 where &amp;lt;code&amp;gt;${IP Address}&amp;lt;/code&amp;gt; is the IP address you have chosen.&lt;br /&gt;
 $ setenv ipaddr ${IP Address}&lt;br /&gt;
An example IP address would be &lt;br /&gt;
 $ setenv ipaddr 192.168.1.158&lt;br /&gt;
Next set the IP address of your TFTP server. If you don't what the IP address of your TFTP server is you can see connected devices in your router configuration which can usually be accessed by typing in the IP address found on the router itself. In this case &amp;lt;code&amp;gt;${Server IP}&amp;lt;/code&amp;gt; refers to the IP address of your TFTP server. &lt;br /&gt;
 # setenv serverip ${Server IP}&lt;br /&gt;
An example would be&lt;br /&gt;
 $ setenv serverip 192.168.1.228&lt;br /&gt;
Note that it is important that the first three sets of numbers (in the examples &amp;lt;code&amp;gt;192.168.1&amp;lt;/code&amp;gt;) must be the same for your Star64 router, and TFTP server. The numbers may not be the same as in the example. &lt;br /&gt;
Ping the TFTP server from the Star64 to make sure the connection works where &amp;lt;code&amp;gt;${Server IP}&amp;lt;/code&amp;gt; refers to the IP address of your TFTP server.&lt;br /&gt;
 $ ping ${Server IP}&lt;br /&gt;
Example: &lt;br /&gt;
 $ ping 192.168.1.228&lt;br /&gt;
The result should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If ping fails, please try again or please join the #star64 channel in the Pine64 IRC, Discord, or Matrix for help. &lt;br /&gt;
&lt;br /&gt;
Finally, it is time to update the xSPI flash. &lt;br /&gt;
&lt;br /&gt;
First, initialize the flash with the &amp;lt;code&amp;gt;sf probe&amp;lt;/code&amp;gt; command.&lt;br /&gt;
 $ sf probe&lt;br /&gt;
The output should be something like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Next copy the SPL &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; file to memory address 0xa0000000 from our TFTP server.&lt;br /&gt;
 $ tftpboot 0xa0000000 ${serverip}:[name of fishwaldo spl file]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
Then use &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; to erase and update the SPI flash from memory. In this case we are copying from memory address 0xa0000000 which we wrote to earlier with an offset of 0x0. [what is $filesize???? does the user need to replace it, will it just work?????]&lt;br /&gt;
&lt;br /&gt;
 $ sf update 0xa0000000 0x0 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, copy the U-Boot &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; binary to memory address 0xa0000000 from the TFTP server. &lt;br /&gt;
 $ tftpboot 0xa0000000 ${serverip}:[name of fishwaldo uboot image]&lt;br /&gt;
Where ${serverip} is the environment variable we set earlier, no need to change it. &lt;br /&gt;
&lt;br /&gt;
Finally, write the new U-Boot binary using &amp;lt;code&amp;gt;sf update&amp;lt;/code&amp;gt; from memory address 0xa0000000 with an offset of 0x100000. [what is $filesize???? does the user need to replace it, will it just work?????]&lt;br /&gt;
 $ sf update 0xa0000000 0x100000 $filesize&lt;br /&gt;
&lt;br /&gt;
This should produce an output like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
To be &lt;br /&gt;
filled&lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot the Star64 and the changes should have taken effect. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19846</id>
		<title>User:RemDogKap/SandBox/Update XSPI Flash SPL and U-Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19846"/>
		<updated>2023-06-11T02:36:29Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: minor edits and how to install and set up TFTP server&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
{{Warning | Attempting these instructions may permanently brick (make nonfunctional) your device. Do not attempt unless you know what you are doing.}}&lt;br /&gt;
{{Warning | These instructions have not been tested or verified. Use at your own risk.}}&lt;br /&gt;
&lt;br /&gt;
The Star64 ships with an integrated 128 megabit (16 megabyte) xSPI NOR flash. Loaded on this flash from the factory is firmware called U-Boot and SPL but an old version designed for the StarFive VisionFive 2 SBC which may have incompatibilities with the Star64. The firmware on this flash is known as Das U-Boot, commonly just U-Boot which is an open-source primary boot loader. It performs similar functions to the BIOS on x86 platforms. The SPL or Secondary Program Loader is the software that loads U-Boot, which in turn loads the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
There are two main ways to update the xSPI flash. The first uses the &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt; command which requires the Star64 to first boot into an OS. This method may not work on older versions of [firmware, os, something else????]. The other method requires only the ability to load U-Boot and uses TFTP and the U-Boot &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Required:&lt;br /&gt;
*Star64 SBC&lt;br /&gt;
*Computer running Linux, MacOS, or Windows&lt;br /&gt;
Possibly required:&lt;br /&gt;
*Ability to communicate over TTL (transistor to transistor logic) UART&lt;br /&gt;
*Ability to network the Star64 to a computer over ethernet&lt;br /&gt;
&lt;br /&gt;
==flashcp==&lt;br /&gt;
First, connect to your Star64 over UART or with a mouse, keyboard, and monitor. &lt;br /&gt;
Next, install the &amp;lt;code&amp;gt;mtd-utils&amp;lt;/code&amp;gt; package onto the Star64 if not already installed. This package is a set of tools that allow access to raw flash storage devices such as the xSPI flash. Also install &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if not already installed. These instructions assume that you are using the &amp;lt;code&amp;gt;deb&amp;lt;/code&amp;gt; package manager. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install mtb-utils wget&lt;br /&gt;
&lt;br /&gt;
Next, using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; download the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image onto the.&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, print out the list of MTD (Memory Technology Device) raw flash devices using &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ cat /proc/mtd&lt;br /&gt;
&lt;br /&gt;
The output should look something like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dev:    size   erasesize  name&lt;br /&gt;
mtd0: 00020000 00001000 &amp;quot;spl&amp;quot;&lt;br /&gt;
mtd1: 00300000 00001000 &amp;quot;uboot&amp;quot;&lt;br /&gt;
mtd2: 00100000 00001000 &amp;quot;data&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, write the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image. to the respective partitions using &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt;, a command which writes to raw flash devices with more protections than &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ flashcp -v [fishwaldo spl file name here].bin.normal.out /dev/${SPL Partition}&lt;br /&gt;
 $ flashcp -v [fishwaldo uboot img file name here].img /dev/${U-Boot Partition}&lt;br /&gt;
Where &amp;lt;code&amp;gt;${SPL Partition}&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;spl&amp;quot; from the cat printout, in this case &amp;lt;code&amp;gt;mtd0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;${U-Boot Partition}&amp;lt;/code&amp;gt; is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;uboot&amp;quot; in the cat printout, in this case &amp;lt;code&amp;gt;mtd1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point your xSPI flash has been rewritten and only a system restart is needed for the changes to take effect. &lt;br /&gt;
&lt;br /&gt;
==tftpboot==&lt;br /&gt;
The &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; method uses a TFTP (Trivial File Transfer Protocol, a protocol which allows for basic file transfer functionality without authentication) server to transfer the SPL file and U-Boot image from a host computer to the Star64 running U-Boot and using the &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command and then written to flash using the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; command which is a U-Boot command used to access SPI flash. &lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
First, on your computer (not the Star64) install a TFTP server and &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if you do not already have it.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install tftpd-hpa wget&lt;br /&gt;
Next, check that the TFPT server is running using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo systemctl status tftpd-hpa&lt;br /&gt;
This should output somethng like &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;●&amp;lt;/span&amp;gt; tftpd-hpa.service - LSB: HPA's tftp server&lt;br /&gt;
      Loaded: loaded (/etc/init.d/tftpd-hpa; generated)&lt;br /&gt;
      Active: &amp;lt;span style=&amp;quot;color:#16c60c&amp;quot;&amp;gt;active (running)&amp;lt;/span&amp;gt; since Sat 2023-06-10 20:51:28 CDT; 17min ago&lt;br /&gt;
        Docs: man:systemd-sysv-generator(8)&lt;br /&gt;
     Process: 1016 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=0/SUCCESS)&lt;br /&gt;
       Tasks: 1 (limit: 2306)&lt;br /&gt;
      Memory: 588.0K&lt;br /&gt;
         CPU: 23ms&lt;br /&gt;
      CGroup: /system.slice/tftpd-hpa.service&lt;br /&gt;
             └─1023 /usr/sbin/in.tftpd --listen --user tftp --address :69 --secure /srv/tftp&lt;br /&gt;
 &lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Starting tftpd-hpa.service - LSB: HPA's tftp server...&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm tftpd-hpa[1016]: Starting HPA's tftpd: in.tftpd.&lt;br /&gt;
 Jun 10 20:51:28 debian-bookworm systemd[1]: Started tftpd-hpa.service - LSB: HPA's tftp server.           &lt;br /&gt;
&lt;br /&gt;
If the service is not running, try&lt;br /&gt;
 $ sudo systemctl start tftpd-hpa&lt;br /&gt;
and check the status again. If it is still not running please join the #star64 channel in the Pine64 IRC, Discord, or Matrix.&lt;br /&gt;
&lt;br /&gt;
Next, edit the configuration file for &amp;lt;code&amp;gt;tftpd-hpa&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo nano /etc/default/tftpd-hpa&lt;br /&gt;
by default it should look like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/default/tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/srv/tftp&amp;quot;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&amp;lt;/code&amp;gt;. The final file should look like: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TFTP_USERNAME=&amp;quot;tftp&amp;quot;&lt;br /&gt;
TFTP_DIRECTORY=&amp;quot;/home/user/tftp_share&amp;quot;&lt;br /&gt;
TFTP_ADDRESS=&amp;quot;:69&amp;quot;&lt;br /&gt;
TFTP_OPTIONS=&amp;quot;--secure&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After that, save and close the file then restart the TFTP server.&lt;br /&gt;
 $ sudo systemctl restart tftpd-hpa&lt;br /&gt;
&lt;br /&gt;
Next in your home directory (&amp;lt;code&amp;gt;/home/user&amp;lt;/code&amp;gt;) create a folder called &amp;lt;code&amp;gt;tftp_share&amp;lt;/code&amp;gt;&lt;br /&gt;
 $ mkdir /home/user/tftp_share&lt;br /&gt;
In this folder, download  the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;. &lt;br /&gt;
 $ cd /home/user/tftp_share&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19826</id>
		<title>User:RemDogKap/SandBox/Update XSPI Flash SPL and U-Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19826"/>
		<updated>2023-06-10T05:21:11Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: minor grammar updates, started on updating Star64 firmware using tftpboot on Linux.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
{{Warning | Attempting these instructions may permanently brick (make nonfunctional) your device. Do not attempt unless you know what you are doing.}}&lt;br /&gt;
{{Warning | These instructions have not been tested or verified. Use at your own risk.}}&lt;br /&gt;
&lt;br /&gt;
The Star64 ships with an integrated 128 megabit (16 megabyte) xSPI NOR flash. Loaded on this flash from the factory is firmware called U-Boot and SPL but an old version designed for the StarFive VisionFive 2 SBC which may have incompatibilities with the Star64. The firmware on this flash is known as Das U-Boot, commonly just U-Boot which is an open-source primary boot loader. It performs similar functions to the BIOS on x86 platforms. The SPL or Secondary Program Loader is the software that loads U-Boot, which in turn loads the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
There are two main ways to update the xSPI flash. The first uses the &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt; command which requires the Star64 to first boot into an OS. This method may not work on older versions of [firmware, os, something else????]. The other method requires only the ability to load U-Boot and uses TFTP and the U-Boot &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Required:&lt;br /&gt;
*Star64 SBC&lt;br /&gt;
*Computer running Linux, MacOS, or Windows&lt;br /&gt;
Possibly required:&lt;br /&gt;
*Ability to communicate over TTL (transistor to transistor logic) UART&lt;br /&gt;
*Ability to network the Star64 to a computer over ethernet&lt;br /&gt;
&lt;br /&gt;
==flashcp==&lt;br /&gt;
First, connect to your Star64 over UART or with a mouse, keyboard, and monitor. &lt;br /&gt;
Next, install the &amp;lt;code&amp;gt;mtd-utils&amp;lt;/code&amp;gt; package if not already installed. This package is a set of tools that allow access to raw flash storage devices such as the xSPI flash. Also install &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if not already installed. These instructions assume that you are using the &amp;lt;code&amp;gt;deb&amp;lt;/code&amp;gt; package manager. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install mtb-utils wget&lt;br /&gt;
&lt;br /&gt;
Next, using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; download the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image.&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, print out the list of MTD (Memory Technology Device) raw flash devices using &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ cat /proc/mtd&lt;br /&gt;
&lt;br /&gt;
The output should look something like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dev:    size   erasesize  name&lt;br /&gt;
mtd0: 00020000 00001000 &amp;quot;spl&amp;quot;&lt;br /&gt;
mtd1: 00300000 00001000 &amp;quot;uboot&amp;quot;&lt;br /&gt;
mtd2: 00100000 00001000 &amp;quot;data&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, write the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image. to the respective partitions using &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt;, a command which writes to raw flash devices with more protections than &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ flashcp -v [fishwaldo spl file name here].bin.normal.out /dev/${SPL Partition}&lt;br /&gt;
 $ flashcp -v [fishwaldo uboot img file name here].img /dev/${U-Boot Partition}&lt;br /&gt;
Where ${SPL Partition} is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;spl&amp;quot; from the cat printout, in this case &amp;lt;code&amp;gt;mtd0&amp;lt;/code&amp;gt; and ${U-Boot Partition} is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;uboot&amp;quot; in the cat printout, in this case &amp;lt;code&amp;gt;mtd1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point your xSPI flash has been rewritten and only a system restart is needed for the changes to take effect. &lt;br /&gt;
&lt;br /&gt;
==tftpboot==&lt;br /&gt;
The &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; method uses a TFTP (Trivial File Transfer Protocol, a protocol which allows for basic file transfer functionality without authentication) server to transfer the SPL file and U-Boot image from a host computer to the Star64 running U-Boot and using the &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command and then written to flash using the &amp;lt;code&amp;gt;sf&amp;lt;/code&amp;gt; command which is a U-Boot command used to access SPI flash. &lt;br /&gt;
&lt;br /&gt;
===Linux===&lt;br /&gt;
First, install a TFTP server.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install tftpd-hpa&lt;br /&gt;
Next, check that the TFPT server is running using &amp;lt;code&amp;gt;systemctl&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo systemctl status tftpd-hpa&lt;br /&gt;
This should output somethng like &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
to be filled &lt;br /&gt;
in later&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If the service is not running, try&lt;br /&gt;
 $ sudo systemctl start tftpd-hpa&lt;br /&gt;
and check the status again. If it is still not running please join the #star64 channel in the Pine64 IRC, Discord, or Matrix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19825</id>
		<title>User:RemDogKap/SandBox/Update XSPI Flash SPL and U-Boot</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Update_XSPI_Flash_SPL_and_U-Boot&amp;diff=19825"/>
		<updated>2023-06-10T04:51:27Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: initial rough out and instruction for the flashcp method of updating Star64 firmware&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
{{Warning | Attempting these instructions may permanently brick (make nonfunctional) your device. Do not attempt unless you know what you are doing.}}&lt;br /&gt;
{{Warning | These instructions have not been tested or verified. Use at your own risk.}}&lt;br /&gt;
&lt;br /&gt;
The Star64 ships with integrated 128 megabit (16 megabyte) xSPI NOR flash. Loaded on this flash from the factory is firmware called U-Boot and SPL but an old version designed for the StarFive VisionFive 2 SBC and may have incompatibilities with the Star64. The firmware on this flash is known as Das U-Boot, commonly just U-Boot which is an open-source primary boot loader. It performs similar functions to the BIOS on x86 platforms. The SPL or Secondary Program Loader is the software that loads U-Boot, which in turn loads the Linux kernel.&lt;br /&gt;
&lt;br /&gt;
There are two main ways to update the xSPI flash. The first uses the &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt; command which requires the Star64 to first boot into an OS. This method may not work on older versions of [firmware, os, something else????]. The other method requires only the ability to load U-Boot and uses TFTP and the U-Boot &amp;lt;code&amp;gt;tftpboot&amp;lt;/code&amp;gt; command. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
Required:&lt;br /&gt;
*Star64 SBC&lt;br /&gt;
*Computer running Linux, MacOS, or Windows&lt;br /&gt;
Possibly required:&lt;br /&gt;
*Ability to communicate over TTL (transistor to transistor logic) UART&lt;br /&gt;
*Ability to network the Star64 to a computer over ethernet&lt;br /&gt;
&lt;br /&gt;
==flashcp==&lt;br /&gt;
First, connect to your Star64 over UART or with a mouse, keyboard, and monitor. &lt;br /&gt;
Next, install the &amp;lt;code&amp;gt;mtd-utils&amp;lt;/code&amp;gt; package if not already installed. This package is a set of tools that allow access to raw flash storage devices such as the xSPI flash. Also install &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; if not already installed. These instructions assume that you are using the &amp;lt;code&amp;gt;deb&amp;lt;/code&amp;gt; package manager. &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install mtb-utils wget&lt;br /&gt;
&lt;br /&gt;
Next, using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; download the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image.&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo SPL file goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/[fishwaldo U-Boot image goes here]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, print out the list of MTD (Memory Technology Device) raw flash devices using &amp;lt;code&amp;gt;cat&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ cat /proc/mtd&lt;br /&gt;
&lt;br /&gt;
The output should look something like this: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dev:    size   erasesize  name&lt;br /&gt;
mtd0: 00020000 00001000 &amp;quot;spl&amp;quot;&lt;br /&gt;
mtd1: 00300000 00001000 &amp;quot;uboot&amp;quot;&lt;br /&gt;
mtd2: 00100000 00001000 &amp;quot;data&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, write the &amp;lt;code&amp;gt;.bin.normal.out&amp;lt;/code&amp;gt; SPL file and the &amp;lt;code&amp;gt;.img&amp;lt;/code&amp;gt; U-Boot image. to the respective partitions using &amp;lt;code&amp;gt;flashcp&amp;lt;/code&amp;gt;, a command which writes to raw flash devices with more protections than &amp;lt;code&amp;gt;dd&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ flashcp -v [fishwaldo spl file name here].bin.normal.out /dev/${SPL Partition}&lt;br /&gt;
 $ flashcp -v [fishwaldo uboot img file name here].img /dev/${U-Boot Partition}&lt;br /&gt;
Where ${SPL Partition} is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;spl&amp;quot; from the cat printout, in this case &amp;lt;code&amp;gt;mtd0&amp;lt;/code&amp;gt; and ${U-Boot Partition} is the partition name found under the &amp;quot;dev&amp;quot; column for the row &amp;quot;uboot&amp;quot; in the cat printout, in this case &amp;lt;code&amp;gt;mtd1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point your xSPI flash has been rewritten and only a system restart is needed for the changes to take effect. &lt;br /&gt;
&lt;br /&gt;
==tftpboot==&lt;br /&gt;
===Unix-Like===&lt;br /&gt;
===Windows===&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19824</id>
		<title>User:RemDogKap/SandBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19824"/>
		<updated>2023-06-10T03:36:22Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: added page on how to update XSPI Flash of Star64&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
Links to documentation pages I am currently working on for the Star64 SBC&lt;br /&gt;
&lt;br /&gt;
ToDo:&lt;br /&gt;
*Explain that SD Card does not work at full speed&lt;br /&gt;
*Tutorial for loading disk images onto eMMC&lt;br /&gt;
*How to update XSPI U-Boot&lt;br /&gt;
*How to use NVME drives&lt;br /&gt;
*working state of various USB ports &lt;br /&gt;
*list hardware bugs&lt;br /&gt;
**SD Card Voltage &lt;br /&gt;
**USB over current&lt;br /&gt;
*Armbian Install &lt;br /&gt;
*Memory DTB fix/recompile eeprom thing&lt;br /&gt;
*How to flash eMMC from SD card if possible&lt;br /&gt;
*Things needed to build you own working image&lt;br /&gt;
*How to connect over serial &lt;br /&gt;
&lt;br /&gt;
[[/First Setup]]&lt;br /&gt;
&lt;br /&gt;
[[/Status of Features]]&lt;br /&gt;
&lt;br /&gt;
[[/Build Your Own Image]]&lt;br /&gt;
&lt;br /&gt;
[[/Update XSPI Flash SPL and U-Boot]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_Your_Own_Image&amp;diff=19823</id>
		<title>User:RemDogKap/SandBox/Build Your Own Image</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Build_Your_Own_Image&amp;diff=19823"/>
		<updated>2023-06-10T01:11:01Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: initial rough out&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
==Things you need to do to build your own image==&lt;br /&gt;
*crosscompile fishwaldo kernel with your distro [https://forum.pine64.org/showthread.php?tid=18276]&lt;br /&gt;
*if you want gpu acceleration you need a kernel driver and userspace patches [https://forum.pine64.org/showthread.php?tid=18301]&lt;br /&gt;
*must have two partitions to boot, SPL and U-Boot &lt;br /&gt;
*patch system memory ?? [https://forum.pine64.org/showthread.php?tid=18263]&lt;br /&gt;
*patch USB overvoltage ??&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19822</id>
		<title>User:RemDogKap/SandBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19822"/>
		<updated>2023-06-10T00:55:09Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: added build your own image page and under construction tag&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
Links to documentation pages I am currently working on for the Star64 SBC&lt;br /&gt;
&lt;br /&gt;
ToDo:&lt;br /&gt;
*Explain that SD Card does not work at full speed&lt;br /&gt;
*Tutorial for loading disk images onto eMMC&lt;br /&gt;
*How to update XSPI U-Boot&lt;br /&gt;
*How to use NVME drives&lt;br /&gt;
*working state of various USB ports &lt;br /&gt;
*list hardware bugs&lt;br /&gt;
**SD Card Voltage &lt;br /&gt;
**USB over current&lt;br /&gt;
*Armbian Install &lt;br /&gt;
*Memory DTB fix/recompile eeprom thing&lt;br /&gt;
*How to flash eMMC from SD card if possible&lt;br /&gt;
*Things needed to build you own working image&lt;br /&gt;
*How to connect over serial &lt;br /&gt;
&lt;br /&gt;
[[/First Setup]]&lt;br /&gt;
&lt;br /&gt;
[[/Status of Features]]&lt;br /&gt;
&lt;br /&gt;
[[/Build Your Own Image]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19821</id>
		<title>User:RemDogKap/SandBox/First Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19821"/>
		<updated>2023-06-10T00:51:23Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Added troubleshooting section, booting section, and restructured the article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Under construction}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Star64 is a 64 bit, 4 core Single Board Computer. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
*[https://pine64.com/product-category/star64/ Star64 SBC]&lt;br /&gt;
*[https://pine64.com/product-category/star64-accessories/ 12V 3A to 5A Power Supply] (Any 12V 3A or 5A type M 5.5mm OD/2.1mm ID barrel type DC Jack Power Supply will work)&lt;br /&gt;
*One or more types of removeable flash memory&lt;br /&gt;
**[https://pine64.com/product/64gb-class10-microsd-card/ SD card] of at least ??GB, no greater than 256GB&lt;br /&gt;
**[https://pine64.com/product-category/star64-accessories/ eMMC Module] with [https://pine64.com/product/usb-adapter-for-emmc-module/ USB adapter]&lt;br /&gt;
*Ability to flash a storage device with a disk image. [https://etcher.balena.io/ Balena Etcher] is recommended, but advanced users can also use dd in a Unix-like OS&lt;br /&gt;
&lt;br /&gt;
==Choosing Your Distribution==&lt;br /&gt;
There are currently two working distributions of Linux compatible with the Star64, pinix and Armbian. Both distributions use the same kernel[???].The pinix distribution is a custom distribution built by Fishwaldo using Yocto which is an open source project used to create Linux distributions for embedded devices. The pinix distribution is currently focusing on support for GPU and VGPU acceleration for desktop environments. Both distributions use the deb package manager. The Armbian distribution is based on Debian/Ubuntu with changes to make it lightweight and compatible with ARM/RISC-V development boards. &lt;br /&gt;
&lt;br /&gt;
While there are other RISC-V compatible distributions, none of these have the required device tree entries for the Star64 meaning that none will work fully on the Star64. This includes images for the StarFive2, a sister board which uses the same processor, due to other hardware differences. It may be possible to get other distributions to run on the Star64 by cross compiling the working kernel into another distribution. &lt;br /&gt;
&lt;br /&gt;
More information about support for features can be accessed [[User:RemDogKap/SandBox/Status of Features | here]].&lt;br /&gt;
&lt;br /&gt;
==pinix==&lt;br /&gt;
There are currently three prebuilt versions of pinix. one command line only and two desktop environments. Choose one to use for this setup. &lt;br /&gt;
*star64-image-minimal - A command line only image.&lt;br /&gt;
*star64-image-weston - A Weston/Wayland &amp;quot;Demo&amp;quot; image.&lt;br /&gt;
*star64-image-plasma- A Plasma Based Image.&lt;br /&gt;
&lt;br /&gt;
===Flashing the Image===&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
&lt;br /&gt;
First, if not already installed, install &amp;lt;code&amp;gt;bzip2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install bzip2 wget&lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (.wic.bz2) of your chosen verison (minimal, weston, or plasma) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) using wget. &lt;br /&gt;
&lt;br /&gt;
 $ wget  &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/${Name of Image File}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;${Name of Image File}&amp;lt;/code&amp;gt; is the name of your chosen image file. &lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/star64-image-minimal-star64-1.2.wic.bz2&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, decompress the file using bzip2.&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d ${Path to Image File}&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;${Path to Image File}&amp;lt;/code&amp;gt; is the path to your image file. Example:&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d star64-image-minimal-star64-1.2.wic.bz2&lt;br /&gt;
&lt;br /&gt;
Next, flash the image to the SD card or eMMC module. The open source Balena Etcher with GUI support is recommended but dd will work as well if you are an advanced user. &lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
First, make sure that you have [https://7-zip.org/ 7zip] installed and if not, install it. &lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (.wic.bz2) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) by clicking on the files. &lt;br /&gt;
&lt;br /&gt;
Third, right click on the downloaded file and select 7-zip. Next click extract. &lt;br /&gt;
&lt;br /&gt;
Finally, use Balena Etcher to write your disk image to the SD Card or eMMC module . &lt;br /&gt;
&lt;br /&gt;
===Booting the Image===&lt;br /&gt;
&lt;br /&gt;
{{warning | This has not been fully tested and verified, use these instructions at your own risk, please remove if these look good}}&lt;br /&gt;
&lt;br /&gt;
First, make sure that the Star64 is powered off, then set the boot dip switches to SD Card or eMMC, whichever applies to you.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Star64_SD_switch_map.png|thumb|left|Dip switch settings to boot from SD Card.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Star64_EMMC_switch_map.png|thumb|Dip switch settings to boot from eMMC module.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, insert your flash media of choice and connect your peripherals. These can be a keyboard mouse and monitor or a TTL UART cable connected to the GPIO header. Finally, power on the system.&lt;br /&gt;
&lt;br /&gt;
After boot, you should be met with a login screen. The default credentials here for a root user are root as a username and Star64 as a password. The default credentials for a regular user are Star64 as a username and Star64 as a password. If you do not see the troublshooting section below&lt;br /&gt;
&lt;br /&gt;
==Troubeshooting==&lt;br /&gt;
{{:STAR64}}&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=STAR64&amp;diff=19820</id>
		<title>STAR64</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=STAR64&amp;diff=19820"/>
		<updated>2023-06-10T00:50:14Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: added &amp;lt;onlyinclude&amp;gt; to potential issues section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Star64.jpg|400px|thumb|right|The STAR64]]&lt;br /&gt;
&lt;br /&gt;
The '''Star64''' is a RISC-V based Single Board Computer powered by StarFive JH7110 Quad-Core SiFive U74 64-Bit CPU, Imagination Technology BX-4-32 GPU and supports up to 8GB 1866MHz LPDDR4 memory. It provides an eMMC module socket, MicroSD Card slot, PCI-e, Pi-2 Bus, USB 3.0, and many other peripheral interfaces for makers to integrate with sensors and other devices.&lt;br /&gt;
&lt;br /&gt;
[[File:RISC-V.png|600px|]]&lt;br /&gt;
&lt;br /&gt;
== Software releases ==&lt;br /&gt;
&lt;br /&gt;
The releases are still in '''alpha''' state and are only fit for testing purposes. &lt;br /&gt;
&lt;br /&gt;
* [https://github.com/Fishwaldo/meta-pine64 A Set of Images built with Yocto for commandline, weston and plasma - Where possible, GPU/VPU acceleration is enabled.]&lt;br /&gt;
* [https://forum.pine64.org/showthread.php?tid=18276 Armbian]&lt;br /&gt;
&lt;br /&gt;
== SoC and Memory Specification ==&lt;br /&gt;
* Based on [https://www.starfivetech.com/en/site/soc StarFive JH7110]&lt;br /&gt;
[[File:StarFive.jpg|right]]&lt;br /&gt;
[[File:JH7110_Block_Diagram.png|800px]]&lt;br /&gt;
&lt;br /&gt;
=== CPU Architecture ===&lt;br /&gt;
* [https://www.sifive.com/cores/u74 Quad-core U74 up to 1.5GHz CPU]&lt;br /&gt;
[[File:SiFive.jpg|right|200px]]&lt;br /&gt;
* Fully compliant with the RISC-V ISA specification&lt;br /&gt;
* 64-bit RISC-V Application Core&lt;br /&gt;
* 32KB L1 I-cache with ECC&lt;br /&gt;
* 32KB L1 D-cache with ECC&lt;br /&gt;
* 8 Region Physical Memory Protection&lt;br /&gt;
* Virtual Memory support with up to 47 Physical Address bits&lt;br /&gt;
* Integrated up to 2MB L2 Cache with ECC&lt;br /&gt;
* includes RV64IMAC S7 monitor core, 16 KB L1 I-Cache with ECC, 8 KB DTIM with ECC&lt;br /&gt;
* 32-bit RISC-V CPU core (E24) for real time control, support RV32IMFC RISC-V ISA&lt;br /&gt;
&lt;br /&gt;
=== GPU Architecture ===&lt;br /&gt;
* [https://www.imaginationtech.com/product/img-bxe-4-32-mc4/ Imagination Technology BXE-4-32 up to 600Mhz GPU]&lt;br /&gt;
[[File:imgtech.png|right|200px]]&lt;br /&gt;
* Support OpenCL 3.0&lt;br /&gt;
* Support OpenGL ES 3.2&lt;br /&gt;
* Support Vulkan 1.2&lt;br /&gt;
* Tile-based deferred rendering architecture for 3D graphics workloads, with concurrent processing of multiple tiles&lt;br /&gt;
* Support for GPU visualization, up to 8 virtual GPUs&lt;br /&gt;
* On fly frame buffer compression and decompression (TFBC) algorithm&lt;br /&gt;
* Performance: 128 FP32 FLOPs/Clock, 256 FP16 FLOPs/Clock&lt;br /&gt;
&lt;br /&gt;
=== System Memory ===&lt;br /&gt;
* LPDDR4 RAM Memory Variants: 2GB, 4GB and 8GB.&lt;br /&gt;
&lt;br /&gt;
== Board Features ==&lt;br /&gt;
&lt;br /&gt;
=== Video ===&lt;br /&gt;
* Digital Video output up to 4K@30Hz&lt;br /&gt;
* 4K HDR @ 60fps&lt;br /&gt;
* H.264/AVC Base/Main/High/High10 profile @ level 5.1; up to 4K&amp;amp;times;2K @ 60fps&lt;br /&gt;
* H.265/HEVC Main/Main10 profile @ level 5.1 High-tier; up to 4K&amp;amp;times;2K @ 60fps&lt;br /&gt;
&lt;br /&gt;
=== Audio ===&lt;br /&gt;
* 3.5mm audio Jack&lt;br /&gt;
&lt;br /&gt;
=== Network ===&lt;br /&gt;
* Single or Dual 10/100/1000Mbps Ethernet &lt;br /&gt;
* 2.4GHz/5Ghz MIMO WiFi 802.11 b/g/n/ac with Bluetooth 5.2&lt;br /&gt;
&lt;br /&gt;
=== Storage ===&lt;br /&gt;
* on-board 128Mbit (16MByte) XSPI NOR flash memory - bootable&lt;br /&gt;
* microSD - bootable, supports SDHC and SDXC and storage up to 256GB&lt;br /&gt;
* eMMC - bootable (optional eMMC Module)&lt;br /&gt;
* 1&amp;amp;times; USB3.0 Dedicated Host port&lt;br /&gt;
* 3&amp;amp;times; USB2.0 Host port&lt;br /&gt;
&lt;br /&gt;
=== Expansion Ports ===&lt;br /&gt;
* PCIe 2.0 &amp;amp;times;1 lane&lt;br /&gt;
* 2&amp;amp;times;20 pins &amp;quot;Pi2&amp;quot; GPIO Header&lt;br /&gt;
** The JH7110 SoC supports full multiplexing of its GPIO pins. This means any non-power/ground pin can be configured to any function outlined in Table 4-2 of the SoC datasheet.&lt;br /&gt;
* 4 lane MiPi DSI port for LCD panel&lt;br /&gt;
* 4 lane MiPi CSI port for camera module&lt;br /&gt;
&lt;br /&gt;
== Board Information, Schematics and Certifications ==&lt;br /&gt;
* Model &amp;quot;A&amp;quot; Baseboard Dimensions: 133mm&amp;amp;times;80mm&amp;amp;times;19mm&lt;br /&gt;
* Input Power: DC 12V @ 3A 5.5mmOD/2.1mmID center-positive Barrel DC Jack connector&lt;br /&gt;
* Schematic:&lt;br /&gt;
** [https://files.pine64.org/doc/star64/Star64_Schematic_V1.1_20230504.pdf STAR64 Schematic 20230504 v1.1 (Production Released version)]&lt;br /&gt;
** [https://files.pine64.org/doc/star64/Star64_Schematic_V1.0_20220721.pdf STAR64 Schematic 20220721 v1.0 (Prototype Board)]&lt;br /&gt;
* Certifications:&lt;br /&gt;
** Disclaimer: Please note that PINE64 SBC is not a &amp;quot;final&amp;quot; product and in general certification is not necessary. However, PINE64 still submits the SBC for FCC, CE, and ROHS certifications and obtain the certificates to prove that the SBC board can pass the testing. Please note, a final commercial product needs to perform its own testing and obtain its own certificate.&lt;br /&gt;
** Not yet available&lt;br /&gt;
&lt;br /&gt;
== Datasheets for Components and Peripherals ==&lt;br /&gt;
* Star64 JH7110 SoC information:&lt;br /&gt;
** [https://doc-en.rvspace.org/JH7110/PDF/JH7110_Product_Brief.pdf StarFive JH7110 SoC Product Brief]&lt;br /&gt;
** [https://doc-en.rvspace.org/JH7110/PDF/JH7110_Datasheet.pdf StarFive JH7110 SoC Datasheet]&lt;br /&gt;
** [https://doc-en.rvspace.org/JH7110/TRM/ StarFive JH7110 SoC Technical Reference Manual]&lt;br /&gt;
* X-Power PMU information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/star64/AXP15060%20datasheet%20V0.1.pdf X-Power AXP15060 Datasheet V0.1]&lt;br /&gt;
* LPDDR4 (200 Balls) SDRAM:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/rockpro64/SM512M32Z01MD2BNP(200BALL).pdf Micron LPDDR4 Mobile LPDDR4 Datasheet]&lt;br /&gt;
* eMMC information:&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/PINE64_eMMC_Module_20170719.pdf PINE64 eMMC module schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/usb%20emmc%20module%20adapter%20v2.pdf PINE64 USB adapter for eMMC module V2 schematic]&lt;br /&gt;
** [https://files.pine64.org/doc/rock64/USB%20adapter%20for%20eMMC%20module%20PCB.tar PINE64 USB adapter for eMMC module PCB in JPEG]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/E-00517%20FORESEE_eMMC_NCEMAM8B-16G%20SPEC.pdf 16GB Foresee eMMC Datasheet]&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/pine64/SDINADF4-16-128GB-H%20data%20sheet%20v1.13.pdf 32GB/64GB/128GB SanDisk eMMC Datasheet]&lt;br /&gt;
* SPI NOR Flash information:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/star64/gd25lq128e_rev1.0_20210513.pdf GigaDevice 128Mb XSPI-Flash Datasheet]&lt;br /&gt;
* Ethernet related info:&lt;br /&gt;
** TBA&lt;br /&gt;
* WiFi/BT module info:&lt;br /&gt;
** [https://files.pine64.org/doc/datasheet/star64/Fn-Link_6252B-UUB_datasheet_V1.1_20220329.pdf Fn-Link 6252B 11AC Dual Band 2T2R WiFi + Bluetooth5.2 Datasheet]&lt;br /&gt;
&lt;br /&gt;
== Bringup Notes ==&lt;br /&gt;
&lt;br /&gt;
# The USB over-current protection is not wired up correctly to the USB ports on Star64. The default Starfive Kernel will disable USB on boot as it belives the ports are overcurrent. This ugly hack works around it: https://github.com/Fishwaldo/Star64_linux/commit/2634a13ecfa1fa5c232ec2b9f6a6b6b0d9d66898&lt;br /&gt;
# The Wifi Chip (RTL8852BU) is not supported in the kernel. There is a Vendor Driver that is imported in the kernel at https://github.com/Fishwaldo/Star64_linux/tree/Star64_devel/drivers/staging/rtl8852bu but it really needs a cleanup. It does BUG_ON at boot, but wifi is confirmed working. &lt;br /&gt;
# HDMI can be finicky. 4K Monitors are known to have a issue. This is also relevant for VisionFive2&lt;br /&gt;
# Some kernels/distributions do not detect the total memory correctly. This is due to the way u-boot is configured. Currently, u-boot reads the memory from the eeprom on the Star64, and updates the dtb file before booting the kernel. Distributions that boot differently may not get the updated dtb file with the correct memory entry. You can work around this by recompiling the DTB with the correct memory for your board&lt;br /&gt;
# VisionFive2 Kernels will only offer limited functionality on the Star64 - Mainly USB, Wifi and PCI will not work.&lt;br /&gt;
# The 4-pin 12 volt JST-XH-4A connector found on the Star64 is incompatible with the dual SATA power adapter intended for the ROCKPro64. The connector on the Star64 is rotated 180 degrees to the one on the ROCKPro64, resulting in the cable receiving +12V where GND is expected and vice versa. The cable's internal circuitry ends up shorting in this configuration.&lt;br /&gt;
&lt;br /&gt;
== Potential Issues ==&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
If you get the following error in u-boot (or your 8Gb board is only detected as 4Gb) the possible problem is a empty, or corrupt eeprom:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Not a StarFive EEPROM data format - magic error&lt;br /&gt;
EEPROM dump: (0x100 bytes)&lt;br /&gt;
00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
A0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
B0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
C0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
D0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
E0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
F0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then from within u-boot execute the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mac initilize&lt;br /&gt;
mac product_id &amp;lt;PRODUCTID&amp;gt;&lt;br /&gt;
mac write_eeprom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set ProductID to either:&lt;br /&gt;
* For 8Gb Models: STAR64V1-2310-D008E000-01234567&lt;br /&gt;
* for 4Gb Models: STAR64V1-2310-D004E000-01234567&lt;br /&gt;
&lt;br /&gt;
You can replace the last 8 digits with a random number if you wish.&lt;br /&gt;
If these commands fail, please join the #star64 channel in the Pine64 community for more assistance.&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
== Prototype Bringup Notes ==&lt;br /&gt;
&lt;br /&gt;
Note: This section is relevant to the original prototype (v1.0) that a few developers received. &lt;br /&gt;
&lt;br /&gt;
# The [https://files.pine64.org/doc/star64/Star64_Schematic_V1.0_20220721.pdf schematic] has several discrepancies with actual board labels.&lt;br /&gt;
# The serial console can be found with TXD on pin 8 and RXD on pin 10; a convention common to Pi-style boards. Use the 40pin header pinouts in color on page one and not the schematic prose.&lt;br /&gt;
# If you have only a single core running and no PCI card present, it appears to power up via the +5V/GND lines from the USB serial adapter pins.&lt;br /&gt;
# It will not boot from a VisionFive R1 uSD card.&lt;br /&gt;
# The boot device switch labels and the silk screen are inverted. &amp;quot;0&amp;quot; means &amp;quot;On&amp;quot;.&lt;br /&gt;
# 2021.10-00001-gdbdaad919b will attempt to boot from SPI, but it appears blank. If you let it for many minutes, the device will eventually time out and boot OpenSBI v1.0  from (SPI?). This will fail, but only after self-identifying as a VisionFive R2, complete with five cores and 4 GB of RAM, before failing. A &amp;quot;press any key&amp;quot; timeout is offered, but I've been unable to make it stop. It will eventually crash with:&lt;br /&gt;
&lt;br /&gt;
 Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB&lt;br /&gt;
 *** Warning - bad CRC, using default environment&lt;br /&gt;
 &lt;br /&gt;
 Not a StarFive EEPROM data format - magic error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:STAR64]] [[Category:StarFive JH7110]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19819</id>
		<title>User:RemDogKap/SandBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19819"/>
		<updated>2023-06-10T00:39:10Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: added todo for connecting over serial&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Links to documentation pages I am currently working on for the Star64 SBC&lt;br /&gt;
&lt;br /&gt;
ToDo:&lt;br /&gt;
*Explain that SD Card does not work at full speed&lt;br /&gt;
*Tutorial for loading disk images onto eMMC&lt;br /&gt;
*How to update XSPI U-Boot&lt;br /&gt;
*How to use NVME drives&lt;br /&gt;
*working state of various USB ports &lt;br /&gt;
*list hardware bugs&lt;br /&gt;
**SD Card Voltage &lt;br /&gt;
**USB over current&lt;br /&gt;
*Armbian Install &lt;br /&gt;
*Memory DTB fix/recompile eeprom thing&lt;br /&gt;
*How to flash eMMC from SD card if possible&lt;br /&gt;
*Things needed to build you own working image&lt;br /&gt;
*How to connect over serial &lt;br /&gt;
&lt;br /&gt;
[[/First Setup]]&lt;br /&gt;
&lt;br /&gt;
[[/Storage Formats]]&lt;br /&gt;
&lt;br /&gt;
[[/Status of Features]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Status_of_Features&amp;diff=19818</id>
		<title>User:RemDogKap/SandBox/Status of Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Status_of_Features&amp;diff=19818"/>
		<updated>2023-06-10T00:37:35Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: updated notes for SD Card to mention the speed limitation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+pinix&lt;br /&gt;
! style=width:100px | Feature !! style=width:100px | Status !! style=width:300px | Notes !! style=width:200px | More info&lt;br /&gt;
|-&lt;br /&gt;
| SD Card Boot || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || There is a design flaw such that the SD card can only receive 3.3V and not the 1.8V required for speeds over 20 MB/s. || #Star64 &lt;br /&gt;
|-&lt;br /&gt;
| eMMC Boot || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || || #Star64&lt;br /&gt;
|-&lt;br /&gt;
| UART Boot || style=&amp;quot;background-color:#9eff9e&amp;quot; | Not Tested, assumed working|| The only current known use for UART boot is the [https://github.com/starfive-tech/Tools recovery tool from StarFive] ||&lt;br /&gt;
|-&lt;br /&gt;
| PCIE/NVME Boot || style=&amp;quot;background-color:#ebc934&amp;quot; | Partially Implemented || || #Star64 @Tenkawa &lt;br /&gt;
|-&lt;br /&gt;
| USB 2.0 || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || A design flaw means that USB overcurrent protection is disabled so be careful ||&lt;br /&gt;
|-&lt;br /&gt;
| USB 3.0 || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| 4K Output || style=&amp;quot;background-color:#ebc934&amp;quot; | Partially Implemented || || #Star64 @Fishwaldo&lt;br /&gt;
|-&lt;br /&gt;
| 4K HDR || style=&amp;quot;background-color:#ffc7c7&amp;quot; | Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| H.264 || style=&amp;quot;background-color:#ffc7c7&amp;quot; | Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| H.265 || style=&amp;quot;background-color:#ffc7c7&amp;quot; | Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| 3.5mm audio Jack || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| Ethernet || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| Wifi || style=&amp;quot;background-color:#9eff9e&amp;quot; | working || ||&lt;br /&gt;
|-&lt;br /&gt;
| PCIe 2.0 ×1 lane || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Pi2&amp;quot; GPIO || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| TTL UART || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=File:Star64_SD_switch_map.png&amp;diff=19817</id>
		<title>File:Star64 SD switch map.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=File:Star64_SD_switch_map.png&amp;diff=19817"/>
		<updated>2023-06-09T23:48:30Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Image of the correct dip switch settings to boot from SD Card for the Star64 SBC.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Image of the correct dip switch settings to boot from SD Card for the Star64 SBC.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{PD|PD}}&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=File:Star64_EMMC_switch_map.png&amp;diff=19816</id>
		<title>File:Star64 EMMC switch map.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=File:Star64_EMMC_switch_map.png&amp;diff=19816"/>
		<updated>2023-06-09T23:47:34Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Image of the correct dip switch settings to boot from eMMC for the Star64 SBC.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Image of the correct dip switch settings to boot from eMMC for the Star64 SBC.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{PD|PD}}&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19815</id>
		<title>User:RemDogKap/SandBox/First Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19815"/>
		<updated>2023-06-09T23:18:37Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: combined eMMC and SD card sections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Star64 is a 64 bit, 4 core Single Board Computer. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
*[https://pine64.com/product-category/star64/ Star64 SBC]&lt;br /&gt;
*[https://pine64.com/product-category/star64-accessories/ 12V 3A to 5A Power Supply] (Any 12V 3A or 5A type M 5.5mm OD/2.1mm ID barrel type DC Jack Power Supply will work)&lt;br /&gt;
*One or more types of removeable flash memory&lt;br /&gt;
**[https://pine64.com/product/64gb-class10-microsd-card/ SD card] of at least ??GB, no greater than 256GB&lt;br /&gt;
**[https://pine64.com/product-category/star64-accessories/ eMMC Module] with [https://pine64.com/product/usb-adapter-for-emmc-module/ USB adapter]&lt;br /&gt;
*Ability to flash a storage device with a disk image. [https://etcher.balena.io/ Balena Etcher] is recommended, but advanced users can also use dd in a Unix-like OS&lt;br /&gt;
&lt;br /&gt;
==Flashing the image==&lt;br /&gt;
There are currently two working distributions of Linux compatible with the Star64, pinix and Armbian. Both distributions use the same kernel[???].The pinix distribution is a custom distribution built by Fishwaldo using Yocto which is an open source project used to create Linux distributions for embedded devices. The pinix distribution is currently focusing on support for GPU and VGPU acceleration for desktop environments. Both distributions use the deb package manager. The Armbian distribution is based on Debian/Ubuntu with changes to make it lightweight and compatible with ARM/RISC-V development boards. &lt;br /&gt;
&lt;br /&gt;
While there are other RISC-V compatible distributions, none of these have the required device tree entries for the Star64 meaning that none will work fully on the Star64. This includes images for the StarFive2, a sister board which uses the same processor, due to other hardware differences. It may be possible to get other distributions to run on the Star64 by cross compiling the working kernel into another distribution. &lt;br /&gt;
&lt;br /&gt;
More information about support for features can be accessed [[Status_of_Features | here]].&lt;br /&gt;
===pinix Install===&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
&lt;br /&gt;
First, if not already installed, install bzip2 and wget.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install bzip2 wget&lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (.wic.bz2) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) using wget. There are three types of images, one command line only and two desktop environments. &lt;br /&gt;
*star64-image-minimal - A command line only image&lt;br /&gt;
*star64-image-weston - A Weston/Wayland &amp;quot;Demo&amp;quot; image.&lt;br /&gt;
*star64-image-plasma- A Plasma Based Image.&lt;br /&gt;
&lt;br /&gt;
 $ wget  &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/${Name of Image File}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where ${Name of Image File} is the name of your chosen image file. &lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/star64-image-minimal-star64-1.2.wic.bz2&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, decompress the file using bzip2.&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d ${Path to Image File}&lt;br /&gt;
&lt;br /&gt;
Where ${Path to Image File} is the path to your image file. Example:&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d star64-image-minimal-star64-1.2.wic.bz2&lt;br /&gt;
&lt;br /&gt;
Next, flash the image to the SD card or eMMC module. The open source Balena Etcher with GUI support is recommended but dd will work as well if you are an advanced user. &lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
First, make sure that you have [https://7-zip.org/ 7zip] installed and if not, install it. &lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (.wic.bz2) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) by clicking on the files. There are three types of images, one command line only and two desktop environments. &lt;br /&gt;
*star64-image-minimal - A command line only image&lt;br /&gt;
*star64-image-weston - A Weston/Wayland &amp;quot;Demo&amp;quot; image.&lt;br /&gt;
*star64-image-plasma- A Plasma Based Image.&lt;br /&gt;
&lt;br /&gt;
Third, right click on the downloaded file and select 7-zip. Next click extract. &lt;br /&gt;
&lt;br /&gt;
Finally, use Balena Etcher to write your disk image to the SD Card or eMMC module . &lt;br /&gt;
&lt;br /&gt;
===Armbian Install===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting the Image==&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19814</id>
		<title>User:RemDogKap/SandBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19814"/>
		<updated>2023-06-09T23:16:43Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: added 2 todos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Links to documentation pages I am currently working on for the Star64 SBC&lt;br /&gt;
&lt;br /&gt;
ToDo:&lt;br /&gt;
*Explain that SD Card does not work at full speed&lt;br /&gt;
*Tutorial for loading disk images onto eMMC&lt;br /&gt;
*How to update XSPI U-Boot&lt;br /&gt;
*How to use NVME drives&lt;br /&gt;
*working state of various USB ports &lt;br /&gt;
*list hardware bugs&lt;br /&gt;
**SD Card Voltage &lt;br /&gt;
**USB over current&lt;br /&gt;
*Armbian Install &lt;br /&gt;
*Memory DTB fix/recompile eeprom thing&lt;br /&gt;
*How to flash eMMC from SD card if possible&lt;br /&gt;
*Things needed to build you own working image&lt;br /&gt;
&lt;br /&gt;
[[/First Setup]]&lt;br /&gt;
&lt;br /&gt;
[[/Storage Formats]]&lt;br /&gt;
&lt;br /&gt;
[[/Status of Features]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Status_of_Features&amp;diff=19813</id>
		<title>User:RemDogKap/SandBox/Status of Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Status_of_Features&amp;diff=19813"/>
		<updated>2023-06-09T22:10:55Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: updated statuses and added color&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+pinix&lt;br /&gt;
! style=width:100px | Feature !! style=width:100px | Status !! style=width:300px | Notes !! style=width:200px | More info&lt;br /&gt;
|-&lt;br /&gt;
| SD Card Boot || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || Some people have found trouble booting from the SD card but success in booting from the XSPI flash || #Star64 &lt;br /&gt;
|-&lt;br /&gt;
| eMMC Boot || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || || #Star64&lt;br /&gt;
|-&lt;br /&gt;
| UART Boot || style=&amp;quot;background-color:#9eff9e&amp;quot; | Not Tested, assumed working|| The only current known use for UART boot is the [https://github.com/starfive-tech/Tools recovery tool from StarFive] ||&lt;br /&gt;
|-&lt;br /&gt;
| PCIE/NVME Boot || style=&amp;quot;background-color:#ebc934&amp;quot; | Partially Implemented || || #Star64 @Tenkawa &lt;br /&gt;
|-&lt;br /&gt;
| USB 2.0 || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || A design flaw means that USB overcurrent protection is disabled so be careful ||&lt;br /&gt;
|-&lt;br /&gt;
| USB 3.0 || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| 4K Output || style=&amp;quot;background-color:#ebc934&amp;quot; | Partially Implemented || || #Star64 @Fishwaldo&lt;br /&gt;
|-&lt;br /&gt;
| 4K HDR || style=&amp;quot;background-color:#ffc7c7&amp;quot; | Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| H.264 || style=&amp;quot;background-color:#ffc7c7&amp;quot; | Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| H.265 || style=&amp;quot;background-color:#ffc7c7&amp;quot; | Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| 3.5mm audio Jack || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| Ethernet || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| Wifi || style=&amp;quot;background-color:#9eff9e&amp;quot; | working || ||&lt;br /&gt;
|-&lt;br /&gt;
| PCIe 2.0 ×1 lane || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Pi2&amp;quot; GPIO || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| TTL UART || style=&amp;quot;background-color:#9eff9e&amp;quot; | Working || ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Status_of_Features&amp;diff=19795</id>
		<title>User:RemDogKap/SandBox/Status of Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/Status_of_Features&amp;diff=19795"/>
		<updated>2023-06-08T23:52:19Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Initial rough out of hardware feature statuses&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+pinix&lt;br /&gt;
! style=width:100px | Feature !! style=&amp;quot;width:100px | Status !! style=width:300px | Notes !! style=width:200px | More info&lt;br /&gt;
|-&lt;br /&gt;
| SD Card Boot || Working || Some people have found trouble booting from the SD card but success in booting from the XSPI flash || #Star64 &lt;br /&gt;
|-&lt;br /&gt;
| eMMC Boot || ???? || || #Star64&lt;br /&gt;
|-&lt;br /&gt;
| UART Boot || Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| PCIE/NVME Boot || Partially Implemented || || #Star64 @Tenkawa &lt;br /&gt;
|-&lt;br /&gt;
| USB 2.0 || Partially Implemented || There is currently a hardware bug with overcurrent protection which requires a workaround ||&lt;br /&gt;
|-&lt;br /&gt;
| USB 3.0 || ???? || Same hardware bug as USB 2.0. ||&lt;br /&gt;
|-&lt;br /&gt;
| 4K Output || Partially Implemented || || #Star64 @Fishwaldo&lt;br /&gt;
|-&lt;br /&gt;
| 4K HDR || Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| H.264 || Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| H.265 || Not Implemented || ||&lt;br /&gt;
|-&lt;br /&gt;
| 3.5mm audio Jack || ???? || ||&lt;br /&gt;
|-&lt;br /&gt;
| Ethernet || Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| Wifi || ???? || ||&lt;br /&gt;
|-&lt;br /&gt;
| PCIe 2.0 ×1 lane || Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;Pi2&amp;quot; GPIO || Working || ||&lt;br /&gt;
|-&lt;br /&gt;
| TTL UART || Working || ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19794</id>
		<title>User:RemDogKap/SandBox/First Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19794"/>
		<updated>2023-06-08T20:16:31Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: minor edits and how to flash sd card on windows&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Star64 is a 64 bit, 4 core Single Board Computer. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
*[https://pine64.com/product-category/star64/ Star64 SBC]&lt;br /&gt;
*[https://pine64.com/product-category/star64-accessories/ 12V 3A to 5A Power Supply] (Any 12V 3A or 5A type M 5.5mm OD/2.1mm ID barrel type DC Jack Power Supply will work)&lt;br /&gt;
*One or more types of removeable flash memory&lt;br /&gt;
**[https://pine64.com/product/64gb-class10-microsd-card/ SD card] of at least ??GB, no greater than 256GB&lt;br /&gt;
**[https://pine64.com/product-category/star64-accessories/ eMMC Module] with [https://pine64.com/product/usb-adapter-for-emmc-module/ USB adapter]&lt;br /&gt;
*Ability to flash a storage device with a disk image. [https://etcher.balena.io/ Balena Etcher] is recommended, but advanced users can also use dd in a Unix-like OS&lt;br /&gt;
&lt;br /&gt;
==Flashing the image==&lt;br /&gt;
There are currently two working distributions of Linux compatible with the Star64, pinix and Armbian. Both distributions use the same kernel[???].The pinix distribution is built using Yocto which is an open source project used to create Linux distributions for embedded devices. The pinix distribution is currently focusing on support for GPU and VGPU acceleration for desktop environments. Both distributions use the deb package manager. The Armbian distribution is based on Debian/Ubuntu with changes to make it lightweight and compatible with ARM/RISC-V development boards. &lt;br /&gt;
&lt;br /&gt;
While there are other RISC-V compatible distributions, none of these have the required device tree entries for the Star64 meaning that none will work fully on the Star64. This includes images for the StarFive2, a sister board which uses the same processor, due to other hardware differences. It may be possible to get other distributions to run on the Star64 by cross compiling the working kernel into another distribution. &lt;br /&gt;
&lt;br /&gt;
More information about support for features can be accessed [[Status_of_Features | here]].&lt;br /&gt;
===pinix Install===&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
&lt;br /&gt;
First, if not already installed, install bzip2 and wget.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install bzip2 wget&lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (.wic.bz2) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) using wget. There are three types of images, one command line only and two desktop environments. &lt;br /&gt;
*star64-image-minimal - A command line only image&lt;br /&gt;
*star64-image-weston - A Weston/Wayland &amp;quot;Demo&amp;quot; image.&lt;br /&gt;
*star64-image-plasma- A Plasma Based Image.&lt;br /&gt;
&lt;br /&gt;
 $ wget  &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/${Name of Image File}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where ${Name of Image File} is the name of your chosen image file. &lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/star64-image-minimal-star64-1.2.wic.bz2&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, decompress the file using bzip2.&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d ${Path to Image File}&lt;br /&gt;
&lt;br /&gt;
Where ${Path to Image File} is the path to your image file. Example:&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d star64-image-minimal-star64-1.2.wic.bz2&lt;br /&gt;
&lt;br /&gt;
Next, flash the image to the SD card. The open source Balena Etcher with GUI support is recommended but dd will work as well if you are an advanced user. &lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
First, make sure that you have [https://7-zip.org/ 7zip] installed and if not, install it. &lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (.wic.bz2) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) by clicking on the files. There are three types of images, one command line only and two desktop environments. &lt;br /&gt;
*star64-image-minimal - A command line only image&lt;br /&gt;
*star64-image-weston - A Weston/Wayland &amp;quot;Demo&amp;quot; image.&lt;br /&gt;
*star64-image-plasma- A Plasma Based Image.&lt;br /&gt;
&lt;br /&gt;
Third, right click on the downloaded file and select 7-zip. Next click extract. &lt;br /&gt;
&lt;br /&gt;
Finally, use Balena Etcher to write your disk image to the SD Card. &lt;br /&gt;
&lt;br /&gt;
===Armbian Install===&lt;br /&gt;
&lt;br /&gt;
===SD Card===&lt;br /&gt;
&lt;br /&gt;
===eMMC Flash===&lt;br /&gt;
[Not sure if eMMC flash is any different, I (Rem) do not have experience using it]&lt;br /&gt;
====Using SD Card====&lt;br /&gt;
[As mbuggle said in Discord #Star64 on 2023-06-05 1:10 AM CDT (Message ID: 1115160713439223859) it seems like it may be possible to use an SD Card to first boot, use the SSD to transfer the disk image to the eMMC, remove the SD Card and boot from eMMC]&lt;br /&gt;
====Using eMMC to USB Adapter====&lt;br /&gt;
&lt;br /&gt;
==Booting the Image==&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19793</id>
		<title>User:RemDogKap/SandBox/First Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19793"/>
		<updated>2023-06-08T16:03:18Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: minor formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Star64 is a 64 bit, 4 core Single Board Computer. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
*[https://pine64.com/product-category/star64/ Star64 SBC]&lt;br /&gt;
*[https://pine64.com/product-category/star64-accessories/ 12V 3A to 5A Power Supply] (Any 12V 3A or 5A type M 5.5mm OD/2.1mm ID barrel type DC Jack Power Supply will work)&lt;br /&gt;
*One or more types of removeable flash memory&lt;br /&gt;
**[https://pine64.com/product/64gb-class10-microsd-card/ SD card] of at least ??GB, no greater than 256GB&lt;br /&gt;
**[https://pine64.com/product-category/star64-accessories/ eMMC Module] with [https://pine64.com/product/usb-adapter-for-emmc-module/ USB adapter]&lt;br /&gt;
*Ability to flash a storage device with a disk image. [https://etcher.balena.io/ Balena Etcher] is recommended, but advanced users can also use dd in a Unix-like OS&lt;br /&gt;
&lt;br /&gt;
==Flashing the image==&lt;br /&gt;
There are currently two working distributions of Linux compatible with the Star64, Pocky and Armbian. Both distributions use the same kernel[???].The Pocky distribution is built using Yocto which is an open source project used to create Linux distributions for embedded devices. The Pocky distribution currently has some GPU support and is further developed than Armbian. Both distributions use the deb package manager. The Armbian distribution is based on Debian/Ubuntu with changes to make it lightweight and compatible with ARM/RISC-V development boards. &lt;br /&gt;
&lt;br /&gt;
More information about support for features can be accessed [[Status_of_Features | here]].&lt;br /&gt;
===Pocky Install===&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
&lt;br /&gt;
First, if not already installed, install bzip2 and wget.&lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install bzip2 wget&lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (.wic.bz2) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) using wget. There are three types of images, one command line only and two desktop environments. &lt;br /&gt;
*star64-image-minimal - A command line only image&lt;br /&gt;
*star64-image-weston - A Weston/Wayland &amp;quot;Demo&amp;quot; image.&lt;br /&gt;
*star64-image-plasma- A Plasma Based Image.&lt;br /&gt;
&lt;br /&gt;
 $ wget  &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/${Name of Image File}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where ${Name of Image File} is the name of your chosen image file. &lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/star64-image-minimal-star64-1.2.wic.bz2&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, decompress the file using bzip2.&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d ${Path to Image File}&lt;br /&gt;
&lt;br /&gt;
Where ${Path to Image File} is the path to your image file. Example:&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d star64-image-minimal-star64-1.2.wic.bz2&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
===Armbian Install===&lt;br /&gt;
&lt;br /&gt;
===SD Card===&lt;br /&gt;
&lt;br /&gt;
===eMMC Flash===&lt;br /&gt;
[Not sure if eMMC flash is any different, I (Rem) do not have experience using it]&lt;br /&gt;
====Using SD Card====&lt;br /&gt;
[As mbuggle said in Discord #Star64 on 2023-06-05 1:10 AM CDT (Message ID: 1115160713439223859) it seems like it may be possible to use an SD Card to first boot, use the SSD to transfer the disk image to the eMMC, remove the SD Card and boot from eMMC]&lt;br /&gt;
====Using eMMC to USB Adapter====&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19792</id>
		<title>User:RemDogKap/SandBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19792"/>
		<updated>2023-06-08T16:00:02Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: added memory issue as ToDo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Links to documentation pages I am currently working on for the Star64 SBC&lt;br /&gt;
&lt;br /&gt;
ToDo:&lt;br /&gt;
*Explain that SD Card does not work at full speed&lt;br /&gt;
*Tutorial for loading disk images onto eMMC&lt;br /&gt;
*How to update XSPI U-Boot&lt;br /&gt;
*How to use NVME drives&lt;br /&gt;
*working state of various USB ports &lt;br /&gt;
*list hardware bugs&lt;br /&gt;
**SD Card Voltage &lt;br /&gt;
**USB over current&lt;br /&gt;
*Armbian Install &lt;br /&gt;
*Memory DTB fix/recompile eeprom thing&lt;br /&gt;
&lt;br /&gt;
[[/First Setup]]&lt;br /&gt;
&lt;br /&gt;
[[/Storage Formats]]&lt;br /&gt;
&lt;br /&gt;
[[/Status of Features]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19791</id>
		<title>User:RemDogKap/SandBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19791"/>
		<updated>2023-06-08T14:17:25Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Added ToDos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Links to documentation pages I am currently working on for the Star64 SBC&lt;br /&gt;
&lt;br /&gt;
ToDo:&lt;br /&gt;
*Explain that SD Card does not work at full speed&lt;br /&gt;
*Tutorial for loading disk images onto eMMC&lt;br /&gt;
*How to update XSPI U-Boot&lt;br /&gt;
*How to use NVME drives&lt;br /&gt;
*working state of various USB ports &lt;br /&gt;
*list hardware bugs&lt;br /&gt;
**SD Card Voltage &lt;br /&gt;
**USB over current&lt;br /&gt;
*Armbian Install &lt;br /&gt;
&lt;br /&gt;
[[/First Setup]]&lt;br /&gt;
&lt;br /&gt;
[[/Storage Formats]]&lt;br /&gt;
&lt;br /&gt;
[[/Status of Features]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19784</id>
		<title>User:RemDogKap/SandBox/First Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19784"/>
		<updated>2023-06-08T04:46:15Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: began section on flashing the image&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Star64 is a 64 bit, 4 core Single Board Computer. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
*[https://pine64.com/product-category/star64/ Star64 SBC]&lt;br /&gt;
*[https://pine64.com/product-category/star64-accessories/ 12V 3 to 5 A Power Supply] (Any 12V 3A or 5A type M 5.5mm OD/2.1mm ID barrel type DC Jack Power Supply will work)&lt;br /&gt;
*One or more types of removeable flash memory&lt;br /&gt;
**[https://pine64.com/product/64gb-class10-microsd-card/ SD card] of at least ??GB, no greater than 256GB&lt;br /&gt;
**[https://pine64.com/product-category/star64-accessories/ eMMC Module] with [https://pine64.com/product/usb-adapter-for-emmc-module/ USB adapter]&lt;br /&gt;
*Ability to flash a storage device with a disk image. [https://etcher.balena.io/ Balena Etcher] is recommended, but advanced users can also use dd in a Unix-like OS&lt;br /&gt;
&lt;br /&gt;
==Flashing the image==&lt;br /&gt;
There are currently two working distributions of Linux compatible with the Star64, Pocky and Armbian. Both distributions use the same kernel[???].The Pocky distribution is built using Yocto which is an open source project used to create Linux distributions for embedded devices. The Pocky distribution currently has some GPU support and is further developed than Armbian. Both distributions use the deb package manager. The Armbian distribution is based on Debian/Ubuntu with changes to make it lightweight and compatible with ARM/RISC-V development boards. &lt;br /&gt;
&lt;br /&gt;
More information about support for features can be accessed [[Status_of_Features | here]]&lt;br /&gt;
===Pocky Install===&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
&lt;br /&gt;
First, if not already installed, install bzip2 and wget &lt;br /&gt;
 $ sudo apt update &amp;amp;&amp;amp; sudo apt install bzip2 wget&lt;br /&gt;
&lt;br /&gt;
Second, download a compressed disk image (.wic.bz2) from [https://pine64.my-ho.st:8443/ here] (source code available [https://github.com/Fishwaldo/meta-pine64 here]) using wget. There are three types of images, one command line only and two desktop environments. &lt;br /&gt;
*star64-image-minimal - A command line only image&lt;br /&gt;
*star64-image-weston - A Weston/Wayland &amp;quot;Demo&amp;quot; image.&lt;br /&gt;
*star64-image-plasma- A Plasma Based Image.&lt;br /&gt;
&lt;br /&gt;
 $ wget  &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/${Name of Image File}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where ${Name of Image File} is the name of your chosen image file. &lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
 $ wget &amp;lt;nowiki&amp;gt;https://pine64.my-ho.st:8443/star64-image-minimal-star64-1.2.wic.bz2&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, decompress the file using bzip2.&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d ${Path to Image File}&lt;br /&gt;
&lt;br /&gt;
Where ${Path to Image File} is the path to your image file. Example:&lt;br /&gt;
&lt;br /&gt;
 $ bzip2 -d star64-image-minimal-star64-1.2.wic.bz2&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
&lt;br /&gt;
===Armbian Install===&lt;br /&gt;
&lt;br /&gt;
===SD Card===&lt;br /&gt;
&lt;br /&gt;
===eMMC Flash===&lt;br /&gt;
[Not sure if eMMC flash is any different, I (Rem) do not have experience using it]&lt;br /&gt;
====Using SD Card====&lt;br /&gt;
[As mbuggle said in Discord #Star64 on 2023-06-05 1:10 AM CDT (Message ID: 1115160713439223859) it seems like it may be possible to use an SD Card to first boot, use the SSD to transfer the disk image to the eMMC, remove the SD Card and boot from eMMC]&lt;br /&gt;
====Using eMMC to USB Adapter====&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19783</id>
		<title>User:RemDogKap/SandBox/First Setup</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox/First_Setup&amp;diff=19783"/>
		<updated>2023-06-08T02:43:09Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Prereqs rough out&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Star64 is a 64 bit, 4 core Single Board Computer. &lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
*[https://pine64.com/product-category/star64/ Star64 SBC]&lt;br /&gt;
*[https://pine64.com/product-category/star64-accessories/ 12V 3 to 5 A Power Supply] (Any 12V 3A or 5A type M 5.5mm OD/2.1mm ID barrel type DC Jack Power Supply will work)&lt;br /&gt;
*One or more types of removeable flash memory&lt;br /&gt;
**[https://pine64.com/product/64gb-class10-microsd-card/ SD card] of at least ??GB, no greater than 256GB&lt;br /&gt;
**[https://pine64.com/product-category/star64-accessories/ eMMC Module] with [https://pine64.com/product/usb-adapter-for-emmc-module/ USB adapter]&lt;br /&gt;
*Ability to flash a storage device. [https://etcher.balena.io/ Balena Etcher] is recommended, but advanced users can also use dd in a Unix-like OS&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19782</id>
		<title>User:RemDogKap/SandBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap/SandBox&amp;diff=19782"/>
		<updated>2023-06-08T02:13:24Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Initial Outline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Links to documentation pages I am currents working on for the Star64 SBC&lt;br /&gt;
&lt;br /&gt;
[[/First Setup]]&lt;br /&gt;
&lt;br /&gt;
[[/Storage Formats]]&lt;br /&gt;
&lt;br /&gt;
[[/Status of Features]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
	<entry>
		<id>https://wiki.pine64.org/index.php?title=User:RemDogKap&amp;diff=19781</id>
		<title>User:RemDogKap</title>
		<link rel="alternate" type="text/html" href="https://wiki.pine64.org/index.php?title=User:RemDogKap&amp;diff=19781"/>
		<updated>2023-06-08T02:12:02Z</updated>

		<summary type="html">&lt;p&gt;RemDogKap: Insert Sandbox Link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[/SandBox]]&lt;/div&gt;</summary>
		<author><name>RemDogKap</name></author>
	</entry>
</feed>