<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=3389&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [ ARM64 ] Build for Radaxa RockPi4{A|B}]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=3389</link>
		<description><![CDATA[The most recent posts in [ ARM64 ] Build for Radaxa RockPi4{A|B}.]]></description>
		<lastBuildDate>Tue, 24 Mar 2020 14:00:50 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[[ ARM64 ] Build for Radaxa RockPi4{A|B}]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20701#p20701</link>
			<description><![CDATA[<p>Hello All,<br />I have been busy trying to port Devuan to <a href="https://wiki.radxa.com/Rockpi4/getting_started" rel="nofollow">Radaxa RockPi4{A|B}</a>.</p><p>This Image is initially a Server Role, later will come a Desktop Version..</p><p>In this case, <strong>v0.2beta Server</strong> build.</p><p>Features &amp; Versions:</p><p>1) - <em>Arm Trusted Firmware&#160; - <strong>Master Branch BL31 Stage </strong>( drivers for - CortexM0( PowerManagment ), The code to run in CPU cores are arm64 )<br />&#160; &#160; &#160;U-boot boot-loader&#160; &#160; &#160; &#160;- <strong>v2020.01</strong> ( built for arm64 )<br />2) - Linux Kernel&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; - <strong>MainLine 5.6-rc7</strong> ( built for arm64 )<br />3) - UserSpace&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; - <strong>Devuan Beowulf</strong> ( for arm64 )</em><br />4) - ChangeLog&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; - Beowulf,Add PanFrost Kernel Drivers,created Kernel deb packages<br />5) - Problems &amp; to be done - This Image is beign tested, for stability, and will also start to be tested for features, audio, camera, display,mpcie,sdcard speeds, etc</p><p>1) BootLoader( ATF + u-boot )</p><p>Disk Partitioning scheme:</p><div class="codebox"><pre><code># parted /dev/mmcblk1
(...)                                                         
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      32.8kB  4129kB  4096kB               idbloader
 2      8389kB  12.6MB  4194kB               uboot
 3      12.6MB  16.8MB  4194kB               none
 4      16.8MB  130MB   113MB   ext2         boot       boot, esp
 5      134MB   1700MB  1566MB  ext4         rootfs</code></pre></div><p>a)&#160; &#160;- Bootloader( Arm Trusted Firmware + U-Boot ), <br />&#160; &#160; &#160; &#160; 1st partition( starting at sector 64, til sector 8063 ) &#039;idbloader.img&#039;<br />&#160; &#160; &#160; &#160; 2nd partition( starting at sector 16384, til sector 24575 ) &#039;uboot.itb&#039;<br />&#160; &#160; &#160; &#160; 3rd partition( starting at sector 24576, til sector 32767s ) &#039;none - empty&#039;<br />&#160; a1) - The Bootloader will search for a file called <strong>&#039;boot.scr&#039;</strong>, and after initialize the u-boot environment, <span class="bbu">will execute that script</span>..<br />&#160; a2) - In&#160; <strong>&#039;boot.scr&#039;</strong>,<span class="bbu"> for this image</span>, it will point to &#039;RockPi4A&#039; Device Tree Binary File by default( was tested there.. )..<br />&#160; a3) - <span class="bbu">If you have other board than&#160; &#039;RockPi4A&#039;</span>, exe: &#039;rk3399-khadas-edge&#039;, please Read Bellow in the &#039;Notes Section&#039;..&#160; &#160; <br />b)&#160; - 4th partition( starting at sector 32768 ), is mounted as&#160; <strong>&#039;/boot&#039;</strong>, and contain &#039;boot.scr&#039; refered in a1),a2).<br />c)&#160; - 5th partition( starting at sector 262144 ) is mounted as rootfs <strong>&#039;/&#039;</strong></p><p>NOTA!<br />The Bootloader in a) usually takes ~1MiB( idbloader.img + uboot.itb )..<br />Each time a bootloader is built, all area [ sectors 64 - 32767 ], <span class="bbu">needs to be clean first</span>( so that you can flash the new bootloader.. because could still be there any bits of the previous one.. which could lead to unpredictable consequences.. ).<br />In this case as you see above we are using only partition 1, and 2 of the bootloader.</p><p><strong>If you have Other Board than &#039;RockPi4A&#039;</strong>, situation described in <strong>a3)</strong>:<br />The &#039;boot.cmd&#039; script( format, Human Readable ):</p><div class="codebox"><pre><code>setenv macaddr 42 6A C3 80 24 65
#setenv console tty1
#setenv stdout serial,vga
#setenv stderr serial,vga

#setenv scriptaddr 0x00500000
#setenv kernel_addr_r 0x02080000
#setenv fdt_addr_r 0x01f00000

setenv devtype mmc
setenv devnum 1

part uuid ${devtype} ${devnum}:5 uuid
setenv bootargs earlyprintk earlycon=uart8250,mmio32,0xff1a0000 swiotlb=1 coherent_pool=1m net.ifnames=0 biosdevname=0 console=ttyS2,1500000n8 root=PARTUUID=${uuid} ro fsck.repair=yes rootwait

if ext2load ${devtype} ${devnum}:4 ${kernel_addr_r} vmlinuz; then
  if ext4load ${devtype} ${devnum}:5 ${fdt_addr_r} /usr/lib/linux-image-5.6.0-rc7/rockchip/rk3399-rock-pi-4.dtb; then
    fdt addr ${fdt_addr_r}
    fdt resize 65536
    fdt set /ethernet@fe300000 local-mac-address &quot;[${macaddr}]&quot;
    booti ${kernel_addr_r} - ${fdt_addr_r}
  fi;
fi</code></pre></div><p>Write this Image, to a sd-card, then mount it, and change the &#039;boot.cmd&#039; script to point to your board..<br /># You can find a list of supported boards in: &#039;/usr/lib/linux-image-5.6.0-rc7/rockchip&#039;<br /># Edit the file &#039;boot.cmd&#039;, with &#039;vi&#039; for example.<br /># change the line:</p><div class="codebox"><pre><code>if ext4load ${devtype} ${devnum}:5 ${fdt_addr_r} /usr/lib/linux-image-5.6.0-rc7/rockchip/rk3399-rock-pi-4.dtb; then</code></pre></div><p>to</p><div class="codebox"><pre><code>if ext4load ${devtype} ${devnum}:5 ${fdt_addr_r} /usr/lib/linux-image-5.6.0-rc7/rockchip/your-board; then</code></pre></div><p>Save the file,<br /># Generate the <span class="bbu">real script</span> file( binary ),<strong> &#039;boot.scr&#039;</strong></p><div class="codebox"><pre><code>mkimage -C none -A arm64 -T script -d boot.cmd boot.scr</code></pre></div><p>2) - Linux Kernel</p><p>Packages:<br />Linux Kernel 5.6-rc7:</p><div class="codebox"><pre><code>root@RockPi4A:~# dpkg -l |grep -E &quot;(linux-.*(headers|image|libc-dev))&quot;
ii  linux-headers-5.6.0-rc7    5.6.0-rc7-1                        arm64        Linux kernel headers for 5.6.0-rc7 on arm64
ii  linux-image-5.6.0-rc7      5.6.0-rc7-1                        arm64        Linux kernel, version 5.6.0-rc7
ii  linux-libc-dev:arm64       5.6.0-rc7-1                        arm64        Linux support headers for userspace development</code></pre></div><p>The target will be to reach, at least Linux kernel 5.6, improve&#160; the Device Tree Bindings, when possible..</p><p>3) - UserSpace -Users &amp; Passwords:</p><p>1) <strong>root</strong>&#160; &#160; &#160; - password &#039;<strong>toor</strong>&#039;<br />2) <strong>devuan</strong> - password &#039;<strong>devuan</strong>&#039;</p><p>NOTA!<br />SSH is enabled, so that you can login, but <span class="bbu">root login, is disabled</span>, you should login as <strong>&#039;devuan&#039;</strong>, only then switch to &#039;root&#039;, if you want to.. for that,<br />After Login as &#039;devuan&#039;, issue:</p><div class="codebox"><pre><code>sudo su -</code></pre></div><p>And type your <strong>&#039;devuan&#039;</strong> password, that&#039;s it..</p><p>4) - Changelog</p><p>a) kernel update to 5.6-rc7,<br />b) Beowulf&#160; Userspace,<br />c) Panfrost Kernel Graphics Driver,<br />d) Power provided by QUALCOMM QUICK CHARGE 2 or 3 was detected and Working<br />f) Now the image contains traditional kernel deb-packages( .deb )</p><p>5) - Problems and testings to be done..</p><p>a) After migration to beowulf, its impossible, for now, to automount zramfs as swap, automatically.. you need to issue</p><div class="codebox"><pre><code>swapon -a</code></pre></div><p>it could be related with several packages, including those(&#160; most probably): init init-system-helpers initscripts insserv eudev mawk sed<br />This problem does not occur in <a href="https://dev1galaxy.org/viewtopic.php?id=3183" rel="nofollow">RPi1 Image</a><br />b) - Testing is needed, on camera interfaces, display Interface, HDMI( but its working, resolution needs fix&#039;s ).<br />c) - Testing is needed on Video and Audio.<br />d) - Testing is needed on mpcie( M.2 ) interface, and also on emmc( Flash ).<br />e) - Compile UserSpace Mesa Panfrost Driver stack( userspace counterpart for kernel space one.. )<br />f) - Check USB2/USB3 functionality( USB3 was tested already with a mouse and a keyboard, but more serious tests will ne needed )<br />g) - Check Power on via tipical USB Type-C </p><p>For this image, to reach more Supported Hardware and Users, your help is also needed <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Testing <strong><a href="https://cld.pt/dl/download/7fb30240-b724-41b1-8402-01a2c000d2f1/devuan-beowulf-rockpi4A-arm64-0.2-beta.img.xz?download=true" rel="nofollow">this image</a></strong>, and posting your feedback.</p><p>SHA256sum:</p><div class="codebox"><pre><code>$ sha256sum devuan-beowulf-rockpi4A-arm64-0.2-beta.img.xz
f6f24a29797f22b816b9e6318007ac4db0b706aed40a1b0023b8869cc1d73fb4  devuan-beowulf-rockpi4A-arm64-0.2-beta.img.xz</code></pre></div><p>Best Regards,<br />tux</p>]]></description>
			<author><![CDATA[dummy@example.com (tuxd3v)]]></author>
			<pubDate>Tue, 24 Mar 2020 14:00:50 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20701#p20701</guid>
		</item>
	</channel>
</rss>
