| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 30,092
» Latest member: FR_IV
» Forum threads: 16,358
» Forum posts: 117,524
Full Statistics
|
| Latest Threads |
Manjaro affected by Arch ...
Forum: General
Last Post: tantamount
Yesterday, 10:45 AM
» Replies: 0
» Views: 40
|
Fix Bricked SPI Flash, Pi...
Forum: PinePhone Pro Hardware
Last Post: FR_IV
06-27-2026, 05:00 PM
» Replies: 0
» Views: 48
|
irradium (based on crux l...
Forum: Linux on RockPro64
Last Post: mara
06-27-2026, 04:09 PM
» Replies: 12
» Views: 19,538
|
irradium (based on crux l...
Forum: Linux on Rock64
Last Post: mara
06-27-2026, 02:43 PM
» Replies: 13
» Views: 18,644
|
Android Gaming Image
Forum: Game Station Emulation
Last Post: Jacobgilbert
06-26-2026, 07:06 AM
» Replies: 52
» Views: 110,681
|
rAudio for Rock64 V2/Pine...
Forum: Linux on Rock64
Last Post: shinzuka
06-25-2026, 03:16 PM
» Replies: 11
» Views: 1,714
|
Big thanks for the docume...
Forum: General Discussion on Pinebook Pro
Last Post: alchemist
06-25-2026, 12:58 PM
» Replies: 0
» Views: 135
|
Mobian MMS/SMS text probl...
Forum: Mobian on PinePhone
Last Post: mehdy
06-23-2026, 06:53 AM
» Replies: 16
» Views: 34,367
|
OpenTTD game - Error: no ...
Forum: Mobian on PinePhone
Last Post: Mary_Davis
06-23-2026, 01:12 AM
» Replies: 3
» Views: 5,568
|
Libby - ebook reader that...
Forum: PineNote Software
Last Post: Mary_Davis
06-23-2026, 01:04 AM
» Replies: 5
» Views: 3,876
|
|
|
| Nexdock with Pine64 running RemixOS |
|
Posted by: bartvvr - 09-18-2016, 02:33 PM - Forum: Accessories
- Replies (4)
|
 |
I received a Nexdock which is basically a display and a bluetooth keybord. The idea is that with Nexdock you can turn your Pine64 into a laptop.
https://www.indiegogo.com/projects/nexdo.../2028259#/
I'm running RemixOS 2.0 on my Pine64 2GB but I can't change the output resolution of the Pine64 to 1366x768.
1366x718 is the native resolution of the Nexdock.
Nexdock works together with Pine64, but all text is hard to read because of the wrong display setting.
Any solution or Remix OS update to fix this issue?
Thanks, Bart
|
|
|
|
| Tutorial: How to create DD images with appropriate size |
|
Posted by: tkaiser - 09-18-2016, 09:55 AM - Forum: Android on Pine A64(+)
- Replies (5)
|
 |
This mini tutorial is meant for those people providing Android or RemixOS 'DD images'. The DD images currently provided have been created wrong (too large for many SD cards out there). Fortunately it's easy to do it better. Since we're talking here about SBC why not stop wasting time on both creator's and user's side, using an SBC in USB gadget mode, create images with appropriate size and speed up things?
The whole process would work with any Pine64/Pine64+ too but since AFAIK no OS image is around that uses a correctly configured kernel enabling the necessary g_mass_storage module and since a small patch might be necessary to get this working with BSP kernel (can't test right now since ran out of Pine64) we discuss this with H3 devices instead (H3 is A64's little sibling). Ingredients:
- Any H3 device from this list: http://www.armbian.com/download/
- A short USB-to-Micro-USB cable (or type A to type A when choosing the Beelink X2 or Pine64 later)
- An Armbian image for the device in question using legacy kernel since we need USB OTG support
- A 120 GB disk to store the images with 7.8, 15.8, 31.8 and 63.8 GB size (or a 250 disk when both Android and RemixOS images should be stored on the same disk)
I would choose the cheapest device possible: Orange Pi One powered through the barrel plug and establishing the USB OTG connection through the Micro USB port.
1) Prepare the disk
Connect the USB device to OPi One, the H3 board to your Windows machine, then do on the Linux box:
Code: modprobe g_mass_storage file=/dev/sda
echo 2 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role
This will hand the whole device as an USB disk to your Windows PC. Since I don't own such thing (only virtualized Windows servers) in the following I will show how it looks like when the SBC is connected to a Mac. You can now use disk utility (no idea how that's called in Windows) to partition the disk that is physically connected to the SBC in reality. I created the necessary partitions in OS X that are all small enough to fit on any SD card later. Now in OS X it looks like this:
Code: macbookpro-tk:~ tk$ diskutil list
...
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *128.0 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS Ohne Titel 1 7.8 GB disk2s2
3: Apple_HFS Ohne Titel 2 15.8 GB disk2s3
4: Apple_HFS Ohne Titel 3 31.8 GB disk2s4
5: Apple_HFS Ohne Titel 4 63.8 GB disk2s5
6: Apple_HFS Ohne Titel 5 8.9 GB disk2s6
And on the SBC itself in Linux it looks like this:
Code: root@orangepiplus2e:~# cat /proc/partitions
major minor #blocks name
179 0 15267840 mmcblk0
179 1 15114128 mmcblk0p1
179 32 4096 mmcblk0boot1
179 16 4096 mmcblk0boot0
8 0 125034840 sda
8 1 204800 sda1
8 2 7617188 sda2
8 3 15253392 sda3
8 4 30957032 sda4
8 5 61658076 sda5
8 6 8688952 sda6
So we created 4 partitions that we will then feed to PhoenixCard in the next steps. Time to eject/unmount the partitions from Windows (or OS X in my case) and then remove the device back in Linux (we switch first to USB host mode which is the equivalent of disconnecting a real USB disk physically and will then unload the driver since we will use it in the next step not with /dev/sda but the individual partitions instead):
Code: echo 0 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role
rmmod g_mass_storage
2) Provide the partitions as devices starting with 7.8 GB in size
In Linux /dev/sda2 is 7.8 GB in size so now we hand only this partition out to Windows (or in my case OS X):
Code: modprobe g_mass_storage file=/dev/sda2
echo 2 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role
And instantly on the connected PC a new USB device appears that's just 7.8 GB in size:
Code: macbookpro-tk:~ tk$ diskutil list
...
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: Ohne Titel 1 *7.8 GB disk2
3) Let PhoenixCard do the work
Now start PhoenixCard and point it to this virtualized 'USB thumb drive'. PhoenixCard will create a bunch of new Android/Linux partitions on /dev/disk2 (/dev/sda2 on Linux) and use the maximum disk space available (7.8 GB in our case). That's the whole trick: Creating a partition small enough to fit on any SD card later, let PhoenixCard use this partition as device and create its own partitions on this. 
4) Create the DD image on Linux
Eject/unmount the virtual USB thumb drive in Windows, mount the next one to create the 16GB version and while PhoenixCard does its job in Windows create a new device image on the SBC that will be way smaller than the images Pine64 folks provide now. The most important thing here is that we create a device image by using a partition. Now /dev/sda2 on Linux contains a bunch of partitions and therefore we use
Code: dd if=/dev/sda2 bs=10M | 7zr a -bd -t7z -m0=lzma -mx=3 -mfb=64 -md=32m -ms=on -si Android-8GB.img.7z
For the 16GB variant it would look like this (and so on):
Code: dd if=/dev/sda3 bs=10M | 7zr a -bd -t7z -m0=lzma -mx=3 -mfb=64 -md=32m -ms=on -si Android-16GB.img.7z
(I think Armbian doesn't ship with 7-zip so an 'sudo apt-get install p7zip' would be required before). This way you get pretty small DD images while PhoenixCard is already preparing the next image on the Windows host.
5) Tell your users to use appropriate tools and what's important.
When you put the compressed images online then provide GOOD documentation how to burn images correctly. Don't recommend tools that suck, it's 2016 and burning tools that verify the burning process do exist, for Android and RemixOS images it's VERY IMPORTANT that users choose SD cards that show high random IO performance. Everything is outlined here: http://docs.armbian.com/User-Guide_Getti...-a-sd-card
|
|
|
|
| Cannot DD on 16 GB SD |
|
Posted by: Sethlans - 09-18-2016, 07:34 AM - Forum: Android on Pine A64(+)
- Replies (3)
|
 |
Hello everybody.
I have kingston 16GB claa 10 SD card. I have downloaded the 16 GB android image but when i try to DD the image on the SD I havn't enough space on the SD.
I have also tryed with Win32Imager but I have the same problem.
How can i solve?
|
|
|
|
| Power LED Heartbeat script |
|
Posted by: pfeerick - 09-18-2016, 05:16 AM - Forum: Pi2, Euler and Exp GPIO Ports
- Replies (3)
|
 |
Just thought I'd post the current version of the shell script I am using on my Pine64 to make the user controllable System LED (the one that you can attach near the headphones jack, or via the EXP header). I added it to /etc/rc.local (make sure you put an " & " at the end, so it doesn't block rc.local continuing / exiting), so now every time the pine64 starts up, I get a little heartbeat indicator going so I know it's running ok. Since it's a gist, you can also download it via wget or curl... just copy the URL you get from the 'raw' button up the top right.
Next step will be working out how to intercept the power button... perhaps via udev, since that already responds to the power button interrupt, but doesn't know what to do with it out of the box.
https://gist.github.com/pfeerick/00b04df...b4e1f7c168
|
|
|
|
| Fixing GPIO user permission errors |
|
Posted by: pfeerick - 09-18-2016, 04:54 AM - Forum: Pi2, Euler and Exp GPIO Ports
- No Replies
|
 |
A known issue from Raspberry Pi land that also effects the Pine64 is the need to use sudo in order to manipulate GPIO bits... which gets annoying pretty quickly... and tempts you to stay logged in as the root user, which is a bad idea.
There are some workarounds... i.e. using python GPIO, wiringPi (when available). But there is also a relatively simple fix you can apply in order to fix it up, which is to basically add two startup scripts that automatically fix the permissions. I've just run through this myself, and had to backtrack and check what I'd done, so please let me know if there are any mistakes or corrections needed. So... here we go!
Create a gpio group first:
Then add your username to that group:
Code: usermod -a -G gpio username
To check that everything is good so far, you can run the below command, and you should see a line that looks a bit like "gpio:x:1001:pfeerick" (last bit should be your user name).
Code: grep gpio /etc/group
Now, before that change to groups takes effect, you will need to log out of your current session. If you really, really don't want to, you may be able to run "newgrp gpio"... but YMMV.
Now, the final bit is to fix up the permissions of the sysfs GPIO file system. There are two bits that needs to be fixed - the export and unexport 'files' and the actual GPIO 'folders'
For the first bit, it is probably simplest to just add the two following lines to the bottom of (before the exit 0 line), although it may be better to put it in a separate script for neatness. They needed to be run at every startup as /sys is a virtual file system, and is created every time the pine64 is booted, so doesn't remember the permission changes.
Code: chown -R root:gpio /sys/class/gpio
chmod -R ug+rw /sys/class/gpio
At this point, when you restart your pine64, you will be able to export and unexport GPIO pins without needing sudo. And if you don't want to restart, you can just run those commands now at the command prompt. But that is only half the story... we also need to fix the GPIO 'folders' , which have the direction and value 'files''. So, next, run the below command and create following udev rule:
Code: sudo nano /etc/udev/rules.d/80-gpio-noroot.rules
Code: # /etc/udev/rules.d/80-gpio-noroot.rules
# Corrects sys GPIO permissions on the Pine64 so non-root users in the gpio group can manipulate bits
#
# Change group to gpio
SUBSYSTEM=="gpio", PROGRAM="/bin/sh -c '/bin/chown -R root:gpio /sys/devices/soc.0/*pinctrl/gpio'"
# Change user permissions to ensure user and group have read/write permissions
SUBSYSTEM=="gpio", PROGRAM="/bin/sh -c '/bin/chmod -R ug+rw /sys/devices/soc.0/*pinctrl/gpio'"
This monitors the GPIO file system and makes the permission changes as needed.
To avoid needing to reboot to run this new file, just run:
Code: sudo udevadm trigger --subsystem-match=gpio
Everything should work great now!
Concept based on https://www.raspberrypi.org/forums/viewt...6&t=118879
|
|
|
|
| Pine64 and Nexdoc |
|
Posted by: mcf - 09-18-2016, 12:42 AM - Forum: POT modules
- Replies (11)
|
 |
I have a nexdoc. The pine64 will drive the display but not well, it is not crisp like it should be.
The display resolution of the nexdoc is 1366*768, but I can't select this under ubuntu on the pine (in fact I an only select one resolution (I can't remember what). Is there some way around this?
..mcf
|
|
|
|
| 1Gbps clock sync |
|
Posted by: stepw - 09-17-2016, 11:54 AM - Forum: Ethernet Port
- Replies (3)
|
 |
I have a 'bad' PINE64+ board, running armbian with legacy kernel, powered via micro-USB AC adapter. NIC and UART0 serial are the only active peripherals. 100Mbps is perfectly fine, but there's a major packet loss at 1Gbps, no need for iperf to tell there's an issue.
VDD33 voltage is between 3.26V and 3.27V, regardless of
- 1Gbps or 100Mbps or 10Mbps link speed
- CPU idle (/sys/class/thermal/thermal_zone0/temp @ 42 degrees) or busy (/sys/class/thermal/thermal_zone0/temp @ 65 degrees)
- 3 different microUSB AC 5V adapters and cables
That voltage is within tolerance range of 2.97V to 3.63V for PHY VDD33 (per PHY DS). PMIC AC input tolerance range is 3.5V to 7V (per PMIC DS), so PHY should be getting conditioned ~3.3V consistently, even when microUSB AC source is used. Unfortunately I don't have a scope to monitor continuously, but if AC-IN voltage drops were affecting 1Gbps communications, I'd expect them to equally affect 100Mbps communications and that is not the case. So the issue with my board doesn't seem to be caused by PHY input voltage fluctuations.
However, there is a noticeable difference in the amount of packet loss with different power sources:
1. laptop USB, so <500mA, 2 feet USB cable
PC -> SBC: 30% loss
SBC -> PC: 36% loss
2. AC 5V/2A adapter, 6 feet USB cable
PC -> SBC: 5% loss
SBC -> PC: 11% loss
3. AC 5V/3A adapter, 3 feet USB cable
PC -> SBC: 15% loss
SBC -> PC: 31% loss
I'd speculate that there's possibly another element sensitive to AC input inconsistencies that might not be conditioned by the PMIC or that may have a narrow tolerance range. Alternatively, PINE64+ PCB layout might not be strictly following guidelines for RTL8211E IC as set forth in PHY DS, resulting in EMI affecting its operation or VDD10 conditioned input being outside of a narrow 0.95V to 1.06V tolerance range.
References:
PHY DS - http://files.pine64.org/doc/datasheet/pine64/rtl8211e(g)-vb(vl)-cg_datasheet_1.6.pdf
PMIC DS - http://files.pine64.org/doc/datasheet/pi...t_V1.0.pdf
So I've fiddled around with EMAC IC and its RGMII interface to PHY IC.
Some findings:
1. MII RXERC = 0 in mii-tool reg dump, supposedly that indicates PHY is not receiving erroneous frames
#mii-tool -vvv
registers for MII PHY 0:
1140 796d 001c c915 01e1 cde1 000d 2001
6801 0300 7800 0000 0000 0000 0000 3000
016e acc2 9f01 0000 8040 1006 4100 2100
0000 8c00 0040 0106 21fc 8038 0123 0000
2. EMAC reports RGMII speed/duplex and clock is consistent with PHY link type
1Gbps/full:
EMAC BASIC_CTL_0:
#devmem2 0x1c30000 w
0x1 = 1Gbps/full
EMAC RGMII_STA:
#devmem2 0x1c300d0 w
0xD = 0b1101 - 1Gbps, 125MHz clock
MII PHY:
#mii-tool -vvv
registers for MII PHY 0:
1140 796d 001c c915 0001 cde1 000f 2001
6801 0200 7800 0000 0000 0000 0000 3000
016e acc2 9f01 6c52 8040 1006 4100 2100
0000 8c00 0040 0106 21fc 8038 0123 0000
100Mbps/full:
EMAC BASIC_CTL_0:
#devmem2 0x1c30000 w
0xD = 100Mbps/full
EMAC RGMII_STA:
#devmem2 0x1c300d0 w
0xB = 0b1011 - 100Mbps, 25MHz clock
MII PHY:
#mii-tool -vvv
registers for MII PHY 0:
1140 796d 001c c915 01e1 cde1 000d 2001
6801 0300 7800 0000 0000 0000 0000 3000
016e acc2 9f01 0000 8040 1006 4100 2100
0000 8c00 0040 0106 21fc 8038 0123 0000
3. EMAC is using internal clock for 1Gbps/125MHz
A64 EMAC_CLK_REG:
#devmem2 0x1c00030 w
clock 0b01 = GMII/RGMII external
clock 0b10 = GMII/RGMII internal (default)
This said, there could be a problem with 125MHz clock sync, required for proper RGMII communication between EMAC and PHY at 1Gbps rate. Judging by latest PCB diagrams, PHY CLK125 is attached to EMAC, presumably to supply 125MHz clock to EMAC, however EMAC's internal clock is enabled (by the EMAC driver?), so EMAC and PHY clocks are not synchronized. However, switching to external clock (supplied by PHY?) results in even higher packet loss, upwards of 80%
I was trying to dump EMAC DMA TX/RX descriptors and buffers to get an idea of whether frames received by PHY make it to EMAC over RGMII and vice versa, but so far didn't manage to access them from userland. I guess it would take to debug EMAC driver to monitor them and accumulate TX/RX frames and errors statistics.
Above is a re-post from my earlier post at armbian forum.
I don't know if my findings are conclusive, but I'd be interested to know if EMAC internal vs. external clock makes a difference on other boards.
Could someone who has a Pine64+ board with working 1Gbps NIC
1. Confirm if EMAC clock is internal on their board?
2. Try switching EMAC clock to external to confirm if that cripples 1Gbps performance?
Clock source change is volatile, can be reverted manuually or by reloading the board, so there's no permanent effect.
It would take to:
a). install devmem2
Code: # sudo apt-get install devmem2
b). read EMAC register EMAC_CLK_REG at 0x1c00030
Code: # devmem2 0x1c00030 w
Sample output:
/dev/mem opened.
Memory mapped at address 0x7f88009000.
Value at address 0x1C00030 (0x7f88009030): 0x10C06
c). test ping to default gateway
Code: # ping `ip route show 0.0.0.0/0 | awk '{print $3}'`
Sample output:
PING 192.168.137.1 (192.168.137.1) 56(84) bytes of data.
64 bytes from 192.168.137.1: icmp_seq=2 ttl=128 time=0.725 ms
64 bytes from 192.168.137.1: icmp_seq=3 ttl=128 time=0.397 ms
64 bytes from 192.168.137.1: icmp_seq=5 ttl=128 time=0.366 ms
64 bytes from 192.168.137.1: icmp_seq=6 ttl=128 time=0.436 ms
64 bytes from 192.168.137.1: icmp_seq=7 ttl=128 time=0.303 ms
^C
--- 192.168.137.1 ping statistics ---
7 packets transmitted, 5 received, 28% packet loss, time 6004ms
d). write EMAC register EMAC_CLK_REG at 0x1c00030
Code: # devmem2 0x1c00030 w 0x10C05
Sample output:
/dev/mem opened.
Memory mapped at address 0x7f911c2000.
Value at address 0x1C00030 (0x7f911c2030): 0x10C06
Written 0x10C05; readback 0x10C05
e). test ping to default gateway
Code: # ping `ip route show 0.0.0.0/0 | awk '{print $3}'`
Sample output:
PING 192.168.137.1 (192.168.137.1) 56(84) bytes of data.
64 bytes from 192.168.137.1: icmp_seq=3 ttl=128 time=0.479 ms
64 bytes from 192.168.137.1: icmp_seq=7 ttl=128 time=0.398 ms
64 bytes from 192.168.137.1: icmp_seq=12 ttl=128 time=0.504 ms
^C
--- 192.168.137.1 ping statistics ---
14 packets transmitted, 3 received, 78% packet loss, time 13004ms
f). revert to internal clock
Code: # devmem2 0x1c00030 w 0x10C06
Sample output:
/dev/mem opened.
Memory mapped at address 0x7f911c2000.
Value at address 0x1C00030 (0x7f911c2030): 0x10C05
Written 0x10C06; readback 0x10C06
Reference:
page 158 of http://files.pine64.org/doc/datasheet/pi...l_V1.0.pdf
|
|
|
|
|