-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'amd64-smp' of https://github.com/chyyuu/ucore_plus
- Loading branch information
Showing
733 changed files
with
239,489 additions
and
9,320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,10 @@ | |
*.lai | ||
*.la | ||
*.a | ||
|
||
# temp files | ||
*~ | ||
*.swp | ||
*.bak | ||
*.new | ||
*.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
README for ucore amd64 in ubuntu 12.04 x86-64 | ||
|
||
----------------------------- | ||
prerequirement: | ||
------------------ | ||
intalll gcc x86-64 and qemu-system-x86_64 | ||
|
||
------------------ | ||
build | ||
------------------ | ||
cd ucore | ||
1 set kernel configure | ||
make ARCH=amd64 defconfig // use amd64's default configure | ||
OR | ||
make ARCH=amd64 menuconfig //do nothing or select custom config, just save&exit | ||
2 build kernel | ||
make // build obj/kernel.img | ||
3 build file system | ||
make sfsimg // build obj/sfs.img | ||
|
||
NOTICE: no need to build swapimg | ||
------------------ | ||
run | ||
------------------ | ||
./uCore_run -d obj | ||
|
||
OR | ||
qemu-system-x86_64 -m 512 -hda obj/kernel.img -drive file=obj/sfs.img,media=disk,cache=writeback,index=2 -s -serial file:obj/serial.log -monitor stdio | ||
|
||
------------------ | ||
debug | ||
------------------ | ||
* qemu+gdb | ||
|
||
qemu and gdb do not properly handle mode-switching between 32- and | ||
64-bit code: once gdb connects in 32-bit mode, it will not switch to | ||
64-bit mode. Thus, debugging 64-bit code requires attaching gdb after | ||
qemu is already executing 64-bit code. Do not use -S, since that will | ||
attach in 16-/32-bit mode. | ||
|
||
//In a terminal.. | ||
$ uCore_run -d obj | ||
|
||
//In a different terminal | ||
$ cp gdbinit.amd64 .gdbinit | ||
$ gdb | ||
... | ||
The target architecture is assumed to be i386:x86-64 | ||
0xffffffffc011b5fc in ?? () | ||
(gdb) continue | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TODO: add simple introduction about hwo to build and run ucore for arm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
README for ucore i386 in ubuntu 12.04 x86-64 | ||
|
||
----------------------------- | ||
prerequirement: | ||
------------------ | ||
intalll gcc x86-64 and qemu-system-x86_64 | ||
|
||
------------------ | ||
build | ||
------------------ | ||
cd ucore | ||
make menuconfig ARCH=x86_84 | ||
make | ||
make sfsimg | ||
make swapimg | ||
|
||
------------------ | ||
run | ||
------------------ | ||
./uCore_run -d obj | ||
|
||
OR | ||
qemu-system-i386 -m 128 -hda obj//kernel.img -drive file=obj//swap.img,media=disk,cache=writeback -drive file=obj//sfs.img,media=disk,cache=writeback -s -serial file:obj//serial.log -monitor stdio | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
BUILD_DIR_I386=build-i386 | ||
BUILD_DIR_ARM=build-arm | ||
BUILD_DIR_AMD64=build-amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,44 @@ | ||
#!/bin/bash | ||
|
||
NR_CPUS=`grep processor /proc/cpuinfo | wc -l` | ||
|
||
pushd `dirname $0` > /dev/null | ||
source autotest.config | ||
cd ucore | ||
|
||
# Run tests on i386 silently | ||
./uCore_test -d $BUILD_DIR_I386 -t 20 -r -s ucore > /dev/null 2>&1 | ||
if [ $NR_CPUS -ge 4 ]; then | ||
./uCore_test -d $BUILD_DIR_I386 -t 20 -r -s ucore > /dev/null 2>&1 & | ||
PIDS[0]=$! | ||
./uCore_test -t 45 -w 15 -d $BUILD_DIR_ARM -r -s all > /dev/null 2>&1 & | ||
PIDS[1]=$! | ||
./uCore_test -d $BUILD_DIR_AMD64 -t 20 -r -s ucore > /dev/null 2>&1 & | ||
PIDS[2]=$! | ||
|
||
# Run tests on arm silently | ||
./uCore_test -t 45 -w 15 -d $BUILD_DIR_ARM -r -s all > /dev/null 2>&1 | ||
for i in {0..2}; do | ||
wait ${PIDS[i]} | ||
done | ||
else | ||
# Resource limited. Run the tests one by one | ||
./uCore_test -d $BUILD_DIR_I386 -t 20 -r -s ucore > /dev/null 2>&1 | ||
./uCore_test -t 45 -w 15 -d $BUILD_DIR_ARM -r -s all > /dev/null 2>&1 | ||
./uCore_test -d $BUILD_DIR_AMD64 -t 20 -r -s ucore > /dev/null 2>&1 | ||
fi | ||
|
||
# Dump results to stdout | ||
echo "==================== i386 ====================" | ||
cat $BUILD_DIR_I386/test-result.latest/summary | ||
echo "" | ||
echo "==================== arm ====================" | ||
cat $BUILD_DIR_ARM/test-result.latest/summary | ||
echo "========================= SUMMARY ==========================" | ||
printf "%-20s%-10s%-10s%-10s%-10s\n" "" passed failed broken total | ||
tail -n 1 $BUILD_DIR_I386/test-result.latest/summary | ||
tail -n 1 $BUILD_DIR_ARM/test-result.latest/summary | ||
tail -n 1 $BUILD_DIR_AMD64/test-result.latest/summary | ||
echo | ||
|
||
echo "=========================== i386 ===========================" | ||
head -n $[ `cat $BUILD_DIR_I386/test-result.latest/summary | wc -l` - 3 ] $BUILD_DIR_I386/test-result.latest/summary | ||
echo | ||
echo "=========================== ARM ============================" | ||
head -n $[ `cat $BUILD_DIR_ARM/test-result.latest/summary | wc -l` - 3 ] $BUILD_DIR_ARM/test-result.latest/summary | ||
echo | ||
echo "========================== amd64 ===========================" | ||
head -n $[ `cat $BUILD_DIR_AMD64/test-result.latest/summary | wc -l` - 3 ] $BUILD_DIR_AMD64/test-result.latest/summary | ||
|
||
popd > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,10 @@ src/user-ucore/bin | |
src/user-ucore/_initial | ||
|
||
# generated manuals | ||
*.man | ||
*.man | ||
|
||
#ctags file | ||
tags | ||
|
||
#temp files | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
find . -type f -name "*.[chS]" >all.cscope.files | ||
cat all.cscope.files |awk -F'/' '$2 != "package" && $3 !="glue-kern" && $4 !="module"{print($0)}'|awk -F'/' '$0 !~ /arch\/nios2\// && $0 !~ /arch\/arm\// && $0 !~ /arch\/mips\// && $0 !~ /arch\/i386\// && $0 !~ /or32\// && $0 !~ /arch\/um\// && $0 !~ /yaff/ && $0 !~ /fatfs/{print($0)}' > cscope.files | ||
rm all.cscope.files | ||
cscope -bq | ||
ctags -L cscope.files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
find . -type f -name "*.[chS]" >all.cscope.files | ||
cat all.cscope.files |awk -F'/' '$2 != "package" && $3 !="glue-kern" && $4 !="module"{print($0)}'|awk -F'/' '$0 !~ /arch\/nios2\// && $0 !~ /arch\/arm\// && $0 !~ /arch\/mips\// && $0 !~ /arch\/amd64\// && $0 !~ /or32\// && $0 !~ /arch\/um\// && $0 !~ /yaff/ && $0 !~ /fatfs/{print($0)}' > cscope.files | ||
rm all.cscope.files | ||
cscope -bq | ||
ctags -L cscope.files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The documents in this directory for amd64(x86-64) smp (multicore) porting. |
Oops, something went wrong.