Skip to content

Commit

Permalink
add ffmpeg and support its startup, use downloads.sh to download.
Browse files Browse the repository at this point in the history
  • Loading branch information
Baiqs11 committed May 29, 2024
1 parent 6023cee commit cacff23
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ rusty-tags.vi
/testcases/riscv64-linux-musl-native.tgz
/testcases/gcc/riscv64-linux-musl-native
/testcases/ZLM/MediaServer
/testcases/ZLM/ffmpeg
/testcases/ZLM/lib
testsuits-x86_64-linux-musl.tgz
.idea/
arceos-fada.bin.gz
Expand Down
4 changes: 2 additions & 2 deletions build_img.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if [ "$FILE" = "testsuits-x86_64-linux-musl" ] && [ ! -e testcases/$FILE ]; then
fi

rm -f disk.img
dd if=/dev/zero of=disk.img bs=4M count=30
dd if=/dev/zero of=disk.img bs=4M count=90

if [ "$fs" = "ext4" ]; then
mkfs.ext4 -t ext4 disk.img
Expand Down Expand Up @@ -124,4 +124,4 @@ else
sudo umount mnt
sudo rm -rf mnt
sudo chmod 777 disk.img
fi
fi
2 changes: 1 addition & 1 deletion platforms/x86_64-qemu-q35.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ timer-frequency = "4_000_000_000" # 4.0GHz
# Testcase memory start address.
testcase-memory-start = "0x1_8000_0000"
# Testcase memory size.
testcase-memory-size = "0x800_0000"
testcase-memory-size = "0x1700_0000"
# The base address of the user heap.
user-heap-base = "0x3FA0_0000"
# The base address of the user stack. And the stack bottom is `user-stack-top + max-user-stack-size`.
Expand Down
6 changes: 6 additions & 0 deletions testcases/ZLM/downloads.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
rm -rf lib ffmpeg MediaServer
git clone https://gitee.com/baiqiaosen/zlm_ffmpeg.git
mv zlm_ffmpeg/lib ./
mv zlm_ffmpeg/ffmpeg ./
mv zlm_ffmpeg/MediaServer ./
rm -rf zlm_ffmpeg
5 changes: 5 additions & 0 deletions ulib/axstarry/src/syscall_mem/imp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,8 @@ pub fn syscall_shmat(args: [usize; 6]) -> SyscallResult {

Ok(addr.as_usize() as isize)
}

/// # mlock
pub fn syscall_mlock(args: [usize; 6]) -> SyscallResult {
Ok(0)
}
1 change: 1 addition & 0 deletions ulib/axstarry/src/syscall_mem/mem_syscall_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ numeric_enum_macro::numeric_enum! {
MSYNC = 26,
MPROTECT = 10,
MEMBARRIER = 324,
MLOCK = 149,
}
}
1 change: 1 addition & 0 deletions ulib/axstarry/src/syscall_mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub fn mem_syscall(syscall_id: mem_syscall_id::MemSyscallId, args: [usize; 6]) -
SHMGET => syscall_shmget(args),
SHMCTL => Ok(0),
SHMAT => syscall_shmat(args),
MLOCK => syscall_mlock(args),
#[allow(unused)]
_ => {
panic!("Invalid Syscall Id: {:?}!", syscall_id);
Expand Down

0 comments on commit cacff23

Please sign in to comment.