Slarm64 on Pinebook [Slackware Arm - 64 bit]
#8
Alright, here we go... I was finally able to clear up some spare time in my crazy schedule to put together a slimmed down Xfce image.  I also ran through a typical setup process (including Pinebook specifics) and was able to jot down some notes this time.  

For starters, here is an SD card image that has X and Xfce, but I left out KDE and the Development package series, plus a few other things not needed on arm boards (such as Grub and LiLo).

https://3space.xyz/pineslarm/slarm64-cur...81b.img.xz

https://3space.xyz/pineslarm/slarm64-cur...img.xz.md5


After writing this out to an SD card, here are my notes:

boot....
wait....
the boot scripts resize the partition and do a few other first-boot things such as create fresh ssh keys.

watch messages for errors, eventually you wind up at a login prompt.

login, follow the script to create a new user.

Then, issue these commands:

Code:
passwd
change the root password

Code:
netconfig
it is recommended to use NetworkManager, but feel free to experiment here.

Code:
reboot
the easiest way to get changes to take, can also restart services


login as new user, then:

Code:
xwmconfig
choose xfce if you are feeling conservative, anything else if more daring


Code:
startx
set up Xfce however you like it.

Here is a quick screen brightness trick:

add to the panel the Power Manager plugin.  Through this you can conrtol screen brightness.  Script comes later.

connect to WiFi using the networkmanager-applet plugin in the taskbar.

open terminal


Code:
su

slackpkg update
slackpkg upgrade-all
slackpkg install-new


now you can add/remove packages/package sets as you see fit.

For example, I left out the Development package set "d" from the Xfce image.

install the entire Development package set using:

Code:
slackpkg install d 
(you can deselect specific packages too)

Best way to explore the packages is to look through PACKAGES.TXT

For other Slackware-specific issues, best to search on LQ or read the docs/man pages.

One of the nicest things about Slackware is the vanilla approach.  Most packages are as the author intended, so you can just read the help pages for that specific command or package from any upstream resource and it usually applies well.

~~~~~~~
 
Pinebook Specifics.....

WiFi power settings (from https://github.com/anarsoul/linux-build)

Code:
echo 'options 8723cs rtw_power_mgnt=0' >/etc/modprobe.d/8723cs.conf


Brightness script (from this forum somehwere, can't quite recall)

Code:
#permission fixes for lcd brighness script
/usr/local/bin/pinebook_lcd-brightness.sh -b &&
chown root:gpio /sys/class/backlight/backlight/actual_brightness /sys/class/backlight/backlight/max_brightness /sys/class/backlight/backlight/brightness &&
chmod 664 /sys/class/backlight/backlight/actual_brightness /sys/class/backlight/backlight/max_brightness /sys/class/backlight/backlight/brightness &&

 Those just set the stage.  I put that in my rc.local (more on that later).  Then you can run this script:


Code:
#!/bin/bash

# Helper script for Pinebook mean to be used in conjunction with xbindkeys
# Written 2017 Peter Feerick, GPLv3 licensed.
#
# Documentation for this script on GitHub
# https://github.com/pfeerick/pine64-scripts/wiki/Pinebook-LCD-Brightness-script

# Switch paths to twiddle depending on whether sunxidrm active or not
if [ -d /sys/module/sunxidrm ]; then
 ACTUAL_BRIGHTNESS_PATH="/sys/devices/platform/sunxi-drm/backlight/lcd0/actual_brightness"
 MAX_BRIGHTNESS_PATH="/sys/devices/platform/sunxi-drm/backlight/lcd0/max_brightness"
 BRIGHTNESS_PATH="/sys/class/backlight/lcd0/brightness"
else
 ACTUAL_BRIGHTNESS_PATH="/sys/class/backlight/backlight/actual_brightness"
 MAX_BRIGHTNESS_PATH="/sys/class/backlight/backlight/max_brightness"
 BRIGHTNESS_PATH="/sys/class/backlight/backlight/brightness"
fi

# Check if required access permissions are available...
if [ ! -r ${ACTUAL_BRIGHTNESS_PATH} ] || [ ! -r ${MAX_BRIGHTNESS_PATH} ] ||  [ ! -w ${BRIGHTNESS_PATH} ]; then
 echo "This script doesn't have the necessary permissions to read or change the LCD brightness!"
 echo "Changes to permisisons or running as a root user is required."
 exit 1
fi

MINIMUM_BRIGHTNESS=1
MAXIMUM_BRIGHTNESS=$(<${MAX_BRIGHTNESS_PATH})
ACTUAL_BRIGHTNESS=$(<${ACTUAL_BRIGHTNESS_PATH})

while getopts ":i:d:s:vb" opt; do
 case $opt in
   i)
     NEW_BRIGHTNESS=$((ACTUAL_BRIGHTNESS + $OPTARG))
     echo "Increase the LCD backlight brightness by $OPTARG to $NEW_BRIGHTNESS"
     ;;
   d)
     NEW_BRIGHTNESS=$((ACTUAL_BRIGHTNESS - $OPTARG))
     echo "Decrease the LCD backlight brightness by $OPTARG to $NEW_BRIGHTNESS"
     ;;
   s)
     NEW_BRIGHTNESS=$OPTARG
     echo "Set the lcd backlight brightness to $OPTARG" >&2
     ;;
   v)
     echo "Minimum brightness: $MINIMUM_BRIGHTNESS, Maximum: $MAXIMUM_BRIGHTNESS"
     ;;
   b)
     chown root:gpio ${ACTUAL_BRIGHTNESS_PATH} ${MAX_BRIGHTNESS_PATH} ${BRIGHTNESS_PATH}
     chmod 664 ${ACTUAL_BRIGHTNESS_PATH} ${MAX_BRIGHTNESS_PATH} ${BRIGHTNESS_PATH}
     exit 0
     ;;
   \?)
     echo "Invalid option: -$OPTARG" >&2
     exit 1
     ;;
   :)
     echo "Option -$OPTARG requires an argument." >&2
     exit 1
     ;;
 esac
done

#no arguments, display current value only
if [ $# -eq 0 ]; then
   echo "Current backlight brightness: $ACTUAL_BRIGHTNESS"
   exit 0
fi

#if we've gotten this far, sanity check setting and apply
if [ ! -z ${NEW_BRIGHTNESS} ]; then
 if [[ ${NEW_BRIGHTNESS} != ?(-)+([0-9]) ]]; then
   echo "Integer input expected. '$NEW_BRIGHTNESS' is NOT an integer!"
   exit 1
 fi

 if [ ${NEW_BRIGHTNESS} -lt ${MINIMUM_BRIGHTNESS} ]; then
    echo "Below mimimum brightness threshold"
    exit 1
 fi

 if [ ${NEW_BRIGHTNESS} -gt ${MAXIMUM_BRIGHTNESS} ]; then
   echo "Above maximum brightness threshold"
   exit 1
 fi

 echo  ${NEW_BRIGHTNESS} > ${BRIGHTNESS_PATH}
fi

 as such, to increase or decrease brightness (and bind these to key combinations eventually):

To increase:
Code:
./pinebook_lcd-brightness.sh -i 1

To decrease:
Code:
./pinebook_lcd-brightness.sh -d 1


The internal speakers are muted by default.  You can unmute them using alsmixer, or just run:

Code:
/usr/bin/amixer -c 0 set 'DAC Mixer AIF1 DA0' unmute

That is another good one for the rc.local script.

I think that is about it for Pinebook fixes.  If I think of anything I left out, I will make another post.

If you want to write your SD image to the eMMC:

-----

installation on a eMMC (for pinebook)
   Flash the image to micro SD, then copy the .img file to micro SD filesystem.
   Power up the board with micro SD and login.
   Run below command for flashing to eMMC module
       >>dd if=slarm64-current-*-base-rootfs-*-build-*.img of=/dev/mmcblk2 bs=1M
           example : dd if=slarm64-current-*-xfce-rootfs-*-build-*.img of=/dev/mmcblk2 bs=1M
       then edit 2 files in eMMC module:
       >> mount /dev/mmcblk2p1 /media
       >> echo "rootdev=/dev/mmcblk2p1" >> /media/boot/uEnv.txt
       >> sed -i 's:mmcblk1p1:mmcblk2p1:' /media/etc/fstab
   After done, power off board and remove micro SD. Then bootup with only eMMC module.

~~~~~~~~~~~

Building packages:

I suggest using sbopkg, but other tools are available.

Then you can build most of what is available at SlackBuilds.org

You need to use Ponce's repo for -current:

https://github.com/Ponce/slackbuilds/wik...ith-sbopkg

most work as-is, only a few need tweaking, we can talk about specific scripts in other threads or posts.

Here is a directory of my builds, most of which work (some are experimental)

https://3space.xyz/pineslarm/packages/

Packages of note:

LibreOffice
JWM
SMPlayer
mpv
etc....

~~~ 

By this point you are deep into the rabbit hole.

Here is my rc.local, just to show you what gets run at every boot:


Code:
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

#permission fixes for lcd brighness script
/usr/local/bin/pinebook_lcd-brightness.sh -b &&
chown root:gpio /sys/class/backlight/backlight/actual_brightness /sys/class/backlight/backlight/max_brightness /sys/class/backlight/backlight/brightness &&
chmod 664 /sys/class/backlight/backlight/actual_brightness /sys/class/backlight/backlight/max_brightness /sys/class/backlight/backlight/brightness &&

## Turn up the lights
echo 8 >/sys/class/backlight/backlight/brightness &&

## NTP works better after a restart
/etc/rc.d/rc.ntpd restart &&

# Unmute internal speakers
/usr/bin/amixer -c 0 set 'DAC Mixer AIF1 DA0' unmute &

# enable kernel polling for proper autodetection of removable devices
echo 5000 > /sys/module/block/parameters/events_dfl_poll_msecs

exit 0



Custom personal tweaks:  I turn off some of the daemons that I do not use (experimental, some of these might be needed):

rc.cgmanager
rc.cgproxy
rc.consolekit
rc.cpufreq
rc.inet1
rc.mcelog
rc.nfsd
rc.rpc
rc.samba
rc.wireless

these are all located at /etc/rc.d/, and to turn them off you just make them non-executable.

Now I can boot to a graphical desktop (in my case, JWM) and connect to the Internet while using less than 150MB of RAM.  Nice.

Have fun....
  Reply


Messages In This Thread
RE: Slarm64 on Pinebook [Slackware Arm - 64 bit] - by KRT - 03-31-2020, 04:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  DietPi OS for Pinebook MichaIng 3 6,936 03-11-2024, 05:02 PM
Last Post: oxoocoffee
  Broke pinebook GUI, what to do, fix or install new? acruhl 2 1,546 07-13-2023, 05:43 PM
Last Post: acruhl
  Orignal PineBook jwp1000 1 1,164 07-10-2023, 07:44 AM
Last Post: tophneal
  Pinebook no longer boots rjtanner 12 5,653 04-13-2023, 01:09 PM
Last Post: tophneal
  Stock Debian on original Pinebook moonwalkers 1 3,750 01-29-2022, 10:37 PM
Last Post: cel
  Write image to eMMC - Pinebook 11.6" irongarment 4 4,700 01-04-2022, 09:22 PM
Last Post: irongarment
  E: The repository 'http://pinebook.kde.org.uk bionic Release' no longer has a Release pixelpaperyarn 3 5,918 05-07-2021, 10:20 AM
Last Post: tophneal
  pinebook.kde.org.uk no longer has release file?? supermassive 1 4,217 01-20-2021, 11:18 AM
Last Post: tophneal
Question Ran apt update on my Pinebook.. ford442 0 3,128 12-25-2020, 04:40 PM
Last Post: ford442
Information Manjaro ARM for Pinebook erchache2000 88 127,781 11-29-2020, 04:36 PM
Last Post: Mr.Fermer

Forum Jump:


Users browsing this thread: 9 Guest(s)