Michael Langfinger | 9 May 2013 19:33

Strange problem installing Slackware 14.0 on the Raspberry Pi

 Hi,

 I tried to install Slackware 14.0 for ARM on my Raspberry Pi (Model B, 
 512 MB RAM). I used the installer image from http://rpi.fatdog.eu/, the 
 package repository is on a USB flash drive. The installer boots just 
 fine, I can configure my keyboard and set the current date without 
 problems. I can also configure the partitions (swap, root and so on) in 
 the setup, set the package source and select the packages. The 
 installation process starts but quits after a few seconds, telling me 
 that the installation was successful (which of course is wrong). Shortly 
 before this message, two error messages pop up in the background:

 "Error retrieving current directory - getcwd cannot access parent 
 directories: no such file or directory" and "/mnt/etc/fstab - no such 
 file or directory". I made sure that the SD card is writable and mounted 
 to /mnt. I don't think that this is a hardware issue, because the same 
 SD card was used in this RPi with OpenELEC.

 And this is not the only strange behaviour - when i quit the installer, 
 the system date is set to the next day (e.g. May,10 instead of May,9). I 
 have no clue what might cause this and how to solve it. I installed 
 Slackware on another RPi a while ago, without any problems (using the 
 image from Dave's Collective and with a NFS server for the packages). I 
 will try the image from Dave, but I don't think that this will solve the 
 problem.

 Any ideas?

 Kind regards,

(Continue reading)

Ottavio Caruso | 8 May 2013 16:31
Picon
Favicon

Re: slackware-arm on chromebook



On 31 January 2013 01:59, james_ozone <ozone <at> cname.com> wrote:
> Greetings. Some google searching tells me you're the only one who has
> installed slackware on a chromebook, and now that I've finally seen the
> hardware, I want one too.
>
> Do you have something more current than the "interim" (now missing) docs?
> Would you like some help?

I've managed to recover my very first template for the installation of Slackware onto the Samsung Chromeboook. It contains many errors and originally it was meant for a USB flash drive, then I installed it on a SD card. Unfortunately the final document has gone lost forever.

Attached in case anybody finds it useful

--
Ottavio
Stimulated by Olof Johansson’s post:
https://plus.google.com/u/0/109993695638569781190/posts/b2fazijJppZ





I have decided to venture in the epic task of running the Slackwarearm (formerly known as Armedslack) on my
new little shiny Samsung Chromebook. 


Don’t get me wrong: I really love Chrome OS. I love it so much that now it has become my main operating
system, but I have used Slackware on Intel for a few years and I wanted to replicate my happy experience on
the ARM architecture.


Limitations:
1. This is not a proper port of Slackware for the Chromebook. It’s a cheap hack made by a non IT professional
with too much time on his hands. A proper port would only happen if and when native kernel, module and
firmware packages are available in the Slackwarearm tree. It might happen, it might not happen and it
won’t be me to do the job.
2. The whole process is not very user-friendly, actually it was a massive pain for me with my limited skills.
At the moment the system is barely usable but it does work. It boots all right, can acquire a proper and
decent wireless connection and can be expanded downloading more packages from the Slackwarearm tree. I
haven’t tested sound and video but I plan to do so once I have a proper graphical environment.
3. At the moment I haven’t replicated the installation on a SD card. Some commands might differ and you
have to be extra careful when you mess with creating and deleting partitions and you might get rid of
important data.
4. This document assumes that you are familiar with running the Chromebook in developer mode, that you have
some experience with Slackware and the command line and have an understanding of the Slackware
philosophy (What? No dependency resolution?)


If the bullet points above don’t ring any bell, please don’t mess with your Chromebook as you risk to
make it unusable and invalidate the warranty (yes, you could always reflash the device, but...)


Before you start, familiarize yourself with these documents:
http://www.chromebook-linux.com/2011/11/booting-gnulinux-distribution-from-usb.html

https://plus.google.com/u/0/109993695638569781190/posts/b2fazijJppZ

https://plus.google.com/u/0/109993695638569781190/posts/34PYU79eUqP

http://www.armedslack.org/introduction/



Still awake and willing to take risks? Let’s go!


Insert a flash drive at the back of your Chromebook. It’s a safe option to plug it into the standard USB2
port. Once plugged in, the Chrome file manager will appear and will automatically mount the USB device on
the left pane, just under the Downloads and the Google Drive folder. Right click on USB drive and select
“Eject device”.


Press CTRL+ALT+T and type:


shell
sudo su


Don’t use “sudo bash”, you are going to have problems when chrooting to the slackware partition.


Type:
dmesg|tail


You will see an output similar to this:


[10730.135107] sd 1:0:0:0: [sda] Asking for cache data failed
[10730.135120] sd 1:0:0:0: [sda] Assuming drive cache: write through
[10730.135130] sd 1:0:0:0: [sda] Attached SCSI removable disk


Your flash drive will be identified as /dev/sda


You can’t use fdisk on this device as you need a GUID Partition Table (GPT), therefore you need
‘parted’. Strictly speaking you could use the Chrome OS native tool ‘cgpt’ but I find parted a bit
more user-friendly (I’m not joking).


[TODO: expand the alignment and ext4 options, ref:
http://www.styryx.com/en/computers/operating-systems/unix-linux/linux-installation-to-usb-flash

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=9&t=850

http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/

]


[libparted library
The libparted library powers many Linux partitioning tools that support file system manipulation.
Through version 2.1, the text-mode GNU Parted program (command name parted) provides little support for
aligning on anything but cylinder boundaries. The best approach may be to type unit s to change the default
unit to sectors. You can then manually enter partition start points in sectors and verify partition start
points precisely.
Version 2.2 has begun a transition toward a policy that's more useful for disks with 4096-byte physical
sectors. With this version, you can specify a starting value of 1M and the sector will be properly aligned.
This version also warns you when your partitions are not properly aligned.
]


A little breakdown of the commands:
[TODO: replace parted with cgpt]


parted -a optimal /dev/sda




Then at the parted prompt


(parted) mktable gpt                                                      
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you
want to continue?Yes/No? Yes    
[TODO: this needs to be redone completely]
(parted) unit MiB


   http://en.wikipedia.org/wiki/Mebibyte





Create a small 17 MiB partition for the kernel starting at 1 MiB (melibytes, not megabytes)
(parted) mkpart primary ext4 1 16   





Then reuse all the remaining space for the root partition:
(parted) mkpart primary ext4 16 -1 
“-1” means until the last sector.


(parted) unit s                                                           
(parted) print                                                            


Number  Start   End       Size      File system  Name    Flags 1      
4096s   30719s    26624s                 KERN-A 2      
32768s  1998847s  1966080s  ext4         ROOT-A


make sure it starts at 4096s ???????


Umount the drive again as the Chromebook has this annoying habit of mounting drives when a new filesystem
has been added. Duh!


??????? Don’t worry about the labels given to the partition, they will be overridden later.


As ‘mkpart’ does not really create a filesystem, you’ll have to do it manually only on the root partition:


mkfs.ext4 /dev/sda2


Don’t worry creating a filesystem on /dev/sda1.


Now it’s time to install the Slackware ARM mini root filesystem.


Point your Chrome browser to:
http://www.armedslack.org/getslack/


Scroll down to the end of the page and select a mirror.


I have selected http://ftp.slackware.org.uk/slackwarearm/ which will form the base url of the
Slackware tree.


Navigate into the slackwarearm-devtools/minirootfs/ directory. Make sure that you bookmark or save the
README.txt file.   


Now change into roots/ and download the latest minirootfs, which at the moment of writing is slack-14.0-miniroot_27Sep12.tar.xz


Bookmark or save also the slack-14.0-miniroot_details.txt file.


Go back to  slackwarearm-current/slackware/ap/   and download the latest slackpkg package, at the moment:
slackpkg-2.82.0-arm-3.tgz.re        


Mount the second partition:


mount /dev/sda2 /media/removable/


As per the README.txt file that you have previously bookmarked or saved, unpack the mini root into /mnt/removable:


tar -xf /home/chronos/user/Downloads/slack-14.0-miniroot_27Sep12.tar.xz -C /media/removable/


Mount /tmp, /proc, /sys and /dev, copy some files over and chroot:


mount --bind /tmp/ /media/removable/tmp/
mount --bind /proc/ /media/removable/proc/
mount --bind /sys/ /media/removable/sys/
mount --bind /dev/ /media/removable/dev/
cp /etc/resolv.conf /media/removable/etc/resolv.conf
cp /home/chronos/user/Downloads/slackpkg-2.82.0-arm-3.tgz /tmp
chroot /media/removable/


Switch off syslog:
chmod -x /etc/rc.d/rc.syslog


nano /etc/inittab

and comment the first line beginning with "s0":

    # Local serial lines:
    s0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100


nano /etc/securetty


and comment the first line starting with ttyS0


Change the root password and add a local user with adduser. Don’t forget to add yourself to the additional
users or you won’t be able to have sound, print, add devices and so on. 


Wipe out all  kernel related packages:
removepkg /var/log/packages/kernel*


mkdir /lib/modules 


Temporarily exit from chroot and copy over the contents from /lib/modules and /lib/firmware


cp -pr /lib/modules/* /media/removable/lib/modules/
cp -pr /lib/firmware/* /media/removable/lib/firmware/


Re-enter chroot and:


installpkg /tmp/slackpkg-2.82.0-arm-3.tgz


Edit /etc/slackpkg/slackpkg.conf and /etc/slackpkg/mirrors to your taste.

Run:


slackpkg update


Ignore the errors and:


slackpkg install gnupg ncurses


Don’t worry about the frames not displaying properly. Try to live with it, the problem will be fixed once
you boot into the real system.


Update the gpg key:


slackpkg update gpg


Install a minimal set of packages, just enough to give you a wireless connection:


slackpkg install wireless-tools wpa_supplicant libnl3


I assume you are using WPA authentication on your router, otherwise please refer to the Slackware wiki:
http://docs.slackware.com/slackbook:wifi



nano /etc/wpa_supplicant.conf


You will have to add this snippet of code if you use WPA-PSK:


network={
     ssid="my-router-ssid"  
     key_mgmt=WPA-PSK  
     psk="my-router-passphrase" 
 }


[TODO: change mount points]


nano /etc/fstab


This is my recommended file system table:


proc            /proc           proc    defaults                0       0
tmpfs            /dev/shm    tmpfs       defaults            0       0
tmpfs            /tmp           tmpfs       defaults            0       0
/dev/sda2       /               ext4    errors=remount-ro 0       1


Exit the chroot and copy the Chromebook mount points in case we are going to mount some partitions from
within Slackware:


exit
cp /etc/fstab /media/removable/root/chromeos-fstab
mount > /media/removable/root/chromeos-mount-points






unmount everything:




umount /media/removable/proc/
umount /media/removable/tmp/
umount /media/removable/sys/
umount /media/removable/dev/
umount /dev/sda2


Now we are going to pack a kernel that will be flashed over the first partition. This command will generate
the kernel command line:


echo "console=tty1 debug verbose \
root=/dev/sda2 rootwait ro" > /tmp/config 


Now I suggest to make a second config file with the read-write flag on the kernel


echo "console=tty1 debug verbose \
root=/dev/sda2 rootwait rw" > /tmp/config.rw


The reason for this as I had problems booting the first time with the ‘ro’ flg. More on this later.


This command will create newkern as the binary image and sign it with the verified boot tools:


vbutil_kernel --pack /home/chronos/user/Downloads/newkern \
--keyblock /usr/share/vboot/devkeys/kernel.keyblock \
--version 1 \
--signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
--config=/tmp/config \
--vmlinuz /boot/vmlinuz-3.4.0 --arch arm


Also create a second kernel image with the ‘rw’ flag so that you can use this if you have problems booting
the first kernel:


vbutil_kernel --pack /home/chronos/user/Downloads/newkern.rw \
--keyblock /usr/share/vboot/devkeys/kernel.keyblock \
--version 1 \
--signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
--config=/tmp/config.rw \
--vmlinuz /boot/vmlinuz-3.4.0 --arch arm


In my experience I had to write out the kernel with the ‘rw’ flag to the first partition first in order to
make it work:


dd if=/home/chronos/user/Downloads/newkern.rw of=/dev/sda1


Output:
7240+0 records in
7240+0 records out
3706880 bytes (3.7 MB) copied, 3.7376 s, 992 kB/s


Verify the current kernel on the disk:


vbutil_kernel --verify  /dev/sda1




Key block:  
Size:                0x4b8  
Flags:               7  !DEV DEV !REC  
Data key algorithm:  4 RSA2048 SHA256  
Data key version:    1  
Data key sha1sum:    d6170aa480136f1f29cf339a5ab1b960585fa444
Preamble:  Size:                0xfb48  
Header version:      2.0  
Kernel version:      1  
Body load address:   0x100000  
Body size:           0x379000  
Bootloader address:  0x479000  
Bootloader size:     0x0
Body verification succeeded.






The final step is to mark the partition on the USB stick as known good so
that the firmware will try to boot it. I have tried many different permutations and this is the one that
worked for me: 


cgpt add -i 2 -S 1 -T 5 -P 5 -t kernel -l KERN-A /dev/sda


A breakdown of this command: for partition index 1 (/dev/sda1), mark it as successful, priority to 5 and
tries to 5. Typing:


cgpt show /dev/sda


should give “Type: ChromeOS kernel” for partition 1, otherwise you have done something wrong.


Now, enable booting from "USB":


crossystem dev_boot_usb=1


You only perform this command once. You’ll more than most likely get this error:


Unable to open FDT property nonvolatile-context-storage


Just ignore it.


Then reboot. At the developer mode screen press CTRL+U to load the kernel and boot from the USB stick.


Fingers crossed, now you should have a familiar boot sequence and a login prompt.  What I have done at this
point is to reboot the Chromebook into Chrome OS and rewrite out the kernel with the ‘ro’ flag to the
first partition and reboot again:


dd if=/home/chronos/user/Downloads/newkern of=/dev/sda1


But you might be luckier at skipping this part.


So let’s go back to the login prompt. As root run:


ifconfig mlan0 up
wpa_supplicant -c /etc/wpa_supplicant.conf -i mlan0 -d


Test if it works, you should see a long stream of data and a reference to  “CONNECTED”


Press CTRL+C to kill the process and restart it in the background:


wpa_supplicant -c /etc/wpa_supplicant.conf -i mlan0 -B
dhcpcd mlan0


Where to go from here? Now that you have a proper internet connection you should at least install the a, ap, f
and n series:


slackpkg install a ap f n


But you probably want a full graphical environment, in which case you need the l, x and xap series. I advise
against installing the Kde environment but you might well need some individual packages from the kde and
kdei series. If you need to build packages from sources you also need all the D (development) package series.


I plan to write a second tutorial once I have a full graphical system and am able to test how audio and video
perform on this system. For now, happy hacking!
_______________________________________________
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
Picon

Slackware minirootfs on unsupported device wm8850

I successfully booted the minirootfs on my wm8850 7 inch netbook
( Wondermedia SoC, device produced in China ).
I could login as root/passwd from console tty1.

Since I am a complete beginner with Slackware I would like to have
some help how I get in a 1st step the network running on the minirootfs
system.

My ( sel-cross-compiled ) kernel ( 3.9.0-rc7 ) detects detects
successfully a plugged in Logilink USB ALAN stick : ifconfig
and iwconfig show wlan0
eth0 is not supported at the moment by my kernel - maybe in the near
future.

I tried wpa_supplicant call with a wpa_supplicant.conf which runs
fine under Debian but I got no connection.

Have you any recommendation what I could/must do now to get WiFi
running ?
dowelld | 1 May 2013 00:02

Slackware ARM on Raspberry Pi

Hi,

The packages from Dave's Collective (Kernel 3.1.9) don't seem to support the extra memory on the revised Raspberry Pi Model B board. I think this is because the firmware package used is downlevel.

So I've made some new firmware, kernel (3.6.11) and module packages. They can be found here http://www.dowelld.net/?p=43.

Thanks
Dave
_______________________________________________
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
Ben Bauer | 15 Apr 2013 21:46
Picon
Favicon

Avatar S701-R2A-1 Sirius 7" Tablet

http://www.comtronic.ca/cci/home.php?do=ShowProducts&cmd=detail&cid=NB&pid=017133

CPU	ARM Cortex-A9 1.0GHz Single Core
GPU	Mali-400, with 3D Accelerator
Memory	1GB DDR3
Storage	4GB NAND Flash
Display	7" TFT-LCD
...
I/O Ports	1 x Micro USB 2.0 Port
1 x Mini HDMI Port
1 x TF Card Slot
1 x Power Port

Does anyone have experience with this (or similar hardware)?
I am hoping to put Slackware native on this and move over some
python programs (currently prototyped on an Atom processor)
that I have written for classroom use ( audience response
system, multiple choice testing, flashcards etc).  I am a Slacker
since 1994 but ARM is new to me.  Naive questions:

1) any chance I can boot from CF card ?
2) if so, is a USB keyboard likely to autodetect?
3) would X be mulitouch or single?
4) is there a better/easier sub $100 device I should consider?
Norman Evanson | 15 Apr 2013 17:54
Favicon

(no subject)

unsubscribe


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________
ARMedslack mailing list
ARMedslack <at> lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
Ottavio Caruso | 13 Apr 2013 10:51
Picon
Favicon

TI OMAP 3630, was: Omap video driver request.

On 12 April 2013 14:44, Ottavio Caruso <ottavio2006-usenet2012 <at> yahoo.com> wrote:
> On 12 April 2013 14:33,  <openpandora <at> free.fr> wrote:
>> Hi !
>>
>> The omap driver isn't included in Slackware ARM:
>> http://cgit.freedesktop.org/xorg/driver/xf86-video-omap/

And incidentally, I have a Samsung 4.2'' player with CPU OMAP 3630.
Does anybody know if it's fully supported (module and firmware-wise)
in the vanilla kernel?

Thanks

--

-- 
Ottavio
openpandora | 12 Apr 2013 23:54
Picon
Favicon

xorgsetup doesn't seem to produce any xorg.conf

Hi !

Tried two times.

LS
openpandora | 12 Apr 2013 15:33
Picon
Favicon

Omap video driver request.

Hi !

The omap driver isn't included in Slackware ARM:
http://cgit.freedesktop.org/xorg/driver/xf86-video-omap/

LS
openpandora | 12 Apr 2013 00:09
Picon
Favicon

Openjre/jdk in -current.

Hi !

I would like to know about it's inclusion in /d , or it's non-inclusion (in /patches ?).

LS
Stuart Winter | 10 Apr 2013 15:38
Favicon

Raspberry Pi Linux kernel versions for Slackware ARM 14.0


Hi

When I bumped the minimum kernel version required by glibc to Linux 3.4.0,
I'd checked the Raspberry Pi stuff and believed that the Raspberry Pi's
had a mimimum of Linux Kernel v3.6 available.

From what I can see now, it looks like some of the RPi images are using
Linux 3.1.  Is there anyone who's distributing anything that's older than
this version?  It looks like I'll need to respin glibc to change the
mimimum kernel to be 3.1.0 so that RPi users can upgrade to Slackware ARM
14.0 to 14.1.

--

-- 
Stuart Winter
www.slackware.com/~mozes
Slackware for ARM: http://arm.slackware.com

Gmane