<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>kernel &#8211; richliu&#039;s blog</title>
	<atom:link href="https://richliu.com/tag/kernel/feed/" rel="self" type="application/rss+xml" />
	<link>https://richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Fri, 19 Jun 2026 08:12:02 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>KianV Risc-V + Linux 7.1 uLinux</title>
		<link>https://richliu.com/2026/06/19/6546/kianv-risc-v-linux-7-1-ulinux/</link>
					<comments>https://richliu.com/2026/06/19/6546/kianv-risc-v-linux-7-1-ulinux/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 19 Jun 2026 08:12:00 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[RiscV]]></category>
		<category><![CDATA[隨手札記]]></category>
		<category><![CDATA[BusyBox]]></category>
		<category><![CDATA[FPGA]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nommu]]></category>
		<category><![CDATA[RISC-V]]></category>
		<category><![CDATA[Tiny Tapeout]]></category>
		<category><![CDATA[uLinux]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=6546</guid>

					<description><![CDATA[<p>最終目標就是要在 Tiny Tapeout (TT) 開一顆 SoC ，不過在這之前，我也想先做一些實驗，驗證 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2026/06/19/6546/kianv-risc-v-linux-7-1-ulinux/">KianV Risc-V + Linux 7.1 uLinux</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1375" height="427" src="https://richliu.com/wp-content/uploads/2026/06/image.png" alt="" class="wp-image-6547" srcset="https://richliu.com/wp-content/uploads/2026/06/image.png 1375w, https://richliu.com/wp-content/uploads/2026/06/image-600x186.png 600w, https://richliu.com/wp-content/uploads/2026/06/image-768x238.png 768w, https://richliu.com/wp-content/uploads/2026/06/image-816x253.png 816w" sizes="(max-width: 1375px) 100vw, 1375px" /></figure>



<p>最終目標就是要在 Tiny Tapeout (TT) 開一顆 SoC ，不過在這之前，我也想先做一些實驗，驗證這些想法是否可行。</p>



<p>KianRiscV 是一顆完整的 RISC-V CPU，也在 TT 開過 IC，但這顆對我們來說還是太大了（雖然說太大也只大一點）。為了省錢，而且這麼大顆也沒有必要，所以我們還是要縮小 Size。在 kianRiscV/linux_socs/kianv_harris_mcycle_edition 下，看說明是在 ULX3S 85F（FPGA Lattice ECP5 LFE5U-85F-6BG381C，有 Open Source 的 Tool）下也可以執行的 uLinux RISC-V CPU core，不僅符合我的目標，而且對我超級友善啊。</p>



<p>裡面還有預設的 Linux kernel 6.1.14 和一個 busybox initramfs，不過我就想，要就做全套嘛，不如把 Linux kernel 換到最新的 7.1 試試看？換到 Linux kernel 7.1 後，碰到的</p>



<h3 class="wp-block-heading">第一個問題是 Image 太大，Bootloader 預設的 memcpy 量不夠大</h3>



<p>Booloader memcpy 從 4MB 改到 6MB就可以解決</p>



<h3 class="wp-block-heading">第二個問題：&#8221;broken padding&#8221; </h3>



<p>用 `dd` 從舊 kernel 複製 initramfs，但新 kernel 會出現問題，必須用 `fakeroot` 重新打包一份新的 cpio image。 </p>



<h3 class="wp-block-heading">第三個問題：使用預設的 initramfs 開機時，無法進入 shell</h3>



<p>錯誤訊息如下</p>



<pre class="wp-block-preformatted">  [   40.383751]     TERM=linux<br />  sh: waitpid: Function not implemented<br />  sh: waitpid: Function not implemented<br />  sh: waitpid: Function not implemented<br />  sh: waitpid: Function not implemented<br />  sh: waitpid: Function not implemented<br />  init started: BusyBox v1.36.0 (2023-05-16 20:02:22 CEST)<br />  starting pid 18, tty '': '/etc/init.d/rcS'<br />  sh: waitpid: Function not implemented<br />  sh: waitpid: Function not implemented<br />  sh: waitpid: Function not implemented<br />  sh: waitpid: Function not implemented<br />  mkdir: can't create directory '/': Function not implemented<br />  mkdir: can't create directory '/': Function not implemented<br />  mount: mounting devpts on /dev/pts failed: No such file or directory<br />  mount: mounting tmpfs on /dev/shm failed: No such file or directory</pre>



<p>這個問題是，Linux kernel mainline 的 <strong>RISC-V 32-bit 是 &#8220;time64-only&#8221; 架構</strong>：它是在 y2038 之後才進入 kernel 的，所以「刻意」不提供那些使用 32-bit 時間的舊 syscall（wait4、gettimeofday……）。而舊的 initramfs 是舊架構的，因此呼叫就會出錯，這需要換成新的 rootfs 來解決。在我處理的時候，buildroot 已經可以產生這個方案，使用 uClibc-ng 函式庫就可以了。</p>



<h3 class="wp-block-heading">第四個問題：&#8221;out of memory&#8221;</h3>



<pre class="wp-block-preformatted"><br />  [   47.660665] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100 ]---<br />  sh: out of memory<br />   out of memory</pre>



<p>本來以為是 bFLT 的 heap/stack 不夠，所以把 stack 從 16KB 改為 1MB——結果沒用。最後發現這個問題和第六個問題是一樣的，本質上是 malloc 的問題。</p>



<h3 class="wp-block-heading">第五個問題：解完以上的問題之後，還是沒進到 shell，但是也沒有錯誤訊息。</h3>



<p>因為大部分都是 AI 解的，所以這邊 AI 也寫了一個程式，不過編譯的時候沒加 `-fPIC`，對 nommu 的 flat binary 來說，程式被載到記憶體的任意位置，所有位址都得是「位置無關」的。non-PIC 的程式用絕對位址（`lui aX, 0xNNN`）去抓字串或全域變數。這件事我知道，但是不常碰到，也很難意會到。光這個 Bug 就解了十輪左右，Claude 還想繼續解，但是我覺得應該要換個思路。</p>



<p>最後是自己去找了 mini-rv32ima，請 AI 分析差異在哪邊，AI 分析的同時還用了 <strong>qemu</strong> 直接執行程式（哎呀，我怎麼沒想到）。Claude 用了 qemu 後速度就快多了，很快就找到問題是在 <strong>-fPIC</strong>。</p>



<h3 class="wp-block-heading">第六個問題：<strong>malloc 在 nommu 上回 NULL</strong></h3>



<p>直接 mmap 一塊記憶體 → 成功；但 malloc 任何大小 → 都回傳 NULL。把 uClibc 改成 MALLOC_SIMPLE（純 mmap、為小系統設計的實作）就可以了。</p>



<p>雖然中間 claude 走錯很多次路，都需要人為校正回來，尤其是 -fPIC 這件事，我也沒意會到，只是覺得應該不會這樣複雜，所以試著要走別的路。這種經驗性的問題 Claude 是無法即時察覺的。或許 YOLO mode 可能可以最終也取得成本，但是這中間應該還要多燒更多的 tokens 達到目地，例如也有可能 AI 解不掉就生氣重寫一個 shell 或是大改 Linux kernel 之類的。</p>



<p>不過跟 AI debug 的過程還頗有趣的，想法和解題思路很像我會做的事，可能最終我也會走到這邊，但是花的時間會多非常非常多，畢竟以前就幹過類似的事情，只能說青春不值錢啊。以前和現在最大的差別是，有了 AI agents，我應該沒這個耐心自己解題，而是用 supervisor 的角度去解決問題。其實電腦科技發展一直是節省大家時間的，只是效果不會像 AI agents 這麼明顯，像是 assembly 到 C，或是第一次有了 database，dbase 大行其道，perl/php/甚至是 python 對 C/C++ 的衝擊。不過問題還是在於，會去研究底層的人會愈來愈少，但是未來可能會有更多新的不同的工具。但是這也沒關係，有需求就是有人會去弄的（或是花錢找人弄）。就像現在 assembly 很少人會寫，要用到的時候再寫個一點，但是我小時候，大家都要學上一些 assembly，望向我用 Microsoft ASM 寫 editor 的經歷，雖然曾經寫過，但是現在要不要學做 CPU，我也不太想碰 assembly 了。</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2026/06/19/6546/kianv-risc-v-linux-7-1-ulinux/">KianV Risc-V + Linux 7.1 uLinux</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2026/06/19/6546/kianv-risc-v-linux-7-1-ulinux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>FreeBSD Build Kernel</title>
		<link>https://richliu.com/2024/09/11/6040/freebsd-build-kernel/</link>
					<comments>https://richliu.com/2024/09/11/6040/freebsd-build-kernel/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Tue, 10 Sep 2024 16:13:42 +0000</pubDate>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[kernel]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=6040</guid>

					<description><![CDATA[<p>Google Bing 查了半天不如問 Claude ，雖然現在LLM很方便，不過還是會有小問題，記錄一下過程 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2024/09/11/6040/freebsd-build-kernel/">FreeBSD Build Kernel</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Google Bing 查了半天不如問 Claude ，雖然現在LLM很方便，不過還是會有小問題，記錄一下過程</p>



<span id="more-6040"></span>



<p>我的環境是 ARM64，所以以 ARM64 為主，編的版本是 15.0-Current</p>



<pre class="wp-block-preformatted"># Install git first
# pkg install git
# Install Source code from Git 
git clone https://git.freebsd.org/src.git /usr/src

cd /usr/src/sys/arm64/conf
cp GENERIC MYKERNEL
vim MYKERNEL</pre>



<p>以下應該可以整理成一個 script</p>



<pre class="wp-block-preformatted">cd /usr/src

# Remove old file
mkdir /usr/obj/tmp
chflags -R noschg /usr/obj/*
rm -rf /usr/obj/*

# Build world and kernel 
# Cannot use 128 cores to build that because it might cause build problem. 
# reduce it to 16 might be better 
make -j 16 buildworld
# Clean kernel if necesssary 
# make -j 16 cleankernel KERNCONF=MYKERNEL
make -j 16 buildkernel KERNCONF=MYKERNEL

# Install world and kernel to a temperory directory
mkdir /usr/obj/tmp
make installworld DESTDIR=/usr/obj/tmp
make installkernel KERNCONF=MYKERNEL DESTDIR=/usr/obj/tmp

# copy release document to the directory
make distribution DESTDIR=/usr/obj/tmp

# build release
cd release
make -j 16 release KERNCONF=MYKERNEL NODOC=yes NOPORTS=yes NOSRC=yes</pre>



<p>Release files (iso, image 等等) 會在<br />/ussr/obj/usr/src/arm64.aarch64/release 下</p>



<h3 class="wp-block-heading">Clean kernel </h3>



<pre class="wp-block-preformatted">make cleankernel KERNCONF=MYKERNEL</pre>



<p>修改 EFI_STAGING_SIZE，修改 /usr/src/stand/efi/loader/copy.c , 找到</p>



<pre class="wp-block-preformatted">#define DEFAULT_EFI_STAGING_SIZE</pre>



<p>統統改成要的值，ex: 100 ，這樣就好，暴力解決</p>



<h3 class="wp-block-heading">Enable exec=&#8221;copy_staging auto&#8221; in /boot/loader.conf</h3>



<p>這個功能因為要在編 world 放到 loader.conf 內，這樣 iso 和 memstick 檔案內才，所以我用了一個 hacker 的手法，編輯 release/Makefile ，約 Line 188，加上</p>



<pre class="wp-block-preformatted">echo exec=\"copy_staging disable\" >> ${.TARGET}/boot/loader.conf</pre>



<h3 class="wp-block-heading">Enable Early Printf In Kernel </h3>



<p>編輯  MYKERNEL ，加上[<a href="https://github.com/freebsd/freebsd-src/blob/3c95262007ef934c9e98b87460a48889bf42c1b9/sys/kern/kern_cons.c#L76" target="_blank" rel="noopener">ref</a>]</p>



<pre class="wp-block-preformatted">options EARLY_PRINTF=pl011</pre>



<p></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2024/09/11/6040/freebsd-build-kernel/">FreeBSD Build Kernel</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2024/09/11/6040/freebsd-build-kernel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Kernel Install Fail Because Broadcom NetXtreme 100G DKMS Driver Build Failed.</title>
		<link>https://richliu.com/2022/09/27/4830/linux-kernel-install-fail-because-broadcom-netxtreme-100g-dkms-driver-build-failed/</link>
					<comments>https://richliu.com/2022/09/27/4830/linux-kernel-install-fail-because-broadcom-netxtreme-100g-dkms-driver-build-failed/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Tue, 27 Sep 2022 08:14:23 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ARM]]></category>
		<category><![CDATA[aarch64]]></category>
		<category><![CDATA[arm64]]></category>
		<category><![CDATA[broadcom]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Driver]]></category>
		<category><![CDATA[kernel]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=4830</guid>

					<description><![CDATA[<p>Environment is CentOS 8, broadcom 100G NetXtreme-E seri [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2022/09/27/4830/linux-kernel-install-fail-because-broadcom-netxtreme-100g-dkms-driver-build-failed/">Linux Kernel Install Fail Because Broadcom NetXtreme 100G DKMS Driver Build Failed.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Environment is CentOS 8, broadcom 100G NetXtreme-E series driver . <br />Host : Ampere Altra Platform <br /><br />if rebuild the CentOS kernel and there was previous Broadcom nic driver alredy installed, it will trigger dkms to rebuild the driver on current kernel. <br /><br />make install error as following</p>



<span id="more-4830"></span>



<pre class="wp-block-preformatted">[root@localhost linux-4.18.0-80.11.2.el8_0]# make install                                            [55/2101]
/bin/sh ./arch/arm64/boot/install.sh 4.18.0 \
arch/arm64/boot/Image System.map "/boot"
dkms: running auto installation service for kernel 4.18.0
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Deprecated feature: REMAKE_INITRD
Sign command: /lib/modules/4.18.0/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub                                                               Deprecated feature: REMAKE_INITRD                                                                             
Building module:
Cleaning build area...(bad exit status: 2)
make -j160 KERNELRELEASE=4.18.0 -C /lib/modules/4.18.0/build M=/var/lib/dkms/bnxt_en/1.10.2.221.0.114.0/build
KVER=4.18.0...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.18.0 (aarch64)
Consult /var/lib/dkms/bnxt_en/1.10.2.221.0.114.0/build/make.log for more information.
Sign command: /lib/modules/4.18.0/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Deprecated feature: REMAKE_INITRD

Building module:
Cleaning build area...(bad exit status: 2)
make -j160 KERNELRELEASE=4.18.0 -C /lib/modules/4.18.0/build M=/var/lib/dkms/bnxt_re/221.0.114.0/build KVER=4$
18.0 BNXT_EN_INC=/var/lib/dkms/bnxt_re/221.0.114.0/source BNXT_QPLIB_INC=/var/lib/dkms/bnxt_re/221.0.114.0/so$
rce...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.18.0 (aarch64)
Consult /var/lib/dkms/bnxt_re/221.0.114.0/build/make.log for more information.
 Done.
</pre>



<p>And check the log file &#8220;/var/lib/dkms/bnxt_re/221.0.114.0/build/make.log&#8221;<br /><br />It shows </p>



<pre class="wp-block-preformatted">DKMS make.log for bnxt_en-1.10.2.221.0.114.0 for kernel 4.18.0 (aarch64)
Tue Sep 27 15:41:04 CST 2022
Makefile:603: arch/aarch64/Makefile: No such file or directory
make[2]: *** No rule to make target 'arch/aarch64/Makefile'.  Stop.
</pre>



<p>Seems cannot find the Makefile, that because the drvier cannot locate right Makefile, because the include architecture is arm64, not aarch64 in Linux kernel . <br /><br />By the way, basicly arm64 and aarch64 are the same thing, I don&#8217;t know why it shows aarch64 on kernel architecture and use arm64 as fold name. probably some traditional history. <br /><br />solution is easy, go to the include folder and link arm64 to aarch, DONE! ex:</p>



<pre class="wp-block-preformatted">cd /lib/modules/4.18.0/build/arch
ln -sf arm64 aarch64
</pre>
<p>The post <a rel="nofollow" href="https://richliu.com/2022/09/27/4830/linux-kernel-install-fail-because-broadcom-netxtreme-100g-dkms-driver-build-failed/">Linux Kernel Install Fail Because Broadcom NetXtreme 100G DKMS Driver Build Failed.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2022/09/27/4830/linux-kernel-install-fail-because-broadcom-netxtreme-100g-dkms-driver-build-failed/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Build Ampere CentOS Kernel</title>
		<link>https://richliu.com/2022/03/17/4555/build-ampere-centos-kernel/</link>
					<comments>https://richliu.com/2022/03/17/4555/build-ampere-centos-kernel/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 17 Mar 2022 07:44:25 +0000</pubDate>
				<category><![CDATA[ARM]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[aarch64]]></category>
		<category><![CDATA[arm64]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[kernel]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=4555</guid>

					<description><![CDATA[<p>Personal Note Install Necessary Packages Install packag [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2022/03/17/4555/build-ampere-centos-kernel/">Build Ampere CentOS Kernel</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Personal Note</p>



<span id="more-4555"></span>



<h2 class="wp-block-heading">Install Necessary Packages</h2>



<p>Install packages, it should have to install other packages like openssl-dev.<br /><br />get  package <a href="https://www.gitdetail.com/repositories/AmpereComputing/developer/646825" target="_blank" rel="noreferrer noopener">ampere-8.3.0-20191025-dynamic-nosysroot-nativetools.tar.xz</a> from Ampere customer connect or <a href="https://www.gitdetail.com/repositories/AmpereComputing/developer/646825" target="_blank" rel="noreferrer noopener">ampere development source web</a>. </p>



<pre class="wp-block-code"><code>yum groupinstall "Development Tools"

yum -y install ncurses-devel
yum -y install hmaccalc zlib-devel binutils-devel elfutils-devel libelf-devel newt-devel python-devel
yum -y install audit-libs-devel numactl-devel pciutils-devel openssl-devel
yum -y install bc bison perl-ExtUtils-Embed.noarch xmlto asciidoc
rpm –ivh kernel-4.18.0-80.11.2.el8.&lt;version>.src.rpm


mkdir -p /opt/amp
tar -xf ampere-8.3.0-20191025-dynamic-nosysroot-nativetools.tar.xz -C /opt/amp
export PATH=/opt/amp/ampere-8.3.0-20191025-dynamic-nosysroot/bin:$PATH;
which gcc
/opt/amp/ampere-8.3.0-20191025/bin/gcc
</code></pre>



<p>if gcc is not in /opt/amp, please check your directory in /opt/amy </p>



<h2 class="wp-block-heading">Build Kernel</h2>



<p>command to build kernel</p>



<pre class="wp-block-preformatted">cd /root/rpmbuild/SOURCES/
tar xvf linux-4.18.0-80.11.2.el8_0.tar.xz
cd linux-4.18.0-80.11.2.el8_0
cp ../kernel-aarch64-emag.config .config
make olddefconfig</pre>



<p>Try build once and make sure everything is ok</p>



<pre class="wp-block-preformatted">make -j `nproc`</pre>



<p>If buiild OK, generate RPM files. </p>



<pre class="wp-block-preformatted">make -j `nproc` rpm-pkg</pre>



<p>if everything is ok, the RPM files will be on /root/rpmbuild/RPMS/aarch64/</p>



<h2 class="wp-block-heading">Install RPM packages</h2>



<pre class="wp-block-preformatted">/root/rpmbuild/RPMS/aarch64
yum localinstall kernel-4.18.0-1.aarch64.rpm kernel-headers-4.18.0-1.aarch64.rpm</pre>
<p>The post <a rel="nofollow" href="https://richliu.com/2022/03/17/4555/build-ampere-centos-kernel/">Build Ampere CentOS Kernel</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2022/03/17/4555/build-ampere-centos-kernel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Kernel 4.7 PPTP pass through issue</title>
		<link>https://richliu.com/2016/09/02/2022/linux-kernel-pptp-pass-through-issue/</link>
					<comments>https://richliu.com/2016/09/02/2022/linux-kernel-pptp-pass-through-issue/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 02 Sep 2016 02:48:09 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[nat]]></category>
		<category><![CDATA[pptp]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=2022</guid>

					<description><![CDATA[<p>升級到 Linux kernel 4.7 之後, 突然 PPTP pass through 有問題. 有人提供 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2016/09/02/2022/linux-kernel-pptp-pass-through-issue/">Linux Kernel 4.7 PPTP pass through issue</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>升級到 Linux kernel 4.7 之後, 突然 PPTP pass through 有問題.<br />
有人提供了解決方案</p>
<p>在 /etc/sysctl.conf 加上</p>
<pre lang="text">
net.netfilter.nf_conntrack_helper=1
</pre>
<p>這樣就可以了, 不知道為什麼預設值改了.<br />
ref.<br />
<a href="https://bugzilla.kernel.org/show_bug.cgi?id=152101" target="_blank" rel="noopener">Bug 152101 &#8211; Updating from 4.6.4 to 4.7 breaks &#8220;pptp pass through&#8221;</a></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2016/09/02/2022/linux-kernel-pptp-pass-through-issue/">Linux Kernel 4.7 PPTP pass through issue</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2016/09/02/2022/linux-kernel-pptp-pass-through-issue/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Kubuntu 15.04 + Broadwell / Intel i7-5775C 的問題</title>
		<link>https://richliu.com/2015/08/28/1849/kubuntu-15-04-broadwell-intel-i7-5775c-%e7%9a%84%e5%95%8f%e9%a1%8c/</link>
					<comments>https://richliu.com/2015/08/28/1849/kubuntu-15-04-broadwell-intel-i7-5775c-%e7%9a%84%e5%95%8f%e9%a1%8c/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 28 Aug 2015 13:05:06 +0000</pubDate>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Broadwell]]></category>
		<category><![CDATA[i7-5775c]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unstable]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=1849</guid>

					<description><![CDATA[<p>之前升級了 Broadwell 架構的 i7-5775C 之後, 裝了 Windows 7 並且也升級到 Wi [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2015/08/28/1849/kubuntu-15-04-broadwell-intel-i7-5775c-%e7%9a%84%e5%95%8f%e9%a1%8c/">Kubuntu 15.04 + Broadwell / Intel i7-5775C 的問題</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>之前升級了 Broadwell 架構的 i7-5775C 之後, 裝了 Windows 7 並且也升級到 Windows 10 . （見 <a href="https://richliu.com/2015/08/06/1827/" target="_blank">電腦升級 i7 5775c + ASUS Z97-A/USB3.1</a> ) 似乎沒有太大的問題.<br />
問題在於, 我就是手賤, 喜歡裝 Linux 來用. 這下慘了, 折磨了我一個月才搞定這個問題.<br />
<span id="more-1849"></span></p>
<p>首先, Kubutun 15.04 支援 UEFI, 所以這部份安裝完後可以正常 Dual Boot 到 Windows/Linux.<br />
Linux 對於 Broadwell i7-5775C 的支援, 大家的講法不一, 目前看起來應該是這個 URL 比較常見<br />
<a href="http://www.phoronix.com/scan.php?page=news_item&amp;px=core-i7-5775c-oc-fixed-mode" target="_blank" rel="noopener">Working Around The Intel Core i7 5775C Broadwell Stability Issue On Linux</a><br />
圖中貼了一個 crash , 我也在舊版的 Kernel 見過, 文章表示 enable CPU OC Fix mode 就可以解決這個問題.</p>
<p>我的血淚史是: ASUS 在我裝完機之後又新出一個 BIOS, 這個 BIOS 解決了 i7 5775 一直會出現 Machine Exception Check 的問題.<br />
這個問題只要是在機器上執行 Linux 就會出現, 而且如果是裝 Virtual Machine 時, 再裝 Linux 也會出現 (真是神祕啊).<br />
還沒有安裝新的 BIOS 之前, 這問題搞倒我了, 最後還是靠上面那一篇的類似解決方法才可以正常完成安裝(ASUS BIOS 沒有這個選項, 所以我是關 SpeedStep <a href="http://unix.stackexchange.com/questions/215164/does-linux-run-correctly-with-speedstep-on-broadwell" target="_blank" rel="noopener">Does Linux run correctly with SpeedStep on Broadwell?</a>)而且還是不穩定.<br />
然後我在將近一個月後之才看到有新的 BIOS Release.<br />
ASUS 你不可以早點做嗎?</p>
<p><del>另一個問題就是上面那篇文章的錯誤訊息, 我本來想回報到 Linux kernel team bug system , 但是想想是不是應該先換到最新版的 Linux kernel 再試呢?</del><br />
<del> Kubuntu 15.04 最新的 Kernel 是 3.19.0-26-generic</del><br />
<del> 這時候就要找 <a href="https://wiki.ubuntu.com/Kernel/MainlineBuilds" target="_blank" rel="noopener">Ubuntu mainline kernel </a>了, 客倌看到這邊應該會想, 要我編 Linux kernel , 殺了我吧.</del></p>
<p><del>沒錯, 不過不用殺頭, 我自己也很久沒有下去看/編 Kernel 的東西了, 中間有個連結 Upstream kernels archive <a href="http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D" target="_blank" rel="noopener">http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D</a> 點下去就對了.</del></p>
<p><del>會看到很多目錄, 我是選最新的 v4.2-rc7-unstable (註: 一直會更新, 所以不見得最新的會和我一樣)</del><br />
<del> 下載 generic 的就好了, 我是 x64 的系統, 所以下的是 amd64 image .</del><br />
<del> linux-image-4.2.0-040200rc7-generic_4.2.0-040200rc7.201508162030_amd64.deb</del><br />
<del> linux-headers-4.2.0-040200rc7-generic_4.2.0-040200rc7.201508162030_i386.deb</del><br />
<del> 下載完之後再用 root 執行 dpkg -i 就好了</del><br />
<del> # sudo dpkg -i linux-image-4.2.0-040200rc7-generic_4.2.0-040200rc7.201508162030_amd64.deb</del></p>
<p><del>換了 Linux kernel 4.2RC 之後, Working Around The Intel Core i7 5775C Broadwell Stability Issue On Linux 這個問題就沒有再出現過了.</del></p>
<p>以上解決方案有錯, 仍然會出現 MCE.<br />
根據 Linux Kernel Bug Report 上的說法,<br />
在 bootup 時的 kernel 參數加上 &#8220;processor.max_cstate=0 intel_idle.max_cstate=0 idle=poll&#8221; 就可以暫時避開這個問題.<br />
以上這個暫時解決方案會讓 CPU 滿載, 所以建議可以在安裝的時候使用. </p>
<p>如果要穩定一點的解決方案, 可以換到最新版的 Microcode , 原因可能是 Intel 在 Broadwell 仍然未解 TSX 的 Bug<br />
而且也沒有更新 Microcode(目前最新是今年一月), 所以各家 Linux Distributions 也無法更新 Microcode 解決這個問題.<br />
如果 glibc compile 時並未打開 TSX support, 看起來不會踏到這個 BUG<br />
但是如果是有 enable TSX support 的 Linux Distribution , 就會踏到這個 BUG</p>
<p>Ubuntu 下的解決方式如下<br />
1) 下載 iucode-tool<br />
   $ sudo apt-get install iucode-tool<br />
2) 下載新版的 Microcode<br />
   $ git clone https://github.com/bgw/bdw-ucode-update-tool.git<br />
   $ cd bdw-ucode-update-tool<br />
   $ sudo ./install.sh &#8211;persist-debian<br />
3) 驗證, microcode 版本是 0x13<br />
   $ cat /proc/cpuinfo | grep microcode<br />
   microcode       : 0x13</p>
<p>這還是有缺點,<br />
1) 新裝系統<br />
2) 更新 Kernel<br />
都還是要跑一次這樣的流程, 最好還是跟主機板廠商連絡請他們更新 BIOS .<br />
這邊我就要抱怨 ASUS 了, 搞了一個多月來來回回還是在講同一個問題, 至現在 (11/9) 為止仍然沒有更新 BIOS.</p>
<p>更新完後系統穩定, 並未碰到當機事件了. </p>
<p>後記, 個人覺得以 SoC Errata 的處理, Intel 非常槽糕, 我知道新功能的確可能會有問題.<br />
但是出廠前 Linux/Windows 都應該要測試過才會出門吧.<br />
沒有想到只有 Windows OK. </p>
<p>我在以前根本沒有想到買新 CPU 要先考慮在 Linux 上會不會有問題.<br />
真是 WTF</p>
<p>ref.<br />
<a href="https://bugzilla.kernel.org/show_bug.cgi?id=103351" target="_blank" rel="noopener">Bug 103351 &#8211; Machine check exception on Broadwell quad-core with SpeedStep enabled </a><br />
<a href="https://bugzilla.kernel.org/show_bug.cgi?id=90301" target="_blank" rel="noopener">[haswell] Unable obtain Package Cstates C3 or lower</a></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2015/08/28/1849/kubuntu-15-04-broadwell-intel-i7-5775c-%e7%9a%84%e5%95%8f%e9%a1%8c/">Kubuntu 15.04 + Broadwell / Intel i7-5775C 的問題</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2015/08/28/1849/kubuntu-15-04-broadwell-intel-i7-5775c-%e7%9a%84%e5%95%8f%e9%a1%8c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[Gentoo] 裝 Brother HL-2240D Driver + Samba 分享</title>
		<link>https://richliu.com/2014/10/13/1681/gentoo-%e8%a3%9d-brother-hl-2240d-driver-samba-%e5%88%86%e4%ba%ab/</link>
					<comments>https://richliu.com/2014/10/13/1681/gentoo-%e8%a3%9d-brother-hl-2240d-driver-samba-%e5%88%86%e4%ba%ab/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Sun, 12 Oct 2014 16:28:33 +0000</pubDate>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[隨手札記]]></category>
		<category><![CDATA[cups]]></category>
		<category><![CDATA[HL-2240D]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[samba]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=1681</guid>

					<description><![CDATA[<p>Linux 支援 Brother HD-2240D driver 可以用 Samba + CUPS 提供服務. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2014/10/13/1681/gentoo-%e8%a3%9d-brother-hl-2240d-driver-samba-%e5%88%86%e4%ba%ab/">[Gentoo] 裝 Brother HL-2240D Driver + Samba 分享</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Linux 支援 Brother HD-2240D driver 可以用 Samba + CUPS 提供服務.</p>
<p><span id="more-1681"></span></p>
<p>1. 首先打開 Linux kernel 對 USB print driver 的支援<br />
我是用 genkernel , 所以預設是沒有支援的</p>
<p>Device Drivers &#8212;&gt;<br />
[*] USB support &#8212;&gt;<br />
&lt;m&gt; USB Printer support ==&gt; 選擇<br />
重編 kernel<br />
# genkernel &#8211;no-clean &#8211;no-mrproper all</p>
<p>2. 開機預設 insert usblp driver<br />
# vim /etc/conf.d/modules<br />
加上 usblp</p>
<p>3. 編輯 /etc/portage/package.use 替 CUPS 加上 usb support, 替 samba 加上 cups 支援</p>
<p>sys-print/cups -php usb<br />
net-fs/samba cups</p>
<p># emerge samba cups</p>
<p>記得重啟 cups 和 samba</p>
<p>4. 下載 HL-2240D Driver<br />
<a href="http://support.brother.com/g/b/downloadtop.aspx?c=eu_ot&amp;lang=en&amp;prod=hl2240d_all" target="_blank" rel="noopener">HL-2240D Driver Download</a><br />
我是下載 source code</p>
<p>5. 將印表機開機並插上 Linux 機器,<br />
執行 lpinfo -v</p>
<p># lpinfo -v<br />
network https<br />
network socket<br />
network ipp<br />
network http<br />
network lpd<br />
network ipps<br />
direct usb://Brother/HL-2240D%20series<br />
network smb</p>
<p>如果沒有出現 direct usb://Brother/HL-2240D%20series, 可以看看 usblp 和 cups usb 支援有沒有設好.</p>
<p>6. 解開 Driver 後執行 cupswrapperHL2240D-2.0.4, 這個程式會安裝 HL2240D.ppd 到 /usr/share/cups/model<br />
並且設定好 HL2240D 的印表機.</p>
<p>如果手動設定無效, 可以試試看到/usr/share/cups/model 下執行<br />
# lpadmin -p HL2240D -E -v usb://Brother/HL-2240D%20series -P HL2240D.ppd</p>
<p>7. 查看結果<br />
# lpstat -a<br />
HL2240D accepting requests since Sun Oct 12 22:21:45 2014</p>
<p>8. 編輯 /etc/samba/smb.conf 加上<br />
[printers]<br />
comment = Brother printers<br />
path = /var/spool/samba<br />
browseable = no<br />
guest ok = no<br />
writable = no<br />
printable = yes<br />
public = yes<br />
printer name = HL2240D</p>
<p>重啟 samba.</p>
<p>9. 在 windows 下載 Driver, 解壓之後內有 driver<br />
<a href="http://support.brother.com/g/b/downloadtop.aspx?c=eu_ot&amp;lang=en&amp;prod=hl2240d_all" target="_blank" rel="noopener">HL-2240D Driver Download</a></p>
<p>在網芳可以看到 hl-2240d 的目錄, 可以選連線後選擇要安裝的 Driver.</p>
<p>ref.<br />
<a href="http://wiki.gentoo.org/wiki/Printing" target="_blank" rel="noopener">Gentoo Print Guide </a></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2014/10/13/1681/gentoo-%e8%a3%9d-brother-hl-2240d-driver-samba-%e5%88%86%e4%ba%ab/">[Gentoo] 裝 Brother HL-2240D Driver + Samba 分享</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2014/10/13/1681/gentoo-%e8%a3%9d-brother-hl-2240d-driver-samba-%e5%88%86%e4%ba%ab/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>udev 之後仍然想用原先的 network device rename 的方式修改 interface</title>
		<link>https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/</link>
					<comments>https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 01 Oct 2014 13:46:19 +0000</pubDate>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Predictable Network Interface Names]]></category>
		<category><![CDATA[udev]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=1667</guid>

					<description><![CDATA[<p>在Predictable Network Interface 這件事情出現之前, 很長一段時間, udev 起 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/">udev 之後仍然想用原先的 network device rename 的方式修改 interface</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>在<a href="http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/" target="_blank" rel="noopener">Predictable Network Interface </a>這件事情出現之前, 很長一段時間, udev 起來之後, script 會自動產生 70-persistent-net.rules , 然後所有的 ethernet device 就會在裡面, 如果要改個順序ex: eth0-&gt;eth1 or eth1-&gt;net1, 就在裡面改就好了.</p>
<p>不過總之他們就是改了, 說什麼安全的問題啦, firewall 設定啦.</p>
<p>只是改了之後, 大家討論了很久, 也 try 了很久.<br />
我也是這次因為一定要能動, 所以認真的研究了一下, 目前最安定的設定, 可以正確更改名稱的設定.<br />
1. 在 kernel command line 加上 net.ifnames=0, 這樣就會變原來的 eth0&#8230; blah blah , 可是原先的更改名稱方式還是不能用.</p>
<p>Gentoo 使用者可以改 Kernel Config, 關掉這個選掉</p>
<p>Gentoo Linux  &#8212;&gt;<br />
[ ]   Linux dynamic and persistent device naming (userspace devfs) support</p>
<p>2. 請參照 Gentoo 文件 <a href="http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=4&amp;chap=2#doc_chap4" target="_blank" rel="noopener">2.d. Network Interface Naming</a></p>
<pre># <span class="code-input">udevadm test-builtin net_id /sys/class/net/eth0 2&gt;/dev/null</span>
ID_NET_NAME_MAC=enxc80aa9429d76
ID_OUI_FROM_DATABASE=Quanta Computer Inc.

# <span class="code-input">vim /etc/udev/rules.d/70-net-name-use-custom.rules</span>
<span class="code-comment"># First one uses MAC information, and 70- number to be before other net rules</span>
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="c8:0a:a9:42:9d:76", NAME="lan0"

# <span class="code-input">vim /etc/udev/rules.d/76-net-name-use-custom.rules</span>
<span class="code-comment"># Second one uses ID_NET_NAME_PATH information, and 76- number to be between</span>
<span class="code-comment"># 75-net-*.rules and 80-net-*.rules</span>
SUBSYSTEM=="net", ACTION=="add", ENV{ID_NET_NAME_PATH}=="enp3s0", NAME="wifi0"</pre>
<p>這樣就可以成功了.</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/">udev 之後仍然想用原先的 network device rename 的方式修改 interface</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2014/10/01/1667/udev-%e4%b9%8b%e5%be%8c%e4%bb%8d%e7%84%b6%e6%83%b3%e7%94%a8%e5%8e%9f%e5%85%88%e7%9a%84-network-device-rename-%e7%9a%84%e6%96%b9%e5%bc%8f%e4%bf%ae%e6%94%b9-interface/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Upgrading udev from 171 (or older) to 197</title>
		<link>https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/</link>
					<comments>https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 01 Feb 2013 08:00:17 +0000</pubDate>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[udev]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=1379</guid>

					<description><![CDATA[<p>上次升到 udev + kernel 3.7.1, device 那邊怪怪的, 記錄一下, 以後碰到了可以查  [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/">Upgrading udev from 171 (or older) to 197</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>上次升到 udev + kernel 3.7.1, device 那邊怪怪的, 記錄一下, 以後碰到了可以查</p>
<p><span id="more-1379"></span></p>
<p># eselect news read 18<br />
2013-01-23-udev-upgrade<br />
  Title                     Upgrading udev from 171 (or older) to 197<br />
  Author                    Samuli Suominen <ssuominen @gentoo.org><br />
  Posted                    2013-01-23<br />
  Revision                  1<br />
Upgrading udev from 171 (or older) to 197 will require special attention:</p>
<p>&#8211; Remove udev-postmount from runlevels.</p>
<p>&#8211; The need of CONFIG_DEVTMPFS=y in the kernel; need to verify the fstype for<br />
  possible /dev line in /etc/fstab is devtmpfs (and not, for example, tmpfs)</p>
<p>&#8211; The case of predictable network interface names; if the file<br />
  /etc/udev/rules.d/70-persistent-net.rules is being used for renaming<br />
  network interface names to already existing names, then you need to<br />
  read following bug[1] because it&#8217;s no longer possible. This won&#8217;t<br />
  be a problem with the new predictable network interface name scheme[2].</p>
<p>  [1] http://bugs.gentoo.org/453494<br />
  [2] http://www.freedesktop.org/wiki/Software/systemd/<br />
      PredictableNetworkInterfaceNames</p>
<p>&#8211; Support for older kernels than 2.6.39 is dropped. If you need older kernel<br />
  we recommend you to look into sys-fs/eudev or use local overlay for keeping<br />
  the old ebuild. Remember to also get the distfiles where the patchsets are.<br />
  The upgrade into current stable version of gentoo-sources is recommended.</p>
<p>&#8211; The case of separate /usr; if it worked for you with 171 it will continue<br />
  to work for you with 197. We still recommend initramfs with separate /usr<br />
  mounting capabilities because you might need packages like sys-apps/kbd<br />
  (keymaps in /usr) or net-wireless/bluez (possible keyboard) in early boot.</p>
<p>And read every message printed by the emerge of udev and udev-init-scripts<br />
to ensure the system is in order before booting as this news item might<br />
not be complete.</p>
<p>Apologies if this news came too late for you.<br />
</ssuominen></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/">Upgrading udev from 171 (or older) to 197</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2013/02/01/1379/upgrading-udev-from-171-or-older-to-197/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>OOM &#8211; Out of Memory.</title>
		<link>https://richliu.com/2011/10/01/1128/oom-out-of-memory/</link>
					<comments>https://richliu.com/2011/10/01/1128/oom-out-of-memory/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 30 Sep 2011 17:08:18 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[OOM]]></category>
		<category><![CDATA[out of memory]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=1128</guid>

					<description><![CDATA[<p>OOM &#8211; Out of Memory. 筆記文章 目前最好的文章. When Linux Run [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2011/10/01/1128/oom-out-of-memory/">OOM &#8211; Out of Memory.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>OOM &#8211; Out of Memory.<br />
筆記文章<br />
<span id="more-1128"></span></p>
<p>目前最好的文章.<br />
<a href="http://linuxdevcenter.com/pub/a/linux/2006/11/30/linux-out-of-memory.html" target="_blank" rel="noopener">When Linux Runs Out of Memory</a><br />
另一份不錯的文章<br />
<a href="http://lwn.net/Articles/317814/" target="_blank" rel="noopener">Taming the OOM killer</a><br />
這篇文章有講到可以設權值. userspace 去處理 OOM 問題等等.</p>
<p>原因<br />
或許是 fragment memory 造成的, 也有可能 kernel 佔去太多 memory. </p>
<p>解決方案<br />
完全啟用 Linux kernel over commit 機制.<br />
echo 1 > /proc/sys/vm/overcommit_memory</p>
<p>其他參考文件<br />
<a href="http://www.ibm.com/developerworks/linux/library/l-linux-slab-allocator/" target="_blank" rel="noopener">Dynamic memory management </a><br />
Another approach, called buddy memory allocation, is a faster memory technique that divides memory into power-of-2 partitions and attempts to allocate memory requests using a best-fit approach. When memory is freed by the user, the buddy block is checked to see if any of its contiguous neighbors have also been freed. If so, the blocks are combined to minimize fragmentation. This algorithm tends to be a bit more time efficient but can waste memory due to the best-fit approach.<br />
* 註: Linux 己經使用這個機制. </p>
<p>分析檔案</p>
<p>其他<br />
<a href="http://puschitz.com/pblog/?p=28" target="_blank" rel="noopener">Memory Fragmentation</a><br />
<a href="http://www.win.tue.nl/~aeb/linux/lk/lk-9.html" target="_blank" rel="noopener">Memory</a></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2011/10/01/1128/oom-out-of-memory/">OOM &#8211; Out of Memory.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2011/10/01/1128/oom-out-of-memory/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Debugfs</title>
		<link>https://richliu.com/2010/01/20/843/debugfs/</link>
					<comments>https://richliu.com/2010/01/20/843/debugfs/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 20 Jan 2010 10:22:27 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[debugfs]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux kernel]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=843</guid>

					<description><![CDATA[<p>以前都習慣用 printk 和 /proc 做輸入輸出的動作, 不過 debugfs 看起來是 User sp [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2010/01/20/843/debugfs/">Debugfs</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>以前都習慣用 printk 和 /proc 做輸入輸出的動作, 不過 debugfs 看起來是 User space 和 kernel space 交流更好的選擇.<br />
<span id="more-843"></span></p>
<p>先確認 Enable Kernel debugfs Function</p>
<blockquote><p>Kernel hacking  &#8212;&gt;<br />
-*- Debug Filesystem</p></blockquote>
<p>先來個簡單的範例,<br />
在你要 debug 的 modules 內, 加入 debugfs 的 include file</p>
<blockquote><p>#include &lt;linux/debugfs.h&gt;</p></blockquote>
<p>要將想要輸出的變數, 假設叫 pcie0_linked 輸出到 debugfs 上, 在 initial code 的地方加上<br />
debugfs_create_u32(&#8220;pcie0_linked&#8221;, 0644, NULL, &amp;pcie0_linked);</p>
<p>接下來就可以重開機了 load 新 kernel 了,</p>
<p>mount debugfs</p>
<blockquote><p>$ mount -t debugfs debug /debugfs</p></blockquote>
<p>或是寫在 /etc/fstab</p>
<blockquote><p>debugfs    /debugfs    debugfs debug</p></blockquote>
<p>這時就可以 ls /debugfs/ , 就會出現 pcie0_linked 的檔案.</p>
<blockquote><p>$ cat /debugfs/pcie0_linked<br />
1<br />
$ echo 0 &gt; /debugfs/pcie0_linked<br />
$ cat /debugfs/pcie0_linked<br />
0</p></blockquote>
<p>像是 procfs 一樣, debugfs 也有 create directory 的 function, 以便讓變數可以在目錄內<br />
我們小小改一下上面的程式, 加上 create_dir 的功能</p>
<blockquote><p>struct dentry *pcie_dir;<br />
pcie_dir = debugfs_create_dir(&#8220;pcie&#8221;,NULL);<br />
if( pcie_dir != NULL ) {<br />
debugfs_create_u32(&#8220;pcie0_linked&#8221;, 0644, pcie_dir, &amp;pcie0_linked);<br />
}</p></blockquote>
<p>改了以上的輸出, 接下來就可以在 /debugfs 下, 看到多了一個 pcie 的目錄, 而 pcie0_linked 就在裡面.</p>
<p>如果想用 hex(16 進位), 可以改用 debugfs_create_x32.</p>
<p>proc file system 最棒的就是可以讀寫檔案了, 可以做更多的控制.<br />
debugfs 也有一個 function 可以讓使用者做檔案讀寫, 這邊寫一個簡單的 sample.</p>
<p>多 include 一個 header</p>
<blockquote><p>#include &lt;linux/seq_file.h&gt;</p>
<p>static int pcie_reg_open(struct seq_file *s, void *data)<br />
{<br />
seq_printf(s, &#8220;pcie0_link status : %s\n&#8221;, pcie0_linked == 1 ? &#8220;Enable&#8221;: &#8220;D<br />
return 0;<br />
}</p>
<p>static int pcie_single_open(struct inode *inode, struct file *file)<br />
{<br />
return single_open(file, pcie_reg_open, inode-&gt;i_private);<br />
}<br />
static ssize_t pcie_debug_write(struct file *file,<br />
const char __user *userbuf,<br />
size_t count, loff_t *ppos)<br />
{<br />
char buf[20];</p>
<p>if (copy_from_user(buf, userbuf, min(count, sizeof(buf))))<br />
return -EFAULT;</p>
<p>printk(&#8220;%s: %s \n&#8221;,__FUNCTION__, buf);</p>
<p>return count;<br />
}</p>
<p>static const struct file_operations pcie_ios_fops = {<br />
.open           = pcie_single_open,<br />
.read           = seq_read,<br />
.write          = pcie_debug_write,<br />
.llseek         = seq_lseek,<br />
.release        = single_release,</p>
<p>};<br />
debugfs_create_file(&#8220;file&#8221;, 0644, pcie_dir, NULL, &amp;pcie_ios_fops);</p></blockquote>
<p>這樣</p>
<blockquote><p>$ cat /debugs/pcie/file 會顯示<br />
pcie0_link status : Enable<br />
而<br />
$ echo &#8220;richliu&#8221; &gt; /debugfs/pcie/file 會顯示<br />
pcie_debug_write: richliu</p>
<p>$</p></blockquote>
<p>最後要介紹的是比較特別的一種格式 blob, 這是可以傳 binary 到 user space 的格式, blob 的 struct 是<br />
struct debugfs_blob_wrapper {<br />
void *data;<br />
unsigned long size;<br />
};</p>
<p>在剛剛的 Code 加上</p>
<blockquote><p>static struct debugfs_blob_wrapper blob; &#8211;&gt; 最好放  global.<br />
char data[100];<br />
sprintf(data, &#8220;Data Pointer is : %08X \n&#8221;, data);<br />
blob.data = data;<br />
blob.size = 100;<br />
debugfs_create_blob(&#8220;blob&#8221;, S_IRUSR, pcie_dir, &amp;blob);</p></blockquote>
<p>在 Linux 下直接用 hexdump 去讀資料出來</p>
<blockquote><p>$ hexdump /debugfs/pcie/blob -c<br />
0000000   D   a   t   a       P   o   i   n   t   e   r       i   s<br />
0000010   :       C   4   0   5   C   1   6   0      \n  \0  \0  \0  \0<br />
0000020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0<br />
*<br />
0000060</p></blockquote>
<p>請記得 Blob 這個檔案是 Read Only, 只能傳出, 不能傳入&#8230;</p>
<p>參考:<br />
<a href="http://lwn.net/Articles/115405/" target="_blank" rel="noopener">Debugfs</a><br />
<a href="http://www.wretch.cc/blog/shinningball/33089435" target="_blank" rel="noopener">Debugfs 中譯版(好像是從匪區抄過來的?)</a></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2010/01/20/843/debugfs/">Debugfs</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2010/01/20/843/debugfs/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Linux kernel PCI Domains Support for ARM</title>
		<link>https://richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/</link>
					<comments>https://richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 16 Dec 2009 16:11:15 +0000</pubDate>
				<category><![CDATA[隨手札記]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PCI]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=831</guid>

					<description><![CDATA[<p>Linux kernel 支援不同 domain 的 PCI, 看起來是 ACPI 的功能之一. 其他平台看起 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/">Linux kernel PCI Domains Support for ARM</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Linux kernel 支援不同 domain 的 PCI, 看起來是 ACPI 的功能之一.<br />
其他平台看起來也有支援, 像是 sparc or mips 都有.</p>
<p>但是在 ARM 上並沒有這樣的支援</p>
<p>我的平台有 2 個 PCIe Host Controller , 而且都要設定在 PCIe bus 0 上面.<br />
這時就拿 PCI domain 的 code 來用最快,<br />
以下就是 Sample Code 和 ARM 部份的 Patch Code (不含我目前使用平台的 Patch)</p>
<p><span id="more-831"></span><br />
  Seems ARM don&#8217;s support PCI Domains function now.<br />
Here is a tiny patch for PCI Domains support</p>
<p>   It&#8217;s work on my platform,<br />
There are two PCIe host controller on my platform, and both bus number<br />
should be 0<br />
So, use PCI Domain to control both PCIe host controller is better choice.</p>
<p>Here is platform PCIe sample code,<br />
static struct hw_pci cxxxxxx_pcie0 __initdata = {<br />
       .swizzle = pci_std_swizzle,<br />
       .map_irq = cxxxxxx_pcie0_map_irq,<br />
       .nr_controllers = 1,<br />
       .nr_domains = 0,<br />
       .setup = cxxxxxx_pci_setup,<br />
       .scan = cxxxxxx_pci_scan_bus,<br />
       .preinit = cxxxxxx_pci_preinit,<br />
       .postinit = cxxxxxx_pcie0_postinit,<br />
};<br />
static struct hw_pci cxxxxxx_pcie1 __initdata = {<br />
       .swizzle = pci_std_swizzle,<br />
       .map_irq = cxxxxxx_pcie1_map_irq,<br />
       .nr_controllers = 1,<br />
       .nr_domains = 1,<br />
       .setup = cxxxxxx_pci_setup,<br />
       .scan = cxxxxxx_pci_scan_bus,<br />
       .postinit = cxxxxxx_pcie1_postinit,<br />
};</p>
<p>static int __init cxxxxxx_pci_init(void)<br />
{<br />
       pci_common_init(&#038;cxxxxxx_pcie0);<br />
       pci_common_init(&#038;cxxxxxx_pcie1);<br />
       return 0;<br />
}</p>
<p>&#8212;<br />
diff &#8211;git a/arch/arm/Kconfig b/arch/arm/Kconfig<br />
index 79a3074..33a49ba 100644<br />
&#8212; a/arch/arm/Kconfig<br />
+++ b/arch/arm/Kconfig<br />
@@ -865,6 +865,10 @@ config PCI<br />
      your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or<br />
      VESA. If you have PCI, say Y, otherwise N.</p>
<p>+config PCI_DOMAINS<br />
+        def_bool y<br />
+        depends on PCI<br />
+<br />
 config PCI_SYSCALL<br />
    def_bool PCI</p>
<p>diff &#8211;git a/arch/arm/include/asm/mach/pci.h<br />
b/arch/arm/include/asm/mach/pci.h<br />
index a38bdc7..f099067 100644<br />
&#8212; a/arch/arm/include/asm/mach/pci.h<br />
+++ b/arch/arm/include/asm/mach/pci.h<br />
@@ -20,6 +20,9 @@ struct hw_pci {<br />
    void        (*postinit)(void);<br />
    u8        (*swizzle)(struct pci_dev *dev, u8 *pin);<br />
    int        (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin);<br />
+#ifdef CONFIG_PCI_DOMAINS<br />
+    int        nr_domains;<br />
+#endif<br />
 };</p>
<p> /*<br />
@@ -37,8 +40,12 @@ struct pci_sys_data {<br />
                    /* IRQ mapping                */<br />
    int        (*map_irq)(struct pci_dev *, u8, u8);<br />
    struct hw_pci    *hw;<br />
+#ifdef CONFIG_PCI_DOMAINS<br />
+    int        domain;<br />
+#endif<br />
 };</p>
<p>+<br />
 /*<br />
 * This is the standard PCI-PCI bridge swizzling algorithm.<br />
 */<br />
diff &#8211;git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h<br />
index 0abf386..57ce5bd 100644<br />
&#8212; a/arch/arm/include/asm/pci.h<br />
+++ b/arch/arm/include/asm/pci.h<br />
@@ -25,6 +25,11 @@ static inline void pcibios_penalize_isa_irq(int irq,<br />
int active)<br />
    /* We don&#8217;t do dynamic PCI IRQ allocation */<br />
 }</p>
<p>+#ifdef CONFIG_PCI_DOMAINS<br />
+int pci_domain_nr(struct pci_bus *bus);<br />
+int pci_proc_domain(struct pci_bus *bus);<br />
+#endif<br />
+<br />
 /*<br />
 * The PCI address space does equal the physical memory address space.<br />
 * The networking and block device layers use this boolean for bounce<br />
diff &#8211;git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c<br />
index 8096819..b364ca8 100644<br />
&#8212; a/arch/arm/kernel/bios32.c<br />
+++ b/arch/arm/kernel/bios32.c<br />
@@ -531,6 +531,7 @@ static void __init pcibios_init_hw(struct hw_pci *hw)<br />
        sys->busnr   = busnr;<br />
        sys->swizzle = hw->swizzle;<br />
        sys->map_irq = hw->map_irq;<br />
+        sys->domain  = hw->nr_domains;<br />
        sys->resource[0] = &#038;ioport_resource;<br />
        sys->resource[1] = &#038;iomem_resource;</p>
<p>@@ -694,3 +695,20 @@ int pci_mmap_page_range(struct pci_dev *dev, struct<br />
vm_area_struct *vma,</p>
<p>    return 0;<br />
 }<br />
+#ifdef CONFIG_PCI_DOMAINS<br />
+int pci_domain_nr(struct pci_bus *bus)<br />
+{<br />
+<br />
+        //struct pci_sysdata *sd = bus->sysdata;<br />
+        struct pci_sys_data *sd = bus->sysdata;<br />
+        return sd->domain;<br />
+<br />
+}<br />
+EXPORT_SYMBOL(pci_domain_nr);<br />
+<br />
+int pci_proc_domain(struct pci_bus *bus)<br />
+{<br />
+        return pci_domain_nr(bus);<br />
+}<br />
+EXPORT_SYMBOL(pci_proc_domain);<br />
+#endif</p>
<p>Ref<br />
<a href="http://lwn.net/Articles/247773/" target="_blank" rel="noopener">x86/x86-64 PCI domain support</a></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/">Linux kernel PCI Domains Support for ARM</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2009/12/17/831/linux-kernel-pci-domains-support-for-arm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ARM 的 Oprofile</title>
		<link>https://richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/</link>
					<comments>https://richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 11 Dec 2009 19:02:18 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[ARM11]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[oprofile]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=820</guid>

					<description><![CDATA[<p>最近在弄 ARM11 的 Oprofile, 結果發現執行 opcontrol 的動作之後, 沒有 log 的 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/">ARM 的 Oprofile</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>最近在弄 ARM11 的 Oprofile, 結果發現執行 opcontrol 的動作之後, 沒有 log 的動作.<br />
大致上的訊息是這樣的<br />
[Bash]<br />
# opcontrol &#8211;shutdown<br />
Stopping profiling.<br />
Killing daemon.<br />
# Stopping profiling.<br />
Killing daemon.<br />
opreport image:/vmlinux -l -w -g &gt; oprofile.txt<br />
error: no sample files found: profile specification too strict ?<br />
[/Bash]</p>
<p>這時請改用 timer interrupt</p>
<p>在 load oprofile modules 加上 timer=1<br />
若是 static link 時, 就要在 boot_cmd 加上 oprofile.timer=1</p>
<p>似乎目前的 kernel oprofile 不支援 ARM11MPCore.</p>
<p>http://oprofile.sourceforge.net/doc/detailed-parameters.html#timer</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/">ARM 的 Oprofile</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2009/12/12/820/arm-%e7%9a%84-oprofile/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Andriod 筆記(Run Application, build Image)</title>
		<link>https://richliu.com/2009/01/09/681/andriod-%e7%ad%86%e8%a8%98run-application-build-image/</link>
					<comments>https://richliu.com/2009/01/09/681/andriod-%e7%ad%86%e8%a8%98run-application-build-image/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 09 Jan 2009 03:30:50 +0000</pubDate>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[隨手札記]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=681</guid>

					<description><![CDATA[<p>最近不小心手滑買了一隻 Android Dev Phone 1 長得和 T-Mobile G1 的外型是一樣的 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2009/01/09/681/andriod-%e7%ad%86%e8%a8%98run-application-build-image/">Andriod 筆記(Run Application, build Image)</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>最近不小心手滑買了一隻 <a href="http://code.google.com/intl/zh-TW/android/dev-devices.html" target="_blank" rel="noopener">Android Dev Phone 1</a> 長得和 T-Mobile G1 的外型是一樣的.<br />
雖然還沒有到貨, 但是準備工作要先作好.<br />
<span id="more-681"></span></p>
<h2>== Android Software Development ==</h2>
<p>Download SDK<br />
==============</p>
<p>http://code.google.com/intl/zh-TW/android/download_list.html</p>
<p>下載 SDK 之後, 我是解壓在 /home 下</p>
<p>Download Eclipse<br />
==============</p>
<p>安裝之前先移除系統中原有的 Eclipse(?), 直接下載 Eclipse</p>
<p>http://www.eclipse.org/downloads/</p>
<p>我是下載 Eclipse 3.4.1 Classic (151M)</p>
<p>解壓到 /home 下. 目錄在 /home/eclipse</p>
<p>直接到 /home/eclipse 執行 ./eclipse 就可以了 (似乎用 ubuntu 的 openjdk 會比較快)</p>
<p>Download WTP<br />
==============</p>
<p>用 http://code.google.com/intl/zh-TW/android/intro/installing.html#installingplugin 安裝 ADT 的方式, 安裝 WTP.<br />
如果沒有先安裝 WTP, 安裝 ADT 會有問題, ADT 可以用 plugin 下載, 記得選 WTP 3.0.3 就好了, 不用全選.</p>
<p>http://download.eclipse.org/webtools/updates/</p>
<p>Download ADT<br />
==============</p>
<p>http://code.google.com/intl/zh-TW/android/intro/installing.html#installingplugin</p>
<p>Write a sample program<br />
==============</p>
<p>http://code.google.com/intl/zh-TW/android/intro/develop-and-debug.html#developingwitheclipse</p>
<p>我是 New Project 之後, 選 Hello, Activity! 這個 sample code 做為 base.<br />
在 Run 之前, 要先用 create a Launch configuration</p>
<p>順利的話, 就可以叫出 Android Emulator.</p>
<h2>== Android Image Development ==</h2>
<p>這一段是編 image 的.</p>
<p>Update System Package<br />
==============</p>
<p>http://source.android.com/download</p>
<div style="margin-top: 0px; margin-bottom: 0px;">
<div style="margin-top: 0px; margin-bottom: 0px; font-family: arial,sans-serif;">
<div style="margin-top: 0px; margin-bottom: 0px;">
<ul style="margin-top: 0px; margin-bottom: 0px;">
<li style="margin-top: 8px; margin-bottom: 8px; font-family: arial,sans-serif;">安裝 Git</li>
</ul>
</div>
</div>
</div>
<blockquote style="border: medium none ; margin: 0pt 0pt 0pt 40px; padding: 0px;"><p><span style="font-family: arial;"><span style="font-weight: normal; font-size: 13px; word-spacing: 0px; text-transform: none; text-indent: 0px; line-height: normal; font-style: normal; white-space: normal; letter-spacing: normal; border-collapse: separate; font-variant: normal; color: #000000;"><span style="font-family: courier new,monospace;">$ </span></span><span style="font-family: courier new,monospace;">sudo apt-get install git-core gnupg</span></span></p></blockquote>
<div>
<div style="margin-top: 0px; margin-bottom: 0px;">
<div style="margin-top: 0px; margin-bottom: 0px; font-family: arial,sans-serif;">
<div style="margin-top: 0px; margin-bottom: 0px;">
<ul style="margin-top: 0px; margin-bottom: 0px;">
<li style="margin-top: 8px; margin-bottom: 8px; font-family: arial,sans-serif;">JDK 5.0, update 12 or higher. 個人用了以後, 用 java5 jdk 似乎比較容易成功.</li>
</ul>
</div>
</div>
</div>
</div>
<blockquote style="border: medium none ; margin: 0pt 0pt 0pt 40px; padding: 0px;"><p><span style="font-family: arial;"><span style="font-weight: normal; font-size: 13px; word-spacing: 0px; text-transform: none; text-indent: 0px; line-height: normal; font-style: normal; white-space: normal; letter-spacing: normal; border-collapse: separate; font-variant: normal; color: #000000;"><span style="font-family: courier new,monospace;">$ </span></span><span style="font-family: courier new,monospace;">sudo apt-get install sun-java5-jdk</span></span></p></blockquote>
<div>
<div style="margin-top: 0px; margin-bottom: 0px;">
<div style="margin-top: 0px; margin-bottom: 0px; font-family: arial,sans-serif;">
<div style="margin-top: 0px; margin-bottom: 0px;">
<ul style="margin-top: 0px; margin-bottom: 0px;">
<li style="margin-top: 8px; margin-bottom: 8px; font-family: arial,sans-serif;"><span style="font-family: arial,sans-serif;">The following packages: </span><span style="line-height: 16px;"><span style="font-family: arial,sans-serif;">flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev (optional), build-essential, zip, curl. </span></span></li>
</ul>
</div>
</div>
</div>
</div>
<blockquote style="border: medium none ; margin: 0pt 0pt 0pt 40px; padding: 0px;"><p><span style="font-family: arial;"><span style="font-family: courier new,monospace;">$ sudo apt-get install flex bison gperf </span><span style="word-spacing: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-transform: none; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; font-family: courier new,monospace; color: #000000;"><span style="line-height: 16px;">libsdl-dev libesd0-dev </span></span><span style="font-family: courier new,monospace;">libwxgtk2.6-dev build-essential zip</span><span style="font-family: arial,sans-serif;"><span style="font-family: courier new,monospace;"> curl li</span><span><span style="font-family: courier new,monospace;">b</span></span><span><span style="font-family: courier new,monospace;">ncurses5-dev zlib1g-dev<br />
</span></span></span></span></p></blockquote>
<div>
<div style="margin-top: 0px; margin-bottom: 0px;">
<div style="margin-top: 0px; margin-bottom: 0px; font-family: arial,sans-serif;">
<div style="margin-top: 0px; margin-bottom: 0px;">
<ul style="margin-top: 0px; margin-bottom: 0px;">
<li style="margin-top: 8px; margin-bottom: 8px;"><span style="word-spacing: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-transform: none; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; font-family: courier new,monospace; color: #000000;"><span style="line-height: 16px;"><span style="font-family: arial,sans-serif;">You might also want Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc. </span></span></span></li>
</ul>
</div>
</div>
</div>
</div>
<blockquote style="border: medium none ; margin: 0pt 0pt 0pt 40px; padding: 0px;">
<div><span style="border-collapse: separate; line-height: 16px; font-family: courier new;">$ sudo apt-get install valgrind<br />
</span></div>
</blockquote>
<ul>
<li><span style="word-spacing: 0px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; text-transform: none; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; font-family: courier new,monospace; color: #000000;"><span style="line-height: 16px;"><span style="font-family: arial,sans-serif;">Intrepid (</span></span></span>8.10) users may need a newer version of libreadline: (原文有問題, 應該是 libreadline5-dev 才對)</li>
</ul>
<p style="padding-left: 30px;"><span style="font-family: courier new,monospace;">$ sudo apt-get install libreadline5-dev</span></p>
<p>Get repo tools<br />
==============</p>
<p>* repo is not a new tools. It is just a wrap for git command.</p>
<p># mkdir ~/bin<br />
# curl http://android.git.kernel.org/repo &gt; ~/bin/repo<br />
# chmod a+x ~/bin/repo<br />
Get Android Source<br />
==================</p>
<p># cd /home/mydroid<br />
# repo init -u git://android.git.kernel.org/platform/manifest.git</p>
<p># repo sync</p>
<p>Compile Android Source<br />
==================</p>
<p># cd /usr/lib/jvm/java-1.5.0-sun<br />
# export JAVA_HOME=`pwd`<br />
# export PATH=$JAVA_HOME/bin:$PATH<br />
# cd /home/mydroid<br />
# make clean<br />
# make</p>
<p>如果中間 compile 有 JVM core dump or compile failed, 記得多試幾次.</p>
<p>(待續)</p>
<p>Ref. <a href="http://virtuallyshocking.com/2008/12/20/building-android-for-the-asus-eeepc-701/" target="_blank" rel="noopener">Building Android for the Asus Eee PC 701</a></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2009/01/09/681/andriod-%e7%ad%86%e8%a8%98run-application-build-image/">Andriod 筆記(Run Application, build Image)</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2009/01/09/681/andriod-%e7%ad%86%e8%a8%98run-application-build-image/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[Linux] fakenetdev 假的 network interface</title>
		<link>https://richliu.com/2008/12/24/667/linux-fakenetdev-%e5%81%87%e7%9a%84-network-interface/</link>
					<comments>https://richliu.com/2008/12/24/667/linux-fakenetdev-%e5%81%87%e7%9a%84-network-interface/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 24 Dec 2008 05:57:11 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[fake]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[network driver]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=667</guid>

					<description><![CDATA[<p>有些時候, 我們會需要一個假的 network device. 像是 1) 某些軟體會去 check netw [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2008/12/24/667/linux-fakenetdev-%e5%81%87%e7%9a%84-network-interface/">[Linux] fakenetdev 假的 network interface</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>有些時候, 我們會需要一個假的 network device.<br />
像是<br />
1) 某些軟體會去 check network interface<br />
2) 需要學習寫作一些軟體</p>
<p>所以我花了一點點時間寫了這一個 kernel modules<br />
主要功能就是在 linux 下建立一個假的 network interface<br />
這個 network interface<br />
只能送(馬上就 free 掉 packet buffer), 沒有收的 function .</p>
<p>在 insert 時, 可以用參數 name 和 mac 指定特定的 network device name 和 mac address.<br />
ex: # insmod fakenetdev.ko name=fake0 mac=00:aa:bb:cc:dd:ee<br />
mac 的格式也可以是 00aabbccddee 或 00-aa-bb-cc-dd-ee<br />
也支援用 ifconfig 修改 mac<br />
ex: # ifconfig eth2 down<br />
# ifconfig eth2 hw ether 00:aa:bb:cc:dd:ee<br />
# ifconfig eth2 up</p>
<p>這個程式在 ubuntu 8.10 (interpid), Linux kernel 2.6.27 下測試.<br />
目前看起來沒有很大的問題, 原作者要用的目地可以達到</p>
<p>可以從這個 URL 下載程式 <a href="https://sourceforge.net/project/showfiles.php?group_id=248740&amp;package_id=303790&amp;release_id=649323" target="_blank" rel="noopener">fakenetdev</a></p>
<p>&#8212; English &#8212;<br />
Sometimes, we will need a fake network device for some purpose<br />
like,<br />
1) cheat some software which will check network mac<br />
2) learn how to write a simple network device driver</p>
<p>So, I spend a little time to write this kernel module.<br />
Major function is that create fake network interface.<br />
It can send packet, but driver will free it immediately.</p>
<p>When insert modules, the module support argument &#8220;name&#8221; and &#8220;mac&#8221; to<br />
modify default name and mac.<br />
ex: # insmod fakenetdev.ko name=fake0 mac=00:aa:bb:cc:dd:ee<br />
it also support other format for mac, like 00aabbccddee or 00-aa-bb-cc-dd-ee<br />
and support modify mac by ifconfig<br />
ex: # ifconfig eth2 down<br />
# ifconfig eth2 hw ether 00:aa:bb:cc:dd:ee<br />
# ifconfig eth2 up</p>
<p>This module was tested at ubuntu 8.10 (interpid), Linux kernel 2.6.27.<br />
It seems work fine for me .</p>
<p>You can download follow this link <a href="https://sourceforge.net/project/showfiles.php?group_id=248740&amp;package_id=303790&amp;release_id=649323" target="_blank" rel="noopener">fakenetdev</a></p>
<p>&#8212;</p>
<p>後記:</p>
<p>這 Driver 不難寫, 麻煩的是在 Debug .不小心少寫一行就 Core Dump.<br />
又懶得弄 KGDB 或是 User Mode Linux, 因為弄的時可能比寫完還多<br />
網路上掃了一遍沒有看到馬上可以用的, 所以就自己亂寫, 希望<br />
大家都可以用得到, 因為是用在*謎*用途的呀 :p</p>
<p>不過這個功能可以用 dummy device 達成,<br />
我寫的頂多就是可以在 load driver 的時候改 name 和 mac .</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2008/12/24/667/linux-fakenetdev-%e5%81%87%e7%9a%84-network-interface/">[Linux] fakenetdev 假的 network interface</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2008/12/24/667/linux-fakenetdev-%e5%81%87%e7%9a%84-network-interface/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>[Gentoo] Linux 2.6.24 和 ntfs3g 配合的問題.</title>
		<link>https://richliu.com/2008/02/28/562/gentoo-linux-2624-%e5%92%8c-ntfs3g-%e9%85%8d%e5%90%88%e7%9a%84%e5%95%8f%e9%a1%8c/</link>
					<comments>https://richliu.com/2008/02/28/562/gentoo-linux-2624-%e5%92%8c-ntfs3g-%e9%85%8d%e5%90%88%e7%9a%84%e5%95%8f%e9%a1%8c/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Wed, 27 Feb 2008 18:07:26 +0000</pubDate>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[ntfs-3g]]></category>
		<guid isPermaLink="false">https://richliu.com/2008/02/28/562/</guid>

					<description><![CDATA[<p>昨天剛拿到新的 Notebook X61, 想將使用己久的 FAT32 系統換 NTFS (主要還是為了不爭氣 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2008/02/28/562/gentoo-linux-2624-%e5%92%8c-ntfs3g-%e9%85%8d%e5%90%88%e7%9a%84%e5%95%8f%e9%a1%8c/">[Gentoo] Linux 2.6.24 和 ntfs3g 配合的問題.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>昨天剛拿到新的 Notebook X61, 想將使用己久的 FAT32 系統換 NTFS (主要還是為了不爭氣的 Windows 做檔案交換用, 而且因為用 <a href="http://www.virtualbox.org/" target="_blank" rel="noopener">VirtualBox</a>, 單一檔超過 2G, FAT32 不吃(手賤嘛).</p>
<p>結果從昨天試到今天, 當 file copy 進用 <a href="http://www.ntfs-3g.org/" target="_blank" rel="noopener">ntfs-3g</a> mount 的 Disk 時. 就是會出現 Core Dump, 這邊節錄三行就好了. </p>
<blockquote><p>BUG: soft lockup &#8211; CPU#1 stuck for 11s! [wget:28163]</p>
<p>Pid: 28163, comm: wget Not tainted (2.6.24-gentoo-r2 #4)<br />
EIP: 0060:[<c04e6620>] EFLAGS: 00000246 CPU: 1</c04e6620></p></blockquote>
<p>現在小朋友不睡覺, 只好抱著小朋友, 順便找找有沒有什麼解決方案, 最後在 Gentoo Forums 看到了一篇 <a href="http://forums.gentoo.org/viewtopic-t-667016-highlight-ntfs3g.html" target="_blank" rel="noopener">new kernel, write ntfs, sys freeze[done]</a><br />
大意是說, 原來舊版的 kernel 是使用 fuse module + ntfs3g 這二個 portage 套件組合而成, 這樣是沒有什麼問題的, 但是如果是用新版的 kernel (2.6.24), 就要用 kernel 內建的 fuse module (在 File System 選項那邊. </p>
<p>果然改用 2.6.24 Kernel 內建的 fuse module 就沒有事情了. 這種鳥問題應該只有用 Gentoo 的人會碰到吧 (默)</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2008/02/28/562/gentoo-linux-2624-%e5%92%8c-ntfs3g-%e9%85%8d%e5%90%88%e7%9a%84%e5%95%8f%e9%a1%8c/">[Gentoo] Linux 2.6.24 和 ntfs3g 配合的問題.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2008/02/28/562/gentoo-linux-2624-%e5%92%8c-ntfs3g-%e9%85%8d%e5%90%88%e7%9a%84%e5%95%8f%e9%a1%8c/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>[ARM] chroot 出現 Message &#8220;Illegal Instruction&#8221;</title>
		<link>https://richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/</link>
					<comments>https://richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Thu, 21 Feb 2008 12:45:21 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[arm]]></category>
		<category><![CDATA[kernel]]></category>
		<guid isPermaLink="false">https://richliu.com/2008/02/21/558/</guid>

					<description><![CDATA[<p>記錄一下, 不僅僅是 chroot 以外, 如果執行任何程式有 &#8220;Illegal Instruct [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/">[ARM] chroot 出現 Message &#8220;Illegal Instruction&#8221;</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>記錄一下,</p>
<p>不僅僅是 chroot 以外, 如果執行任何程式有 &#8220;Illegal Instruction&#8221; 時, 記得將 kernel 的 NWFPE 選項 enable.</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/">[ARM] chroot 出現 Message &#8220;Illegal Instruction&#8221;</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2008/02/21/558/arm-chroot-%e5%87%ba%e7%8f%be-message-illegal-instruction/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Kernel 2.6.24 Released.</title>
		<link>https://richliu.com/2008/01/26/546/linux-kernel-2624-released/</link>
					<comments>https://richliu.com/2008/01/26/546/linux-kernel-2624-released/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Sat, 26 Jan 2008 05:50:47 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel]]></category>
		<guid isPermaLink="false">https://richliu.com/2008/01/26/546/</guid>

					<description><![CDATA[<p>Linux kernel 2.6.24 己經在昨天 Released. 可以直接到 Kernel.org Do [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2008/01/26/546/linux-kernel-2624-released/">Linux Kernel 2.6.24 Released.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Linux kernel 2.6.24 己經在昨天 Released. 可以直接到 <a href="http://www.kernel.org/" target="_blank" rel="noopener">Kernel.org</a> <a href="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2" target="_blank" rel="noopener">Download</a></p>
<p>要知道詳細的改變, 可以看 <a href="http://kernelnewbies.org/Linux_2_6_24" target="_blank" rel="noopener">Kernelnewbies Linux Kernel 2.6.24</a></p>
<p>這邊列出我自己對於這次改版比較重要的地方</p>
<ul>
<li>CFS improvement (Performance improvement, Fair group scheduling, Guest time reporting)</li>
<li>Tickless support for x86-64, PPC, UML, ARM, MIPS : 不知道 ARM 加上 Tickless support 會不會增加 Performance ? </li>
<li>New wireless drivers and configuration interface</li>
<li>Anti-fragmentation patches : 這個 Patch 很重要, 尤其是在記憶體不夠的 Embedded Linux, 現在整合進來或許以前某些奇怪的問題就可以解決了吧 <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></li>
<li>Per-device dirty memory thresholds: 簡單的說, 之前的 Dirty Memory 是共用了, 只要有低速週邊 USB 1.1, Dirty Memory 就會被塞滿. </li>
<li>PID and network namespaces: 這個是為了 Visualization Operation-System 存在的, 可以讓系統內不用的 Visualization OS 使用不同的 PID 和 Network Layer </li>
<li>Large Receive Offload (LRO) support for TCP traffic :  需要再看得更詳細一點, 尤其是如果有新的 Design 出來, 是不是可能修改 Hardware 去符合這樣的設計(需要再研究)</li>
</ul>
<p>The post <a rel="nofollow" href="https://richliu.com/2008/01/26/546/linux-kernel-2624-released/">Linux Kernel 2.6.24 Released.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2008/01/26/546/linux-kernel-2624-released/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[Linux][Kernel] Kernel Oops 網站.</title>
		<link>https://richliu.com/2007/12/21/535/linuxkernel-kernel-oops-%e7%b6%b2%e7%ab%99/</link>
					<comments>https://richliu.com/2007/12/21/535/linuxkernel-kernel-oops-%e7%b6%b2%e7%ab%99/#respond</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Fri, 21 Dec 2007 07:42:31 +0000</pubDate>
				<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[oops]]></category>
		<guid isPermaLink="false">https://richliu.com/2007/12/21/535/</guid>

					<description><![CDATA[<p>http://www.kerneloops.org 是一個會收集 mailing list 和 bugzill [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2007/12/21/535/linuxkernel-kernel-oops-%e7%b6%b2%e7%ab%99/">[Linux][Kernel] Kernel Oops 網站.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.kerneloops.org ">http://www.kerneloops.org </a> 是一個會收集 mailing list 和 bugzilla 的網站, 他將收集到的 oops 整理成一份簡單的 report.<br />
這樣大家就可以知道, 那一版的 kernel 有多少個什麼類型的 Bug.</p>
<p>Bug Report 包含 module 和 backtrace, 不過不含原始網站連結, 這是比較可惜的地方</p>
<p>常常碰 embedded linux 的人, 常常要找一些莫名的 bug, 有時候為了節省時間,<br />
會想辦法看看有沒有相對應的 Bug Patch, 如果有就非常方便.<br />
這個網站看起來是可以節省一些 Search 的時間, 運氣好說不定碰到的 Bug 是同一個呀 <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Ref.<br />
<a href="http://kerneltrap.org/Linux/Collecting_Kernel_Oops_Data" target="_blank" rel="noopener">Kernel Trap : Collecting Kernel Oops Data</a><br />
[Tags] Linux, kernel, oops [/Tags]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2007/12/21/535/linuxkernel-kernel-oops-%e7%b6%b2%e7%ab%99/">[Linux][Kernel] Kernel Oops 網站.</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2007/12/21/535/linuxkernel-kernel-oops-%e7%b6%b2%e7%ab%99/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
