LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 02-15-2019, 05:18 PM   #31
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,478

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Arrow headless use


So how in the world do you use an computer that has no video output device?

You VNC in and out of it.

How?

file: /etc/X11/xorg.conf.d/10-libvnc.conf
Code:
# This file contains configuration of libvnc.so module
# Source: http://pkgs.fedoraproject.org/cgit/tigervnc.git/plain/10-libvnc.conf
#
# To get libvnc.so module working, do this:
# 1. run "vncpasswd" as root user
# 2. uncomment configuration lines below
#
# Please note you can specify any option which Xvnc accepts.
# Refer to `Xvnc -help` output for detailed list of options.

Section "Module"
    Load "vnc"
EndSection

Section "Screen"
    Identifier "Screen0"
    DefaultDepth 16
    Option "SecurityTypes" "VncAuth"
    Option "PasswordFile" "/root/.vnc/passwd"
EndSection
And on the other side you TigerVNC into it by entering it's IP

Now you can set up many and wast things that can only be solved on X...

In the following replays i plan to publish the LCD config and the remaining tools used in rc.local
 
Old 02-16-2019, 06:03 AM   #32
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,478

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Arrow let it shine

the SPI connected tiny adafruit/sainsmart compatible LCD need the following X config:

file: /etc/X11/xorg.conf.d/10-opi.conf
Code:
Section "Device"
    Identifier "SPI_fb"
    Driver "fbdev"
# options : CW CCW and UD
    Option "rotate" "UD" #upside down
    Option "fbdev" "/dev/fb0"
EndSection

Section "Monitor"
    Identifier "Tiny_LCD"
# overblown in [mm] for 50DPI
    DisplaySize 80 64
#    UseModes "160x128"
    Option "DPMS" "false"
EndSection

Section "Screen"
    Identifier  "My Screen"
    Device      "SPI_fb"
    Monitor     "Tiny_LCD"


    DefaultDepth 16

    Subsection "Display"
    Depth       16
    Virtual 160 128
#    Viewport 160 128
    Modes "160x128"
    EndSubsection

EndSection
next to it i have also: 00-ServerFlags.conf
Code:
Section "ServerFlags"
# GPS should always run the screen:
    Option      "NoPM"        "true"
    Option      "blank time"    "0"
    Option      "standby time"  "0"
    Option      "suspend time"  "0"
    Option      "off time"      "0"
EndSection
To prevent any accidental blanking. Furthermore i have the xscreensaver package completely removed as well.

...to be continued
 
Old 02-16-2019, 06:22 AM   #33
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,478

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Arrow the missing link of Debian

there is one more ingredient left:
con2fbmap

find the fbset cource code and put the following slackbuild right next to the "debian" folder:

file: con2fbmap.SlackBuild
Code:
srcdir=$(pwd)
pkgdir=/

cd "${srcdir}"
patch -i debian/patches/03_con2fbmap.patch
gcc con2fbmap.c -o con2fbmap

install -Dm755 con2fbmap ${pkgdir}/usr/local/bin/con2fbmap
and fiddle with it until it works, or, run the listed commands by hand

Feedback would be highly welcome

Now i'm out to try make some photos of this all :^]

Last edited by SCerovec; 02-16-2019 at 06:23 AM. Reason: typo
 
Old 02-19-2019, 02:51 PM   #34
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,478

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Lightbulb

Gallery on imgur
I plan to replace the 5V 5A SBEC with an single cell boost converter (1S -> 5V 2A) and still use two 18650 cells but then switched in parallel.

Also i plan to duct the light from the two LEDs properly to the side light duct.

Then i will check why the pi won't boot each time its switched on - does it need switch de-bounce or brown out prevention?

Further I plan to replace the wireless keyboard with a WiFi dongle for remote ssh and VNC access

Enjoy
 
1 members found this post helpful.
Old 02-27-2019, 04:12 AM   #35
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,478

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Exclamation

A big caveat for eventual kernel upgrade:

All of sudden the display stopped working - had to enable the SPI in the device tree. Luckily i had a dtedit wrapper i intend to post yet.

I found this out only after going thru numerous loops of editing the boot environment and kernel commandline to no avail.

I find that the process of tweaking the dtb/dts files is quite simpler when using this wrapper.

Stay tuned for the bootedit script
 
Old 02-27-2019, 04:42 AM   #36
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,478

Original Poster
Blog Entries: 2

Rep: Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982Reputation: 982
Post

file:/usr/local/sbin/bootedit
Code:
#!/bin/sh

#wrapper for editing /boot.src
# ISC apply - support on Linuxquestions.org for Slackware ARM
# author: cest73@ya.ru
# version V1.2
# file /usr/local/sbin/bootedit
#

Editor="$(which vi)"
Converter="$(which mkimage)"
pars='-vC none -A arm -T script'
tgt='boot.scr'
src='boot.cmd'
bootdir='/boot'

if [[ -d $bootdir ]]; then
  cd $bootdir
else
  echo "Wrong (?) bootdir defined, aborting!"
  exit 2
fi

if [[ -x ${Editor} ]] ; then
if [[ -x ${Converter} ]] ; then
 if $Editor ${src}
   then echo "$Converter ${pars} -d ${src} ${tgt}"
   $Converter ${pars} -d ${src} ${tgt}
 fi
else
echo "converter [${Converter}] not found! aborting."
exit 2
fi
else
echo "editor [${Editor}] not found! aborting."
exit 2
fi
echo "done."
file:/usr/local/sbin/dtedit
Code:
#!/bin/bash

# cest73@ya.ru under ISC license for Slackware-current 2017 onward
#
EDITOR="/usr/bin/mcedit -S gotar" # gotar is a skin of mc ;-)
#EDITOR="/usr/bin/vi"

filter=$1

case $filter in
"-h"|*usage|*help|"-?")
  echo "Usage:"
  echo "dtedit [regexp]"
  echo
  echo "Edit one of the dts files as dtb and store back as dts"
  echo "Filer the list with optional [regexp] like 'sun8' or 'zero'"
  echo "without quotes:"
  echo
  echo "dtedit zero"
  echo "help keys: '-?','-h','--help','usage'"
  echo "happy hacking!"
  exit 0
esac
#we rely on symlink here:
kver="dtb"

dt_path='/boot'

cd $dt_path

configs=$(ls ${kver} | grep ".dtb" | grep "${filter}" | awk -F.dtb '{print $1 " " $1 }')

if [[ "X$configs" == "X" ]]; then
  echo "filter ["$filter"], you provided, yileded no results in ["$dt_path"/"$kver"/*.dtb]."
  echo "Please retry."
  exit 2
fi

dialog --backtitle "Board selection list, cancel to abort" --no-tags --menu "Boards to pick from:" 0 0 12 ${configs} 2>/dev/shm/result

selection=$(cat /dev/shm/result)
echo "our target is: ["$selection"]"

if [[ "X$selection" == "X" ]]; then
  echo "exiting due to user cancels"
  exit 1
fi

dtb_file="${dt_path}/${kver}/${selection}.dtb"
back_file="${dt_path}/${kver}/${selection}.dtb.orig"
dts_file="${dt_path}/${kver}/${selection}.dts"
edited_file="/tmp/${selection}.dts"

ls $dtb_file
rm -v $dts_file
rm -v $edited_file

dtc -W no-unit_address_vs_reg -I dtb -O dts $dtb_file -o $edited_file

$EDITOR $edited_file

dtc -W no-unit_address_vs_reg -O dtb -I dts $edited_file -o $dtb_file
Code:
# dtedit orangepi
... and pick my exact version listed from the /boot/ dir. after editing the instant i leave the editor the file gets saved and generated.
All that is left to do is to reboot - maybe it could be possible to force the change in runtime - but i had no interest in that (yet).
I had picked vi for the editor (free choice) because it is complying with most adverse terminal environments - despite i like mcedit more - as soon as i could i opted back for mcedit - maybe nano could be good there too.
 
  


Reply

Tags
arm, gps, howto, orange pi zero



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Wireless crazed Orange Pi boasts 4G LTE, WiFi, BT, FM, and GPS LXer Syndicated Linux News 0 03-23-2018 05:10 PM
LXer: Orange Pi Zero Overview LXer Syndicated Linux News 0 04-04-2017 03:12 AM
LXer: $10 Orange Pi One pits quad-core Cortex-A7 against Pi Zero LXer Syndicated Linux News 0 01-29-2016 02:33 PM
LXer: Canonical's cloud-in-a-box: The Ubuntu Orange Box LXer Syndicated Linux News 0 05-19-2014 12:00 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 05:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration