Showing posts with label Kernel. Show all posts
Showing posts with label Kernel. Show all posts

Apr 24, 2013

Build your Emdebian Grip for ARM (WM8850 support)

Here is the instruction that how to install an embedded debian OS for your ARM system. Linux Kernel Image for your ARM system is a prerequisite. [1]

Please follow the instruction step by step to build emdebian rootfs on Debian/Ubuntu. :)

1. Using Bootstrap

(Use apt-get install debootstrap to install it if you don't have yet.)

Use the command to retrieve the packages for ARM:
sudo debootstrap \
--arch=armel \
--include=vim,openssh-server \
--foreign \
squeeze grip/ http://www.emdebian.org/grip/

After this step, the installation rootfs is ready at "./grip", but it is like an installation disc rather than a working rootfs.
"--inculde" is to install any additional packages. In this example, vim and ssh server are added manually.

2. Write Rootfs to disk/SD card.

Copy the installation rootfs (at ./grip) to ext3 partition of a SD card or other media.

Save the following content to target's rootfs "/first.sh" :
#!/bin/sh
mkdir -p ./usr/share/man/man1
echo "proc /proc proc rw 0 0" >> /etc/fstab
echo 'deb http://www.emdebian.org/grip/ squeeze main' >> etc/apt/sources.list
echo 'deb http://ftp.tw.debian.org/debian squeeze main' >> etc/apt/sources.list
mount /proc /proc -t proc
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/debootstrap/debootstrap --second-stage

3. First Boot

Before entering Linux Kernel, add "init=/bin/sh" to bootargs at uboot or other bootloader.[2] 
"#" prompt should be appeared. (If you can't see that, press enter to make sure your system isn't crash.). Just execute "/first.sh" at "/" and wait for couple minutes to install the base system.
if anything works normally, use "passwd" to modify root's password then reboot the system.

4. Second Boot

Modify bootargs from "init=/bin/sh" to "init=/sbin/init" at uboot or other bootloader before entering Linux Kernel. [3]

So far, login with root should be successfully. :)

P.S.

Attach some files for my WM8850 netbook.
[1] Linux Kernel :
[2] boot script for First Boot:
[3] boot script for Second Boot:
[4] Emdebian Linux on WM8850 Netbook
https://www.youtube.com/watch?v=JzPxJVLE2Zc&hd=1

Nov 5, 2012

WM8650 Tablet


最近在網路上購入一台價錢相當便宜(1500NTD)的平板電腦(TK Onyx),
採用的CPU是WanderMedia 8650 ARM7,作業系統是Android 2.2,
效能悲慘到不行,不過念在他這麼便宜,買來拆拆弄弄也好。

目前這個系統的source code已經可以在ftp.gpl-devices.org找的到,
再搭配上以下的文章

可以順利地將linux kernel編譯,執行上也沒有太大的問題。

進到rootfs後,發現events/0異常的忙碌,詳細狀況我在前幾篇文章有提到,
我發現到在這台平板上,是利用vt1609音效晶片處理Audio的部分,
並利用其ADC功能來處理電阻式touch screen的訊號,
vt1603控制bus應該是SPI,
而不是預設的I2C (kernelhacks取得的.config中是採用I2C)。
這個部分重新用menuconfig調整後就解決掉events/0忙碌的問題了。

現在這台平板已經可以執行ArchLinux或是Emdebian。
ArchLinux是用官方的ARM版本,
Emdebian則是debootstrap做出來的。

在還沒拿到RaspberryPi之前,有這台平板也是蠻有趣的。