Difference between revisions of "Software projects/OS/Slackware"
Linux-SWAT (talk | contribs) (→Installation) |
Linux-SWAT (talk | contribs) (→Installation) |
||
Line 52: | Line 52: | ||
= Installation = | = Installation = | ||
− | Note: if you're a Linux noob, and you're scared by this Wiki page, check [http://boards.openpandora.org/index.php?/topic/11132-tutorial-format-your-sd-card-and-install-slackware-using-only-your-pandora/#entry206993 this simple tutorial] from F_Slim. Thanks to him. | + | Note: if you're a Linux noob, and you're scared by this Wiki page, check [http://boards.openpandora.org/index.php?/topic/11132-tutorial-format-your-sd-card-and-install-slackware-using-only-your-pandora/#entry206993 this simple tutorial] from F_Slim. Thanks to him.<br> |
+ | Note: if you are one of the last windows users, you can install SL4P using the method nicely provided by ingoreis. Check [http://boards.openpandora.org/index.php?/topic/10548-slackware14rc3-for-pandora-pretty-easy-install-for-windows-users/ this thread.] | ||
* Format a 8G or more SD card with the Ext2 filesystem. To make explanations clear, name it SLACK. | * Format a 8G or more SD card with the Ext2 filesystem. To make explanations clear, name it SLACK. | ||
* If you don't know how to format a drive, use GParted under Linux, or run their [http://sourceforge.net/projects/gparted/files/latest/download?source=files Live-CD]. Here's the [http://gparted.sourceforge.net/display-doc.php?name=help-manual manual]. | * If you don't know how to format a drive, use GParted under Linux, or run their [http://sourceforge.net/projects/gparted/files/latest/download?source=files Live-CD]. Here's the [http://gparted.sourceforge.net/display-doc.php?name=help-manual manual]. | ||
Line 77: | Line 78: | ||
* Grab the latest 14.0 rootfs [http://slackware.openpandora.org/pandora/index.php?dir=sl4p%2Fsl4p-14.0%2Frootfs here.] | * Grab the latest 14.0 rootfs [http://slackware.openpandora.org/pandora/index.php?dir=sl4p%2Fsl4p-14.0%2Frootfs here.] | ||
Or | Or | ||
− | * Grab the latest -current (unstable) rootfs [http://slackware.openpandora.org/pandora/index.php?dir=sl4p%2Fsl4p-current%2Frootfs here.] The -current repository may be empty. It's because a new stable release is out. | + | * Grab the latest -current (unstable) rootfs [http://slackware.openpandora.org/pandora/index.php?dir=sl4p%2Fsl4p-current%2Frootfs here.] The -current repository may be empty. It's because a new stable release is out. |
+ | * Plug back the SD card. | ||
* Uncompress the rootfs on your SD. Be root, using su -, or sudo: | * Uncompress the rootfs on your SD. Be root, using su -, or sudo: | ||
sudo tar jxvfp SL4P-[version]-[build].tar.bz2 -C /media/SLACK/ --numeric-owner | sudo tar jxvfp SL4P-[version]-[build].tar.bz2 -C /media/SLACK/ --numeric-owner | ||
− | |||
= First run = | = First run = |
Revision as of 22:56, 23 December 2012
Contents
- 1 Disclaimer
- 2 Helping this project
- 3 Older releases Wiki pages
- 4 Stable or -current ?
- 5 Media choice
- 6 Installation
- 7 First run
- 8 Autologin
- 9 Basic usage
- 10 Setting up your language
- 11 Services started at boot
- 12 Installing a program - Tools
- 13 Installing a program from source
- 14 Installing a program with a precompiled archive
- 15 About SL4P precompiled archives
- 16 Installing KDE 4
- 17 Updates
- 18 SL4P-specific updates
- 19 Kernel updates
- 20 Automounting a SD card or an USB drive
- 21 Suspend and powersaving
- 22 Fixing the endless reboot
- 23 Fast boot tweak
- 24 PND compatibility list
- 25 Advanced usage
- 26 Xfce layout chooser
- 27 Sources
- 28 Build system
- 29 Ask a question/Report a bug
Disclaimer
Hi, this is Linux-SWAT.
Welcome to the SL4P, Slackware for Pandora, Wiki pages.
SL4P is a Slackware ARM overlay.
Slackware ARM is the official ARM Slackware port.
Slackware ARM was formerly known as ARMedslack.
The technical forum page is located here: http://boards.openpandora.org/index.php?/topic/1524-slackware-inside-pandora/
I'm the maintainer of this Slackware port, and you can find me here: http://boards.openpandora.org/index.php?/user/1035-linux-swat/
If you have questions, i suggest you to share it on the boards, not asking me privately.
Important notes:
SL4P is not affiliated in any way with Slackware or Slackware ARM.
Please DO NOT contact any of them if you have problems with it. Contact ME.
SL4P is not affiliated in any way with Open Pandora GmbH or Open Pandora Ltd.
Please DO NOT contact any of them if you have problems with it. Contact ME.
This software is distributed as is. You are on your own responsibility when using it.
I distribute this documentation under the GPL 3 license. http://www.gnu.org/licenses/gpl.html
Helping this project
- Please consider making a donation.
- This will help the SL4P project, and also the whole Pandora community, as part of it funds pre-orders.
- To do so, go to PayPal, log in and click on "Send Money". Donate to donation@openpandora.org and indicate in the PayPal comment field that you are donating for the Slackware project. Then PM me, so i will include you in my thx list ;^).
Older releases Wiki pages
- To keep this front page clean for the most recent release - 14.0 -, i moved previous versions elsewhere.
- The old page for the 13.37 release is located here.
Stable or -current ?
- Stable is for production use, ie. for work, as a server etc..
- -current is a work in progress. Although it's pretty usable, some things may be broken/unstable.
- I won't rebuild the 14.0 if there's no big bad bug, i'll just add important features as packages. Of course, official Slackware updates are included.
- -current rootfs may be smaller or bigger from build to build, as i can include or remove KDE, amongst other things.
- If you want to help the development, i prefer that you use -current.
- And finally, -current repository may be empty. It's because a new stable release is out.
Media choice
- SL4P runs on a SD card. It fits well on 8G, but 16G or more are recommended if you plan to install all the pre-compiled packages.
- The SD card must support Linux filesystems, see this SD compatibility chart.
- I myself recommend the SanDisk Extreme cards. The extra speed of the Extreme Pro is not needed on the Pandora, but they also work fine.
Installation
Note: if you're a Linux noob, and you're scared by this Wiki page, check this simple tutorial from F_Slim. Thanks to him.
Note: if you are one of the last windows users, you can install SL4P using the method nicely provided by ingoreis. Check this thread.
- Format a 8G or more SD card with the Ext2 filesystem. To make explanations clear, name it SLACK.
- If you don't know how to format a drive, use GParted under Linux, or run their Live-CD. Here's the manual.
- It's highly recommended to have a second partition formated as a swap. 256M or more is a good choice. 512M is wiser is you plan to compile some stuff, or for server use.
- If you don't plan to use this partition configuration (OS followed by swap), you'll have to edit the /media/SLACK/etc/fstab after having uncompressed the rootfs.
- If you're cleaning up a previous SL4P installation for a fresh new one, proceed like this:
rm -rf /media/SLACK/* rm -rf /media/SLACK/.cache/ rm -rf /media/SLACK/.keepdir/ rm -rf /media/SLACK/.splash/ rm -rf /media/SLACK/.subversion/ rm -rf /media/SLACK/.Trash-0/
then unmount, fsck and sync before plugging back the card.
- To do this, get the SD device name:
cat /proc/mounts
You will see something like:
/dev/sdc1 /media/SLACK ext2
- Unmount the partition:
umount /media/SLACK/
then check the partition with fsck
fsck -y /dev/sdc1
and sync:
sync
- Grab the latest 14.0 rootfs here.
Or
- Grab the latest -current (unstable) rootfs here. The -current repository may be empty. It's because a new stable release is out.
- Plug back the SD card.
- Uncompress the rootfs on your SD. Be root, using su -, or sudo:
sudo tar jxvfp SL4P-[version]-[build].tar.bz2 -C /media/SLACK/ --numeric-owner
First run
- Be sure your Pandora's clock is set. Otherwise, your filesystem will be checked.
- Power down your Pandora, insert the SD card in the left slot (also called slot 1), and power on your unit.
- If you're prompted to enter the root password for maintenance or to type Ctrl-D, just wait, the unit will restart and check the filesystem automatically.
- You will be prompted to choose a password for the root user.
- You will be prompted to create an user. At some explicit point, push [up] to put this user in adequate groups.
- Then you'll be driven to the log in screen. Do not log in as the root user
Bug: very unlikely to happen, but when using startx (not the SL4P default setup), you can be blocked at a black screen. Use pandora button + power to reboot.
Autologin
- The Slim login manager, which is SL4P's default, can automatically log in an user. You're asked about it at the first login. Else, see /etc/slim.conf .
- KDM works, but is too heavy. You have to edit /etc/rc.d/rc.4 in order to use it.
Basic usage
- In order to type commands as root, you have to type su -. You can use just su, but i don't recommend it because you won't have the full root environment.
- When using adduser, at some explicit point, push [up] to put this user in adequate groups.
- To choose a window manager, type xwmconfig.
- I ship those ones:
Xfce fluxbox blackbox WindowMaker twm 9wm enlightenment17 jwm minimenu openbox wmii
- In some -current or -RC builds, i ship KDE. Avoid selecting it as full desktop on 256M Pandora.
- To power off, or reboot your Pandora when not in Xfce and it's user-friendly menus, become root with:
su -
and type:
halt
or
reboot
Setting up your language
- You can set your locale pretty easily. First, you have to know which languages are available, type:
locale -a
- Choose the one that suits best your need. I highly recommend to use the versions with .utf8 .
- Then be root and edit /etc/profile.d/lang.sh .
su - emacs /etc/profile.d/lang.sh
- You'll have to change this variable with the one you need:
export LANG=en_US.UTF-8
- Save the file and reboot.
Services started at boot
- To enable or disable services at boot, become root, then type pkgtool, then go in setup -> services, check the option with space then push enter.
- Some services are not listed here. For example, to activate the NFS server permanently, tweak /etc/exports and /etc/hosts.allow, then:
chmod +x /etc/rc.d/rc.nfsd /etc/rc.d/rc.nfsd start (not needed after a reboot)
Installing a program - Tools
- Slackware archives are .tgz or .txz .
- Slackware uses three powerful tools: installpkg, removepkg and upgradepkg.
- A fourth tool named makepkg build packages from compiled sources.
Installing a program from source
- The cleanest way to do it is to use a SlackBuild script: http://slackbuilds.org/guidelines/
- Many SlackBuilds for Slackware 14.0 are already available here: http://slackbuilds.org/repository/14.0/
- I shipped a tool named sbopkg, which does the job for you. Become root using su - , then sync it with the internet repository with:
sbopkg -r
- The sync will take a long time. Once you've done that, run /root/sboflags.sh to optimize the builds for the Pandora.
- You have to run this script after every sync. A fistful of programs (like ilbc or lua, which need -fPIC) will still need a bit of tweaking.
- Then all is set up, you just have to use
sbopkg
and choose "Local SlackBuild" when prompted.
- When the job is done, remove useless files to save disk space:
rm -rf /tmp/SBo/* rm -rf /var/cache/sbopkg/*
- Note that Slackware does not check dependencies, so you have to get the right build orders looking here: http://slackbuilds.org/
- To check if some of the dependencies are already installed in your system, look in /var/log/packages/ . For example, libgnomecanvas:
ls /var/log/packages/libgnomecanvas*
- Also note that gnome libraries must be compiled in a certain order. I already did the job, and shipped them in the rootfs.
- If you don't use a SlackBuild script, then the procedure almost always ends like:
make install DESTDIR=/tmp/whatever/ cd /tmp/whatever/ makepkg /tmp/whatever-1.0.0-arm-1.tgz installpkg /tmp/whatever-1.0.0-arm-1.tgz
Installing a program with a precompiled archive
- I compiled a lot (300+) of packages from http://slackbuilds.org/.
- I shipped a graphical install tool named GSlapt. Launch it with its icon, update the package list, then install what you need, checking the dependencies of your programs here: http://slackbuilds.org/
- You can also proceed manually. Find 14.0 packages here, and -current ones here.
- Download what you need, checking the dependencies of your programs here: http://slackbuilds.org/
- Put all needed .tgz or .txz in a folder, go root using su -, then type:
installpkg /path/to/your/folder/*.t?z
About SL4P precompiled archives
- All shipped and extra archives are compiled with sbopkg with Pandora-optimized flags.
-DPANDORA -O2 -pipe -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp
- The links to the sources are located here: http://slackbuilds.org/repository/
- The building order is fixed in queue files, kind of build playlist.
- The queues are located in /var/lib/sbopkg/queues/
- About shipped archives, you don't need to download them as they're already in the rootfs, see this.
- Some archives won't work, like Kompozer, because it's a repackaging of x86 binaries. As i'm not yet in the process of fine-tuning, i left them for now.
Installing KDE 4
- Plug the net, become root using su -, then type:
slackpkg update slackpkg install kde
- Note that although i already slimmed down KDE configuration files for less eye-candy, the 512M Pandora is recommended to run the full desktop.
- Anyway, you can run any KDE application (konqueror, kwrite...) flawlessly with the 256M version.
- Type xwmconfig to select KDE.
Updates
- For stable releases, plug the net, become root using su -, then type:
slackpkg update slackpkg upgrade-all
- Do not do use slackpkg when using a -current. Instead, look at the changelog, download packages from here, become root using su -, then type:
upgradepkg /path/to/the/updates/*.t?z
- 14.0 updates are notified here. If you need an up-to-date security, you should consider subscribing to the main Slackware mailing list. Slackware ARM updates are generally available a bit later.
- You can also set up a cronjob. In this case, check /etc/slackpkg/blacklist to ensure some critical packages (ie., kernel) will not be updated.
- Slackware usually provides updates during 10+ years, but it seems to be less with Slackware ARM. See the news for more details.
SL4P-specific updates
- I provide Pandora fixes, available as Slackware archives.
- 14.0 fixes are located here.
- Grab them, become root using su -, then type:
upgradepkg --install-new /path/to/the/updates/*.t?z
- You don't need to install those updates when using a rootfs build more recent than the update.
Kernel updates
- I provide kernel updates, and also a real time kernel.
- You don't need to install those updates when using a rootfs build more recent than the update.
- To know which kernel currently runs, type:
uname -r
- Grab the latest kernel pack from here.
- Install it with:
su - upgradepkg --install-new kernels-[yyyymmdd]-arm-1.tgz
- To enable a new kernel, for example 3.2.30-szfinal or the 3.2.26-rt, do:
cd /boot rm uImage cp uImage-3.2.30-szfinal uImage
or:
cd /boot rm uImage cp uImage-3.2.26-rt uImage
And reboot.
- If lsmod reports that no modules are loaded (that means, eg., no touchscreen), then run as root:
depmod -a
And reboot again.
Automounting a SD card or an USB drive
- No system-wide automounter is enabled for now. It's still a work in progress and not perfect so i don't include this for now.
- Only Xfce automounts.
- As Xfce mounts devices at insertion, if you booted with a second SD card or an USB drive plugged in, you have to click on the device icon.
- If you plan to use Minimenu, you currently have to automount under Xfce, run xwmconfig, then log out to run Minimenu. This is the best method to save RAM.
- You can also launch Minimenu under Xfce. Open a terminal and type:
mmwrapper -fmmenu
Suspend and powersaving
- I enabled the USB support by default, therefore, as said Notaz, it "Uses around 3x more power when idle, fails to suspend properly.".
- If you want to disable USB support at boot, be root and edit /etc/rc.d/rc.local .
Near the top, change
modprobe ehci-hcd
into a comment:
#modprobe ehci-hcd
- After that you will have type this command as root, or click on the Xfce "Toggle USB Host" icon whenever you need USB support.
Fixing the endless reboot
- Be sure your Pandora's clock is set. Boot Official Pandora OS on the NAND, and check/set time.
- Boot SL4P, when prompted to enter the root password for maintenance, do it, then type:
fsck -y /dev/mmcblk0p1
Fast boot tweak
- I moved some of the boot stuff (ldconfig, font cache, mime database) in /etc/rc.d/rc.local_shutdown.
- The reboot/power off process is slowered, but the OS integrity is safe.
PND compatibility list
- SL4P supports .pnd files.
- PNDs used to be recognized automatically. It's not the case anymore, and i don't know why.
- So here's the workaround: after the insertion of your SD or USB drive, you have to push the green button near the Xfce menu.
- Due to 3.2 kernel and dynamically linked libraries, not all .pnd are compatible.
- View the PND compatibility list here.
Advanced usage
- I wrote some tutorials to do interesting things.
- All those guides are applicable to any version of Slackware, ie. x86, x86_64, IBM mainframe, etc.
- Follow this link.
Xfce layout chooser
- This is a beta work and may or may not be included in a release.
- The icon is located in "System".
- I'm developing it, it's currently in beta stage.
- You can save your own Xfce configuration, and load others.
- If you want to use it, please use the save feature prior to anything else.
- Only one custom layout is available right now.
Sources
- See the build system, below.
Build system
- I distribute it under the GPL 3 license.
- It may look a bit messy for now (and indeed, some part have to be cleaned), but it's versatile, as i intended from the start.
- It's mainly three bash scripts.
- You need a Pandora to run the third one.
- Depending on what you comment/uncomment, you can produce an alpha build, very minimal, or a full build.
- Depending on what you edit, you can use it to port any *NIX to Open Pandora, and maintain your build very easily.
- Get it here, along the more detailed instructions.