Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Alpine Linux RPI as a test build for arm

Sun Nov 10, 2013 9:42 pm

Distro's based on musl or uclibc are considerably faster than distro's based on eglibc or glibc.
Who knows ? Alpine Linux might perhaps come to RPI if we give it some attention ......?

http://dev.alpinelinux.org/~tteras/alpi ... rpi.tar.gz
Some more info:
http://lists.alpinelinux.org/alpine-devel/3278.html

I dove a little in this test build for arm on the RPI.

Booting up gave some errors about not finding the hardware clock (sounds most logic) but it further seems to boot up fine.
Login: root
No password so press: enter

First things to do is:
# setup-alpine
The setup is not error free but passes all questions.
If it eventually finally asks for the disk to install on. Choose: none
It will then ask where the configuration files and cache must reside. Choose: mmcblk0p1
All downloaded apk's will now be saved in this cache and evt. auto installed if you boot up next time.

# vi /etc/apk/repositories
Change "edge" in "edge-musl" here so that it will e.g. look like:

/media/mmcblk0p1/apks
http://nl.alpinelinux.org/alpine/edge-musl/main
http://nl.alpinelinux.org/alpine/edge-musl/testing

All changes in /etc will be saved on your sd-card in the xx.apkovl.tar.gz if you do a
# lbu commit
lbu --help will give you more info about saving changes

Now update the db:
# apk update
And do some installs:
# apk add htop links nano

I personaly used links to surf the rootfs as a kind of file manager by leaving the url blanc and just press enter.
Directory structures and text files are easily viewed this way.

Great wonder was wether I could get a desktop ?!
So I installed xorg-server for vesa and fbdev but this seemed no way to go.
Xfbdev gave more results:
# apk add xfbdev jwm lxterminal xkbcomp xkeyboard-config ttf-freefont

With the following script I could get a jwm desktop and lxterminal:

Code: Select all

export DISPLAY=:0
Xfbdev :0 -screen 1024x768 -keybd evdev,,device=/dev/input/event2 -mouse evdev,,device=/dev/input/event0 &
sleep 1
DISPLAY=:0 jwm &
DISPLAY=:0 lxterminal &
Resolution can also be changed in cmdline.txt by appending e.g. bcm2708_fb.fbwidth=800 bcm2708_fb.fbheight=600 to the
commandline.

Whatever I tried I could not get a keyboard or mouse working. Couldn't find driver evdev though lsmod gave up evdev was loaded .......
Also xinit and/or the xorg mouse and keyboard drivers didn't work for me. I also found that Xfbdev was probably not compiled with kdrive's mouse and keyboard option too .........Had to kill Xfbdev with crtl+alt+f2 and htop every time.

So I tried to install the compiling environment which is also supplied.
Here we have the problem that Alpine now runs in too little ram.
You should do a "sys" install which, hopefully, will prevent this lack of space.
But if I ran setup-alpine again to do this "sys" install it finally stopped missing syslinux which (of course) isn't in the repos.

Final thoughts:
Some rewrite of the setup-* files; initrd (rtc clock); /etc/apk/repositories and a working mouse/keyboard for the desktop
seem to be the first things to welcome.
But this first try for arm didn't disappoint at all. It was booting and keeping the changes pretty well if you don't forget a "lbu commit"
Hoping one day Alpine Linux will come through and true for the RPI !

Friendly Greetings, Compact

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Thu Dec 05, 2013 1:47 pm

Phoe. I'm really disappointed there are so little reactions here for Alpine Linux which could become the fastest Linux (Desktop) OS for the RPI.

Hope my "art of writing" is not the cause ........

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26671
Joined: Sat Jul 30, 2011 7:41 pm

Re: Alpine Linux RPI as a test build for arm

Thu Dec 05, 2013 2:03 pm

Have you any figures for whether it is actually faster? If there is little or no benefit to it I can see why people may not be interested - the difficulty in supporting a complete distro is well known.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Thu Dec 05, 2013 11:30 pm

Sorry. Little figures but more experience.
Some figures and explanation here:
http://www.raspberrypi.org/phpBB3/viewt ... 53&t=16511

An extract:
--------------------------------------------------
Here are some distro's I compared and the minimal memory they need for still giving you a desktop (without nearly anything running!):
Puppy: 80Mb
Debian 6.03 standard: 64Mb
AntiX: 64Mb
Connochaet: 64Mb
Tiny Core Linux: 48Mb
Slitaz LowRam-CD: 48Mb
Alpine Linux: 28Mb (still able to open and run mc and more !)
Delicate: 16Mb (unable to open xterm)
------------------------------------------------------

I have compiled rpi-buildroot which is based on uclibc.
http://guillermoamaral.com/read/rpi-buildroot/
This distro has already booted when my monitor still needs to turn on !
But the packages are too limited although a desktop is well possible.
Pacman or alike would be very welcome here for cross-compiling.

Alpine Linux Arm is based on musl wich is comparable with uclibc qua speed and memory consumption.
Alpine Linux has many more packages than rpi-buildroot and has apk as package manager.
You can even install abuild or pacman to native build your own packages.

The above RPI version is only a testbuild for arm, what means that the developers might turn their attention to another device.
So I hope that a few people, more than limited me, will give it some attention too.

Friendly Greetings, Compact

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Sun Jul 20, 2014 10:30 am

Alpine-RPI update.

There were 2 updates for Alpine-RPI.
http://dev.alpinelinux.org/~tteras/alpi ... rpi.tar.gz
http://dev.alpinelinux.org/~tteras/alpi ... rpi.tar.gz

I once had Xorg (setup-xorg-base) running and a JWM desktop, with a working mouse and keyboard, with one of these updates although the fonts seemed a bit blurry .......
But packages do seem to change and so do the paths of the repositories.
http://nl.alpinelinux.org/alpine/edge/main/armhf/
http://nl.alpinelinux.org/alpine/edge/testing/armhf/

So for now I couldn't reproduce the JWM desktop.
Apparently much didn't change since my first post here for the exception that there seem more packages available (eg. midnight commander, a working omxplayer, QT .......). Unfortuneatly I still know too less what can be done with QT in these releases ? This needs more study from my side. Answers are welcome.

Still wondering why there seems so little interest in Alpine ............ ?????
At least we could do some more debugging here ??
I'm really too limited for that.

Friendly Greetings, Compact

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Wed Aug 06, 2014 11:11 am

I'm really afraid we are might miss a great opportunity for the RPI with Alpine linux.
Already read somewhere, from the Alpine devellopers, armv7 is more common to devellope for.
It would really be a pity for the RPI if the develloppement of Alpine would only go direction armv7.
So again, for me, it is not sure at all that devellopement for RPI will continue.
As far as I understand these images are only testbuilds for ARM. Not nessesarily meaning that the final product
will become available for armv6/rpi.

For the moment, and as far as I know, Alpine is the only decent and rather complete working (desktop) OS based
on musl or uclibc that might become a reality for the RPI. These musl and uclibs distro's really performed the best
qua speed on my pentium 1 233Mhz computers. And so did Firefox ! And I really compared quite a lot of distro's
qua speed on low i586 specified machines. Please correct me if I'm wrong, but this must be the same for the RPI ?
So, again, please give Alpine for RPI some more attention than limited me.
If we also help, at least a little, this perhaps could make a difference ....... ?

Or do you want me to stop my yearnings ?
Am I really nearly on my own here ??

Friendly Greetings, Compact

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Wed Oct 29, 2014 7:21 pm

Thanks to all who didn't want to stop my yearnings :D

A new testbuild for Alpine-rpi (short: Alpi ?) has been released on 03 october 2014.

http://dev.alpinelinux.org/~tteras/alpi ... rpi.tar.gz

Thank you very much Timo Teras for all your work !

I managed to do a "sys" install and do a setup for compiling (musl !!) on the RPI in 3 steps.
The former blurryness is vanished with adding:
framebuffer_depth=16 to config.txt
A RPI model B is used.

Got Xfbdev (xorg-server) recompiled for mouse and keyboard support. Found Xorg itself and LXDE slower compared to Xfbdev and JWM on Alpine. The last are really flashing ! Could even compile Netsurf-fb version 3.2 ! And Midnight Commander for better mouse (gpm) support. Got Firefox, PCManFM, Gimp, etc. etc. running without recompiling. It was not all without errors and reproducing a LXDE desktop seems cumbersome. But here is also my lack of knowledge and probably there are also some missing dependencies. E.g. MC doesn't run well without installing Htop ?? But all in all Alpine Linux seems very promissing for the RPI !
If you want to install testing packages remove mark # in /etc/apk/repositories

If someone is interested here under are the steps I made to setup for compiling. Install only takes a few minutes but is highly dependent on your internet speed. Don't worry about the many many error messages about the hardware clock; sys/extlinux and modules not found for they don't seem to do any harm. Although some scripting here would be highly appreciated.

I started with first making a fat partition (mmcblk0p1) big enough to hold the files in alpine-edge-141003-armhf.rpi.tar.gz.
On the rest of the sd-card I made a ext4 partition (mmcblk0p2)(formatted without journal).
Copied step1 to mmcblk0p1 and step2+3 to mmcblk0p2
After booting (root:no password) I ran step1 (but you might first read behind #):

cd /media/mmcblk0p1
./step1

Code: Select all

# During setup-alpine be sure to choose [none] for where the apk-cache and config-files must reside
setup-alpine
mount /dev/mmcblk0p2 /mnt
setup-disk -m sys -k rpi /mnt
echo "--------------------"
echo "Content of mmcblk0p2"
echo "--------------------"
ls /mnt
umount /mnt
mount -o remount,rw /dev/mmcblk0p1 /media/mmcblk0p1
umount /.modloop
mkdir /media/mmcblk0p1/org
mv /media/mmcblk0p1/apks /media/mmcblk0p1/org
mv /media/mmcblk0p1/config.txt /media/mmcblk0p1/org
mv /media/mmcblk0p1/cmdline.txt /media/mmcblk0p1/org
mv /media/mmcblk0p1/initrd.gz /media/mmcblk0p1/org
mv /media/mmcblk0p1/rpi.modloop.squashfs /media/mmcblk0p1/org
echo "framebuffer_width=800
framebuffer_height=600
framebuffer_depth=16
cmdline=dwc_otg.lpm_enable=0 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" > /media/mmcblk0p1/config.txt
sync
echo "--------------------"
echo "Content of mmcblk0p1"
echo "--------------------"
ls /media/mmcblk0p1
echo "----------------------------------------------------"
echo "All Done ! You can reboot now and advance with step2"
echo "----------------------------------------------------"
# reboot
login: root
cd /
chmod 755 step2
chmod 755 step3
./step2

Code: Select all

# Sudo is,among others. needed for auto dependency install if you are compiling
adduser alpine
apk add sudo
echo "alpine ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
echo "--------------------------------------------------------------------"
echo "Please reboot or exit and login as user alpine to advance with step3"
echo "--------------------------------------------------------------------"
login: alpine
cd /
./step3

Code: Select all

# Login as user alpine and setup for compiling
sudo apk add alpine-sdk git pacman flex bison mc htop
cd /home/alpine
git clone git://dev.alpinelinux.org/aports
sudo addgroup alpine abuild
sudo chgrp abuild /var/cache/distfiles
sudo chmod g+w /var/cache/distfiles
abuild-keygen -a -i
echo "-----------------------------------------------------"
echo "Please sudo reboot now and login as user: alpine"
echo "Enter /home/alpine/aports and search for your package"
echo "Enter the package dir and compile it with abuild -r"
echo "-----------------------------------------------------"
For me Alpine Linux has great advantages compared to uclibc-buildroot:
- first of all I think the Alpine devellopers had good reasons to switch from uclibc to musl.
- the makefiles of uclibc-buildroot are rather limited compared to the already made Alpine packages
- You have abuild and pacman at hand with a whole region of ready made apkbuild's and pkgbuild's. In uclibc-buildroot you
have to create the (for me rather nasty) makefiles yourself for every package you are missing.
- With Alpine Linux you can compile on the RPI itself. With uclibc you must always cross-compile which is more complicated
and you always need an extra computer. Compiling on the RPI takes some more time but is very well doable for some single
packages you might need; want or change.

As always: comments are welcome 4 I still have very much to learn !

Friendly Greetings, Compact

Laurentius1977
Posts: 2
Joined: Sat Dec 20, 2014 8:39 pm

Re: Alpine Linux RPI as a test build for arm

Sat Dec 20, 2014 8:46 pm

Hello Compact,

I downloaded the last version of Alpine Linux for RPi (that from December - 3.1.0).
I tried to run your scripts in order to have a build environment but I noticed that some things are changed.
Can you please update your scripts with the last changes?
You will be on a great help for people that want to compile apks for Rpi (like me ;) )
Thank you a lot!

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Tue Dec 23, 2014 10:17 pm

First Stable Version: Alpine-RPI v3.1.0

The first stable release (alpine-rpi-3.1.0-armhf.rpi.tar.gz) is online since 10 dec 2014.
http://alpinelinux.org/downloads/
Compared with the test builds not so much seem to have changed qua errors.

These errors don't seem to do any harm though.
The test builds were already pretty stable.
So, for me, there don't seem any great differences except for some filename changing and
the announcement of an official stable release ?

@ Laurentius1977 . Only step 1 had to be changed a little bit for v3.1.0:

Code: Select all

# During setup-alpine be sure to choose [none] for where the apk-cache and config-files must reside
setup-alpine
mount /dev/mmcblk0p2 /mnt
chmod 755 /mnt/
chown root:root /mnt/
apk add acct
setup-disk -m sys -k rpi /mnt
echo "--------------------"
echo "Content of mmcblk0p2"
echo "--------------------"
ls /mnt
umount /mnt
mount -o remount,rw /dev/mmcblk0p1 /media/mmcblk0p1
umount /.modloop
mkdir /media/mmcblk0p1/org
mv /media/mmcblk0p1/apks /media/mmcblk0p1/org
mv /media/mmcblk0p1/config.txt /media/mmcblk0p1/org
mv /media/mmcblk0p1/cmdline.txt /media/mmcblk0p1/org
mv /media/mmcblk0p1/initramfs-rpi /media/mmcblk0p1/org
mv /media/mmcblk0p1/modloop-rpi /media/mmcblk0p1/org
echo "disable_splash=1
boot_delay=0
kernel=vmlinuz-rpi
# initramfs initramfs-rpi 0x00a00000
framebuffer_width=800
framebuffer_height=600
framebuffer_depth=16
cmdline=BOOT_IMAGE=/vmlinuz-rpi dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext4 rootwait quiet" > /media/mmcblk0p1/config.txt
# alpine_dev=mmcblk0p1 quiet
sync
echo "--------------------"
echo "Content of mmcblk0p1"
echo "--------------------"
ls /media/mmcblk0p1
echo "----------------------------------------------------"
echo "All Done ! You can reboot now and advance with step2"
echo "----------------------------------------------------"
# reboot

You can change /etc/apk/repositories to your own need. There are 4 repo's now if you include edge and testing.

Thank you for your interest.

Friendly Greetings, Compact

Laurentius1977
Posts: 2
Joined: Sat Dec 20, 2014 8:39 pm

Re: Alpine Linux RPI as a test build for arm

Thu Dec 25, 2014 11:02 am

Thank you a lot.
I already used the developer environment created with your scripts, for this I used the version from October.
All the compiled apks worked for 3.1 version.
But now I will setup the new environment.
I love Alpine Linux, I find it the best distro in the world because in what I'm doing with it I'm not even interested in using X, just command line.

Have a great new year!

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Fri Dec 26, 2014 2:13 am

Thanks for your positive reply Laurentius1977.
Glad you succeeded.
The commandline is fast and enough in many cases.

If, however, you want to run your scripts with a mouseclick.
You could use Midnight Commander (mc) and gpm.
But you'll have to recompile mc with the configure option:
--with-gpm-mouse
Works great without X. But also X is doing fine here with JWM.

Have a great new year too !

Friendly Greetings, Compact

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Alpine Linux RPI as a test build for arm

Wed Jan 07, 2015 11:45 pm

This sounds very cool.

What is the audio and video support like? Is HTML5 audio and video working?

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Thu Jan 08, 2015 10:54 pm

Alsamixer works.
mpg123 and omxplayer can be installed out of the box under Alpine-RPI to stream or play audio (playlists) and video.

But I found some very nice (no-X) gui's too in python:

With mps-youtube you can search/stream/download youtube content if you change the player to omxplayer.
https://pypi.python.org/pypi/mps-youtube/0.2.1

With mps you can search/stream/download audio files from pleer.com if you change the player to mpg123 or omxplayer
https://pypi.python.org/pypi/mps/0.20.16

Under X both TBOplayer and Omxplayer gui seem to work as a gui for the omxplayer

With firefox I couldn't play webm. That thingie keeps on turning in the player. But my knowledge may be too limited here.
I found a html5 audio demo on the web. It starts playing the audio a while but then refuses to play the whole song. Do you have some more links to test playing html5 audio ?

Friendly Greetings, Compact

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Alpine Linux RPI as a test build for arm

Mon Jan 12, 2015 2:05 am

Hi Compact,

I'm in the middle of my second attempt setting up Alpine (alpine-rpi-3.1.1-armhf.rpi.tar.gz) on my B+. My first attempt seemed to go alright following your modified (12/23) instructions.

Afterward I attempted to get Xorg working with LXDM+XFCE as well as JWM. After installing xorg-server and a bunch of other required packages, I could no longer use the Pi locally, the screen would just stay blank. I'm not sure whether or not the keyboard/mouse was working. SSH still worked fine so I was able to connect from another computer. I checked the logs and I tried many things but wasn't able to get anywhere. I couldn't get the console/screen to come up locally anymore even after removing all Xorg related packages and configs. So, I made a fresh installation again following your instructions. Do you have any tips for getting Xorg working with JWM?

Thank you,
KTB
Last edited by ktb on Tue Jan 13, 2015 9:46 pm, edited 1 time in total.

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Mon Jan 12, 2015 8:30 pm

Hi KTB,

I've been trying a lot to get a desktop working a few months ago. So great chance your problem must have been one of mine.

Xfbdev worked the fastest with a JWM upstart ! Mouse was working fine after recompilation but there were some keyboard errors that also prevented ctrl+alt+F-key switching. Login-out JWM sometimes gave problems not to close down xfbdev. To be sure I had to log out with: killall xfbdev. So I finally dropped xfbdev although it is very well usable with these bugs. If you don't intend to do any X/console switching it may still be a better choice ?

So I turned to Xorg. A little slower upstart of JWM but the forementioned problems disappeared. At the time of alpine-edge-141003-armhf.rpi.tar.gz Xorg and JWM ran fine. But with an upgrade before the stable version I also encountered your problem. No screen was shown at boot time and it stayed blanc?! A very strange behaviour. So I replaced the old kernel and modules again and Xorg/JWM were running again. This is still my system.

Your post made me try to install Xorg and JWM with the stable versions 3.1.0 and 3.1.1 with no succes. Exact like you. No screen is shown anymore at boottime. So this problem seems to persist after kernel 3.14.19. But I also saw the Xorg version and more in Alpine-RPI has changed and that may also have introduced new problems. So I'm rather afraid to upgrade my current system.
Concerning X the unstable version seemed more stable than de stable current ones. How to get this working again I don't know. The devellopers know much more than I do. But I surely try some things out. If I might find a solution I let you know ........

Friendly Greetings, Compact

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Alpine Linux RPI as a test build for arm

Tue Jan 13, 2015 4:40 am

Hey Compact,

Sorry to hear you're having the same or similar trouble with the newer releases.

I'm not sure I completely understand the meaning of these mailing-list messages, but I did run into the same problem as this person with LXDM:
http://lists.alpinelinux.org/alpine-devel/4479.html
http://lists.alpinelinux.org/alpine-devel/4432.html

Like a lot of distros, this one appears to be in a less-than-smooth transition right now.

I tried SLIM, LightDM, and LXDM with XFCE4, plus JWM with Xfbdev. I recompiled everything. The farthest I got with the Display Managers left the Pi in a login-loop (the login screen loads and exits in an endless loop while the screen flashes the initial rendering of the login screen). At some point I enabled LXDM with rc-update and then the endless login-loop seemed to prevent SSH connections from succeeding for some reason. JWM seemed to begin to load up alright with the Xfbdev commands you posted in this thread, but it appeared to be frozen or unresponsive for some other reason. My USB mouse did not work, some keyboard commands might have worked. In any case, it wasn't usable. Maybe the EVDEV input event numbers I chose weren't correct, but I tried the specific numbers which should match as well as every combination of what was listed as available (/dev/input/event0 through /dev/input/event4).

I tried recompiling xorg-server without systemd-logind support (--disable-systemd-logind) because I kept seeing a related error message in the Xorg log.

I may try installing one of the older versions. I'd prefer to use the latest version, but I haven't had success with the stable releases and I'd still like to use Alpine.

Update: BTW, one thing I did try which I thought was cool and worked fairly well with the new "stable" release was the following setup. Check it out if you have time: http://wiki.alpinelinux.org/wiki/RPI_Video_Receiver

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Tue Jan 13, 2015 11:35 am

Hi KTB,

I'm really glad with your feedback and links. I'll try out the RPI_Video_Receiver link, it's new for me. Thanks.

> Like a lot of distros, this one appears to be in a less-than-smooth transition right now.
Might be so. I really don't know whether this is a RPI specific problem. Didn't try the new versions on x86.

I personally didn't use a login manager with the stable installs. Just startx. So it seem the login managers cannot be the problem ? One of the things I also wanted to retry is Xfbdev in the stable versions. But if you found this also doesn't work anymore I'd better concentrate on the latest unstable release. If I still can get something going there from scratch in combination with the changed repos. In this case I will not use the 3 steps but better start to do some root copy to get an older sys install. Thanks.

You're right. Alpine doesn't use systemd so I don't understand why the devellopers didn't use --disable-systemd-logind. In my running system this error message doesn't do any harm though.

One thing that comes in mind. Did you already try any of the many config.txt options on:
http://elinux.org/RPiconfig#Video_mode_options
I personaly forgot and didn't. In the older releases there was also something absent there.

To keep the good mood going with Alpine-RPI I'd like to show you my current install. I'm busy to expand the possibilities of Midnight Commander without X. Very much is possible and fast ! But viewing and handling PDF's was/is quite a chapter. I call my system Alpi and Alpi has a face ! Hihi. Thank you very much Gamaral (rpi-buildroot) for your wonderfull console logo !

Friendly Greetings, Compact
Attachments
alpi.jpg
alpi.jpg (56.63 KiB) Viewed 15372 times

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Alpine Linux RPI as a test build for arm

Tue Jan 13, 2015 9:03 pm

Hi,

Nice screenshots and thanks for the tips. I did try adding all the extra config options that I normally use successfully with both Raspbian and Arch Linux on my B+. Using a higher resolution and color depth, additional HDMI settings, initramfs, as well as overclocking and overvolting all appeared to work fine for me.

I wish I could get my installation working as well as yours. I've made several more attempts to get anywhere with a GUI. I started with alpine-edge-141003-armhf.rpi.tar.gz for this last round of attempts. Your installation steps went fine. I recompiled everything dbus related after seeing some errors. I also recompiled gtk+3.0 after seeing some errors. I'm not having any more luck with this approach. Display Managers still get stuck in login loops. I'm unable to start XFCE4 or JWM with or without a Display Manager. Running startxfce4 directly leads to a black screen (I think there might have been a frozen cursor in the middle of the screen as well).

I certainly could be wrong, but this seems to be the biggest problem for me:

Code: Select all

[   487.846] (EE) FBDEV(0): FBIOBLANK: Operation not permitted
Here's a pastebin of the Xorg-related logs in case you're interested - http://pastebin.com/1cFCBDE0 (and dmesg: http://pastebin.com/YsBRe8Y9 ).

I think I give up with getting Alpine to work on the Pi for now. Maybe a future release will work better for me.

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Tue Jan 13, 2015 11:50 pm

Hi KTB,

The first step1 from Wed Oct 29, 2014 doesn't work anymore. It installs current things. If you want to install the latest unstable you have to do a root copy.This way I finally got JWM re-installed freshly ! But had to use alpine-edge-141003-armhf.rpi.tar.gz. With editing config.txt, concerning video modes, I also had no succes. I made 2 scripts to automate things. After install you'd still might want to edit /etc/X11/xorg.conf or remove /usr/share/X11/xorg.conf.d/10-quirks.conf. Personaly I replaced fbdev with fbturbo but the last one isn't in the repos as far as I know. Take care of an upgrade. Better backup your system first. Although I must say that an immediate apk update and upgrade from the 4 current repos didn't seem to harm at all.

Please copy jwm1 and jwm2 to the fat partition where you unpacked alpine-edge-141003-armhf.rpi.tar.gz. Install is only a few minutes. If you want you can still use step3 to install the compiling environment. jwm1 and jwm2 replace step2 and the latest step1 if you want JWM. I hope this works for you. Thanks.

Friendly Greetings, Compact

cd /media/mmcblk0p1
./jwm1

Code: Select all

# During setup-alpine be sure to choose [none] for where the configs must reside
setup-alpine
mount /dev/mmcblk0p2 /mnt
echo "------------------------------------------"
echo "Please wait ... Copying might take a while"
echo "------------------------------------------"
cp -var /bin /mnt
cp -var /home /mnt
cp -var /etc /mnt
cp -var /lib /mnt
cp -var /media/mmcblk0p1/apks /var/cache
rm /mnt/lib/firmware
rm /mnt/lib/modules
cp -var /.modloop/modules /mnt/lib
mv /mnt/lib/modules/firmware /mnt/lib/firmware
cp -var /root /mnt
cp -var /sbin /mnt
cp -var /usr /mnt
cp -var /var /mnt
cp -va /linuxrc /mnt
mkdir /mnt/dev
mkdir /mnt/media
mkdir /mnt/mnt
mkdir /mnt/proc
mkdir /mnt/run
mkdir /mnt/sys
mkdir /mnt/tmp
sync
echo "--------------------"
echo "Content of mmcblk0p2"
echo "--------------------"
ls /mnt
umount /mnt
mount -o remount,rw /dev/mmcblk0p1 /media/mmcblk0p1
umount /.modloop
mkdir /media/mmcblk0p1/org
mv /media/mmcblk0p1/apks /media/mmcblk0p1/org
mv /media/mmcblk0p1/config.txt /media/mmcblk0p1/org
mv /media/mmcblk0p1/cmdline.txt /media/mmcblk0p1/org
mv /media/mmcblk0p1/initrd.gz /media/mmcblk0p1/org
mv /media/mmcblk0p1/rpi.modloop.squashfs /media/mmcblk0p1/org
echo "framebuffer_width=800
framebuffer_height=600
framebuffer_depth=16
cmdline=dwc_otg.lpm_enable=0 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" > /media/mmcblk0p1/config.txt
sync
echo "--------------------"
echo "Content of mmcblk0p1"
echo "--------------------"
ls /media/mmcblk0p1
echo "---------------------------------------------------"
echo "All Done ! You can reboot now and advance with jwm2"
echo "---------------------------------------------------"
# reboot
mount /dev/mmcblk0p1 /mnt
cd /mnt
./jwm2

Code: Select all

# Sudo is,among others. needed for auto dependency install if you are compiling
echo "---------------------------"
echo "We'll first add user alpine"
echo "---------------------------"
adduser alpine
apk add sudo
echo "alpine ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
setup-xorg-base
apk add xf86-video-fbdev jwm mc htop
ln -s /etc/init.d/dbus /etc/runlevels/boot/dbus
sed -i s/"exec startxfce4"/"# exec startxfce4"/ /etc/X11/xinit/xinitrc
sed -i s/"exec startfluxbox"/"# exec startfluxbox"/ /etc/X11/xinit/xinitrc
sed -i s/"exec xfce4-terminal"/"# exec xfce4-terminal"/ /etc/X11/xinit/xinitrc
echo "exec jwm" >> /etc/X11/xinit/xinitrc
mv /etc/X11/xorg.conf.d/20-modules.conf /etc/X11/xorg.conf.d/20-modules.conf-
echo 'Section "Module"
	Load "fbdevhw"
	Load "fb"
	Load "shadow"
	load "shadowfb"
	Load "dbe" # Double buffer extension
    Disable "glx" #LOADGLX
    Disable "dri" #LOADDRI
EndSection    
Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
	Option      "XkbRules" "evdev"
	Option      "XkbModel" "pc105" #xkbmodel0
	Option      "XkbLayout" "us" #xkeymap0
#	Option      "XkbVariant" "" #xkbvariant0
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "IMPS/2" #mouse0protocol
	Option	    "Device" "/dev/input/mice"
	#Option      "Emulate3Buttons"
	#Option      "Emulate3Timeout" "50"
	Option      "ZAxisMapping" "4 5" #scrollwheel
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
	HorizSync    35-81
	VertRefresh  59-76
#	UseModes     "Modes0" #monitor0usemodes
#	Option      "PreferredMode" "1024x768" #monitor0prefmode
	EndSection
	
Section "Modes"
	Identifier "Modes0"
#	modes0modeline0
EndSection

Section "Device"
        Identifier      "FBDEV"
        Driver          "fbdev"
        Option          "fbdev" "/dev/fb0"
        Option          "SwapbuffersWait" "true"
EndSection

Section "Screen"
	Identifier "Screen0"
#	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth 16
#	Option         "metamodes" "1280x800_60 +0+0" #METAMODES_0
	Subsection "Display"
		Depth       16
#		Modes       "1920x1080" "1024x768" #screen0modes
	EndSubsection
EndSection' > /etc/X11/xorg.conf
echo "---------------------------------------------------------------"
echo "Please reboot and login as user alpine then type startx + enter"
echo "---------------------------------------------------------------"

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Alpine Linux RPI as a test build for arm

Wed Jan 14, 2015 2:48 am

Thank you! Thank you! THANK YOU! It works! I'm very excited after all those failed attempts. I'm going to play around with it. I'll be sure to let you know how it goes. Thanks again!

BTW - I noticed while building packages from some sources (dev.alpinelinux.org, ftp.gnome.org, and others) that something DNS related often fails resulting in me having to ping the domain and then add an entry for the IP address in the /etc/hosts file. Does that happen to you also?

Just to be safe, I run all the commands from your scripts manually.
2015-01-14-010631_1360x768_scrot.jpg
2015-01-14-010631_1360x768_scrot.jpg (62.56 KiB) Viewed 15235 times
Oh, and you can get rid of the hwclock messages by doing this:

Code: Select all

sudo rc-update add swclock boot
sudo rc-update del hwclock boot
sudo reboot

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Wed Jan 14, 2015 12:05 pm

I ran the scripts several times before I posted. But indeed, faults always may slip in.

In xorg.conf:
Option "SwapbuffersWait" "true"
Might still be from the fbturbo driver ? I don't know anymore.

No I can't remember to ever had more internet connection problems than normal ? And I never installed ssh.

I watched BBC. Nice logo at startup !

If you want to get alsa working save /etc/asound.conf

Code: Select all

pcm.!default {
   type hw
   card 0
}
ctl.!default {
   type hw
   card 0
}
Strange. Alpine-RPI is full of errors at startup and setup. Sys install is missing. The sys install solutions here are also plain with errors. But once installed you can remove all errors and have a pretty stable system. I removed the hwclock, didn't know about a swclock. Thanks. The speed of Firefox disappoints me, but perhaps there still are some optimisations possible ?

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Alpine Linux RPI as a test build for arm

Wed Jan 14, 2015 1:29 pm

Yeah, there isn't anything wrong with the scripts. I just run them manually in case anything goes wrong (like in step 3 when DNS fails for me). This issue might be specific to my local network/router. Thanks again.

I like the new splash logo too. I haven't tried seeing if it will work with the old edge release we are using. And thanks for the audio tip.

I'm building Firefox right now. I see Alpine just released a new version. Oh well, too late. I'm afraid I may have to either start over and compile the new release or try to build an older version of icu (I think apk complained about Firefox requiring icu-libs release 53.x or something like that when I tried to install it and the one I built from aports is something like 54.x) I also compiled audacius, icu, orc. I forgot I needed linux-headers to build some packages. I may try to compile fbturbo, but things are working well in general for me so far. I really like the system.

You might want to try otter-browser ("Otter Browser, project aiming to recreate classic Opera (12.x) UI using Qt5."). I think it's in aports/testing. I'm not sure what other options we have.

Update: Yes, the Firefox build failed when the icu libs were found to be from the 54.1 release. I'm now attempting to build the new Firefox release in testing which was built against icu libs 54.1 http://git.alpinelinux.org/cgit/aports/ ... c347d1d8a5

Update: I did get the DNS problem fixed. Unfortunately, that last Firefox build failed again when the Pi ran out of memory far along in the process. Perhaps 512MB of swap wasn't enough. I'll try it again, but maybe I should save it for after I have cross-compiling working. I followed some guides and I seem to have gotten distcc working OK with the linaro raspbian tool chain and some of my local PCs running Ubuntu/Xubuntu. I'm not sure how difficult it's going to be to get the proper toolchain setup for ARM on Alpine.

For now I've moved on and built otter-browser (in aports/testing, but I updated the APKBUILD to build from the latest available weekly source release). It works well, but it's still the webkit-based otter-browser and has very limited JS support. Once the QT-5.4 packages are available in aports, we should be able to compile/use the latest weekly versions of otter-browser with the Blink backend enabled. My hope is that the Blink versions of otter-browser may introduce better performance and perhaps better/legitimate JS support. Maybe I'm being too optimistic.

Tboplayer, omxplayer and omxplayergui are all working well. I also recompiled the 3.14.19 linux-rpi (with linux-rpi-dev) packages so I could add support for a Rosewill RNX-AC600UB (rtl8811AU) USB WiFi adapter. This seems to work OK when I start wpa_supplicant after the default runlevel has already begun and I've logged in. However, when I set the wpa_supplicant service to start at the the default runlevel, it fails for some reason. I'll look into it more. I'm building Minimal Kiosk Browser 1.6.2 (kweb and kweb3) right now. If you're interested in any of these packages, I'd be happy to upload them somewhere to save you the compile time.

BTW, I no longer see any error messages (such as modules failed to load) during boot/reboot.

Update: I'm nearly finished with Qt5.4. Building qt5-qtwebkit really puts a beating on my B+. Stability while compiling has gotten much better when using an old external 2.5" hard drive for the root file system. Swapping can still get really rough at certain times. I setup a 4GB swap partition on the external drive and I think the Pi was using 30-50% of the swap for long periods during the WebKit build. In general, Alpine does seem to be the more efficient than Raspbian and Arch Linux.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Alpine Linux RPI as a test build for arm

Sun May 24, 2015 4:52 pm

It wasn't the cleanest process, but I've got Alpine Linux running on my Pi2B now using http://dev.alpinelinux.org/~tteras/alpi ... rpi.tar.gz and the previous root copy method. The boot files have changed and now support Pi1 (B+, and probably B/A/A+ too, but I don't have those models to test with) and Pi2. I prepared the microSD card pretty much the same way as the Arch Linux instructions (http://archlinuxarm.org/platforms/armv7 ... berry-pi-2). I skipped most of the mv (to org directory) commands from the jwm1 script. I removed "alpine_dev=mmcblk0p1 quiet" and simply added " elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" to cmdline-rpi2.txt. I'm using JWM right now. I'll try a bunch of things and post any updates about anything potentially interesting.

Updates:
- Xfce4 is working well.
- Firefox works well.
- GIMP works well.
- Overclocking and overvolting is working well (with cpufrequtils and cpufreqd).
- VLC (the current Alpine package provides version 2.2.1) works fairly well. The Raspberry Pi MMAL vout plugin is not included in this version, but the OMX IL vout plugin is there and works as well as it does on Jessie. H264 MP4 files fail just like on Raspbian and Debian Jessie.
- Audacious works well.
- SpaceFM is awesome.
- omxplayer and omxplayerGUI work well.

Issues:
- GParted does not work. It provides an error message I've seen in the past, but I can't remember how I worked around it. No matter how I launch it (even when using ktsuss, pkexec), it responds "The process gpartedbin is already running. Only one gpartedbin process is permitted." However, gparted/gpartedbin is not running according to top/htop/ps/pstree. On Debian/Ubuntu/Raspbian systems, I usually launch it with gksu/gksudo or pkexec, but I haven't been able to successfully compile libgksu and gksu on Alpine. Based on the message it returns, I don't even think permissions/authentication is the problem. I've tried lots of things. I don't know how to fix this problem.
Update: This problem appears to be caused by the way the ps command provided by BusyBox works. The BusyBox ps command output includes a listing of the grep command to which ps was piped (ps -e | grep gpartedbin), so the test in the gparted script to make sure gpartedbin is not already running always fails. Installing procps fixes this problem.

Code: Select all

if test "z`ps -e | grep gpartedbin`" != "z"; then
        echo "The process gpartedbin is already running."
        echo "Only one gpartedbin process is permitted."
        exit 1
fi

Code: Select all

alpine-linux-rpi:~$ sudo -u root gparted
[sudo] password for ktb: 
The process gpartedbin is already running.
Only one gpartedbin process is permitted.
alpine-linux-rpi:~$ ps -e | grep gpartedbin
 3987 ktb        0:00 grep gpartedbin
alpine-linux-rpi:~$ sudo apk add procps
[sudo] password for ktb: 
(1/2) Installing libproc (3.3.9-r0)
(2/2) Installing procps (3.3.9-r0)
Executing busybox-1.23.2-r0.trigger
OK: 1759 MiB in 798 packages
alpine-linux-rpi:~$ ps -e | grep gpartedbin
alpine-linux-rpi:~$ 
- I tried building gnome-disk-utility from aports/main, but failed. It might be related to gnome-settings-daemon in aports/unmaintained which doesn't seem to build successfully. I manually downloaded the gnome-settings-daemon source archive from ftp.gnome.org and hosted it locally through apache2 to get around a curl error when I ran abuild before realizing that the problem is probably related to the dynamically generated source URL in the APKBUILD file. There might be other problems too.

- The Raspberry Pi userland files are relatively old (2014-10-17, pre-Pi2B release) and do not really seem to support the Pi2B. vcgencmd reports an ARM/GPU memory split of 944M / 64M even though I've tried specifying gpu_mem=256 and gpu_mem_1024=256. However, htop and conky only report 745MB and 746MB of available RAM which indicates that the memory split is working and vcgencmd is misreporting those numbers. I've attempted to create a couple new APKBUILD files to compile more recent userland files (as well as cloning the RPF repo and using buildme), but keep running into compile errors which seem to be related to musl incompatibilities.
Update: I got my 0.20150411 APKBUILD to compile successfully by using some ugly compile-time hacks (I was too lazy to create a proper patch file) to some of the userland source files -- debug_sym.c and RaspiVidYUV.c.
Update 2: I just noticed that Timo updated the raspberrypi APKBUILD files to 0.20150526, so this should be solved. Nevermind, the newer vcgencmd still reports an ARM/GPU memory split of 944M / 64M. Oh well.
Update 3: OK, specifying gpu_mem in config.txt instead of the include usercfg.txt also solves this problem. So, it appears that only certain config options work when used in separate include files.

- Although the Alpine git logs appear to show that support for Device Tree has been implemented, enabling I2C, I2S and SPI using Device Tree configuration settings doesn't appear to work. Loading modules the old way does seem to work (Update: nevermind, the modules do load by adding them to /etc/modules (i2c_2708, i2c_dev, rtc_1307, lirc_dev) according to lsmod, but nothing shows up in /dev and sudo i2cdetect -y 1 returns "Error: Could not open file '/dev/i2c-1' or '/dev/i2c/1': No such file or directory". I2c-tools had to be compiled from source as it's not an available package and it's not in aports.). Unfortunately, I don't think the precompiled vcdbg (and edidparser) binary from the RPF userland repo works for Alpine Linux (which might make troubleshooting the Device Tree stuff easier if it did work).
Update: OK, I think I have i2c working. It seems that it started working after moving the Device Tree config settings from the include usercfg.txt to config.txt instead. So, the lesson appears to be that the Device Tree settings should not be placed in separate include config files if they are expected to work.
Update 2: I originally tried adding /opt/vc/lib/* to the directory locations in the script /sbin/ldconfig and running that script, but that didn't seem to work and was overwritten during an upgrade anyway. I got vcdbg to work by copying libdebug_sym.so and libvcos.so to /usr/lib/. That's ugly, but it works. Then I just symlinked everything -- http://pastebin.com/dtkYSiLR

- sudo pip install RPi.GPIO fails with errors related to caddr_t. Update: I was able to install this by downloading and modifying the source for RPi.GPIO 0.5.11 from sourceforge -- http://softlayer-dal.dl.sourceforge.net ... .11.tar.gz:

Code: Select all

--- source_old/c_gpio.c
+++ source/c_gpio.c
@@ -85,7 +85,8 @@
     if ((uint32_t)gpio_mem % PAGE_SIZE)
         gpio_mem += PAGE_SIZE - ((uint32_t)gpio_mem % PAGE_SIZE);
 
-    gpio_map = (uint32_t *)mmap( (caddr_t)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, gpio_base);
+    gpio_map = (uint32_t *)mmap( (void *)gpio_mem, BLOCK_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, mem_fd, 
+gpio_base);
 
     if ((uint32_t)gpio_map < 0)
         return SETUP_MMAP_FAIL;
@@ -233,5 +234,5 @@
 
 void cleanup(void)
 {
-    munmap((caddr_t)gpio_map, BLOCK_SIZE);
+    munmap((void *)gpio_map, BLOCK_SIZE);
 }
- I recompiled linux-rpi hoping to get the dev package header files, but that only built the Pi1 headers package. Then I noticed that the current APKBUILD has a comment: "# we only provide -dev for main flavor for now"

- bcm2708_rng seems to load OK (dmesg shows "bcm2708_rng_init=f0142000" and /dev/hwrng exists). However, rng-tools is not an available package in Alpine Linux. I got rng-tools-5 to compile from source (after installing the argp-standalone package and modifying the rng-tools-5 Makefiles by adding "-largp" to the "rngd_LDADD =" and "rngtest_LDADD =" lines). It doesn't appear to work though. I tested it by using the command "sudo rngd -r /dev/hwrng -f -v" and then running rngtest. rngd outputs "Available entropy sources:\ Intel/AMD hardware rng" and rngtest just sits there running without any output after outputting "rngtest: starting FIPS tests..."
Update: I wasn't testing it correctly. It does seem to work. The testing information from https://github.com/cernekee/rng-tools/ was very helpful.

Code: Select all

alpine-linux-rpi:/home/ktb# rngtest -c 50 </dev/hwrng
rngtest 5
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rngtest: starting FIPS tests...
rngtest: bits received from input: 1000032
rngtest: FIPS 140-2 successes: 50
rngtest: FIPS 140-2 failures: 0
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 0
rngtest: FIPS 140-2(2001-10-10) Runs: 0
rngtest: FIPS 140-2(2001-10-10) Long run: 0
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=1.062; avg=1.064; max=1.066)Mibits/s
rngtest: FIPS tests speed: (min=34.616; avg=39.214; max=39.572)Mibits/s
rngtest: Program run time: 921241 microseconds
I used the init.d script and conf.d config file from Gentoo's GitHub: https://github.com/gentoo/gentoo-portag ... ools/files

This was helpful also: http://scruss.com/blog/2013/06/07/well- ... generator/

Code: Select all

alpine-linux-rpi:~$ sudo cat /dev/hwrng | rngtest -c 1000
rngtest 5
Copyright (c) 2004 by Henrique de Moraes Holschuh
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rngtest: starting FIPS tests...
rngtest: bits received from input: 20000032
rngtest: FIPS 140-2 successes: 1000
rngtest: FIPS 140-2 failures: 0
rngtest: FIPS 140-2(2001-10-10) Monobit: 0
rngtest: FIPS 140-2(2001-10-10) Poker: 0
rngtest: FIPS 140-2(2001-10-10) Runs: 0
rngtest: FIPS 140-2(2001-10-10) Long run: 0
rngtest: FIPS 140-2(2001-10-10) Continuous run: 0
rngtest: input channel speed: (min=164.413; avg=1113.964; max=6510416.667)Kibits/s
rngtest: FIPS tests speed: (min=2.488; avg=37.138; max=39.736)Mibits/s
rngtest: Program run time: 18178502 microseconds
Last edited by ktb on Sun May 31, 2015 10:09 am, edited 19 times in total.

Compact
Posts: 43
Joined: Wed Sep 05, 2012 12:23 pm

Re: Alpine Linux RPI as a test build for arm

Wed May 27, 2015 9:57 pm

So Alpine is running on the RPI2 too !
Wow. Thank you for your findings ktb !
Your info is very welcome.

In the meantime I got Alpine's JWM smoothly running on an old Armada x86 laptop with only 64mb ram.
No current non uclibc/musl Linux distro can equal that in my findings.

I'm sorry not to be up-to-date with the current Alpine-RPI "sys" installs.
To ease some things I really hope to find time to make an actual, minimal, more proper, sys-installed, Alpine (dd) image called Alpi-minimal. With only mc and htop installed and a few scripts to e.g. install the compiling environnement; a working JWM; etc.

Sorry again to be this far behind, so thank you very much for your posting.

Friendly Greetings, Compact

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: Alpine Linux RPI as a test build for arm

Wed May 27, 2015 11:14 pm

Nice to see you around, Compact.

Here are some configs and other information from my current installation:

I left the boot and apks directories which come with the default files on the boot partition (/boot/boot and /boot/apks), but the files in /boot/boot (initramfs-rpi, initramfs-rpi2, modloop-rpi, modloop-rpi2, vmlinuz-rpi, vmlinuz-rpi2) aren't being used.

Code: Select all

alpine-linux-rpi:~$ ls -l /boot
total 22884
-rwxr-xr-x    1 root     root       1841316 Apr 23 09:47 System.map-rpi
-rwxr-xr-x    1 root     root       1887696 Apr 23 09:51 System.map-rpi2
drwxr-xr-x    3 root     root          4096 May 24 05:17 apks
-rwxr-xr-x    1 root     root          4702 Apr 23 09:47 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x    1 root     root          4423 Apr 23 09:47 bcm2708-rpi-b.dtb
-rwxr-xr-x    1 root     root          5690 Apr 23 09:50 bcm2709-rpi-2-b.dtb
drwxr-xr-x    2 root     root          4096 May 25 15:20 boot
-rwxr-xr-x    1 root     root         17900 Apr 24 00:14 bootcode.bin
-rwxr-xr-x    1 root     root           190 May 26 05:11 cmdline-rpi.txt
-rwxr-xr-x    1 root     root           191 May 25 15:19 cmdline-rpi2.txt
-rwxr-xr-x    1 root     root        101471 Apr 23 09:47 config-rpi
-rwxr-xr-x    1 root     root        103104 Apr 23 09:51 config-rpi2
-rwxr-xr-x    1 root     root           769 May 27 23:30 config.txt
-rwxr-xr-x    1 root     root          6159 Apr 24 00:14 fixup.dat
-rwxr-xr-x    1 root     root       4882333 May 24 20:33 initramfs-rpi
-rwxr-xr-x    1 root     root       4887115 May 24 21:41 initramfs-rpi2
drwxr-xr-x    2 root     root          4096 May 24 05:17 overlays
-rwxr-xr-x    1 root     root       2656696 Apr 24 00:14 start.elf
-rwxr-xr-x    1 root     root           248 May 27 21:53 usercfg.txt
-rwxr-xr-x    1 root     root       3455920 Apr 23 09:47 vmlinuz-rpi
-rwxr-xr-x    1 root     root       3519456 Apr 23 09:51 vmlinuz-rpi2
/etc/apk/repositories:

Code: Select all

#/media/mmcblk0p1/apks
/boot/apks
http://liskamm.alpinelinux.uk/latest-stable/main
http://liskamm.alpinelinux.uk/edge/main
http://liskamm.alpinelinux.uk/edge/testing
/etc/fstab

Code: Select all

/dev/mmcblk0p1    /boot           vfat       defaults                       0 0
/dev/mmcblk0p2    /               ext4       defaults,noatime,nodiratime    0 0
/dev/cdrom        /media/cdrom    iso9660    noauto,ro                      0 0
/dev/usbdisk      /media/usb      vfat       noauto,ro                      0 0
/boot/cmdline-rpi.txt

Code: Select all

BOOT_IMAGE=/boot/vmlinuz-rpi modules=loop,squashfs,sd-mod,usb-storage dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
/boot/cmdline-rpi2.txt

Code: Select all

BOOT_IMAGE=/boot/vmlinuz-rpi2 modules=loop,squashfs,sd-mod,usb-storage dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 elevator=deadline root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
/boot/config.txt

Code: Select all

disable_splash=1
boot_delay=0
device_tree_address=0x100
kernel_address=0x8000

[pi1]
cmdline=cmdline-rpi.txt
kernel=vmlinuz-rpi
initramfs initramfs-rpi 0x01000000

gpu_mem=128

# B+ video codec license keys
decode_MPG2=0xeee74410
decode_WVC1=0xed7332b0

# Device Tree
dtdebug=on
device_tree=bcm2708-rpi-b-plus.dtb
dtparam=i2c_arm=on
dtoverlay=i2c-rtc,ds1307
dtoverlay=lirc-rpi:gpio_in_pin=18,gpio_in_pull=down

[pi2]
cmdline=cmdline-rpi2.txt
kernel=vmlinuz-rpi2
initramfs initramfs-rpi2 0x01000000

gpu_mem=256

# 2B video codec license keys
decode_MPG2=0x80f8bb6f
decode_WVC1=0x67e83499

# Device Tree
dtdebug=on
device_tree=bcm2709-rpi-2-b.dtb
dtparam=i2c_arm=on
dtoverlay=i2c-rtc,ds1307
dtoverlay=lirc-rpi:gpio_in_pin=18,gpio_in_pull=down

[all]
include usercfg.txt
/boot/usercfg.txt

Code: Select all

framebuffer_depth=32
hdmi_drive=2

arm_freq=1000
sdram_freq=483
core_freq=500
h264_freq=500
isp_freq=500
v3d_freq=500
over_voltage=4
over_voltage_sdram=2
avoid_pwm_pll=1

temp_limit=83
max_usb_current=1
/etc/modules

Code: Select all

af_packet
psmouse
snd_bcm2835
bcm2708_rng
i2c_dev
lirc_dev
/etc/X11/xinit/xinitrc

Code: Select all

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
xinitdir=/etc/X11
sysresources=$xinitdir/Xresources
sysmodmap=$xinitdir/Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# First try ~/.xinitrc
if [ -f "$HOME/.xinitrc" ]; then
	XINITRC="$HOME/.xinitrc"
	if [ -x $XINITRC ]; then
		# if the x bit is set on .xinitrc
		# it means the xinitrc is not a
		# shell script but something else
		exec $XINITRC "$@"
	else
		exec /bin/sh "$HOME/.xinitrc" "$@"
	fi
fi

# If not present, try the system default
exec startxfce4 --with-ck-launch

# Fall back to fluxbox
# exec startfluxbox

# Start only terminal as last resort
# exec xfce4-terminal || exec mrxvt || exec urxvt || exec st

#exec jwm
/etc/X11/xorg.conf

Code: Select all

Section "Module"
	Load "fbdevhw"
	Load "fb"
	Load "shadow"
	Load "shadowfb"
	Load "dbe"
	Disable "glx"
	Disable "dri"
EndSection

Section "ServerLayout"
	Identifier	"X.org Configured"
	Screen	0	"Screen0" 0 0
	InputDevice	"Mouse0" "CorePointer"
	InputDevice	"Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
	Identifier	"Keyboard0"
	Driver		"kbd"
	Option		"XkbRules" "evdev"
	Option		"XkbModel" "pc105"
	Option		"XkbLayout" "us"
	Option		"XkbVariant" ",qwerty"
EndSection

Section "InputDevice"
	Identifier	"Mouse0"
	Driver		"mouse"
	Option		"Protocol" "IMPS/2"
	Option		"Device" "/dev/input/mice"
	Option		"ZAxisMapping" "4 5"
EndSection

Section "Monitor"
	Identifier	"Monitor0"
	VendorName	"Monitor Vender"
	ModelName	"Monitor Model"
EndSection

Section "Modes"
	Identifier	"Modes0"
EndSection

Section "Device"
	Identifier	"FBDEV"
	Driver		"fbdev"
	Option		"fbdev" "/dev/fb0"
	Option		"SwapbuffersWait" "true"
EndSection

Section "Screen"
	Identifier "Screen0"
	Monitor "Monitor0"
	SubSection "Display"
		Viewport	0 0
		Depth		16
	EndSubSection
	SubSection "Display"
		Viewport	0 0
		Depth		24
	EndSubSection
	SubSection "Display"
		Viewport	0 0
		Depth		32
	EndSubSection
EndSection
Last edited by ktb on Thu May 28, 2015 10:49 pm, edited 4 times in total.

Return to “Other”