https://wiki.archlinux.org/api.php?action=feedcontributions&user=Paranoos&feedformat=atomArchWiki - User contributions [en]2024-03-29T06:33:22ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Gapless_Audio_CD_Creation_from_MP3s&diff=75082Gapless Audio CD Creation from MP3s2009-09-03T20:17:24Z<p>Paranoos: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Creating gapless audio CDs from MP3 HOWTO}}<br />
{{i18n_entry|简体中文|怎样从MP3制作无间隙音乐CD}}<br />
{{i18n_links_end}}<br />
<br />
==Introduction==<br />
Some albums are meant to be played without any silent gap between tracks -- especially live albums. Furthermore, when you copy a regular album that has gaps, the ripped audio files will actually include this gap at the end of each track -- to burn these tracks with a gap will actually increase the length of silence between tracks. Therefore, in almost all cases, you are better off burning all your CD backups gaplessly.<br />
<br />
Here's an easy way to burn a gapless audio CD from the shell using cdrdao.<br />
<br />
==Setup==<br />
We'll be using a few programs for this.<br />
pacman -Sy lame cdrdao<br />
<br />
Optional: Let's configure cdrdao to use our CD burner. Open up <tt>/etc/cdrdao.conf</tt> (as root), and enter the /dev entry for your burner in this format:<br />
write_device: "/dev/cdrw"<br />
<br />
==Decode the MP3s==<br />
First of all, copy all the songs you want on the CD to a folder. If necessary, rename them to reflect the order you want the tracks to be laid out (such as 01.mp3, 02.mp3, etc). Now we're going to decode all the mp3s into uncompressed wav files. Take note that a full album can take up more than 800MB in wav files alone.<br />
mkdir wav<br />
for file in *.mp3 ; do<br />
lame --decode "$file" "wav/$file.wav"<br />
done<br />
<br />
==Create a Table of Contents file==<br />
Once finished, let's make a Table of Contents file that describes the layout of the CD.<br />
cd wav<br />
{<br />
echo "CD_DA"<br />
for file in *.wav ; do<br />
echo "TRACK AUDIO"<br />
echo "FILE \"$file\" 0"<br />
done<br />
} > toc<br />
<br />
Optionally, if you would like to insert a 2-second gap between certain tracks, you can edit the toc file and insert this line between the TRACK AUDIO and FILE lines for that track:<br />
PREGAP 00:02:00<br />
<br />
Of course, you can change the gap length to any time you desire.<br />
<br />
==Burn==<br />
Finally, all we have to do is burn the CD.<br />
cdrdao write toc<br />
<br />
Some people prefer to burn audio CDs at a low speed for higher quality. Here's an example for burning at 8x:<br />
cdrdao write --speed 8 toc</div>Paranooshttps://wiki.archlinux.org/index.php?title=Gapless_Audio_CD_Creation_from_MP3s&diff=75079Gapless Audio CD Creation from MP3s2009-09-03T20:09:18Z<p>Paranoos: /* Create a Table of Contents file */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Creating gapless audio CDs from MP3 HOWTO}}<br />
{{i18n_entry|简体中文|怎样从MP3制作无间隙音乐CD}}<br />
{{i18n_links_end}}<br />
<br />
==Setup==<br />
We'll be using a few programs for this.<br />
pacman -Sy lame cdrdao<br />
<br />
Optional: Let's configure cdrdao to use our CD burner. Open up <tt>/etc/cdrdao.conf</tt> (as root), and enter the /dev entry for your burner in this format:<br />
write_device: "/dev/hdc"<br />
<br />
==Decode the MP3s==<br />
First of all, copy all the songs you want on the CD to a folder. It's best to rename them to reflect the order you want the tracks to be laid out (such as 01.mp3, 02.mp3, etc). Now we're going to decode all the mp3s into uncompressed wav files. Please realize that a full album can take up more than 800MB in wav files alone. This will take some time.<br />
mkdir wav<br />
for file in *.mp3 ; do<br />
lame --decode "$file" "wav/$file.wav"<br />
done<br />
<br />
==Create a Table of Contents file==<br />
Once finished, let's make a Table of Contents file that describes the layout of the CD.<br />
cd wav<br />
{<br />
echo "CD_DA"<br />
for file in *.wav ; do<br />
echo "TRACK AUDIO"<br />
echo "FILE \"$file\" 0"<br />
done<br />
} > toc<br />
<br />
Optionally, if you would like to insert a 2-second gap between certain tracks, you can edit the toc file and insert this line between the TRACK AUDIO and FILE lines for that track:<br />
PREGAP 00:02:00<br />
<br />
==Burn==<br />
Finally, all we have to do is burn the CD.<br />
cdrdao write toc<br />
<br />
Some people prefer to burn audio CDs at a low speed for higher quality. Here's an example for burning at 8x:<br />
cdrdao write --speed 8 toc</div>Paranooshttps://wiki.archlinux.org/index.php?title=Gapless_Audio_CD_Creation_from_MP3s&diff=75077Gapless Audio CD Creation from MP3s2009-09-03T20:02:46Z<p>Paranoos: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Creating gapless audio CDs from MP3 HOWTO}}<br />
{{i18n_entry|简体中文|怎样从MP3制作无间隙音乐CD}}<br />
{{i18n_links_end}}<br />
<br />
==Setup==<br />
We'll be using a few programs for this.<br />
pacman -Sy lame cdrdao<br />
<br />
Optional: Let's configure cdrdao to use our CD burner. Open up <tt>/etc/cdrdao.conf</tt> (as root), and enter the /dev entry for your burner in this format:<br />
write_device: "/dev/hdc"<br />
<br />
==Decode the MP3s==<br />
First of all, copy all the songs you want on the CD to a folder. It's best to rename them to reflect the order you want the tracks to be laid out (such as 01.mp3, 02.mp3, etc). Now we're going to decode all the mp3s into uncompressed wav files. Please realize that a full album can take up more than 800MB in wav files alone. This will take some time.<br />
mkdir wav<br />
for file in *.mp3 ; do<br />
lame --decode "$file" "wav/$file.wav"<br />
done<br />
<br />
==Create a Table of Contents file==<br />
Once finished, let's make a Table of Contents file that describes the layout of the CD.<br />
cd wav<br />
{<br />
echo "CD_DA"<br />
for file in *.wav ; do<br />
echo "TRACK AUDIO"<br />
# echo "PREGAP 00:02:00" # insert a 2-second silent gap before each track<br />
echo "FILE \"$file\" 0"<br />
done<br />
} > toc<br />
<br />
==Burn==<br />
Finally, all we have to do is burn the CD.<br />
cdrdao write toc<br />
<br />
Some people prefer to burn audio CDs at a low speed for higher quality. Here's an example for burning at 8x:<br />
cdrdao write --speed 8 toc</div>Paranooshttps://wiki.archlinux.org/index.php?title=Wine&diff=47379Wine2008-08-08T21:28:08Z<p>Paranoos: /* Sound */</p>
<hr />
<div>[[Category:Wine (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{stub}}<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|Wine}}<br />
{{i18n_entry|简体中文|Wine (简体中文)}}<br />
{{i18n_links_end}}<br />
<br />
= About =<br />
Wine is an Open Source implementation of the Windows API on top of X and Unix.<br />
See the wine homepage for more details.<br />
<br />
= Installation =<br />
Wine is available in the official [extra] repository: [http://www.archlinux.org/packages/8958/ Wine]<br />
<br />
Simply do <br />
pacman -Sy wine<br />
and wine is installed.<br />
<br />
= Configuration =<br />
To create configuration files do<br />
winecfg<br />
review the settings and click ok to save. The wine directory with config files resides in <br />
~/.wine<br />
and by default C:\> will be mapped to<br />
~/.wine/drive_c<br />
<br />
Ok! This is the basic configuration. You can try to run something using:<br />
wine /path/to/something.exe<br />
<br />
==Sound==<br />
By default sound issues may arise when running Wine applications. Ensure only one sound device is selected in ''winecfg''. Alsa should work out of the box but is still glitchy & slow in some games, there exists a patch for this issue here:<br />
<br />
http://kcat.strangesoft.net/wine_thread_prio.diff mirror: http://pastebin.archlinux.org/341<br />
<br />
but using oss and selecting winecfg -> Sound -> Hw acceleration -> Emulation will also fix the audio issues for you provided you are using the alsa oss emulation kernel modules. (<b>Note:</b> using the aoss utility does <i>not</i> solve the issue; you must load the snd-pcm-oss module.)<br />
<br />
==Fonts==<br />
<br />
If wine applications are not showing easily readable fonts, you may not have Microsoft's Truetype fonts installed. Luckily arch has a package for that.<br />
pacman -Sy ttf-ms-fonts<br />
After running such program, kill all wine servers and run winecfg; fonts should be legible now.<br />
<br />
Other TTF fonts you wish to install should go in $C_DRIVE/windows/fonts/ (where $C_DRIVE is usually ~/.wine/drive_c) for wine to recognize them. <br />
<br />
= Using Wine to execute Win16 / Win32 binaries =<br />
<br />
You can execute binaries by calling '''wine''' manually<br />
<br />
wine programsname.exe<br />
<br />
It is also possible to tell the kernel to use '''wine''' as an interpreter for all Win16/Win32 binaries. First mount the binfmt_misc filesystem:<br />
<br />
mount -t binfmt_misc none /proc/sys/fs/binfmt_misc<br />
<br />
or add this line to your '''/etc/fstab'''<br />
<br />
none /proc/sys/fs/binfmt_misc binfmt_misc defaults 0 0<br />
<br />
Then tell the kernel how to interpret Win16 and Win32 binaries:<br />
<br />
echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register<br />
<br />
You can add this line to '''/etc/rc.local''' to make this setting permanent. In this case you may want to ignore stderr to avoid error messages when changing runlevels:<br />
<br />
{ echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register; } 2>/dev/null<br />
<br />
Now try this:<br />
<br />
chmod 755 exefile.exe<br />
./exefile.exe<br />
<br />
You can even remove the '''.exe''' extension, because the kernel doesn't identify the file by its extension.<br />
<br />
==Wine Configuration Utilities==<br />
These tools will assist in the installation of typical Windows components. In most cases they should be used as a last effort, as it may severely alter your wine configuration. <br />
<br />
===WineTools assistant===<br />
Winetools is a program (more of a script, in fact) that facilitates in the installation of some core components for wine in order to install other programs. Note this is not necessary for wine, but does help if you want to get Internet Explorer running.<br />
<br />
[http://www.von-thadden.de/Joachim/WineTools/ WineTools Site]<br />
<br />
Keep in mind, Microsoft says you must have a license for IE6 in order to install DCOM98 or Internet Explorer 6. If you've ever owned a copy of Windows, you should be all set. Although I'm sure no one will hunt you down if you don't have the license.<br />
<br />
Now grab the PKGBUILD from the AUR: [http://aur.archlinux.org/packages.php?do_Details=1&ID=4893&O=0&L=0&C=0&K=winetools&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd AUR: Wine]<br />
<br />
and build the package as you would any PKGBUILD (if you dont know how: [[ABS_-_The_Arch_Build_System]])<br />
<br />
=== Sidenet Wine Configuration Utility ===<br />
<br />
[http://sidenet.ddo.jp/winetips/config.html wine-config]<br />
<br />
* Download the latest version<br />
* unpack it<br />
* READ THE README<br />
* execute<br />
./setup<br />
* Follow the instructions<br />
<br />
'''Keep in mind''': Like stated on the [http://sidenet.ddo.jp/winetips/config.html site], you're only allowed to install DCOM98 if you possess a valid License for Windows98.<br />
<br />
===Wine-doors===<br />
<br />
[http://www.wine-doors.org/ Wine-doors]<br />
<br />
Wine-doors is a WineTools replacement. It features a GNOME GUI and works like a package manager. Works fine in 64bit. You can [http://aur.archlinux.org/packages.php?ID=11823 find it in the AUR].<br />
<br />
= Alternatives to run Win16 / Win32 binaries on archlinux =<br />
* [[Cedega]] - Aimed at gamers<br />
* [[CVSCedega]] - CVS source version of cedega<br />
* [[Codeweavers]] - Codeweavers' Crossover Office; Aimed at Office Users<br />
<br />
= External Resources =<br />
* http://www.winehq.com/<br />
* Installing Internet Explorer 5, 5.5 and 6 with wine: http://wiki.archlinux.org/index.php/Ies4linux or http://www.tatanka.com.br/ies4linux/</div>Paranooshttps://wiki.archlinux.org/index.php?title=Beryl&diff=23407Beryl2007-04-23T20:12:16Z<p>Paranoos: /* No Desktop, Beryl as window manager only */</p>
<hr />
<div>[[Category:Eye candy (English)]]<br />
[[Category:Desktop environments (English)]]<br />
[[Category:Tutorials (English)]]<br />
Beryl is a window and composition manager. It has been created as a fork of compiz. Archlinux provides Beryl release and development (git) packages.<br />
<br />
= Installing Beryl =<br />
==Stable version==<br />
There are binary packages available in the ''extra'' repository. Make sure your system is up to date.<br />
Install beryl using one of the commands<br />
# pacman -Sy beryl<br />
<br />
# pacman -Sy beryl-kde<br />
<br />
# pacman -Sy beryl-gnome<br />
<br />
This will install all necessary packages. There are some nice extra plugins:<br />
# pacman -Sy beryl-extras<br />
<br />
==Development (git) version==<br />
If you want to try the latest beryl development version, activate the ''unstable'' repository in pacman.conf. Like above, install beryl using one of the following commands:<br />
# pacman -Sy beryl-git<br />
<br />
# pacman -Sy beryl-git-kde<br />
<br />
# pacman -Sy beryl-git-gnome<br />
<br />
To get the extra plugins, type<br />
# pacman -Sy beryl-git-extras<br />
<br />
= Preparing Xorg for beryl =<br />
<br />
Beryl has two rendering paths. The "Texture from Pixmap" path runs faster but doesn't work on all hardware yet. The "Copy" path works an almost any hardware, but uses more CPU and RAM.<br />
<br />
== Using "Texture from Pixmap" rendering ==<br />
<br />
The GLX_EXT_texture_from_pixmap extension is needed for this rendering path. This extension is currently provided by Xorg if you either use the 9xxx nvidia drivers or the AIGLX extension. It is also provided by Xgl.<br />
<br />
This rendering path is used by default if possible. You can force it by setting ''Advanced Beryl options -> Rendering path -> Texture from Pixmap'' in beryl-manager or starting ''beryl --use-tfp''.<br />
<br />
=== Using nvidia drivers ===<br />
<br />
If you have a nvidia, install the latest nvidia drivers. See [[How to install NVIDIA driver]] if you still don't use it. They support the long awaited "GLX_Texture_From_Pixmap" extension.<br />
<br />
Edit the ''/etc/X11/xorg.conf'' file:<br />
<br />
Note: There is an information on the net which states the Option "AddARGBGLXVisuals" should be added to ''Screen'' section on your xorg.conf file. Try this if you are getting random crashes.<br />
<br />
Section "Module"<br />
[...]<br />
Load "glx"<br />
[...]<br />
EndSection<br />
<br />
[...]<br />
<br />
Section "Device"<br />
Driver "nvidia"<br />
[...]<br />
Option "TripleBuffer" "True"<br />
Option "AddARGBGLXVisuals"<br />
Option "AllowGLXWithComposite" "true" #needed if using the nvidia-71xx driver<br />
EndSection<br />
<br />
[...]<br />
<br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
<br />
=== Using open source drivers and AIGLX ===<br />
<br />
AIGLX currently works with the open source Intel and Radeon drivers, and maybe others. Add the following to your ''/etc/X11/xorg.conf'' file to enable AIGLX:<br />
Section "Module"<br />
[...]<br />
Load "glx"<br />
Load "dri"<br />
EndSection<br />
<br />
[...]<br />
<br />
Section "Device"<br />
[...]<br />
Option "XAANoOffscreenPixmaps" "true"<br />
Option "DRI" "true"<br />
EndSection<br />
<br />
[...]<br />
<br />
Section "ServerLayout"<br />
[...]<br />
Option "AIGLX" "true"<br />
EndSection<br />
<br />
[...]<br />
<br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
If your xorg driver doesn't support AIGLX, then the effects won't work.<br />
<br />
=== Using XGL ===<br />
<br />
Open Beryl Manager. Right click on the gem in the panel and choose 'advanced beryl options'.<br />
It is safest to set all to automatic if you have a separate KDM session for "KDE with XGL support"; Beryl will utilize XGL if detected, or nVidia/ATI drivers from normal sessions without XGL support. <br />
Refer to this [[Xgl|wiki entry]] for installing Xgl.<br />
Once installed, log out, restart X, right click on the gem in the panel and go to 'select window manager', choose 'Beryl'. At this point Beryl should load up and you're done.<br />
<br />
== Using "copy" rendering ==<br />
<br />
To use this rendering path, your graphics driver has to support 3D acceleration, and the Composite extension, and they have to play well together. This is true for older nvidia drivers, but unfortunately not for ATI's fglrx driver.<br />
<br />
This rendering path is used by default if ''texture from pixmap'' is not available. You can force it by setting ''Advanced Beryl options -> Rendering path -> Copy'' in beryl-manager or starting ''beryl --use-copy''.<br />
<br />
= Starting Beryl =<br />
<br />
== Just try it ==<br />
<br />
If you simply want to try beryl, you can start<br />
$ beryl-manager<br />
This will start the beryl manager and launch beryl. It works with KDE, GNOME and XFCE, but fails with many standalone window managers.<br />
Right click on the gem in the panel and go to 'select window manager'. Choose Beryl, and you should be set.<br />
<br />
== XFCE Desktop ==<br />
<br />
You can run xfce4 with startxfce4 or xfce-session and gdm (probably kdm too) by modifying some files. You can also use startx, skip the first file below in that case.<br />
<br />
First edit /etc/X11/session/xfce4-svn.desktop (this is the file for svn version. For xfce 4.2 it should probably be xfce4.desktop):<br />
<br />
[Desktop Entry]<br />
Encoding=UTF-8<br />
Type=XSession<br />
Exec=~/.xsession<br />
TryExec=/opt/xfce4/bin/startxfce4<br />
Name=XFCE4-svn<br />
<br />
Next edit ~/.xinitrc:<br />
<br />
#!/bin/sh<br />
<br />
#<br />
# ~/.xinitrc<br />
#<br />
# Executed by startx (run your window manager from here)<br />
#<br />
<br />
. /etc/profile<br />
. $HOME/.bashrc<br />
<br />
xrdb $HOME/.Xresources<br />
<br />
# start beryl and beryl-manager<br />
beryl-manager &<br />
emerald & <br />
startxfce4 <br />
<br />
And finally delete your previous sessions stored by xfce4:<br />
<br />
rm -r .cache/sessions/*<br />
<br />
NOTE:If you were modifying these files while running xfce4 do not save your session on exit.<br />
<br />
===Alternative configuration using Autostarted apps===<br />
As an alternative to the above, you can get beryl/emerald to start by making an entry for beryl-manager in <tt>Settings -> Autostarted Applications</tt>.<br />
<br />
== KDE Desktop ==<br />
<br />
Anything in the .kde/Autostart folder will be executed on login<br />
<br />
Simply make a link to "beryl-manager" in this location<br />
<br />
ln -s /usr/bin/beryl-manager /home/youruser/.kde/Autostart/beryl-manager<br />
<br />
And that's it! Log in and beryl will start automatically.<br />
<br />
<br />
If you want Beryl to start as the default WM, you can also put an entry in the KDM menu. To do this, create the file /usr/bin/startberyl.sh:<br />
<br />
#!/bin/sh<br />
export KDEWM="/usr/bin/beryl-manager"<br />
exec startkde<br />
<br />
Do a chmod 755 /usr/bin/startberyl.sh<br />
And then create /etc/X11/sessions/beryl.desktop:<br />
<br />
[Desktop Entry]<br />
Encoding=UTF-8<br />
Name=Beryl<br />
Exec=/usr/bin/startberyl.sh<br />
Icon=<br />
Type=Application<br />
<br />
Restart KDM (log out your KDE session), select Beryl in the session menu, and log in to test if everything was ok.<br />
<br />
== GNOME Desktop ==<br />
<br />
The simplest way is to add "beryl-xgl" to the applications that start with your session. You can do this by going to:<br />
[Desktop] -> [Preferences] -> [Sessions] -> [Startup Programs]<br />
Adding "beryl-manager" to the list might be a good idea too so you can switch back to Metacity if need be.<br />
<br />
== No Desktop, Beryl as window manager only ==<br />
<br />
This is an example ''~/.xinitrc'' to create a "lightweight" Beryl environment. It is rather uncomfortable unless you add a panel and maybe other management applications.<br />
<br />
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then<br />
eval `dbus-launch --sh-syntax --exit-with-session`<br />
fi<br />
<br />
emerald &<br />
beryl-manager &<br />
<br />
# Start other applications here<br />
# <br />
# Example: set wallpaper + open a terminal<br />
#<br />
# feh --bg-scale ~/Wallpapers/wallpaper.jpg &<br />
# urxvt -depth 32 -fg grey80 -bg rgba:0000/0000/0000/dddd &<br />
<br />
# Now start something you need all the time, like a panel<br />
exec gnome-panel<br />
<br />
'''Note''': the .xinitrc that was here before forced beryl to start twice (since beryl-manager starts beryl too), which led to X closing. I'm not sure if we can just do exec beryl-manager instead of opening something else like I do.<br />
<br />
Alternatively, you can use the ''wait'' command to tell X to close with emerald.<br />
<br />
#!/bin/bash<br />
<br />
emerald & wmpid=$!<br />
beryl-manager &<br />
feh --bg-center ~/.wallpaper.jpg &<br />
conky &<br />
<br />
urxvt &<br />
wait $wmpid<br />
<br />
= Configuring Beryl =<br />
<br />
* beryl (WM and compositor): Just run ''beryl-settings'' or select ''Beryl Settings Manager'' from the beryl manager dockapp.<br />
* emerald (window decorator): run ''emerald-theme-manager'' or select ''Emerald Theme Manager'' from the beryl manager dockapp.<br />
* aquamarine/heliodor (KDE/GNOME window decorator): Check the usual KDE or GNOME theme settings, aquamarine/heliodor will use those automatically.<br />
<br />
Running ''beryl-manager'' will give you more control on beryl. With that nice tray icon you can get back to metacity/kwin, launch the beryl settings or the theme manager, etc.<br />
<br />
You can migrate compiz-quinn's settings to beryl by copying ~/.compiz/csm_settings to ~/.beryl/settings<br />
<br />
= Troubleshooting =<br />
<br />
== nvidia beta drivers and black windows ==<br />
This is sadly the only thing preventing me form using beryl... When you run high resolutions and maximize windows, the windows get black. Getting them smaller may get their content back. It seems that its a bug in the nvidia beta drivers.<br />
<br />
See the Beryl's bug tracker #201 (''unfortunately, due to a hard drive crash, all beryl bug reports were lost''):<br />
This is an nVidia problem, from nVidia (James Jones) on nvnews<br />
http://www.nvnews.net/vbulletin/showthread.php?t=77248&highlight=black+windows:<br />
<br />
"This is a shortcoming of the current implementation of<br />
GLX_EXT_texture_from_pixmap in the drivers. When video<br />
RAM has been exhausted, the driver does not behave well<br />
(you get blank windows). TurboCache? memory is currently<br />
cannot be used with GLX_EXT_texture_from_pixmap, so these<br />
problems will be especially noticeable on these parts.<br />
We're working on improving these cases."<br />
<br />
== Beryl not starting in KDE ==<br />
If you are having problems starting or running Beryl under KDE try resetting KDE's settings. You can do this by removing the ~/.kde directory and ~/.kderc file. Note that you should backup your important data like Kopete, Kmail, Amarok configuration.<br />
<br />
== ATI ==<br />
You should read this if you have problems with ATI.<br />
<br />
=== Uninstalling fglrx ===<br />
<br />
Don't forget that:<br />
<br />
* xf86-video-ati are the ATI open source drivers<br />
* ati-fglrx(-beyond, ...) are the proprietary ones wich won't work with Beryl<br />
* You have to replace "fglrx" by "radeon" in BOTH the xorg.conf and rc.conf files<br />
* You have to uninstall ati-fglrx(-beyond, ...), ati-fglrx-utils and then install libgl-dri to get everything to work properly. As Veek said on [http://bbs.archlinux.org/viewtopic.php?t=22300&postdays=0&postorder=asc&highlight=libgldri&start=20 this post] :<br />
Attention, anyone who was previously using the fglrx drivers:<br />
Both the ati-fglrx-utils package and the libgl-dri package provide a version of the openGL<br />
shared library /usr/lib/libGL.so.1 (your version may be different).<br />
However the one supplied by the Mesa package implements things not implemented by the one in ATI's package.<br />
That's why it can be exceedingly confusing trying to figure out why things aren't working<br />
even though you apparently have the necessary libraries.<br />
The solution is to install libgl-dri and everything shoud work as outlined in spack's guide.<br />
<br />
This is my understanding of the issue, just wanted to clarify for anyone else that was confused.<br />
<br />
* Uninstalling commands:<br />
pacman -Rd ati-fglrx(-beyond,...) ati-fglrx-utils<br />
pacman -S libgl-dri xf86-video-ati<br />
<br />
=== Issues ===<br />
<br />
* I had some black screen troubles when trying to launch KDE. Sometimes KDE would also crash. It is fixed when adding the next line to the Device section of the xorg.conf :<br />
<br />
BusID "PCI:1:0:0"<br />
<br />
* After this KDE would launch but a bit slowly and glxgears wouldn't launch but complaining :<br />
<br />
*********************************WARN_ONCE******** *************************<br />
File radeon_mm.c function radeon_mm_alloc line 216<br />
Ran out of GART memory!<br />
Please consider adjusting GARTSize option.<br />
************************************************** *************************<br />
<br />
Fixed when you add the following line to the device section of your xorg.conf (seen on [http://www.ubuntuforums.org/showthread.php?t=206642 this post]) :<br />
Option "GARTSize" "64"<br />
<br />
So everything works fine here on my ATI Radeon Mobility 9600, Beryl and KDE.<br />
Here is [http://alaux.net/files/public/xorg.conf.txt my xorg.conf]<br />
<br />
* Q: When maximizing a window, the window borders go all white ([http://inklein.servebeer.com/images/whiteborder.png screenshot]) on Thinkpad x32 (ATI Mobility M6) using radeon driver. <br />
**A: (Solution from [http://forum.beryl-project.org/viewtopic.php?f=36&t=320&start=0&st=0&sk=t&sd=a here]). Add the following option to xorg.conf under the card settings:<br />
Option "AGPSize" "32"<br />
<br />
=== Desktop clipping/drawing error on Radeon 7500 ===<br />
Users of Radeon 7500 graphics cards may experience a "clipping" effect where the desktop is limited to 1024x768 resolution. Screen areas outside this box are not drawn correctly, and larger windows lack decorations etc.<br />
<br />
The fix for this is to download & build driconf from aur. Then set up your graphics card as you wish. The program creates a file called .driconf in your home directory.<br />
<br />
Open this file, and change the line<br />
<br />
<option name="allow_large_textures" value="X" /> <br />
where "X" equals the current value there, and change it to<br />
<option name="allow_large_textures" value="2" /><br />
<br />
**DOESN'T WORK ON MY IBM R40 (1400*1050), anyone help?<br />
I fixed it by adding "Option "AGPSize" "32" in xorg.conf in card section. The whole part is like:<br />
Section "Device"<br />
Identifier "ATI|Radeon Mobility M7 LW (AGP)"<br />
Driver "ati"<br />
VendorName "All"<br />
BoardName "All"<br />
Option "XAANoOffscreenPixmaps"<br />
Option "DRI" "true"<br />
Option "AGPSize" "32"<br />
EndSection<br />
<br />
=== Black screen when starting X with radeon open source drivers on ATI X700 ===<br />
You have to add this option to the "Device" section of the xorg.conf<br />
<br />
Option "MonitorLayout" "LVDS,NONE"<br />
<br />
This will solve the problem<br />
<br />
== Window Decorations Disappear ==<br />
If you are using KDE, open: KDE Control Center -> Desktop -> Behavior<br />
and check "Show Icons on desktop" option. (Does not always work)<br />
<br />
== No Window Decorations with Beryl and Emerald running ==<br />
<br />
Check that XLIB_SKIP_ARGB_VISUALS=1 is not present in your environment. ('env | grep XLIB_SKIP_ARGB_VISUALS') - if it is remove all traces from initialization scripts (usual suspects: /etc/profile.d/flash.sh and ~/.bashrc), restart Xorg and try again<br />
<br />
Another solution as mentioned in the beryl project wiki, change your default color depth in xorg.conf to 24.<br />
<br />
==Firefox/Swiftfox Crashing==<br />
If you are experiencing crashing of Firefox or Swiftfox when viewing sites that use Flash, you can try this fix.<br />
<br />
Open up /usr/bin/firefox or /usr/bin/swiftfox, and add "export XLIB_SKIP_ARGB_VISUALS=1" before EOF (End of file), on its own line. Save and restart the browser.<br />
<br />
Note: Adding this line to a initialization script (such as .bashrc or in /etc/profile.d/) may result in emerald being unable to display window decorations.<br />
<br />
==Locale Errors==<br />
If you are having trouble launching Beryl, Beryl-Manager, Beryl Settings Manager, and/or Emerald and get output to this effect:<br />
<br />
(beryl-manager:4204): Gtk-WARNING **: Locale not supported by C library.<br />
Using the fallback 'C' locale.<br />
<br />
(emerald:4269): Gtk-WARNING **: Locale not supported by C library.<br />
Using the fallback 'C' locale.<br />
<br />
(beryl-settings:4278): Gtk-WARNING **: Locale not supported by C library.<br />
Using the fallback 'C' locale.<br />
Traceback (most recent call last):<br />
File "/usr/bin/beryl-settings", line 35, in ?<br />
locale.setlocale(locale.LC_ALL, "")<br />
File "/usr/lib/python2.4/locale.py", line 381, in setlocale<br />
return _setlocale(category, locale)<br />
locale.Error: unsupported locale setting<br />
<br />
See the [http://wiki.archlinux.org/index.php/Configuring_locales Configuring locales] entry.<br />
<br />
==Java Apps: Empty Window==<br />
Some Java applications (with Java GUI) are not correctly displayed with Beryl running: only an empty window is visualized. A workaround is to append:<br />
<br />
export AWT_TOOLKIT="MToolkit"<br />
<br />
in your <tt>.bashrc</tt> (for single user) or <tt>/etc/profile</tt> (for all users).<br />
<br />
= Tips/Tricks =<br />
<br />
==Cairo Clock==<br />
<br />
Cairo-Clock is a elegant looking analog clock, that works with Beryl. To install it grab it from the AUR [http://aur.archlinux.org/packages.php?do_Details=1&ID=4108&O=0&L=0&C=0&K=cairo-clock&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd here]. Currently cairo-clock doesn't work properly with AIGLX and the Nvidia GLX_Texture_From_Pixmap extension, but I have found a fix to this. Launch cairo-clock with the following command, <pre>cairo-clock -w 127 -g 127 -s</pre> and that should fix it right up, so it displays properly.Check out the project page for more details and screenshots [http://macslow.thepimp.net/projects/cairo-clock/cairo-clock-8.png here]<br />
<br />
<br />
==Terminal with true transparency==<br />
Gnome-terminal does true transparency with Beryl running, but some people prefer a more light weight terminal. Install rxvt-unicode, and launch it with this command: <pre>urxvt -depth 32 -bg rgba:0000/0000/0000/cccc -fg white</pre></div>Paranooshttps://wiki.archlinux.org/index.php?title=NTFS-3G&diff=21164NTFS-3G2007-02-16T19:35:53Z<p>Paranoos: </p>
<hr />
<div>[[Category:File systems (English)]]<br />
[[Category:Emulators (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|NTFS Write Support}}<br />
{{i18n_entry|עברית|תמיכה בכתיבה במחיצות NTFS}}<br />
{{i18n_entry|Русский|Поддержка NTFS Записи}}<br />
{{i18n_entry|简体中文|NTFS 的写支持}}<br />
{{i18n_links_end}}<br />
<br />
=== Read/Write access to NTFS parttion.===<br />
<br />
This document tells you how to get Read/Write access to a windows NTFS partition using ntfs-3g.<br />
<br />
<br />
<br />
====Install Packages====<br />
As root:<br />
pacman -S ntfs-3g<br />
<br />
====Load the module====<br />
Run the following in a terminal as root<br />
modprobe fuse<br />
<br />
====Editing your /etc/fstab====<br />
Make a directory where you would like to mount the partition (i.e:/mnt/windows)<br />
Then add the entry to /etc/fstab:<br />
/dev/sda1 /mnt/windows ntfs-3g defaults 0 1<br />
<br />
====Mount it, baby!====<br />
As root again: <br />
mount /mnt/windows</div>Paranooshttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=15165NVIDIA2006-09-05T19:26:17Z<p>Paranoos: /* Nasty performance after installing new nvidia-driver */</p>
<hr />
<div>[[Category:Hardware]]<br />
[[Category:Kernel]]<br />
[[Category:XServer]]<br />
{{i18n_links_start}}<br />
{{i18n_entry|English|How to install NVIDIA driver}}<br />
{{i18n_entry|Nederlands|Hoe de NVIDIA stuurprogramma's te installeren}}<br />
{{i18n_links_end}}<br />
===How to install Nvidia Driver with pacman===<br />
<br />
====Info from Package Maintainer ''tpowa''====<br />
<br />
The package is for those people who run a stock arch kernel!<br />
I only test with kernel 2.6 and xorg.<br />
<br />
''NOTE by someone else: we didn't forget people using the -beyond kernel, check next paragraph''<br />
<br />
Multiple kernel users:<br />
You need to install nvidia package for each extra!<br />
<br />
====Installing drivers====<br />
<br />
You have to use extra repository, enable it for pacman.<br />
Leave X-Server, else pacman cannot finish installation and it will not work!<br />
run as root:<br />
pacman -Sy nvidia (for newer cards)<br />
pacman -Sy nvidia-legacy (for old cards)<br />
for '''-beyond''' users:<br />
pacman -Sy nvidia-beyond<br />
pacman -Sy nvidia-legacy-beyond (for old cards)<br />
<br />
please look at the [http://download.nvidia.com/XFree86/Linux-x86/1.0-8762/README/appendix-a.html <code>README</code>] from nvidia for information, which card is supported.<br />
<br />
If an error happens during install you can have a look at:<br />
/var/log/nvidia-installer.log<br />
<br />
====Configuring X-Server====<br />
<br />
Edit <code>/etc/X11/XF86Config</code> or your <code>/etc/X11/xorg.conf</code> config file:<br />
Disable in modules section:<br />
<code>GLcore</code> and <code>DRI</code><br />
<br />
Add to modules section:<br />
Load "glx"<br />
<br />
Disable <code>Section DRI</code> completely:<br />
#Section "DRI"<br />
# Mode 0666<br />
#EndSection<br />
<br />
Change <code>Driver "nv"</code> to <code>Driver "nvidia"</code><br />
If it exists disable <code>Chipset</code> option (only needed for nv driver).<br />
<br />
This was for basic setup, if you need more tweaking options<br />
have a look at <code>/usr/share/doc/NVIDIA_GLX-1.0/README.txt</code>.<br />
<br />
You can also run:<br />
nvidia-xconfig<br />
<br />
See <a href="http://wiki.archlinux.org/index.php/Install_and_configure_xorg">installing and configuring xorg</a>.<br />
<br />
====Modifying Arch <code>rc.conf</code> file====<br />
<br />
Add <code>nvidia</code> to <code>/etc/rc.conf</code> MODULES section (not needed anymore if you run xorg and udev).<br />
Needed for nvidia-legacy and kernel >=2.6.13!<br />
<br />
====Problems that might occur====<br />
<br />
=====Nvidia specific=====<br />
Xorg7:<br />
Please remove your old /usr/X11R6 dir it can cause trouble during installation. Also make sure you've installed <code>pkgconfig</code>. The NVIDIA installer uses pkgconfig to determine where modular Xorg components are installed.<br />
<br />
If you experience slow 3D Performance have a look at<br />
<code>/usr/lib/libGL.so.1</code>, <code>/usr/lib/libGL.so</code>, <code>/usr/lib/libGLcore.so.1</code><br />
Perhaps they are wrong linked to mesa or something else.<br />
Try reinstalling with <code>pacman -S nvidia</code>.<br />
<br />
When you get this message when you try to start an openGL application (for example enemy-territory, or glxgears):<br />
Error: Could not open /dev/nvidiactl because the permissions are too<br />
restrictive. Please see the <code>FREQUENTLY ASKED QUESTIONS</code> <br />
section of <code>/usr/share/doc/NVIDIA_GLX-1.0/README</code> <br />
for steps to correct.<br />
<br />
Add yourself to the <code>video</code> group using <code>gpasswd -a ''yourusername'' video</code> (don't forget to log out and back in).<br />
<br />
=====Arch specific=====<br />
<br />
'''GCC update:'''<br />
You must compile the module with the compiler that was used for the kernel<br />
else it may fail.<br />
A simple <code>pacman -S nvidia</code> should do it, if not wait for a new kernel release and stay with old kernel and gcc.<br />
<br />
'''Kernel update:'''<br />
Kernel updates will require reinstalling the driver. A workaround is [http://wiki.archlinux.org/index.php/How_to_install_NVIDIA_driver#Modifying_Arch_rc.conf_file available].<br />
<br />
====Driver Config Tool====<br />
<br />
The new config tool for the nvidia-drivers is included called 'nvidia-settings'<br />
You don't have to use it it's only a add-on! <br><br />
For more information about the use, have a look at the following file:<br><br />
/usr/share/doc/NVIDIA_GLX-1.0/nvidia-settings-user-guide.txt<br><br />
Please install gtk2 with "pacman -S gtk2" in order to use this tool.<br />
<br />
'''NOTE:'''<br />
If you experience problems like crashing the X-Server while running the tool<br />
you have to delete your <code>.nvidia-settings-rc</code> file in your home directory.<br />
<br />
====Known Issues====<br />
<br />
If you experience crashes, try to disable <code>RenderAccel "true"</code> option.<br />
<br />
If you have nvidia installer complaining about different versions of gcc between the current one and the one used for compiling the kernel then see on how to install the traditional way but remember to <code>export IGNORE_CC_MISMATCH=1</code><br />
<br />
If you have comments on the package please post it here: http://bbs.archlinux.org/viewtopic.php?t=10692<br />
If you have a problem with the drivers have a look at the nvidia forum: http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14<br />
For a Changelog please look here: http://www.nvidia.com/object/linux_display_ia32_1.0-8762.html<br />
<br />
Note: please don't change the above part without notifying me.<br />
<br />
===Nasty performance after installing new nvidia-driver===<br />
<br />
If you experience very slow fps rate in compare with older driver first check if You have Direct Rendering turned on. You can do it by: <br />
<br />
glxinfo | grep direct<br />
<br />
If You get: direct rendering: No then that's your problem. <br />
Next check if You have the same versions of glx for the client and server by this:<br />
<br />
glxinfo | egrep "glx (vendor|version)"<br />
<br />
And if You see different vendors or versions for the client and server run this:<br />
<br />
ln -fs /usr/lib/libGL.so.$VER /usr/X11R6/lib/libGL.so<br />
ln -fs /usr/lib/libGL.so.$VER /usr/X11R6/lib/libGL.so.1<br />
ln -fs /usr/lib/libGL.so.$VER /usr/lib/libGL.so.1.2<br />
<br />
Where $VER is the version of nvidia package, that you're using. You can check it by <code>nvidia-settings</code><br />
<br />
That's all. Now restart your Xserver and you should have normal acceleration.<br />
<br />
===How to install NVIDIA Driver the traditional way===<br />
<br />
* Download the latest NVIDIA driver from: http://www.nvidia.com/object/linux.html<br />
File name will look something like this: <code>NVIDIA-Linux-x86-1.0-7167-pkg0.run</code><br />
<br />
The Kernel Steps (the following 4 steps) can be left out if you use at least kernel 2.6.5 because the needed Includes are now in the Kernel package<br />
<br />
* Download the kernel source for the kernel version you are using<br />
<code>uname -r</code> will give you kernel version<br />
** http://www.kernel.org/pub/linux/kernel/v2.6/ - for the 2.6 series<br />
** http://www.kernel.org/pub/linux/kernel/v2.4/ - for the 2.4 series<br />
<br />
* Move the current incomplete kernel source tree to 2.x.x.old:<br />
mv /usr/src/2.x.x /usr/src/2.x.x.old<br />
<br />
* Uncompress and unpack your source code in <code>/usr/src</code>:<br />
mv /path/to/linux-2.x.x.tar.bz2 /usr/src<br />
cd /usr/src<br />
tar --bzip2 -xvf linux-2.x.x.tar.bz2<br />
<br />
* Copy the old include directory and <code>.config</code> file into new source tree:<br />
cp -rp linux-2.x.x.old/include/ linux-2.x.x/include/<br />
cp linux-2.x.x.old/.config linux-2.x.x/.config<br />
<br />
* Go to a non-graphical session<br />
** Use Control-Alt-F5 (or whatever F key you want)<br />
** Login as root<br />
** Go to runlevel 3<br />
init 3<br />
<br />
* Run NVIDIA installer<br />
sh /path/to/NVIDIA-Linux-x86-1.0-5336-pkg0.run<br />
You will be asked to accept their license, then hit OK a couple times on informational screens, the driver will then be built and installed<br />
<br />
* Edit XFree86Config file<br />
** Use the editor of choice to open <code>/etc/X11/XFree86Config</code> and go to the <code>Device</code> section<br />
** Change your driver from current (probably <code>nv</code> or <code>vesa</code>) to <code>nvidia</code>:<br />
*** <code>Driver "nv"</code> to <code>Driver "nvidia"</code><br />
** Uncomment the glx load line<br />
*** <code>#Load "glx"</code> to <code>Load "glx"</code><br />
** Comment or delete the Chipset line if exists<br />
<br />
* Edit modules loaded on boot<br />
** Open <code>/etc/rc.conf</code> in editor<br />
** Add <code>nvidia</code> to modules section<br />
MODULES=(''... some modules ...'' nvidia)<br />
<br />
* Reboot the machine and enjoy 3D acceleration...and a tainted kernel :)<br />
<br />
<br />
===How to disable NVIDIA Graphics Logo on startup===<br />
<br />
* Edit XOrgConfig file<br />
** Go to the <code>Device</code> section<br />
** Add the <code>"NoLogo"</code> Option<br />
Option "NoLogo" "true"<br />
<br />
===Using TV-out on your NVIDIA card===<br />
<br />
Good article on the subject can be found from:<br />
http://en.wikibooks.org/wiki/NVidia/TV-OUT</div>Paranooshttps://wiki.archlinux.org/index.php?title=Gamepad&diff=15024Gamepad2006-09-02T03:28:07Z<p>Paranoos: /* Determining Which Modules You Need */</p>
<hr />
<div>[[Category:Input Device]]<br />
<br />
Joysticks can be a bit of a hassle to get working in Linux. Not because they are poorly supported, but simply because you need to determine which modules to load to get your joystick working, and it's not always very obvious!<br />
<br />
= Setup =<br />
== Determining Which Modules You Need ==<br />
For an extensive overview of all joystick related modules in Linux, you will need access to the Linux kernel sources -- specifically the Documentation section. Unfortunately, pacman kernel packages don't include what we need. If you have the kernel sources downloaded, have a look at <code>Documentation/input/joystick.txt</code>. You can browse the kernel source tree at [http://kernel.org/ kernel.org] by clicking the "C" (current changesets) link, then clicking the "tree" link near the top. Here's a link to the [http://www.kernel.org/git/?p=linux/kernel/git/stable/linux-2.6.17.y.git;a=blob;h=d53b857a3710ccdde5bc504f212993dcb10a20be;hb=d2350c2ad1463a973b586cadb49c2fa0c83089b8;f=Documentation/input/joystick.txt Documentation from kernel 2.6.17.11].<br />
<br />
Some joysticks need specific modules, such as the Microsoft Sidewinder controllers (<code>sidewinder</code>), or the Logitech digital controllers (<code>adi</code>). Many older joysticks will work with the simple <code>analog</code> module. If your joystick is plugging in to a gameport provided by your soundcard, you will need your soundcard drivers loaded - however, some cards, like the Soundblaster Live, have a specific gameport driver (<code>emu10k1-gp</code>). Older ISA soundcards may need the <code>ns558</code> module, which is a standard gameport module.<br />
<br />
As you can see, there are many different modules related to getting your joystick working in Linux, so I couldn't possibly cover everything here. Please have a look at the documentation mentioned above for details.<br />
<br />
==Loading the Modules==<br />
You need to load a module for your gameport (<code>ns558</code>, <code>emu10k1-gp</code>, <code>cs461x</code>, etc...), a module for your joystick (<code>analog</code>, <code>sidewinder</code>, <code>adi</code>, etc...), and finally the kernel joystick device driver (<code>joydev</code>). Add these to your <code>/etc/rc.conf</code>, or simply modprobe them. The <code>gameport</code> module should load automatically, as this is a dependency of the other modules.<br />
<br />
==Testing Your Configuration==<br />
Once the modules are loaded, you should find a new device: <code>/dev/input/js0</code>. You can simply <code>cat</code> the device to see if it works - move the stick around, press all the buttons. I found my Logitech Thunderpad Digital had two buttons that weren't working with the <code>analog</code> module. After reading some docs, I saw there was a specific <code>adi</code> module for this controller. The moral of the story is, if it doesn't work the first time, don't give up, and read those docs thoroughly! I couldn't get anything working at all until I found that documentation.<br />
<br />
==USB Joysticks==<br />
You need to get USB working, and then modprobe your joystick driver, which is <code>usbhid</code>, as well as <code>joydev</code>. <br />
If you use a usb mouse or keyboard, <code>usbhid</code> will be loaded already and you just have to load the <code>joydev</code> module.<br />
<br />
= External Resources =<br />
{{Gentoo-Wiki|HOWTO_Joystick_Setup}}</div>Paranooshttps://wiki.archlinux.org/index.php?title=Disabling_IPv6&diff=13525Disabling IPv62006-06-14T05:25:08Z<p>Paranoos: </p>
<hr />
<div>[[Category:Network]]<br />
Since Arch's official kernel26 package 2.6.16.2-1, IPv6 is no longer compiled directly into the kernel, but as a module. Many don't require the features, and may benefit from added performance (many programs will query IPv6 addresses first, unaware that you don't have an IPv6 connection) and free memory (250k, that's a mighty big module).<br />
<br />
I don't use module autoloading, but when I boot my system, the ipv6 module is loaded. There are many programs which will load the ipv6 module if they detect that it's available. In fact, they're loading net-pf-10, which is an alias to ipv6. Not sure why! Adding the following line to /etc/modprobe.conf will disable the automatic loading of ipv6, while also allowing you to load it manually, if needed.<br />
<br />
# disable autoload of ipv6<br />
alias net-pf-10 off<br />
<br />
That's it! Enjoy.</div>Paranooshttps://wiki.archlinux.org/index.php?title=Disabling_IPv6&diff=13524Disabling IPv62006-06-14T05:24:29Z<p>Paranoos: /* IPv6 - Disabling the Module */</p>
<hr />
<div>Since Arch's official kernel26 package 2.6.16.2-1, IPv6 is no longer compiled directly into the kernel, but as a module. Many don't require the features, and may benefit from added performance (many programs will query IPv6 addresses first, unaware that you don't have an IPv6 connection) and free memory (250k, that's a mighty big module).<br />
<br />
I don't use module autoloading, but when I boot my system, the ipv6 module is loaded. There are many programs which will load the ipv6 module if they detect that it's available. In fact, they're loading net-pf-10, which is an alias to ipv6. Not sure why! Adding the following line to /etc/modprobe.conf will disable the automatic loading of ipv6, while also allowing you to load it manually, if needed.<br />
<br />
# disable autoload of ipv6<br />
alias net-pf-10 off<br />
<br />
That's it! Enjoy.</div>Paranooshttps://wiki.archlinux.org/index.php?title=Disabling_IPv6&diff=13523Disabling IPv62006-06-14T05:24:12Z<p>Paranoos: </p>
<hr />
<div>==IPv6 - Disabling the Module==<br />
<br />
Since Arch's official kernel26 package 2.6.16.2-1, IPv6 is no longer compiled directly into the kernel, but as a module. Many don't require the features, and may benefit from added performance (many programs will query IPv6 addresses first, unaware that you don't have an IPv6 connection) and free memory (250k, that's a mighty big module).<br />
<br />
I don't use module autoloading, but when I boot my system, the ipv6 module is loaded. There are many programs which will load the ipv6 module if they detect that it's available. In fact, they're loading net-pf-10, which is an alias to ipv6. Not sure why! Adding the following line to /etc/modprobe.conf will disable the automatic loading of ipv6, while also allowing you to load it manually, if needed.<br />
<br />
# disable autoload of ipv6<br />
alias net-pf-10 off<br />
<br />
That's it! Enjoy.</div>Paranooshttps://wiki.archlinux.org/index.php?title=User:Paranoos&diff=13522User:Paranoos2006-06-14T05:23:49Z<p>Paranoos: </p>
<hr />
<div>[[IPv6 - Disabling the Module]]</div>Paranooshttps://wiki.archlinux.org/index.php?title=User:Paranoos&diff=13521User:Paranoos2006-06-14T05:22:48Z<p>Paranoos: </p>
<hr />
<div>[IPv6 - Disabling the Module]</div>Paranooshttps://wiki.archlinux.org/index.php?title=Dvdbackup&diff=8098Dvdbackup2006-01-05T21:29:32Z<p>Paranoos: </p>
<hr />
<div>[[Category:CD/DVD]]<br />
I found the original information posted here rather inadequate. Instead of destroying the information, in case it still proves useful to some people, I'll preserve it here under the "Older Method" section.<br />
<br />
=Elegant Method=<br />
==Introduction==<br />
While dual layer DVD recorders are readily available and inexpensive, dual layer media is still not very easy on the wallet. Even if it were affordable, there are some of us who would prefer to simply make a backup copy of a movie, and not all the extra features that nobody watches more than once.<br />
<br />
There are several ways to get what you want done, and many of them are slow, and require several steps to accomplish. Here's a simpler method using dvdbackup and dvdauthor, which can be both be found in the AUR. We will also be using mkisofs (found in the cdrtools package), and growisofs.<br />
<br />
==Making a Backup==<br />
The dvdbackup program is elegant because it doesn't have to demultiplex, remultiplex, re-encode, or reformat the movie. This means the backup process is done in one step. The only time to not use this method is for longer movies (greater than 2 or 2.5 hours ... anything that won't fit on a single layer DVD). In those cases, have a look at the Long Method below.<br />
<br />
Anyway, let's determine which title to backup. Here's the command to retrieve some information from your DVD. Replace /dev/hdc with the proper drive, of course.<br />
dvdbackup -i/dev/hdc -I<br />
<br />
After some less useful information, dvdbackup will show something like this:<br />
<pre><br />
Main feature:<br />
Title set containing the main feature is 1<br />
The aspect ratio of the main feature is 16:9<br />
The main feature has 1 angle(s)<br />
The main feature has 1 audio_track(s)<br />
The main feature has 2 subpicture channel(s)<br />
The main feature has a maximum of 28 chapter(s) in on of it's titles<br />
The main feature has a maximum of 6 audio channel(s) in on of it's titles<br />
</pre><br />
<br />
What we're concerned with is that the main feature is in title set 1. Next we'll see a list of title sets:<br />
<pre><br />
Title Sets:<br />
<br />
Title set 1<br />
The aspect ratio of title set 1 is 16:9<br />
Title set 1 has 1 angle(s)<br />
Title set 1 has 1 audio_track(s)<br />
Title set 1 has 2 subpicture channel(s)<br />
<br />
Titles included in title set 1 is/are<br />
Title 1:<br />
Title 1 has 28 chapter(s)<br />
Title 1 has 6 audio channle(s)<br />
</pre><br />
<br />
Obviously, the main feature is title 1. Sometimes a titleset will include more than one title, sometimes not. Title sets can also include menus, which will no longer work very well if we're not backing up the entire DVD.<br />
<br />
Now to rip the DVD! We're using the drive /dev/hdc, ripping title 1, and outputting to our home directory.<br />
dvdbackup -i/dev/hdc -t1 -o/home/steve<br />
<br />
dvdbackup reads the name of the DVD and creates a directory for it. If dvdbackup decides the name of the DVD is too generic (like MOVIE, for instance), you will have to specify a name, as it will refuse to run otherwise. Just use -nMYMOVIENAME to specify.<br />
<br />
==Creating IFO and BUP Files==<br />
If you know much about DVDs, you'll notice that we only have a number of VOB files on our hard drive, and that's not enough to burn a copy! This is where dvdauthor comes in.<br />
<br />
First, we need to create a working directory. Then we're going to the directory that contains the VOB files. Be aware that this command is going to make a copy of the entire movie. The original can be deleted right afterwards.<br />
mkdir /home/steve/dvd<br />
cd /home/steve/MYMOVIENAME/VIDEO_TS<br />
dvdauthor -o /home/steve/dvd *.VOB<br />
<br />
dvdauthor just created a copy of our movie, and hopefully it worked alright. If it said anything like "SCR moves backwards, remultiplex input." there might be trouble. Before deleting any files, check the file sizes of the original VOB files compared to the copied ones. If they're all roughly the same, you may be OK. You can use mplayer to test the affected VOB file to see if there's anything missing. If so, you may have to go the long route. I haven't backed up many DVDs, but it appears this problem occurs with special features, and hopefully not actual movies.<br />
<br />
Well, now we've built VTS_01_0.IFO and BUP. All we need is VIDEO_TS.IFO and BUP, and we're in business. This part takes much less time, and doesn't waste hard drive space.<br />
cd /home/steve/dvd/VIDEO_TS<br />
dvdauthor -o /home/steve/dvd -T<br />
<br />
Now we can create an ISO image file, or burn straight to DVD.<br />
<br />
==Creating an ISO==<br />
The advantage to creating the ISO file is that you can test that everything works fine with mplayer before continuing. The disadvantage is of course that it takes up hard drive space again.<br />
mkisofs -dvd-video -udf -o dvd.iso dvd/<br />
<br />
To test the image with mplayer, simply:<br />
mplayer dvd:// -dvd-device dvd.iso<br />
<br />
If everything seems ok, we can burn the image. Yes, growisofs burns DVDs.<br />
growisofs -Z /dev/hdc=dvd.iso<br />
<br />
==Burning Straight to DVD==<br />
If we're pretty confident in our skills, we don't need to create and test an image, wasting time and hard drive space! We're basically merging the mkisofs with the growisofs commands listed above.<br />
growisofs -dvd-video -udf -Z /dev/hdc dvd/<br />
<br />
<br />
=Long Method=<br />
This method may be necessary if your movie is too long to fit on a single layer disc and you need to shrink the video file a bit, or if dvdauthor was giving you trouble with the method above. Hopefully, the latter case won't happen often.<br />
<br />
Anyway, all you need is a tool called dvdshrink, which can be found in the AUR. It's a nice perl script with included GTK2 frontend, which utilizes many tools. Unfortunately, it takes many steps to get a burnable copy with this method, which is why it takes longer than dvdbackup. Of course, the advantage is that it can shrink the video file size if needed. I was able to burn a 2h 23m movie without shrinking, even though the discs say they can only hold 120m of video.<br />
<br />
Anyway, run xdvdshrink.pl, the interface is pretty self-explanitory. Click the Configure button to set your DVD drive(s) and specify a working directory with lots of extra space. Save the settings and go back to the main screen. You can "Select from DVD" which title to rip, as well as the audio channel. Each time, the program will scan the DVD and present you with options. The title selection is pretty obvious, as there should be only one long title on there. For the audio selection, simply pick your language. You may also have options for 2 channel or 6 channel audio (stereo or 5.1). It's up to you which one you choose here.<br />
<br />
If you have a DVD reader and a DVD burner, you can leave a blank disc in the burner, and enable "Force DVD burn (no prompt) on the right. If you only have a single DVD drive, just enable "Autoburn new DVD", and when the ripping is complete, the program will prompt you to insert a blank disc and hit enter to continue.<br />
<br />
The other options you should enable are "Remove working files", "Shrink selected title to fit DVD5" if your movie is too long to fit on a single disc, and it's up to you if you want to "Delete logs". "Remove working files" is especially important, since a movie is roughly 4GB, and this process takes several steps, which may result in 12-20GB of usage on your hard drive, depending on what the program has to do.<br />
<br />
Anyway, that should be all. Click "Start copy"!<br />
<br />
=Older Method=<br />
==Introduction==<br />
Making a data DVD is simple. It only involves a single command in most cases. If you need to simply burn data onto a DVD, see the [[DVD_writing|DVD Writing Tutorial]]. However if you want a DVD that you can play in your DVD player, it gets a little more complex. You need to encode the source video, generate the layout of the disc (with menus, titles, chapters, etc), make the filesystem (generate an ISO), and finally burn the ISO. This tutorial will cover only the most basic way of making a video DVD- You place the DVD in your DVD player and a movie plays. You are encouraged to research each step further, as there are countless options and features you can add beyond this. <br />
<br />
<br />
==Encoding Source Video==<br />
If the video you want to burn to a DVD is already encoded to the proper format, then you can skip this step. You will need transcode and mjpegtools to encode the video to the proper format. Note that this only applies to AVI or MPEG files. If you are dealing with wmv, asf, mov, ogm, etc files, then you will need to use mencoder.<br />
<br />
<br />
If you are dealing with another type of file, install mencoder (part of the mplayer package):<br />
<pre><br />
pacman -Sy mplayer<br />
</pre><br />
<br />
For NTSC:<br />
<pre><br />
mencoder -o output_file.avi -ovc lavc -lavcopts vbitrate=5000:vhq -ffourcc DX50 -oac pcm -srate 48000 -ofps 29.97 your_movie.mov<br />
</pre> <br />
<br />
For PAL:<br />
<pre><br />
mencoder -o output_file.avi -ovc lavc -lavcopts vbitrate=5000:vhq -ffourcc DX50 -oac pcm -srate 48000 -ofps 25 your_movie.mov<br />
</pre><br />
<br />
<br />
Now you will have an AVI file that we can convert to DVD compatable video. Continue by installing the tools we will need:<br />
<br />
<pre><br />
pacman -Sy transcode mjpegtools<br />
</pre><br />
<br />
First we separate the audio and video from the source video and encode them to the proper formats using transcode:<br />
<br />
<pre><br />
transcode -i source_video.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o video -D0 -b224 -N 0x2000 -s2 -m video.ac3 -J modfps=clonetype=3 --export_fps 29.97 <br />
</pre><br />
<br />
'''-i''' is the source video you are working with. Change this to whatever the original file is called.<br />
<br />
'''-o''' is the ouput filename. I'll just call it "video" to make it simple. <br />
<br />
'''-m''' tells transcode to write the audio to a separate file, in this case ''video.ac3''<br />
<br />
'''-export_asr''' is the aspect ratio. '''2''' is 4:3 ratio, and '''3''' is for 16:9 ratio. Change this to whichever one you want. <br />
<br />
<br />
'''NOTE:''' The above command uses the NTSC compatable format. To encode to PAL format, you need to make a few changes:<br />
<br />
''--export_prof dvd-pal''<br />
<br />
''--export_fps 25''<br />
<br />
<br />
This process will probably take some time. An hour long video could take 1-3 hours to encode depending on the speed of your computer. When complete, you will be left with a video.m2v file and video.ac3 file. These are DVD-compliant video and audio files, respectively.<br />
<br />
The next step is to merge these 2 files into one DVD MPEG file using '''mplex''', part of the mjpegtools package. <br />
<br />
<pre><br />
mplex -f 8 -o video.mpg video.m2v video.ac3 <br />
</pre><br />
<br />
Now is a good time to test the video.mpg file in your video player of choice, such as ''mplayer'' or ''xine''. If everything appears ok, then you can continue to the next step. <br />
<br />
<br />
==Create DVD Structure==<br />
In order to generate the layout of the DVD from your video files, you will need to use dvdauthor:<br />
<br />
<pre><br />
pacman -Sy dvdauthor<br />
</pre><br />
<br />
You can specify a lot of options via command line, but it is much easier to simply create an XML file with the appropriate options. dvdauthor can do just about anything, but it could get fairly complex and beyond the scope of this tutorial. We just wnat to put a DVD in the drive and have it play our video. The XML file should look like this:<br />
<br />
<pre><br />
<dvdauthor><br />
<vmgm /><br />
<titleset><br />
<titles><br />
<pgc><br />
<vob file="video.mpg" /><br />
</pgc><br />
</titles><br />
</titleset><br />
</dvdauthor><br />
</pre><br />
<br />
You can name this file whatever you want. Let's just assume it is dvd.xml. Next, we will run dvdauthor to generate the structure of the DVD. <br />
<br />
<pre><br />
dvdauthor -o dvd -x dvd.xml<br />
</pre><br />
<br />
'''-o''' is the ouput directory. This can be whatever you please, but make sure the directory doesn't exist prior to running the command.<br />
<br />
'''-x ''' the XML file to load settings from. Change this to whatever you named your XML file.<br />
<br />
After dvdauthor completes doing it's thing, you will have a dvd/ directory in the current directory. These are the files you will want to burn to a DVD in the next step.<br />
<br />
Links with more information regarding the XML file for advanced usage:<br />
<br />
http://dvdauthor.sourceforge.net/doc/ex-title.html<br />
<br />
http://www.tappin.me.uk/Linux/dvd.html#author<br />
<br />
http://gecius.de/linux/dvd.html<br />
<br />
<br />
==Generate the ISO and Burn the DVD==<br />
This can actually be done in one step, but I will go over the 2-step process anyways, just in case you want to distribute an ISO to other people. For this step, we will need two packages; '''dvd+rw-tools''' and '''cdrtools'''<br />
<br />
<pre><br />
pacman -Sy dvd+rw-tools cdrtools<br />
</pre><br />
<br />
First, we make the filesystem using mkisofs, part of the cdrtools package:<br />
<br />
<pre><br />
mkisofs -dvd-video -udf -o dvd.iso dvd/<br />
</pre><br />
<br />
'''-o''' is the output file. Of course, this can be whatever you want.<br />
<br />
'''dvd/''' is the directory generated by dvdauthor. If you used a different directory, of course you will need to change this. <br />
<br />
Next, we use growisofs to burn the DVD:<br />
<br />
<pre><br />
growisofs -Z /dev/hdd=dvd.iso<br />
</pre><br />
<br />
That should be it! Make sure you change the device path to whatever your DVD burner is and specify the correct ISO filename you are using. <br />
<br />
This can actually be done in one step, like I mentioned before, like so:<br />
<br />
<pre><br />
growisofs -dvd-video -udf -Z /dev/hdd dvd/<br />
</pre><br />
<br />
This will skip the ISO step and burn the filesystem directly to the DVD. Change the device name and the directory to fit your needs.<br />
<br />
<br />
==More Information and Links==<br />
<br />
mplayer/mencoder: http://www.mplayerhq.hu/<br />
<br />
dvdauthor: http://dvdauthor.sourceforge.net/<br />
<br />
http://www.tappin.me.uk/Linux/dvd.html<br />
<br />
http://gecius.de/linux/dvd.html<br />
<br />
http://forums.gentoo.org/viewtopic.php?t=117709</div>Paranooshttps://wiki.archlinux.org/index.php?title=Dvdbackup&diff=8097Dvdbackup2006-01-05T21:23:18Z<p>Paranoos: </p>
<hr />
<div>[[Category:CD/DVD]]<br />
I found the original information posted here rather inadequate. Instead of destroying the information, in case it still proves useful to some people, I'll preserve it here under the "Older Method" section.<br />
<br />
=My Method=<br />
==Introduction==<br />
While dual layer DVD recorders are readily available and inexpensive, dual layer media is still not very easy on the wallet. Even if it were affordable, there are some of us who would prefer to simply make a backup copy of a movie, and not all the extra features that nobody watches more than once.<br />
<br />
There are several ways to get what you want done, and many of them are slow, and require several steps to accomplish. Here's a simpler method using dvdbackup and dvdauthor, which can be both be found in the AUR. We will also be using mkisofs (found in the cdrtools package), and growisofs.<br />
<br />
==Making a Backup==<br />
The dvdbackup program is elegant because it doesn't have to demultiplex, remultiplex, re-encode, or reformat the movie. This means the backup process is done in one step. The only time to not use this method is for longer movies (greater than 2 or 2.5 hours ... anything that won't fit on a single layer DVD). In those cases, you will need to use a longer method, which can requantize mpeg2 video to decrease the file size. The dvdshrink tool should help you do this. I'll explain this method later on.<br />
<br />
Anyway, let's determine which title to backup. Here's the command to retrieve some information from your DVD. Replace /dev/hdc with the proper drive, of course.<br />
dvdbackup -i/dev/hdc -I<br />
<br />
After some less useful information, dvdbackup will show something like this:<br />
<pre><br />
Main feature:<br />
Title set containing the main feature is 1<br />
The aspect ratio of the main feature is 16:9<br />
The main feature has 1 angle(s)<br />
The main feature has 1 audio_track(s)<br />
The main feature has 2 subpicture channel(s)<br />
The main feature has a maximum of 28 chapter(s) in on of it's titles<br />
The main feature has a maximum of 6 audio channel(s) in on of it's titles<br />
</pre><br />
<br />
What we're concerned with is that the main feature is in title set 1. Next we'll see a list of title sets:<br />
<pre><br />
Title Sets:<br />
<br />
Title set 1<br />
The aspect ratio of title set 1 is 16:9<br />
Title set 1 has 1 angle(s)<br />
Title set 1 has 1 audio_track(s)<br />
Title set 1 has 2 subpicture channel(s)<br />
<br />
Titles included in title set 1 is/are<br />
Title 1:<br />
Title 1 has 28 chapter(s)<br />
Title 1 has 6 audio channle(s)<br />
</pre><br />
<br />
Obviously, the main feature is title 1. Sometimes a titleset will include more than one title, sometimes not. Title sets can also include menus, which will no longer work very well if we're not backing up the entire DVD.<br />
<br />
Now to rip the DVD! We're using the drive /dev/hdc, ripping title 1, and outputting to our home directory.<br />
dvdbackup -i/dev/hdc -t1 -o/home/steve<br />
<br />
dvdbackup reads the name of the DVD and creates a directory for it. If dvdbackup decides the name of the DVD is too generic (like MOVIE, for instance), you will have to specify a name, as it will refuse to run otherwise. Just use -nMYMOVIENAME to specify.<br />
<br />
==Creating IFO and BUP Files==<br />
If you know much about DVDs, you'll notice that we only have a number of VOB files on our hard drive, and that's not enough to burn a copy! This is where dvdauthor comes in.<br />
<br />
First, we need to create a working directory. Then we're going to the directory that contains the VOB files. Be aware that this command is going to make a copy of the entire movie. The original can be deleted right afterwards.<br />
mkdir /home/steve/dvd<br />
cd /home/steve/MYMOVIENAME/VIDEO_TS<br />
dvdauthor -o /home/steve/dvd *.VOB<br />
<br />
dvdauthor just created a copy of our movie, and hopefully it worked alright. If it said anything like "SCR moves backwards, remultiplex input." there might be trouble. Before deleting any files, check the file sizes of the original VOB files compared to the copied ones. If they're all roughly the same, you may be OK. You can use mplayer to test the affected VOB file to see if there's anything missing. If so, you may have to go the long route. I haven't backed up many DVDs, but it appears this problem occurs with special features, and hopefully not actual movies.<br />
<br />
Well, now we've built VTS_01_0.IFO and BUP. All we need is VIDEO_TS.IFO and BUP, and we're in business. This part takes much less time, and doesn't waste hard drive space.<br />
cd /home/steve/dvd/VIDEO_TS<br />
dvdauthor -o /home/steve/dvd -T<br />
<br />
Now we can create an ISO image file, or burn straight to DVD.<br />
<br />
==Creating an ISO==<br />
The advantage to creating the ISO file is that you can test that everything works fine with mplayer before continuing. The disadvantage is of course that it takes up hard drive space again.<br />
mkisofs -dvd-video -udf -o dvd.iso dvd/<br />
<br />
To test the image with mplayer, simply:<br />
mplayer dvd:// -dvd-device dvd.iso<br />
<br />
If everything seems ok, we can burn the image. Yes, growisofs burns DVDs.<br />
growisofs -Z /dev/hdc=dvd.iso<br />
<br />
==Burning Straight to DVD==<br />
If we're pretty confident in our skills, we don't need to create and test an image, wasting time and hard drive space! We're basically merging the mkisofs with the growisofs commands listed above.<br />
growisofs -dvd-video -udf -Z /dev/hdc dvd/<br />
<br />
<br />
=The Long Way=<br />
This method may be necessary if your movie is too long to fit on a single layer disc and you need to shrink the video file a bit, or if dvdauthor was giving you trouble with the method above. Hopefully, the latter case won't happen often.<br />
<br />
Anyway, all you need is a tool called dvdshrink, which can be found in the AUR. It's a nice perl script with included GTK2 frontend, which utilizes many tools. Unfortunately, it takes many steps to get a burnable copy with this method, which is why it takes longer than dvdbackup. Of course, the advantage is that it can shrink the video file size if needed. I was able to burn a 2h 23m movie without shrinking, even though the discs say they can only hold 120m of video.<br />
<br />
Anyway, run xdvdshrink.pl, the interface is pretty self-explanitory. Click the Configure button to set your DVD drive(s) and specify a working directory with lots of extra space. Save the settings and go back to the main screen. You can "Select from DVD" which title to rip, as well as the audio channel. Each time, the program will scan the DVD and present you with options. The title selection is pretty obvious, as there should be only one long title on there. For the audio selection, simply pick your language. You may also have options for 2 channel or 6 channel audio (stereo or 5.1). It's up to you which one you choose here.<br />
<br />
If you have a DVD reader and a DVD burner, you can leave a blank disc in the burner, and enable "Force DVD burn (no prompt) on the right. If you only have a single DVD drive, just enable "Autoburn new DVD", and when the ripping is complete, the program will prompt you to insert a blank disc and hit enter to continue.<br />
<br />
The other options you should enable are "Remove working files", "Shrink selected title to fit DVD5" if your movie is too long to fit on a single disc, and it's up to you if you want to "Delete logs". "Remove working files" is especially important, since a movie is roughly 4GB, and this process takes several steps, which may result in 12-20GB of usage on your hard drive, depending on what the program has to do.<br />
<br />
Anyway, that should be all. Click "Start copy"!<br />
<br />
=Older Method=<br />
==Introduction==<br />
Making a data DVD is simple. It only involves a single command in most cases. If you need to simply burn data onto a DVD, see the [[DVD_writing|DVD Writing Tutorial]]. However if you want a DVD that you can play in your DVD player, it gets a little more complex. You need to encode the source video, generate the layout of the disc (with menus, titles, chapters, etc), make the filesystem (generate an ISO), and finally burn the ISO. This tutorial will cover only the most basic way of making a video DVD- You place the DVD in your DVD player and a movie plays. You are encouraged to research each step further, as there are countless options and features you can add beyond this. <br />
<br />
<br />
==Encoding Source Video==<br />
If the video you want to burn to a DVD is already encoded to the proper format, then you can skip this step. You will need transcode and mjpegtools to encode the video to the proper format. Note that this only applies to AVI or MPEG files. If you are dealing with wmv, asf, mov, ogm, etc files, then you will need to use mencoder.<br />
<br />
<br />
If you are dealing with another type of file, install mencoder (part of the mplayer package):<br />
<pre><br />
pacman -Sy mplayer<br />
</pre><br />
<br />
For NTSC:<br />
<pre><br />
mencoder -o output_file.avi -ovc lavc -lavcopts vbitrate=5000:vhq -ffourcc DX50 -oac pcm -srate 48000 -ofps 29.97 your_movie.mov<br />
</pre> <br />
<br />
For PAL:<br />
<pre><br />
mencoder -o output_file.avi -ovc lavc -lavcopts vbitrate=5000:vhq -ffourcc DX50 -oac pcm -srate 48000 -ofps 25 your_movie.mov<br />
</pre><br />
<br />
<br />
Now you will have an AVI file that we can convert to DVD compatable video. Continue by installing the tools we will need:<br />
<br />
<pre><br />
pacman -Sy transcode mjpegtools<br />
</pre><br />
<br />
First we separate the audio and video from the source video and encode them to the proper formats using transcode:<br />
<br />
<pre><br />
transcode -i source_video.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 2 -o video -D0 -b224 -N 0x2000 -s2 -m video.ac3 -J modfps=clonetype=3 --export_fps 29.97 <br />
</pre><br />
<br />
'''-i''' is the source video you are working with. Change this to whatever the original file is called.<br />
<br />
'''-o''' is the ouput filename. I'll just call it "video" to make it simple. <br />
<br />
'''-m''' tells transcode to write the audio to a separate file, in this case ''video.ac3''<br />
<br />
'''-export_asr''' is the aspect ratio. '''2''' is 4:3 ratio, and '''3''' is for 16:9 ratio. Change this to whichever one you want. <br />
<br />
<br />
'''NOTE:''' The above command uses the NTSC compatable format. To encode to PAL format, you need to make a few changes:<br />
<br />
''--export_prof dvd-pal''<br />
<br />
''--export_fps 25''<br />
<br />
<br />
This process will probably take some time. An hour long video could take 1-3 hours to encode depending on the speed of your computer. When complete, you will be left with a video.m2v file and video.ac3 file. These are DVD-compliant video and audio files, respectively.<br />
<br />
The next step is to merge these 2 files into one DVD MPEG file using '''mplex''', part of the mjpegtools package. <br />
<br />
<pre><br />
mplex -f 8 -o video.mpg video.m2v video.ac3 <br />
</pre><br />
<br />
Now is a good time to test the video.mpg file in your video player of choice, such as ''mplayer'' or ''xine''. If everything appears ok, then you can continue to the next step. <br />
<br />
<br />
==Create DVD Structure==<br />
In order to generate the layout of the DVD from your video files, you will need to use dvdauthor:<br />
<br />
<pre><br />
pacman -Sy dvdauthor<br />
</pre><br />
<br />
You can specify a lot of options via command line, but it is much easier to simply create an XML file with the appropriate options. dvdauthor can do just about anything, but it could get fairly complex and beyond the scope of this tutorial. We just wnat to put a DVD in the drive and have it play our video. The XML file should look like this:<br />
<br />
<pre><br />
<dvdauthor><br />
<vmgm /><br />
<titleset><br />
<titles><br />
<pgc><br />
<vob file="video.mpg" /><br />
</pgc><br />
</titles><br />
</titleset><br />
</dvdauthor><br />
</pre><br />
<br />
You can name this file whatever you want. Let's just assume it is dvd.xml. Next, we will run dvdauthor to generate the structure of the DVD. <br />
<br />
<pre><br />
dvdauthor -o dvd -x dvd.xml<br />
</pre><br />
<br />
'''-o''' is the ouput directory. This can be whatever you please, but make sure the directory doesn't exist prior to running the command.<br />
<br />
'''-x ''' the XML file to load settings from. Change this to whatever you named your XML file.<br />
<br />
After dvdauthor completes doing it's thing, you will have a dvd/ directory in the current directory. These are the files you will want to burn to a DVD in the next step.<br />
<br />
Links with more information regarding the XML file for advanced usage:<br />
<br />
http://dvdauthor.sourceforge.net/doc/ex-title.html<br />
<br />
http://www.tappin.me.uk/Linux/dvd.html#author<br />
<br />
http://gecius.de/linux/dvd.html<br />
<br />
<br />
==Generate the ISO and Burn the DVD==<br />
This can actually be done in one step, but I will go over the 2-step process anyways, just in case you want to distribute an ISO to other people. For this step, we will need two packages; '''dvd+rw-tools''' and '''cdrtools'''<br />
<br />
<pre><br />
pacman -Sy dvd+rw-tools cdrtools<br />
</pre><br />
<br />
First, we make the filesystem using mkisofs, part of the cdrtools package:<br />
<br />
<pre><br />
mkisofs -dvd-video -udf -o dvd.iso dvd/<br />
</pre><br />
<br />
'''-o''' is the output file. Of course, this can be whatever you want.<br />
<br />
'''dvd/''' is the directory generated by dvdauthor. If you used a different directory, of course you will need to change this. <br />
<br />
Next, we use growisofs to burn the DVD:<br />
<br />
<pre><br />
growisofs -Z /dev/hdd=dvd.iso<br />
</pre><br />
<br />
That should be it! Make sure you change the device path to whatever your DVD burner is and specify the correct ISO filename you are using. <br />
<br />
This can actually be done in one step, like I mentioned before, like so:<br />
<br />
<pre><br />
growisofs -dvd-video -udf -Z /dev/hdd dvd/<br />
</pre><br />
<br />
This will skip the ISO step and burn the filesystem directly to the DVD. Change the device name and the directory to fit your needs.<br />
<br />
<br />
==More Information and Links==<br />
<br />
mplayer/mencoder: http://www.mplayerhq.hu/<br />
<br />
dvdauthor: http://dvdauthor.sourceforge.net/<br />
<br />
http://www.tappin.me.uk/Linux/dvd.html<br />
<br />
http://gecius.de/linux/dvd.html<br />
<br />
http://forums.gentoo.org/viewtopic.php?t=117709</div>Paranooshttps://wiki.archlinux.org/index.php?title=Gapless_Audio_CD_Creation_from_MP3s&diff=8046Gapless Audio CD Creation from MP3s2006-01-02T20:59:08Z<p>Paranoos: removed old ATAPI method of specifying a drive.</p>
<hr />
<div>[[Category:CD/DVD]]<br />
[[Category:Audio/Video]]<br />
<br />
===Setup===<br />
We'll be using a few programs for this.<br />
pacman -Sy lame cdrdao<br />
<br />
Let's configure cdrdao to use our CD burner. Open up <tt>/etc/cdrdao.conf</tt> (as root), and enter the /dev entry for your burner in this format:<br />
write_device: "/dev/hdc"<br />
<br />
===Decode the MP3s===<br />
First of all, copy all the songs you want on the CD to a folder. It's best to rename them to reflect the order you want the tracks to be laid out (such as 01.mp3, 02.mp3, etc). Now we're going to decode all the mp3s into uncompressed wav files. Please realize that a full album can take up more than 800MB in wav files alone. This will take some time.<br />
mkdir wav<br />
for file in *.mp3 ; do<br />
lame --decode "$file" "wav/$file.wav"<br />
done<br />
<br />
===Create a Table of Contents file===<br />
Once finished, let's make a Table of Contents file that describes the layout of the CD.<br />
cd wav<br />
{<br />
echo "CD_DA"<br />
for file in *.wav ; do<br />
echo "TRACK AUDIO"<br />
# echo "PREGAP 00:02:00" # insert a 2-second silent gap before each track<br />
echo "FILE \"$file\" 0"<br />
done<br />
} > toc<br />
<br />
===Burn===<br />
Finally, all we have to do is burn the CD.<br />
cdrdao write toc</div>Paranooshttps://wiki.archlinux.org/index.php?title=Realtime_process_management&diff=4413Realtime process management2005-09-15T06:18:51Z<p>Paranoos: </p>
<hr />
<div>[[Category:Audio/Video]]<br />
[[Category:Kernel]]<br />
[[Category:Security]]<br />
<br />
<br />
==Realtime for Joe Sixpack==<br />
While most processors are powerful enough<br />
to play a dozen video or at least audio streams at once, it is possible that<br />
another thread hijacks your processor for just half a second to complete another<br />
task. This results in short interrupts in audio or video streams. It can also<br />
happen that your video/audio streams get out of sync. While it is annoying for<br />
casual music listener, a content producer, composer or video editor simply can't<br />
accept this problem since it interrupts his/her workflow. The pretended simple<br />
solution is to make the audio and video processes a higher priority. But as most<br />
users know, Joe Sixpack can set a higher nice value to a process, which means<br />
that it's priority is lower. Only root can set lower values and start processes<br />
at a lower nice value than 0. It makes sense that the average user<br />
cannot steal too much power from processes which are necessary just to keep the<br />
system running. This is especially important on multiuser machines. Many<br />
realtime desires are limited to single user machines, so this aspect of security<br />
is not as critical as it seems. By the same time it should be made sure that the<br />
user can really control the priorities only and cannot affect other parts of<br />
system configuration which are controlled by root only.<br />
<br />
==Realtime and Realtime is not the same==<br />
Realtime is a synonym for the a process which has as much capabilities to run<br />
in time without being interrupted by any other process. A couple of thing can<br />
make it dropping cycles nevertheless. Maybe the processor is running out of<br />
juice or another process with an even higher priority steals too many<br />
CPU-cycles. There is a scaling of realtime quality. The main aspect we are<br />
dealing with is the soft realtime. If a box runs out of power and the<br />
video editors playback starts to drop frames, the process must be made different<br />
like rendering out the preview file so that it can be played without problems.<br />
Hard realtime is usually not "desired" but "needed". An example could be made<br />
for car's ABS. This can not be "rendered" and there is no second chance.<br />
<br />
==A Small History to Understand The Problem==<br />
There have always been efforts to make it easier for the user to achieve<br />
realtime capabilities from the kernel. A lot of patches were floating around the<br />
web. As of generation 2.6 there was an addon module available called<br />
realtime-lsm. It required CAPABILITY build as module and was only to handle by<br />
the more experienced user since the absence of CAPABILITY in the kernel in case<br />
that neither capability nor realtime-lsm was loaded can cause trouble.<br />
[http://www.archlinux.org/pipermail/arch/2005-July/005148.html]<br />
As of kernel-2.6.12, the so called rlimits patch has been accepted in the<br />
mainstream kernel and is now the desired way to provide normal users with<br />
realtime capabilities.<br />
<br />
==Power is Nothing without Control==<br />
The realtime-lsm module granted the right to get higher capabilities to users<br />
belonging to a certain UID. The rlimit way works similar, but it can be<br />
controlled graduated finer. There is a new functionality in PAM which can be<br />
used to control the capbilities on a per user or a per group level. In the<br />
current version (0.80-2) these values are not set correctly out of the box and<br />
still create problems.<br />
With PAM you can grant realtime priority to a certain user or to a certain<br />
usergroup. PAM#s concept makes it imaginable that there will be ways in the<br />
future to grant rights on a per application level. But this is not now possible.<br />
<br />
==The necessary settings for realtime==<br />
First of all, make sure your kernel is compiled with "preemptible kernel"<br />
settings. As /boot/kconfig26 tells you, the standard ArchLinux kernel is<br />
configured that way. This warning just goes out o all the selfcompilers.<br />
Secondly, you need a PAM>0.80 or 0.79-3(that was patched). The last I can<br />
confirm working was 0.80-2 from "testing". Just note that the names for the<br />
variables in limits.conf have changed from 0.79 to 0.80!<br />
Now edit your /etc/security/limits.conf. ArchLinux comes with sane standards for<br />
users from the %audio group. Make sure that you are a member of it and you are<br />
mainly done. The standard settings are enough to get jack-server running with<br />
hydrogen or ardour. For some other applications it might be necessary to<br />
redefine the values for rt_prio from 65 to 80 or even higher!<br />
<br />
The following settings work for me also with ardour:<br />
<pre>@audio - rtprio 70<br />
@audio - nice -10<br />
@audio - memlock 250000</pre></div>Paranooshttps://wiki.archlinux.org/index.php?title=Building_a_Live_CD&diff=3994Building a Live CD2005-08-23T22:04:26Z<p>Paranoos: </p>
<hr />
<div>[[Category:CD/DVD]]<br />
<br />
=== Motivation - Why? ===<br />
To have a bootable version of Arch Linux running totally off a CD, is useful in many ways. It can be made to rescue your HD system, test new machines / hardwares if Linux compatible, keep an updated installer with latest packages, or make a demo CD to show your projects, and much more.<br />
<br />
=== Before we start - What you'll need ===<br />
# To create an iso, format a filesystem, and to resize an image download "cdrtools" and "e2fsprogs" packages.<br />
# pacman -S cdrtools<br />
# pacman -S e2fsprogs<br />
# Free hard disk space:<br />
* 1 fresh partition to install the distro.<br />
* 1 folder in your active partition to copy the distro to be put on the CD.<br />
# A CD-RW to test burning various images and a CD burner.<br />
# Install CD burning package (if you don't know what package to install, try "k3b").<br />
# pacman -S k3b<br />
<br />
=== Details ===<br />
As an example, here we are creating a mini Arch Linux live CD (110MB). It is based on packages installed from Arch Linux's CD installer ver. 0.5.<br />
<br />
==== Boot with Arch Linux CD installer and install the base packages ====<br />
<br />
When the packages are installed, install the kernel but don't install LILO or Grub. You can also copy your own kernel image (<tt>/boot/vmlinuz</tt>), and related modules (<tt>/lib/modules/2.x.x</tt>) from your active partition. To boot the new install, configure <tt>lilo.conf</tt> or <tt>grub</tt> in your active partition.<br />
<br />
'''Hint:'''For test purpose, to check for errors in the booting process, in your active partition mount the new partition and edit <tt>/etc/rc.local</tt> with the following lines to pause before login:<br />
<br />
echo "Press any key to continue..."<br />
read KEY<br />
<br />
'''NOTE:''' Don't forget to remove the pause!!<br />
<br />
In your active partition, in <tt>/root</tt> make one folder "''mylivecd''" and two sub-folders: "''isolinux''" and "''system''" (any names can be used).<br />
<br />
# cd /root<br />
# mkdir mylivecd<br />
# cd mylivecd<br />
# mkdir isolinux<br />
# mkdir system<br />
<br />
==== Install isolinux. Copy it from an existing live CD.====<br />
<br />
# Download "''isolinux.bin''" and "''boot.cat''" to <tt>/root/mylivecd/isolinux/</tt> :<br />
http://amlug.bliss-solutions.org/live-cd/distfiles/0.5.1/isolinux/<br />
# Create boot message "''boot.msg''" (text file) and include a short description about the live CD. Save the file in <tt>/root/mylivecd/isolinux/</tt>. Copy this text to <tt>boot.msg</tt>:<br />
This is a Live CD test ver. 0.1.<br />
F1 - boot message<br />
F2 - package list<br />
<br />
Press Enter<br />
# Create "''isolinux.cfg''" (text file) and include the following text. Save the file in <tt>/root/mylivecd/isolinux/</tt><br />
prompt 1<br />
timeout 0<br />
display boot.msg<br />
F1 boot.msg<br />
F2 package.txt<br />
default vmlinuz initrd=miniroot.gz init=/sbin/init ramdisk_size=100000 load_ramdisk=1 prompt_ramdisk=0 vga=788 root=/dev/ram0<br />
<br />
==== Build one miniroot image ====<br />
Miniroot is loaded in RAM during booting and operates same as in HD. Use Ext2 filesystem.<br />
<br />
'''NOTE:''' Miniroot setup depends on <tt>/etc/inittab</tt>, <tt>/etc/rc.sysinit</tt>, <tt>/etc/rc.multi</tt>, and <tt>/etc/rc.shutdown</tt>. Before building the miniroot image, study these files and plan how they can be modified whenever is needed. In <tt>/sbin</tt> the following files are required: <br><br />
http://amlug.bliss-solutions.org/live-cd/distfiles/0.5.1/miniroot/init/sbin/<br />
<br />
# Create "''miniroot''" (text file) in <tt>/root/mylivecd</tt> with Ext2 filesystem. The image size depends how much stuff you plan to include. In this sample we will make the image 15.8MB but its recommended to make the image as small as possible. When you are ready, mount the image in <tt>/mnt/xxx</tt> (here we mount in <tt>/mnt/image</tt>).<br />
# cd /root/mylivecd<br />
# touch miniroot<br />
# mkfs.ext2 miniroot 15840 (press "y" for each question)<br />
# mkdir /mnt/image<br />
# mount -t auto -o loop miniroot /mnt/image<br />
# rm -R /mnt/image/lost+found<br />
'''NOTE:''' If you want to resize, run the following codes (e.g. to 11.5MB):<br />
# e2fsck -f miniroot (press "y" for /lost+found not found. Create<y>?)<br />
# resize2fs miniroot 11520<br />
# Mount the new partition (e.g. <tt>/dev/hda3</tt>). Copy the below folders and files from the new partition to <tt>/mnt/image</tt> (use <tt>cp -Ra</tt> to maintain the file permissions).<br />
# mkdir /mnt/tmp<br />
# mount /dev/hda3 /mnt/tmp<br />
# cp -Ra /mnt/tmp/bin /mnt/image/<br />
# cp -Ra /mnt/tmp/etc /mnt/image/<br />
# cp -Ra /mnt/tmp/sbin /mnt/image/<br />
# cp -Ra /mnt/tmp/tmp /mnt/image/<br />
# cp -Ra /mnt/tmp/var /mnt/image/<br />
# Copy <tt>/usr</tt> and <tt>/lib/modules/2.x.x/</tt>, <tt>/lib/modules/evms/</tt>, <tt>/lib/modules/security/</tt> to <tt>/root/mylivecd/system/</tt> :<br />
# cp -Ra /mnt/tmp/usr /root/mylivecd/system/<br />
# cp -Ra /mnt/tmp/opt /root/mylivecd/system/<br />
# mkdir /root/mylivecd/system/lib<br />
# cp -Ra /mnt/tmp/lib/modules /root/mylivecd/system/lib/<br />
# cp -Ra /mnt/tmp/lib/evms /root/mylivecd/system/lib/<br />
# cp -Ra /mnt/tmp/lib/security /root/mylivecd/system/lib/<br />
'''NOTE''': If <tt>/bin</tt> and <tt>/sbin</tt> are too big you may consider using busybox:<br />
http://www.busybox.net/<br />
'''OR''' temporary folders, which will be removed or renamed at the boot by codes in <tt>/rc.sysinit</tt>. Here is an example:<br />
http://amlug.bliss-solutions.org/live-cd/distfiles/0.5.1/miniroot/init/sbin/rc.sysinit<br />
# Create the following folders in <tt>/mnt/image</tt> and copy <tt>/mnt/tmp/lib</tt> files to <tt>/mnt/image/lib/</tt> (don't copy <tt>/mnt/tmp/lib/module</tt>, <tt>~/lib/evms</tt> and <tt>~/lib/security)</tt>:<br />
# cd /mnt/image<br />
# mkdir dev<br />
# mkdir home<br />
# mkdir lib<br />
# mkdir mnt/cdrom<br />
# mkdir mnt/floppy<br />
# mkdir root<br />
# mkdir proc<br />
# mkdir lib/modules<br />
# cd /mnt/tmp/lib/<br />
# cp -a l* /mnt/image/lib/<br />
#With the folders <tt>/usr</tt> and <tt>/opt</tt> create links in <tt>/mnt/image/</tt>. Also link the <tt>/system/lib/modules/2.x.x/</tt>. Copy kernel image to <tt>/root/mylivecd/isolinux/</tt>:<br />
# cd /mnt/image<br />
# ln -sf /mnt/cdrom/system/usr usr<br />
# ln -sf /mnt/cdrom/system/opt opt<br />
# cd /mnt/image/lib/modules/<br />
# ln -sf /mnt/cdrom/system/lib/modules/2.4.22 2.4.22<br />
# cd /mnt/image/lib/<br />
# ln -sf /mnt/cdrom/system/lib/evms evms<br />
# ln -sf /mnt/cdrom/system/lib/security security<br />
# cp /mnt/tmp/boot/vmlinuz /root/mylivecd/isolinux/<br />
# Edit <tt>/mnt/image/etc/fstab as shown here:</tt><br />
/dev/root / ext2 defaults 0 0<br />
none /proc proc defaults 0 0<br />
/dev/floppy/0 /mnt/floppy auto user,rw,noauto,unhide 0 0<br />
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0<br />
# Add the following line in <tt>rc.sysinit</tt> (after line: <tt>stat_busy "Mounting Local Filesystems"</tt>) in <tt>/mnt/image/etc/</tt>. This enables reading files from the CD's /system folder.<br />
/bin/mount /dev/cdroms/cdrom0 /mnt/cdrom -o ro -t iso9660<br />
# Compress the miniroot and move miniroot.gz to /root/mylivecd/isoliux/<br />
# cd /root/mylivecd/<br />
# umount /mnt/image<br />
# gzip -c miniroot >> miniroot.gz<br />
# mv miniroot.gz isolinux/<br />
# Before compiling iso, move the <tt>/root/mylivecd/miniroot</tt> to a safe place. Make a temporary folder to put the iso image (not within <tt>/mylivecd</tt>). Run the following code (don't miss the "." at the end of line):<br />
# cd /root/mylivecd<br />
# mkdir /root/isotmp<br />
# Make the ISO:<br />
mkisofs -o /root/isotmp/test-livecd-0.1.iso -R -V "Test 0.1" \<br />
-T -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \<br />
-boot-load-size 4 -boot-info-table -A "Test Live CD 0.1" .<br />
<br />
==== Conclusion ====<br />
We hope this document gets you started. Any comments or addition, please either edit the content or post reply (requires to register). Good luck!<br />
<br />
------<br />
<br />
=== Additional Info:===<br />
<br />
Codes, content of AMLUG Live CD, and how to compress:<br />
http://www.amlug.net/new-projects/forum/index.php?showforum=23<br />
<br />
How other distros build live CDs:<br />
http://www.babytux.org/articles/howto/how2livecd.php<br />
----</div>Paranooshttps://wiki.archlinux.org/index.php?title=User:Paranoos&diff=3977User:Paranoos2005-08-10T18:46:11Z<p>Paranoos: </p>
<hr />
<div></div>Paranooshttps://wiki.archlinux.org/index.php?title=User:Paranoos&diff=1852User:Paranoos2005-08-10T18:45:14Z<p>Paranoos: </p>
<hr />
<div>{{accuracy}}<br />
<br />
===Chunk E===<br />
[[CUPS Setup]]<br />
<br />
[[Compal CL56]]<br />
<br />
[[Configuring FAM]]<br />
<br />
[[Connect your MP3-Player with ArchLinux]]<br />
<br />
[[Courier MTA]]<br />
<br />
[[Crux vs. Arch]]<br />
<br />
[[Custom Kernel Compilation with ABS (2.6.9 and later)]]</div>Paranooshttps://wiki.archlinux.org/index.php?title=Gamepad&diff=2765Gamepad2005-08-09T02:29:46Z<p>Paranoos: removed a severely outdated link, for kernels 2.0 and 2.2</p>
<hr />
<div>[[Category:Input Device]]<br />
<br />
Joysticks can be a bit of a hassle to get working in Linux. Not because they are poorly supported, but simply because you need to determine which modules to load to get your joystick working, and it's not always very obvious!<br />
<br />
= Setup =<br />
== Determining Which Modules You Need ==<br />
For an extensive overview of all joystick related modules in Linux, you will need access to the Linux kernel sources -- specifically the Documentation section. Unfortunately, pacman kernel packages don't include what we need. If you have the kernel sources downloaded, have a look at <code>Documentation/input/joystick.txt</code>. If you don't want to download the (huge) kernel sources, have a look at [[http://www.kernelhq.com/ KernelHQ]] - you can browse the kernel source tree there, and read code and documentation online. Simply go to the Browse section, select your kernel version, and find <code>Documentation/input/joystick.txt</code>.<br />
<br />
Some joysticks need specific modules, such as the Microsoft Sidewinder controllers (<code>sidewinder</code>), or the Logitech digital controllers (<code>adi</code>). Many older joysticks will work with the simple <code>analog</code> module. If your joystick is plugging in to a gameport provided by your soundcard, you will need your soundcard drivers loaded - however, some cards, like the Soundblaster Live, have a specific gameport driver (<code>emu10k1-gp</code>). Older ISA soundcards may need the <code>ns558</code> module, which is a standard gameport module.<br />
<br />
As you can see, there are many different modules related to getting your joystick working in Linux, so I couldn't possibly cover everything here. Please have a look at the documentation mentioned above for details.<br />
<br />
==Loading the Modules==<br />
You need to load a module for your gameport (<code>ns558</code>, <code>emu10k1-gp</code>, <code>cs461x</code>, etc...), a module for your joystick (<code>analog</code>, <code>sidewinder</code>, <code>adi</code>, etc...), and finally the kernel joystick device driver (<code>joydev</code>). Add these to your <code>/etc/rc.conf</code>, or simply modprobe them. The <code>gameport</code> module should load automatically, as this is a dependency of the other modules.<br />
<br />
==Testing Your Configuration==<br />
Once the modules are loaded, you should find a new device: <code>/dev/input/js0</code>. You can simply <code>cat</code> the device to see if it works - move the stick around, press all the buttons. I found my Logitech Thunderpad Digital had two buttons that weren't working with the <code>analog</code> module. After reading some docs, I saw there was a specific <code>adi</code> module for this controller. The moral of the story is, if it doesn't work the first time, don't give up, and read those docs thoroughly! I couldn't get anything working at all until I found that documentation.<br />
<br />
==USB Joysticks==<br />
I don't have any access to a USB joystick right now, so I am unable to give any specific instructions. I would think you just need to get USB working, and then modprobe your joystick driver, as well as <code>joydev</code>. Perhaps <code>ns558</code> as well? Please edit this document to confirm.<br />
<br />
= External Resources =<br />
{{Gentoo-Wiki|HOWTO_Joystick_Setup}}</div>Paranooshttps://wiki.archlinux.org/index.php?title=Reiser4&diff=1843Reiser42005-07-29T21:32:38Z<p>Paranoos: </p>
<hr />
<div>[[Category:HowTos]]<br />
===Reiser4 File System Howto===<br />
Contributed by Itlain<br />
<br />
This is my first attempt at using a wiki so bear with me please. Feel free to make any corrections to whatever. This should be a community effort. The following is what worked for me flawlessly the first time. Be warned that Reiser4 is still not considered a stable release. You will be required to patch your kernel.<br />
<br />
'''NOTE:''' if you need a reiser4 enabled livecd (you just might!) the check these out - http://lxnay.dnsalias.org/livecd-iso/index.php - the last two are a very small download considering their useful reiser4 tools!<br />
<br />
Reiser4 info can be found at:<br />
<br />
http://www.namesys.com/v4/v4.html<br />
<br />
To upgrade to Reiser4 there are 3 main things that you will need before you attempt the process. They are as follows:<br />
<br />
====libaal====<br />
<br />
ftp://ftp.namesys.com/pub/reiser4progs/libaal-1.0.4.tar.gz<br><br />
mirror: http://ftp.roedu.net/pub/mirrors/ftp.namesys.com/pub/reiser4progs/libaal-1.0.4.tar.gz<br><br />
<br />
PKGBUILD<br><br />
<pre><br />
pkgname=libaal<br />
pkgver=1.0.4<br />
pkgrel=1<br />
pkgdesc="libaal"<br />
url="http://www.namesys.com"<br />
depends=()<br />
install=<br />
source=(ftp://ftp.namesys.com/pub/reiser4progs/$pkgname-$pkgver.tar.gz)<br />
md5sums=('78b06fcea858031c776f99628c4f7376')<br />
<br />
build() {<br />
cd $startdir/src/$pkgname-$pkgver<br />
./configure --prefix=/usr<br />
# if you wish to add GRUB reiser4 functionality, use the next configure instead :<br />
#./configure --prefix=/usr --enable-libminimal<br />
make ||| return 1<br />
make prefix=$startdir/pkg/usr install<br />
}<br />
<br />
</pre><br />
<br />
====reiser4progs====<br />
<br />
ftp://ftp.namesys.com/pub/reiser4progs/reiser4progs-1.0.4.tar.gz<br><br />
mirror: http://ftp.roedu.net/pub/mirrors/ftp.namesys.com/pub/reiser4progs/reiser4progs-1.0.4.tar.gz<br><br />
<br />
PKGBUILD<br><br />
<pre><br />
pkgname=reiser4progs<br />
pkgver=1.0.4<br />
pkgrel=1<br />
pkgdesc="Reiser4 filesystem programs"<br />
url="http://www.namesys.com/v4/v4.html"<br />
depends=('e2fsprogs' 'libaal')<br />
source=(ftp://ftp.namesys.com/pub/reiser4progs/$pkgname-$pkgver.tar.gz)<br />
license=""<br />
md5sums=('9b0bb224aa592809448390d4cf1b88e9')<br />
<br />
build() {<br />
cd $startdir/src/$pkgname-$pkgver<br />
./configure --prefix=/usr<br />
# if you wish to add GRUB reiser4 functionality, use the next configure instead :<br />
#./configure --prefix=/usr --enable-libminimal<br />
make ||| return 1<br />
make prefix=$startdir/pkg/usr install<br />
}<br />
</pre><br />
<br />
== Note ==<br />
If you don't want to compile those packages, you can use the comunnity repository:<br />
ftp://ftp.archlinux.org/community/os/i686/<br />
<br />
====grub====<br />
if you wish to use grub with reiser4, the grub package should also be rebuild with applying the reiser4 patch.<br />
<br />
ftp://alpha.gnu.org/gnu/grub/grub-0.95.tar.gz<br />
<br />
PKGBUILD<br />
<pre><br />
pkgname=grub<br />
pkgver=0.95<br />
pkgrel=2<br />
pkgdesc="A GNU multiboot boot loader"<br />
url="http://www.gnu.org/software/grub/"<br />
depends=('ncurses' 'libaal' 'reiser4progs' 'bash')<br />
source=(ftp://alpha.gnu.org/gnu/grub/grub-$pkgver.tar.gz \<br />
menu.lst install-grub \<br />
'ftp://ftp.namesys.com/pub/reiser4progs/grub/LATEST_PATCH')<br />
backup=('boot/grub/menu.lst')<br />
md5sums=('4ca8e4363d5f1980f2c63b7f5cdbe0d1' '3f0e8e1615769b3368b5ae2dbfbb986b'\<br />
'3b108306c5e76968de9dc01216ba1ef7' '64406c6a858eb79761ac4a1a45122380')<br />
<br />
build() {<br />
cd $startdir/src/$pkgname-$pkgver<br />
patch -Np1 -i ../LATEST_PATCH ||| return 1<br />
# optimizations break the build -- disable them<br />
CFLAGS<code> ./configure --prefix</code>/usr --bindir<code>/bin --sbindir</code>/sbin<br />
CFLAGS= make ||| return 1<br />
make prefix<code>$startdir/pkg/usr bindir</code>$startdir/pkg/bin \<br />
sbindir=$startdir/pkg/sbin install<br />
mkdir -p $startdir/pkg/boot/grub<br />
cp ../menu.lst $startdir/pkg/boot/grub<br />
install -m755 -D ../install-grub $startdir/pkg/sbin/install-grub<br />
}<br />
</pre><br />
====Kernel Patch====<br />
<br />
You will also need to compile a new kernel with the patches. There are two ways to do this. The way that I would recommend is to download a vanilla 2.6.9 kernel. The patch that I used to update my kernel can be found here:<br />
<br />
http://members.optusnet.com.au/ckolivas/kernel/<br />
<br />
After downloading both the kernel and the patch extract both to /usr/src.<br />
<br />
Execute the following commands:<br />
<pre><br />
>> cd /usr/src/linux-2.6.9<br />
>> patch -p1 < patch-2.6.9-ck2<br />
</pre><br />
The patch should install with no rejects or complaints.<br />
<br />
If you don't want to use the -ck patch, you can also patch directly from: ftp://ftp.namesys.com/pub/reiser4-for-2.6/2.6.9/<br />
<pre><br />
>> zcat reiser4-for-2.6.9-2.gz || patch -p1<br />
or<br />
>> gunzip -d reiser4-for-2.6.9-2.gz<br />
>> patch -p1 < reiser4-for-2.6.9-2<br />
</pre><br />
<br />
Once this is done simply config and compile your new kernel. Ensure that you enable the following:<br />
<br />
<pre><br />
CONFIG_REISER4_FS=y<br />
CONFIG_REISER4_LARGE_KEY=y<br />
</pre><br />
<br />
You also have to ensure that under kernel hacking that 4k stacks are '''NOT''' enabled. You will get an error if you attempt. Once the kernel is compiled ensure you do a make modules and a make modules_install.<br />
<br />
Next up came the backing up of my current system. My system was configured as the following:<br />
<br />
* /dev/hda2 was my current Reiser3 / partition<br />
* /dev/hda3 was my current Reiser3 /home partition<br />
* /dev/hda4 was my swap partition<br />
<br /><br />
I executed the following command as root:<br />
<pre><br />
>> cp -R /home /hometmp<br />
</pre><br />
Once my /home directory was safely backed up I made the Reiser4 partition with the following commands:<br />
<br><br />
<pre><br />
>> mkfs.reiser4 /dev/hda3<br />
>> mkdir /reiser4<br />
>> mount -t reiser4 /dev/hda3 /reiser4<br />
</pre><br />
Now that my partition was mounted I proceded to copy my current system over to my new Reiser4 partition with the following:<br />
<pre><br />
>> mkdir /reiser4/dev<br />
>> mkdir /reiser4/proc<br />
>> cp -a /etc /reiser4<br />
>> cp -a /bin /reiser4<br />
>> cp -a /var /reiser4<br />
>> cp -a /hometmp /reiser4<br />
>> cp -a /usr /reiser4<br />
>> cp -a /lib /reiser4<br />
>> cp -a /root /reiser4<br />
>> cp -a /boot /reiser4<br />
>> cp -a /tmp /reiser4<br />
>> cp -a /sbin /reiser4<br />
>> mkdir /reiser4/sys<br />
<br />
Make sure too that you copy any other files or directories that you want to the new partition. Next I had to adjust my /etc/fstab and my /etc/lilo.conf<br />
<br />
First off is my new lilo.conf<br />
<pre><br />
boot=/dev/hda<br />
default=reiser4 # Change my default boot partition to my new Reiser4<br />
timeout=50<br />
lba32<br />
compact<br />
prompt<br />
image=/boot/arch<br />
label=arch # My old reiser3 arch installation<br />
root=/dev/hda2<br />
read-only<br />
append<code>"devfs</code>nomount" # Notice I use udev. Don't add this line if you use devfs or you will have problems<br />
image=/boot/reiser4arch<br />
label=reiser4 # My new reiser4 partition<br />
read-only<br />
root=/dev/hda3 # Notice this used to be my /home partition.<br />
append<code>"devfs</code>nomount"<br />
other=/dev/hda1<br />
label=dos # What can I say. Need it for work :)<br />
<br />
~# End of file<br />
</pre><br />
And my /etc/fstab<br />
<pre><br />
none /proc proc defaults 0 0<br />
none /dev/pts devpts defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
tmpfs /tmp tmpfs defaults 0 0<br />
usbfs /proc/bus/usb usbfs defaults 0 0<br />
<br />
/dev/cdrom /mnt/cd iso9660 ro,user,noauto,unhide 0 0<br />
/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0<br />
<br />
/dev/hda4 swap swap defaults 0 0<br />
#/dev/hda2 / reiserfs defaults 0 0 # I commented out my old installation that was my root partition<br />
/dev/hda3 / reiser4 defaults 0 0 # Changed my /home partition to my root and changed the type to reiser4<br />
</pre><br />
Once this one done I re-ran lilo to install my new kernels.<br><br />
<br />
I then rebooted into my new system with no problems whatsoever. <br><br />
Log in as root and execute the following:<br><br />
<pre><br />
>> mv /hometmp /home<br />
>> cd /home<br />
>> chown -R username.group <userdir> # Changes ownership back to each user. Otherwise you will have problems<br />
# Mine for example was "chown -R itlain.users itlain"<br />
</pre><br />
<br />
I then logged out as root and back in as my regular user and started X back up. So far everything works great and I don't expect any problems from the changeover.<br><br />
My todo list is however to move my old root partition to my new /home partition to seperate the 2.<br><br />
<br />
I was pretty happy with the whole thing. If you have any questions or comments I'm usually on the irc channel<br />
<br />
== Possible Issues ==<br />
<br />
*If you have problem with "su" command after the change of fs, you should reinstall coreutils package.</div>Paranooshttps://wiki.archlinux.org/index.php?title=User:Cactus/ScriptForDvdBackup&diff=4106User:Cactus/ScriptForDvdBackup2005-07-29T20:54:24Z<p>Paranoos: </p>
<hr />
<div>[[Category:CD/DVD]]<br />
[[Category:Scripts]]<br />
I created a simple script for backing up a DVD and thought I'd share.<br />
<br />
First you need wine, libdvdcss and libdvdread installed and have wine configure itself for your user<br />
sudo pacman -S wine libdvdcss libdvdread wine<br />
<br />
Then download and install DVDShrink 3.1 http://www.dvdshrink.org/where.html<br />
unzip dvdshrink*.zip<br />
wine dvdshrink*.exe<br />
<br />
You also need to find dvdbackup.c and compile it<br />
gcc -o dvdbackup -ldvdread dvdbackup.c<br />
<br />
And for simplicity's sake make a batch script to have wine run DVDShrink 3.1<br />
echo wine /home/username/.wine/drive/c/Program\ Files/DVD\ Shrink/DVD\ Shrink\3.1.exe > wine_dvdshrink<br />
<br />
Almost everything is in place just need to move some files around<br />
<br />
<pre><br />
chmod 555 dvdbackup<br />
chmod 555 wine_dvdshrink<br />
sudo mv dvdbackup /usr/bin/<br />
sudo mv wine_dvdshrink /usr/bin/<br />
</pre><br />
<br />
All done now except for the actual script which does all of the work.<br />
Copy and paste this into a new file and chmod it executable. Then just run this script<br />
and follow the prompts. The first few lines define variables so you can adjust what drive<br />
you want to read, burn and where you want to store the temporary VOB files.<br />
<br />
<pre><br />
#!/bin/sh<br />
<br />
#setup for reader and directories<br />
TheDVDReader="/dev/cdroms/cdrom1"<br />
TheRIPFolder="/mnt/extrahdd/dvd_backups/"<br />
TheDVDBurner="/dev/cdroms/cdrom0"<br />
# Most likely you do not need to edit the "MOVIE=" line<br />
MOVIE=`dvdbackup -i $TheDVDReader -I 2> /dev/null || grep "DVD-Video information" || sed -e 's/.* //g'`<br />
<br />
clear<br />
echo "################## $MOVIE #######################"<br />
echo "Are you ready to start copying the DVD to disk [[Y/n]]?"<br />
read ready<br />
<br />
if [ "$ready" = "n" ]; then<br />
echo "Cancelled, exiting.."<br />
exit 0<br />
fi<br />
<br />
if [ "$ready" = "N" ]; then<br />
echo "Cancelled, exiting.."<br />
exit 0<br />
fi<br />
<br />
dvdbackup -M -i $TheDVDReader -o $TheRIPFolder<br />
<br />
<br />
clear<br />
echo "################## $MOVIE #######################"<br />
echo "DVDShrink will now run under wine."<br />
echo "Make whatever changes you need to and"<br />
echo "save your iso as z:\$TheRIPFolder/$MOVIE.ISO"<br />
<br />
wine_dvdshrink<br />
<br />
clear<br />
echo "################## $MOVIE #######################"<br />
echo "Hit return when you are ready."<br />
echo "All files will be deleted except for your .iso"<br />
echo " "<br />
echo "Also make sure to insert a blank DVD into your writer now."<br />
read ready<br />
<br />
if [ "$ready" = "n" ]; then<br />
echo "Cancelled, exiting.."<br />
exit 0<br />
fi<br />
<br />
if [ "$ready" = "N" ]; then<br />
echo "Cancelled, exiting.."<br />
exit 0<br />
fi<br />
<br />
#delete temp files since now we have a .iso<br />
rm -rf $TheRIPFolder/$MOVIE<br />
<br />
growisofs -dvd-compat -Z $TheDVDBurner=$TheRIPFolder/$MOVIE.ISO<br />
<br />
clear<br />
echo "################## $MOVIE #######################"<br />
echo "Would you like to delete the .iso at this time? [[Y/n]]"<br />
read ready<br />
<br />
if [ "$ready" = "n" ]; then<br />
echo "Cancelled, exiting.."<br />
exit 0<br />
fi<br />
<br />
if [[ "$ready" = "N" ]; then<br />
echo "Cancelled, exiting.."<br />
exit 0<br />
fi<br />
<br />
rm -f $TheRIPFolder/$MOVIE.ISO<br />
</pre><br />
<br />
Any alterations with this is welcomed. I've only tried this on my install, so I might be missing a thing or two.</div>Paranooshttps://wiki.archlinux.org/index.php?title=Arch_compared_to_other_distributions&diff=1073Arch compared to other distributions2005-07-26T22:03:32Z<p>Paranoos: </p>
<hr />
<div>[[Category:General]]<br />
This page summarizes some of the similarities and differences between Arch and other distributions. This question comes up repeatedly and it would be nice to have a standard response. Please note: the best way to compare Arch to other distributions is to install it and try it yourself. Arch has a wonderful user community that is always willing to help new users. The summaries below are meant only to give you enough information to decide if Arch is really for you.<br />
<br />
==Arch vs Gentoo==<br />
Because Arch distributes binary, it is much less time consuming than Gentoo. Gentoo has more packages. Arch allows both binary and source based distribution. PKGBUILDs are easier to create than ebuilds. Gentoo is more portable out of the box as packages will get compiled to your specific architecture, whereas as Arch is i686 only (although i586 and x64 user-based spinoff projects are underway).<br />
<br />
==Arch vs Slackware==<br />
Slackware and Arch are both 'simple' distributions. Both use BSD init scripts. Arch supplies a much more robust package management system in pacman.<br />
<br />
==Arch vs Debian==<br />
Arch is simpler than Debian. Arch has fewer packages. Arch provides better support for building your own packages than Debian does. Arch is more lenient when it comes to 'non-free' package as defined by GNU. Arch is i686 optimized and thus faster than Debian. Arch packages are more bleeding edge than Debian packages (Arch current is often more up to date than Debian unstable!)<br />
<br />
==Arch vs Graphical Distros==<br />
The graphical distros have a lot of similarities, and Arch is very different from any of them. Arch is text based and command-line oriented. Arch is a better distro if you want to truly learn Linux. Graphical-based distros tend to ship with GUI installers (like Fedora's Anaconda) and GUI system configuration tools (like Suse's Yast). Specific differences between distros are described below.<br />
===Arch vs RPM based Distros===<br />
RPM packages are available from many, many places, however third-party packages often have dependency issues, such as requiring an old version of a library. There is also confusion between RPM packages for Red Hat vs. RPM packages for Mandrake. (These are issues I had as a Linux newbie with Mandrake 8.2, and may not reflect the current situation.) pacman is much more powerful and reliable than RPM.<br />
====Arch vs Fedora====<br />
====Arch vs Mandrake====<br />
<br />
===Arch vs SuSe===</div>Paranooshttps://wiki.archlinux.org/index.php?title=Arch_compared_to_other_distributions&diff=1011Arch compared to other distributions2005-07-26T22:03:14Z<p>Paranoos: /* Arch vs RPM based Distros */</p>
<hr />
<div>[[Category:General]]<br />
<br />
This page summarizes some of the similarities and differences between Arch and other distributions. This question comes up repeatedly and it would be nice to have a standard response. Please note: the best way to compare Arch to other distributions is to install it and try it yourself. Arch has a wonderful user community that is always willing to help new users. The summaries below are meant only to give you enough information to decide if Arch is really for you.<br />
<br />
==Arch vs Gentoo==<br />
Because Arch distributes binary, it is much less time consuming than Gentoo. Gentoo has more packages. Arch allows both binary and source based distribution. PKGBUILDs are easier to create than ebuilds. Gentoo is more portable out of the box as packages will get compiled to your specific architecture, whereas as Arch is i686 only (although i586 and x64 user-based spinoff projects are underway).<br />
<br />
==Arch vs Slackware==<br />
Slackware and Arch are both 'simple' distributions. Both use BSD init scripts. Arch supplies a much more robust package management system in pacman.<br />
<br />
==Arch vs Debian==<br />
Arch is simpler than Debian. Arch has fewer packages. Arch provides better support for building your own packages than Debian does. Arch is more lenient when it comes to 'non-free' package as defined by GNU. Arch is i686 optimized and thus faster than Debian. Arch packages are more bleeding edge than Debian packages (Arch current is often more up to date than Debian unstable!)<br />
<br />
==Arch vs Graphical Distros==<br />
The graphical distros have a lot of similarities, and Arch is very different from any of them. Arch is text based and command-line oriented. Arch is a better distro if you want to truly learn Linux. Graphical-based distros tend to ship with GUI installers (like Fedora's Anaconda) and GUI system configuration tools (like Suse's Yast). Specific differences between distros are described below.<br />
===Arch vs RPM based Distros===<br />
RPM packages are available from many, many places, however third-party packages often have dependency issues, such as requiring an old version of a library. There is also confusion between RPM packages for Red Hat vs. RPM packages for Mandrake. (These are issues I had as a Linux newbie with Mandrake 8.2, and may not reflect the current situation.) pacman is much more powerful and reliable than RPM.<br />
====Arch vs Fedora====<br />
====Arch vs Mandrake====<br />
<br />
===Arch vs SuSe===</div>Paranooshttps://wiki.archlinux.org/index.php?title=Arch_compared_to_other_distributions&diff=1010Arch compared to other distributions2005-07-26T22:02:30Z<p>Paranoos: /* Arch vs RPM based Distros */</p>
<hr />
<div>[[Category:General]]<br />
<br />
This page summarizes some of the similarities and differences between Arch and other distributions. This question comes up repeatedly and it would be nice to have a standard response. Please note: the best way to compare Arch to other distributions is to install it and try it yourself. Arch has a wonderful user community that is always willing to help new users. The summaries below are meant only to give you enough information to decide if Arch is really for you.<br />
<br />
==Arch vs Gentoo==<br />
Because Arch distributes binary, it is much less time consuming than Gentoo. Gentoo has more packages. Arch allows both binary and source based distribution. PKGBUILDs are easier to create than ebuilds. Gentoo is more portable out of the box as packages will get compiled to your specific architecture, whereas as Arch is i686 only (although i586 and x64 user-based spinoff projects are underway).<br />
<br />
==Arch vs Slackware==<br />
Slackware and Arch are both 'simple' distributions. Both use BSD init scripts. Arch supplies a much more robust package management system in pacman.<br />
<br />
==Arch vs Debian==<br />
Arch is simpler than Debian. Arch has fewer packages. Arch provides better support for building your own packages than Debian does. Arch is more lenient when it comes to 'non-free' package as defined by GNU. Arch is i686 optimized and thus faster than Debian. Arch packages are more bleeding edge than Debian packages (Arch current is often more up to date than Debian unstable!)<br />
<br />
==Arch vs Graphical Distros==<br />
The graphical distros have a lot of similarities, and Arch is very different from any of them. Arch is text based and command-line oriented. Arch is a better distro if you want to truly learn Linux. Graphical-based distros tend to ship with GUI installers (like Fedora's Anaconda) and GUI system configuration tools (like Suse's Yast). Specific differences between distros are described below.<br />
===Arch vs RPM based Distros===<br />
RPM packages are available from many, many places, however third-party packages often have dependency issues, such as requiring an old version of a library. there is also confusion between rpm packages for Red Hat vs. rpm packages for Mandrake. (These are issues I had as a Linux newbie with Mandrake 8.2, and may not reflect the current situation.) pacman is much more powerful and reliable than rpm.<br />
====Arch vs Fedora====<br />
====Arch vs Mandrake====<br />
<br />
===Arch vs SuSe===</div>Paranooshttps://wiki.archlinux.org/index.php?title=AUR_User_Guidelines&diff=1396AUR User Guidelines2005-07-26T00:47:21Z<p>Paranoos: </p>
<hr />
<div>[[Category:PackageManagement]]<br />
===Purpose===<br />
<br />
The <span title="Arch User Repository" style="border-bottom:1px dotted">AUR</span> is a community driven repository for Arch users. The AUR was initially conceived to organize the sharing of PKGBUILDs amongst the wider community and to expedite the inclusion of popular user-contributed packages into the [current] and [extra] repos via the AUR [community] repo.<br />
<br />
===The User===<br />
<br />
The normal user plays an essential role in the AUR and without the support, involvement and contribution of the wider user community the AUR cannot fulfil its potential. The lifecycle of an AUR package starts and end with the user and requires the user to contribute in several ways.<br />
<br />
Users can '''share PKGBUILDs''' using the UNSUPPORTED area in the AUR. It does not contain any binary packages but allows users to upload PKGBUILDs that can be downloaded by others. The AUR provides a comments facility that allows users to '''feedback improvements''' and suggestions to the PKGBUILD contributor. However, these PKGBUILDs are completely unofficial and unvetted so should be used with caution and at your own risk.<br />
<br />
In contrast the [community] repo is a supplement to the [extra] and [current] repositories where the most popular packages from UNSUPPORTED are maintained by the Trusted Users group on behalf of the users. [community], also in contrast to UNSUPPORTED, contains binary packages that can be installed directly with pacman. Some of these packages may eventually make the transition to the [current] or [extra] repositories as the developers consider them crucial to the distribution.<br />
<br />
One of the easiest activties for _all_ Arch users is to browse the AUR and '''vote''' for their favourite packages using the online interface. Packages that recieve <span title="Under discussion!" style="border-bottom:1px dotted">25</span> votes or more are eligible for adoption by a TU for inclusion in [community], enabling everyone easy access to the binary - so it is in everyones interest to vote!<br />
<br />
Users can access the AUR [community] repo by adding this to their pacman.conf file:<br />
<br />
[community]<br />
Server = ftp://ftp.archlinux.org/community/os/i686/<br />
<br />
There is as yet no official mechanism for downloading material from UNSUPPORTED but a few scripts can be found on the wiki.<br />
<br />
An introducing HOWTO for AUR users can be found [[Howto_AUR_for_Users|here]].<br />
<br />
====Submitting Packages to UNSUPPORTED====<br />
Inside the AUR web interface, a user can submit a tarball (tar.gz) of a directory containing build files for a package. The directory inside the tarball should contain a PKGBUILD, any .install files, patches, etc (ABSOLUTELY no binaries). Examples of what such a directory should look like can be seen inside /var/abs. <br />
<br />
When submitting a package, observe the following rules: <br />
* Check [extra], [current], [unstable], UNSUPPORTED, and [community] for the package. If it is inside any of those repositories in ANY form, DO NOT submit the package (if the current package is broken or is lacking an included feature the please file a bug report in FlySpray http://bugs.archlinux.org/).<br />
* Verify carefully that what you are uploading is correct. All contributors must read and adhere to the [http://www.archlinux.org/docs/en/guide/install/arch-install-guide.html#guidelines Arch Packaging Guidelines] when writing PKGBUILDs. This is essential to the smooth running and general success of the AUR. Remember you are not going to earn any credit or respect from your peers by wasting their time with a bad PKGBUILD.<br />
* Packages that contain binaries or that are very poorly written may be deleted without warning.<br />
* If you are unsure about the package (or the build/submission process) in any way, submit the PKGBUILD to the AUR Mailing List or the AUR boards on the forum for public review before adding it to the AUR.<br />
* Make sure the package is useful. Will anyone else want to use this package? Is it extremely specialized? If more than a few people would find this package useful, it is appropriate for submission.<br />
* Gain some experience before submitting packages. Build a few packages to learn the process and then submit.<br />
<br />
====Maintaining Packages in UNSUPPORTED====<br />
* Check for feedback and comments from other users and try to incorporate any improvements they suggest; consider it a learning process!<br />
* PLease DO NOT just abandon packages! While in UNSUPPORTED, it is the user's job to maintain the package by checking for updates and improving the PKGBUILD. If you do not want to continue to maintain the package for some reason, <code>disown</code> the pkg using the AUR web interface and/or post a message to the AUR Mailing List<br />
<br />
====Using Packages in UNSUPPORTED====<br />
To install a pkg from UNSUPPORTED you should follow these steps:<br />
* locate the application in the AUR using the search feature (we'll use foo as an example pkg name here) and click the package name in the list of results. This will bring up the information page for that pkg. On the left side you can see two links side by side:<br />
<pre> Tarball :: Files </pre><br />
* Click Tarball to download the necessary build files to you hard drive. This should be called <code>foo.tar.gz</code>, for example, if it has been properly submitted.<br />
* Copy the <code>foo.tar.gz</code> tarball to a build directory e.g. <code>/var/abs/local</code> and extract it. This should create a new directory, <code>/var/abs/local/foo</code> that contains all the files necessary to build the pkg<br />
* '''IMPORTANT''': change to the newly created directory and carefully check the PKGBUILD and any .install file for malicious commands - if in any doubt DO NOT build the pkg and seek advice on the forums or mailing list.<br />
* It is suggested you use <code>fakeroot</code> to build pkgs (see below) so having manually confirmed the integrity of the files simply run <code>makepkg</code> as a normal user in the build dir, the source files will be downloaded, verified and built as normal.<br />
<br />
====Using <code>fakeroot</code>====<br />
<code>fakeroot</code> simply allows a normal user the necessary root permissions to create pkgs in the build environment without being able to alter the wider system. If the build process attempts to alter files outside of the build environment then errors are produced and the build fails - this is very useful for checking the quality/safety/integrity of PKGBUILDs for distribution. By default <code>export USE_FAKEROOT="y"</code> is included in <code>/etc/makepkg.conf</code> so unles you have switched it off it is already enabled</div>Paranooshttps://wiki.archlinux.org/index.php?title=Boost_Pacman&diff=1419Boost Pacman2005-07-26T00:40:29Z<p>Paranoos: /* Boost Pacman with wget */</p>
<hr />
<div>[[Category:PackageManagement]]<br />
<br />
==Boost Pacman with wget==<br />
<br />
* First of all upgrade your system to ensure you have the latest pacman:<br />
pacman -Syu<br />
<br />
* Make sure you have wget installed:<br />
pacman -S wget<br />
<br />
* Now configure <code>/etc/pacman.conf</code>. Add the following line to the <code>[option]</code> section, or uncomment the existing <code>XferCommand</code> line:<br />
XferCommand = /usr/bin/wget -c --passive-ftp -c %u<br />
<br />
* Now Pacman will download all packages using wget.<br />
<br />
This is also very handy if you need more powerful proxy settings than pacman's built-in capabilities.<br />
<br />
You can modify the wget configuration file to not have to enter any wget parameters on the command line.<br />
<br />
The configuration file for wget is /etc/wgetrc, which is for all users, to setup wgetrc for individual users use $HOME/.wgetrc as documented in the /etc/wgetrc file.</div>Paranooshttps://wiki.archlinux.org/index.php?title=Screen_capture&diff=2182Screen capture2005-07-26T00:37:34Z<p>Paranoos: </p>
<hr />
<div>[[Category:Desktop]]<br />
An easy way to take a screenshot of your curent system is using the import command:<br />
import -window root screenshot.jpg<br />
<br />
import is part of the imagemagick package.<br />
<br />
There are also several other ways to do this.<br />
You could use the application called scrot or it might be a overkill but you also can take screenshots with gimp (File -> Acquire -> Screenshot ...)</div>Paranooshttps://wiki.archlinux.org/index.php?title=Fluxbox/Style_guide&diff=1844Fluxbox/Style guide2005-07-26T00:29:49Z<p>Paranoos: /* Notes for getting started */</p>
<hr />
<div>[[Category:Desktop]]<br />
<br />
This is a list of all the theme items that can be customized in a fluxbox theme.cfg<br><br />
This file is in two parts: the first explains what each of the items does the second part is a complete list that can be copied and pasted into a theme.cfg to get you started.<br><br />
This has been specially structured to group the relevant items<br />
<br />
==How the items work==<br />
<br />
Each item is structured main''object.sub''object.item: value e.g. toolbar.clock.pixmap: value<br />
<br />
The values that are available only depend on the item part e.g. .pixmap: {filename}<br />
<br />
The pixmap item needs a {filename} e.g. toolbar.clock.pixmap: clock.xpm<br />
<br />
That's it! All you need to know is the options for each value. Here I'll show what the different options can befor each value with some examples. Part 2 gives a list of all the items and the type of value needed for each and can be copied to a file by you.<br />
<br />
==={texture type}===<br />
<br />
pixmap options: requires a filename in *.pixmap<br />
pixmap<br />
tiled<br />
<br />
non-pixmap options: uses '''.color to color the objects, use '''.colorTo for gradients and highlights<br />
flat<br />
gradient<br />
vertical<br />
horizontal<br />
diagonal<br />
crossdiagonal<br />
pipecross<br />
elliptic<br />
rectangle<br />
pyramid<br />
e.g menu.frame: Flat Gradient Vertical<br><br />
or<br />
raised<br />
sunken<br />
bevel1<br />
bevel2<br />
gradient<br />
vertical<br />
horizontal<br />
diagonal<br />
crossdiagonal<br />
pipecross<br />
elliptic<br />
rectangle<br />
pyramid<br />
e.g. menu.title: Raised Bevel1 Gradient Vertical<br />
<br />
==={color}===<br />
any hex color<br />
<pre><br />
#ffffff<br />
#000000<br />
</pre><br />
e.g menu.title.textColor: #ffffff<br />
<br />
any rgb colour as shown in /usr/X11R6/lib/X11/rgb.txt<br />
rgb:4/3/2<br />
e.g menu.title.textColor: rgb:4/3/2<br />
<br />
any colour<br />
white<br />
black<br />
<br />
e.g menu.title.textColor: white<br />
<br />
==={filename}===<br />
the name of a .xpm file stored in pixmaps, which should be in the same directory as theme.cfg<br />
e.g. menu.title.pixmap: iconbarf.xpm<br />
<br />
==={integer}===<br />
a whole number that gives the height/width of something in pixels<br />
e.g window.title.height: 22<br />
<br />
==={boolean}===<br />
Something set to either on or off<br />
true<br />
false<br />
e.g.toolbar.shaped: true<br />
<br />
==={alpha}===<br />
a transparency setting - should be an integer between 0 and 255 where 0 is invisible/transparent<br><br />
and 255 is solid/opaque - 150 is popular<br />
<br />
e.g.window.alpha: 255<br />
<br />
==={round}===<br />
rounding options for corners<br />
TopLeft<br />
TopRight<br />
BottomLeft<br />
BottomRight<br />
e.g.window.roundCorners: Topleft Topright<br />
<br />
==={justify}===<br />
where text or an image is postioned<br />
Center<br />
Left<br />
Right<br />
e.g.window.justify: Center<br />
<br />
==={bullet}===<br />
only used for menu.bullet: option. for non pixmaps styles only.<br />
triangle<br />
square<br />
e.g.menu.bullet: triangle<br />
<br />
==={string}===<br />
<br />
only used for the root.command: option. lets you set the path to a wallapaper image and<br />
which application to display it<br />
fbsetbg -f wallpaper.png<br />
e.g.root.command: fbsetbg -a mywallpaper.png<br />
<br />
==={font}===<br />
what font to use!<br />
font-size<br />
e.g.menu.frame.font: trebuchet-10<br />
<br />
there are several options that can be used in any combination<br />
bold<br />
shadow<br />
italic<br />
these need to be colon or comma separated<br />
font-size:bold:shadow:italic<br />
e.g.menu.title.font: trebuchet-10:shadow:bold<br />
<br />
===Explanation of items that are a little confusing===<br />
<br />
.colorTo - if you use a gradient setting then the belnd is between .color and .colorTo<br />
<br />
.borderWidth - gives a border of {integer} width. 0 will give no border<br />
<br />
.bevelwidth - the bevel is between the border and the object e.g. in the menu,<br />
menu.bevelWidth increases the space between menu entries<br />
<br />
.picColor - sets the color of a default fluxbox image that is added on top of an item e.g. toolbar.button.picColor<br />
<br />
.alpha - a transparency setting<br />
<br />
===Notes for getting started===<br />
<br />
1. using window.label and window.title with window.bevelWidth<br />
<br />
When you use window.label this will overlay window.title. however, if you set<br />
window.bevelWidth the window.title will show as a "border" around window.label<br />
i.e. window.label floats over window.title<br />
This allows some quite simple but cool effects but does restrict window buttons (see below)<br />
<br />
2. using toolbar and toolbar.iconbar.*, toolbar.clock, toolbar.workspace, toolbar.button<br />
<br />
As with 1. above. toolbar is overlayed by toolbar.iconbar.*, toolbar.clock, toolbar.workspace<br />
and toolbar.button. Again setting toolbar.bevelWidth allows all of the these to float over<br />
toolbar, giving a border/layer effect<br />
<br />
3. using window buttons<br />
<br />
If window.bevelWidth is '''not''' used then all window.* buttons (close, icon, etc) may be any size<br />
but must be '''square''' and all have the '''same dimensions'''. This allows some very creative button designs and most styles at Fluxmod use this method<br />
<br />
However, if window.bevelWidth '''is''' used then the buttons are restricted in size by the '''font''' used for window.label. Here the best thing to do is choose the font size you want for window.label then make your pixmaps to the correct size. Or, in this case, you could set the window.button options to give a background and allow fluxbox to overlay with the default pixmaps (you can choose the colour with window.button.*.picColor) or create your own to the correct dimensions.<br />
<br />
4. using * (wildcards)<br />
<br />
==structured items==<br />
a theme.cfg template, laid out as below, is available for you to download and edit here http://dtw.jiwe.org/StyleItems.txt<br />
<br />
<pre><br />
This work is licensed under the Creative Commons<br />
Attribution-NonCommercial-ShareAlike License.<br />
To view a copy of this license, visit<br />
http://creativecommons.org/licenses/by-nc-sa/1.0/<br />
or send a letter to Creative Commons,<br />
559 Nathan Abbott Way, Stanford, California 94305, USA.<br />
<br />
---------------------------------------------<br />
FluxMOD http://www.fluxmod.dk<br />
Style Name:<br />
Style Author:<br />
Style Date:<br />
---------------------------------------------<br />
</pre><br />
<br />
===The toolbar===<br />
<br />
====general settings====<br />
<br />
toolbar.borderWidth: {integer}<br><br />
toolbar.borderColor: {color}<br><br />
<br />
toolbar.shaped: {boolean}<br><br />
toolbar.alpha: {alpha}<br><br />
toolbar.height: {integer}<br><br />
<br />
====The clock area====<br />
toolbar.clock.font: {font}<br><br />
toolbar.clock.textColor: {color}<br><br />
toolbar.clock.justify: {justify}<br><br />
<br />
toolbar.clock: {texture type}<br><br />
toolbar.clock.pixmap: {filename}<br><br />
toolbar.clock.color: {color}<br><br />
toolbar.clock.colorTo: {color}<br><br />
toolbar.clock.borderWidth: {integer}<br><br />
toolbar.clock.borderColor: {color}<br><br />
<br />
====The workspace title area====<br />
toolbar.workspace.font: {font}<br><br />
toolbar.workspace.textColor: {color}<br><br />
toolbar.workspace.justify: {justify}<br><br />
<br />
toolbar.workspace: {texture type}<br><br />
toolbar.workspace.pixmap: {filename}<br><br />
toolbar.workspace.color: {color}<br><br />
toolbar.workspace.colorTo: {color}<br><br />
toolbar.workspace.borderWidth: {integer}<br><br />
toolbar.workspace.borderColor: {color}<br><br />
<br />
====The iconbar====<br />
where windows are shown depending on Iconbar Mode which is set by right-clicking on the fluxbox toolbar<br><br />
<br />
toolbar.iconbar.borderWidth: {integer}<br><br />
toolbar.iconbar.borderColor: {color}<br><br />
<br />
====Empty - when no windows are shown as icons====<br />
toolbar.iconbar.empty: {texture type}<br><br />
toolbar.iconbar.empty.pixmap: {filename}<br><br />
toolbar.iconbar.empty.color: {color}<br><br />
toolbar.iconbar.empty.colorTo: {color}<br><br />
<br />
====Focused window icon====<br />
toolbar.iconbar.focused.font: {font}<br><br />
toolbar.iconbar.focused.textColor: {color}<br><br />
toolbar.iconbar.focused.justify: {justify}<br><br />
toolbar.iconbar.focused: {texture type}<br><br />
toolbar.iconbar.focused.pixmap: {filename}<br><br />
toolbar.iconbar.focused.color: {color}<br><br />
toolbar.iconbar.focused.colorTo: {color}<br><br />
toolbar.iconbar.focused.borderWidth: {integer}<br><br />
toolbar.iconbar.focused.borderColor: {color}<br><br />
<br />
====Unfocused window icon====<br />
toolbar.iconbar.unfocused.font: {font}<br><br />
toolbar.iconbar.unfocused.textColor: {color}<br><br />
toolbar.iconbar.unfocused.justify: {justify}<br><br />
toolbar.iconbar.unfocused: {texture type}<br><br />
toolbar.iconbar.unfocused.pixmap: {filename}<br><br />
toolbar.iconbar.unfocused.color: {color}<br><br />
toolbar.iconbar.unfocused.colorTo: {color}<br><br />
toolbar.iconbar.unfocused.borderWidth: {integer}<br><br />
toolbar.iconbar.unfocused.borderColor: {color}<br><br />
<br />
====The toolbar buttons for prevworkspace, nextworkspace, prevwindow and next window====<br />
toolbar.button {texture type}<br><br />
toolbar.button.pixmap: {filename}<br><br />
toolbar.button.color: {color}<br><br />
toolbar.button.colorTo: {color}<br><br />
toolbar.button.picColor: {color}<br><br />
toolbar.button.pressed: {texture type}<br><br />
toolbar.button.pressed.pixmap: {filename}<br><br />
toolbar.button.pressed.color: {color}<br><br />
toolbar.button.pressed.colorTo: {color}<br><br />
toolbar.button.pressed.picColor: {color}<br><br />
<br />
===The windows===<br />
focus is the currently selected window - unfocus is in the background<br />
<br />
====general====<br />
window.font: {font}<br><br />
window.justify: {justify}<br><br />
window.roundCorners: {round}<br><br />
window.alpha: {alpha}<br><br />
window.bevelWidth: {integer}<br><br />
window.borderWidth: {integer}<br><br />
window.borderColor: {color}<br><br />
<br />
===focused and unfocused window===<br />
<br />
====titlebar====<br />
the "background" of the window title. This is layered under window.label - see the note in part one<br />
<br />
window.title.height: {integer}<br />
window.title.focus: {texture type}<br><br />
window.title.focus.pixmap: {filename}<br><br />
window.title.focus.color: {color}<br><br />
window.title.focus.colorTo: {color}<br><br />
window.title.unfocus: {texture type}<br><br />
window.title.unfocus.pixmap: {filename}<br><br />
window.title.unfocus.color: {color}<br><br />
window.title.unfocus.colorTo: {color}<br><br />
<br />
====label====<br />
the text background. This is layered over window.title - see the note in part one<br />
<br />
window.label.focus: {texture type}<br><br />
window.label.focus.pixmap: {filename}<br><br />
window.label.focus.color: {color}<br><br />
window.label.focus.colorTo: {color}<br><br />
window.label.focus.textColor: {color}<br><br />
window.label.unfocus: {texture type}<br><br />
window.label.unfocus.pixmap: {filename}<br><br />
window.label.unfocus.color: {color}<br><br />
window.label.unfocus.colorTo: {color}<br><br />
window.label.unfocus.textColor: {color}<br><br />
<br />
====handle====<br />
the bar along the bottom of the window for resizing vertically<br />
<br />
window.handleWidth: {integer}<br><br />
window.handle.focus: {texture type}<br><br />
window.handle.focus.pixmap: {filename}<br><br />
window.handle.focus.color: {color}<br><br />
window.handle.focus.colorTo: {color}<br><br />
window.handle.unfocus: {texture type}<br><br />
window.handle.unfocus.pixmap: {filename}<br><br />
window.handle.unfocus.color: {color}<br><br />
window.handle.unfocus.colorTo: {color}<br><br />
<br />
====grips====<br />
either side of the handle for resizing in horizontally and vertically<br />
<br />
window.grip.focus: {texture type}<br><br />
window.grip.focus.pixmap: {filename}<br><br />
window.grip.focus.color: {color}<br><br />
window.grip.focus.colorTo: {color}<br><br />
window.grip.unfocus: {texture type}<br><br />
window.grip.unfocus.pixmap: {filename}<br><br />
window.grip.unfocus.color: {color}<br><br />
window.grip.unfocus.colorTo: {color}<br><br />
<br />
====button====<br />
sets the background for the window buttons - not visible if window buttons (below) are used<br />
<br />
window.button.focus: {texture type}<br><br />
window.button.focus.pixmap: {filename}<br><br />
window.button.focus.color: {color}<br><br />
window.button.focus.colorTo: {color}<br><br />
window.button.focus.picColor: {color}<br><br />
window.button.unfocus: {texture type}<br><br />
window.button.unfocus.pixmap: {filename}<br><br />
window.button.unfocus.color: {color}<br><br />
window.button.unfocus.colorTo: {color}<br><br />
window.button.unfocus.picColor: {color}<br><br />
window.button.pressed: {texture type}<br><br />
window.button.pressed.pixmap: {filename}<br><br />
window.button.pressed.color: {color}<br><br />
window.button.pressed.colorTo: {color}<br><br />
<br />
====window buttons====<br />
close, max and min, shade, stick and stuck<br />
<br />
====close====<br />
window.close.pixmap: {filename}<br><br />
window.close.unfocus.pixmap: {filename}<br><br />
window.close.pressed.pixmap: {filename}<br><br />
<br />
====max====<br />
window.maximize.pixmap: {filename}<br><br />
window.maximize.unfocus.pixmap: {filename}<br><br />
window.maximize.pressed.pixmap: {filename}<br><br />
<br />
====icon====<br />
window.iconify.pixmap: {filename}<br><br />
window.iconify.unfocus.pixmap: {filename}<br><br />
window.iconify.pressed.pixmap: {filename}<br><br />
<br />
====stick====<br />
window.stick.pixmap: {filename}<br><br />
window.stick.unfocus.pixmap: {filename}<br><br />
window.stick.pressed.pixmap: {filename}<br><br />
<br />
====stuck====<br />
window.stuck.pixmap: {filename}<br><br />
window.stuck.unfocus.pixmap: {filename}<br><br />
<br />
===The menu===<br />
<br />
====general settings====<br />
menu.borderWidth: {integer}<br><br />
menu.bevelWidth: {integer}<br><br />
menu.borderColor: {color}<br><br />
<br />
====title - top of each menu====<br />
menu.title.font: {font}<br><br />
menu.title.textColor: {color}<br><br />
menu.title.justify: {justify}<br><br />
menu.title: {texture type}<br><br />
menu.title.pixmap: {filename}<br><br />
menu.title.color: {color}<br><br />
menu.title.colorTo: {color}<br><br />
<br />
====frame - menu body====<br />
menu.frame.font: {font}<br><br />
menu.frame.textColor: {color}<br><br />
menu.frame.disableColor: {color}<br><br />
menu.frame.justify: {justify}<br><br />
menu.frame: {texture type}<br><br />
menu.frame.pixmap: {filename}<br><br />
menu.frame.color: {color}<br><br />
menu.frame.colorTo: {color}<br><br />
<br />
====hilite====<br />
how the options are highlighted when mouse is over them<br />
<br />
menu.hilite.textColor: {color}<br><br />
menu.hilite: {texture type}<br><br />
menu.hilite.pixmap: {filename}<br><br />
menu.hilite.color: {color}<br><br />
menu.hilite.colorTo: {color}<br><br />
<br />
====details====<br />
menu.roundCorners: {round}<br><br />
menu.bullet.position: {justify}<br><br />
menu.bullet: {bullet}<br><br />
menu.submenu.pixmap: {filename}<br><br />
menu.selected.pixmap: {filename}<br><br />
menu.unselected.pixmap: {filename}<br><br />
<br />
<br />
====set the wallpaper with an app...====<br />
rootCommand: {string}<br><br />
<br />
====The slit====<br />
settings for the slit - not applicable if slit alpha is set to 0<br />
<br />
slit: {texture type}<br><br />
slit.pixmap: {filename}<br><br />
slit.color: {color}<br><br />
slit.colorTo: {color}<br><br />
slit.borderWidth: {integer}<br><br />
slit.bevelWidth: {integer}<br><br />
slit.borderColor: {color}<br></div>Paranooshttps://wiki.archlinux.org/index.php?title=Fluxbox&diff=1932Fluxbox2005-07-26T00:24:04Z<p>Paranoos: cleanup and removal of references to fluxbox-devel (has been merged to extra)</p>
<hr />
<div>[[Category:Desktop]]<br />
Since there is no wiki entry for Fluxbox and I was thinking about starting to use it / play with it. Here's a in-progress page. Since I am no veteran use I can't write it all out right now but can only write as I go.<br />
<br />
For questions not answered here, try the [http://iphitus.loudas.com/fluxbox.php iphitus' FAQ] or [http://fluxfaq.berlios.de/faq/ Fluxbox FAQ].<br />
<br />
First you should get yourself familiar with what [http://fluxbox.sourceforge.net/ Fluxbox] is. There are a couple nice screenshots.<br />
<br />
<pre><br />
# pacman -Ss fluxbox<br />
extra/fluxbox 0.9.13-4<br />
A lightweight and highly-configurable window manager.<br />
</pre><br />
<br />
====Installing fluxbox====<br />
The next command will install Fluxbox + the tool menumaker, which will prove very helpful in getting up our first functional menu<br />
pacman -Sy fluxbox menumaker<br />
<br />
For KDM/GDM there is nothing else to do. It is already included in the Sessions section.<br><br />
If you want fluxbox to be started after running <code>startx</code> from console, add <code>exec fluxbox</code> into your <code>~/.xinitrc</code> file. Be sure to comment any other WMs in the file by putting '#' sign on the beginning of the line.<br />
<br />
====Log into your Fluxbox and get your menu up====<br />
Once Fluxbox comes up there is already a very basic menu running. Right click somewhere and check it out. However that's probably not what you want. In the standard menu there is an entry for <code>xterm</code>. Once you have a console up, run<br />
mmaker -v Fluxbox<br />
<br />
That will create a menu that basically includes all the programs you have installed. Which is a big advantage, you can always customize the menu to your own liking in editing <code>~/.fluxbox/menu</code> . It's really not that complicated and you'll have your personal menu in no time. There's really not much more to say about the menu.<br />
<br />
====Running KDE programs in Fluxbox====<br />
It is no problem to run KDE programs in Fluxbox. In fact if you used menumaker to create your menu, then all your KDE programs should be in there and you can use them as you usually do. Convenient, isn't it?<br />
<br />
Some KDE apps won't start unless you have<br />
kdeinit &<br />
in your autostart.sh file (covered in the next section).<br />
<br />
====Startup script====<br />
In KDE all you have to do is put scripts in the ~/.kde/Autostart folder. In fluxbox it is a little bit different. The gentoo wiki does not cover this method. This is how I personally do it.<br />
<br />
In your ~/.fluxbox/ folder create a file called ''apps''. Edit that file with your preferred editor. If you have told fluxbox to remember window attributes this file will already have data in it. Put this in the file:<br />
[startup] {~/.fluxbox/autostart.sh}<br />
<br />
Then create <code>~/.fluxbox/autostart.sh</code> and put your startup scripts/apps in there. Make sure it is executable.<br />
chmod 755 ~/.fluxbox/autostart.sh<br />
<br />
Here is whatt mine looks like:<br />
<pre><br />
fbsetbg -f ~/Documents/Pictures/Backgrounds/sn33z1600.png &<br />
adesklets &<br />
kmix &<br />
gmpc &<br />
xset -b &<br />
xscreensaver &<br />
lineakd &<br />
kdeinit &<br />
xhost +localhost &<br />
</pre><br />
<br />
====Setting background====<br />
The Gentoo wiki covers this well but I wanted to note that if your style applies a background your <code>fbsetbg</code> command will not last. You have to comment out the part of the style file that applies the background.<br />
<br />
to be continued ...<br />
<br />
====Additional Links====<br />
<br />
[http://fluxbox.sourceforge.net/ Fluxbox Homepage]<br><br />
[http://gentoo-wiki.com/HOWTO_Fluxbox gentoo-wiki Fluxbox HowTo]<br><br />
[http://www.gentoo.org/doc/en/fluxbox-config.xml gentoo Fluxbox Documentation]<br><br />
[http://www.boxwhore.org/ Themes for Fluxbox]<br></div>Paranooshttps://wiki.archlinux.org/index.php?title=Start_X_at_login&diff=1832Start X at login2005-07-25T23:53:34Z<p>Paranoos: /* Q: How can I start X at boot time in Arch? */</p>
<hr />
<div>[[Category:XServer]]<br />
==== Q: How can I start X at boot time in Arch?====<br />
A: Edit your /etc/inittab ... the first uncommented line should be something like this:<br />
id:3:initdefault:<br />
<br />
Change it to:<br />
id:5:initdefault:<br />
<br />
[http://bbs.archlinux.org/viewtopic.php?t=863 Forum Topic]<br />
<br />
You may also want to change the last line of the inittab file to start <code>kdm</code> or <code>gdm</code> instead of <code>xdm</code><br />
----<br />
An alternative is to add something like the following to the bottom of your ~~/.bashrc:<br />
<pre><br />
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/vc/1 ]]; then<br />
startx<br />
fi<br />
</pre><br />
This way X is automatically started when you log in at the first console.<br />
----<br />
A final option is to add a display manager (<code>kdm</code>, <code>gdm</code>, or <code>xdm</code>) to the DAEMONS array in <code>/etc/rc.conf</code></div>Paranooshttps://wiki.archlinux.org/index.php?title=Fonts_FAQ&diff=1818Fonts FAQ2005-07-25T23:51:34Z<p>Paranoos: /* Q. What are some suggested font settings for Mozilla/Phoenix? */</p>
<hr />
<div>[[Category:Desktop]]<br />
[[Category:XServer]]<br />
===Q. The default font antialiasing seems to be too blurry and it hurts my eyes.===<br />
<br />
A. Be careful. Unless you removed old versions of Freetype, they may still be on there. Generally, they won't cause problems though as long as you have your symbolic links set properly. Here are some examples.<br />
<br />
<pre><br />
user@darkstar:/usr/X11R6/lib$ ls -l /usr/X11R6/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so -> libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6 -> libfreetype.so.6.3.3*<br />
-rwxr-xr-x 1 root root 1407204 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
</pre><br />
<br />
As you can see, all files named "libfreetype.so*" point to the newest version, which, on my system, is currently libfreetype.so.6.3.3.<br />
<br />
Be sure to check /usr/lib also. Some systems have Freetype libs installed there too. Generally, you can link them to your files in /usr/X11R6/lib instead. I have heard that FreeType is now an X component by default, and thus should be installed in /usr/X11R6/lib (as noted above) instead.<br />
<br />
<pre><br />
user@darkstar:/usr/lib$ ls -l /usr/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so<br />
-> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so.6 -> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.1 -> /usr/X11R6/lib/libfreetype.so.6*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.3 -> /usr/X11R6/lib/libfreetype.so.6*<br />
</pre><br />
<br />
===Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen.===<br />
<br />
A. Get your proper resolution from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Change the value to this in the Gnome font configurator. Restart X. Sometimes, the videocard gives bogus information to X. It may be better to settle on a value between 72-78 DPI for 1024x768 displays. 96 DPI is a good value for 1280x1024, but it depends on the exact resolution. I actually prefer 75 on my home machine, and the font sizes seem to be a bit more true to their proper sizes when this is set. In most cases, if the numbers don't match, you may use the following method.<br />
<br />
You may also opt to force X to start with a forced resolution. This may produce good results in some display modes. For example, you may use:<br />
<br />
startx -- -dpi 75<br />
<br />
This will force X to start in 75x75 DPI mode. You may change your Gnome font settings (From the menu: Applications/Desktop Preferences/Font) to 75 DPI and you should get a good match.<br />
<br />
If this worked well for you, you may edit your "startx" script to always force this option on startup. Edit the file "/usr/X11R6/bin/startx" as root.<br />
<br />
Change the following line:<br />
<br />
defaultserverargs=""<br />
<br />
to...<br />
<br />
defaultserverargs="-dpi 75"<br />
<br />
===Q. How do I install fonts?===<br />
<br />
A. An easy way to install fonts is to drop them into your "$HOME/.fonts" directory and running "fc-cache". You can also perform a system-wide font installation by copying the fonts to "/usr/share/fonts" or another font directory (as long as it is listed in your "/etc/fonts/fonts.conf" file), and then performing the "fc-cache" command as root. You may also need to run "ttmkfdir" or "mkfontdir" as well.<br />
<br />
===Q. The fonts in OpenOffice.org look very bad.===<br />
<br />
A. By default, OpenOffice.org for Linux ships with inferior LibFreetype libraries that are built directly into the code. You can force it to link to the latest version of your LibFreetype libraries adding this line to your "$HOME/OpenOffice.org/soffice" script. I put mine at the top of the file. You may need to do this as root, since the file is symlinked to the OpenOffice.org install directory. (For example, mine is located in /opt/OpenOffice.org644/program/soffice).<br />
<br />
<pre><br />
export LD_PRELOAD=/usr/X11R6/lib/libfreetype.so<br />
</pre><br />
<br />
Then run the "soffice" script and it should now use your system's Freetype libaries.<br />
<br />
===Q. The OpenOffice.org menu font looks really bad. It doesn't use antialiasing either.===<br />
<br />
A. This can be changed in the OpenOffice.org configurator. From the drop-down menu, select "Tools/Options/OpenOffice.org/Fonts". Check the box that says "Apply Replacement Table". Type "Andale Sans UI" in the font box and choose your desired font for the "Replace With" option. Dropline users may prefer the system default, "Trebuchet MS". When selected, click the checkmark box. Then choose the "always" and "screen" options in the box below. Apply the changes, and your menu fonts should look great.<br />
<br />
<br />
===Q. OpenOffice.org doesn't detect my TrueType fonts!===<br />
<br />
A. Make sure that you add the appropriate entry in your /etc/X11/XF86Config file that points your programs to the /usr/share/fonts/ directory.<br />
<br />
For example, here's my XF86Config file...<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Note the FontPaths listed above. /usr/share/fonts/ is not included in the file by default. You may also need to try some of the solutions in the next section to replace the fonts.dir and fonts.scale files if this doesn't work.<br />
<br />
===Q. My menu fonts in OpenOffice.org have blank lines instead of text===<br />
===Q. Mozilla and other programs can no longer access TrueType fonts on my system, and are reverting to ugly fonts instead.===<br />
<br />
A. Make sure the "freetype" module is loaded in your /etc/X11/XF86Config file and your /usr/X11R6/lib/fonts/TTF/fonts.dir lists all of the TrueType fonts you have installed.<br />
<br />
Try checking your "Files" section of your XF86Config, and make sure that you have all (or most) of these directories listed.<br />
<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Finally, go to the following font directories:<br />
<br />
/usr/X11R6/lib/fonts/TTF<br><br />
/usr/share/fonts<br />
<br />
Try deleting the "fonts.dir" and "fonts.scale" files in these directories. You may want to make backups first though. Run these commands to replace them.<br />
<br />
<pre><br />
/usr/X11R6/bin/mkfontscale<br />
/usr/X11R6/bin/mkfontdir<br />
</pre><br />
<br />
On most systems, "/usr/share/fonts" will by symlinked to "/usr/X11R6/lib/fonts/TTF, so you may only need to do this in one of the directories.<br />
<br />
The "mkfontdir" and "mkfontscale" utilities should be used on Xfree86 4.3.0 based setups while on older ones (4.2.x) "ttmkfdir" should be considered. I've noticed that "ttmkfdir" and "mkfontdir" do not produce the exact same files. Upon having "mkfontdir" fail at creating a proper "fonts.scale" and fonts.dir file, If you happen to have both programs, and "mkfontdir" fails, try this instead in the following directories:<br />
<br />
<pre><br />
/usr/X11R6/lib/fonts/TTF<br />
/usr/share/fonts<br />
</pre><br />
<br />
<pre><br />
ttmkfdir -o fonts.scale<br />
cp fonts.scale fonts.dir<br />
</pre><br />
<br />
After running these, restart your machine and see if the fonts are now working properly. Remember that both directories may be symlinked, so you may not need to repeat the step a second time.<br />
<br />
===Q. What are some suggested font settings for Mozilla/Firefox?===<br />
<br />
A. These are recommended for Firefox:<br />
<br />
<pre><br />
Proportional: Serif Size (pixels): 16<br />
Serif: Times New Roman<br />
Sans-serif: Arial<br />
Monospace: Courier New Size (pixels): 13<br />
Display resolution: System settings<br />
</pre><br />
<br />
I believe that the following are Dropline's Mozilla defaults (also recommended):<br />
<pre><br />
Proportional: Serif Size (pixels): 14<br />
Serif: Times New Roman<br />
Sans-serif: Verdana<br />
Cursive: Andale Mono<br />
Fantasy: Andale Mono<br />
Monospace: Courier New Size (pixels): 11<br />
Allow Documents to use other fonts: Enabled<br />
Display resolution: System settings<br />
</pre></div>Paranooshttps://wiki.archlinux.org/index.php?title=Fonts_FAQ&diff=932Fonts FAQ2005-07-25T23:50:01Z<p>Paranoos: /* Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen. */</p>
<hr />
<div>[[Category:Desktop]]<br />
[[Category:XServer]]<br />
===Q. The default font antialiasing seems to be too blurry and it hurts my eyes.===<br />
<br />
A. Be careful. Unless you removed old versions of Freetype, they may still be on there. Generally, they won't cause problems though as long as you have your symbolic links set properly. Here are some examples.<br />
<br />
<pre><br />
user@darkstar:/usr/X11R6/lib$ ls -l /usr/X11R6/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so -> libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 20 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6 -> libfreetype.so.6.3.3*<br />
-rwxr-xr-x 1 root root 1407204 Apr 9 23:10 /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
</pre><br />
<br />
As you can see, all files named "libfreetype.so*" point to the newest version, which, on my system, is currently libfreetype.so.6.3.3.<br />
<br />
Be sure to check /usr/lib also. Some systems have Freetype libs installed there too. Generally, you can link them to your files in /usr/X11R6/lib instead. I have heard that FreeType is now an X component by default, and thus should be installed in /usr/X11R6/lib (as noted above) instead.<br />
<br />
<pre><br />
user@darkstar:/usr/lib$ ls -l /usr/lib/libfreetype.so*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so<br />
-> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 35 Apr 9 23:01 /usr/lib/libfreetype.so.6 -> /usr/X11R6/lib/libfreetype.so.6.3.3*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.1 -> /usr/X11R6/lib/libfreetype.so.6*<br />
lrwxrwxrwx 1 root root 31 Apr 6 23:21 /usr/lib/libfreetype.so.6.3.3 -> /usr/X11R6/lib/libfreetype.so.6*<br />
</pre><br />
<br />
===Q. My fonts are too large or too small. The resolution seems wrong. My fonts are mis-shapen.===<br />
<br />
A. Get your proper resolution from a console, by typing:<br />
<br />
xdpyinfo | grep resolution<br />
<br />
Change the value to this in the Gnome font configurator. Restart X. Sometimes, the videocard gives bogus information to X. It may be better to settle on a value between 72-78 DPI for 1024x768 displays. 96 DPI is a good value for 1280x1024, but it depends on the exact resolution. I actually prefer 75 on my home machine, and the font sizes seem to be a bit more true to their proper sizes when this is set. In most cases, if the numbers don't match, you may use the following method.<br />
<br />
You may also opt to force X to start with a forced resolution. This may produce good results in some display modes. For example, you may use:<br />
<br />
startx -- -dpi 75<br />
<br />
This will force X to start in 75x75 DPI mode. You may change your Gnome font settings (From the menu: Applications/Desktop Preferences/Font) to 75 DPI and you should get a good match.<br />
<br />
If this worked well for you, you may edit your "startx" script to always force this option on startup. Edit the file "/usr/X11R6/bin/startx" as root.<br />
<br />
Change the following line:<br />
<br />
defaultserverargs=""<br />
<br />
to...<br />
<br />
defaultserverargs="-dpi 75"<br />
<br />
===Q. How do I install fonts?===<br />
<br />
A. An easy way to install fonts is to drop them into your "$HOME/.fonts" directory and running "fc-cache". You can also perform a system-wide font installation by copying the fonts to "/usr/share/fonts" or another font directory (as long as it is listed in your "/etc/fonts/fonts.conf" file), and then performing the "fc-cache" command as root. You may also need to run "ttmkfdir" or "mkfontdir" as well.<br />
<br />
===Q. The fonts in OpenOffice.org look very bad.===<br />
<br />
A. By default, OpenOffice.org for Linux ships with inferior LibFreetype libraries that are built directly into the code. You can force it to link to the latest version of your LibFreetype libraries adding this line to your "$HOME/OpenOffice.org/soffice" script. I put mine at the top of the file. You may need to do this as root, since the file is symlinked to the OpenOffice.org install directory. (For example, mine is located in /opt/OpenOffice.org644/program/soffice).<br />
<br />
<pre><br />
export LD_PRELOAD=/usr/X11R6/lib/libfreetype.so<br />
</pre><br />
<br />
Then run the "soffice" script and it should now use your system's Freetype libaries.<br />
<br />
===Q. The OpenOffice.org menu font looks really bad. It doesn't use antialiasing either.===<br />
<br />
A. This can be changed in the OpenOffice.org configurator. From the drop-down menu, select "Tools/Options/OpenOffice.org/Fonts". Check the box that says "Apply Replacement Table". Type "Andale Sans UI" in the font box and choose your desired font for the "Replace With" option. Dropline users may prefer the system default, "Trebuchet MS". When selected, click the checkmark box. Then choose the "always" and "screen" options in the box below. Apply the changes, and your menu fonts should look great.<br />
<br />
<br />
===Q. OpenOffice.org doesn't detect my TrueType fonts!===<br />
<br />
A. Make sure that you add the appropriate entry in your /etc/X11/XF86Config file that points your programs to the /usr/share/fonts/ directory.<br />
<br />
For example, here's my XF86Config file...<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Note the FontPaths listed above. /usr/share/fonts/ is not included in the file by default. You may also need to try some of the solutions in the next section to replace the fonts.dir and fonts.scale files if this doesn't work.<br />
<br />
===Q. My menu fonts in OpenOffice.org have blank lines instead of text===<br />
===Q. Mozilla and other programs can no longer access TrueType fonts on my system, and are reverting to ugly fonts instead.===<br />
<br />
A. Make sure the "freetype" module is loaded in your /etc/X11/XF86Config file and your /usr/X11R6/lib/fonts/TTF/fonts.dir lists all of the TrueType fonts you have installed.<br />
<br />
Try checking your "Files" section of your XF86Config, and make sure that you have all (or most) of these directories listed.<br />
<br />
<pre><br />
Section "Files"<br />
RgbPath "/usr/X11R6/lib/X11/rgb"<br />
ModulePath "/usr/X11R6/lib/modules"<br />
FontPath "/usr/share/fonts/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/misc/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/CID/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"<br />
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"<br />
EndSection<br />
</pre><br />
<br />
Finally, go to the following font directories:<br />
<br />
/usr/X11R6/lib/fonts/TTF<br><br />
/usr/share/fonts<br />
<br />
Try deleting the "fonts.dir" and "fonts.scale" files in these directories. You may want to make backups first though. Run these commands to replace them.<br />
<br />
<pre><br />
/usr/X11R6/bin/mkfontscale<br />
/usr/X11R6/bin/mkfontdir<br />
</pre><br />
<br />
On most systems, "/usr/share/fonts" will by symlinked to "/usr/X11R6/lib/fonts/TTF, so you may only need to do this in one of the directories.<br />
<br />
The "mkfontdir" and "mkfontscale" utilities should be used on Xfree86 4.3.0 based setups while on older ones (4.2.x) "ttmkfdir" should be considered. I've noticed that "ttmkfdir" and "mkfontdir" do not produce the exact same files. Upon having "mkfontdir" fail at creating a proper "fonts.scale" and fonts.dir file, If you happen to have both programs, and "mkfontdir" fails, try this instead in the following directories:<br />
<br />
<pre><br />
/usr/X11R6/lib/fonts/TTF<br />
/usr/share/fonts<br />
</pre><br />
<br />
<pre><br />
ttmkfdir -o fonts.scale<br />
cp fonts.scale fonts.dir<br />
</pre><br />
<br />
After running these, restart your machine and see if the fonts are now working properly. Remember that both directories may be symlinked, so you may not need to repeat the step a second time.<br />
<br />
===Q. What are some suggested font settings for Mozilla/Phoenix?===<br />
<br />
A. These are recommended for Phoenix:<br />
<br />
<pre><br />
Proportional: Serif Size (pixels): 16<br />
Serif: Times New Roman<br />
Sans-serif: Arial<br />
Monospace: Courier New Size (pixels): 13<br />
Display resolution: System settings<br />
</pre><br />
<br />
I believe that the following are Dropline's Mozilla defaults (also recommended):<br />
<pre><br />
Proportional: Serif Size (pixels): 14<br />
Serif: Times New Roman<br />
Sans-serif: Verdana<br />
Cursive: Andale Mono<br />
Fantasy: Andale Mono<br />
Monospace: Courier New Size (pixels): 11<br />
Allow Documents to use other fonts: Enabled<br />
Display resolution: System settings<br />
</pre></div>Paranooshttps://wiki.archlinux.org/index.php?title=Quick_Arch_Linux_Install&diff=1610Quick Arch Linux Install2005-07-25T23:44:23Z<p>Paranoos: /* Introduction */</p>
<hr />
<div>[[Category:Installation]]<br />
This document walks you through a basic Archlinux installation. It is based on the 0.6 (widget) installation scripts.<br />
<br />
=== Introduction===<br />
<br />
This is a quick walkthrough for those who don't yet know what Arch is and what it is capable of. It is written mainly for those people who already have an existing Windows Partition on their harddrive and want to set up Arch Linux without harming the Windows install.<br />
<br />
This guide is for "normal" hardware, nothing special (such as scsi) is documented.<br />
<br />
Windows is assumed to exist on the first partition of the harddrive, otherwise grub won't be able to find it.<br />
<br />
====0.1 Necessary things====<br />
<br />
* The Archlinux Base Installation-CD or the Full-Installation_CD.<br />
* Either one free harddisk or free space on one partition. You have to separate this free space from an existing partition in windows with partitioning tools (such as partition magic).<br />
<br />
====0.2 Booting from the Arch-CD====<br />
<br />
* Insert the CD in your drive, reboot, and check that your BIOS will boot from the CD-ROM drive first.<br />
* Now it should look like this:<br />
<br />
[http://home.arcor.de/Langeland/1.png Default Arch boot screen]<br />
<br />
* Press <code>Enter</code><br />
* After the boot process is finished, type:<br />
<pre><br />
/arch/setup<br />
</pre><br />
<br />
You will be installing from the CD first, so network drivers are not necessary.<br />
<br />
The Main Menu will appear:<br />
<br />
[http://home.arcor.de/Langeland/6.png Main Menu]<br />
<br />
===1. Partition Hard-Drive===<br />
<br />
If you have an empty Hard-Drive you may skip these steps and choose Auto-Partitioning. Please note this will erase all partions from your Hard-Drive! If you want to keep any partition on your harddrive follow the steps below:<br />
<br />
====1.1 Partition the Hard-Drive====<br />
* Select Prepare Hard-Drive.<br />
* Choose Partition Hard-Drive.<br />
* Select the Disc you want Arch-Linux to be installed on.<br />
* The cfdisk-Partition Program will open and you can create the partitions. For Arch-Base-Installation there are at least two partitions needed:<br />
* one swap partition<br />
* one data partition<br />
<br />
* At this point the display may look like this (if you have a ntfs-partition for windows):<br />
<br />
[http://home.arcor.de/Langeland/9.png Cfdisk]<br />
<br />
* Don't touch the ntfs (or vfat) partition in any way, or otherwise you may lose Windows.<br />
* The type of the swap-partition should be set by setting the partition type to 82<br />
* If you want to quit cfdisk without saving anything then press quit, otherwise press write.<br />
* After using cfdisk it should look like this:<br />
<br />
[http://home.arcor.de/Langeland/10.png Partition Layout]<br />
<br />
====1.2 Set Mountpoints====<br />
* Select point 3: Set Filesystem Mountpoints<br />
* Select the partition you marked as swap<br />
* Select the other partition for the system (to mount as /)<br />
* Select the Filesystem ext3<br />
* Select DONE !!<br />
''This last step is very important, many people skip this step, but no actions take place until you select DONE - if you do not do this, the install will appear to work, but will not install any files''<br />
<br />
===2. Select Packages===<br />
<br />
* Select CD<br />
* Now it should look like this:<br />
<br />
[http://home.arcor.de/Langeland/11.png Package Categories]<br />
<br />
* For now you should select only base and editors.<br />
* You want to select all packages in the categories by default<br />
* Just press ok.<br />
<br />
===3. Install Packages===<br />
<br />
* This is rather easy: Just press install packages, say ok and everything will be copied from cd to harddisk.<br />
<br />
===4. Install Kernel===<br />
<br />
* Choose 2.6 IDE unless you know you have different hardware.<br />
<br />
===5. Edit Config Files===<br />
<br />
* Choose nano to edit the files<br />
''' You have to edit the rc.conf''' if you want to change your keyboard layout. For example de is german.<br />
<br />
* nano is easy to understand: Strg-o ( Ctrl-o ) saves the file, Strg-x ( Ctrl-x ) saves the file and exits nano.<br />
* Change the line with keymap<code>us to keymap</code>de<br />
''' You have to edit the '''menu.lst*.<br />
* Here you create your bootloader. There you can switch between windows and linux.<br />
* You will see a file like this:<br />
<br />
[http://home.arcor.de/Langeland/13.png Menu.lst]<br />
<br />
* Everything should be setup right to boot into arch, you only have to add the following lines at the end to have the ability to boot windows:<br />
<pre><br />
title Windows<br />
rootnoverify (hd0,0)<br />
chainloader +1<br />
</pre><br />
<br />
Press Strg-O, Strg-X and everything is saved.<br />
<br />
===6. Install Bootloader===<br />
<br />
* Choose grub.<br />
* Choose the entry on top of the list.<br />
<br />
===7. Ready to reboot===<br />
<br />
* Exit the mainmenu, type reboot and the computer should reboot.<br />
* Remove the CD<br />
* You can choose between windows and arch, default is arch<br />
<br />
===8. First steps in Arch===<br />
<br />
* Login as root.<br />
* Execute the command <code>passwd</code> to set a password for root.<br />
<pre><br />
# passwd<br />
</pre><br />
* Add a user. You can use the adduser script. Your user should be in the users, audio and optical groups.<br />
<pre><br />
# adduser<br />
</pre><br />
<br />
Now it's time to fix your internet and start installing packages with Pacman.<br />
Enjoy!</div>Paranooshttps://wiki.archlinux.org/index.php?title=Gamepad&diff=1299Gamepad2005-07-25T23:29:21Z<p>Paranoos: /* Joystick setup */</p>
<hr />
<div>[[Category:Hardware]]<br />
Joysticks can be a bit of a hassle to get working in Linux. Not because they are poorly supported, but simply because you need to determine which modules to load to get your joystick working, and it's not always very obvious!<br />
<br />
====Determining Which Modules You Need====<br />
For an extensive overview of all joystick related modules in Linux, you will need access to the Linux kernel sources -- specifically the Documentation section. Unfortunately, pacman kernel packages don't include what we need. If you have the kernel sources downloaded, have a look at <code>Documentation/input/joystick.txt</code>. If you don't want to download the (huge) kernel sources, have a look at [[http://www.kernelhq.com/ KernelHQ]] - you can browse the kernel source tree there, and read code and documentation online. Simply go to the Browse section, select your kernel version, and find <code>Documentation/input/joystick.txt</code>.<br />
<br />
Some joysticks need specific modules, such as the Microsoft Sidewinder controllers (<code>sidewinder</code>), or the Logitech digital controllers (<code>adi</code>). Many older joysticks will work with the simple <code>analog</code> module. If your joystick is plugging in to a gameport provided by your soundcard, you will need your soundcard drivers loaded - however, some cards, like the Soundblaster Live, have a specific gameport driver (<code>emu10k1-gp</code>). Older ISA soundcards may need the <code>ns558</code> module, which is a standard gameport module.<br />
<br />
As you can see, there are many different modules related to getting your joystick working in Linux, so I couldn't possibly cover everything here. Please have a look at the documentation mentioned above for details.<br />
<br />
====Loading the Modules====<br />
You need to load a module for your gameport (<code>ns558</code>, <code>emu10k1-gp</code>, <code>cs461x</code>, etc...), a module for your joystick (<code>analog</code>, <code>sidewinder</code>, <code>adi</code>, etc...), and finally the kernel joystick device driver (<code>joydev</code>). Add these to your <code>/etc/rc.conf</code>, or simply modprobe them. The <code>gameport</code> module should load automatically, as this is a dependency of the other modules.<br />
<br />
====Testing Your Configuration====<br />
Once the modules are loaded, you should find a new device: <code>/dev/input/js0</code>. You can simply <code>cat</code> the device to see if it works - move the stick around, press all the buttons. I found my Logitech Thunderpad Digital had two buttons that weren't working with the <code>analog</code> module. After reading some docs, I saw there was a specific <code>adi</code> module for this controller. The moral of the story is, if it doesn't work the first time, don't give up, and read those docs thoroughly! I couldn't get anything working at all until I found that documentation.<br />
<br />
====USB Joysticks====<br />
I don't have any access to a USB joystick right now, so I am unable to give any specific instructions. I would think you just need to get USB working, and then modprobe your joystick driver, as well as <code>joydev</code>. Perhaps <code>ns558</code> as well? Please edit this document to confirm.</div>Paranooshttps://wiki.archlinux.org/index.php?title=NVIDIA&diff=2247NVIDIA2005-07-24T08:46:07Z<p>Paranoos: /* Known Issues: */</p>
<hr />
<div>[[Category:Hardware]]<br />
[[Category:Kernel]]<br />
===How to install Nvidia Driver with pacman===<br />
<br />
====Info from Package Maintainer tpowa:====<br />
<br />
The package is for those people who run a stock arch kernel!<br />
I only test with kernel 2.6 and xorg.<br />
<br />
Multiple Kernel users:<br />
You may need to install nvidia package for each extra!<br />
You may need to remove the kernel modules by hand after deinstall!<br />
<br />
<br />
====Install drivers:====<br />
<br />
You have to use extra repository, enable it for pacman.<br />
Leave X-Server, else pacman cannot finish installation and it will not work!<br />
run as root:<br />
pacman -Sy nvidia (for newer cards)<br />
pacman -Sy nvidia-legacy (for old cards)<br />
please look at the README from nvidia for information, which card is supported.<br />
<br />
If an error happens during install you can have a look at:<br />
/var/log/nvidia-installer.log<br />
<br />
<br />
====Configuring X-Server:====<br />
<br />
Edit /etc/X11/XF86Config or your /etc/X11/xorg.conf config file:<br />
Disable in modules section:<br />
GLcore and DRI<br />
<br />
Add to modules section:<br />
Load "glx"<br />
<br />
Disable Section DRI completely:<br />
#Section "DRI"<br />
# Mode 0666<br />
#EndSection<br />
<br />
change driver "nv" to driver "nvidia"<br />
if it exists disable Chipset option (only needed for nv driver)<br />
<br />
<br />
This was for basic setup, if you need more tweaking options<br />
have a look at: /usr/share/doc/NVIDIA_GLX-1.0/README<br />
<br />
<br />
====Modify Arch rc.conf file:====<br />
<br />
Add nvidia to /etc/rc.conf modules section (not needed anymore if you run xorg and udev)<br />
<br />
<br />
====Problems that might occur:====<br />
* Nvidia specific:<br />
<br />
If you experience slow 3D Performance have a look at:<br />
/usr/lib/libGL.so.1 /usr/lib/libGL.so /usr/lib/GLcore.so.1<br />
perhaps they are wrong linked to mesa or something else<br />
Try reinstalling with 'pacman -S nvidia'<br />
<br />
<br />
<br />
When you get this message when you try to start an openGL application (for example enemy-territory, or glxgears):<br />
Error: Could not open /dev/nvidiactl because the permissions<br />
are too restrictive. Please see the FREQUENTLY ASKED QUESTIONS<br />
section of /usr/share/doc/NVIDIA_GLX-1.0/README for steps<br />
to correct.<br />
<br />
add yourself to the "video" group using gpasswd -a <yourusername> video<br />
(Don't forget to log out and back in)<br />
<br />
<br />
* Arch specific:<br />
<br />
GCC UPDATE:<br />
You must compile the module with the compiler that was used for the kernel<br />
else it may fail.<br />
A simple 'pacman -S nvidia' should do it, if not wait for a new kernel release<br />
and stay with old kernel and gcc.<br />
<br />
KERNEL UPDATE:<br />
If you update your kernel you have to recompile the module!<br />
A simple 'pacman -S nvidia' should do it.<br />
<br />
<br />
====Driver Config Tool:====<br />
<br />
The new config tool for the nvidia-drivers is included called 'nvidia-settings'<br />
You don't have to use it it's only a add-on!<br />
For more information about the use, have a look at the following file:<br />
/usr/share/doc/NVIDIA_GLX-1.0/nvidia-settings-user-guide.txt<br />
<br />
NOTE:<br />
If you experience problems like crashing the X-Server while running the tool<br />
you have to delete your .nvidia-settings-rc file in your home dircetory<br />
<br />
<br />
====Known Issues:====<br />
<br />
If you experience crashes, try to disable RenderAccel "true" option.<br />
<br />
<br />
If you have comments on the package please post it here:<br />
<BR> http://bbs.archlinux.org/viewtopic.php?t=10692<br />
<BR> If you have a problem with the drivers have a look at the nvidia forum:<br />
<BR> http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid=14<br />
<BR> For a Changelog please look here:<br />
<BR> http://www.nvidia.com/object/linux_display_ia32_1.0-7664.html<br />
<br />
Note: please don't change the above part without notifying me.<br />
<br />
===How to install NVIDIA Driver the traditional way===<br />
* Download the latest NVIDIA driver from: http://www.nvidia.com/object/linux.html<br />
** File name will look something like this: NVIDIA-Linux-x86-1.0-7167-pkg0.run<br />
<br />
The Kernel Steps (the following 4 steps) can be left out if you use at least kernel 2.6.5 because the needed Includes are now in the Kernel package<br />
<br />
* Download the kernel source for the kernel version you are using<br />
** ''uname -r'' will give you kernel version<br />
** http://www.kernel.org/pub/linux/kernel/v2.6/ - for the 2.6 series<br />
** http://www.kernel.org/pub/linux/kernel/v2.4/ - for the 2.4 series<br />
<br />
* Move the current incomplete kernel source tree to 2.x.x.old<br />
** ''mv /usr/src/2.x.x /usr/src/2.x.x.old''<br />
<br />
* Uncompress and unpack your source code in /usr/src<br />
** ''mv /path/to/linux-2.x.x.tar.bz2 /usr/src''<br />
** ''cd /usr/src''<br />
** ''tar --bzip2 -xvf linux-2.x.x.tar.bz2''<br />
<br />
* Copy the old include directory and .config file into new source tree<br />
** ''cp -rp linux-2.x.x.old/include/''' linux-2.x.x/include/''<br />
** ''cp linux-2.x.x.old/.config linux-2.x.x/.config''<br />
<br />
* Go to a non-graphical session<br />
** Use Control-Alt-F5 (or whatever F key you want)<br />
** Login as root<br />
** Go to runlevel 3<br />
*** ''init 3''<br />
<br />
* Run NVIDIA installer<br />
** ''sh /path/to/NVIDIA-Linux-x86-1.0-5336-pkg0.run''<br />
** You will be asked to accept their license, then hit OK a couple times on informational screens, the driver will then be built and installed<br />
<br />
* Edit XFree86Config file<br />
** Use the editor of choice to open /etc/X11/XFree86Config and go to the Device section<br />
** Change your driver from current (probably nv or vesa) to nvidia<br />
*** Driver "nv" to Driver "nvidia"<br />
** Uncomment the glx load line<br />
*** #Load "glx" to Load "glx"<br />
** Comment or delete the Chipset line if exists<br />
* Edit modules loaded on boot<br />
** Open /etc/rc.conf in editor<br />
** Add ''nvidia'' to modules section<br />
*** MODULES<code>(ide-scsi) to MODULES</code>(ide-scsi nvidia)<br />
<br />
* Reboot the machine and enjoy 3D acceleration...and a tainted kernel :)</div>Paranooshttps://wiki.archlinux.org/index.php?title=Gapless_Audio_CD_Creation_from_MP3s&diff=1352Gapless Audio CD Creation from MP3s2005-07-24T03:41:06Z<p>Paranoos: </p>
<hr />
<div>[[Category:CD/DVD]]<br />
<br />
===Setup===<br />
We'll be using a few programs for this.<br />
pacman -Sy lame cdrdao<br />
<br />
Let's configure cdrdao to use our CD burner. First, we need to find out how cdrdao can find the device.<br />
cdrdao scanbus<br />
<br />
If you have an IDE drive, you will probably be using '''ATAPI:0,0,0'''. Open up <tt>/etc/cdrdao.conf</tt> (as root), and enter the device name and node, in this format:<br />
write_device: "ATAPI:0,0,0"<br />
<br />
===Decode the MP3s===<br />
First of all, copy all the songs you want on the CD to a folder. It's best to rename them to reflect the order you want the tracks to be laid out (such as 01.mp3, 02.mp3, etc). Now we're going to decode all the mp3s into uncompressed wav files. Please realize that a full album can take up more than 800MB in wav files alone. This will take some time.<br />
mkdir wav<br />
for file in *.mp3 ; do<br />
lame --decode "$file" "wav/$file.wav"<br />
done<br />
<br />
===Create a Table of Contents file===<br />
Once finished, let's make a Table of Contents file that describes the layout of the CD.<br />
cd wav<br />
{<br />
echo "CD_DA"<br />
for file in *.wav ; do<br />
echo "TRACK AUDIO"<br />
# echo "PREGAP 00:02:00" # insert a 2-second silent gap before each track<br />
echo "FILE \"$file\" 0"<br />
done<br />
} > toc<br />
<br />
===Burn===<br />
Finally, all we have to do is burn the CD.<br />
cdrdao write toc</div>Paranooshttps://wiki.archlinux.org/index.php?title=Gapless_Audio_CD_Creation_from_MP3s&diff=650Gapless Audio CD Creation from MP3s2005-07-24T03:39:20Z<p>Paranoos: </p>
<hr />
<div>[[Category:CD/DVD]]<br />
<br />
===Setup===<br />
We'll be using a few programs for this.<br />
pacman -Sy lame cdrdao<br />
<br />
Let's configure cdrdao to use our CD burner. First, we need to find out how cdrdao can find the device.<br />
cdrdao scanbus<br />
<br />
If you have an IDE drive, you will probably be using '''ATAPI:0,0,0'''. Open up <tt>/etc/cdrdao.conf</tt> (as root), and enter the device name and node, in this format:<br />
write_device: "ATAPI:0,0,0"<br />
<br />
===Decode the MP3s===<br />
First of all, copy all the songs you want on the CD to a folder. It's best to rename them to reflect the order you want the tracks to be laid out (such as 01.mp3, 02.mp3, etc). Now we're going to decode all the mp3s into uncompressed wav files. Please realize that a full album can take up more than 800MB in wav files alone. This will take some time.<br />
mkdir wav<br />
for file in *.mp3 ; do<br />
lame --decode \"$file\" \"wav/$file.wav\"<br />
done<br />
<br />
===Create a Table of Contents file===<br />
Once finished, let's make a Table of Contents file that describes the layout of the CD.<br />
cd wav<br />
{<br />
echo \"CD_DA\"<br />
for file in *.wav ; do<br />
echo \"TRACK AUDIO\"<br />
# echo \"PREGAP 00:02:00\" # insert a 2-second silent gap before each track<br />
echo \"FILE \\"$file\\" 0\"<br />
done<br />
} > toc<br />
<br />
===Burn===<br />
Finally, all we have to do is burn the CD.<br />
cdrdao write toc</div>Paranooshttps://wiki.archlinux.org/index.php?title=Custom_Kernel_Compilation_with_ABS&diff=777Custom Kernel Compilation with ABS2005-07-23T18:49:48Z<p>Paranoos: </p>
<hr />
<div>[[Category:Kernel]]<br />
Due to the addition of LOCALVERSION and EXTRAVERSION variables in the kernel compilation process from 2.6.9 onwards this document has been updated and the previous version has been moved to [[Kernel compilation with ABS (2.6.8 or earlier)]].<br />
<br />
This howto has been updated provide a definitive PKGBUILD for the creation of custom kernel pkgs. It allows you to maintain multiple custom kernels with a unique naming scheme under pacman version control. It is ideal for ANY custom kernel build and can be easily adapted to fit many requirements. The PKGBUILD automatically accounts for the EXTRAVERSION and LOCALVERSION variables that are now fully supported in the kernel. EXTRAVERSION is frequently set by major patchsets such as -ck and -nitro. EXTRAVERSION is also used in the 2.6.x.y branch to carry the .y variable. LOCALVERSION can be set during the config stage and is the easiest and RECOMMENDED way to customize your kernel pkgnames. Simply setting LOCALVERSION to -custom or the date e.g. -20050105 will suffice! A unique LOCALVERSION guarantees a unique pkg.<br />
<br />
=== Philosophy and Logic how it works and why it works this way===<br />
* The Arch Way - Keep It Simple<br />
* This PKGBUILD builds on the previous, widely accepted version<br />
* This build provides kernel packages and components with a simple, logical and uncomplicated naming scheme that ONLY uses variables that are part of the ABS system and part of the kernel compilation process itself. Rationale:<br />
** Stock Arch kernels use the <code>kernel24</code> and <code>kernel26</code> base pkgnames these are logically extended here under the 2.6.x and 2.6.x.y schemes e.g <code>kernel2611</code> and <code>kernel26117</code><br>These also provide the basis of /boot filenames e.g. <code>vmlinux26</code> and <code>vmlinuz26117</code><br />
** The ''kernel compilation process'' uses the kernel version (2.6.x), EXTRAVERSION from the Makefile and CONFIG_LOCALVERSION from the kernel config to create the name for the kernel's module directory, e.g.:<br />
<br />
<pre><br />
2.6.x$EXTRAVERSION$LOCALVERSION<br />
2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
::This is beyond the control of the PKGBUILD so to provide a pkg with similarly named components the PKGBUILD uses the same scheme to create unique /boot files and a unique /usr/src directory by appending -EXTRAVERSION-LOCALVERSION, e.g.:<br />
<br />
<pre><br />
/boot/vmlinuz2611-cko2-ARCH<br />
/boot/System.map2611-cko2-ARCH<br />
/boot/kconfig2611-cko2-ARCH<br />
<br />
/usr/src/linux-2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
* If you have the recommended knowledge of ABS you will see that the PKGBUILD is transparently constructed, self-explanatory and easily customized.<br />
* User input is almost identical to all ABS builds: simply set pkgver, pkgrel and pkgdesc and add additional sources, including patches, to the source array. Patch users should insert the appropriate patch commands where indicated. Aside from uncommenting the config method and choosing whether to make clean or not the rest of the build is automated.<br />
* Having created a custom pkg naming scheme during the build the PKGBUILD automatically corrects/updates itself with the new pkgname variable allowing simple <code>gensync</code> operation.<br />
<br />
=== CAUTION===<br />
# this PKGBUILD is only suited to builds of the 2.6 kernel branch - an effort to make a unified or alternative PKGBUILDS for the 2.4 branch can be found here - [[Kernel compilation with ABS-2.4]]<br />
# this is NOT an ABS howto - to successfully follow this HOWTO a working knowledge of building pkgs with ABS is ESSENTIAL - please read [[ABS - the Arch Build System]], [[The Arch package making HOW-TO - with guidelines]] and [[Patching in ABS Howto]]<br>I don't advise you build a kernel for your first ABS project. If you need guidelines on how to use <code>fakeroot</code> or set up a build directory read the other documents first.<br />
# likewise it helps if you know how to configure a kernel! If this is your first effort building a kernel I strongly recommend you start from the default Arch config, this is detailed further below.<br />
<br />
=== Usage Notes===<br />
<br />
* the ''patch'' variable has been removed. You should now simply specify patch sources in the source array and place the patch commands as indicated. Also see '''Other versions*<br />
<br />
* pkgname must be declared within 10 lines of the top of the PKGBUILD - so '''DO NOT* move it - just leave it.<br>If you miss this simple instruction don't worry, it won't screw up your build but your PKGBUILD file will not have the pkgname automatically updated at the end of the build. This is to allow you to use gensync correctly BUT you can edit the PKGBUILD file manually afterwards of course.<br />
<br />
* until you have your own config that you are happy with it is easiest just to start with the default Arch config; you should also get the Arch kernel26.install file. These are both in your ABS tree, normally under /var/abs/kernels/kernel26. To download the ABS tree to your system simply run <code>abs</code> as root. It doesn't take long, even on dialup. You should keep this updated by running <code>abs</code> as root on a regular basis.<br />
<br />
* To check if EXTRAVERSION is set by your patchset try doing<br />
<br />
cat ./patchname | grep +EXTRAVERSION=<br />
<br />
:and it should return something like this:<br />
<br />
+EXTRAVERSION = -ck3<br />
<br />
:if it doesn't then EXTRAVERSION is '''probably not being set''' by your patchset and you should ensure you use LOCALVERSION to customize the pkgname.<br>Arch default kernels are set with the '<code>-ARCH</code>' LOCALVERSION variable - you can set anything you like e.g. '<code>-custom</code>' (note the need for the preceding dash <code>-</code>)<br>Because of these added variables there is no need to alter the pkgname manually at any point or use any other variables. The build process automatically updates the pkgname variable in the PKGBUILD file at the end of each build to reflect the final full kernel version naming scheme.<br />
<br />
* If used correctly this PKGBUILD '''should''' always provide a unique kernel build based on EXTRAVERSION and LOCALVERSION, and on the pkgver and pkgrel (as normal) - however it is up to the user to '''double check''' resulting pkgnames and contents '''before* installation to prevent overwrites (see below for more details and examples)<br />
<br />
=== Configuring the PKGBUILD===<br />
Copy the PKGBUILD below to your $startdir. The PKGBUILD can also be downloaded from [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel here]. Before building remember the following:<br />
# pkgname can be left as it is it will automatically be set and correct itself<br />
# Insert the <code>pkgver</code> for your kernel (for example: 2.6.9)<br />
# Change the <code>pkgrel</code> for your current revision. You should increment this each time you make changes to the kernel config and want to build a REPLACEMENT pkg. If you don't want to replace the previous build but rather install in parallel you should use LOCALVERSION to create a unique pkg.<br />
# Change/expand the pkgdesc to describe any patches or special config options applied<br />
# Change the source to use a closer mirror, if you are using a patchset add the patches to the source array<br />
# {OPTIONAL} Place the patch commands where indicated<br />
# Choose a make method by leaving your preferred method uncommented-- gconfig (gtk based) xconfig (qt based) menuconfig (ncurses based)<br />
# During the build you will be asked if you want to make clean - the default is yes, reply NO if you know what you are doing.<br />
<br />
<pre><br />
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org><br />
pkgname=kernel26<br />
pkgver=2.6.x.y<br />
pkgrel=1<br />
pkgdesc="The Linux Kernel 2.6.x.y and modules (IDE support)"<br />
url="http://www.kernel.org"<br />
depends=('module-init-tools')<br />
install=kernel26.install<br />
<br />
##### add any patch sources to this section<br />
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )<br />
<br />
# Function to grab var from src<br />
getvar() {<br />
old=$(cat Makefile | grep "^$1")<br />
echo $(echo ${old/"$1 ="/} | sed -e "s/[[ ]]*\(.*\)[[ ]]*/\1/g")<br />
return 0<br />
}<br />
<br />
build() {<br />
cd $startdir/src/linux-$pkgver<br />
<br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
#make oldconfig || return 1<br />
#make menuconfig<br />
#make xconfig<br />
make gconfig<br />
<br />
##### NO USER CHANGES BELOW HERE #####<br />
<br />
# save the current pkgname<br />
old_pkgname=$pkgname<br />
<br />
# set pkgname for build purposes - DO NOT alter!<br />
pkgname=kernel26<br />
<br />
# save the updated config to build with today's date<br />
cp ./.config $startdir/config-$(date +%b%d\-%Hh)<br />
<br />
# get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory<br />
_kernextra=$(getvar "EXTRAVERSION")<br />
# grab the 2.6.x.y version suffix from pkgver<br />
_y="`echo $pkgver | cut --delim "." --fields 4`"<br />
# remove .y version suffix from _kernextra<br />
_kernextra="`echo $_kernextra | sed "s|\.$_y||g"`"<br />
<br />
# Read the full kernel version info from new config to use in pathnames and pkgname<br />
. ./.config<br />
<br />
# Kernel custom - to create a unique pkgname (see below)<br />
_kerncust="${_kernextra}${CONFIG_LOCALVERSION}"<br />
# Kernel release - will be the same as Makefile<br />
_kernrel="${pkgver}${_kerncust}"<br />
# Get the pkgver suffix for unique pkgname and /boot file suffices<br />
_pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|\.||g"`"<br />
# Set /boot file suffices from kernel release and pkgver suffix<br />
_kernboot="${_pkgversuf}${_kerncust}"<br />
<br />
# Set a new pkgname from kernel release and pkgver suffix<br />
pkgname="${pkgname}${_pkgversuf}${_kerncust}"<br />
<br />
# build!<br />
echo<br />
echo -n "Do you want to make clean (default YES)? (YES/NO): "<br />
read choice<br />
echo<br />
echo -n "Press any key to start make or CTRL+C to quit"<br />
read anykey<br />
<br />
if [[ "${choice}" = "NO" ]] ; then<br />
make bzImage modules || return 1<br />
else<br />
make clean bzImage modules || return 1<br />
fi<br />
<br />
mkdir -p $startdir/pkg/{lib/modules,boot}<br />
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1<br />
cp System.map $startdir/pkg/boot/System.map26${_kernboot}<br />
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}<br />
install -D -m644 Makefile \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/Makefile<br />
install -D -m644 .config \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/.config<br />
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel<br />
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do<br />
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/<br />
done<br />
# copy files necessary for later builds, like nvidia and vmware<br />
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}<br />
cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/.tmp_versions<br />
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/<br />
cp arch/i386/kernel/asm-offsets.s \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/<br />
# copy in Kconfig files<br />
for i in `find . -name "Kconfig*"`; do<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`<br />
cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i<br />
done<br />
cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm<br />
chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}<br />
cd $startdir/pkg/lib/modules/${_kernrel} && \<br />
(rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)<br />
<br />
# Correct the pkgname in our PKGBUILD - this allows correct gensync operation<br />
# NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!<br />
cd $startdir<br />
sed -i "1,11 s|pkgname=$old_pkgname|pkgname=$pkgname|" ./PKGBUILD<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
* install your new pkg as normal<br />
<br />
===Your <code>config</code> file===<br />
PLEASE NOTE during the build the '''final''' kernel config is stored in your $startdir as, for example, <code>config-Apr13-12h</code>. Your '''original''' config remains in the $startdir named <code>config</code>. If you wish to use the new config in another build make sure you copy the correct file!<br />
<br />
===Update Bootloader===<br />
* Remember to edit the [[LiLo]] or [[Grub]] configuration files to include an entry to the new kernel. The new kernel will install alongside any existing stock or custom kernels, so you may wish to keep a reference to your old kernel in the bootloader config file, at least until you know the new one is working. THIS IS STRONGLY RECOMMENDED<br />
<br />
* If you use lilo remember to run <code>lilo</code> to update it.<br />
<br />
===Other versions===<br />
There several variations on this PKGBUILD available, they are all provide identical results but the mechanics are slightly different:<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_patch patch] includes the old patch= variable<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_verbose verbose] provides Package Info (like that shown above) for review before starting the make process<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_buildstats buildstats] similar to verbose but writes more info, including build times, to a file called buildstats, which is stored in the $startdir. This can also be reviewed before starting the make process but also provides a permenant record<br />
<br />
===I want the Arch logo!===<br />
Copy the ''logo_linux_clut224.ppm'' from /var/abs/kernels/kernel26 to your $startdir and add <code>logo_linux_clut224.ppm</code> to the source array. Then you need to paste the marked text (>>) into the PKGBUILD as indicated:<br />
<br />
<pre><br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
>> ##### Arch logo - not compatible with gensplash!<br />
>> cp ../logo_linux_clut224.ppm drivers/video/logo/<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
</pre><br />
<br />
The stock Arch config uses the following logo settings ensure you set them at the config stage or use the stock config<br />
<br />
<pre><br />
#<br />
# Logo configuration<br />
#<br />
CONFIG_LOGO=y<br />
CONFIG_LOGO_LINUX_MONO=y<br />
CONFIG_LOGO_LINUX_VGA16=y<br />
CONFIG_LOGO_LINUX_CLUT224=y<br />
</pre><br />
<br />
=== Customization and Advanced Use normal people can stop here!===<br />
Several people have successfully customized this PKGBUILD to their own needs, while others have derived a completely new approach from it. One customization recommended to people who make multiple builds of the same version for use in parallel is to add a sed command that automatically sets the CONFIG_LOCALVERSION variable in the config to a unique value before the config stage. This can based on the date, your hostname, etc.<br />
For example<br />
<br />
<pre><br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
>> # set LOCALVERSION to -date<br />
>> sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`|g" ./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
</pre><br />
<br />
Or<br />
<br />
<pre><br />
# set LOCALVERSION to -date-hostname<br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`-`hostname`|g" ./.config<br />
</pre><br />
<br />
For a truly unique LOCALVERSION you can set the date to seconds since `00:00:00 1970-01-01 UTC'!<br />
<br />
<pre><br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%s`|g" ./.config<br />
</pre><br />
<br />
=== Problems===<br />
<br />
If you have problems with wrong package names try using the '''verbose''' PKGBUILD in '''Other Versions''' above to see what naming scheme is being created before you commit to the build - you can quit with ctrl+c at most points before the make starts.<br />
<br />
=== Feedback===<br />
If you have any questions/comments/suggestions about the above PKGBUILD feel free to join the discussion at: http://bbs.archlinux.org/viewtopic.php?t=9272<br />
<br />
Some suggestions have already been incorporated but please consider the Keep It Simple philosophy and remember the original goal. Kernel compilation is a very individual process and there are a HUGE variety of ways to go about it this PKGBUILD does not even attempt to account for all eventualities, it would be fruitless to try but of course you are completely free to customize this build to your precise needs best of luck!<br />
<br />
DibbleTheWrecker</div>Paranooshttps://wiki.archlinux.org/index.php?title=Custom_Kernel_Compilation_with_ABS&diff=305Custom Kernel Compilation with ABS2005-07-23T18:46:19Z<p>Paranoos: /* Usage Notes */</p>
<hr />
<div>Due to the addition of LOCALVERSION and EXTRAVERSION variables in the kernel compilation process from 2.6.9 onwards this document has been updated and the previous version has been moved to [[Kernel compilation with ABS (2.6.8 or earlier)]].<br />
<br />
This howto has been updated provide a definitive PKGBUILD for the creation of custom kernel pkgs. It allows you to maintain multiple custom kernels with a unique naming scheme under pacman version control. It is ideal for ANY custom kernel build and can be easily adapted to fit many requirements. The PKGBUILD automatically accounts for the EXTRAVERSION and LOCALVERSION variables that are now fully supported in the kernel. EXTRAVERSION is frequently set by major patchsets such as -ck and -nitro. EXTRAVERSION is also used in the 2.6.x.y branch to carry the .y variable. LOCALVERSION can be set during the config stage and is the easiest and RECOMMENDED way to customize your kernel pkgnames. Simply setting LOCALVERSION to -custom or the date e.g. -20050105 will suffice! A unique LOCALVERSION guarantees a unique pkg.<br />
<br />
=== Philosophy and Logic how it works and why it works this way===<br />
* The Arch Way - Keep It Simple<br />
* This PKGBUILD builds on the previous, widely accepted version<br />
* This build provides kernel packages and components with a simple, logical and uncomplicated naming scheme that ONLY uses variables that are part of the ABS system and part of the kernel compilation process itself. Rationale:<br />
** Stock Arch kernels use the <code>kernel24</code> and <code>kernel26</code> base pkgnames these are logically extended here under the 2.6.x and 2.6.x.y schemes e.g <code>kernel2611</code> and <code>kernel26117</code><br>These also provide the basis of /boot filenames e.g. <code>vmlinux26</code> and <code>vmlinuz26117</code><br />
** The ''kernel compilation process'' uses the kernel version (2.6.x), EXTRAVERSION from the Makefile and CONFIG_LOCALVERSION from the kernel config to create the name for the kernel's module directory, e.g.:<br />
<br />
<pre><br />
2.6.x$EXTRAVERSION$LOCALVERSION<br />
2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
::This is beyond the control of the PKGBUILD so to provide a pkg with similarly named components the PKGBUILD uses the same scheme to create unique /boot files and a unique /usr/src directory by appending -EXTRAVERSION-LOCALVERSION, e.g.:<br />
<br />
<pre><br />
/boot/vmlinuz2611-cko2-ARCH<br />
/boot/System.map2611-cko2-ARCH<br />
/boot/kconfig2611-cko2-ARCH<br />
<br />
/usr/src/linux-2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
* If you have the recommended knowledge of ABS you will see that the PKGBUILD is transparently constructed, self-explanatory and easily customized.<br />
* User input is almost identical to all ABS builds: simply set pkgver, pkgrel and pkgdesc and add additional sources, including patches, to the source array. Patch users should insert the appropriate patch commands where indicated. Aside from uncommenting the config method and choosing whether to make clean or not the rest of the build is automated.<br />
* Having created a custom pkg naming scheme during the build the PKGBUILD automatically corrects/updates itself with the new pkgname variable allowing simple <code>gensync</code> operation.<br />
<br />
=== CAUTION===<br />
# this PKGBUILD is only suited to builds of the 2.6 kernel branch - an effort to make a unified or alternative PKGBUILDS for the 2.4 branch can be found here - [[Kernel compilation with ABS-2.4]]<br />
# this is NOT an ABS howto - to successfully follow this HOWTO a working knowledge of building pkgs with ABS is ESSENTIAL - please read [[ABS - the Arch Build System]], [[The Arch package making HOW-TO - with guidelines]] and [[Patching in ABS Howto]]<br>I don't advise you build a kernel for your first ABS project. If you need guidelines on how to use <code>fakeroot</code> or set up a build directory read the other documents first.<br />
# likewise it helps if you know how to configure a kernel! If this is your first effort building a kernel I strongly recommend you start from the default Arch config, this is detailed further below.<br />
<br />
=== Usage Notes===<br />
<br />
* the ''patch'' variable has been removed. You should now simply specify patch sources in the source array and place the patch commands as indicated. Also see '''Other versions*<br />
<br />
* pkgname must be declared within 10 lines of the top of the PKGBUILD - so '''DO NOT* move it - just leave it.<br>If you miss this simple instruction don't worry, it won't screw up your build but your PKGBUILD file will not have the pkgname automatically updated at the end of the build. This is to allow you to use gensync correctly BUT you can edit the PKGBUILD file manually afterwards of course.<br />
<br />
* until you have your own config that you are happy with it is easiest just to start with the default Arch config; you should also get the Arch kernel26.install file. These are both in your ABS tree, normally under /var/abs/kernels/kernel26. To download the ABS tree to your system simply run <code>abs</code> as root. It doesn't take long, even on dialup. You should keep this updated by running <code>abs</code> as root on a regular basis.<br />
<br />
* To check if EXTRAVERSION is set by your patchset try doing<br />
<br />
cat ./patchname | grep +EXTRAVERSION=<br />
<br />
:and it should return something like this:<br />
<br />
+EXTRAVERSION = -ck3<br />
<br />
:if it doesn't then EXTRAVERSION is '''probably not being set''' by your patchset and you should ensure you use LOCALVERSION to customize the pkgname.<br>Arch default kernels are set with the '<code>-ARCH</code>' LOCALVERSION variable - you can set anything you like e.g. '<code>-custom</code>' (note the need for the preceding dash <code>-</code>)<br>Because of these added variables there is no need to alter the pkgname manually at any point or use any other variables. The build process automatically updates the pkgname variable in the PKGBUILD file at the end of each build to reflect the final full kernel version naming scheme.<br />
<br />
* If used correctly this PKGBUILD '''should''' always provide a unique kernel build based on EXTRAVERSION and LOCALVERSION, and on the pkgver and pkgrel (as normal) - however it is up to the user to '''double check''' resulting pkgnames and contents '''before* installation to prevent overwrites (see below for more details and examples)<br />
<br />
=== Configuring the PKGBUILD===<br />
Copy the PKGBUILD below to your $startdir. The PKGBUILD can also be downloaded from [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel here]. Before building remember the following:<br />
# pkgname can be left as it is it will automatically be set and correct itself<br />
# Insert the <code>pkgver</code> for your kernel (for example: 2.6.9)<br />
# Change the <code>pkgrel</code> for your current revision. You should increment this each time you make changes to the kernel config and want to build a REPLACEMENT pkg. If you don't want to replace the previous build but rather install in parallel you should use LOCALVERSION to create a unique pkg.<br />
# Change/expand the pkgdesc to describe any patches or special config options applied<br />
# Change the source to use a closer mirror, if you are using a patchset add the patches to the source array<br />
# {OPTIONAL} Place the patch commands where indicated<br />
# Choose a make method by leaving your preferred method uncommented-- gconfig (gtk based) xconfig (qt based) menuconfig (ncurses based)<br />
# During the build you will be asked if you want to make clean - the default is yes, reply NO if you know what you are doing.<br />
<br />
<pre><br />
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org><br />
pkgname=kernel26<br />
pkgver=2.6.x.y<br />
pkgrel=1<br />
pkgdesc="The Linux Kernel 2.6.x.y and modules (IDE support)"<br />
url="http://www.kernel.org"<br />
depends=('module-init-tools')<br />
install=kernel26.install<br />
<br />
##### add any patch sources to this section<br />
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )<br />
<br />
# Function to grab var from src<br />
getvar() {<br />
old=$(cat Makefile | grep "^$1")<br />
echo $(echo ${old/"$1 ="/} | sed -e "s/[[ ]]*\(.*\)[[ ]]*/\1/g")<br />
return 0<br />
}<br />
<br />
build() {<br />
cd $startdir/src/linux-$pkgver<br />
<br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
#make oldconfig || return 1<br />
#make menuconfig<br />
#make xconfig<br />
make gconfig<br />
<br />
##### NO USER CHANGES BELOW HERE #####<br />
<br />
# save the current pkgname<br />
old_pkgname=$pkgname<br />
<br />
# set pkgname for build purposes - DO NOT alter!<br />
pkgname=kernel26<br />
<br />
# save the updated config to build with today's date<br />
cp ./.config $startdir/config-$(date +%b%d\-%Hh)<br />
<br />
# get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory<br />
_kernextra=$(getvar "EXTRAVERSION")<br />
# grab the 2.6.x.y version suffix from pkgver<br />
_y="`echo $pkgver | cut --delim "." --fields 4`"<br />
# remove .y version suffix from _kernextra<br />
_kernextra="`echo $_kernextra | sed "s|\.$_y||g"`"<br />
<br />
# Read the full kernel version info from new config to use in pathnames and pkgname<br />
. ./.config<br />
<br />
# Kernel custom - to create a unique pkgname (see below)<br />
_kerncust="${_kernextra}${CONFIG_LOCALVERSION}"<br />
# Kernel release - will be the same as Makefile<br />
_kernrel="${pkgver}${_kerncust}"<br />
# Get the pkgver suffix for unique pkgname and /boot file suffices<br />
_pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|\.||g"`"<br />
# Set /boot file suffices from kernel release and pkgver suffix<br />
_kernboot="${_pkgversuf}${_kerncust}"<br />
<br />
# Set a new pkgname from kernel release and pkgver suffix<br />
pkgname="${pkgname}${_pkgversuf}${_kerncust}"<br />
<br />
# build!<br />
echo<br />
echo -n "Do you want to make clean (default YES)? (YES/NO): "<br />
read choice<br />
echo<br />
echo -n "Press any key to start make or CTRL+C to quit"<br />
read anykey<br />
<br />
if [[ "${choice}" = "NO" ]] ; then<br />
make bzImage modules || return 1<br />
else<br />
make clean bzImage modules || return 1<br />
fi<br />
<br />
mkdir -p $startdir/pkg/{lib/modules,boot}<br />
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1<br />
cp System.map $startdir/pkg/boot/System.map26${_kernboot}<br />
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}<br />
install -D -m644 Makefile \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/Makefile<br />
install -D -m644 .config \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/.config<br />
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel<br />
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do<br />
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/<br />
done<br />
# copy files necessary for later builds, like nvidia and vmware<br />
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}<br />
cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/.tmp_versions<br />
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/<br />
cp arch/i386/kernel/asm-offsets.s \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/<br />
# copy in Kconfig files<br />
for i in `find . -name "Kconfig*"`; do<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`<br />
cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i<br />
done<br />
cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm<br />
chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}<br />
cd $startdir/pkg/lib/modules/${_kernrel} && \<br />
(rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)<br />
<br />
# Correct the pkgname in our PKGBUILD - this allows correct gensync operation<br />
# NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!<br />
cd $startdir<br />
sed -i "1,11 s|pkgname=$old_pkgname|pkgname=$pkgname|" ./PKGBUILD<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
* install your new pkg as normal<br />
<br />
===Your <code>config</code> file===<br />
PLEASE NOTE during the build the '''final''' kernel config is stored in your $startdir as, for example, <code>config-Apr13-12h</code>. Your '''original''' config remains in the $startdir named <code>config</code>. If you wish to use the new config in another build make sure you copy the correct file!<br />
<br />
===Update Bootloader===<br />
* Remember to edit the [[LiLo]] or [[Grub]] configuration files to include an entry to the new kernel. The new kernel will install alongside any existing stock or custom kernels, so you may wish to keep a reference to your old kernel in the bootloader config file, at least until you know the new one is working. THIS IS STRONGLY RECOMMENDED<br />
<br />
* If you use lilo remember to run <code>lilo</code> to update it.<br />
<br />
===Other versions===<br />
There several variations on this PKGBUILD available, they are all provide identical results but the mechanics are slightly different:<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_patch patch] includes the old patch= variable<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_verbose verbose] provides Package Info (like that shown above) for review before starting the make process<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_buildstats buildstats] similar to verbose but writes more info, including build times, to a file called buildstats, which is stored in the $startdir. This can also be reviewed before starting the make process but also provides a permenant record<br />
<br />
===I want the Arch logo!===<br />
Copy the ''logo_linux_clut224.ppm'' from /var/abs/kernels/kernel26 to your $startdir and add <code>logo_linux_clut224.ppm</code> to the source array. Then you need to paste the marked text (>>) into the PKGBUILD as indicated:<br />
<br />
<pre><br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
>> ##### Arch logo - not compatible with gensplash!<br />
>> cp ../logo_linux_clut224.ppm drivers/video/logo/<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
</pre><br />
<br />
The stock Arch config uses the following logo settings ensure you set them at the config stage or use the stock config<br />
<br />
<pre><br />
#<br />
# Logo configuration<br />
#<br />
CONFIG_LOGO=y<br />
CONFIG_LOGO_LINUX_MONO=y<br />
CONFIG_LOGO_LINUX_VGA16=y<br />
CONFIG_LOGO_LINUX_CLUT224=y<br />
</pre><br />
<br />
=== Customization and Advanced Use normal people can stop here!===<br />
Several people have successfully customized this PKGBUILD to their own needs, while others have derived a completely new approach from it. One customization recommended to people who make multiple builds of the same version for use in parallel is to add a sed command that automatically sets the CONFIG_LOCALVERSION variable in the config to a unique value before the config stage. This can based on the date, your hostname, etc.<br />
For example<br />
<br />
<pre><br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
>> # set LOCALVERSION to -date<br />
>> sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`|g" ./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
</pre><br />
<br />
Or<br />
<br />
<pre><br />
# set LOCALVERSION to -date-hostname<br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`-`hostname`|g" ./.config<br />
</pre><br />
<br />
For a truly unique LOCALVERSION you can set the date to seconds since `00:00:00 1970-01-01 UTC'!<br />
<br />
<pre><br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%s`|g" ./.config<br />
</pre><br />
<br />
=== Problems===<br />
<br />
If you have problems with wrong package names try using the '''verbose''' PKGBUILD in '''Other Versions''' above to see what naming scheme is being created before you commit to the build - you can quit with ctrl+c at most points before the make starts.<br />
<br />
=== Feedback===<br />
If you have any questions/comments/suggestions about the above PKGBUILD feel free to join the discussion at: http://bbs.archlinux.org/viewtopic.php?t=9272<br />
<br />
Some suggestions have already been incorporated but please consider the Keep It Simple philosophy and remember the original goal. Kernel compilation is a very individual process and there are a HUGE variety of ways to go about it this PKGBUILD does not even attempt to account for all eventualities, it would be fruitless to try but of course you are completely free to customize this build to your precise needs best of luck!<br />
<br />
DibbleTheWrecker</div>Paranooshttps://wiki.archlinux.org/index.php?title=Custom_Kernel_Compilation_with_ABS&diff=294Custom Kernel Compilation with ABS2005-07-23T18:45:37Z<p>Paranoos: /* Configuring the PKGBUILD */</p>
<hr />
<div>Due to the addition of LOCALVERSION and EXTRAVERSION variables in the kernel compilation process from 2.6.9 onwards this document has been updated and the previous version has been moved to [[Kernel compilation with ABS (2.6.8 or earlier)]].<br />
<br />
This howto has been updated provide a definitive PKGBUILD for the creation of custom kernel pkgs. It allows you to maintain multiple custom kernels with a unique naming scheme under pacman version control. It is ideal for ANY custom kernel build and can be easily adapted to fit many requirements. The PKGBUILD automatically accounts for the EXTRAVERSION and LOCALVERSION variables that are now fully supported in the kernel. EXTRAVERSION is frequently set by major patchsets such as -ck and -nitro. EXTRAVERSION is also used in the 2.6.x.y branch to carry the .y variable. LOCALVERSION can be set during the config stage and is the easiest and RECOMMENDED way to customize your kernel pkgnames. Simply setting LOCALVERSION to -custom or the date e.g. -20050105 will suffice! A unique LOCALVERSION guarantees a unique pkg.<br />
<br />
=== Philosophy and Logic how it works and why it works this way===<br />
* The Arch Way - Keep It Simple<br />
* This PKGBUILD builds on the previous, widely accepted version<br />
* This build provides kernel packages and components with a simple, logical and uncomplicated naming scheme that ONLY uses variables that are part of the ABS system and part of the kernel compilation process itself. Rationale:<br />
** Stock Arch kernels use the <code>kernel24</code> and <code>kernel26</code> base pkgnames these are logically extended here under the 2.6.x and 2.6.x.y schemes e.g <code>kernel2611</code> and <code>kernel26117</code><br>These also provide the basis of /boot filenames e.g. <code>vmlinux26</code> and <code>vmlinuz26117</code><br />
** The ''kernel compilation process'' uses the kernel version (2.6.x), EXTRAVERSION from the Makefile and CONFIG_LOCALVERSION from the kernel config to create the name for the kernel's module directory, e.g.:<br />
<br />
<pre><br />
2.6.x$EXTRAVERSION$LOCALVERSION<br />
2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
::This is beyond the control of the PKGBUILD so to provide a pkg with similarly named components the PKGBUILD uses the same scheme to create unique /boot files and a unique /usr/src directory by appending -EXTRAVERSION-LOCALVERSION, e.g.:<br />
<br />
<pre><br />
/boot/vmlinuz2611-cko2-ARCH<br />
/boot/System.map2611-cko2-ARCH<br />
/boot/kconfig2611-cko2-ARCH<br />
<br />
/usr/src/linux-2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
* If you have the recommended knowledge of ABS you will see that the PKGBUILD is transparently constructed, self-explanatory and easily customized.<br />
* User input is almost identical to all ABS builds: simply set pkgver, pkgrel and pkgdesc and add additional sources, including patches, to the source array. Patch users should insert the appropriate patch commands where indicated. Aside from uncommenting the config method and choosing whether to make clean or not the rest of the build is automated.<br />
* Having created a custom pkg naming scheme during the build the PKGBUILD automatically corrects/updates itself with the new pkgname variable allowing simple <code>gensync</code> operation.<br />
<br />
=== CAUTION===<br />
# this PKGBUILD is only suited to builds of the 2.6 kernel branch - an effort to make a unified or alternative PKGBUILDS for the 2.4 branch can be found here - [[Kernel compilation with ABS-2.4]]<br />
# this is NOT an ABS howto - to successfully follow this HOWTO a working knowledge of building pkgs with ABS is ESSENTIAL - please read [[ABS - the Arch Build System]], [[The Arch package making HOW-TO - with guidelines]] and [[Patching in ABS Howto]]<br>I don't advise you build a kernel for your first ABS project. If you need guidelines on how to use <code>fakeroot</code> or set up a build directory read the other documents first.<br />
# likewise it helps if you know how to configure a kernel! If this is your first effort building a kernel I strongly recommend you start from the default Arch config, this is detailed further below.<br />
<br />
=== Usage Notes===<br />
<br />
* the ''patch'' variable has been removed. You should now simply specify patch sources in the source array and place the patch commands as indicated. Also see '''Other versions*<br />
<br />
* pkgname must be declared within 10 lines of the top of the PKGBUILD - so '''DO NOT* move it - just leave it.<br>If you miss this simple instruction don't worry, it won't screw up your build but your PKGBUILD file will not have the pkgname automatically updated at the end of the build. This is to allow you to use gensync correctly BUT you can edit the PKGBUILD file manually afterwards of course.<br />
<br />
* until you have your own config that you are happy with it is easiest just to start with the default Arch config; you should also get the Arch kernel26.install file. These are both in your ABS tree, normally under /var/abs/kernels/kernel26. To download the ABS tree to your system simply run <code>abs</code> as root. It doesn't take long, even on dialup. You should keep this updated by running <code>abs</code> as root on a regular basis.<br />
<br />
* To check if EXTRAVERSION is set by your patchset try doing<br />
<br />
cat ./patchname || grep +EXTRAVERSION=<br />
<br />
:and it should return something like this:<br />
<br />
+EXTRAVERSION = -ck3<br />
<br />
:if it doesn't then EXTRAVERSION is '''probably not being set''' by your patchset and you should ensure you use LOCALVERSION to customize the pkgname.<br>Arch default kernels are set with the '<code>-ARCH</code>' LOCALVERSION variable - you can set anything you like e.g. '<code>-custom</code>' (note the need for the preceding dash <code>-</code>)<br>Because of these added variables there is no need to alter the pkgname manually at any point or use any other variables. The build process automatically updates the pkgname variable in the PKGBUILD file at the end of each build to reflect the final full kernel version naming scheme.<br />
<br />
* If used correctly this PKGBUILD '''should''' always provide a unique kernel build based on EXTRAVERSION and LOCALVERSION, and on the pkgver and pkgrel (as normal) - however it is up to the user to '''double check''' resulting pkgnames and contents '''before* installation to prevent overwrites (see below for more details and examples)<br />
<br />
=== Configuring the PKGBUILD===<br />
Copy the PKGBUILD below to your $startdir. The PKGBUILD can also be downloaded from [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel here]. Before building remember the following:<br />
# pkgname can be left as it is it will automatically be set and correct itself<br />
# Insert the <code>pkgver</code> for your kernel (for example: 2.6.9)<br />
# Change the <code>pkgrel</code> for your current revision. You should increment this each time you make changes to the kernel config and want to build a REPLACEMENT pkg. If you don't want to replace the previous build but rather install in parallel you should use LOCALVERSION to create a unique pkg.<br />
# Change/expand the pkgdesc to describe any patches or special config options applied<br />
# Change the source to use a closer mirror, if you are using a patchset add the patches to the source array<br />
# {OPTIONAL} Place the patch commands where indicated<br />
# Choose a make method by leaving your preferred method uncommented-- gconfig (gtk based) xconfig (qt based) menuconfig (ncurses based)<br />
# During the build you will be asked if you want to make clean - the default is yes, reply NO if you know what you are doing.<br />
<br />
<pre><br />
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org><br />
pkgname=kernel26<br />
pkgver=2.6.x.y<br />
pkgrel=1<br />
pkgdesc="The Linux Kernel 2.6.x.y and modules (IDE support)"<br />
url="http://www.kernel.org"<br />
depends=('module-init-tools')<br />
install=kernel26.install<br />
<br />
##### add any patch sources to this section<br />
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )<br />
<br />
# Function to grab var from src<br />
getvar() {<br />
old=$(cat Makefile | grep "^$1")<br />
echo $(echo ${old/"$1 ="/} | sed -e "s/[[ ]]*\(.*\)[[ ]]*/\1/g")<br />
return 0<br />
}<br />
<br />
build() {<br />
cd $startdir/src/linux-$pkgver<br />
<br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
#make oldconfig || return 1<br />
#make menuconfig<br />
#make xconfig<br />
make gconfig<br />
<br />
##### NO USER CHANGES BELOW HERE #####<br />
<br />
# save the current pkgname<br />
old_pkgname=$pkgname<br />
<br />
# set pkgname for build purposes - DO NOT alter!<br />
pkgname=kernel26<br />
<br />
# save the updated config to build with today's date<br />
cp ./.config $startdir/config-$(date +%b%d\-%Hh)<br />
<br />
# get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory<br />
_kernextra=$(getvar "EXTRAVERSION")<br />
# grab the 2.6.x.y version suffix from pkgver<br />
_y="`echo $pkgver | cut --delim "." --fields 4`"<br />
# remove .y version suffix from _kernextra<br />
_kernextra="`echo $_kernextra | sed "s|\.$_y||g"`"<br />
<br />
# Read the full kernel version info from new config to use in pathnames and pkgname<br />
. ./.config<br />
<br />
# Kernel custom - to create a unique pkgname (see below)<br />
_kerncust="${_kernextra}${CONFIG_LOCALVERSION}"<br />
# Kernel release - will be the same as Makefile<br />
_kernrel="${pkgver}${_kerncust}"<br />
# Get the pkgver suffix for unique pkgname and /boot file suffices<br />
_pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|\.||g"`"<br />
# Set /boot file suffices from kernel release and pkgver suffix<br />
_kernboot="${_pkgversuf}${_kerncust}"<br />
<br />
# Set a new pkgname from kernel release and pkgver suffix<br />
pkgname="${pkgname}${_pkgversuf}${_kerncust}"<br />
<br />
# build!<br />
echo<br />
echo -n "Do you want to make clean (default YES)? (YES/NO): "<br />
read choice<br />
echo<br />
echo -n "Press any key to start make or CTRL+C to quit"<br />
read anykey<br />
<br />
if [[ "${choice}" = "NO" ]] ; then<br />
make bzImage modules || return 1<br />
else<br />
make clean bzImage modules || return 1<br />
fi<br />
<br />
mkdir -p $startdir/pkg/{lib/modules,boot}<br />
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1<br />
cp System.map $startdir/pkg/boot/System.map26${_kernboot}<br />
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}<br />
install -D -m644 Makefile \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/Makefile<br />
install -D -m644 .config \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/.config<br />
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel<br />
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do<br />
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/<br />
done<br />
# copy files necessary for later builds, like nvidia and vmware<br />
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}<br />
cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/.tmp_versions<br />
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/<br />
cp arch/i386/kernel/asm-offsets.s \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/<br />
# copy in Kconfig files<br />
for i in `find . -name "Kconfig*"`; do<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`<br />
cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i<br />
done<br />
cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm<br />
chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}<br />
cd $startdir/pkg/lib/modules/${_kernrel} && \<br />
(rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)<br />
<br />
# Correct the pkgname in our PKGBUILD - this allows correct gensync operation<br />
# NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!<br />
cd $startdir<br />
sed -i "1,11 s|pkgname=$old_pkgname|pkgname=$pkgname|" ./PKGBUILD<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
* install your new pkg as normal<br />
<br />
===Your <code>config</code> file===<br />
PLEASE NOTE during the build the '''final''' kernel config is stored in your $startdir as, for example, <code>config-Apr13-12h</code>. Your '''original''' config remains in the $startdir named <code>config</code>. If you wish to use the new config in another build make sure you copy the correct file!<br />
<br />
===Update Bootloader===<br />
* Remember to edit the [[LiLo]] or [[Grub]] configuration files to include an entry to the new kernel. The new kernel will install alongside any existing stock or custom kernels, so you may wish to keep a reference to your old kernel in the bootloader config file, at least until you know the new one is working. THIS IS STRONGLY RECOMMENDED<br />
<br />
* If you use lilo remember to run <code>lilo</code> to update it.<br />
<br />
===Other versions===<br />
There several variations on this PKGBUILD available, they are all provide identical results but the mechanics are slightly different:<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_patch patch] includes the old patch= variable<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_verbose verbose] provides Package Info (like that shown above) for review before starting the make process<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_buildstats buildstats] similar to verbose but writes more info, including build times, to a file called buildstats, which is stored in the $startdir. This can also be reviewed before starting the make process but also provides a permenant record<br />
<br />
===I want the Arch logo!===<br />
Copy the ''logo_linux_clut224.ppm'' from /var/abs/kernels/kernel26 to your $startdir and add <code>logo_linux_clut224.ppm</code> to the source array. Then you need to paste the marked text (>>) into the PKGBUILD as indicated:<br />
<br />
<pre><br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
>> ##### Arch logo - not compatible with gensplash!<br />
>> cp ../logo_linux_clut224.ppm drivers/video/logo/<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
</pre><br />
<br />
The stock Arch config uses the following logo settings ensure you set them at the config stage or use the stock config<br />
<br />
<pre><br />
#<br />
# Logo configuration<br />
#<br />
CONFIG_LOGO=y<br />
CONFIG_LOGO_LINUX_MONO=y<br />
CONFIG_LOGO_LINUX_VGA16=y<br />
CONFIG_LOGO_LINUX_CLUT224=y<br />
</pre><br />
<br />
=== Customization and Advanced Use normal people can stop here!===<br />
Several people have successfully customized this PKGBUILD to their own needs, while others have derived a completely new approach from it. One customization recommended to people who make multiple builds of the same version for use in parallel is to add a sed command that automatically sets the CONFIG_LOCALVERSION variable in the config to a unique value before the config stage. This can based on the date, your hostname, etc.<br />
For example<br />
<br />
<pre><br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
>> # set LOCALVERSION to -date<br />
>> sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`|g" ./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
</pre><br />
<br />
Or<br />
<br />
<pre><br />
# set LOCALVERSION to -date-hostname<br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`-`hostname`|g" ./.config<br />
</pre><br />
<br />
For a truly unique LOCALVERSION you can set the date to seconds since `00:00:00 1970-01-01 UTC'!<br />
<br />
<pre><br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%s`|g" ./.config<br />
</pre><br />
<br />
=== Problems===<br />
<br />
If you have problems with wrong package names try using the '''verbose''' PKGBUILD in '''Other Versions''' above to see what naming scheme is being created before you commit to the build - you can quit with ctrl+c at most points before the make starts.<br />
<br />
=== Feedback===<br />
If you have any questions/comments/suggestions about the above PKGBUILD feel free to join the discussion at: http://bbs.archlinux.org/viewtopic.php?t=9272<br />
<br />
Some suggestions have already been incorporated but please consider the Keep It Simple philosophy and remember the original goal. Kernel compilation is a very individual process and there are a HUGE variety of ways to go about it this PKGBUILD does not even attempt to account for all eventualities, it would be fruitless to try but of course you are completely free to customize this build to your precise needs best of luck!<br />
<br />
DibbleTheWrecker</div>Paranooshttps://wiki.archlinux.org/index.php?title=Custom_Kernel_Compilation_with_ABS&diff=292Custom Kernel Compilation with ABS2005-07-23T18:45:05Z<p>Paranoos: /* Configuring the PKGBUILD */</p>
<hr />
<div>Due to the addition of LOCALVERSION and EXTRAVERSION variables in the kernel compilation process from 2.6.9 onwards this document has been updated and the previous version has been moved to [[Kernel compilation with ABS (2.6.8 or earlier)]].<br />
<br />
This howto has been updated provide a definitive PKGBUILD for the creation of custom kernel pkgs. It allows you to maintain multiple custom kernels with a unique naming scheme under pacman version control. It is ideal for ANY custom kernel build and can be easily adapted to fit many requirements. The PKGBUILD automatically accounts for the EXTRAVERSION and LOCALVERSION variables that are now fully supported in the kernel. EXTRAVERSION is frequently set by major patchsets such as -ck and -nitro. EXTRAVERSION is also used in the 2.6.x.y branch to carry the .y variable. LOCALVERSION can be set during the config stage and is the easiest and RECOMMENDED way to customize your kernel pkgnames. Simply setting LOCALVERSION to -custom or the date e.g. -20050105 will suffice! A unique LOCALVERSION guarantees a unique pkg.<br />
<br />
=== Philosophy and Logic how it works and why it works this way===<br />
* The Arch Way - Keep It Simple<br />
* This PKGBUILD builds on the previous, widely accepted version<br />
* This build provides kernel packages and components with a simple, logical and uncomplicated naming scheme that ONLY uses variables that are part of the ABS system and part of the kernel compilation process itself. Rationale:<br />
** Stock Arch kernels use the <code>kernel24</code> and <code>kernel26</code> base pkgnames these are logically extended here under the 2.6.x and 2.6.x.y schemes e.g <code>kernel2611</code> and <code>kernel26117</code><br>These also provide the basis of /boot filenames e.g. <code>vmlinux26</code> and <code>vmlinuz26117</code><br />
** The ''kernel compilation process'' uses the kernel version (2.6.x), EXTRAVERSION from the Makefile and CONFIG_LOCALVERSION from the kernel config to create the name for the kernel's module directory, e.g.:<br />
<br />
<pre><br />
2.6.x$EXTRAVERSION$LOCALVERSION<br />
2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
::This is beyond the control of the PKGBUILD so to provide a pkg with similarly named components the PKGBUILD uses the same scheme to create unique /boot files and a unique /usr/src directory by appending -EXTRAVERSION-LOCALVERSION, e.g.:<br />
<br />
<pre><br />
/boot/vmlinuz2611-cko2-ARCH<br />
/boot/System.map2611-cko2-ARCH<br />
/boot/kconfig2611-cko2-ARCH<br />
<br />
/usr/src/linux-2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
* If you have the recommended knowledge of ABS you will see that the PKGBUILD is transparently constructed, self-explanatory and easily customized.<br />
* User input is almost identical to all ABS builds: simply set pkgver, pkgrel and pkgdesc and add additional sources, including patches, to the source array. Patch users should insert the appropriate patch commands where indicated. Aside from uncommenting the config method and choosing whether to make clean or not the rest of the build is automated.<br />
* Having created a custom pkg naming scheme during the build the PKGBUILD automatically corrects/updates itself with the new pkgname variable allowing simple <code>gensync</code> operation.<br />
<br />
=== CAUTION===<br />
# this PKGBUILD is only suited to builds of the 2.6 kernel branch - an effort to make a unified or alternative PKGBUILDS for the 2.4 branch can be found here - [[Kernel compilation with ABS-2.4]]<br />
# this is NOT an ABS howto - to successfully follow this HOWTO a working knowledge of building pkgs with ABS is ESSENTIAL - please read [[ABS - the Arch Build System]], [[The Arch package making HOW-TO - with guidelines]] and [[Patching in ABS Howto]]<br>I don't advise you build a kernel for your first ABS project. If you need guidelines on how to use <code>fakeroot</code> or set up a build directory read the other documents first.<br />
# likewise it helps if you know how to configure a kernel! If this is your first effort building a kernel I strongly recommend you start from the default Arch config, this is detailed further below.<br />
<br />
=== Usage Notes===<br />
<br />
* the ''patch'' variable has been removed. You should now simply specify patch sources in the source array and place the patch commands as indicated. Also see '''Other versions*<br />
<br />
* pkgname must be declared within 10 lines of the top of the PKGBUILD - so '''DO NOT* move it - just leave it.<br>If you miss this simple instruction don't worry, it won't screw up your build but your PKGBUILD file will not have the pkgname automatically updated at the end of the build. This is to allow you to use gensync correctly BUT you can edit the PKGBUILD file manually afterwards of course.<br />
<br />
* until you have your own config that you are happy with it is easiest just to start with the default Arch config; you should also get the Arch kernel26.install file. These are both in your ABS tree, normally under /var/abs/kernels/kernel26. To download the ABS tree to your system simply run <code>abs</code> as root. It doesn't take long, even on dialup. You should keep this updated by running <code>abs</code> as root on a regular basis.<br />
<br />
* To check if EXTRAVERSION is set by your patchset try doing<br />
<br />
cat ./patchname || grep +EXTRAVERSION=<br />
<br />
:and it should return something like this:<br />
<br />
+EXTRAVERSION = -ck3<br />
<br />
:if it doesn't then EXTRAVERSION is '''probably not being set''' by your patchset and you should ensure you use LOCALVERSION to customize the pkgname.<br>Arch default kernels are set with the '<code>-ARCH</code>' LOCALVERSION variable - you can set anything you like e.g. '<code>-custom</code>' (note the need for the preceding dash <code>-</code>)<br>Because of these added variables there is no need to alter the pkgname manually at any point or use any other variables. The build process automatically updates the pkgname variable in the PKGBUILD file at the end of each build to reflect the final full kernel version naming scheme.<br />
<br />
* If used correctly this PKGBUILD '''should''' always provide a unique kernel build based on EXTRAVERSION and LOCALVERSION, and on the pkgver and pkgrel (as normal) - however it is up to the user to '''double check''' resulting pkgnames and contents '''before* installation to prevent overwrites (see below for more details and examples)<br />
<br />
=== Configuring the PKGBUILD===<br />
Copy the PKGBUILD below to your $startdir. The PKGBUILD can also be downloaded from [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel here]. Before building remember the following:<br />
# pkgname can be left as it is it will automatically be set and correct itself<br />
# Insert the <code>pkgver</code> for your kernel (for example: 2.6.9)<br />
# Change the <code>pkgrel</code> for your current revision. You should increment this each time you make changes to the kernel config and want to build a REPLACEMENT pkg. If you don't want to replace the previous build but rather install in parallel you should use LOCALVERSION to create a unique pkg.<br />
# Change/expand the pkgdesc to describe any patches or special config options applied<br />
# Change the source to use a closer mirror, if you are using a patchset add the patches to the source array<br />
# {OPTIONAL} Place the patch commands where indicated<br />
# Choose a make method by leaving your preferred method uncommented-- gconfig (gtk based) xconfig (qt based) menuconfig (ncurses based)<br />
# During the build you will be asked if you want to make clean - the default is yes, reply NO if you know what you are doing.<br />
<br />
<pre><br />
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org><br />
pkgname=kernel26<br />
pkgver=2.6.x.y<br />
pkgrel=1<br />
pkgdesc="The Linux Kernel 2.6.x.y and modules (IDE support)"<br />
url="http://www.kernel.org"<br />
depends=('module-init-tools')<br />
install=kernel26.install<br />
<br />
##### add any patch sources to this section<br />
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )<br />
<br />
# Function to grab var from src<br />
getvar() {<br />
old=$(cat Makefile | grep "^$1")<br />
echo $(echo ${old/"$1 ="/} | sed -e "s/[[ ]]*\(.*\)[[ ]]*/\1/g")<br />
return 0<br />
}<br />
<br />
build() {<br />
cd $startdir/src/linux-$pkgver<br />
<br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
#make oldconfig || return 1<br />
#make menuconfig<br />
#make xconfig<br />
make gconfig<br />
<br />
##### NO USER CHANGES BELOW HERE #####<br />
<br />
# save the current pkgname<br />
old_pkgname=$pkgname<br />
<br />
# set pkgname for build purposes - DO NOT alter!<br />
pkgname=kernel26<br />
<br />
# save the updated config to build with today's date<br />
cp ./.config $startdir/config-$(date +%b%d\-%Hh)<br />
<br />
# get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory<br />
_kernextra=$(getvar "EXTRAVERSION")<br />
# grab the 2.6.x.y version suffix from pkgver<br />
_y="`echo $pkgver | cut --delim "." --fields 4`"<br />
# remove .y version suffix from _kernextra<br />
_kernextra="`echo $_kernextra | sed "s|\.$_y||g"`"<br />
<br />
# Read the full kernel version info from new config to use in pathnames and pkgname<br />
. ./.config<br />
<br />
# Kernel custom - to create a unique pkgname (see below)<br />
_kerncust="${_kernextra}${CONFIG_LOCALVERSION}"<br />
# Kernel release - will be the same as Makefile<br />
_kernrel="${pkgver}${_kerncust}"<br />
# Get the pkgver suffix for unique pkgname and /boot file suffices<br />
_pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|\.||g"`"<br />
# Set /boot file suffices from kernel release and pkgver suffix<br />
_kernboot="${_pkgversuf}${_kerncust}"<br />
<br />
# Set a new pkgname from kernel release and pkgver suffix<br />
pkgname="${pkgname}${_pkgversuf}${_kerncust}"<br />
<br />
# build!<br />
echo<br />
echo -n "Do you want to make clean (default YES)? (YES/NO): "<br />
read choice<br />
echo<br />
echo -n "Press any key to start make or CTRL+C to quit"<br />
read anykey<br />
<br />
if [[ "${choice}" = "NO" ]] ; then<br />
make bzImage modules || return 1<br />
else<br />
make clean bzImage modules || return 1<br />
fi<br />
<br />
mkdir -p $startdir/pkg/{lib/modules,boot}<br />
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1<br />
cp System.map $startdir/pkg/boot/System.map26${_kernboot}<br />
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}<br />
install -D -m644 Makefile \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/Makefile<br />
install -D -m644 .config \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/.config<br />
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel<br />
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do<br />
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/<br />
done<br />
# copy files necessary for later builds, like nvidia and vmware<br />
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}<br />
cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}<br />
mkdir -p $startdir/pkg/usr/src/linux-${''kernrel}/.tmp''versions<br />
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/<br />
cp arch/i386/kernel/asm-offsets.s \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/<br />
# copy in Kconfig files<br />
for i in `find . -name "Kconfig*"`; do<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`<br />
cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i<br />
done<br />
cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm<br />
chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}<br />
cd $startdir/pkg/lib/modules/${_kernrel} && \<br />
(rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)<br />
<br />
# Correct the pkgname in our PKGBUILD - this allows correct gensync operation<br />
# NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!<br />
cd $startdir<br />
sed -i "1,11 s|pkgname=$old_pkgname|pkgname=$pkgname|" ./PKGBUILD<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
* install your new pkg as normal<br />
<br />
===Your <code>config</code> file===<br />
PLEASE NOTE during the build the '''final''' kernel config is stored in your $startdir as, for example, <code>config-Apr13-12h</code>. Your '''original''' config remains in the $startdir named <code>config</code>. If you wish to use the new config in another build make sure you copy the correct file!<br />
<br />
===Update Bootloader===<br />
* Remember to edit the [[LiLo]] or [[Grub]] configuration files to include an entry to the new kernel. The new kernel will install alongside any existing stock or custom kernels, so you may wish to keep a reference to your old kernel in the bootloader config file, at least until you know the new one is working. THIS IS STRONGLY RECOMMENDED<br />
<br />
* If you use lilo remember to run <code>lilo</code> to update it.<br />
<br />
===Other versions===<br />
There several variations on this PKGBUILD available, they are all provide identical results but the mechanics are slightly different:<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_patch patch] includes the old patch= variable<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_verbose verbose] provides Package Info (like that shown above) for review before starting the make process<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_buildstats buildstats] similar to verbose but writes more info, including build times, to a file called buildstats, which is stored in the $startdir. This can also be reviewed before starting the make process but also provides a permenant record<br />
<br />
===I want the Arch logo!===<br />
Copy the ''logo_linux_clut224.ppm'' from /var/abs/kernels/kernel26 to your $startdir and add <code>logo_linux_clut224.ppm</code> to the source array. Then you need to paste the marked text (>>) into the PKGBUILD as indicated:<br />
<br />
<pre><br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
>> ##### Arch logo - not compatible with gensplash!<br />
>> cp ../logo_linux_clut224.ppm drivers/video/logo/<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
</pre><br />
<br />
The stock Arch config uses the following logo settings ensure you set them at the config stage or use the stock config<br />
<br />
<pre><br />
#<br />
# Logo configuration<br />
#<br />
CONFIG_LOGO=y<br />
CONFIG_LOGO_LINUX_MONO=y<br />
CONFIG_LOGO_LINUX_VGA16=y<br />
CONFIG_LOGO_LINUX_CLUT224=y<br />
</pre><br />
<br />
=== Customization and Advanced Use normal people can stop here!===<br />
Several people have successfully customized this PKGBUILD to their own needs, while others have derived a completely new approach from it. One customization recommended to people who make multiple builds of the same version for use in parallel is to add a sed command that automatically sets the CONFIG_LOCALVERSION variable in the config to a unique value before the config stage. This can based on the date, your hostname, etc.<br />
For example<br />
<br />
<pre><br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
>> # set LOCALVERSION to -date<br />
>> sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`|g" ./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
</pre><br />
<br />
Or<br />
<br />
<pre><br />
# set LOCALVERSION to -date-hostname<br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`-`hostname`|g" ./.config<br />
</pre><br />
<br />
For a truly unique LOCALVERSION you can set the date to seconds since `00:00:00 1970-01-01 UTC'!<br />
<br />
<pre><br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%s`|g" ./.config<br />
</pre><br />
<br />
=== Problems===<br />
<br />
If you have problems with wrong package names try using the '''verbose''' PKGBUILD in '''Other Versions''' above to see what naming scheme is being created before you commit to the build - you can quit with ctrl+c at most points before the make starts.<br />
<br />
=== Feedback===<br />
If you have any questions/comments/suggestions about the above PKGBUILD feel free to join the discussion at: http://bbs.archlinux.org/viewtopic.php?t=9272<br />
<br />
Some suggestions have already been incorporated but please consider the Keep It Simple philosophy and remember the original goal. Kernel compilation is a very individual process and there are a HUGE variety of ways to go about it this PKGBUILD does not even attempt to account for all eventualities, it would be fruitless to try but of course you are completely free to customize this build to your precise needs best of luck!<br />
<br />
DibbleTheWrecker</div>Paranooshttps://wiki.archlinux.org/index.php?title=Custom_Kernel_Compilation_with_ABS&diff=291Custom Kernel Compilation with ABS2005-07-23T18:42:44Z<p>Paranoos: /* I want the Arch logo! */</p>
<hr />
<div>Due to the addition of LOCALVERSION and EXTRAVERSION variables in the kernel compilation process from 2.6.9 onwards this document has been updated and the previous version has been moved to [[Kernel compilation with ABS (2.6.8 or earlier)]].<br />
<br />
This howto has been updated provide a definitive PKGBUILD for the creation of custom kernel pkgs. It allows you to maintain multiple custom kernels with a unique naming scheme under pacman version control. It is ideal for ANY custom kernel build and can be easily adapted to fit many requirements. The PKGBUILD automatically accounts for the EXTRAVERSION and LOCALVERSION variables that are now fully supported in the kernel. EXTRAVERSION is frequently set by major patchsets such as -ck and -nitro. EXTRAVERSION is also used in the 2.6.x.y branch to carry the .y variable. LOCALVERSION can be set during the config stage and is the easiest and RECOMMENDED way to customize your kernel pkgnames. Simply setting LOCALVERSION to -custom or the date e.g. -20050105 will suffice! A unique LOCALVERSION guarantees a unique pkg.<br />
<br />
=== Philosophy and Logic how it works and why it works this way===<br />
* The Arch Way - Keep It Simple<br />
* This PKGBUILD builds on the previous, widely accepted version<br />
* This build provides kernel packages and components with a simple, logical and uncomplicated naming scheme that ONLY uses variables that are part of the ABS system and part of the kernel compilation process itself. Rationale:<br />
** Stock Arch kernels use the <code>kernel24</code> and <code>kernel26</code> base pkgnames these are logically extended here under the 2.6.x and 2.6.x.y schemes e.g <code>kernel2611</code> and <code>kernel26117</code><br>These also provide the basis of /boot filenames e.g. <code>vmlinux26</code> and <code>vmlinuz26117</code><br />
** The ''kernel compilation process'' uses the kernel version (2.6.x), EXTRAVERSION from the Makefile and CONFIG_LOCALVERSION from the kernel config to create the name for the kernel's module directory, e.g.:<br />
<br />
<pre><br />
2.6.x$EXTRAVERSION$LOCALVERSION<br />
2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
::This is beyond the control of the PKGBUILD so to provide a pkg with similarly named components the PKGBUILD uses the same scheme to create unique /boot files and a unique /usr/src directory by appending -EXTRAVERSION-LOCALVERSION, e.g.:<br />
<br />
<pre><br />
/boot/vmlinuz2611-cko2-ARCH<br />
/boot/System.map2611-cko2-ARCH<br />
/boot/kconfig2611-cko2-ARCH<br />
<br />
/usr/src/linux-2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
* If you have the recommended knowledge of ABS you will see that the PKGBUILD is transparently constructed, self-explanatory and easily customized.<br />
* User input is almost identical to all ABS builds: simply set pkgver, pkgrel and pkgdesc and add additional sources, including patches, to the source array. Patch users should insert the appropriate patch commands where indicated. Aside from uncommenting the config method and choosing whether to make clean or not the rest of the build is automated.<br />
* Having created a custom pkg naming scheme during the build the PKGBUILD automatically corrects/updates itself with the new pkgname variable allowing simple <code>gensync</code> operation.<br />
<br />
=== CAUTION===<br />
# this PKGBUILD is only suited to builds of the 2.6 kernel branch - an effort to make a unified or alternative PKGBUILDS for the 2.4 branch can be found here - [[Kernel compilation with ABS-2.4]]<br />
# this is NOT an ABS howto - to successfully follow this HOWTO a working knowledge of building pkgs with ABS is ESSENTIAL - please read [[ABS - the Arch Build System]], [[The Arch package making HOW-TO - with guidelines]] and [[Patching in ABS Howto]]<br>I don't advise you build a kernel for your first ABS project. If you need guidelines on how to use <code>fakeroot</code> or set up a build directory read the other documents first.<br />
# likewise it helps if you know how to configure a kernel! If this is your first effort building a kernel I strongly recommend you start from the default Arch config, this is detailed further below.<br />
<br />
=== Usage Notes===<br />
<br />
* the ''patch'' variable has been removed. You should now simply specify patch sources in the source array and place the patch commands as indicated. Also see '''Other versions*<br />
<br />
* pkgname must be declared within 10 lines of the top of the PKGBUILD - so '''DO NOT* move it - just leave it.<br>If you miss this simple instruction don't worry, it won't screw up your build but your PKGBUILD file will not have the pkgname automatically updated at the end of the build. This is to allow you to use gensync correctly BUT you can edit the PKGBUILD file manually afterwards of course.<br />
<br />
* until you have your own config that you are happy with it is easiest just to start with the default Arch config; you should also get the Arch kernel26.install file. These are both in your ABS tree, normally under /var/abs/kernels/kernel26. To download the ABS tree to your system simply run <code>abs</code> as root. It doesn't take long, even on dialup. You should keep this updated by running <code>abs</code> as root on a regular basis.<br />
<br />
* To check if EXTRAVERSION is set by your patchset try doing<br />
<br />
cat ./patchname || grep +EXTRAVERSION=<br />
<br />
:and it should return something like this:<br />
<br />
+EXTRAVERSION = -ck3<br />
<br />
:if it doesn't then EXTRAVERSION is '''probably not being set''' by your patchset and you should ensure you use LOCALVERSION to customize the pkgname.<br>Arch default kernels are set with the '<code>-ARCH</code>' LOCALVERSION variable - you can set anything you like e.g. '<code>-custom</code>' (note the need for the preceding dash <code>-</code>)<br>Because of these added variables there is no need to alter the pkgname manually at any point or use any other variables. The build process automatically updates the pkgname variable in the PKGBUILD file at the end of each build to reflect the final full kernel version naming scheme.<br />
<br />
* If used correctly this PKGBUILD '''should''' always provide a unique kernel build based on EXTRAVERSION and LOCALVERSION, and on the pkgver and pkgrel (as normal) - however it is up to the user to '''double check''' resulting pkgnames and contents '''before* installation to prevent overwrites (see below for more details and examples)<br />
<br />
=== Configuring the PKGBUILD===<br />
Copy the PKGBUILD below to your $startdir. The PKGBUILD can also be downloaded from [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel here]. Before building remember the following:<br />
# pkgname can be left as it is it will automatically be set and correct itself<br />
# Insert the <code>pkgver</code> for your kernel (for example: 2.6.9)<br />
# Change the <code>pkgrel</code> for your current revision. You should increment this each time you make changes to the kernel config and want to build a REPLACEMENT pkg. If you don't want to replace the previous build but rather install in parallel you should use LOCALVERSION to create a unique pkg.<br />
# Change/expand the pkgdesc to describe any patches or special config options applied<br />
# Change the source to use a closer mirror, if you are using a patchset add the patches to the source array<br />
# {OPTIONAL} Place the patch commands where indicated<br />
# Choose a make method by leaving your preferred method uncommented-- gconfig (gtk based) xconfig (qt based) menuconfig (ncurses based)<br />
# During the build you will be asked if you want to make clean - the default is yes, reply NO if you know what you are doing.<br />
<br />
<pre><br />
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org><br />
pkgname=kernel26<br />
pkgver=2.6.x.y<br />
pkgrel=1<br />
pkgdesc="The Linux Kernel 2.6.x.y and modules (IDE support)"<br />
url="http://www.kernel.org"<br />
depends=('module-init-tools')<br />
install=kernel26.install<br />
<br />
##### add any patch sources to this section<br />
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )<br />
<br />
# Function to grab var from src<br />
getvar() {<br />
old=$(cat Makefile | grep "^$1")<br />
echo $(echo ${old/"$1 ="/} | sed -e "s/[[ ]]*\(.*\)[[ ]]*/\1/g")<br />
return 0<br />
}<br />
<br />
build() {<br />
cd $startdir/src/linux-$pkgver<br />
<br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
#make oldconfig || return 1<br />
#make menuconfig<br />
#make xconfig<br />
make gconfig<br />
<br />
##### NO USER CHANGES BELOW HERE #####<br />
<br />
# save the current pkgname<br />
old_pkgname=$pkgname<br />
<br />
# set pkgname for build purposes - DO NOT alter!<br />
pkgname=kernel26<br />
<br />
# save the updated config to build with today's date<br />
cp ./.config $startdir/config-$(date +%b%d\-%Hh)<br />
<br />
# get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory<br />
_kernextra=$(getvar "EXTRAVERSION")<br />
# grab the 2.6.x.y version suffix from pkgver<br />
_y="`echo $pkgver | cut --delim "." --fields 4`"<br />
# remove .y version suffix from _kernextra<br />
''kernextra="`echo $''kernextra | sed "s|\.$_y||g"`"<br />
<br />
# Read the full kernel version info from new config to use in pathnames and pkgname<br />
. ./.config<br />
<br />
# Kernel custom - to create a unique pkgname (see below)<br />
''kerncust="${''kernextra}${CONFIG_LOCALVERSION}"<br />
# Kernel release - will be the same as Makefile<br />
''kernrel="${pkgver}${''kerncust}"<br />
# Get the pkgver suffix for unique pkgname and /boot file suffices<br />
_pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|\.||g"`"<br />
# Set /boot file suffices from kernel release and pkgver suffix<br />
''kernboot="${''pkgversuf}${_kerncust}"<br />
<br />
# Set a new pkgname from kernel release and pkgver suffix<br />
pkgname="${pkgname}${''pkgversuf}${''kerncust}"<br />
<br />
# build!<br />
echo<br />
echo -n "Do you want to make clean (default YES)? (YES/NO): "<br />
read choice<br />
echo<br />
echo -n "Press any key to start make or CTRL+C to quit"<br />
read anykey<br />
<br />
if [[ "${choice}" = "NO" ]] ; then<br />
make bzImage modules || return 1<br />
else<br />
make clean bzImage modules || return 1<br />
fi<br />
<br />
mkdir -p $startdir/pkg/{lib/modules,boot}<br />
make INSTALL''MOD''PATH=$startdir/pkg modules_install || return 1<br />
cp System.map $startdir/pkg/boot/System.map26${_kernboot}<br />
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}<br />
install -D -m644 Makefile \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/Makefile<br />
install -D -m644 .config \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/.config<br />
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel<br />
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do<br />
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/<br />
done<br />
# copy files necessary for later builds, like nvidia and vmware<br />
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}<br />
cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}<br />
mkdir -p $startdir/pkg/usr/src/linux-${''kernrel}/.tmp''versions<br />
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/<br />
cp arch/i386/kernel/asm-offsets.s \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/<br />
# copy in Kconfig files<br />
for i in `find . -name "Kconfig*"`; do<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`<br />
cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i<br />
done<br />
cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm<br />
chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}<br />
cd $startdir/pkg/lib/modules/${_kernrel} && \<br />
(rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)<br />
<br />
# Correct the pkgname in our PKGBUILD - this allows correct gensync operation<br />
# NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!<br />
cd $startdir<br />
sed -i "1,11 s|pkgname=$old_pkgname|pkgname=$pkgname|" ./PKGBUILD<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
* install your new pkg as normal<br />
<br />
===Your <code>config</code> file===<br />
PLEASE NOTE during the build the '''final''' kernel config is stored in your $startdir as, for example, <code>config-Apr13-12h</code>. Your '''original''' config remains in the $startdir named <code>config</code>. If you wish to use the new config in another build make sure you copy the correct file!<br />
<br />
===Update Bootloader===<br />
* Remember to edit the [[LiLo]] or [[Grub]] configuration files to include an entry to the new kernel. The new kernel will install alongside any existing stock or custom kernels, so you may wish to keep a reference to your old kernel in the bootloader config file, at least until you know the new one is working. THIS IS STRONGLY RECOMMENDED<br />
<br />
* If you use lilo remember to run <code>lilo</code> to update it.<br />
<br />
===Other versions===<br />
There several variations on this PKGBUILD available, they are all provide identical results but the mechanics are slightly different:<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_patch patch] includes the old patch= variable<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_verbose verbose] provides Package Info (like that shown above) for review before starting the make process<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_buildstats buildstats] similar to verbose but writes more info, including build times, to a file called buildstats, which is stored in the $startdir. This can also be reviewed before starting the make process but also provides a permenant record<br />
<br />
===I want the Arch logo!===<br />
Copy the ''logo_linux_clut224.ppm'' from /var/abs/kernels/kernel26 to your $startdir and add <code>logo_linux_clut224.ppm</code> to the source array. Then you need to paste the marked text (>>) into the PKGBUILD as indicated:<br />
<br />
<pre><br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
>> ##### Arch logo - not compatible with gensplash!<br />
>> cp ../logo_linux_clut224.ppm drivers/video/logo/<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
</pre><br />
<br />
The stock Arch config uses the following logo settings ensure you set them at the config stage or use the stock config<br />
<br />
<pre><br />
#<br />
# Logo configuration<br />
#<br />
CONFIG_LOGO=y<br />
CONFIG_LOGO_LINUX_MONO=y<br />
CONFIG_LOGO_LINUX_VGA16=y<br />
CONFIG_LOGO_LINUX_CLUT224=y<br />
</pre><br />
<br />
=== Customization and Advanced Use normal people can stop here!===<br />
Several people have successfully customized this PKGBUILD to their own needs, while others have derived a completely new approach from it. One customization recommended to people who make multiple builds of the same version for use in parallel is to add a sed command that automatically sets the CONFIG_LOCALVERSION variable in the config to a unique value before the config stage. This can based on the date, your hostname, etc.<br />
For example<br />
<br />
<pre><br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
>> # set LOCALVERSION to -date<br />
>> sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`|g" ./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
</pre><br />
<br />
Or<br />
<br />
<pre><br />
# set LOCALVERSION to -date-hostname<br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`-`hostname`|g" ./.config<br />
</pre><br />
<br />
For a truly unique LOCALVERSION you can set the date to seconds since `00:00:00 1970-01-01 UTC'!<br />
<br />
<pre><br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%s`|g" ./.config<br />
</pre><br />
<br />
=== Problems===<br />
<br />
If you have problems with wrong package names try using the '''verbose''' PKGBUILD in '''Other Versions''' above to see what naming scheme is being created before you commit to the build - you can quit with ctrl+c at most points before the make starts.<br />
<br />
=== Feedback===<br />
If you have any questions/comments/suggestions about the above PKGBUILD feel free to join the discussion at: http://bbs.archlinux.org/viewtopic.php?t=9272<br />
<br />
Some suggestions have already been incorporated but please consider the Keep It Simple philosophy and remember the original goal. Kernel compilation is a very individual process and there are a HUGE variety of ways to go about it this PKGBUILD does not even attempt to account for all eventualities, it would be fruitless to try but of course you are completely free to customize this build to your precise needs best of luck!<br />
<br />
DibbleTheWrecker</div>Paranooshttps://wiki.archlinux.org/index.php?title=Custom_Kernel_Compilation_with_ABS&diff=285Custom Kernel Compilation with ABS2005-07-23T18:41:12Z<p>Paranoos: /* Configuring the PKGBUILD */</p>
<hr />
<div>Due to the addition of LOCALVERSION and EXTRAVERSION variables in the kernel compilation process from 2.6.9 onwards this document has been updated and the previous version has been moved to [[Kernel compilation with ABS (2.6.8 or earlier)]].<br />
<br />
This howto has been updated provide a definitive PKGBUILD for the creation of custom kernel pkgs. It allows you to maintain multiple custom kernels with a unique naming scheme under pacman version control. It is ideal for ANY custom kernel build and can be easily adapted to fit many requirements. The PKGBUILD automatically accounts for the EXTRAVERSION and LOCALVERSION variables that are now fully supported in the kernel. EXTRAVERSION is frequently set by major patchsets such as -ck and -nitro. EXTRAVERSION is also used in the 2.6.x.y branch to carry the .y variable. LOCALVERSION can be set during the config stage and is the easiest and RECOMMENDED way to customize your kernel pkgnames. Simply setting LOCALVERSION to -custom or the date e.g. -20050105 will suffice! A unique LOCALVERSION guarantees a unique pkg.<br />
<br />
=== Philosophy and Logic how it works and why it works this way===<br />
* The Arch Way - Keep It Simple<br />
* This PKGBUILD builds on the previous, widely accepted version<br />
* This build provides kernel packages and components with a simple, logical and uncomplicated naming scheme that ONLY uses variables that are part of the ABS system and part of the kernel compilation process itself. Rationale:<br />
** Stock Arch kernels use the <code>kernel24</code> and <code>kernel26</code> base pkgnames these are logically extended here under the 2.6.x and 2.6.x.y schemes e.g <code>kernel2611</code> and <code>kernel26117</code><br>These also provide the basis of /boot filenames e.g. <code>vmlinux26</code> and <code>vmlinuz26117</code><br />
** The ''kernel compilation process'' uses the kernel version (2.6.x), EXTRAVERSION from the Makefile and CONFIG_LOCALVERSION from the kernel config to create the name for the kernel's module directory, e.g.:<br />
<br />
<pre><br />
2.6.x$EXTRAVERSION$LOCALVERSION<br />
2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
::This is beyond the control of the PKGBUILD so to provide a pkg with similarly named components the PKGBUILD uses the same scheme to create unique /boot files and a unique /usr/src directory by appending -EXTRAVERSION-LOCALVERSION, e.g.:<br />
<br />
<pre><br />
/boot/vmlinuz2611-cko2-ARCH<br />
/boot/System.map2611-cko2-ARCH<br />
/boot/kconfig2611-cko2-ARCH<br />
<br />
/usr/src/linux-2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
* If you have the recommended knowledge of ABS you will see that the PKGBUILD is transparently constructed, self-explanatory and easily customized.<br />
* User input is almost identical to all ABS builds: simply set pkgver, pkgrel and pkgdesc and add additional sources, including patches, to the source array. Patch users should insert the appropriate patch commands where indicated. Aside from uncommenting the config method and choosing whether to make clean or not the rest of the build is automated.<br />
* Having created a custom pkg naming scheme during the build the PKGBUILD automatically corrects/updates itself with the new pkgname variable allowing simple <code>gensync</code> operation.<br />
<br />
=== CAUTION===<br />
# this PKGBUILD is only suited to builds of the 2.6 kernel branch - an effort to make a unified or alternative PKGBUILDS for the 2.4 branch can be found here - [[Kernel compilation with ABS-2.4]]<br />
# this is NOT an ABS howto - to successfully follow this HOWTO a working knowledge of building pkgs with ABS is ESSENTIAL - please read [[ABS - the Arch Build System]], [[The Arch package making HOW-TO - with guidelines]] and [[Patching in ABS Howto]]<br>I don't advise you build a kernel for your first ABS project. If you need guidelines on how to use <code>fakeroot</code> or set up a build directory read the other documents first.<br />
# likewise it helps if you know how to configure a kernel! If this is your first effort building a kernel I strongly recommend you start from the default Arch config, this is detailed further below.<br />
<br />
=== Usage Notes===<br />
<br />
* the ''patch'' variable has been removed. You should now simply specify patch sources in the source array and place the patch commands as indicated. Also see '''Other versions*<br />
<br />
* pkgname must be declared within 10 lines of the top of the PKGBUILD - so '''DO NOT* move it - just leave it.<br>If you miss this simple instruction don't worry, it won't screw up your build but your PKGBUILD file will not have the pkgname automatically updated at the end of the build. This is to allow you to use gensync correctly BUT you can edit the PKGBUILD file manually afterwards of course.<br />
<br />
* until you have your own config that you are happy with it is easiest just to start with the default Arch config; you should also get the Arch kernel26.install file. These are both in your ABS tree, normally under /var/abs/kernels/kernel26. To download the ABS tree to your system simply run <code>abs</code> as root. It doesn't take long, even on dialup. You should keep this updated by running <code>abs</code> as root on a regular basis.<br />
<br />
* To check if EXTRAVERSION is set by your patchset try doing<br />
<br />
cat ./patchname || grep +EXTRAVERSION=<br />
<br />
:and it should return something like this:<br />
<br />
+EXTRAVERSION = -ck3<br />
<br />
:if it doesn't then EXTRAVERSION is '''probably not being set''' by your patchset and you should ensure you use LOCALVERSION to customize the pkgname.<br>Arch default kernels are set with the '<code>-ARCH</code>' LOCALVERSION variable - you can set anything you like e.g. '<code>-custom</code>' (note the need for the preceding dash <code>-</code>)<br>Because of these added variables there is no need to alter the pkgname manually at any point or use any other variables. The build process automatically updates the pkgname variable in the PKGBUILD file at the end of each build to reflect the final full kernel version naming scheme.<br />
<br />
* If used correctly this PKGBUILD '''should''' always provide a unique kernel build based on EXTRAVERSION and LOCALVERSION, and on the pkgver and pkgrel (as normal) - however it is up to the user to '''double check''' resulting pkgnames and contents '''before* installation to prevent overwrites (see below for more details and examples)<br />
<br />
=== Configuring the PKGBUILD===<br />
Copy the PKGBUILD below to your $startdir. The PKGBUILD can also be downloaded from [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel here]. Before building remember the following:<br />
# pkgname can be left as it is it will automatically be set and correct itself<br />
# Insert the <code>pkgver</code> for your kernel (for example: 2.6.9)<br />
# Change the <code>pkgrel</code> for your current revision. You should increment this each time you make changes to the kernel config and want to build a REPLACEMENT pkg. If you don't want to replace the previous build but rather install in parallel you should use LOCALVERSION to create a unique pkg.<br />
# Change/expand the pkgdesc to describe any patches or special config options applied<br />
# Change the source to use a closer mirror, if you are using a patchset add the patches to the source array<br />
# {OPTIONAL} Place the patch commands where indicated<br />
# Choose a make method by leaving your preferred method uncommented-- gconfig (gtk based) xconfig (qt based) menuconfig (ncurses based)<br />
# During the build you will be asked if you want to make clean - the default is yes, reply NO if you know what you are doing.<br />
<br />
<pre><br />
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org><br />
pkgname=kernel26<br />
pkgver=2.6.x.y<br />
pkgrel=1<br />
pkgdesc="The Linux Kernel 2.6.x.y and modules (IDE support)"<br />
url="http://www.kernel.org"<br />
depends=('module-init-tools')<br />
install=kernel26.install<br />
<br />
##### add any patch sources to this section<br />
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )<br />
<br />
# Function to grab var from src<br />
getvar() {<br />
old=$(cat Makefile | grep "^$1")<br />
echo $(echo ${old/"$1 ="/} | sed -e "s/[[ ]]*\(.*\)[[ ]]*/\1/g")<br />
return 0<br />
}<br />
<br />
build() {<br />
cd $startdir/src/linux-$pkgver<br />
<br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname || return 1<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
#make oldconfig || return 1<br />
#make menuconfig<br />
#make xconfig<br />
make gconfig<br />
<br />
##### NO USER CHANGES BELOW HERE #####<br />
<br />
# save the current pkgname<br />
old_pkgname=$pkgname<br />
<br />
# set pkgname for build purposes - DO NOT alter!<br />
pkgname=kernel26<br />
<br />
# save the updated config to build with today's date<br />
cp ./.config $startdir/config-$(date +%b%d\-%Hh)<br />
<br />
# get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory<br />
_kernextra=$(getvar "EXTRAVERSION")<br />
# grab the 2.6.x.y version suffix from pkgver<br />
_y="`echo $pkgver | cut --delim "." --fields 4`"<br />
# remove .y version suffix from _kernextra<br />
''kernextra="`echo $''kernextra | sed "s|\.$_y||g"`"<br />
<br />
# Read the full kernel version info from new config to use in pathnames and pkgname<br />
. ./.config<br />
<br />
# Kernel custom - to create a unique pkgname (see below)<br />
''kerncust="${''kernextra}${CONFIG_LOCALVERSION}"<br />
# Kernel release - will be the same as Makefile<br />
''kernrel="${pkgver}${''kerncust}"<br />
# Get the pkgver suffix for unique pkgname and /boot file suffices<br />
_pkgversuf="`echo $pkgver | sed "s|2.6.||g" | sed "s|\.||g"`"<br />
# Set /boot file suffices from kernel release and pkgver suffix<br />
''kernboot="${''pkgversuf}${_kerncust}"<br />
<br />
# Set a new pkgname from kernel release and pkgver suffix<br />
pkgname="${pkgname}${''pkgversuf}${''kerncust}"<br />
<br />
# build!<br />
echo<br />
echo -n "Do you want to make clean (default YES)? (YES/NO): "<br />
read choice<br />
echo<br />
echo -n "Press any key to start make or CTRL+C to quit"<br />
read anykey<br />
<br />
if [[ "${choice}" = "NO" ]] ; then<br />
make bzImage modules || return 1<br />
else<br />
make clean bzImage modules || return 1<br />
fi<br />
<br />
mkdir -p $startdir/pkg/{lib/modules,boot}<br />
make INSTALL''MOD''PATH=$startdir/pkg modules_install || return 1<br />
cp System.map $startdir/pkg/boot/System.map26${_kernboot}<br />
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}<br />
install -D -m644 Makefile \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/Makefile<br />
install -D -m644 .config \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/.config<br />
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel<br />
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do<br />
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/<br />
done<br />
# copy files necessary for later builds, like nvidia and vmware<br />
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}<br />
cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}<br />
mkdir -p $startdir/pkg/usr/src/linux-${''kernrel}/.tmp''versions<br />
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/<br />
cp arch/i386/kernel/asm-offsets.s \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/<br />
# copy in Kconfig files<br />
for i in `find . -name "Kconfig*"`; do<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i | sed 's|/Kconfig.*||'`<br />
cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i<br />
done<br />
cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm<br />
chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}<br />
cd $startdir/pkg/lib/modules/${_kernrel} && \<br />
(rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)<br />
<br />
# Correct the pkgname in our PKGBUILD - this allows correct gensync operation<br />
# NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!<br />
cd $startdir<br />
sed -i "1,11 s|pkgname=$old_pkgname|pkgname=$pkgname|" ./PKGBUILD<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
* install your new pkg as normal<br />
<br />
===Your <code>config</code> file===<br />
PLEASE NOTE during the build the '''final''' kernel config is stored in your $startdir as, for example, <code>config-Apr13-12h</code>. Your '''original''' config remains in the $startdir named <code>config</code>. If you wish to use the new config in another build make sure you copy the correct file!<br />
<br />
===Update Bootloader===<br />
* Remember to edit the [[LiLo]] or [[Grub]] configuration files to include an entry to the new kernel. The new kernel will install alongside any existing stock or custom kernels, so you may wish to keep a reference to your old kernel in the bootloader config file, at least until you know the new one is working. THIS IS STRONGLY RECOMMENDED<br />
<br />
* If you use lilo remember to run <code>lilo</code> to update it.<br />
<br />
===Other versions===<br />
There several variations on this PKGBUILD available, they are all provide identical results but the mechanics are slightly different:<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_patch patch] includes the old patch= variable<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_verbose verbose] provides Package Info (like that shown above) for review before starting the make process<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_buildstats buildstats] similar to verbose but writes more info, including build times, to a file called buildstats, which is stored in the $startdir. This can also be reviewed before starting the make process but also provides a permenant record<br />
<br />
===I want the Arch logo!===<br />
Copy the ''logo_linux_clut224.ppm'' from /var/abs/kernels/kernel26 to your $startdir and add <code>logo_linux_clut224.ppm</code> to the source array. Then you need to paste the marked text (>>) into the PKGBUILD as indicated:<br />
<br />
<pre><br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname ||| return 1<br />
<br />
>> ##### Arch logo - not compatible with gensplash!<br />
>> cp ../logo''linux''clut224.ppm drivers/video/logo/<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH || sed 's||i|||'`<br />
cat ../config || sed \"s||#CARCH#||$carch||g\" >./.config<br />
</pre><br />
<br />
The stock Arch config uses the following logo settings ensure you set them at the config stage or use the stock config<br />
<br />
<pre><br />
#<br />
# Logo configuration<br />
#<br />
CONFIG_LOGO=y<br />
CONFIG_LOGO_LINUX_MONO=y<br />
CONFIG_LOGO_LINUX_VGA16=y<br />
CONFIG_LOGO_LINUX_CLUT224=y<br />
</pre><br />
<br />
=== Customization and Advanced Use normal people can stop here!===<br />
Several people have successfully customized this PKGBUILD to their own needs, while others have derived a completely new approach from it. One customization recommended to people who make multiple builds of the same version for use in parallel is to add a sed command that automatically sets the CONFIG_LOCALVERSION variable in the config to a unique value before the config stage. This can based on the date, your hostname, etc.<br />
For example<br />
<br />
<pre><br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
>> # set LOCALVERSION to -date<br />
>> sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`|g" ./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
</pre><br />
<br />
Or<br />
<br />
<pre><br />
# set LOCALVERSION to -date-hostname<br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`-`hostname`|g" ./.config<br />
</pre><br />
<br />
For a truly unique LOCALVERSION you can set the date to seconds since `00:00:00 1970-01-01 UTC'!<br />
<br />
<pre><br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%s`|g" ./.config<br />
</pre><br />
<br />
=== Problems===<br />
<br />
If you have problems with wrong package names try using the '''verbose''' PKGBUILD in '''Other Versions''' above to see what naming scheme is being created before you commit to the build - you can quit with ctrl+c at most points before the make starts.<br />
<br />
=== Feedback===<br />
If you have any questions/comments/suggestions about the above PKGBUILD feel free to join the discussion at: http://bbs.archlinux.org/viewtopic.php?t=9272<br />
<br />
Some suggestions have already been incorporated but please consider the Keep It Simple philosophy and remember the original goal. Kernel compilation is a very individual process and there are a HUGE variety of ways to go about it this PKGBUILD does not even attempt to account for all eventualities, it would be fruitless to try but of course you are completely free to customize this build to your precise needs best of luck!<br />
<br />
DibbleTheWrecker</div>Paranooshttps://wiki.archlinux.org/index.php?title=Custom_Kernel_Compilation_with_ABS&diff=283Custom Kernel Compilation with ABS2005-07-23T18:40:11Z<p>Paranoos: /* Final Checks */</p>
<hr />
<div>Due to the addition of LOCALVERSION and EXTRAVERSION variables in the kernel compilation process from 2.6.9 onwards this document has been updated and the previous version has been moved to [[Kernel compilation with ABS (2.6.8 or earlier)]].<br />
<br />
This howto has been updated provide a definitive PKGBUILD for the creation of custom kernel pkgs. It allows you to maintain multiple custom kernels with a unique naming scheme under pacman version control. It is ideal for ANY custom kernel build and can be easily adapted to fit many requirements. The PKGBUILD automatically accounts for the EXTRAVERSION and LOCALVERSION variables that are now fully supported in the kernel. EXTRAVERSION is frequently set by major patchsets such as -ck and -nitro. EXTRAVERSION is also used in the 2.6.x.y branch to carry the .y variable. LOCALVERSION can be set during the config stage and is the easiest and RECOMMENDED way to customize your kernel pkgnames. Simply setting LOCALVERSION to -custom or the date e.g. -20050105 will suffice! A unique LOCALVERSION guarantees a unique pkg.<br />
<br />
=== Philosophy and Logic how it works and why it works this way===<br />
* The Arch Way - Keep It Simple<br />
* This PKGBUILD builds on the previous, widely accepted version<br />
* This build provides kernel packages and components with a simple, logical and uncomplicated naming scheme that ONLY uses variables that are part of the ABS system and part of the kernel compilation process itself. Rationale:<br />
** Stock Arch kernels use the <code>kernel24</code> and <code>kernel26</code> base pkgnames these are logically extended here under the 2.6.x and 2.6.x.y schemes e.g <code>kernel2611</code> and <code>kernel26117</code><br>These also provide the basis of /boot filenames e.g. <code>vmlinux26</code> and <code>vmlinuz26117</code><br />
** The ''kernel compilation process'' uses the kernel version (2.6.x), EXTRAVERSION from the Makefile and CONFIG_LOCALVERSION from the kernel config to create the name for the kernel's module directory, e.g.:<br />
<br />
<pre><br />
2.6.x$EXTRAVERSION$LOCALVERSION<br />
2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
::This is beyond the control of the PKGBUILD so to provide a pkg with similarly named components the PKGBUILD uses the same scheme to create unique /boot files and a unique /usr/src directory by appending -EXTRAVERSION-LOCALVERSION, e.g.:<br />
<br />
<pre><br />
/boot/vmlinuz2611-cko2-ARCH<br />
/boot/System.map2611-cko2-ARCH<br />
/boot/kconfig2611-cko2-ARCH<br />
<br />
/usr/src/linux-2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
* If you have the recommended knowledge of ABS you will see that the PKGBUILD is transparently constructed, self-explanatory and easily customized.<br />
* User input is almost identical to all ABS builds: simply set pkgver, pkgrel and pkgdesc and add additional sources, including patches, to the source array. Patch users should insert the appropriate patch commands where indicated. Aside from uncommenting the config method and choosing whether to make clean or not the rest of the build is automated.<br />
* Having created a custom pkg naming scheme during the build the PKGBUILD automatically corrects/updates itself with the new pkgname variable allowing simple <code>gensync</code> operation.<br />
<br />
=== CAUTION===<br />
# this PKGBUILD is only suited to builds of the 2.6 kernel branch - an effort to make a unified or alternative PKGBUILDS for the 2.4 branch can be found here - [[Kernel compilation with ABS-2.4]]<br />
# this is NOT an ABS howto - to successfully follow this HOWTO a working knowledge of building pkgs with ABS is ESSENTIAL - please read [[ABS - the Arch Build System]], [[The Arch package making HOW-TO - with guidelines]] and [[Patching in ABS Howto]]<br>I don't advise you build a kernel for your first ABS project. If you need guidelines on how to use <code>fakeroot</code> or set up a build directory read the other documents first.<br />
# likewise it helps if you know how to configure a kernel! If this is your first effort building a kernel I strongly recommend you start from the default Arch config, this is detailed further below.<br />
<br />
=== Usage Notes===<br />
<br />
* the ''patch'' variable has been removed. You should now simply specify patch sources in the source array and place the patch commands as indicated. Also see '''Other versions*<br />
<br />
* pkgname must be declared within 10 lines of the top of the PKGBUILD - so '''DO NOT* move it - just leave it.<br>If you miss this simple instruction don't worry, it won't screw up your build but your PKGBUILD file will not have the pkgname automatically updated at the end of the build. This is to allow you to use gensync correctly BUT you can edit the PKGBUILD file manually afterwards of course.<br />
<br />
* until you have your own config that you are happy with it is easiest just to start with the default Arch config; you should also get the Arch kernel26.install file. These are both in your ABS tree, normally under /var/abs/kernels/kernel26. To download the ABS tree to your system simply run <code>abs</code> as root. It doesn't take long, even on dialup. You should keep this updated by running <code>abs</code> as root on a regular basis.<br />
<br />
* To check if EXTRAVERSION is set by your patchset try doing<br />
<br />
cat ./patchname || grep +EXTRAVERSION=<br />
<br />
:and it should return something like this:<br />
<br />
+EXTRAVERSION = -ck3<br />
<br />
:if it doesn't then EXTRAVERSION is '''probably not being set''' by your patchset and you should ensure you use LOCALVERSION to customize the pkgname.<br>Arch default kernels are set with the '<code>-ARCH</code>' LOCALVERSION variable - you can set anything you like e.g. '<code>-custom</code>' (note the need for the preceding dash <code>-</code>)<br>Because of these added variables there is no need to alter the pkgname manually at any point or use any other variables. The build process automatically updates the pkgname variable in the PKGBUILD file at the end of each build to reflect the final full kernel version naming scheme.<br />
<br />
* If used correctly this PKGBUILD '''should''' always provide a unique kernel build based on EXTRAVERSION and LOCALVERSION, and on the pkgver and pkgrel (as normal) - however it is up to the user to '''double check''' resulting pkgnames and contents '''before* installation to prevent overwrites (see below for more details and examples)<br />
<br />
=== Configuring the PKGBUILD===<br />
Copy the PKGBUILD below to your $startdir. The PKGBUILD can also be downloaded from [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel here]. Before building remember the following:<br />
# pkgname can be left as it is it will automatically be set and correct itself<br />
# Insert the <code>pkgver</code> for your kernel (for example: 2.6.9)<br />
# Change the <code>pkgrel</code> for your current revision. You should increment this each time you make changes to the kernel config and want to build a REPLACEMENT pkg. If you don't want to replace the previous build but rather install in parallel you should use LOCALVERSION to create a unique pkg.<br />
# Change/expand the pkgdesc to describe any patches or special config options applied<br />
# Change the source to use a closer mirror, if you are using a patchset add the patches to the source array<br />
# {OPTIONAL} Place the patch commands where indicated<br />
# Choose a make method by leaving your preferred method uncommented-- gconfig (gtk based) xconfig (qt based) menuconfig (ncurses based)<br />
# During the build you will be asked if you want to make clean - the default is yes, reply NO if you know what you are doing.<br />
<br />
<pre><br />
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org><br />
pkgname=kernel26<br />
pkgver=2.6.x.y<br />
pkgrel=1<br />
pkgdesc=\"The Linux Kernel 2.6.x.y and modules (IDE support)\"<br />
url=\"http://www.kernel.org\"<br />
depends=('module-init-tools')<br />
install=kernel26.install<br />
<br />
##### add any patch sources to this section<br />
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )<br />
<br />
# Function to grab var from src<br />
getvar() {<br />
old=$(cat Makefile || grep \"^$1\")<br />
echo $(echo ${old/\"$1 =\"/} || sed -e \"s/[[ ]]*\(.*\)[[ ]]*/\1/g\")<br />
return 0<br />
}<br />
<br />
build() {<br />
cd $startdir/src/linux-$pkgver<br />
<br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname ||| return 1<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH || sed 's||i|||'`<br />
cat ../config || sed \"s||#CARCH#||$carch||g\" >./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes \"\" || make config<br />
#make oldconfig ||| return 1<br />
#make menuconfig<br />
#make xconfig<br />
make gconfig<br />
<br />
##### NO USER CHANGES BELOW HERE #####<br />
<br />
# save the current pkgname<br />
old_pkgname=$pkgname<br />
<br />
# set pkgname for build purposes - DO NOT alter!<br />
pkgname=kernel26<br />
<br />
# save the updated config to build with today's date<br />
cp ./.config $startdir/config-$(date +%b%d\-%Hh)<br />
<br />
# get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory<br />
_kernextra=$(getvar \"EXTRAVERSION\")<br />
# grab the 2.6.x.y version suffix from pkgver<br />
_y=\"`echo $pkgver || cut --delim \".\" --fields 4`\"<br />
# remove .y version suffix from _kernextra<br />
''kernextra=\"`echo $''kernextra || sed \"s||\.$_y|||g\"`\"<br />
<br />
# Read the full kernel version info from new config to use in pathnames and pkgname<br />
. ./.config<br />
<br />
# Kernel custom - to create a unique pkgname (see below)<br />
''kerncust=\"${''kernextra}${CONFIG_LOCALVERSION}\"<br />
# Kernel release - will be the same as Makefile<br />
''kernrel=\"${pkgver}${''kerncust}\"<br />
# Get the pkgver suffix for unique pkgname and /boot file suffices<br />
_pkgversuf=\"`echo $pkgver || sed \"s||2.6.|||g\" || sed \"s||\.|||g\"`\"<br />
# Set /boot file suffices from kernel release and pkgver suffix<br />
''kernboot=\"${''pkgversuf}${_kerncust}\"<br />
<br />
# Set a new pkgname from kernel release and pkgver suffix<br />
pkgname=\"${pkgname}${''pkgversuf}${''kerncust}\"<br />
<br />
# build!<br />
echo<br />
echo -n \"Do you want to make clean (default YES)? (YES/NO): \"<br />
read choice<br />
echo<br />
echo -n \"Press any key to start make or CTRL+C to quit\"<br />
read anykey<br />
<br />
if [[ \"${choice}\" = \"NO\" ]] ; then<br />
make bzImage modules ||| return 1<br />
else<br />
make clean bzImage modules ||| return 1<br />
fi<br />
<br />
mkdir -p $startdir/pkg/{lib/modules,boot}<br />
make INSTALL''MOD''PATH=$startdir/pkg modules_install ||| return 1<br />
cp System.map $startdir/pkg/boot/System.map26${_kernboot}<br />
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}<br />
install -D -m644 Makefile \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/Makefile<br />
install -D -m644 .config \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/.config<br />
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel<br />
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do<br />
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/<br />
done<br />
# copy files necessary for later builds, like nvidia and vmware<br />
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}<br />
cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}<br />
mkdir -p $startdir/pkg/usr/src/linux-${''kernrel}/.tmp''versions<br />
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/<br />
cp arch/i386/kernel/asm-offsets.s \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/<br />
# copy in Kconfig files<br />
for i in `find . -name \"Kconfig*\"`; do<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i || sed 's||/Kconfig.*|||'`<br />
cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i<br />
done<br />
cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm<br />
chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}<br />
cd $startdir/pkg/lib/modules/${_kernrel} && \<br />
(rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)<br />
<br />
# Correct the pkgname in our PKGBUILD - this allows correct gensync operation<br />
# NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!<br />
cd $startdir<br />
sed -i \"1,11 s||pkgname<code>$old_pkgname||pkgname</code>$pkgname||\" ./PKGBUILD<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
====makepkg====<br />
* Now run <code>makepkg -g >>PKGBUILD</code> as <code>root</code> or under <code>fakeroot</code> - this will append the md5sums to the end of the PKGBUILD - remember they are there!<br />
<br />
* Run <code>makepkg</code> to start the build<br />
<br />
* If you are using a patchset and your build fails '''before* the config stage retrace the build output and check for patching errors i.e. Failed hunks. If you do have failed hunks check that you are using the correct patch version for you kernel version and check that you are using FRESH source i.e. it hasn't already been patched in a previously completed/failed build<br />
<br />
====config====<br />
* you should quickly see your chosen config screen, which might be qt, gtk, or ncurses based, depending on which option you chose. If you included a config file in the source array then this will be used as the basis of your config - when I first start building a new kernel version or patchset I use the default arch config to start from (which can be found in ABS - see above).<br />
<br />
* During the config stage remember to set the LOCALVERSION variable, if you want to use it, and '''REMEMBER''' - if you ''do'' use the default arch config then LOCALVERSION is already set to -ARCH, you need to change this if you want to avoid having a kernel with an identical name to the stock kernel! You have been warned!<br />
<br />
* save your config when you are done and quit the configurator - your config will now be used in your build and also copied to your build dir with the date and hour appended<br />
<br />
====Final Checks====<br />
* after the build completes successfully check that the files in $startdir/pkg/boot and the dir in $startdir/pkg/lib/modules and $startdir/usr/src have the expected names<br />
<br />
:As already mentioned the PKGBUILD will automatically be updated with a new pkgname - this has been done to allow you to include these packages when using <code>gensync</code> to build a local repo - the reasons for this can be found here http://bbs.archlinux.org/viewtopic.php?t=8852<br />
<br />
:you should have results like this:<br />
<pre><br />
Package Info<br />
Package name: kernel2611-cko2<br />
Package ver: 2.6.11<br />
Package desc: The Linux Kernel 2.6.10 and modules (IDE support), built with -cko2 patchset<br />
<br />
Kernel EXTRAVERSION: -cko2<br />
Kernel LOCALVERSION:<br />
Kernel RELEASE: 2.6.11-cko2<br />
<br />
Custom filenames and paths<br />
/boot/System.map2611-cko2<br />
/boot/kconfig2611-cko2<br />
/boot/vmlinuz2611-cko2<br />
/usr/src/linux-2.6.11-cko2/<br />
/lib/modules/2.6.11-cko2/<br />
<br />
Package Info<br />
Package name: kernel2611-ck2-ARCH<br />
Package ver: 2.6.11<br />
Package desc: The Linux Kernel 2.6.11 and modules (IDE support), built with -ck2 patchset<br />
<br />
Kernel EXTRAVERSION: -ck2<br />
Kernel LOCALVERSION: -ARCH<br />
Kernel RELEASE: 2.6.11-ck2-ARCH<br />
<br />
Custom filenames and paths<br />
/boot/kconfig2611-ck2-ARCH<br />
/boot/System.map2611-ck2-ARCH<br />
/boot/vmlinuz2611-ck2-ARCH<br />
/usr/src/linux-2.6.11-ck2-ARCH<br />
/lib/modules/2.6.11-ck2-ARCH/<br />
</pre><br />
<br />
* install your new pkg as normal<br />
<br />
===Your <code>config</code> file===<br />
PLEASE NOTE during the build the '''final''' kernel config is stored in your $startdir as, for example, <code>config-Apr13-12h</code>. Your '''original''' config remains in the $startdir named <code>config</code>. If you wish to use the new config in another build make sure you copy the correct file!<br />
<br />
===Update Bootloader===<br />
* Remember to edit the [[LiLo]] or [[Grub]] configuration files to include an entry to the new kernel. The new kernel will install alongside any existing stock or custom kernels, so you may wish to keep a reference to your old kernel in the bootloader config file, at least until you know the new one is working. THIS IS STRONGLY RECOMMENDED<br />
<br />
* If you use lilo remember to run <code>lilo</code> to update it.<br />
<br />
===Other versions===<br />
There several variations on this PKGBUILD available, they are all provide identical results but the mechanics are slightly different:<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_patch patch] includes the old patch= variable<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_verbose verbose] provides Package Info (like that shown above) for review before starting the make process<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_buildstats buildstats] similar to verbose but writes more info, including build times, to a file called buildstats, which is stored in the $startdir. This can also be reviewed before starting the make process but also provides a permenant record<br />
<br />
===I want the Arch logo!===<br />
Copy the ''logo_linux_clut224.ppm'' from /var/abs/kernels/kernel26 to your $startdir and add <code>logo_linux_clut224.ppm</code> to the source array. Then you need to paste the marked text (>>) into the PKGBUILD as indicated:<br />
<br />
<pre><br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname ||| return 1<br />
<br />
>> ##### Arch logo - not compatible with gensplash!<br />
>> cp ../logo''linux''clut224.ppm drivers/video/logo/<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH || sed 's||i|||'`<br />
cat ../config || sed \"s||#CARCH#||$carch||g\" >./.config<br />
</pre><br />
<br />
The stock Arch config uses the following logo settings ensure you set them at the config stage or use the stock config<br />
<br />
<pre><br />
#<br />
# Logo configuration<br />
#<br />
CONFIG_LOGO=y<br />
CONFIG_LOGO_LINUX_MONO=y<br />
CONFIG_LOGO_LINUX_VGA16=y<br />
CONFIG_LOGO_LINUX_CLUT224=y<br />
</pre><br />
<br />
=== Customization and Advanced Use normal people can stop here!===<br />
Several people have successfully customized this PKGBUILD to their own needs, while others have derived a completely new approach from it. One customization recommended to people who make multiple builds of the same version for use in parallel is to add a sed command that automatically sets the CONFIG_LOCALVERSION variable in the config to a unique value before the config stage. This can based on the date, your hostname, etc.<br />
For example<br />
<br />
<pre><br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
>> # set LOCALVERSION to -date<br />
>> sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`|g" ./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
</pre><br />
<br />
Or<br />
<br />
<pre><br />
# set LOCALVERSION to -date-hostname<br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`-`hostname`|g" ./.config<br />
</pre><br />
<br />
For a truly unique LOCALVERSION you can set the date to seconds since `00:00:00 1970-01-01 UTC'!<br />
<br />
<pre><br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%s`|g" ./.config<br />
</pre><br />
<br />
=== Problems===<br />
<br />
If you have problems with wrong package names try using the '''verbose''' PKGBUILD in '''Other Versions''' above to see what naming scheme is being created before you commit to the build - you can quit with ctrl+c at most points before the make starts.<br />
<br />
=== Feedback===<br />
If you have any questions/comments/suggestions about the above PKGBUILD feel free to join the discussion at: http://bbs.archlinux.org/viewtopic.php?t=9272<br />
<br />
Some suggestions have already been incorporated but please consider the Keep It Simple philosophy and remember the original goal. Kernel compilation is a very individual process and there are a HUGE variety of ways to go about it this PKGBUILD does not even attempt to account for all eventualities, it would be fruitless to try but of course you are completely free to customize this build to your precise needs best of luck!<br />
<br />
DibbleTheWrecker</div>Paranooshttps://wiki.archlinux.org/index.php?title=Custom_Kernel_Compilation_with_ABS&diff=280Custom Kernel Compilation with ABS2005-07-23T18:33:12Z<p>Paranoos: </p>
<hr />
<div>Due to the addition of LOCALVERSION and EXTRAVERSION variables in the kernel compilation process from 2.6.9 onwards this document has been updated and the previous version has been moved to [[Kernel compilation with ABS (2.6.8 or earlier)]].<br />
<br />
This howto has been updated provide a definitive PKGBUILD for the creation of custom kernel pkgs. It allows you to maintain multiple custom kernels with a unique naming scheme under pacman version control. It is ideal for ANY custom kernel build and can be easily adapted to fit many requirements. The PKGBUILD automatically accounts for the EXTRAVERSION and LOCALVERSION variables that are now fully supported in the kernel. EXTRAVERSION is frequently set by major patchsets such as -ck and -nitro. EXTRAVERSION is also used in the 2.6.x.y branch to carry the .y variable. LOCALVERSION can be set during the config stage and is the easiest and RECOMMENDED way to customize your kernel pkgnames. Simply setting LOCALVERSION to -custom or the date e.g. -20050105 will suffice! A unique LOCALVERSION guarantees a unique pkg.<br />
<br />
=== Philosophy and Logic how it works and why it works this way===<br />
* The Arch Way - Keep It Simple<br />
* This PKGBUILD builds on the previous, widely accepted version<br />
* This build provides kernel packages and components with a simple, logical and uncomplicated naming scheme that ONLY uses variables that are part of the ABS system and part of the kernel compilation process itself. Rationale:<br />
** Stock Arch kernels use the <code>kernel24</code> and <code>kernel26</code> base pkgnames these are logically extended here under the 2.6.x and 2.6.x.y schemes e.g <code>kernel2611</code> and <code>kernel26117</code><br>These also provide the basis of /boot filenames e.g. <code>vmlinux26</code> and <code>vmlinuz26117</code><br />
** The ''kernel compilation process'' uses the kernel version (2.6.x), EXTRAVERSION from the Makefile and CONFIG_LOCALVERSION from the kernel config to create the name for the kernel's module directory, e.g.:<br />
<br />
<pre><br />
2.6.x$EXTRAVERSION$LOCALVERSION<br />
2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
::This is beyond the control of the PKGBUILD so to provide a pkg with similarly named components the PKGBUILD uses the same scheme to create unique /boot files and a unique /usr/src directory by appending -EXTRAVERSION-LOCALVERSION, e.g.:<br />
<br />
<pre><br />
/boot/vmlinuz2611-cko2-ARCH<br />
/boot/System.map2611-cko2-ARCH<br />
/boot/kconfig2611-cko2-ARCH<br />
<br />
/usr/src/linux-2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
* If you have the recommended knowledge of ABS you will see that the PKGBUILD is transparently constructed, self-explanatory and easily customized.<br />
* User input is almost identical to all ABS builds: simply set pkgver, pkgrel and pkgdesc and add additional sources, including patches, to the source array. Patch users should insert the appropriate patch commands where indicated. Aside from uncommenting the config method and choosing whether to make clean or not the rest of the build is automated.<br />
* Having created a custom pkg naming scheme during the build the PKGBUILD automatically corrects/updates itself with the new pkgname variable allowing simple <code>gensync</code> operation.<br />
<br />
=== CAUTION===<br />
# this PKGBUILD is only suited to builds of the 2.6 kernel branch - an effort to make a unified or alternative PKGBUILDS for the 2.4 branch can be found here - [[Kernel compilation with ABS-2.4]]<br />
# this is NOT an ABS howto - to successfully follow this HOWTO a working knowledge of building pkgs with ABS is ESSENTIAL - please read [[ABS - the Arch Build System]], [[The Arch package making HOW-TO - with guidelines]] and [[Patching in ABS Howto]]<br>I don't advise you build a kernel for your first ABS project. If you need guidelines on how to use <code>fakeroot</code> or set up a build directory read the other documents first.<br />
# likewise it helps if you know how to configure a kernel! If this is your first effort building a kernel I strongly recommend you start from the default Arch config, this is detailed further below.<br />
<br />
=== Usage Notes===<br />
<br />
* the ''patch'' variable has been removed. You should now simply specify patch sources in the source array and place the patch commands as indicated. Also see '''Other versions*<br />
<br />
* pkgname must be declared within 10 lines of the top of the PKGBUILD - so '''DO NOT* move it - just leave it.<br>If you miss this simple instruction don't worry, it won't screw up your build but your PKGBUILD file will not have the pkgname automatically updated at the end of the build. This is to allow you to use gensync correctly BUT you can edit the PKGBUILD file manually afterwards of course.<br />
<br />
* until you have your own config that you are happy with it is easiest just to start with the default Arch config; you should also get the Arch kernel26.install file. These are both in your ABS tree, normally under /var/abs/kernels/kernel26. To download the ABS tree to your system simply run <code>abs</code> as root. It doesn't take long, even on dialup. You should keep this updated by running <code>abs</code> as root on a regular basis.<br />
<br />
* To check if EXTRAVERSION is set by your patchset try doing<br />
<br />
cat ./patchname || grep +EXTRAVERSION=<br />
<br />
:and it should return something like this:<br />
<br />
+EXTRAVERSION = -ck3<br />
<br />
:if it doesn't then EXTRAVERSION is '''probably not being set''' by your patchset and you should ensure you use LOCALVERSION to customize the pkgname.<br>Arch default kernels are set with the '<code>-ARCH</code>' LOCALVERSION variable - you can set anything you like e.g. '<code>-custom</code>' (note the need for the preceding dash <code>-</code>)<br>Because of these added variables there is no need to alter the pkgname manually at any point or use any other variables. The build process automatically updates the pkgname variable in the PKGBUILD file at the end of each build to reflect the final full kernel version naming scheme.<br />
<br />
* If used correctly this PKGBUILD '''should''' always provide a unique kernel build based on EXTRAVERSION and LOCALVERSION, and on the pkgver and pkgrel (as normal) - however it is up to the user to '''double check''' resulting pkgnames and contents '''before* installation to prevent overwrites (see below for more details and examples)<br />
<br />
=== Configuring the PKGBUILD===<br />
Copy the PKGBUILD below to your $startdir. The PKGBUILD can also be downloaded from [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel here]. Before building remember the following:<br />
# pkgname can be left as it is it will automatically be set and correct itself<br />
# Insert the <code>pkgver</code> for your kernel (for example: 2.6.9)<br />
# Change the <code>pkgrel</code> for your current revision. You should increment this each time you make changes to the kernel config and want to build a REPLACEMENT pkg. If you don't want to replace the previous build but rather install in parallel you should use LOCALVERSION to create a unique pkg.<br />
# Change/expand the pkgdesc to describe any patches or special config options applied<br />
# Change the source to use a closer mirror, if you are using a patchset add the patches to the source array<br />
# {OPTIONAL} Place the patch commands where indicated<br />
# Choose a make method by leaving your preferred method uncommented-- gconfig (gtk based) xconfig (qt based) menuconfig (ncurses based)<br />
# During the build you will be asked if you want to make clean - the default is yes, reply NO if you know what you are doing.<br />
<br />
<pre><br />
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org><br />
pkgname=kernel26<br />
pkgver=2.6.x.y<br />
pkgrel=1<br />
pkgdesc=\"The Linux Kernel 2.6.x.y and modules (IDE support)\"<br />
url=\"http://www.kernel.org\"<br />
depends=('module-init-tools')<br />
install=kernel26.install<br />
<br />
##### add any patch sources to this section<br />
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )<br />
<br />
# Function to grab var from src<br />
getvar() {<br />
old=$(cat Makefile || grep \"^$1\")<br />
echo $(echo ${old/\"$1 =\"/} || sed -e \"s/[[ ]]*\(.*\)[[ ]]*/\1/g\")<br />
return 0<br />
}<br />
<br />
build() {<br />
cd $startdir/src/linux-$pkgver<br />
<br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname ||| return 1<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH || sed 's||i|||'`<br />
cat ../config || sed \"s||#CARCH#||$carch||g\" >./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes \"\" || make config<br />
#make oldconfig ||| return 1<br />
#make menuconfig<br />
#make xconfig<br />
make gconfig<br />
<br />
##### NO USER CHANGES BELOW HERE #####<br />
<br />
# save the current pkgname<br />
old_pkgname=$pkgname<br />
<br />
# set pkgname for build purposes - DO NOT alter!<br />
pkgname=kernel26<br />
<br />
# save the updated config to build with today's date<br />
cp ./.config $startdir/config-$(date +%b%d\-%Hh)<br />
<br />
# get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory<br />
_kernextra=$(getvar \"EXTRAVERSION\")<br />
# grab the 2.6.x.y version suffix from pkgver<br />
_y=\"`echo $pkgver || cut --delim \".\" --fields 4`\"<br />
# remove .y version suffix from _kernextra<br />
''kernextra=\"`echo $''kernextra || sed \"s||\.$_y|||g\"`\"<br />
<br />
# Read the full kernel version info from new config to use in pathnames and pkgname<br />
. ./.config<br />
<br />
# Kernel custom - to create a unique pkgname (see below)<br />
''kerncust=\"${''kernextra}${CONFIG_LOCALVERSION}\"<br />
# Kernel release - will be the same as Makefile<br />
''kernrel=\"${pkgver}${''kerncust}\"<br />
# Get the pkgver suffix for unique pkgname and /boot file suffices<br />
_pkgversuf=\"`echo $pkgver || sed \"s||2.6.|||g\" || sed \"s||\.|||g\"`\"<br />
# Set /boot file suffices from kernel release and pkgver suffix<br />
''kernboot=\"${''pkgversuf}${_kerncust}\"<br />
<br />
# Set a new pkgname from kernel release and pkgver suffix<br />
pkgname=\"${pkgname}${''pkgversuf}${''kerncust}\"<br />
<br />
# build!<br />
echo<br />
echo -n \"Do you want to make clean (default YES)? (YES/NO): \"<br />
read choice<br />
echo<br />
echo -n \"Press any key to start make or CTRL+C to quit\"<br />
read anykey<br />
<br />
if [[ \"${choice}\" = \"NO\" ]] ; then<br />
make bzImage modules ||| return 1<br />
else<br />
make clean bzImage modules ||| return 1<br />
fi<br />
<br />
mkdir -p $startdir/pkg/{lib/modules,boot}<br />
make INSTALL''MOD''PATH=$startdir/pkg modules_install ||| return 1<br />
cp System.map $startdir/pkg/boot/System.map26${_kernboot}<br />
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}<br />
install -D -m644 Makefile \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/Makefile<br />
install -D -m644 .config \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/.config<br />
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel<br />
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do<br />
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/<br />
done<br />
# copy files necessary for later builds, like nvidia and vmware<br />
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}<br />
cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}<br />
mkdir -p $startdir/pkg/usr/src/linux-${''kernrel}/.tmp''versions<br />
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/<br />
cp arch/i386/kernel/asm-offsets.s \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/<br />
# copy in Kconfig files<br />
for i in `find . -name \"Kconfig*\"`; do<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i || sed 's||/Kconfig.*|||'`<br />
cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i<br />
done<br />
cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm<br />
chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}<br />
cd $startdir/pkg/lib/modules/${_kernrel} && \<br />
(rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)<br />
<br />
# Correct the pkgname in our PKGBUILD - this allows correct gensync operation<br />
# NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!<br />
cd $startdir<br />
sed -i \"1,11 s||pkgname<code>$old_pkgname||pkgname</code>$pkgname||\" ./PKGBUILD<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
====makepkg====<br />
* Now run <code>makepkg -g >>PKGBUILD</code> as <code>root</code> or under <code>fakeroot</code> - this will append the md5sums to the end of the PKGBUILD - remember they are there!<br />
<br />
* Run <code>makepkg</code> to start the build<br />
<br />
* If you are using a patchset and your build fails '''before* the config stage retrace the build output and check for patching errors i.e. Failed hunks. If you do have failed hunks check that you are using the correct patch version for you kernel version and check that you are using FRESH source i.e. it hasn't already been patched in a previously completed/failed build<br />
<br />
====config====<br />
* you should quickly see your chosen config screen, which might be qt, gtk, or ncurses based, depending on which option you chose. If you included a config file in the source array then this will be used as the basis of your config - when I first start building a new kernel version or patchset I use the default arch config to start from (which can be found in ABS - see above).<br />
<br />
* During the config stage remember to set the LOCALVERSION variable, if you want to use it, and '''REMEMBER''' - if you ''do'' use the default arch config then LOCALVERSION is already set to -ARCH, you need to change this if you want to avoid having a kernel with an identical name to the stock kernel! You have been warned!<br />
<br />
* save your config when you are done and quit the configurator - your config will now be used in your build and also copied to your build dir with the date and hour appended<br />
<br />
====Final Checks====<br />
* after the build completes successfully check that the files in $startdir/pkg/boot and the dir in $startdir/pkg/lib/modules and $startdir/usr/src have the expected names<br />
<br />
:As already mentioned the PKGBUILD will automatically be updated with a new pkgname - this has been done to allow you to include these packages when using <code>gensync</code> to build a local repo - the reasons for this can be found here http://bbs.archlinux.org/viewtopic.php?t<code>8852&highlight</code><br />
<br />
:you should have results like this:<br />
<pre><br />
Package Info<br />
Package name: kernel2611-cko2<br />
Package ver: 2.6.11<br />
Package desc: The Linux Kernel 2.6.10 and modules (IDE support), built with -cko2 patchset<br />
<br />
Kernel EXTRAVERSION: -cko2<br />
Kernel LOCALVERSION:<br />
Kernel RELEASE: 2.6.11-cko2<br />
<br />
Custom filenames and paths<br />
/boot/System.map2611-cko2<br />
/boot/kconfig2611-cko2<br />
/boot/vmlinuz2611-cko2<br />
/usr/src/linux-2.6.11-cko2/<br />
/lib/modules/2.6.11-cko2/<br />
<br />
Package Info<br />
Package name: kernel2611-ck2-ARCH<br />
Package ver: 2.6.11<br />
Package desc: The Linux Kernel 2.6.11 and modules (IDE support), built with -ck2 patchset<br />
<br />
Kernel EXTRAVERSION: -ck2<br />
Kernel LOCALVERSION: -ARCH<br />
Kernel RELEASE: 2.6.11-ck2-ARCH<br />
<br />
Custom filenames and paths<br />
/boot/kconfig2611-ck2-ARCH<br />
/boot/System.map2611-ck2-ARCH<br />
/boot/vmlinuz2611-ck2-ARCH<br />
/usr/src/linux-2.6.11-ck2-ARCH<br />
/lib/modules/2.6.11-ck2-ARCH/<br />
</pre><br />
<br />
* install your new pkg as normal<br />
<br />
===Your <code>config</code> file===<br />
PLEASE NOTE during the build the '''final''' kernel config is stored in your $startdir as, for example, <code>config-Apr13-12h</code>. Your '''original''' config remains in the $startdir named <code>config</code>. If you wish to use the new config in another build make sure you copy the correct file!<br />
<br />
===Update Bootloader===<br />
* Remember to edit the [[LiLo]] or [[Grub]] configuration files to include an entry to the new kernel. The new kernel will install alongside any existing stock or custom kernels, so you may wish to keep a reference to your old kernel in the bootloader config file, at least until you know the new one is working. THIS IS STRONGLY RECOMMENDED<br />
<br />
* If you use lilo remember to run <code>lilo</code> to update it.<br />
<br />
===Other versions===<br />
There several variations on this PKGBUILD available, they are all provide identical results but the mechanics are slightly different:<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_patch patch] includes the old patch= variable<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_verbose verbose] provides Package Info (like that shown above) for review before starting the make process<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_buildstats buildstats] similar to verbose but writes more info, including build times, to a file called buildstats, which is stored in the $startdir. This can also be reviewed before starting the make process but also provides a permenant record<br />
<br />
===I want the Arch logo!===<br />
Copy the ''logo_linux_clut224.ppm'' from /var/abs/kernels/kernel26 to your $startdir and add <code>logo_linux_clut224.ppm</code> to the source array. Then you need to paste the marked text (>>) into the PKGBUILD as indicated:<br />
<br />
<pre><br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname ||| return 1<br />
<br />
>> ##### Arch logo - not compatible with gensplash!<br />
>> cp ../logo''linux''clut224.ppm drivers/video/logo/<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH || sed 's||i|||'`<br />
cat ../config || sed \"s||#CARCH#||$carch||g\" >./.config<br />
</pre><br />
<br />
The stock Arch config uses the following logo settings ensure you set them at the config stage or use the stock config<br />
<br />
<pre><br />
#<br />
# Logo configuration<br />
#<br />
CONFIG_LOGO=y<br />
CONFIG_LOGO_LINUX_MONO=y<br />
CONFIG_LOGO_LINUX_VGA16=y<br />
CONFIG_LOGO_LINUX_CLUT224=y<br />
</pre><br />
<br />
=== Customization and Advanced Use normal people can stop here!===<br />
Several people have successfully customized this PKGBUILD to their own needs, while others have derived a completely new approach from it. One customization recommended to people who make multiple builds of the same version for use in parallel is to add a sed command that automatically sets the CONFIG_LOCALVERSION variable in the config to a unique value before the config stage. This can based on the date, your hostname, etc.<br />
For example<br />
<br />
<pre><br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
>> # set LOCALVERSION to -date<br />
>> sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`|g" ./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
</pre><br />
<br />
Or<br />
<br />
<pre><br />
# set LOCALVERSION to -date-hostname<br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`-`hostname`|g" ./.config<br />
</pre><br />
<br />
For a truly unique LOCALVERSION you can set the date to seconds since `00:00:00 1970-01-01 UTC'!<br />
<br />
<pre><br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%s`|g" ./.config<br />
</pre><br />
<br />
=== Problems===<br />
<br />
If you have problems with wrong package names try using the '''verbose''' PKGBUILD in '''Other Versions''' above to see what naming scheme is being created before you commit to the build - you can quit with ctrl+c at most points before the make starts.<br />
<br />
=== Feedback===<br />
If you have any questions/comments/suggestions about the above PKGBUILD feel free to join the discussion at: http://bbs.archlinux.org/viewtopic.php?t=9272<br />
<br />
Some suggestions have already been incorporated but please consider the Keep It Simple philosophy and remember the original goal. Kernel compilation is a very individual process and there are a HUGE variety of ways to go about it this PKGBUILD does not even attempt to account for all eventualities, it would be fruitless to try but of course you are completely free to customize this build to your precise needs best of luck!<br />
<br />
DibbleTheWrecker</div>Paranooshttps://wiki.archlinux.org/index.php?title=Custom_Kernel_Compilation_with_ABS&diff=267Custom Kernel Compilation with ABS2005-07-23T18:31:52Z<p>Paranoos: </p>
<hr />
<div>Due to the addition of LOCALVERSION and EXTRAVERSION variables in the kernel compilation process from 2.6.9 onwards this document has been updated and the previous version has been moved to [[Kernel compilation with ABS (2.6.8 or earlier)]].<br />
<br />
This howto has been updated provide a definitive PKGBUILD for the creation of custom kernel pkgs. It allows you to maintain multiple custom kernels with a unique naming scheme under pacman version control. It is ideal for ANY custom kernel build and can be easily adapted to fit many requirements. The PKGBUILD automatically accounts for the EXTRAVERSION and LOCALVERSION variables that are now fully supported in the kernel. EXTRAVERSION is frequently set by major patchsets such as -ck and -nitro. EXTRAVERSION is also used in the 2.6.x.y branch to carry the .y variable. LOCALVERSION can be set during the config stage and is the easiest and RECOMMENDED way to customize your kernel pkgnames. Simply setting LOCALVERSION to -custom or the date e.g. -20050105 will suffice! A unique LOCALVERSION guarantees a unique pkg.<br />
<br />
=== Philosophy and Logic how it works and why it works this way===<br />
* The Arch Way - Keep It Simple<br />
* This PKGBUILD builds on the previous, widely accepted version<br />
* This build provides kernel packages and components with a simple, logical and uncomplicated naming scheme that ONLY uses variables that are part of the ABS system and part of the kernel compilation process itself. Rationale:<br />
** Stock Arch kernels use the <code>kernel24</code> and <code>kernel26</code> base pkgnames these are logically extended here under the 2.6.x and 2.6.x.y schemes e.g <code>kernel2611</code> and <code>kernel26117</code><br>These also provide the basis of /boot filenames e.g. <code>vmlinux26</code> and <code>vmlinuz26117</code><br />
** The ''kernel compilation process'' uses the kernel version (2.6.x), EXTRAVERSION from the Makefile and CONFIG_LOCALVERSION from the kernel config to create the name for the kernel's module directory, e.g.:<br />
<br />
<pre><br />
2.6.x$EXTRAVERSION$LOCALVERSION<br />
2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
::This is beyond the control of the PKGBUILD so to provide a pkg with similarly named components the PKGBUILD uses the same scheme to create unique /boot files and a unique /usr/src directory by appending -EXTRAVERSION-LOCALVERSION, e.g.:<br />
<br />
<pre><br />
/boot/vmlinuz2611-cko2-ARCH<br />
/boot/System.map2611-cko2-ARCH<br />
/boot/kconfig2611-cko2-ARCH<br />
<br />
/usr/src/linux-2.6.11-cko2-ARCH/<br />
</pre><br />
<br />
* If you have the recommended knowledge of ABS you will see that the PKGBUILD is transparently constructed, self-explanatory and easily customized.<br />
* User input is almost identical to all ABS builds: simply set pkgver, pkgrel and pkgdesc and add additional sources, including patches, to the source array. Patch users should insert the appropriate patch commands where indicated. Aside from uncommenting the config method and choosing whether to make clean or not the rest of the build is automated.<br />
* Having created a custom pkg naming scheme during the build the PKGBUILD automatically corrects/updates itself with the new pkgname variable allowing simple <code>gensync</code> operation.<br />
<br />
=== CAUTION===<br />
# this PKGBUILD is only suited to builds of the 2.6 kernel branch - an effort to make a unified or alternative PKGBUILDS for the 2.4 branch can be found here - [[Kernel compilation with ABS-2.4]]<br />
# this is NOT an ABS howto - to successfully follow this HOWTO a working knowledge of building pkgs with ABS is ESSENTIAL - please read [[ABS - the Arch Build System]], [[The Arch package making HOW-TO - with guidelines]] and [Patching in ABS Howto]<br>I don't advise you build a kernel for your first ABS project. If you need guidelines on how to use <code>fakeroot</code> or set up a build directory read the other documents first.<br />
# likewise it helps if you know how to configure a kernel! If this is your first effort building a kernel I strongly recommend you start from the default Arch config, this is detailed further below.<br />
<br />
=== Usage Notes===<br />
<br />
* the ''patch'' variable has been removed. You should now simply specify patch sources in the source array and place the patch commands as indicated. Also see '''Other versions*<br />
<br />
* pkgname must be declared within 10 lines of the top of the PKGBUILD - so '''DO NOT* move it - just leave it.<br>If you miss this simple instruction don't worry, it won't screw up your build but your PKGBUILD file will not have the pkgname automatically updated at the end of the build. This is to allow you to use gensync correctly BUT you can edit the PKGBUILD file manually afterwards of course.<br />
<br />
* until you have your own config that you are happy with it is easiest just to start with the default Arch config; you should also get the Arch kernel26.install file. These are both in your ABS tree, normally under /var/abs/kernels/kernel26. To download the ABS tree to your system simply run <code>abs</code> as root. It doesn't take long, even on dialup. You should keep this updated by running <code>abs</code> as root on a regular basis.<br />
<br />
* To check if EXTRAVERSION is set by your patchset try doing<br />
<br />
cat ./patchname || grep +EXTRAVERSION=<br />
<br />
:and it should return something like this:<br />
<br />
+EXTRAVERSION = -ck3<br />
<br />
:if it doesn't then EXTRAVERSION is '''probably not being set''' by your patchset and you should ensure you use LOCALVERSION to customize the pkgname.<br>Arch default kernels are set with the '<code>-ARCH</code>' LOCALVERSION variable - you can set anything you like e.g. '<code>-custom</code>' (note the need for the preceding dash <code>-</code>)<br>Because of these added variables there is no need to alter the pkgname manually at any point or use any other variables. The build process automatically updates the pkgname variable in the PKGBUILD file at the end of each build to reflect the final full kernel version naming scheme.<br />
<br />
* If used correctly this PKGBUILD '''should''' always provide a unique kernel build based on EXTRAVERSION and LOCALVERSION, and on the pkgver and pkgrel (as normal) - however it is up to the user to '''double check''' resulting pkgnames and contents '''before* installation to prevent overwrites (see below for more details and examples)<br />
<br />
=== Configuring the PKGBUILD===<br />
Copy the PKGBUILD below to your $startdir. The PKGBUILD can also be downloaded from [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel here]. Before building remember the following:<br />
# pkgname can be left as it is it will automatically be set and correct itself<br />
# Insert the <code>pkgver</code> for your kernel (for example: 2.6.9)<br />
# Change the <code>pkgrel</code> for your current revision. You should increment this each time you make changes to the kernel config and want to build a REPLACEMENT pkg. If you don't want to replace the previous build but rather install in parallel you should use LOCALVERSION to create a unique pkg.<br />
# Change/expand the pkgdesc to describe any patches or special config options applied<br />
# Change the source to use a closer mirror, if you are using a patchset add the patches to the source array<br />
# {OPTIONAL} Place the patch commands where indicated<br />
# Choose a make method by leaving your preferred method uncommented-- gconfig (gtk based) xconfig (qt based) menuconfig (ncurses based)<br />
# During the build you will be asked if you want to make clean - the default is yes, reply NO if you know what you are doing.<br />
<br />
<pre><br />
# Contributor: dibblethewrecker <dibblethewrecker.at.jiwe.org><br />
pkgname=kernel26<br />
pkgver=2.6.x.y<br />
pkgrel=1<br />
pkgdesc=\"The Linux Kernel 2.6.x.y and modules (IDE support)\"<br />
url=\"http://www.kernel.org\"<br />
depends=('module-init-tools')<br />
install=kernel26.install<br />
<br />
##### add any patch sources to this section<br />
source=(config ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2 )<br />
<br />
# Function to grab var from src<br />
getvar() {<br />
old=$(cat Makefile || grep \"^$1\")<br />
echo $(echo ${old/\"$1 =\"/} || sed -e \"s/[[ ]]*\(.*\)[[ ]]*/\1/g\")<br />
return 0<br />
}<br />
<br />
build() {<br />
cd $startdir/src/linux-$pkgver<br />
<br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname ||| return 1<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH || sed 's||i|||'`<br />
cat ../config || sed \"s||#CARCH#||$carch||g\" >./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes \"\" || make config<br />
#make oldconfig ||| return 1<br />
#make menuconfig<br />
#make xconfig<br />
make gconfig<br />
<br />
##### NO USER CHANGES BELOW HERE #####<br />
<br />
# save the current pkgname<br />
old_pkgname=$pkgname<br />
<br />
# set pkgname for build purposes - DO NOT alter!<br />
pkgname=kernel26<br />
<br />
# save the updated config to build with today's date<br />
cp ./.config $startdir/config-$(date +%b%d\-%Hh)<br />
<br />
# get EXTRAVERSION from Makefile to create a unique pkgname and /usr/src directory<br />
_kernextra=$(getvar \"EXTRAVERSION\")<br />
# grab the 2.6.x.y version suffix from pkgver<br />
_y=\"`echo $pkgver || cut --delim \".\" --fields 4`\"<br />
# remove .y version suffix from _kernextra<br />
''kernextra=\"`echo $''kernextra || sed \"s||\.$_y|||g\"`\"<br />
<br />
# Read the full kernel version info from new config to use in pathnames and pkgname<br />
. ./.config<br />
<br />
# Kernel custom - to create a unique pkgname (see below)<br />
''kerncust=\"${''kernextra}${CONFIG_LOCALVERSION}\"<br />
# Kernel release - will be the same as Makefile<br />
''kernrel=\"${pkgver}${''kerncust}\"<br />
# Get the pkgver suffix for unique pkgname and /boot file suffices<br />
_pkgversuf=\"`echo $pkgver || sed \"s||2.6.|||g\" || sed \"s||\.|||g\"`\"<br />
# Set /boot file suffices from kernel release and pkgver suffix<br />
''kernboot=\"${''pkgversuf}${_kerncust}\"<br />
<br />
# Set a new pkgname from kernel release and pkgver suffix<br />
pkgname=\"${pkgname}${''pkgversuf}${''kerncust}\"<br />
<br />
# build!<br />
echo<br />
echo -n \"Do you want to make clean (default YES)? (YES/NO): \"<br />
read choice<br />
echo<br />
echo -n \"Press any key to start make or CTRL+C to quit\"<br />
read anykey<br />
<br />
if [[ \"${choice}\" = \"NO\" ]] ; then<br />
make bzImage modules ||| return 1<br />
else<br />
make clean bzImage modules ||| return 1<br />
fi<br />
<br />
mkdir -p $startdir/pkg/{lib/modules,boot}<br />
make INSTALL''MOD''PATH=$startdir/pkg modules_install ||| return 1<br />
cp System.map $startdir/pkg/boot/System.map26${_kernboot}<br />
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26${_kernboot}<br />
install -D -m644 Makefile \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/Makefile<br />
install -D -m644 .config \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/.config<br />
install -D -m644 .config $startdir/pkg/boot/kconfig26${_kernboot}<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/include<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel<br />
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do<br />
cp -a include/$i $startdir/pkg/usr/src/linux-${_kernrel}/include/<br />
done<br />
# copy files necessary for later builds, like nvidia and vmware<br />
cp Module.symvers $startdir/pkg/usr/src/linux-${_kernrel}<br />
cp -a scripts $startdir/pkg/usr/src/linux-${_kernrel}<br />
mkdir -p $startdir/pkg/usr/src/linux-${''kernrel}/.tmp''versions<br />
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/<br />
cp arch/i386/kernel/asm-offsets.s \<br />
$startdir/pkg/usr/src/linux-${_kernrel}/arch/i386/kernel/<br />
# copy in Kconfig files<br />
for i in `find . -name \"Kconfig*\"`; do<br />
mkdir -p $startdir/pkg/usr/src/linux-${_kernrel}/`echo $i || sed 's||/Kconfig.*|||'`<br />
cp $i $startdir/pkg/usr/src/linux-${_kernrel}/$i<br />
done<br />
cd $startdir/pkg/usr/src/linux-${_kernrel}/include && ln -s asm-i386 asm<br />
chown -R root.root $startdir/pkg/usr/src/linux-${_kernrel}<br />
cd $startdir/pkg/lib/modules/${_kernrel} && \<br />
(rm -f source build; ln -sf /usr/src/linux-${_kernrel} build)<br />
<br />
# Correct the pkgname in our PKGBUILD - this allows correct gensync operation<br />
# NOTE: pkgname variable must be declared with first 10 lines of PKGBUILD!<br />
cd $startdir<br />
sed -i \"1,11 s||pkgname<code>$old_pkgname||pkgname</code>$pkgname||\" ./PKGBUILD<br />
}<br />
# vim:syntax=sh<br />
</pre><br />
<br />
====makepkg====<br />
* Now run <code>makepkg -g >>PKGBUILD</code> as <code>root</code> or under <code>fakeroot</code> - this will append the md5sums to the end of the PKGBUILD - remember they are there!<br />
<br />
* Run <code>makepkg</code> to start the build<br />
<br />
* If you are using a patchset and your build fails '''before* the config stage retrace the build output and check for patching errors i.e. Failed hunks. If you do have failed hunks check that you are using the correct patch version for you kernel version and check that you are using FRESH source i.e. it hasn't already been patched in a previously completed/failed build<br />
<br />
====config====<br />
* you should quickly see your chosen config screen, which might be qt, gtk, or ncurses based, depending on which option you chose. If you included a config file in the source array then this will be used as the basis of your config - when I first start building a new kernel version or patchset I use the default arch config to start from (which can be found in ABS - see above).<br />
<br />
* During the config stage remember to set the LOCALVERSION variable, if you want to use it, and '''REMEMBER''' - if you ''do'' use the default arch config then LOCALVERSION is already set to -ARCH, you need to change this if you want to avoid having a kernel with an identical name to the stock kernel! You have been warned!<br />
<br />
* save your config when you are done and quit the configurator - your config will now be used in your build and also copied to your build dir with the date and hour appended<br />
<br />
====Final Checks====<br />
* after the build completes successfully check that the files in $startdir/pkg/boot and the dir in $startdir/pkg/lib/modules and $startdir/usr/src have the expected names<br />
<br />
:As already mentioned the PKGBUILD will automatically be updated with a new pkgname - this has been done to allow you to include these packages when using <code>gensync</code> to build a local repo - the reasons for this can be found here http://bbs.archlinux.org/viewtopic.php?t<code>8852&highlight</code><br />
<br />
:you should have results like this:<br />
<pre><br />
Package Info<br />
Package name: kernel2611-cko2<br />
Package ver: 2.6.11<br />
Package desc: The Linux Kernel 2.6.10 and modules (IDE support), built with -cko2 patchset<br />
<br />
Kernel EXTRAVERSION: -cko2<br />
Kernel LOCALVERSION:<br />
Kernel RELEASE: 2.6.11-cko2<br />
<br />
Custom filenames and paths<br />
/boot/System.map2611-cko2<br />
/boot/kconfig2611-cko2<br />
/boot/vmlinuz2611-cko2<br />
/usr/src/linux-2.6.11-cko2/<br />
/lib/modules/2.6.11-cko2/<br />
<br />
Package Info<br />
Package name: kernel2611-ck2-ARCH<br />
Package ver: 2.6.11<br />
Package desc: The Linux Kernel 2.6.11 and modules (IDE support), built with -ck2 patchset<br />
<br />
Kernel EXTRAVERSION: -ck2<br />
Kernel LOCALVERSION: -ARCH<br />
Kernel RELEASE: 2.6.11-ck2-ARCH<br />
<br />
Custom filenames and paths<br />
/boot/kconfig2611-ck2-ARCH<br />
/boot/System.map2611-ck2-ARCH<br />
/boot/vmlinuz2611-ck2-ARCH<br />
/usr/src/linux-2.6.11-ck2-ARCH<br />
/lib/modules/2.6.11-ck2-ARCH/<br />
</pre><br />
<br />
* install your new pkg as normal<br />
<br />
===Your <code>config</code> file===<br />
PLEASE NOTE during the build the '''final''' kernel config is stored in your $startdir as, for example, <code>config-Apr13-12h</code>. Your '''original''' config remains in the $startdir named <code>config</code>. If you wish to use the new config in another build make sure you copy the correct file!<br />
<br />
===Update Bootloader===<br />
* Remember to edit the [[LiLo]] or [[Grub]] configuration files to include an entry to the new kernel. The new kernel will install alongside any existing stock or custom kernels, so you may wish to keep a reference to your old kernel in the bootloader config file, at least until you know the new one is working. THIS IS STRONGLY RECOMMENDED<br />
<br />
* If you use lilo remember to run <code>lilo</code> to update it.<br />
<br />
===Other versions===<br />
There several variations on this PKGBUILD available, they are all provide identical results but the mechanics are slightly different:<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_patch patch] includes the old patch= variable<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_verbose verbose] provides Package Info (like that shown above) for review before starting the make process<br />
* [http://dtw.jiwe.org/share/kernel/PKGBUILDS/PKGBUILD.custom_kernel_buildstats buildstats] similar to verbose but writes more info, including build times, to a file called buildstats, which is stored in the $startdir. This can also be reviewed before starting the make process but also provides a permenant record<br />
<br />
===I want the Arch logo!===<br />
Copy the ''logo_linux_clut224.ppm'' from /var/abs/kernels/kernel26 to your $startdir and add <code>logo_linux_clut224.ppm</code> to the source array. Then you need to paste the marked text (>>) into the PKGBUILD as indicated:<br />
<br />
<pre><br />
##### Uncomment and apply any patches here<br />
#patch -Np1 -i ../patchname ||| return 1<br />
<br />
>> ##### Arch logo - not compatible with gensplash!<br />
>> cp ../logo''linux''clut224.ppm drivers/video/logo/<br />
<br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH || sed 's||i|||'`<br />
cat ../config || sed \"s||#CARCH#||$carch||g\" >./.config<br />
</pre><br />
<br />
The stock Arch config uses the following logo settings ensure you set them at the config stage or use the stock config<br />
<br />
<pre><br />
#<br />
# Logo configuration<br />
#<br />
CONFIG_LOGO=y<br />
CONFIG_LOGO_LINUX_MONO=y<br />
CONFIG_LOGO_LINUX_VGA16=y<br />
CONFIG_LOGO_LINUX_CLUT224=y<br />
</pre><br />
<br />
=== Customization and Advanced Use normal people can stop here!===<br />
Several people have successfully customized this PKGBUILD to their own needs, while others have derived a completely new approach from it. One customization recommended to people who make multiple builds of the same version for use in parallel is to add a sed command that automatically sets the CONFIG_LOCALVERSION variable in the config to a unique value before the config stage. This can based on the date, your hostname, etc.<br />
For example<br />
<br />
<pre><br />
# get rid of the 'i' in i686<br />
carch=`echo $CARCH | sed 's|i||'`<br />
cat ../config | sed "s|#CARCH#|$carch|g" >./.config<br />
<br />
>> # set LOCALVERSION to -date<br />
>> sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`|g" ./.config<br />
<br />
##### Load config - uncomment your preferred config method<br />
#yes "" | make config<br />
</pre><br />
<br />
Or<br />
<br />
<pre><br />
# set LOCALVERSION to -date-hostname<br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%y%m%d`-`hostname`|g" ./.config<br />
</pre><br />
<br />
For a truly unique LOCALVERSION you can set the date to seconds since `00:00:00 1970-01-01 UTC'!<br />
<br />
<pre><br />
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=-`date +%s`|g" ./.config<br />
</pre><br />
<br />
=== Problems===<br />
<br />
If you have problems with wrong package names try using the '''verbose''' PKGBUILD in '''Other Versions''' above to see what naming scheme is being created before you commit to the build - you can quit with ctrl+c at most points before the make starts.<br />
<br />
=== Feedback===<br />
If you have any questions/comments/suggestions about the above PKGBUILD feel free to join the discussion at: http://bbs.archlinux.org/viewtopic.php?t=9272<br />
<br />
Some suggestions have already been incorporated but please consider the Keep It Simple philosophy and remember the original goal. Kernel compilation is a very individual process and there are a HUGE variety of ways to go about it this PKGBUILD does not even attempt to account for all eventualities, it would be fruitless to try but of course you are completely free to customize this build to your precise needs best of luck!<br />
<br />
DibbleTheWrecker</div>Paranooshttps://wiki.archlinux.org/index.php?title=User:Paranoos&diff=1851User:Paranoos2005-07-23T18:13:16Z<p>Paranoos: </p>
<hr />
<div>===Chunk E===<br />
[[CUPS Setup]]<br />
<br />
[[Compal CL56]]<br />
<br />
[[Configuring FAM]]<br />
<br />
[[Connect your MP3-Player with ArchLinux]]<br />
<br />
[[Courier MTA]]<br />
<br />
[[Crux vs. Arch]]<br />
<br />
[[Custom Kernel Compilation with ABS (2.6.9 and later)]]</div>Paranooshttps://wiki.archlinux.org/index.php?title=User:Paranoos&diff=218User:Paranoos2005-07-23T18:06:47Z<p>Paranoos: </p>
<hr />
<div>===Chunk E===<br />
[[CUPS Setup]]<br />
<br />
[[Compal CL56]]<br />
<br />
[[Configuring FAM]]<br />
<br />
[[Connect your MP3-Player with ArchLinux]]<br />
<br />
[[Courier MTA]]<br />
<br />
[[Crux vs. Arch]]</div>Paranoos