Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TP_xv6
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Fache Charles
TP_xv6
Commits
3e9e4f7d
Commit
3e9e4f7d
authored
3 years ago
by
Wilke Pierre
Browse files
Options
Downloads
Patches
Plain Diff
debug and docker
parent
4062af7a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+0
-1
0 additions, 1 deletion
.gitignore
Makefile
+5
-71
5 additions, 71 deletions
Makefile
with
5 additions
and
72 deletions
.gitignore
+
0
−
1
View file @
3e9e4f7d
...
...
@@ -21,4 +21,3 @@ myapi.key
xv6.out*
.vagrant/
submissions/
.vscode/
This diff is collapsed.
Click to expand it.
Makefile
+
5
−
71
View file @
3e9e4f7d
...
...
@@ -184,6 +184,11 @@ qemu-gdb: $K/kernel .gdbinit fs.img
@
echo
"*** Now run 'gdb' in another window."
1>&2
$(
QEMU
)
$(
QEMUOPTS
)
-S
$(
QEMUGDB
)
docker-qemu
:
docker run
--rm
--user
$(
shell
id
-u
)
:
$(
shell
id
-g
)
--name
os-container
-v
$(
shell
pwd
)
:/data
-it
pwilke/os-infosec
${
MAKE
}
qemu
${
MAKEFLAGS
}
docker-qemu-gdb
:
docker run
--rm
--user
$(
shell
id
-u
)
:
$(
shell
id
-g
)
--name
os-container
-p
25000-26500:25000-26500
-v
$(
shell
pwd
)
:/data
-it
pwilke/os-infosec
${
MAKE
}
qemu-gdb
${
MAKEFLAGS
}
##
## FOR submitting lab solutions
...
...
@@ -198,75 +203,4 @@ endif
print-gdbport
:
@
echo
$(
GDBPORT
)
grade
:
@
echo
$(
MAKE
)
clean
@$(
MAKE
)
clean
||
\
(
echo
"'make clean' failed. HINT: Do you have another running instance of xv6?"
&&
exit
1
)
./grade-lab-
$(
LAB
)
$(
GRADEFLAGS
)
WEBSUB
:=
https://6828.scripts.mit.edu/2019/handin.py
handin
:
tarball-pref myapi.key
@
SUF
=
$(
LAB
);
\
curl
-f
-F
file
=
@lab-
$$
SUF-handin.tar.gz
-F
key
=
\<
myapi.key
$(
WEBSUB
)
/upload
\
>
/dev/null
||
{
\
echo
;
\
echo
Submit seems to have failed.
;
\
echo
Please go to
$(
WEBSUB
)
/ and upload the tarball manually.
;
}
handin-check
:
@
if
!
test
-d
.git
;
then
\
echo
No .git directory, is this a git repository?
;
\
false
;
\
fi
@
if
test
"
$$(
git symbolic-ref HEAD
)
"
!=
refs/heads/
$(
LAB
);
then
\
git branch
;
\
read
-p
"You are not on the
$(
LAB
)
branch. Hand-in the current branch? [y/N] "
r
;
\
test
"
$$
r"
=
y
;
\
fi
@
if
!
git diff-files
--quiet
||
!
git diff-index
--quiet
--cached
HEAD
;
then
\
git status
-s
;
\
echo
;
\
echo
"You have uncomitted changes. Please commit or stash them."
;
\
false
;
\
fi
@
if
test
-n
"
`
git status
-s
`
"
;
then
\
git status
-s
;
\
read
-p
"Untracked files will not be handed in. Continue? [y/N] "
r
;
\
test
"
$$
r"
=
y
;
\
fi
UPSTREAM
:=
$(
shell git remote
-v
|
grep
-m
1
"mit-pdos/xv6-riscv-fall19"
|
awk
'{split($$0,a," "
)
; print a[1]}'
)
tarball
:
handin-check
git archive
--format
=
tar
HEAD |
gzip
>
lab-
$(
LAB
)
-handin
.tar.gz
tarball-pref
:
handin-check
@
SUF
=
$(
LAB
);
\
git archive
--format
=
tar
HEAD
>
lab-
$$
SUF-handin.tar
;
\
git diff
$(
UPSTREAM
)
/
$(
LAB
)
>
/tmp/lab-
$$
SUF-diff.patch
;
\
tar
-rf
lab-
$$
SUF-handin.tar /tmp/lab-
$$
SUF-diff.patch
;
\
gzip
-c
lab-
$$
SUF-handin.tar
>
lab-
$$
SUF-handin.tar.gz
;
\
rm
lab-
$$
SUF-handin.tar
;
\
rm
/tmp/lab-
$$
SUF-diff.patch
;
\
myapi.key
:
@
echo
Get an API key
for
yourself by visiting
$(
WEBSUB
)
/
@
read
-p
"Please enter your API key: "
k
;
\
if
test
`
echo
"
$$
k"
|tr
-d
'\n'
|wc
-c
`
=
32
;
then
\
TF
=
`
mktemp
-t
tmp.XXXXXX
`
;
\
if
test
"x
$$
TF"
!=
"x"
;
then
\
echo
"
$$
k"
|tr
-d
'\n'
>
$$
TF
;
\
mv
-f
$$
TF
$@
;
\
else
\
echo mktemp
failed
;
\
false
;
\
fi
;
\
else
\
echo
Bad API key:
$$
k
;
\
echo
An API key should be 32 characters long.
;
\
false
;
\
fi
;
.PHONY
:
handin tarball tarball-pref clean grade handin-check
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