重點
- 安裝 CodeSourcery,並設定 PATH
- 安裝 SVN 取得 CurtOS
- 安裝 qemu-system
- sudo apt-get install qemu-system
- 修改 /curtos/app/shell 中的 Makefile ,刪除 -Wall 參數
- 在 /curtos/ 下執行 Make
- 在 /curtos/app/shell 下執行 ./prepare-flash 後建立 flash-image 檔
- 在 /curtos/app/shell 下執行 ./run-on-connex ,得到下列執行結果
執行結果
ccc@ccc-VirtualBox ~/curtos/app/shell $ ./run-on-connex
pxa2xx_clkpwr_write: CPU frequency change attempt
##################################
# Start CuRT.... #
##################################
ID State Name
Ready idle-thread
1 Ready shell_thread
2 Running info_thread
3 Ready statistics_thread
4 Ready hello_thread
5 Ready hello2_thread
*********** CuRT statistics info ***************
Total Thread Count : 6
Total Context Switch Count : 1
Current Time Tick : 0
**************************************************
$ 1
shell: 1: command not found
try help
$ 2
shell: 2: command not found
try help
$ ls
shell: ls: command not found
try help
$ qemu: terminating on signal 2
ccc@ccc-VirtualBox ~/curtos/app/shell $
全部編譯執行過程
ccc@ccc-VirtualBox ~ $ ls
Desktop Documents Downloads Music Pictures Public Templates Videos WinD
ccc@ccc-VirtualBox ~ $ cd WinD
ccc@ccc-VirtualBox ~/WinD $ ls
ccc@ccc-VirtualBox ~/WinD $ cd ..
ccc@ccc-VirtualBox ~ $ rmdir WinD
ccc@ccc-VirtualBox ~ $ cd ..
ccc@ccc-VirtualBox /home $ mkdir /WinD
mkdir: cannot create directory ‘/WinD’: Permission denied
ccc@ccc-VirtualBox /home $ ls
ccc
ccc@ccc-VirtualBox /home $ cd ccc
ccc@ccc-VirtualBox ~ $ ls
Desktop Documents Downloads Music Pictures Public Templates Videos
ccc@ccc-VirtualBox ~ $ mkdir WinD
ccc@ccc-VirtualBox ~ $ sudo mount -t vboxsf D_Drive /home/ccc/WinD
[sudo] password for ccc:
ccc@ccc-VirtualBox ~ $ ls WinD
991exam.zip.bak music temp
Altera node.js temp1
android-sdk-windows nqu test1.txt
arduino-1.0 OpenComputer test2.txt
blender OpenComputer.zip test3.wav
cannon.wav OpenGL test4.wav
ccc099 otcc testout.bmp
ccc100 pagefile.sys test.txt
ccc101 paper test.wav
code portable test.wma
CodeSourcery QA txtdb
cut1.wav Qemu VersionControl
cut.wav RECYCLER video
dropbox ref100 wikidot
ebook refcode Wink
eclipse refLecture 審稿
EDA RG60Plus 專題
exam score.xls 授課教材
friend ScreenVideo 新增文字文件.txt
GameMaker source 新資料夾
HandyCam sp1 新資料夾 (2)
hg spbook 法規修改
Install SpongeBaby.png 藥品
kmit student 購物
mt System Volume Information
ccc@ccc-VirtualBox ~ $ cd WinD
ccc@ccc-VirtualBox ~/WinD $ cd CodeSourcery
ccc@ccc-VirtualBox ~/WinD/CodeSourcery $ ls
arm-none-eabi README-arm-none-eabi.html
bin README-arm-none-eabi.txt
jre share
lib uninstall
libexec Uninstall_Sourcery_CodeBench_Lite_for_ARM_EABI.lnk
ccc@ccc-VirtualBox ~/WinD/CodeSourcery $ ls
arm-none-eabi README-arm-none-eabi.html
bin README-arm-none-eabi.txt
jre share
lib uninstall
libexec Uninstall_Sourcery_CodeBench_Lite_for_ARM_EABI.lnk
ccc@ccc-VirtualBox ~/WinD/CodeSourcery $ ls
arm-none-eabi README-arm-none-eabi.html
bin README-arm-none-eabi.txt
jre share
lib uninstall
libexec Uninstall_Sourcery_CodeBench_Lite_for_ARM_EABI.lnk
ccc@ccc-VirtualBox ~/WinD/CodeSourcery $ cd ..
ccc@ccc-VirtualBox ~/WinD $ ls
991exam.zip.bak music temp
Altera node.js temp1
android-sdk-windows nqu test1.txt
arduino-1.0 OpenComputer test2.txt
blender OpenComputer.zip test3.wav
cannon.wav OpenGL test4.wav
ccc099 otcc testout.bmp
ccc100 pagefile.sys test.txt
ccc101 paper test.wav
code portable test.wma
CodeSourcery QA txtdb
cut1.wav Qemu VersionControl
cut.wav RECYCLER video
dropbox ref100 wikidot
ebook refcode Wink
eclipse refLecture 審稿
EDA RG60Plus 專題
exam score.xls 授課教材
friend ScreenVideo 新增文字文件.txt
GameMaker source 新資料夾
HandyCam sp1 新資料夾 (2)
hg spbook 法規修改
Install SpongeBaby.png 藥品
kmit student 購物
mt System Volume Information
ccc@ccc-VirtualBox ~/WinD $ cd Install
ccc@ccc-VirtualBox ~/WinD/Install $ ls
Android node.js
arduino-1.0-windows.zip Pointofix
avidemux_2.5_r7200_win32.exe QEMU
blender-2.59-release-windows32.exe R-2.13.1-win.exe
Camstudio2-0.exe synfigstudio-0.63.00.exe
CodeSourcery Unity3D
gimp-2.6.11-i686-setup-1.exe VersionControl
KiCAD VirtualMachine
Linux
ccc@ccc-VirtualBox ~/WinD/Install $ cd CodeSourcery
ccc@ccc-VirtualBox ~/WinD/Install/CodeSourcery $ ls
arm-2011.09-69-arm-none-eabi.bin arm-2011.09-70-arm-none-linux-gnueabi.bin
arm-2011.09-69-arm-none-eabi.exe arm-2011.09-70-arm-none-linux-gnueabi.exe
ccc@ccc-VirtualBox ~/WinD/Install/CodeSourcery $ sudo arm-2011.09-69-arm-none-eabi
sudo: arm-2011.09-69-arm-none-eabi: command not found
ccc@ccc-VirtualBox ~/WinD/Install/CodeSourcery $ ./arm-2011.09-69-arm-none-eabi.bin
Checking for required programs: awk grep sed bzip2 gunzip
Error: DASH shell not supported as system shell
The installer has detected that your system uses the dash shell
as /bin/sh. This shell is not supported by the installer.
You can work around this problem by changing /bin/sh to be a
symbolic link to a supported shell such as bash.
For example, on Ubuntu systems, execute this shell command:
% sudo dpkg-reconfigure -plow dash
Install as /bin/sh? No
Please refer to the Getting Started guide for more information,
or contact CodeSourcery Support for assistance.
ccc@ccc-VirtualBox ~/WinD/Install/CodeSourcery $ sudo dpkg-reconfigure -plow dash
ccc@ccc-VirtualBox ~/WinD/Install/CodeSourcery $ ./arm-2011.09-69-arm-none-eabi.bin
Checking for required programs: awk grep sed bzip2 gunzip
Error: DASH shell not supported as system shell
The installer has detected that your system uses the dash shell
as /bin/sh. This shell is not supported by the installer.
You can work around this problem by changing /bin/sh to be a
symbolic link to a supported shell such as bash.
For example, on Ubuntu systems, execute this shell command:
% sudo dpkg-reconfigure -plow dash
Install as /bin/sh? No
Please refer to the Getting Started guide for more information,
or contact CodeSourcery Support for assistance.
ccc@ccc-VirtualBox ~/WinD/Install/CodeSourcery $ sudo dpkg-reconfigure -plow dash
Removing 'diversion of /bin/sh to /bin/sh.distrib by dash'
Adding 'diversion of /bin/sh to /bin/sh.distrib by bash'
Removing 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by bash'
ccc@ccc-VirtualBox ~/WinD/Install/CodeSourcery $ ./arm-2011.09-69-arm-none-eabi.bin
Checking for required programs: awk grep sed bzip2 gunzip
Preparing to install…
Extracting the JRE from the installer archive…
Unpacking the JRE…
Extracting the installation resources from the installer archive…
Configuring the installer for this system's environment…
strings: '/lib/libc.so.6': No such file
Launching installer…
接著就出現視窗版的安裝畫面,我們只要一直選下一步,就可以安裝完畢。

arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Wall -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork main.c -o main.o
make[1]: arm-none-eabi-gcc: Command not found
make[1]: * [main.o] Error 127
make[1]: Leaving directory ‘/home/ccc/curtos/app/shell’
make: * [all] Error 2
ccc@ccc-VirtualBox ~/curtos $ echo $PATH
CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
ccc@ccc-VirtualBox ~/curtos $ PATH = "/home/ccc/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/:${PATH}"
PATH: command not found
ccc@ccc-VirtualBox ~/curtos $ PATH="/home/ccc/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/:${PATH}"
ccc@ccc-VirtualBox ~/curtos $ echo $PATH
/home/ccc/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/:CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
ccc@ccc-VirtualBox ~/curtos $ make
make -C app/shell
make[1]: Entering directory ‘/home/ccc/curtos/app/shell’
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Wall -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork main.c -o main.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Wall -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../device/serial.c -o ../../device/serial.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Wall -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../lib/stdio.c -o ../../lib/stdio.o
../../lib/stdio.c: In function '_PrintHex':
../../lib/stdio.c:174:6: error: variable 'cnt' set but not used [-Werror=unused-but-set-variable]
../../lib/stdio.c:170:22: error: variable 'flagl' set but not used [-Werror=unused-but-set-variable]
../../lib/stdio.c: In function 'strtoul':
../../lib/stdio.c:414:16: error: variable 'strtoul_err' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: * [../../lib/stdio.o] Error 1
make[1]: Leaving directory ‘/home/ccc/curtos/app/shell’
make: * [all] Error 2
ccc@ccc-VirtualBox ~/curtos $ ls
app arch device includes kernel lib LICENSE.txt Makefile REAMDE
ccc@ccc-VirtualBox ~/curtos $ cd app
ccc@ccc-VirtualBox ~/curtos/app $ ls
shell
ccc@ccc-VirtualBox ~/curtos/app $ cd shell
ccc@ccc-VirtualBox ~/curtos/app/shell $ ls
ld-script.lds main.o prepare-flash run-on-connex-debug
main.c Makefile run-on-connex
ccc@ccc-VirtualBox ~/curtos/app/shell $ vi Makefile
ccc@ccc-VirtualBox ~/curtos/app/shell $ vim Makefile
The program 'vim' can be found in the following packages:
* vim
* vim-gnome
* vim-tiny
* vim-athena
* vim-gtk
* vim-nox
Try: sudo apt-get install <selected package>
ccc@ccc-VirtualBox ~/curtos/app/shell $ sudo apt-get install vim
[sudo] password for ccc:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
vim-runtime
Suggested packages:
ctags vim-doc vim-scripts
The following NEW packages will be installed:
vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 365 not upgraded.
Need to get 6,912 kB of archives.
After this operation, 28.6 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://archive.ubuntu.com/ubuntu/ oneiric/main vim-runtime all 2:7.3.154+hg~74503f6ee649-2ubuntu3 [5,945 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ oneiric/main vim i386 2:7.3.154+hg~74503f6ee649-2ubuntu3 [967 kB]
Fetched 6,912 kB in 2min 39s (43.3 kB/s)
Selecting previously deselected package vim-runtime.
(Reading database … 158541 files and directories currently installed.)
Unpacking vim-runtime (from …/vim-runtime_2%3a7.3.154+hg~74503f6ee649-2ubuntu3_all.deb) …
Adding 'diversion of /usr/share/vim/vim73/doc/help.txt to /usr/share/vim/vim73/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim73/doc/tags to /usr/share/vim/vim73/doc/tags.vim-tiny by vim-runtime'
Selecting previously deselected package vim.
Unpacking vim (from …/vim_2%3a7.3.154+hg~74503f6ee649-2ubuntu3_i386.deb) …
Processing triggers for man-db …
Setting up vim-runtime (2:7.3.154+hg~74503f6ee649-2ubuntu3) …
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.3.154+hg~74503f6ee649-2ubuntu3) …
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode.
ccc@ccc-VirtualBox ~/curtos/app/shell $ vi Makefile
[1]+ Stopped vi Makefile
ccc@ccc-VirtualBox ~/curtos/app/shell $ vi Makefile
ccc@ccc-VirtualBox ~/curtos/app/shell $ vim Makefile
ccc@ccc-VirtualBox ~/curtos/app/shell $ cat Makefile
- Tested on CodeSourcery G++ Lite 2009q3
CROSS_COMPILE = arm-none-eabi-
CURT_IMAGE = curt_image
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
MACH_CFLAGS = -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork
CFLAGS = -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g $(MACH_CFLAGS)
LDSCRIPT := ld-script.lds
LDFLAGS = -nostdlib -static -e _start -p —no-undefined -X -T $(LDSCRIPT) -Map $(CURT_IMAGE).map
OBJCOPYFLAGS = -O binary -R .note -R .note.gnu.build-id -R .comment -S
SHELL_SRC = ./main.c
HW_DEP_ASM_SRC = ../../arch/arm/mach-pxa/start.S ../../arch/arm/mach-pxa/asm_port.S
HW_DEP_C_SRC = ../../device/serial.c ../../lib/stdio.c ../../arch/arm/mach-pxa/port.c
KERNEL_SRC = ../../kernel/kernel.c ../../kernel/thread.c ../../kernel/list.c ../../kernel/sync.c ../../kernel/ipc.c
SHELL_OBJ = $(SHELL_SRC:.c=.o)
HW_DEP_C_OBJ = $(HW_DEP_C_SRC:.c=.o)
HW_DEP_ASM_OBJ = $(HW_DEP_ASM_SRC:.S=.o)
KERNEL_OBJ = $(KERNEL_SRC:.c=.o)
$(CURT_IMAGE).bin: $(CURT_IMAGE).elf
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
$(CURT_IMAGE).elf: $(SHELL_OBJ) $(HW_DEP_C_OBJ) $(HW_DEP_ASM_OBJ) $(KERNEL_OBJ)
$(LD) $(LDFLAGS) -o $(CURT_IMAGE).elf $(SHELL_OBJ) $(HW_DEP_C_OBJ) $(HW_DEP_ASM_OBJ) $(KERNEL_OBJ)
$(SHELL_OBJ) : %.o : %.c
$(CC) -c $(CFLAGS) $< -o $@
$(HW_DEP_C_OBJ) : %.o : %.c
$(CC) -c $(CFLAGS) $< -o $@
$(HW_DEP_ASM_OBJ) : %.o : %.S
$(CC) -c $(CFLAGS) $< -o $@
$(KERNEL_OBJ) : %.o : %.c
$(CC) -c $(CFLAGS) $< -o $@
clean:
rm -f ../../arch/arm/mach-pxa/*.o ../../kernel/*.o ../../device/*.o ../../lib/*.o ./*.o $(CURT_IMAGE).bin $(CURT_IMAGE).elf flash-image
ccc@ccc-VirtualBox ~/curtos/app/shell $ make
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../lib/stdio.c -o ../../lib/stdio.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../arch/arm/mach-pxa/port.c -o ../../arch/arm/mach-pxa/port.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../arch/arm/mach-pxa/start.S -o ../../arch/arm/mach-pxa/start.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../arch/arm/mach-pxa/asm_port.S -o ../../arch/arm/mach-pxa/asm_port.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/kernel.c -o ../../kernel/kernel.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/thread.c -o ../../kernel/thread.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/list.c -o ../../kernel/list.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/sync.c -o ../../kernel/sync.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/ipc.c -o ../../kernel/ipc.o
arm-none-eabi-ld -nostdlib -static -e _start -p —no-undefined -X -T ld-script.lds -Map curt_image.map -o curt_image.elf ./main.o ../../device/serial.o ../../lib/stdio.o ../../arch/arm/mach-pxa/port.o ../../arch/arm/mach-pxa/start.o ../../arch/arm/mach-pxa/asm_port.o ../../kernel/kernel.o ../../kernel/thread.o ../../kernel/list.o ../../kernel/sync.o ../../kernel/ipc.o
arm-none-eabi-objcopy -O binary -R .note -R .note.gnu.build-id -R .comment -S curt_image.elf curt_image.bin
ccc@ccc-VirtualBox ~/curtos/app/shell $ cd ..
ccc@ccc-VirtualBox ~/curtos/app $ cd ..
ccc@ccc-VirtualBox ~/curtos $ make
make -C app/shell
make[1]: Entering directory ‘/home/ccc/curtos/app/shell’
make[1]: ‘curt_image.bin’ is up to date.
make[1]: Leaving directory ‘/home/ccc/curtos/app/shell’
ccc@ccc-VirtualBox ~/curtos $ make clena
make: * No rule to make target ‘clena’. Stop.
ccc@ccc-VirtualBox ~/curtos $ make clan
make: * No rule to make target ‘clan’. Stop.
ccc@ccc-VirtualBox ~/curtos $ make clean
make -C app/shell clean
make[1]: Entering directory ‘/home/ccc/curtos/app/shell’
rm -f ../../arch/arm/mach-pxa/*.o ../../kernel/*.o ../../device/*.o ../../lib/*.o ./*.o curt_image.bin curt_image.elf flash-image
make[1]: Leaving directory ‘/home/ccc/curtos/app/shell’
ccc@ccc-VirtualBox ~/curtos $ make
make -C app/shell
make[1]: Entering directory ‘/home/ccc/curtos/app/shell’
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork main.c -o main.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../device/serial.c -o ../../device/serial.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../lib/stdio.c -o ../../lib/stdio.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../arch/arm/mach-pxa/port.c -o ../../arch/arm/mach-pxa/port.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../arch/arm/mach-pxa/start.S -o ../../arch/arm/mach-pxa/start.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../arch/arm/mach-pxa/asm_port.S -o ../../arch/arm/mach-pxa/asm_port.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/kernel.c -o ../../kernel/kernel.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/thread.c -o ../../kernel/thread.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/list.c -o ../../kernel/list.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/sync.c -o ../../kernel/sync.o
arm-none-eabi-gcc -c -I../../includes/arch/arm/mach-pxa -I../../includes -Werror -fno-builtin -O0 -g -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -mabi=aapcs-linux -mno-thumb-interwork ../../kernel/ipc.c -o ../../kernel/ipc.o
arm-none-eabi-ld -nostdlib -static -e _start -p —no-undefined -X -T ld-script.lds -Map curt_image.map -o curt_image.elf ./main.o ../../device/serial.o ../../lib/stdio.o ../../arch/arm/mach-pxa/port.o ../../arch/arm/mach-pxa/start.o ../../arch/arm/mach-pxa/asm_port.o ../../kernel/kernel.o ../../kernel/thread.o ../../kernel/list.o ../../kernel/sync.o ../../kernel/ipc.o
arm-none-eabi-objcopy -O binary -R .note -R .note.gnu.build-id -R .comment -S curt_image.elf curt_image.bin
make[1]: Leaving directory ‘/home/ccc/curtos/app/shell’
ccc@ccc-VirtualBox ~/curtos $ qemu-system-arm
The program 'qemu-system-arm' is currently not installed. You can install it by typing:
sudo apt-get install qemu-system
ccc@ccc-VirtualBox ~/curtos $ sudo apt-get install qemu
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
bridge-utils cpu-checker libaio1 msr-tools qemu-common qemu-kvm seabios
vgabios
Suggested packages:
ipxe mol-drivers-macosx openbios-sparc ubuntu-vm-builder uml-utilities
The following NEW packages will be installed:
bridge-utils cpu-checker libaio1 msr-tools qemu qemu-common qemu-kvm seabios
vgabios
0 upgraded, 9 newly installed, 0 to remove and 365 not upgraded.
Need to get 3,988 kB of archives.
After this operation, 12.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://archive.ubuntu.com/ubuntu/ oneiric-updates/main bridge-utils i386 1.5-2ubuntu1.1 [31.4 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ oneiric/main seabios all 0.6.2-0ubuntu1 [67.3 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ oneiric/main vgabios all 0.6c-2ubuntu3 [164 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ oneiric-updates/main qemu-common all 0.14.1+noroms-0ubuntu6.2 [23.1 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ oneiric/main libaio1 i386 0.3.109-1ubuntu2 [6,596 B]
Get:6 http://archive.ubuntu.com/ubuntu/ oneiric-updates/main qemu-kvm i386 0.14.1+noroms-0ubuntu6.2 [3,677 kB]
16% [6 qemu-kvm 357 kB/3,677 kB 9%] 28.4 kB/s 1min 57s^Cccc@ccc-VirtualBox ~/curtos $ sudo apt-get install qemu
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
bridge-utils cpu-checker libaio1 msr-tools qemu-common qemu-kvm seabios
vgabios
Suggested packages:
ipxe mol-drivers-macosx openbios-sparc ubuntu-vm-builder uml-utilities
The following NEW packages will be installed:
bridge-utils cpu-checker libaio1 msr-tools qemu qemu-common qemu-kvm seabios
vgabios
0 upgraded, 9 newly installed, 0 to remove and 365 not upgraded.
Need to get 3,695 kB/3,988 kB of archives.
After this operation, 12.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://archive.ubuntu.com/ubuntu/ oneiric-updates/main qemu-kvm i386 0.14.1+noroms-0ubuntu6.2 [3,677 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ oneiric/main msr-tools i386 1.2-3 [8,942 B]
Get:3 http://archive.ubuntu.com/ubuntu/ oneiric/main cpu-checker all 0.6-0ubuntu1 [6,374 B]
Get:4 http://archive.ubuntu.com/ubuntu/ oneiric-updates/universe qemu i386 0.14.1+noroms-0ubuntu6.2 [2,666 B]
Fetched 3,310 kB in 1min 39s (33.3 kB/s)
Selecting previously deselected package bridge-utils.
(Reading database … 160098 files and directories currently installed.)
Unpacking bridge-utils (from …/bridge-utils_1.5-2ubuntu1.1_i386.deb) …
Selecting previously deselected package seabios.
Unpacking seabios (from …/seabios_0.6.2-0ubuntu1_all.deb) …
Selecting previously deselected package vgabios.
Unpacking vgabios (from …/vgabios_0.6c-2ubuntu3_all.deb) …
Selecting previously deselected package qemu-common.
Unpacking qemu-common (from …/qemu-common_0.14.1+noroms-0ubuntu6.2_all.deb) …
Selecting previously deselected package libaio1.
Unpacking libaio1 (from …/libaio1_0.3.109-1ubuntu2_i386.deb) …
Selecting previously deselected package qemu-kvm.
Unpacking qemu-kvm (from …/qemu-kvm_0.14.1+noroms-0ubuntu6.2_i386.deb) …
Selecting previously deselected package msr-tools.
Unpacking msr-tools (from …/msr-tools_1.2-3_i386.deb) …
Selecting previously deselected package cpu-checker.
Unpacking cpu-checker (from …/cpu-checker_0.6-0ubuntu1_all.deb) …
Selecting previously deselected package qemu.
Unpacking qemu (from …/qemu_0.14.1+noroms-0ubuntu6.2_i386.deb) …
Processing triggers for man-db …
Processing triggers for ureadahead …
ureadahead will be reprofiled on next reboot
Setting up bridge-utils (1.5-2ubuntu1.1) …
Setting up seabios (0.6.2-0ubuntu1) …
Setting up vgabios (0.6c-2ubuntu3) …
Setting up qemu-common (0.14.1+noroms-0ubuntu6.2) …
Setting up libaio1 (0.3.109-1ubuntu2) …
Setting up qemu-kvm (0.14.1+noroms-0ubuntu6.2) …
qemu-kvm start/running
Setting up msr-tools (1.2-3) …
Setting up cpu-checker (0.6-0ubuntu1) …
Setting up qemu (0.14.1+noroms-0ubuntu6.2) …
Processing triggers for libc-bin …
ldconfig deferred processing now taking place
ccc@ccc-VirtualBox ~/curtos $ sudo qemu-arm
sudo: qemu-arm: command not found
ccc@ccc-VirtualBox ~/curtos $ qemu-arm
The program 'qemu-arm' is currently not installed. You can install it by typing:
sudo apt-get install qemu-user
ccc@ccc-VirtualBox ~/curtos $ sudo apt-get install qemu-arm
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package qemu-arm
ccc@ccc-VirtualBox ~/curtos $ sudo apt-get install qemu-user
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
qemu-user
0 upgraded, 1 newly installed, 0 to remove and 365 not upgraded.
Need to get 4,379 kB of archives.
After this operation, 13.9 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ oneiric/universe qemu-user i386 0.15.50-2011.08-0ubuntu4 [4,379 kB]
24% [1 qemu-user 1,080 kB/4,379 kB 24%] 32.9 kB/s 1min 40s^25% [1 qemu-user 1,126 kB/4,379 kB 25%] 32.9 kB/s 1min 38s^X^Cccc@ccc-VirtualBox ~/curtos $ sudo apt-get install qemu-system
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libvde0 libvdeplug2 qemu-keymaps vde2
Suggested packages:
vde2-cryptcab
The following NEW packages will be installed:
libvde0 libvdeplug2 qemu-keymaps qemu-system vde2
0 upgraded, 5 newly installed, 0 to remove and 365 not upgraded.
Need to get 14.4 MB of archives.
After this operation, 40.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://archive.ubuntu.com/ubuntu/ oneiric/universe libvde0 i386 2.2.3-3build1 [27.6 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ oneiric/universe libvdeplug2 i386 2.2.3-3build1 [12.3 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ oneiric/universe qemu-keymaps all 0.15.50-2011.08-0ubuntu4 [19.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ oneiric/universe qemu-system i386 0.15.50-2011.08-0ubuntu4 [14.2 MB]
Get:5 http://archive.ubuntu.com/ubuntu/ oneiric/universe vde2 i386 2.2.3-3build1 [207 kB]
Fetched 14.4 MB in 7min 36s (31.6 kB/s)
Selecting previously deselected package libvde0.
(Reading database … 160267 files and directories currently installed.)
Unpacking libvde0 (from …/libvde0_2.2.3-3build1_i386.deb) …
Selecting previously deselected package libvdeplug2.
Unpacking libvdeplug2 (from …/libvdeplug2_2.2.3-3build1_i386.deb) …
Selecting previously deselected package qemu-keymaps.
Unpacking qemu-keymaps (from …/qemu-keymaps_0.15.50-2011.08-0ubuntu4_all.deb) …
Selecting previously deselected package qemu-system.
Unpacking qemu-system (from …/qemu-system_0.15.50-2011.08-0ubuntu4_i386.deb) …
Selecting previously deselected package vde2.
Unpacking vde2 (from …/vde2_2.2.3-3build1_i386.deb) …
Processing triggers for man-db …
Setting up libvde0 (2.2.3-3build1) …
Setting up libvdeplug2 (2.2.3-3build1) …
Setting up qemu-keymaps (0.15.50-2011.08-0ubuntu4) …
Setting up qemu-system (0.15.50-2011.08-0ubuntu4) …
Setting up vde2 (2.2.3-3build1) …
Processing triggers for libc-bin …
ldconfig deferred processing now taking place
ccc@ccc-VirtualBox ~/curtos $ ls
app arch device includes kernel lib LICENSE.txt Makefile REAMDE
ccc@ccc-VirtualBox ~/curtos $ cd app
ccc@ccc-VirtualBox ~/curtos/app $ ls
shell
ccc@ccc-VirtualBox ~/curtos/app $ cd shell
ccc@ccc-VirtualBox ~/curtos/app/shell $ ls
curt_image.bin curt_image.map main.c Makefile run-on-connex
curt_image.elf ld-script.lds main.o prepare-flash run-on-connex-debug
ccc@ccc-VirtualBox ~/curtos/app/shell $ run-on-connex
run-on-connex: command not found
ccc@ccc-VirtualBox ~/curtos/app/shell $ ./run-on-connex
qemu-system-arm: -pflash flash-image: could not open disk image flash-image: No such file or directory
ccc@ccc-VirtualBox ~/curtos/app/shell $ ./prepare-flash
16384+0 records in
16384+0 records out
16777216 bytes (17 MB) copied, 0.0616302 s, 272 MB/s
16+1 records in
16+1 records out
16828 bytes (17 kB) copied, 0.000167925 s, 100 MB/s
ccc@ccc-VirtualBox ~/curtos/app/shell $ ./run-on-connex
pxa2xx_clkpwr_write: CPU frequency change attempt
##################################
- Start CuRT…. #
##################################
ID State Name
Ready idle-thread
1 Ready shell_thread
2 Running info_thread
3 Ready statistics_thread
4 Ready hello_thread
5 Ready hello2_thread
* CuRT statistics info *
Total Thread Count : 6
Total Context Switch Count : 1
Current Time Tick : 0
**
$
Facebook
Post preview:
Close preview