2015年5月17日星期日

Patch Linux kernel source codes from 3.19.8 to 4.0.3

The version structure of the Linux kernel:

If we want to "upgrade" the Linux 3.19.8 source codes to Linux 4.0.3, we have to:

1. Rollback Linux 3.19.8 source codes to Linux 3.19 source codes by the 3.19.8 patch file:
cd linux-3.19.8
patch -p1 -R -i ../patch-3.19.8

2. Update the Linux 3.19 source codes to Linux 4.0 source codes by the 4.0 patch file:
patch -p1 -i ../patch-4.0

3. Update the Linux 4.0 source codes to Linux 4.0.3 source codes by the 4.0.3 patch file:
patch -p1 -i ../patch-4.0.3

2015年5月16日星期六

Notes for building BLFS 7.7 in the offline mode

Udisk 2.1.4 and dconf
Add “disable-man” option otherwise the build process will try to download the document sources from internet

gvfs
Add “disable-documentation” option otherwise the build process will try to download the document sources from internet

lxdm
Add “--without-pam” if PAM is not available

gnome keyring
Add “disable-doc” option otherwise the build process will try to download the document sources from internet


libsecret
Use “disable-manpages” option otherwise the build process will try to download the document sources from internet

Warning message “Cannot determine user of subject” for LXDE in BLFS 7.7

Sometimes this warning message will be shown after LXDE startup because lxpolkit is running while polkitd is not ready (race condition). One of the solutions is add a delay in" /usr/bin/startlxde" - add a delay time before “Start the LXDE session”:



org.freedesktop.ConsoleKit cannot start successfully in BLFS 7.7

1. Use “ck-list-sessions” command to check a seat is got or not.
2. Check the permission, owner and group of the “dbus-daemon-launch-helper”. (In BLFS 7.7, the location of this program is “/usr/libexec/”.
The correct setting should be:
The permission: -rwsr-x---
The owner: root
The group: messagebus

Fix the owner and group:
chown root.messagebus dbus-daemon-launch-helper

Fix the permission:
chmod 4750 dbus-daemon-launch-helper

Strip and Grub in BLFS 7.7

After LFS packaged are built successfully, LFS suggests us to run “strip --strip-debug” to save space (in the section 6.72). If you check the grub modules in /usr/lib/grub/i386-pc:


And then if you run the command “strip --strip-unneeded” (in the section “Notes on Building Software” of BLFS 7.7), the file size of the grub modules become smaller:


However, if you use this version to install grub in a new disk, you will find the grub cannot load the configuration file (/boot/grub/grub.cfg) and also cannot detect any disk:


The option “--strip-unneeded” will remove the static symbols so the caller (grub) will not find the static function or variable from the stripped libraries. And actually those grub modules contain lots of static variables and functions. That’s why grub cannot detect any disk because it cannot call the static "detect disk" function.


Therefore, if you re-build the grub with the grub source package and then reinstall the grub (I.e. the version without “strip --strip-unneeded”), grub will work properly.

2015年5月1日星期五

Samsung S6 的菜單 (menu) 鍵

Samsung S6 沒有菜單 (menu) 實體鍵, 對於支援菜單的舊有 android 程序 (如 Battle.net 手機驗證器), 如何呼叫菜單出來變成了一個重要事情.....

雖然網上有教學說要 Root 機才可以解決此問題, 但其實有一個不用 Root 機也可以呼叫菜單的方法:

1. 進入設定畫面
2. 選擇 "協助工具"
3. 選擇 "敏銳度與互動"
4. 選擇 "輔助快選"
5. 選擇 "開" 後螢幕會出現一個圓形圖示

在任何畫面按這個"圓形圖示"便會出現一個菜單, 選 "更多選項" 便等於按下菜單鍵了