도와주세요!!
글 수 15,339
2003.12.26 17:54:17 (*.43.74.94)
6899
RTAI를 EZX5에 포팅하느라 며칠 고생한거 같습니다.
혹 필요하신 분 가져다 쓰세요.
그리고 아직 완벽하진 않은 것 같으니 고쳐서 올려주시면 더 좋구요..
그럼..
RTAI를 EZBoard-X5에 설치하는 법
(1) Linux kernel source
http://www.kernel.org/
linux.2.4.21.tar.gz
(2) ARM patch file
ftp://ftp.arm.uk.linux.org/pub/linux/arm/kernel/v2.4/patch-2.4.21-rmk1.gz
(3) Xscale PXA255 patch file
ftp://ftp.arm.uk.linux.org/pub/linux/arm/people/nico/diff-2.4.21-rmk1-pxa1.gz
(4) RTAI patch file
rtai-3.0-test2/rtai-core/arch/arm/patches/patch-2.4.21-sa11x0-pxa-fixed-rthal5
(5) EZX5 patch file
patch-2.4.21-rmk1-pxa1-rthal5-ezx5
(1) RTAI source
http://www.aero.polimi.it/RTAI/rtai-3.0-test2.tar.bz2
(2) RTAI EZX5 patch file
patch-rtai3.0-test2-cch1
(1) 커널 압축풀기 및 패치
cd /ezx5/rtai
tar xvzf linux-2.4.21.tar.gz
mv linux-2.4.21 linux
cd linux
zcat ../patch-2.4.21-rmk1.gz | patch -p1
zcat ../diff-2.4.21-rmk1-pxa1.gz | patch -p1
cat ../patch-2.4.21-sa11x0-pxa-fixed-rthal5 | patch -p1
cat ../patch-2.4.21-rmk1-pxa1-rthal5-ezx5 | patch -p1
(2) 커널초기화 및 컴파일
make ez-x5_config
make oldconfig
RTAI Realtime Hardware abstraction Layer (CONFIG_RTHAL) [N/y/?] (NEW) y
make dep
make zImage
cp arch.arm.boot/zImage /tftpboot/zImage.x5-rtai
(1) RAMDISK 마운트
mkdir ramdisk_dir
gzip -d ramdiskx5.gz
mount -t ext2 -o loop ramdiskx5 ramdisk_dir
(2) rc.local 편집
cd ramdisk_dir
cd etc/rc.d
vi rc.local
mknod -m 666 /dev/rtai_shm c 10 254
mknod -m 666 /dev/rtf0 c 150 0
mknod -m 666 /dev/rtf1 c 150 1
mknod -m 666 /dev/rtf2 c 150 2
mknod -m 666 /dev/rtf3 c 150 3
mknod -m 666 /dev/rtf4 c 150 4
mknod -m 666 /dev/rtf5 c 150 5
mknod -m 666 /dev/rtf6 c 150 6
mknod -m 666 /dev/rtf7 c 150 7
mknod -m 666 /dev/rtf8 c 150 8
mknod -m 666 /dev/rtf9 c 150 9
echo "created /dev/rtai_shm (major 10)"
echo "created /dev/rtf0 - 9 (major 150)"
(3) RAMDISK 언마운트
umount ramdisk_dir
gzip ramdiskx5
cp ramdiskx5.gz /tftpboot
<커널과 램디스트를 EZX5에 다운도딩>
(1) 커널 압축풀기 및 패치
cd /ezx5/rtai
tar xvjf rtai-3.0-test2.tar.bz2
cd rtai-3.0-test2
cat ../patch-rtai3.0-test2-cch1 | patch -p1
make ARCH=arm CROSS_COMPILE=armv5l-linux-
cp modules/* /nfs
(2) EZX5 보드에서 시험
cd /ezx5/rtai/rtai-3.0-test2/rtai-testsuite/kern/preempt
cp display rt_process.o /nfs
cd /nfs
insmod rtai_hal.o
insmod rtai_ksched.o
insmod rtai_fifos.o
insmod rt_process.o
./display
출력
* latency: min: 1, max: 50, average: 2; fastjit: 40, slowjit: 60 * (all us) *
* latency: min: 1, max: 50, average: 1; fastjit: 40, slowjit: 60 * (all us) *
* latency: min: 1, max: 55, average: 2; fastjit: 91, slowjit: 81 * (all us) *
* latency: min: 1, max: 57, average: 2; fastjit: 91, slowjit: 81 * (all us) *
...
...
...
문제점>
1. latency 예제는 unresolved symbol __fixunsdfsi
라는 에러가 뜨는데 왜 그런지 잘 모르겠다.
혹 필요하신 분 가져다 쓰세요.
그리고 아직 완벽하진 않은 것 같으니 고쳐서 올려주시면 더 좋구요..
그럼..
RTAI를 EZBoard-X5에 설치하는 법
(1) Linux kernel source
http://www.kernel.org/
linux.2.4.21.tar.gz
(2) ARM patch file
ftp://ftp.arm.uk.linux.org/pub/linux/arm/kernel/v2.4/patch-2.4.21-rmk1.gz
(3) Xscale PXA255 patch file
ftp://ftp.arm.uk.linux.org/pub/linux/arm/people/nico/diff-2.4.21-rmk1-pxa1.gz
(4) RTAI patch file
rtai-3.0-test2/rtai-core/arch/arm/patches/patch-2.4.21-sa11x0-pxa-fixed-rthal5
(5) EZX5 patch file
patch-2.4.21-rmk1-pxa1-rthal5-ezx5
(1) RTAI source
http://www.aero.polimi.it/RTAI/rtai-3.0-test2.tar.bz2
(2) RTAI EZX5 patch file
patch-rtai3.0-test2-cch1
(1) 커널 압축풀기 및 패치
cd /ezx5/rtai
tar xvzf linux-2.4.21.tar.gz
mv linux-2.4.21 linux
cd linux
zcat ../patch-2.4.21-rmk1.gz | patch -p1
zcat ../diff-2.4.21-rmk1-pxa1.gz | patch -p1
cat ../patch-2.4.21-sa11x0-pxa-fixed-rthal5 | patch -p1
cat ../patch-2.4.21-rmk1-pxa1-rthal5-ezx5 | patch -p1
(2) 커널초기화 및 컴파일
make ez-x5_config
make oldconfig
RTAI Realtime Hardware abstraction Layer (CONFIG_RTHAL) [N/y/?] (NEW) y
make dep
make zImage
cp arch.arm.boot/zImage /tftpboot/zImage.x5-rtai
(1) RAMDISK 마운트
mkdir ramdisk_dir
gzip -d ramdiskx5.gz
mount -t ext2 -o loop ramdiskx5 ramdisk_dir
(2) rc.local 편집
cd ramdisk_dir
cd etc/rc.d
vi rc.local
mknod -m 666 /dev/rtai_shm c 10 254
mknod -m 666 /dev/rtf0 c 150 0
mknod -m 666 /dev/rtf1 c 150 1
mknod -m 666 /dev/rtf2 c 150 2
mknod -m 666 /dev/rtf3 c 150 3
mknod -m 666 /dev/rtf4 c 150 4
mknod -m 666 /dev/rtf5 c 150 5
mknod -m 666 /dev/rtf6 c 150 6
mknod -m 666 /dev/rtf7 c 150 7
mknod -m 666 /dev/rtf8 c 150 8
mknod -m 666 /dev/rtf9 c 150 9
echo "created /dev/rtai_shm (major 10)"
echo "created /dev/rtf0 - 9 (major 150)"
(3) RAMDISK 언마운트
umount ramdisk_dir
gzip ramdiskx5
cp ramdiskx5.gz /tftpboot
<커널과 램디스트를 EZX5에 다운도딩>
(1) 커널 압축풀기 및 패치
cd /ezx5/rtai
tar xvjf rtai-3.0-test2.tar.bz2
cd rtai-3.0-test2
cat ../patch-rtai3.0-test2-cch1 | patch -p1
make ARCH=arm CROSS_COMPILE=armv5l-linux-
cp modules/* /nfs
(2) EZX5 보드에서 시험
cd /ezx5/rtai/rtai-3.0-test2/rtai-testsuite/kern/preempt
cp display rt_process.o /nfs
cd /nfs
insmod rtai_hal.o
insmod rtai_ksched.o
insmod rtai_fifos.o
insmod rt_process.o
./display
출력
* latency: min: 1, max: 50, average: 2; fastjit: 40, slowjit: 60 * (all us) *
* latency: min: 1, max: 50, average: 1; fastjit: 40, slowjit: 60 * (all us) *
* latency: min: 1, max: 55, average: 2; fastjit: 91, slowjit: 81 * (all us) *
* latency: min: 1, max: 57, average: 2; fastjit: 91, slowjit: 81 * (all us) *
...
...
...
문제점>
1. latency 예제는 unresolved symbol __fixunsdfsi
라는 에러가 뜨는데 왜 그런지 잘 모르겠다.