2016年6月27日 星期一

[Linux Kernel] How to compile ASUS_WMI & ASUS_NB_WMI


I want Fn+F9 can work. So the follow step is procedure for my testing. It work.

make menuconfig

Device Drivers → X86 Platform Specific Device Drivers

Tick up
<M>   WMI  (will open - < >   ASUS WMI Driver)
Tick up
    <M>   ASUS WMI Driver (when tick up this time will tick up another item was called Asus Notebook WMI Driver)
        <M>     Asus Notebook WMI Driver

Check .config

[happy@localhost linux-4.6.2]$ grep -inr "asus_wmi"  .config
3177:CONFIG_ASUS_WMI=m
[happy@localhost linux-4.6.2]$ grep -inr "asus_nb_wmi"  .config
3178:CONFIG_ASUS_NB_WMI=m


How to find the method. I check my .config in my archlinux. The command like below.
zcat /proc/config.gz > .config

And I find my settings in my archlinux have two option have been opened.
CONFIG_ASUS_WMI=m
CONFIG_ASUS_NB_WMI=m

So I decide to download the linux kernel to find how to make those two option appear on my .config.

Why I want try this option, because my touchpad(Fn+F9) no work. I search other information that told me maybe I need this kernel module. So I want to compile it, and try if this module can let my touchpad work or not.

After set up the .config, then we need to start compile our kernel.
There have two method can do this job.

Method 1:
Use genkernel to compile kernel.

A: No specific .config
    genkernel all (Builds all stages — the initrd, kernel image and modules.)

B: Specific .config
    genkernel --config=/path/to/genkernel.conf all

Method 2:
Copy the bzImage to /boot
/usr/src/linux/arch/x86/boot/bzImage –> /boot

I need to find which one is initramfs

Edit /boot/loader/entries/gentoo.conf
title Gentoo Linux
initrd /initramfs-genkernel-x86_64-4.4.6-gentoo
linux /bzImage
options root=/dev/sda2 rw

Reference:

2015年4月25日 星期六

[Xournal] 編輯 PDF 檔工具

檔案下載
編輯 PDF 工具 (Xournal)

開啟檔案



文字字型選擇
工具 -> 文字字型
選擇字型:
在預覽看到中文字,表示這個字型支援中文字



打上中文




輸出成新的PDF檔

2015年2月9日 星期一

[ArchLinux] How to install archlinux

Prepare :
1. Download image
archlinux-2015.02.01-dual.iso

2. dd into usb flash
dd bs=4M if=/path/to/archlinux-2015.02.01-dual.iso of=/dev/sdx && sync



1. Design the partition of disk
Type: gdisk /dev/sda
Type: o //This will create a new empty GUID partition table and destroy all your data and overwrite existing partitions

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          104447   50.0 MiB    EF00  EFI System
   2          104448       125933567   60.0 GiB    8300  Linux filesystem
   3       125933568       142710783   8.0 GiB     8200  Linux swap
   4       142710784      1953525134   863.5 GiB   8300  Linux filesystem

Explain:
sda2 (/mnt/)
mkfs -t ext4 /dev/sda2

sda1 (/mnt/boot)
mkfs -t fat /dev/sda1

sda4 (/mnt/data)
mkfs -t ext4 /dev/sda4

mkswap /dev/sda3
swapon /dev/sda3

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
mount /dev/sda4 /mnt/data

2. Install base package into /mnt
pacstrap -i /mnt base net-tools

3. Create fstab into /mnt/
genfstab -U -p /mnt >> /mnt/etc/fstab

4. Install and configure a bootloader
pacman -S gummiboot
gummiboot install
nano /boot/loader/entries/arch.conf
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=/dev/sdaX rw

5. reboot


1. Update the database
pacman -Syu

2. Install X Window System
sudo pacman -S xorg-server xorg-xinit xorg-utils xorg-server-utils mesa

3. Install video driver for intel
a. pacman -Ss | grep intel
extra/intel-tbb 4.3_20141204-1
extra/intel-ucode 20140913-1
extra/libva-intel-driver 1.5.0-1
extra/xf86-video-intel 2.99.917-1 (xorg-drivers xorg) [installed]

b. pacman  -S  xf86-video-intel

4. Test x window
startx





1. Install desktop environment of cinnamon
sudo pacman -S cinnamon

2. Display manager (a graphical login program)
sudo pacman –S gdm
sudo systemctl start gdm

Reference:
1. How to Install Arch Linux with UEFI
2. Installing GUI (Cinnamon Desktop) and Basic Softwares in Arch Linux
3. Arch Linux Downloads
4. USB flash installation media

2014年12月25日 星期四

[Archlinux][ibus] Install input method into Archlinux


  1. Install ibus
    pacman -S ibus
  2. Install input method package
    pacman -S ibus-rime
  3. Edit order to show which one is the first choice of your input method.
    vim  ~/.config/ibus/rime/default.yaml
    Modify following file to another
    schema_list:
      - schema: luna_pinyin
      - schema: cangjie5
      - schema: luna_pinyin_fluency
      - schema: luna_pinyin_simp
      - schema: luna_pinyin_tw

    schema_list:
      - schema: cangjie5
      - schema: luna_pinyin
      - schema: luna_pinyin_fluency
      - schema: luna_pinyin_simp
      - schema: luna_pinyin_tw
Reference:

[Archlinux][Cinnamon] How to install cinnamon in Archlinux

  1.   pacman -S xorg
  2.   pacman -S xf86-input-synaptics
  3.   Find VGA card
      lspci | grep VGA
  4.   Install VGA driver
      Search all VGA driver
      pacman -Ss | grep xf86-video
      sudo pacman -S xf86-video-vesa (virtualbox VGA driver)
  5.   Install startx command
      pacman -S xorg-xinit
  6.   Install cinnamon theme 
      pacman -S cinnamon
      pacman -S gdm
  7.   Install system management
      pacman -S systemd
  8.   Enable gdm all the time
      sudo systemctl enable gdm
      sudo systemctl start gdm

Reference :

2014年12月9日 星期二

[GitHub] How to clone the code from github

First  :
Make sure the key have post github websit.
Step 1: Check for SSH keys
cd ~/.ssh

Step 2: Generate a new SSH key
ssh-keygen -t rsa -C "your_email@example.com"

Step 3: cat ~/.ssh/id_rsa.pub
ssh-rsa AAAx3NzaC1yc2EAAAABIwAAAQEAsyKnnxxxxF0GUxxkkAkI+41FDLZXRKC6QL/GuzcheyL3tvcUNNG/GyqgBSKOglUz+MvAy9PvObOpd1wVnPvFL/djmtvxxx/do93BCqX2xxvo/5Q3xM8xxxxxxxGJ/kKsWb0+KYi8xxxxxLRKz5FQTlnE8FyungbZxxxCKNqj/3YDV13RxxG61DIJvKxx5Q== your_email@example.com
Copy the above code to following the webpage of github.
1. Go to setting page
2. Press "SSH key"
3. Press "Add SSH key"
4. Paste the above code into the column.


Step 4: Test everything out
ssh -T git@github.com

# Hi username! You've successfully authenticated, but GitHub does not

#####################################################################
Git Clone  :
Go to any folder which you want and copy any SSH clone URL (e.g. "git@github.com:martinh/libconfuse.git").
Type the following command. After that enjoy your travel around the code of open source.
git clone git@github.com:martinh/libconfuse.git

Reference :

2014年11月24日 星期一

[VirtualBox][Vagrant] How to install and use vagrant



Install :

1. Go to Vagrant and download suitable package and execute it.
2. Go to VirtualBox and download following package.
VirtualBox platform packages
VirtualBox Extension Pack


Usage:


1. Create a folder
$ mkdir happy-1
$ cd happy-1
2.
Choose box Windows box or Mac OS box or following box
hashicorp/precise64: Ubuntu 12.04 LTS (Precise Pangolin) 64-bit
ubuntu/trusty64: Ubuntu 14.04 LTS (Trusty Tahr) 64-bit
chef/centos-6.5: CentOS 6.5 x64
chef/debian-7.4: Debian 7.4 x64
yungsang/coreos: CoreOSsupport Docker
williamyeh/ubuntu-trusty64-docker: Ubuntu 14.04 LTSsupport Docker
williamyeh/debian-jessie64-docker: Debian Jessiesupport Docker
Choose to practice docker.
$ vagrant init yungsang/coreos
$ vagrant up
After system startup, then ssh into machine and have fun.
vagrant ssh

Reference :
1. Vagrant Tutorial(2)跟著流浪漢把玩虛擬機
2. Windows Boxes for Vagrant Courtesy of Modern.ie
3. Issue tracker for OS X Mavericks Vagrant box