Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
redoxer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
redoxer
Commits
f7a8eae6
Verified
Commit
f7a8eae6
authored
5 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Support passing a path to a file to run, parse exit status differently
parent
2ad8e56f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
redoxer.sh
+16
-3
16 additions, 3 deletions
redoxer.sh
src/bin/redoxerd.rs
+1
-2
1 addition, 2 deletions
src/bin/redoxerd.rs
with
17 additions
and
5 deletions
redoxer.sh
+
16
−
3
View file @
f7a8eae6
...
@@ -90,8 +90,6 @@ function redoxfs_mount {
...
@@ -90,8 +90,6 @@ function redoxfs_mount {
done
done
}
}
name
=
"
$(
basename
"
$1
"
)
"
if
[
!
-f
build/bootloader.bin
]
if
[
!
-f
build/bootloader.bin
]
then
then
echo
"building bootloader"
>
&2
echo
"building bootloader"
>
&2
...
@@ -139,13 +137,25 @@ mkdir -p "build/${uuid}"
...
@@ -139,13 +137,25 @@ mkdir -p "build/${uuid}"
redoxfs_mount
"build/
${
uuid
}
.bin"
"build/
${
uuid
}
"
redoxfs_mount
"build/
${
uuid
}
.bin"
"build/
${
uuid
}
"
cp
"target/
${
TARGET
}
/release/redoxerd"
"build/
${
uuid
}
/bin/redoxerd"
cp
"target/
${
TARGET
}
/release/redoxerd"
"build/
${
uuid
}
/bin/redoxerd"
if
[[
"
$1
"
==
*
/
*
]]
then
name
=
"
$(
basename
"
$1
"
)
"
cp
"
$1
"
"build/
${
uuid
}
/bin/
${
name
}
"
echo
"
${
name
}
"
>>
"build/
${
uuid
}
/etc/redoxerd"
shift
fi
for
arg
in
"
$@
"
for
arg
in
"
$@
"
do
do
echo
"
${
arg
}
"
>>
"build/
${
uuid
}
/etc/redoxerd"
echo
"
${
arg
}
"
>>
"build/
${
uuid
}
/etc/redoxerd"
done
done
redoxfs_unmount
"build/
${
uuid
}
"
redoxfs_unmount
"build/
${
uuid
}
"
set
+e
qemu-system-x86_64
\
qemu-system-x86_64
\
-enable-kvm
\
-enable-kvm
\
-cpu
host
\
-cpu
host
\
...
@@ -161,7 +171,10 @@ qemu-system-x86_64 \
...
@@ -161,7 +171,10 @@ qemu-system-x86_64 \
-nographic
\
-nographic
\
-vga
none
\
-vga
none
\
-drive
file
=
"build/
${
uuid
}
.bin"
,format
=
raw
-drive
file
=
"build/
${
uuid
}
.bin"
,format
=
raw
status
=
"
$((
"
$?
"
/
2
))
"
echo
echo
echo
"## redoxer
$@
##"
echo
"## redoxer
(
${
status
}
)
##"
cat
"build/
${
uuid
}
.log"
cat
"build/
${
uuid
}
.log"
exit
"
${
status
}
"
This diff is collapsed.
Click to expand it.
src/bin/redoxerd.rs
+
1
−
2
View file @
f7a8eae6
...
@@ -147,8 +147,7 @@ pub fn main() {
...
@@ -147,8 +147,7 @@ pub fn main() {
Err
(
err
)
=>
{
Err
(
err
)
=>
{
eprintln!
(
"redoxerd: {}"
,
err
);
eprintln!
(
"redoxerd: {}"
,
err
);
// Exit with error using qemu device
// Exit with error using qemu device
let
status
=
0x21
;
Pio
::
<
u8
>
::
new
(
0x501
)
.write
(
1
);
Pio
::
<
u8
>
::
new
(
0x501
)
.write
(
status
>>
1
);
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment