<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title><![CDATA[Dobrica Pavlinušić's random unstructured stuff: LXD8541]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?lxd8541</link>
<description></description>
<pubDate>Sat, 23 Dec 2023 12:46:13 -0000</pubDate>
<webMaster>root@saturn.ffzg.hr</webMaster>
<generator>Socialtext Workspace v2.19.0.2</generator>

<item>
<title><![CDATA[LXD8541]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?lxd8541</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: arm</div><hr/><div class="wiki">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#serial">Dobrica Pavlinušić's random unstructured stuff (serial)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] serial} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#kernel">Dobrica Pavlinušić's random unstructured stuff (kernel)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] kernel} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#video_output">Dobrica Pavlinušić's random unstructured stuff (video output)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] video output} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#u_boot_enviroment">Dobrica Pavlinušić's random unstructured stuff (u-boot enviroment)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] u-=boot enviroment} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#fw_printenv">Dobrica Pavlinušić's random unstructured stuff (fw_printenv)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] fw_printenv} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#setup_boot_from_usb">Dobrica Pavlinušić's random unstructured stuff (setup boot from usb)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] setup boot from usb} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#power_button">Dobrica Pavlinušić's random unstructured stuff (power button)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] power button} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><span class="nlw_phrase"><a href="https://saturn.ffzg.hr/rot13/index.cgi/dove-bootlog.txt?action=attachments_download;page_name=lxd8541;id=20231219155756-0-27683">dove-bootlog.txt</a><!-- wiki: {file: dove-=bootlog.txt} --></span><br /><br /><p>
Xtreme PC LXD8541</p>
<p>
Chip PC Linux-based Thinx OS</p>
<p>
Product Specifications Xtreme PC LXD8541</p>
<p>
Processor • Marvell Dove, Armada 510 800MHZ <a target="_blank" title="(external link)" href="https://www.kernel.org/doc/html/v5.14/arm/marvell.html#dove-family-application-processor">https://www.kernel.org/doc/html/v5.14/arm/marvell.html#dove-family-application-processor</a></p>
<p>
Memory • 1GB, DDR3 @ 800MHz</p>
<p>
Mass Storage • 2GB, High reliability eMMC NAND flash • Optional externally accessed MicroSD slot</p>
<p>
Display Support • One DVI-I port<br />
• Display Data Control (DDC) for automatic setting of resolution and refresh rate</p>
<p>
Resolutions • Single: Up to 1920x1200 Pixels @ true color (32 bit)<br />
• Dual: Up to 1920x1080 Pixels @ true color (24 bit)</p>
<p>
Video Player • Various video codecs, including: DivX HD, H.264 (MPEG4), WMV9/VC1<br />
• Up to 1080p local browser Flash support</p>
<p>
Audio Support • High Definition Audio Codec<br />
• Stereo Audio Output - 3 mm (1/8 inch) Audio-Out Jack; 16-bit Stereo, 96KHz</p>
<p>
sample rate<br />
• Microphone Input - 3 mm (1/8 inch), 8 bit<br />
• Software volume / mute control</p>
<p>
Input / Output ports • 6 x USB 2.0 ports (2 front, 4 back)</p>
<h1 id="serial">serial</h1>
<p>
<a target="_blank" title="(external link)" href="https://forum.doozan.com/read.php?2,67954,76099#msg-76099">https://forum.doozan.com/read.php?2,67954,76099#msg-76099</a></p>
<p>
&nbsp;Koen Re: Debian on Chip PC LXD8941 January 04, 2019 02:33PM</p>
<p>
Inside there is both a 4 pin and a 6 pin header. The 4 pin is the UART connection. With the power button towards you and the DVI connection away from you the connections are as follows: GND, TX, RX, VCC (from left to right).</p>
<h1 id="kernel">kernel</h1>
<p>
Linux Kernel 6.6.2 MVEBU package and Debian armhf rootfs</p>
<p>
<a target="_blank" title="(external link)" href="https://forum.doozan.com/read.php?2,32146">https://forum.doozan.com/read.php?2,32146</a></p>
<pre>
mkfs.ext3 -L rootfs /dev/sda1
mount /dev/sda1 /mnt/sda1/
cd /mnt/sda1/
tar xvf /nuc/armada/Debian-6.6.2-mvebu-tld-1-rootfs-bodhi.tar.bz2
</pre>
<br /><p>
3. Create uImage with DTB appended.</p>
<pre>
root@nuc:/mnt/sda1# cd boot/
root@nuc:/mnt/sda1/boot# cp -a uImage uImage.orig
root@nuc:/mnt/sda1/boot# cp -a zImage-6.6.2-mvebu-tld-1 zImage.fdt
root@nuc:/mnt/sda1/boot# cat dts/dove-chip-lxd8941.dtb &gt;&gt; zImage.fdt
root@nuc:/mnt/sda1/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-6.6.2-mvebu-tld-1 -d zImage.fdt uImage
Image Name:   Linux-6.6.2-mvebu-tld-1
Created:      Tue Dec 19 18:00:34 2023
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    5193798 Bytes = 5072.07 KiB = 4.95 MiB
Load Address: 00008000
Entry Point:  00008000
</pre>
<br /><p>
insert usb stick into back 4 usb ports, front 2 won't find storage device on usb</p>
<p>
abort u-boot over serial and issue boot from usb:</p>
<pre>
setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial
usb start; ext2load usb 0:1 0x3000000 /boot/uImage; ext2load usb 0:1 0x4000000 /boot/uInitrd
bootm 0x3000000 0x4000000
</pre>
<br /><h1 id="video_output">video output</h1>
<p>
DRM and framebuffer are not currently (as of 6.6) supported in upstream kernel according to messages at<br />
forum, but dove-chip-lxd8941.dts doesn't include lcd power and dove-hp-t5335z.dts does.</p>
<p>
Let's try to boot with this dts but this does not work.</p>
<h1 id="u_boot_enviroment">u-boot enviroment</h1>
<h2 id="fw_printenv">fw_printenv</h2>
<pre>
root@dove:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1 0x000000 0x010000
</pre>
<br /><h2 id="setup_boot_from_usb">setup boot from usb</h2>
<pre>
root@dove:~# fw_setenv bootusb 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial ; usb start; ext2load usb 0:1 0x3000000 /boot/uImage; ext2load usb 0:1 0x4000000 /boot/uInitrd ; bootm 0x3000000 0x4000000'

root@dove:~# fw_printenv bootcmd
bootcmd=run bootmmc
root@dove:~# fw_setenv bootcmd bootusb
</pre>
<br /><p>
fw_setenv this doesn't work from booted debian system, re-try over serial on u-boot prompt:</p>
<pre>
MIC&gt;&gt; printenv usbboot
usbboot=usb start; sleep 3; ext2load usb 0:1 0x2000000 /boot/uImage; run usbargs;bootm 0x2000000
MIC&gt;&gt; setenv usbboot 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial ; usb start; ext2load usb 0:1 0x3000000 /boot/uImage; ext2load usb 0:1 0x4000000 /boot/uInitrd ; bootm 0x3000000 0x4000000'
MIC&gt;&gt; printenv usbboot
usbboot=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial ; usb start; ext2load usb 0:1 0x3000000 /boot/uImage; ext2load usb 0:1 0x4000000 /boot/uInitrd ; bootm 0x3000000 0x4000000
MIC&gt;&gt; saveenv
Saving Environment to SPI Flash...
Erasing 0xc0000 - 0xd0000:      [Done]
Writing to SPI flash:           [Done]

MIC&gt;&gt; setenv bootcmd run usbboot
MIC&gt;&gt; saveenv
Saving Environment to SPI Flash...
Erasing 0xc0000 - 0xd0000:      [Done]
Writing to SPI flash:           [Done]

</pre>
<br /><h1 id="power_button">power button</h1>
<p>
seemes like it's on gpio 25</p>
<pre>
apt install gpiod

root@dove:/home/dpavlin# gpioget 0 0 1 2 3 4 5 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
1 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0
root@dove:/home/dpavlin# gpioget 0 0 1 2 3 4 5 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
1 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0

root@dove:/home/dpavlin# gpiomon 0 25
event: FALLING EDGE offset: 25 timestamp: [    1466.369262333]
event: FALLING EDGE offset: 25 timestamp: [    1466.632278096]
event:  RISING EDGE offset: 25 timestamp: [    1467.188375662]
event:  RISING EDGE offset: 25 timestamp: [    1468.390585489]
event: FALLING EDGE offset: 25 timestamp: [    1470.143645190]
event:  RISING EDGE offset: 25 timestamp: [    1471.752436499]
event: FALLING EDGE offset: 25 timestamp: [    1473.233499601]
event:  RISING EDGE offset: 25 timestamp: [    1474.560678725]
</pre>
</div>
<hr/><div>Attachments: dove-bootlog.txt</div>]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>arm</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?lxd8541</guid>
<pubDate>Sat, 23 Dec 2023 12:46:13 -0000</pubDate>
</item>
</channel>
</rss>