Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
Author: loboris

Linux Distributions for Orange PI H3 boards

  [Copy link]

3

Threads

38

Posts

223

Credits

Intermediate member

Rank: 3Rank: 3

Credits
223
Post time 2015-9-2 05:03:31 | Show all posts
Edited by Sitheek at 2015-9-2 05:10

Ok, my friend @mikexx debugged CSI port on Orange Pi 2 with logic analyzer so these are things we figured out:

1. There is no power supply for CSI camera because SoC pin PA17 is in down state - 0 volts. This pin is required to be in high state - it enables power supply for CSI camera.

2. I2c 0 works, probalby I2c 1 works too, but I2c 2 which is connected to CSI port will not work until again PA17 pin is in low state. Data and clock lines of I2c are pulled up through resistors from PA17, so if it is 0 volts I2c 2 can not work too.

To enable any CSI camera PA17 pin should be in high state. Setting it through script.bin does not work.

We tried using gpio-sunxi module without sucess. gpio-sunxi.ko does not allow to set PA17 pin.
I looked into sources of gpio-sunxi and it's includes, but I am not a coder.

I figured out that there are addresses of essential registers defined in /arch/arm/mach-sunxi/include/mach/sun8i/platform-sun8iw7p1.h, but I do not understend how gpio-sunxi kernel module knows what pins to use.

Accorging to Allwiner's H3 soc documentation - page 318 - PA17 pin can be used as gpio, but I do not know why it is not allowed by gpio-sunxi module.

@loborys could you help us and tell us how to set PA17 high? We can rebuild kernel, we use your's old lichee.tar.gz, could you post the new one?

10

Threads

448

Posts

4335

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
4335
 Author| Post time 2015-9-2 05:41:04 | Show all posts
Edited by loboris at 2015-9-1 22:43
Sitheek replied at 2015-9-1 22:03
Ok, my friend @mikexx debugged CSI port on Orange Pi 2 with logic analyzer so these are things we fi ...

I have not enough time to look deeper into it until next week, but I've tried a simple trick.I've replaced gpio deffinition for gpio_pin_28 in fex from PA20 to PA17:
orig:  gpio_pin_28      = port:PA20<1><default><default><0>

new:  gpio_pin_28      = port:PA17<1><default><default><0>

Now, PA17 apears in /sys/class/gpio_sw
You can download compiled script.bin with that change from here. Copy it as script.bin to fat partition.

3

Threads

28

Posts

151

Credits

Registered member

Rank: 2

Credits
151
Post time 2015-9-2 13:58:39 | Show all posts
loboris replied at 2015-9-2 01:00
If you are on Debian Jessie mini (no Desktop):
After writing the image (Debian_jessie_mini.img) to ...

Hi!
everything works thanks!
There is a problem with UART 0-2
Target data rate greater 115200. (230400-460800-921600)
instead 230400 we have 214000 (error baund)
the default is  uart_clock =24000000 Hz.
24000000/16/13 =115384.6 ~=115200  +/-2% permissible for UART
24000000/16/7 =214285.7  -error !
in rasberi Pi:
edit boot/config.txt
init_uart_clock = 14,745,600 Hz.
14745600/16/1=921600.
data rate =921600 - ok.
i need to change takt  UART c 24000000 to 14,745,600 Hz.
how can this be done in Orange PI?


10

Threads

448

Posts

4335

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
4335
 Author| Post time 2015-9-2 15:44:18 | Show all posts
Vladimir55 replied at 2015-9-2 06:58
Hi!
everything works thanks!
There is a problem with UART 0-2

I don't think it can be done easily.
For speeds greater than 115200 bd you have to use USB->Serial adapter.
I'm using CP2102 based adapter, it is only ~1.5$ and has all control signals exposed.

3

Threads

28

Posts

151

Credits

Registered member

Rank: 2

Credits
151
Post time 2015-9-2 16:01:29 | Show all posts
Ok!
but if not possible to change the cycle.
need to get into the H3 PLL registers...
cp2101-3 work, but it's USB and it is not very reliable.

SPI 0-1 has a question - will it work?


0

Threads

16

Posts

82

Credits

Registered member

Rank: 2

Credits
82
Post time 2015-9-2 17:16:45 | Show all posts
HI,

I still cannot get x2go server working. trying with both ubuntu mate img and debian jessie xfce img.
follow loboris instruction downloaded desktop_script.tar.gz copy to /usr/local/bin sudo install_x2goserver  
everything installed without any error. even with fresh image.

but when connect with x2go client

NXPROXY - Version 3.5.0

Copyright (C) 2001, 2010 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '20746'.
Session: Starting session at 'Wed Sep  2 16:47:46 2015'.
Info: Using abstract X11
NXPROXY - Version 3.5.0

Copyright (C) 2001, 2010 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '20804'.
Session: Starting session at 'Wed Sep  2 16:49:23 2015'.
Info: Using abstract X11 socket in kernel namespace for accessing DISPLAY=:0.
Info: Connecting to remote host 'localhost:31007'.
Info: Connection to remote proxy 'localhost:31007' established.
Error: The remote NX proxy closed the connection.
Error: Failure negotiating the session in stage '7'.
Error: Wrong version or invalid session authentication cookie.
Session: Terminating session at 'Wed Sep  2 16:49:23 2015'.
Session: Session terminated at 'Wed Sep  2 16:49:23 2015'.
socket in kernel namespace for accessing DISPLAY=:0.
Info: Connecting to remote host 'localhost:31004'.
Info: Connection to remote proxy 'localhost:31004' established.
Error: The remote NX proxy closed the connection.
Error: Failure negotiating the session in stage '7'.
Error: Wrong version or invalid session authentication cookie.
Session: Terminating session at 'Wed Sep  2 16:47:46 2015'.
Session: Session terminated at 'Wed Sep  2 16:47:46 2015'.

4

Threads

52

Posts

284

Credits

Intermediate member

Rank: 3Rank: 3

Credits
284
Post time 2015-9-2 18:41:36 | Show all posts
Edited by makama80 at 2015-9-2 18:42

@raid3868: Maybe you can try x11vnc as an alternative. I use it as well and it works also great, however: I prefer the x2go because it is a real X-window system.

@loboris: do you have the Mali also on your radar? I have a pcduino3 nano (A20/Mali400) where the Mali actually works in Linux. So it is possible to have it running under Linux.
Because I just received my OPI+, I did not yet try your images (which I certainly will!) and also do an attempt to get the Mali working. Any idea if it is possible with the way Linux runs on the OPI H3 boards?

I am going to start a.s.a.p. to create a document with screenshots and (hopefully!) clear instructions / tutorials to document what's in the forum. Currently a lot info is scattered here and there, and I think a single document with all info together can be of great help.

10

Threads

448

Posts

4335

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
4335
 Author| Post time 2015-9-2 20:52:08 | Show all posts
Edited by loboris at 2015-9-2 19:25
raid3868 replied at 2015-9-2 10:16
HI,

I still cannot get x2go server working. trying with both ubuntu mate img and debian jessie xfce ...

It is problem of your x2go client, try to use another. I'm always using pyhoca-gui as x2go client.

10

Threads

448

Posts

4335

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
4335
 Author| Post time 2015-9-3 02:24:59 | Show all posts
Edited by loboris at 2015-9-2 19:52


uImage upgraded:
  • uImage upgraded, now it is possible to boot to USB drive partition
  • to boot to USB partition, the file named cmdline.txt must exist on BOOT (fat) partition on sd card/emmc
  • the content of that file must be: root=/dev/sdXn, where /dev/sdXn is the USB drive partition (as visible from OPI) to which to boot (for example root=/dev/sda1)
  • the line which mounts / in /etc/fstab on USB partition must point to the right partition
  • install_to_usb script automaticaly creates right cmdline.txt and fstab
  • if cmdline.txt does not exist, or USB drive partition is not accesible (USB drive not attached), system boots to /dev/mmcblk0p1
  • Bootable SD Card or EMMC must be accesible when booting to USB, but it is not necessary that the second partition contains valid Linux fs, sd card can have only the 1st (fat) partition
  • You can have different Linux installations on different USB drive partitions, just edit the cmdline.txt to select to which to boot.
  • Download script_kernel.tar.gz extract to BOOT (fat) partition and copy the right uImage_* to uImage


Install scripts updated:

  • added script install_to_usb to install Linux to USB drive (partition). Can be used to backup your SDCard/EMMC installation.
    1. sudo install_to_usb /dev/sdXn [btrfs]|[noformat]
    Copy the Code

  • /dev/sdXn is the USB drive partition to which to install (for example /dev/sda1)
  • if the second parameter is btrfs, USB partition will be formated as btrfs, otherwise as ext4
  • if the second parameter is noformat, USB partition will not be formated, content of the partition will be updated (in case you have used install_to_usb to backup your sdcard/emmc before)
  • be careful not to select the wrong USB partition, it will be erased/updated!
  • Download desktop_scripts.tar.gz, unpack to /usr/local/bin.
  • You must have the new uImage version, with boot to usb enabled.





0

Threads

4

Posts

32

Credits

Novice

Rank: 1

Credits
32
Post time 2015-9-3 03:03:48 | Show all posts
loboris replied at 2015-9-3 02:24
uImage upgraded:
  • uImage upgraded, now it is possible to boot to USB drive partition

  • Thanks a lot for this update and yours hard work
    You have to log in before you can reply Login | Register

    Points Rules

    Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

    2022-5-21 07:30 GMT+8 , Processed in 0.041530 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2014-2015 orangepibbs en.

    Quick Reply To Top Return to the list