giri@nwrk.biz

Members
  • Content Count

    61
  • Joined

  • Last visited


Reputation Activity

  1. Like
    giri@nwrk.biz reacted to JMCC in NanoPi Neo 2, memory leak in proftpd, even worse if SSL encrypted   
    Okay, let me strongly state that simply installing packages from a different Debian release, or mixing sources from different releases, is a very, very bad idea. It will make your system unpredictably unstable, and probably ruin it. Even with the proper apt-pinning (which is not even being considered in this thread, except for one mention by @tkaiser above) is not a good idea IMO.
     
    If you want to install a more recent version of proftpd or any other package, simply make a backport. Debian makes it extremely easy, and there are different forms of doing it, all of them quick and easy. Like, for example, this one: https://wiki.debian.org/SimpleBackportCreation
     
  2. Like
    giri@nwrk.biz got a reaction from Jens Bauer in Armbian build environment in chroot jail   
    Probably the easiest and fastest way to set up an Ubuntu Xenial build environment (needed by the armbian build scripts) is using a chroot jail. This thread should be a quick copy paste "tutorial" to create your own chroot jail and on an Debian based linux installation.
     
    1.) Install debootstrap
    $ sudo apt install debootstrap  
    2.) Chreate chroot jail using debootstrap
    $ sudo debootstrap --variant=buildd --arch=amd64 xenial ./system/ http://archive.ubuntu.com/ubuntu/  
    3.) Mount your local system into the chroot
    $ for f in dev dev/pts proc sys ; do sudo mount -o bind /$f ./system/$f ; done 4.) Mount resolv.conf from host system into chroot
    $ sudo mount --bind /etc/resolv.conf ./system/etc/resolv.conf  
    5.) Enter the chroot and install some important packages
    $ sudo chroot ./system $ apt install -y sudo nano git 6.) Add universe to your chroots repo list (needed by the build scripts)
    $ sudo nano /etc/apt/sources.list change from: deb http://archive.ubuntu.com/ubuntu xenial main to: deb http://archive.ubuntu.com/ubuntu xenial main universe then: $ sudo apt update 7.) Download and start build script in root users home directory
    $ cd $ git clone https://github.com/armbian/build $ cd build $ service apt-cacher-ng start ( $ export EXPERT=yes ) $ ./compile.sh Now you can start building your images from source
    I know this is not rocket science, but I think this might help some people getting into Armbian!
  3. Like
    giri@nwrk.biz reacted to zador.blood.stained in custom SKEL folders + selectable display manager   
    It checks /etc/armbian-release, but since you added it to the package list in lib.config it is installed too early, before the board support package (which contains the /etc/armbian-release file)
    Installing it manually using apt-get in customize-image.sh should work fine.
  4. Like
    giri@nwrk.biz reacted to zador.blood.stained in custom SKEL folders + selectable display manager   
    Installing glshim for all applications doesn't really work - it doesn't provide full OpenGL implementation so i.e. web browsers and other heavy applications will crash with it, and it's no a good thing.
    It can (and should) be used with individual applications by adding the private directory to LD_LIBRARY_PATH (at the beginning), or by preloading a special library.
  5. Like
    giri@nwrk.biz reacted to Nonsintetic in Armbian on LY-F1/Gooseberry/Topwise A721 [Make old tablets great again]   
    Thank you! I read your post and remembered I had an old cheapo tablet lying around somewhere. Wouldn't you know it, it was also based on the LY-F1 So I followed the instructions and it works. Mine is branded Allview Alldro Speed (a romanian company rebrands them).
     
    Have you made any progress since the post? Have you found any way to write the image to nand? Thank you again for documenting your efforts!
  6. Like
    giri@nwrk.biz got a reaction from MitchD in Armbian on LY-F1/Gooseberry/Topwise A721 [Make old tablets great again]   
    Yeah, I made a tablet optimized image using matchbox and some custom scripts (to toggle keyboard etc.). It also has an desktop mode. I tried to use as few dependencies as possible.
    I also got hardware accelerated video to work with gstreamer. This may come handy for some dlna/upnp related stuff.
     
    No I did not try to write it to nand. It just felt to unflexible for me. But it should not be a problen to repack an flashable image with the tools you find in the sunxi wiki and on xda.
    But imo it may make more sense to use the nand as additional internal storage
  7. Like
    giri@nwrk.biz got a reaction from MitchD in Armbian on LY-F1/Gooseberry/Topwise A721 [Make old tablets great again]   
    Hey guys!
     
    Cheap Android tablets based on allwinner chipsets were pretty common back in 2012. Recently I found an tablet equipted with an Allwinner A10 SoC (LY-F1) lying lonely around on my fathers desk. He bought that tablet back then because of the cheap price, but never really used it. Luckily my father also saved an Android 4.0.4 ROM he downloaded from the suppliers website back then, because all websites of this supplier are offline now.
     
    After playing around with my OPiZ and seeing how well the sunxi/armbian kernel works, I thounght myself i should try to boot linux from this tablet. At first I tried to pack an image that can be directly written onto the devices 8GB NAND storage, but soon found out that the device tries to boot from SD by default. After doing some research I found out that this device uses an PCB called Topwise A721 which was also sold as standalone board named 'Gooseberry'. This PCB was used in many Chinese Tablets back in 2012.
     
    My next logical step was to burn the only avaiable armbian image for the A10 (pcduino2) and see if it boots. At first I thougth it did not work, because the screen kept blank and the tablet did not give any response, but after plugging the SD card back into my PC i saw that the filesystem was extended to the max 16GB of my SD :). (Hooray, no dissasembly and fiddeling around with UART needed)

    So next I extracted the script.bin (attached to this post) from the android image and replaced it with the symlink on the armbian image. And voila even the screen works out of the box  The only problem I have now is, that I do not have an USB mini OTG cable (I already ordered one) to plug in an keyboard and do further testing. LOL, just found an mini USB OTG in an USB Adapter set I bought some time ago. The desktop environment boots up fine!
     
    The tablet itself has an mini HDMI port, so this may be useful for me! 
     
    Picture of tablet with Armbian login + desktop:
     
    I'll report back when I have done further testing!
     
    EDIT1:
    To enable wireless networking 8192cu has to be added to etc/modules (legacy kernel ofc).
     
    EDIT2:
    Audio works out of the box. 
     
    EDIT3:
    I now added following kernel modules to etc/modules (most of them are loaded on the android image too!):
    This should enable GPU HW acceleration, enables the touchscreen of the tablet and the touch keys.
     
    Touch key info:
    Scancodes:
    BACK: 10x02, 0x82
    HOME: ^[0x01, 0x81
    MENU: 20x03, 0x83
     
    Keycodes:
    BACK: 2
    HOME: 1
    MENU: 3
     
    EDIT4:
    Things I could not get to work:
    camera module (missing kernel module? gc030809 or wrong I2C address?)
    Volume HW keys.
     
    EDIT5:
    Cam somewhat works with cheese after changing gc030809 to gc0308 in script.bin (Yeah silly me, its because cheese tries to use OpenGL rendering.)
    Cam works pretty nice with mplayer, making fotos using fswebcam also works!
     
    EDIT6:
    I made working configurations for the armbian build system (files attached!).
     
    EDIT7:
    Configs are upstream, but not officially supported
     
    EDIT8:
    I am currently working on an tablet optimized image.
     
    Awesome how nearly everything worked out of the box! Armbian on this tablet outperforms the original android image by far!
    Moral of the story, check any old chinese tablets lying around and make them great again using linux
     
    script.bin
    linux-topwise-a721-default.config
    topwise-a721.fex
    topwise-a721.conf
  8. Like
    giri@nwrk.biz got a reaction from kutysam in [Program] Move Composite AV Video Output to fix Overscanning   
    Hey folks!
     
    On monday I was able to fix the overscanning issue of my Orange Pi zero (read here).
    Because fiddling around with the register values can be pretty harsh some times I decided to created a small programm to move the picture of the composite video output. You can find the project page here: https://projects.nwrk.biz/projects/allwinner-tvout
     
    With this tool you can easily move the picture relative to its actual position by just calling :
    $ sudo tvout -m -x <value in px> -y <value in px>  
    To reset the position you can use:
    $ sudo tvout -r  
    I hope some of you may find this useful.
    If I have enough spare time i will add more features to this project (like changing the resolution, etc.). If you have any questions or ideas please feel free to tell me in this thread!

     
  9. Like
    giri@nwrk.biz got a reaction from kutysam in PSA: Orange Pi Zero expansion board tv-out not working solution   
    Yeah!! I managed to fix the overscanning issue!  (Credits go to this guy here for pointing me to the right direction!).
     
    All in all my Picture was Overscanning 20 px on every edge.
     
    At first I changed my resolution from the detected 720x576 to 680x536 (2 * -20 px = -40 px) in the script.bin. This results in an visible edge at the bottom of the screen and an visible edge on the right hand side (with a small black border!).
    $ bin2fex /boot/script.bin ~/script.fex $ nano ~/script.fex find these lines: fb0_width = 0 fb0_height = 0 and change them to: fb0_width = 680 fb0_height = 536 then: $ fex2bin ~/script.fex ~/script.bin $ sudo cp ~/script.bin /boot $ sudo reboot  
    Now the picture needs to be moved down and to the right by 40px to be fully visible!
     
    Next I needed to manipulate TV ENCODER RE-SYNC PARAMETERS REGISTER of the H2+ SoC. For this I used a little tool called devmem2 which helped me to directly read and write to the memory, and thus allowed me to manipulate the H2+ registers!
     
    devmem2 can be installed by using following commands:
    wget http://free-electrons.com/pub/mirror/devmem2.c gcc ./devmem2.c sudo mv ./a.out /usr/local/bin/devmem2  
    After Installing devmem2 I was able to shift the picture by manipulating the value on following Address: 0x01E00130! (=TV ENCODER RE-SYNC PARAMETERS REGISTER, this may differ depending on your SoC, check the Datasheet!)
    First I read back the actual value (so I could revert back changes in case I messed anything up!):
     
    $ sudo devmem2 0x01E00130 /dev/mem opened. Memory mapped at address 0xb6f0d000. Value at address 0x1E00130 (0xb6f0d130): 0x3005000A Now I was able to move the picture by writing a custom value to the register according to the R40 Datasheet: 
     
    TV ENCODER RE-SYNC PARAMETERS REGISTER Datasheet entry:
     
    Here is how I calculated this value with the help of the Datasheet:
    31 ... Re-Sync Field => 0b 
    30 ... Re-Sync Disable => 0b
    29:27 ... not used => 000b
    26:16 ... Vertical => 40d px => 0000101000b
    15:11 ... not used => 00000b
    10:0 ... Horizontal => 40d px => 0000101000b
     
    All in All: 000000000101000000000000101000b => 0x00140028
    So I used this command to set my display:
    $ sudo devmem2 0x01E00130 w 0x00140028 EDIT: I created a small tool which does the work above for you
     
    Finally I saved the command above in my rc.local file to shift the picture during boot.
    $ sudo nano /etc/rc.local paste following line: devmem2 0x01E00130 w 0x00140028 This is a dirty workaround and should be fixed within the driver!
     
    Pictures:
     
     
    Hope this helps to correct your overscanning issues! This should also work with many other Allwinner based Boards. I read that some Bananapi users had a pretty similar problem with overscanning on AV out.
  10. Like
    giri@nwrk.biz reacted to sean.wang in Banana Pi R2   
    I am expected to see Armbian running on mt7623n soc/bpi-r2 board.  
    I have brought it with buildroot +  4.12 rc1 kernel with some dts pending patches in linux-mediatek tree.  
    I will continue to add support to/maintain MT7623n and bpi-r2 board (of course, i mean it upstream).
     
    But for upstream drivers, There is still some driver can't get support like hdmi, bt and wifi.  
    For those temporary solutions, they should be able to be found though sinovoip 4.4 tree. 
  11. Like
    giri@nwrk.biz got a reaction from MitchD in [Program] Move Composite AV Video Output to fix Overscanning   
    Hey folks!
     
    On monday I was able to fix the overscanning issue of my Orange Pi zero (read here).
    Because fiddling around with the register values can be pretty harsh some times I decided to created a small programm to move the picture of the composite video output. You can find the project page here: https://projects.nwrk.biz/projects/allwinner-tvout
     
    With this tool you can easily move the picture relative to its actual position by just calling :
    $ sudo tvout -m -x <value in px> -y <value in px>  
    To reset the position you can use:
    $ sudo tvout -r  
    I hope some of you may find this useful.
    If I have enough spare time i will add more features to this project (like changing the resolution, etc.). If you have any questions or ideas please feel free to tell me in this thread!

     
  12. Like
    giri@nwrk.biz got a reaction from Xalius in Armbian on LY-F1/Gooseberry/Topwise A721 [Make old tablets great again]   
    Hey guys!
     
    Cheap Android tablets based on allwinner chipsets were pretty common back in 2012. Recently I found an tablet equipted with an Allwinner A10 SoC (LY-F1) lying lonely around on my fathers desk. He bought that tablet back then because of the cheap price, but never really used it. Luckily my father also saved an Android 4.0.4 ROM he downloaded from the suppliers website back then, because all websites of this supplier are offline now.
     
    After playing around with my OPiZ and seeing how well the sunxi/armbian kernel works, I thounght myself i should try to boot linux from this tablet. At first I tried to pack an image that can be directly written onto the devices 8GB NAND storage, but soon found out that the device tries to boot from SD by default. After doing some research I found out that this device uses an PCB called Topwise A721 which was also sold as standalone board named 'Gooseberry'. This PCB was used in many Chinese Tablets back in 2012.
     
    My next logical step was to burn the only avaiable armbian image for the A10 (pcduino2) and see if it boots. At first I thougth it did not work, because the screen kept blank and the tablet did not give any response, but after plugging the SD card back into my PC i saw that the filesystem was extended to the max 16GB of my SD :). (Hooray, no dissasembly and fiddeling around with UART needed)

    So next I extracted the script.bin (attached to this post) from the android image and replaced it with the symlink on the armbian image. And voila even the screen works out of the box  The only problem I have now is, that I do not have an USB mini OTG cable (I already ordered one) to plug in an keyboard and do further testing. LOL, just found an mini USB OTG in an USB Adapter set I bought some time ago. The desktop environment boots up fine!
     
    The tablet itself has an mini HDMI port, so this may be useful for me! 
     
    Picture of tablet with Armbian login + desktop:
     
    I'll report back when I have done further testing!
     
    EDIT1:
    To enable wireless networking 8192cu has to be added to etc/modules (legacy kernel ofc).
     
    EDIT2:
    Audio works out of the box. 
     
    EDIT3:
    I now added following kernel modules to etc/modules (most of them are loaded on the android image too!):
    This should enable GPU HW acceleration, enables the touchscreen of the tablet and the touch keys.
     
    Touch key info:
    Scancodes:
    BACK: 10x02, 0x82
    HOME: ^[0x01, 0x81
    MENU: 20x03, 0x83
     
    Keycodes:
    BACK: 2
    HOME: 1
    MENU: 3
     
    EDIT4:
    Things I could not get to work:
    camera module (missing kernel module? gc030809 or wrong I2C address?)
    Volume HW keys.
     
    EDIT5:
    Cam somewhat works with cheese after changing gc030809 to gc0308 in script.bin (Yeah silly me, its because cheese tries to use OpenGL rendering.)
    Cam works pretty nice with mplayer, making fotos using fswebcam also works!
     
    EDIT6:
    I made working configurations for the armbian build system (files attached!).
     
    EDIT7:
    Configs are upstream, but not officially supported
     
    EDIT8:
    I am currently working on an tablet optimized image.
     
    Awesome how nearly everything worked out of the box! Armbian on this tablet outperforms the original android image by far!
    Moral of the story, check any old chinese tablets lying around and make them great again using linux
     
    script.bin
    linux-topwise-a721-default.config
    topwise-a721.fex
    topwise-a721.conf
  13. Like
    giri@nwrk.biz got a reaction from tkaiser in [Example] Support proposal for ROCK64   
    I use my OPiZ as portable handheld gaming console. No problem with AV out on small screens. (I guess my soul is not that poor then)
  14. Like
    giri@nwrk.biz reacted to rickgtx in PSA: Orange Pi Zero expansion board tv-out not working solution   
    I like to share my experiences with the orangepi zero with the expansion board.  First big thanks to giri@nwrk.biz for screen resolution fixes. 
     
    I have an old 13" NTSC TV (640x440).  My Value at address 0x1E00130 (0xb6f85130): 0x30050368. 
    To fit the xfce4 desktop on this TV, I had too set fb0_width = 620, fb0_height = 440, and tvout -m -x 100 -y 20 to center it.  This works on armbian Jessie, DietPi, and RetrOrangePi.
     
    I had problems with tvout on DietPi and RetrOrangePi not producing the desired effect but devmem2 0x01E00130 w 0x300F03CC always worked.  (Once using tvout to center on armbian I use devmem2 0x01E00130 to get  0x300F03CC on DietPi and RetrOrangePi)
     
    I had to set screen1_output_mode = 14 for NTSC in script.bin  I found, as did the OP, RaspberryPi video cable does not work.  But I had a Roku LT video cable that was fine,  The ground has to be on the sleeve not ring 2. I made no mods to the expansion board.
     
    Unfortunately, I got orangepi zero v1.4 board that has a defect that causes it to run 50% hotter than the other versions of the orangepi zero.  Mine idles around 70C and goes to 80C when doing anything.  Armbian constantly throttles opi down to 240Mhz to get to 68C.  I ordered a heat sink if the opizero lasts that long.
    Starting kernel ... [sun8i_fixup]: From boot, get meminfo: Start: 0x40000000 Size: 512MB ion_carveout reserve: 160m@0 256m@0 130m@1 200m@1 ion_reserve_select: ion chipid [0x2c00042! ion_reserve_common: ion reserve: [0x57e00000, 0x60000000]! Loading, please wait... [ 2.488304] thermal_sys: Critical temperature reached(110 C),shutting down Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems [ 3.022033] thermal_sys: Critical temperature reached(110 C),shutting down [ 3.145328] Power down.
     
  15. Like
    giri@nwrk.biz reacted to Igor in No network after upgrade to 5.30   
    Everything is solvable ... but we need more information to help. It might be a problem with u-boot. From where you did upgrade?
  16. Like
    giri@nwrk.biz got a reaction from RagnerBG in [Program] Move Composite AV Video Output to fix Overscanning   
    Hey folks!
     
    On monday I was able to fix the overscanning issue of my Orange Pi zero (read here).
    Because fiddling around with the register values can be pretty harsh some times I decided to created a small programm to move the picture of the composite video output. You can find the project page here: https://projects.nwrk.biz/projects/allwinner-tvout
     
    With this tool you can easily move the picture relative to its actual position by just calling :
    $ sudo tvout -m -x <value in px> -y <value in px>  
    To reset the position you can use:
    $ sudo tvout -r  
    I hope some of you may find this useful.
    If I have enough spare time i will add more features to this project (like changing the resolution, etc.). If you have any questions or ideas please feel free to tell me in this thread!

     
  17. Like
    giri@nwrk.biz got a reaction from RagnerBG in PSA: Orange Pi Zero expansion board tv-out not working solution   
    Yeah!! I managed to fix the overscanning issue!  (Credits go to this guy here for pointing me to the right direction!).
     
    All in all my Picture was Overscanning 20 px on every edge.
     
    At first I changed my resolution from the detected 720x576 to 680x536 (2 * -20 px = -40 px) in the script.bin. This results in an visible edge at the bottom of the screen and an visible edge on the right hand side (with a small black border!).
    $ bin2fex /boot/script.bin ~/script.fex $ nano ~/script.fex find these lines: fb0_width = 0 fb0_height = 0 and change them to: fb0_width = 680 fb0_height = 536 then: $ fex2bin ~/script.fex ~/script.bin $ sudo cp ~/script.bin /boot $ sudo reboot  
    Now the picture needs to be moved down and to the right by 40px to be fully visible!
     
    Next I needed to manipulate TV ENCODER RE-SYNC PARAMETERS REGISTER of the H2+ SoC. For this I used a little tool called devmem2 which helped me to directly read and write to the memory, and thus allowed me to manipulate the H2+ registers!
     
    devmem2 can be installed by using following commands:
    wget http://free-electrons.com/pub/mirror/devmem2.c gcc ./devmem2.c sudo mv ./a.out /usr/local/bin/devmem2  
    After Installing devmem2 I was able to shift the picture by manipulating the value on following Address: 0x01E00130! (=TV ENCODER RE-SYNC PARAMETERS REGISTER, this may differ depending on your SoC, check the Datasheet!)
    First I read back the actual value (so I could revert back changes in case I messed anything up!):
     
    $ sudo devmem2 0x01E00130 /dev/mem opened. Memory mapped at address 0xb6f0d000. Value at address 0x1E00130 (0xb6f0d130): 0x3005000A Now I was able to move the picture by writing a custom value to the register according to the R40 Datasheet: 
     
    TV ENCODER RE-SYNC PARAMETERS REGISTER Datasheet entry:
     
    Here is how I calculated this value with the help of the Datasheet:
    31 ... Re-Sync Field => 0b 
    30 ... Re-Sync Disable => 0b
    29:27 ... not used => 000b
    26:16 ... Vertical => 40d px => 0000101000b
    15:11 ... not used => 00000b
    10:0 ... Horizontal => 40d px => 0000101000b
     
    All in All: 000000000101000000000000101000b => 0x00140028
    So I used this command to set my display:
    $ sudo devmem2 0x01E00130 w 0x00140028 EDIT: I created a small tool which does the work above for you
     
    Finally I saved the command above in my rc.local file to shift the picture during boot.
    $ sudo nano /etc/rc.local paste following line: devmem2 0x01E00130 w 0x00140028 This is a dirty workaround and should be fixed within the driver!
     
    Pictures:
     
     
    Hope this helps to correct your overscanning issues! This should also work with many other Allwinner based Boards. I read that some Bananapi users had a pretty similar problem with overscanning on AV out.
  18. Like
    giri@nwrk.biz reacted to rodolfo in Upgrade Debian to Ubuntu? What to Backup?   
    Debian and Ubuntu are two entirely different distributions. While Debian is the foundation for free software and bound to stricter rules, Ubuntu is a commercialized spin-off prone to vendor lock-in and possibly abuse of free software.
    If you'd like to change to Ubuntu, my advice would be to start with a current download, for an upgrade to Debian stretch ( currently in testing, probably stable by the end of june ) you can follow Debian instructions for update/dist-upgrade.
    In any case image your existing installation so you can later mount it to recover settings etc. for your new system. Good luck.
     
    Personally I'd advise you to stay with Debian and avoid the bloat created by the offshot Ubuntu.
     
     
  19. Like
    giri@nwrk.biz got a reaction from rodolfo in Upgrade Debian to Ubuntu? What to Backup?   
    Puh, Debian or Ubuntu is a very ehtical Question.
     
    My (subjective) advice is: stay with Debian and upgrade to Debian testing (sid stretch). In my optinion Ubuntu is an commercialized Debian, it gets most of its packages from the Debian project and thus relies on the Debian package maintainers. If you keep Debian and change your Debian version to testing (change wheezy to sid stretch in your apt config file and use apt update, apt dist-upgrade) you will get updates much faster than with Ubuntu. 
     
    Debian testing can be described as a rolling release distro (like arch linux, but a little bit slower). I by myself use Debian testing on most of my PC's, Laptops and ARM boards and I am pretty happy with it.
     
    I know, this is not the 'stable' release of Debian, but in my opinion even the Debian 'unstable' distro is far away from being unstable
     
    Hope this helps,
    giri
  20. Like
    giri@nwrk.biz got a reaction from StuxNet in PSA: Orange Pi Zero expansion board tv-out not working solution   
    Yeah!! I managed to fix the overscanning issue!  (Credits go to this guy here for pointing me to the right direction!).
     
    All in all my Picture was Overscanning 20 px on every edge.
     
    At first I changed my resolution from the detected 720x576 to 680x536 (2 * -20 px = -40 px) in the script.bin. This results in an visible edge at the bottom of the screen and an visible edge on the right hand side (with a small black border!).
    $ bin2fex /boot/script.bin ~/script.fex $ nano ~/script.fex find these lines: fb0_width = 0 fb0_height = 0 and change them to: fb0_width = 680 fb0_height = 536 then: $ fex2bin ~/script.fex ~/script.bin $ sudo cp ~/script.bin /boot $ sudo reboot  
    Now the picture needs to be moved down and to the right by 40px to be fully visible!
     
    Next I needed to manipulate TV ENCODER RE-SYNC PARAMETERS REGISTER of the H2+ SoC. For this I used a little tool called devmem2 which helped me to directly read and write to the memory, and thus allowed me to manipulate the H2+ registers!
     
    devmem2 can be installed by using following commands:
    wget http://free-electrons.com/pub/mirror/devmem2.c gcc ./devmem2.c sudo mv ./a.out /usr/local/bin/devmem2  
    After Installing devmem2 I was able to shift the picture by manipulating the value on following Address: 0x01E00130! (=TV ENCODER RE-SYNC PARAMETERS REGISTER, this may differ depending on your SoC, check the Datasheet!)
    First I read back the actual value (so I could revert back changes in case I messed anything up!):
     
    $ sudo devmem2 0x01E00130 /dev/mem opened. Memory mapped at address 0xb6f0d000. Value at address 0x1E00130 (0xb6f0d130): 0x3005000A Now I was able to move the picture by writing a custom value to the register according to the R40 Datasheet: 
     
    TV ENCODER RE-SYNC PARAMETERS REGISTER Datasheet entry:
     
    Here is how I calculated this value with the help of the Datasheet:
    31 ... Re-Sync Field => 0b 
    30 ... Re-Sync Disable => 0b
    29:27 ... not used => 000b
    26:16 ... Vertical => 40d px => 0000101000b
    15:11 ... not used => 00000b
    10:0 ... Horizontal => 40d px => 0000101000b
     
    All in All: 000000000101000000000000101000b => 0x00140028
    So I used this command to set my display:
    $ sudo devmem2 0x01E00130 w 0x00140028 EDIT: I created a small tool which does the work above for you
     
    Finally I saved the command above in my rc.local file to shift the picture during boot.
    $ sudo nano /etc/rc.local paste following line: devmem2 0x01E00130 w 0x00140028 This is a dirty workaround and should be fixed within the driver!
     
    Pictures:
     
     
    Hope this helps to correct your overscanning issues! This should also work with many other Allwinner based Boards. I read that some Bananapi users had a pretty similar problem with overscanning on AV out.
  21. Like
    giri@nwrk.biz reacted to jernej in PSA: Orange Pi Zero expansion board tv-out not working solution   
    TV unit is described only in A10 and R40 datasheet. Even in those two datasheets some register descriptions are missing, but they should be enough. You can find them through linux-sunxi.org
  22. Like
    giri@nwrk.biz got a reaction from Igor in PSA: Orange Pi Zero expansion board tv-out not working solution   
    Yeah!! I managed to fix the overscanning issue!  (Credits go to this guy here for pointing me to the right direction!).
     
    All in all my Picture was Overscanning 20 px on every edge.
     
    At first I changed my resolution from the detected 720x576 to 680x536 (2 * -20 px = -40 px) in the script.bin. This results in an visible edge at the bottom of the screen and an visible edge on the right hand side (with a small black border!).
    $ bin2fex /boot/script.bin ~/script.fex $ nano ~/script.fex find these lines: fb0_width = 0 fb0_height = 0 and change them to: fb0_width = 680 fb0_height = 536 then: $ fex2bin ~/script.fex ~/script.bin $ sudo cp ~/script.bin /boot $ sudo reboot  
    Now the picture needs to be moved down and to the right by 40px to be fully visible!
     
    Next I needed to manipulate TV ENCODER RE-SYNC PARAMETERS REGISTER of the H2+ SoC. For this I used a little tool called devmem2 which helped me to directly read and write to the memory, and thus allowed me to manipulate the H2+ registers!
     
    devmem2 can be installed by using following commands:
    wget http://free-electrons.com/pub/mirror/devmem2.c gcc ./devmem2.c sudo mv ./a.out /usr/local/bin/devmem2  
    After Installing devmem2 I was able to shift the picture by manipulating the value on following Address: 0x01E00130! (=TV ENCODER RE-SYNC PARAMETERS REGISTER, this may differ depending on your SoC, check the Datasheet!)
    First I read back the actual value (so I could revert back changes in case I messed anything up!):
     
    $ sudo devmem2 0x01E00130 /dev/mem opened. Memory mapped at address 0xb6f0d000. Value at address 0x1E00130 (0xb6f0d130): 0x3005000A Now I was able to move the picture by writing a custom value to the register according to the R40 Datasheet: 
     
    TV ENCODER RE-SYNC PARAMETERS REGISTER Datasheet entry:
     
    Here is how I calculated this value with the help of the Datasheet:
    31 ... Re-Sync Field => 0b 
    30 ... Re-Sync Disable => 0b
    29:27 ... not used => 000b
    26:16 ... Vertical => 40d px => 0000101000b
    15:11 ... not used => 00000b
    10:0 ... Horizontal => 40d px => 0000101000b
     
    All in All: 000000000101000000000000101000b => 0x00140028
    So I used this command to set my display:
    $ sudo devmem2 0x01E00130 w 0x00140028 EDIT: I created a small tool which does the work above for you
     
    Finally I saved the command above in my rc.local file to shift the picture during boot.
    $ sudo nano /etc/rc.local paste following line: devmem2 0x01E00130 w 0x00140028 This is a dirty workaround and should be fixed within the driver!
     
    Pictures:
     
     
    Hope this helps to correct your overscanning issues! This should also work with many other Allwinner based Boards. I read that some Bananapi users had a pretty similar problem with overscanning on AV out.