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

8 comments:

Fault-tolerant said...

Hi, Sean.

I've already tried running Linux on an AllWinner A13 tablet. The instructions at http://olimex.wordpress.com/2012/10/12/building-bootable-sd-card-with-debian-linux-image-for-a13-olinuxino/ are very helpful. Now I have a 8850 tablet to try and run linux on. I wonder about the startup sequence. You mention uboot, but what are the relevant files for this, and where are they to be placed? Same about the uboot script. Thank you for any advice, this can help people to achieve the goal of running linux on their devices!

Anonymous said...

Hi Sean,

thank you for this fine well presented page.

The process you describe worked fine for me.

Good luck. Hope to read more from you.

pawelka said...

Could you attach kernel config file and devicetree file which you used to build uzImage.bin?

I'm tring to build new kernel with network support but I have blank screen when booting, but with your kernel screen works.

Unknown said...

Hello, Mr. Lee

I have a question about this device. It has a Mali 400 gpu, but does the kernel support it? And if so, does Xorg have a driver to use it?

Douglas Ferreira said...

Please post SDCARD IMAGE or explane in windows

Unknown said...

hai i would like to ask on how to fix stuck logo with android 4.1 .

Unknown said...

I'm like one with you

Unknown said...

Because I'm in the same situation as you