สิ่งที่เกี่ยวข้อง

วันจันทร์ที่ ๓ ธันวาคม พ.ศ. ๒๕๕๐

ตัวอย่างการนำ Application ไปทำการทดสอบ uCinux ด้วย Skyeye Emulator

ตัวอย่างนี้ทำบน Ubuntu 7.10 ซึ่งประกอบด้วย
  1. arm-elf-gcc
  2. genromfs ค้นหาและติดตั้ง >>
  3. Skyeye
  4. Test-Suite ของ Skyeye >>
  5. hello จากตัวอย่างที่จะนำไปทดสอบ อ้างอิง >>
เมื่อเราได้ไฟล์ Binary หลังจาก Compile แล้วนั้น
เราก็จะนำไฟล์นั้นไปใส่ในระบบไฟล์ของ 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

เราจะได้ระบบไฟล์ romfs.img อันใหม่ที่ใส่ hello Application ลงไปจากนั้นก็รัน uClinux >>
เมื่อ Boot เสร็จจึงลองรัน Application
\>cd bin
/bin>hello
Hello, embedded linux!
ตัวอย่างนี้เป็นวิธีในการทดสอบ Application ที่จะทำงานบน uClinux ก็จะใช้งานในระบบจริง ซึ่งสามารถประยุกต์ในการทดสอบ Application ที่ต่างกันออกไปได

** ไม่สามารถทดสอบบน Cygwin ได้เนื่องจากไม่สามารถ Mount แบบ Loop ได้้

Powered by ScribeFire.

ไม่มีความคิดเห็น:

ผู้สนับสนุน

จัดตามกลุ่ม