Difference between pages "Uvesafb" and "Toolchain update"

From Funtoo
(Difference between pages)
Jump to: navigation, search
(Kernel configuration)
 
(What about libtool?)
 
Line 1: Line 1:
== ''How to'' : Framebuffer: Userspace VESA VGA graphics support ==
+
This guide explains how to upgrade the Funtoo toolchain to the new version available. With this toolchain update comes some other core packages bumps that were depending on the new toolchain.  
Uvesafb is an improved framebuffer driver for Linux systems with some enhancements compared to vesa.  
+
=Kernel configuration=
+
  
{{Kernelop
+
{{fancynote| This toolchain update affects the users of the ''current'' tree. ''Stable'' users should not update to this toolchain yet as many stable packages may not build with it.}}  
| <br> |<pre>
+
Device Drivers ->
+
    <*> Connector - unified userspace <-> kernelspace linker  --->
+
    Graphics support ->
+
        [*] Support for frame buffer devices  --->
+
            [*] Enable firmware EDID
+
            Console display driver support ->
+
                [*] Video mode selection support
+
                [*] Video mode handling helpers
+
            Frame buffer hardware drivers
+
            [*] Userspace VESA VGA graphics support
+
</pre>}}
+
  
{{fancynote| Build the kernel, do not install the kernel and modules. You can choose uvesafb as a module, unlike vesa.}}
+
== Current toolchain ==
 +
Funtoo currently provides the following core package versions for stable branch:
 +
*sys-devel/gcc-4.6.4-r2
 +
*sys-devel/binutils-2.22
 +
*sys-kernel/linux-headers-3.4-r2
 +
*sys-libs/glibc-2.15-r4
  
== Klibc ==
+
== Toolchain update ==
 +
Those core packages will be updated to the following versions. These packages now included in current branch
 +
*sys-devel/gcc-4.8.1-r3
 +
*sys-devel/binutils-2.23.2
 +
*sys-kernel/linux-headers-3.7
 +
*sys-libs/glibc-2.18
 +
 
 +
 
 +
== Unmasking the packages ==
 +
 
 +
To unmask the packages, run <tt>emerge --sync</tt>. If you are using the funtoo-current, they should now be unmasked. To perform this manually (no longer necessary,) do this:
  
Next, we emerge {{Package|dev-libs/klibc}}:
 
 
<console>
 
<console>
###i## emerge klibc
+
# ##i##install -d /etc/portage/package.unmask
 +
# ##i##echo ">=sys-devel/gcc-4.8.1" >> /etc/portage/package.unmask/toolchain
 +
# ##i##echo "=sys-devel/binutils-2.23.1" >> /etc/portage/package.unmask/toolchain
 +
# ##i##echo "=sys-kernel/linux-headers-3.7" >> /etc/portage/package.unmask/toolchain
 +
# ##i##echo "=sys-libs/glibc-2.18" >> /etc/portage/package.unmask/toolchain
 
</console>
 
</console>
This step is necessary because klibc has to be compiled against a kernel that includes uvesafb. You need to do it only once.
 
  
== v86d ==
+
Easier way is to copy <code>funtoo-toolchain</code> from /usr/portage/profiles/package.mask, assuming that /etc/portage/package.unmask is a directory:
{{Package|sys-apps/v86d}} is the userspace helper that runs x86 code in emulated environment. Uvesafb will not work without v86d. Now, we emerge <code>v86d</code>:
+
 
<console>
 
<console>
###i## emerge v86d
+
# ##i##cp /usr/portage/profiles/package.mask/funtoo-toolchain /etc/portage/package.unmask
 
</console>
 
</console>
  
== Back to kernel configuration ==
+
== Keywords changes for ''stable'' users ==
Reconfigure the kernel:
+
If ''Stable'' users are not afraid to upgrade their toolchain, they must add the correct keywords too:
{{Kernelop
+
<console>
| <br> |<pre>
+
# ##i##install -d /etc/portage/package.keywords
General Setup->
+
# ##i##echo ">=sys-devel/gcc-4.8.1 **" >> /etc/portage/package.keywords/toolchain
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
+
# ##i##echo "=sys-devel/binutils-2.23.1 **" >> /etc/portage/package.keywords/toolchain
(/usr/share/v86d/initramfs)    Initramfs source file(s)
+
# ##i##echo "=sys-kernel/linux-headers-3.7 **" >> /etc/portage/package.keywords/toolchain
</pre>}}
+
# ##i##echo "=sys-libs/glibc-2.18 **" >> /etc/portage/package.keywords/toolchain
Rebuild the kernel: make and install it, install the modules
+
</console>
  
== Bootloader configuration ==
+
== Upgrading to the new toolchain ==
add <code>video=uvesafb:1440x900-32,mtrr:3,ywrap</code> (or similar) to your kernel command line, like in example <code>boot.conf</code>
+
As the dependencies have been adjusted so the packages are built in the right order, no user manipulation is required. Updating everything should work out of the box, but to ensure that no unwanted package is updated between the toolchain parts, proceed as following:
 +
<console>
 +
# ##i##emerge --sync
 +
# ##i##emerge -1 glibc
 +
# ##i##emerge -uNDav @world
 +
</console>
  
{{File
+
Done!
|/etc/boot.conf|<pre>
+
boot {
+
        generate grub
+
        default "Funtoo Linux uvesafb"
+
        timeout 3
+
}
+
  "Funtoo Linux uvesafb" {
+
        kernel bzImage-uvesafb[-v]
+
        params += video=uvesafb:1440x900-32,mtrr:3,ywrap
+
}
+
</pre>}}
+
  
Then run:
+
== What about libtool? ==
 +
libtool is supposed to be automatically rebuilt during the update process. This avoids any manual steps to be executed after the update. If you are worried that libtool was not rebuilt, execute the following command to reinstall it:
 
<console>
 
<console>
###i## boot-update
+
###i## emerge --oneshot
</console>
+
and then run:
+
<console>
+
###i## reboot
+
 
</console>
 
</console>
and enjoy uvesafb!
 
  
 +
== Rebuilding the whole system? ==
 +
Some people argue that this is necessary to rebuild the whole system (even twice) after a toolchain upgrade. This is never necessary, but users who changed their CFLAGS or CXXFLAGS due to a new available arch or optimization flag are welcome to do so, if they want. However, remember that this is never necessary.
  
 +
== Case of depclean ==
 +
After switching to new gcc, it can be cleaned (accidentally) by emerge ---depclean, it is recommended to save older gcc for failover
 +
<console>
 +
# ##i##emerge -av --depclean --exclude sys-devel/gcc
 +
</console>
 +
 +
== Troubleshooting ==
 +
After the update, if any package fails to start with a shared library missing problem, try to run:
 +
<console>
 +
# ##i##revdep-rebuild
 +
</console>
 +
Sometime, with toolchain update, system can be damaged. If such issues experienced, follow resurrection guide
 +
http://www.funtoo.org/System_resurrection
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Latest revision as of 14:12, 31 January 2014

This guide explains how to upgrade the Funtoo toolchain to the new version available. With this toolchain update comes some other core packages bumps that were depending on the new toolchain.

Note: This toolchain update affects the users of the current tree. Stable users should not update to this toolchain yet as many stable packages may not build with it.

Contents

[edit] Current toolchain

Funtoo currently provides the following core package versions for stable branch:

  • sys-devel/gcc-4.6.4-r2
  • sys-devel/binutils-2.22
  • sys-kernel/linux-headers-3.4-r2
  • sys-libs/glibc-2.15-r4

[edit] Toolchain update

Those core packages will be updated to the following versions. These packages now included in current branch

  • sys-devel/gcc-4.8.1-r3
  • sys-devel/binutils-2.23.2
  • sys-kernel/linux-headers-3.7
  • sys-libs/glibc-2.18


[edit] Unmasking the packages

To unmask the packages, run emerge --sync. If you are using the funtoo-current, they should now be unmasked. To perform this manually (no longer necessary,) do this:

# install -d /etc/portage/package.unmask
# echo ">=sys-devel/gcc-4.8.1" >> /etc/portage/package.unmask/toolchain
# echo "=sys-devel/binutils-2.23.1" >> /etc/portage/package.unmask/toolchain
# echo "=sys-kernel/linux-headers-3.7" >> /etc/portage/package.unmask/toolchain
# echo "=sys-libs/glibc-2.18" >> /etc/portage/package.unmask/toolchain

Easier way is to copy funtoo-toolchain from /usr/portage/profiles/package.mask, assuming that /etc/portage/package.unmask is a directory:

# cp /usr/portage/profiles/package.mask/funtoo-toolchain /etc/portage/package.unmask

[edit] Keywords changes for stable users

If Stable users are not afraid to upgrade their toolchain, they must add the correct keywords too:

# install -d /etc/portage/package.keywords
# echo ">=sys-devel/gcc-4.8.1 **" >> /etc/portage/package.keywords/toolchain
# echo "=sys-devel/binutils-2.23.1 **" >> /etc/portage/package.keywords/toolchain
# echo "=sys-kernel/linux-headers-3.7 **" >> /etc/portage/package.keywords/toolchain
# echo "=sys-libs/glibc-2.18 **" >> /etc/portage/package.keywords/toolchain

[edit] Upgrading to the new toolchain

As the dependencies have been adjusted so the packages are built in the right order, no user manipulation is required. Updating everything should work out of the box, but to ensure that no unwanted package is updated between the toolchain parts, proceed as following:

# emerge --sync
# emerge -1 glibc
# emerge -uNDav @world

Done!

[edit] What about libtool?

libtool is supposed to be automatically rebuilt during the update process. This avoids any manual steps to be executed after the update. If you are worried that libtool was not rebuilt, execute the following command to reinstall it:

# emerge --oneshot 

[edit] Rebuilding the whole system?

Some people argue that this is necessary to rebuild the whole system (even twice) after a toolchain upgrade. This is never necessary, but users who changed their CFLAGS or CXXFLAGS due to a new available arch or optimization flag are welcome to do so, if they want. However, remember that this is never necessary.

[edit] Case of depclean

After switching to new gcc, it can be cleaned (accidentally) by emerge ---depclean, it is recommended to save older gcc for failover

# emerge -av --depclean --exclude sys-devel/gcc

[edit] Troubleshooting

After the update, if any package fails to start with a shared library missing problem, try to run:

# revdep-rebuild

Sometime, with toolchain update, system can be damaged. If such issues experienced, follow resurrection guide http://www.funtoo.org/System_resurrection