Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
f4c498c7
Commit
f4c498c7
authored
Feb 11, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6e2d36cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
t/qemu-runlinux
t/qemu-runlinux
+19
-7
No files found.
t/qemu-runlinux
View file @
f4c498c7
...
@@ -27,23 +27,29 @@ if [ $$ == 1 ]; then
...
@@ -27,23 +27,29 @@ if [ $$ == 1 ]; then
mount
-t
debugfs none /sys/kernel/debug
mount
-t
debugfs none /sys/kernel/debug
#mount -t bpf none /sys/fs/bpf
#mount -t bpf none /sys/fs/bpf
mount
-t
proc none /proc
mount
-t
proc none /proc
mount
-t
devtmpfs none /dev
mkdir
/dev/
{
pts,mqueue,hugepages,shm
}
mount
-t
devpts none /dev/pts
mount
-t
devpts none /dev/pts
mount
-t
mqueue none /dev/mqueue
mount
-t
mqueue none /dev/mqueue
mount
-t
hugetlbfs none /dev/hugepages
mount
-t
hugetlbfs none /dev/hugepages
mount
-t
tmpfs none /dev/shm
# XXX securityfs
# XXX securityfs
# XXX udev?
mount
-t
tmpfs none /dev/shm
mount
-t
tmpfs none /run
mount
-t
tmpfs none /run
mkdir
/run/lock
mkdir
/run/lock
mount
-t
tmpfs none /run/lock
mount
-t
tmpfs none /run/lock
mount
-t
tmpfs none /tmp
mount
-t
tmpfs none /tmp
qrun
=
`
grep
-o
'QRUN=.*$'
/proc/cmdline
`
||
qdie
"QRUN=?"
# XXX source bashrc ?
qrun
=
${
qrun
#QRUN=
}
# QRUN=prog -> prog
# FIXME "/dev/tty: No such device or address"
test
-n
"
$qrun
"
||
qdie
"QRUN empty"
test
-n
"
$QDIR
"
||
qdie
"QDIR=?"
cd
"
$QDIR
"
test
-n
"
$QRUN
"
||
qdie
"QRUN=?"
set
+e
set
+e
$
qrun
$
QRUN
echo
"exit code:
$?
"
echo
"exit code:
$?
"
qshutdown
qshutdown
...
@@ -57,6 +63,7 @@ test -z "$kernel" && kernel=arch/$arch/boot/bzImage
...
@@ -57,6 +63,7 @@ test -z "$kernel" && kernel=arch/$arch/boot/bzImage
shift
shift
prog
=
"
$@
"
prog
=
"
$@
"
dir
=
`
pwd
`
# may be also useful:
# may be also useful:
# -serial stdio
# -serial stdio
...
@@ -79,12 +86,17 @@ prog="$@"
...
@@ -79,12 +86,17 @@ prog="$@"
qemu-system-
$arch
\
qemu-system-
$arch
\
-enable-kvm
\
-enable-kvm
\
-nographic
\
-nographic
\
\
-m
512M
`
# default 128M is too limiting` \
\
\
-fsdev
local
,id
=
R,path
=
/,security_model
=
none,readonly
\
-fsdev
local
,id
=
R,path
=
/,security_model
=
none,readonly
\
-device
virtio-9p-pci,fsdev
=
R,mount_tag
=
/dev/root
\
-device
virtio-9p-pci,fsdev
=
R,mount_tag
=
/dev/root
\
\
\
-kernel
$kernel
\
-kernel
$kernel
\
-append
"ro rootfstype=9p rootflags=trans=virtio console=ttyS0 init=
$(
realpath
$0
)
QRUN=
$prog
"
-append
"ro rootfstype=9p rootflags=trans=virtio
\
console=ttyS0 init=
$(
realpath
$0
)
QDIR=
$dir
QRUN=
$prog
\
HOME="
$HOME
" LANG="
$LANG
" TERM="
$TERM
" PATH="
$PATH
"
\
"
# \
# \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment