顯示具有 gentoo 標籤的文章。 顯示所有文章
顯示具有 gentoo 標籤的文章。 顯示所有文章

2016年8月11日 星期四

[sabayon] Install binary package by using the branch(sabayon) of gentoo

Install equo
# emerge equo

Put the database file under amd64
# cd /var/lib/entropy/client/database/amd64
# curl -O https://raw.githubusercontent.com/Sabayon/docker-armhfp/master/base-armhfp/ext/equo.sql
# cat ./equo.sql | sudo sqlite3 equo.db

first generate the entropy database
# sudo equo rescue generate

Update the database
# equo update
# equo repo mirrorsort sabayonlinux.org

Reference:
Note :

If you get an error message that the overlays do not exist then you need to add them:
# layman –add sabayon
# layman –add sabayon-distro

Update the Sabayon overlays to the latest versions:
# layman –sync sabayon
# layman –sync sabayon-distro

2016年7月31日 星期日

[Gentoo] Kpaint

Add some dependent package for kdegraphics-meta

printf ">=dev-libs/libpcre-8.38-r1 pcre16\n \
>=media-libs/phonon-4.7.2 qt5\n \
>=media-gfx/exiv2-0.25-r2 xmp\n \
>=media-libs/phonon-vlc-0.7.2 qt5\n \
>=sys-auth/polkit-qt-0.112.0-r1 qt5\n \
>=dev-libs/libdbusmenu-qt-0.9.3_pre20140619-r1 qt5\n \
>=dev-qt/qtcore-5.5.1-r1 icu\n" \
>>  /etc/portage/package.use/kpaint

Start to install package

USE="icu" emerge --oneshot  =dev-libs/libxml2-2.9.4 --buildpkg kde-apps/kdegraphics-meta

Explain “–oneshot =dev-libs/libxml2-2.9.4”
When install this kpaint will appear two version of libxml2.(dev-libs/libxml2-2.9.4 & dev-libs/libxml2-2.9.3).
So I choose dev-libs/libxml2-2.9.4 to install with this package.

Reference:

2016年7月22日 星期五

[Arduino][Gentoo] libtinfo.so.5: cannot open shared object file

Q:
/home/happy/Downloads/arduino-1.6.9/hardware/tools/avr/bin/avrdude: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

A:
emerge sys-libs/ncurses
cd /lib
sudo ln -s libncurses.so.5.7 libtinfo.so.5

Reference:

2016年7月18日 星期一

[Gentoo][Cinnamon] how to compile cinnamon

  1. Download muffin package and compile it.
    git clone git://github.com/linuxmint/muffin.git
  2. Download Cinnamon package and compile it.
    git clone git://github.com/linuxmint/Cinnamon.git
  3. Download cinnamon-session package and compile it.
    git clone git://github.com/linuxmint/cinnamon-session.git
  4. Download cinnamon-control-center package and compile it.
    git clone git://github.com/linuxmint/cinnamon-control-center.git
  5. Download cinnamon-desktop package and compile it.
    git clone git://github.com/linuxmint/cinnamon-desktop.git
  6. Download cinnamon-menus package and compile it.
    git clone git://github.com/linuxmint/cinnamon-menus.git
  7. Download cinnamon-settings-daemon package and compile it.
    git clone git://github.com/linuxmint/cinnamon-settings-daemon.git
  8. Download cinnamon-screensaver package and compile it.
    git clone git://github.com/linuxmint/cinnamon-screensaver.git
  9. Download cjs package and compile it.
    git clone git://github.com/linuxmint/cjs.git
  10. Download cinnamon-translations package and compile it.
    git clone git://github.com/linuxmint/cinnamon-translations.git


Q:
gcc: error: /usr/lib64/:/usr/local/lib64/:/lib: No such file or directory
A:
./configure --libdir=/usr/local/lib64


Q:
configure: error: Package requirements (gio-2.0 >= 2.35.0
                               gio-unix-2.0 dbus-glib-1 libxml-2.0
                               gtk+-3.0 >= 3.9.12
                               libmuffin >= 3.0.0
                               cjs-internals-1.0 >= 2.3.1
                   libcinnamon-menu-3.0 gstreamer-1.0 gstreamer-base-1.0 x11 gconf-2.0
                               gdk-x11-3.0 libsoup-2.4 gl
                   clutter-x11-1.0 >= 1.10.0
                               libstartup-notification-1.0 >= 0.11
                               gobject-introspection-1.0 >= 0.9.2
                               polkit-agent-1 >= 0.100 xfixes
                               libnm-glib libnm-util gnome-keyring-1 atk-bridge-2.0) were not met:

Requested 'libmuffin >= 3.0.0' but version of libmuffin is 2.8.4

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CINNAMON_CFLAGS
and CINNAMON_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
A:
$ pkg-config --exists --print-errors libmuffin 3.0.5
Package 3.0.5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `3.0.5.pc'
to the PKG_CONFIG_PATH environment variable
No package '3.0.5' found
$ pkg-config  --print-errors --exists  "libmuffin >= 3.0.5"
Requested 'libmuffin >= 3.0.5' but version of libmuffin is 2.8.4

$ export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
$ pkg-config  --print-errors --exists  "libmuffin >= 3.0.5"

Reference:

2016年7月9日 星期六

2016年7月7日 星期四

[Gentoo] How to backup package

  1. The system already have package was installed.
    Using quickpkg
    Ex:
           quickpkg sys-devel/gcc

    The binary package is under /usr/portage/packages

  2. The system have not package was installed in the system.
    Using emerge
    Ex:
           emerge --ask --buildpkg sys-devel/gcc
Installing binary packages
  1. Using emerge
    Ex:
           emerge --ask --usepkg sys-devel/gcc
Reference:

2016年7月1日 星期五

[Gentoo] How to enable audio


  1. Modify the permission of the folder of user (user:group)
    The following action will see output device become “dummy output”
    cd ~
    sudo chown freeman:freeman .* -R
  2. Modify the file permission which are under /dev/snd like below (permission : 777)
    This action will let output device from “dummy output” to “speak”.

    happy@localhost /dev/snd $ ls -al
    total 0
    drwxr-xr-x  3 root root      280 Jul  2 01:18 .
    drwxr-xr-x 18 root root     4240 Jul  2 01:18 ..
    drwxrwxrwx  2 root root       80 Jul  2 01:18 by-path
    crwxrwxrwx  1 root audio 116,  6 Jul  2 01:18 controlC0
    crwxrwxrwx  1 root audio 116,  2 Jul  2 01:18 controlC1
    crwxrwxrwx  1 root audio 116, 10 Jul  2 01:18 hwC0D0
    crwxrwxrwx  1 root audio 116,  5 Jul  2 01:18 hwC1D0
    crwxrwxrwx  1 root audio 116,  7 Jul  2 01:34 pcmC0D3p
    crwxrwxrwx  1 root audio 116,  8 Jul  2 01:34 pcmC0D7p
    crwxrwxrwx  1 root audio 116,  9 Jul  2 01:34 pcmC0D8p
    crwxrwxrwx  1 root audio 116,  4 Jul  2 01:34 pcmC1D0c
    crwxrwxrwx  1 root audio 116,  3 Jul  2 01:34 pcmC1D0p
    crwxrwxrwx  1 root audio 116,  1 Jul  2 01:18 seq
    crwxrwxrwx  1 root audio 116, 33 Jul  2 01:18 timer
    

Reference:

2016年6月30日 星期四

2016年6月24日 星期五

[Linux Kernel][Gentoo] open ASUS WMI Driver at gentoo (4.4.6-gentoo)

I check each item from “depends on ACPI_WMI” to “depends on ACPI_VIDEO || ACPI_VIDEO = n”.
When I check “depends on HOTPLUG_PCI”, then I find this item wont tick up.
I tick up this function.
I go back to X86 Platform Specific Device Drivers, I find out the item “Asus Notebook WMI Driver” appear on my screen.
I am so happy.
vim drivers/platform/x86/Kconfig +545
config ASUS_WMI
        tristate "ASUS WMI Driver"
        depends on ACPI_WMI
        depends on INPUT
        depends on HWMON
        depends on BACKLIGHT_CLASS_DEVICE
        depends on RFKILL || RFKILL = n
        depends on HOTPLUG_PCI
        depends on ACPI_VIDEO || ACPI_VIDEO = n
        select INPUT_SPARSEKMAP
        select LEDS_CLASS
        select NEW_LEDS
> Bus options (PCI etc.)
    [*] Support for PCI Hotplug  --->
    [*]     PCI Express Hotplug driver

> Device Drivers > X86 Platform Specific Device Drivers
    <M>   ASUS WMI Driver
    <M>     Asus Notebook WMI Driver
Compile my kernel code
sudo make
install module
sudo make modules_install

2016年6月21日 星期二

2016年6月14日 星期二

[Gentoo] How to install intel graphics driver

Set correct video driver
/etc/portage/make.conf  # Gen 3
VIDEO_CARDS="intel i915"
/etc/portage/make.conf  # Gen 4 through Gen 9
VIDEO_CARDS="intel i965"

happy@localhost ~/data $ eselect python set 1
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.4

The changes take effect by running the emerge command with the –changed-use option:
USE=”sqlite” emerge --changed-use --deep @world


Install X.Org driver for Intel cards.
emerge x11-drivers/xf86-video-intel

Reference:

2016年6月13日 星期一

[Gentoo] How to backup & restore gentoo os

Backup system by using tar
Boot from the liveCD

mkdir /mnt/gentoo
mkdir /mnt/backup
mount /dev/sda2 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount /dev/sda3 /mnt/gentoo/home/happy

time tar -cvvjpf /mnt/gentoo/home/happy/gentoo_backup.tgz -C /mnt/gentoo

Restore the tar file into system
mount /dev/sda2 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot

tar xvvfh gentoo_backup.tgz -C /mnt/gentoo

Following command need to do, otherwise when execute chroot won't find /bin/bash under gentoo enviroment.

tar -xmvvf stage3-amd64-20150730.tar.bz2 -C /mnt/gentoo
tar -xmvvf portage-20150804.tar.xz       -C /mnt/gentoo/usr/

After restore the system need to create new fstab.
Make sure /dev/sda2 will boot under read/write mode.
genfstab -U -p /mnt/gentoo >> /mnt/gentoo/etc/fstab

Install two package, one is for boot, the other one is for kernel & initramfs.


# emerge genkernel (Gentoo automatic kernel building scripts)

# mkdir -p /etc/portage/package.accept_keywords
# echo "sys-boot/gummiboot" >> /etc/portage/package.accept_keywords/efi
# emerge sys-boot/gummiboot

Compile kernel & install kernel first.

cd /usr/src/linux
make
make modules_install
make install 


After install will install following stuff under /boot


config-4.4.6-gentoo
System.map-4.4.6-gentoo
vmlinuz-4.4.6-gentoo
Using genkernel to create initramfs under /boot.

# genkernel --install initramfs

Using gummiboot create booting stuff.

# gummiboot --path /boot install
Edit /boot/loader/entries/gentoo.conf to make booting configuration.

title Gentoo Linux  (Title name need the same)
initrd /initramfs-genkernel-x86_64-4.4.6-gentoo (Init image)
linux /kernel-genkernel-x86_64-4.4.6-gentoo  (Kernel image)
options root=/dev/sdaX rw  (X = root filesystem)

Please set up two command, otherwise the volume won't work.
# rc-update add dbus default
# rc-update add xdm default

Other Work need to do

Reference:

2016年6月11日 星期六

[Gentoo] Install QCA8171 driver and RTL8723BE driver

Jump into the linux source path.
cd /usr/src/linux


Configure configuration file under linux source path.
make menuconfig


Tick up the following settings.
Qualcomm Atheros QCA8171 Gigabit Ethernet
Device Drivers > Network device support > Ethernet driver support
> Qualcomm Atheros AR816x/AR817x support
Tick up the following settings.
Realtek RTL8723BE PCIe Wireless Network Adapter
Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
Device Drivers > Network device support > Wireless LAN > Realtek rtlwifi family of devices
> Realtek RTL8723BE PCIe Wireless Network Adapter
Start to compile kernel source.
make

Install kernel module
make modules_install

2016年6月5日 星期日

[Gentoo] How to load kernel modules for Virtualbox

When start virtualbox will meet following error.
WARNING: The VirtualBox kernel modules are not loaded.
         Please load all the needed kernel modules by:

           for m in vbox{drv,netadp,netflt}; do modprobe $m; done

         You will not be able to start VMs until this problem is fixed.

Edit /etc/conf.d/modules.
modules="vboxdrv vboxnetadp vboxnetflt"

Reference:

2016年6月4日 星期六