Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
summeros
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
Byron Lathi
summeros
Commits
4e5c1a8a
Commit
4e5c1a8a
authored
3 years ago
by
Byron Lathi
Browse files
Options
Downloads
Patches
Plain Diff
add shell
parent
aa0de544
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fsdir/Programs/src/Makefile
+1
-1
1 addition, 1 deletion
fsdir/Programs/src/Makefile
fsdir/Programs/src/shell.c
+17
-0
17 additions, 0 deletions
fsdir/Programs/src/shell.c
kernel/kernel.c
+1
-1
1 addition, 1 deletion
kernel/kernel.c
with
19 additions
and
2 deletions
fsdir/Programs/src/Makefile
+
1
−
1
View file @
4e5c1a8a
...
...
@@ -2,7 +2,7 @@ CFLAGS += -Wall -nostdlib -ffreestanding -m32 -g
LDFLAGS
+=
-nostdlib
-ffreestanding
-m32
CC
=
i686-elf-gcc
SRC
=
hello exectest
read
SRC
=
hello exectest
read
shell
.SUFFIXES
:
...
...
This diff is collapsed.
Click to expand it.
fsdir/Programs/src/shell.c
0 → 100644
+
17
−
0
View file @
4e5c1a8a
#include
"syscall.h"
int
main
()
{
uint8_t
test
[
64
];
int
ret
;
while
(
1
){
sys_read
(
0
,
test
,
64
);
ret
=
sys_exec
(
test
);
if
(
ret
)
{
sys_write
(
1
,
"Error.
\n
"
,
7
);
}
}
return
-
1
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
kernel/kernel.c
+
1
−
1
View file @
4e5c1a8a
...
...
@@ -117,7 +117,7 @@ void entry(unsigned long magic, unsigned long addr) {
ata_read_sectors
(
ATA_MASTER
,
0
,
1
,
mbr
.
data
);
ext2_init
(
mbr
.
partitions
[
0
].
lba_start
);
int32_t
error
=
sys_exec
((
uint8_t
*
)
"/Programs/bin/
exectest
"
);
int32_t
error
=
sys_exec
((
uint8_t
*
)
"/Programs/bin/
shell
"
);
if
(
error
)
{
printf
(
"Error executing file: %d
\n
"
,
error
);
}
...
...
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