ตัวอย่างนี้ทำบน Ubuntu 7.10 ซึ่งประกอบด้วย
เราก็จะนำไฟล์นั้นไปใส่ในระบบไฟล์ของ uClinux ซึ่งก็คือ romfs.img
ด้วยคำสั่งใน Folder ของ skyeye-test-suite/uclinux/at91/uclinux_rtl8019เราจะได้ระบบไฟล์ romfs.img อันใหม่ที่ใส่ hello Application ลงไปจากนั้นก็รัน uClinux >>
เมื่อ Boot เสร็จจึงลองรัน Application
ตัวอย่างนี้เป็นวิธีในการทดสอบ Application ที่จะทำงานบน uClinux ก็จะใช้งานในระบบจริง ซึ่งสามารถประยุกต์ในการทดสอบ Application ที่ต่างกันออกไปได
** ไม่สามารถทดสอบบน Cygwin ได้เนื่องจากไม่สามารถ Mount แบบ Loop ได้้
Powered by ScribeFire.
- arm-elf-gcc
- genromfs ค้นหาและติดตั้ง >>
- Skyeye
- Test-Suite ของ Skyeye >>
- hello จากตัวอย่างที่จะนำไปทดสอบ อ้างอิง >>
เราก็จะนำไฟล์นั้นไปใส่ในระบบไฟล์ของ uClinux ซึ่งก็คือ romfs.img
ด้วยคำสั่งใน Folder ของ skyeye-test-suite/uclinux/at91/uclinux_rtl8019
$>sudo mkdir /mnt/romfs
$>sudo mount -o loop romfs.img /mnt/romfs
$>mkdir romfs
$>sudo cp -r /mnt/romfs/* romfs
$>ls romfs
bin dev etc home lib mnt proc sbin tmp usr var
$>sudo cp hello ./romfs/bin
$>sudo genromfs -f romfs.img -d romfs/
$>sudo umount /mnt/romfs
เมื่อ Boot เสร็จจึงลองรัน Application
\>cd bin
/bin>hello
Hello, embedded linux!
** ไม่สามารถทดสอบบน Cygwin ได้เนื่องจากไม่สามารถ Mount แบบ Loop ได้้
Powered by ScribeFire.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น