Hadirmu Tidak diundang, Jika ragu-ragu sila pulang!!

Ini blog suka hati aku. Bukan untuk tontonan umum. Kalau engkau masuk ke sini secara tak sengaja, SILA BERAMBUS DENGAN SOPAN sebelum merasa terhina dengan kutukan cacimaki keji dari aku.

Aku dah WARNING!!! Kalau kau nak baca juga, kau WAJIB 100% BERSETUJU dengan apa pun yang aku tulis dan bersumpah setia tak akan mempergunakan apa-apa kandungan blog ini untuk menjahanamkan aku. Jika kau tak bersetuju juga, Sila Pergi Jahanam dan BERAMBUS DENGAN SEGERA sebelum aku cabut urat kentut kau dan menyebabkan kau lumpuh seumur hidup.

Sudahlah, aku taknak membebel lagi. Kalau kau tak faham lagi, sila baca lagi ayat-ayat diatas sampai faham.

Baca lagi ayat diatas...

Rabu, 15 April 2009

Ubuntu ARM Rootfs From Scratch

refer:
https://wiki.ubuntu.com/ARM
https://wiki.ubuntu.com/ARM/RootfsFromScratch

download and install debootstrap for jaunty
http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_1.0.12_all.deb

install:

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm$ sudo apt-get install vde nfs-kernel-server debootstrap


apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm$ sudo dpkg -i debootstrap_1.0.12_all.deb
[sudo] password for apogee:
(Reading database ... 137953 files and directories currently installed.)
Preparing to replace debootstrap 1.0.10 (using debootstrap_1.0.12_all.deb) ...
Unpacking replacement debootstrap ...
Setting up debootstrap (1.0.12) ...
Processing triggers for man-db ...
apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm$


building the rootfs

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm$ sudo ./build-arm-rootfs --fqdn tsbox --login ubuntu --password mybox --imagesize 1G --seed ubuntu-minimal


tambahan:
http://fedoraproject.org/wiki/Architectures/ARM/HowToQemu
http://iomem.com/index.php?archives/2-Running-Linux-for-ARM-processors-under-QEMU.html&serendipity[entrypage]=1

------------------------

sambungan cerita (update: 2009/4/16)

command semalam tu berjaya menghasilkan satu fail rootfs armel-rootfs-200904151837.tgz

Jadi, buat img untuk kita mount guna qemu.

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm$ mkdir armel

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm$ mv armel-rootfs-200904151837.tgz armel

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm$ cd armel/

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$ dd if=/dev/zero of=ubuntu-arm.img bs=1MB count=1024
1024+0 records in
1024+0 records out
1024000000 bytes (1.0 GB) copied, 20.7023 s, 49.5 MB/s
apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$ ls
armel-rootfs-200904151837.tgz ubuntu-arm.img

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$ mkdir qemu

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$ ls
armel-rootfs-200904151837.tgz qemu ubuntu-arm.img

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$ sudo mke2fs -F -m 0 -b 1024 ubuntu-arm.img
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
62976 inodes, 1000000 blocks
0 blocks (0.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=68157440
123 block groups
8192 blocks per group, 8192 fragments per group
512 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409, 663553

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


lepas tu mount loop:

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$ sudo mount -t ext2 -o loop ubuntu-arm.img qemu

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$ cd qemu/

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel/qemu$ ls
lost+found



dan seterusnya, extract tgz tadi. guna option -p untuk --preserve-permissions

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel/qemu$ sudo tar zxpf ../armel-rootfs-200904151837.tgz

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel/qemu$ ls
bin boot dev etc home lib lost+found media mnt opt proc root sbin selinux srv sys tmp usr var

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel/qemu$ cd ..

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$ sudo umount qemu

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$ mv ubuntu-arm.img ../.

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm/armel$



sekarang dah boleh ngetest img yang baru dibuat... yaaaay!!


apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm$ ls
armel build-arm-rootfs-200904151734.log debootstrap_1.0.12_all.deb rgauge-rootfs.tgz vmlinuz-2.6.28-versatile
build-arm-rootfs build-arm-rootfs-200904151837.log rgauge-rootfs.img ubuntu-arm.img

apogee@ubuntubox:/media/secndrv/Books/ubuntu-arm$ sudo qemu-system-arm -M versatilepb -kernel ./vmlinuz-2.6.28-versatile -hda ubuntu-arm.img -m 256 -append "root=/dev/sda mem=256M ro"



dan inilah hasilnya...









OK, itu aje untuk kali ini... nanti sambung pula pengembaraan seterusnya untuk sumbat ubuntu-arm dalam ts-7260 pulak.



1 ulasan:

Catat Ulasan

Nota: Hanya ahli blog ini sahaja yang boleh mencatat ulasan.