Skip to content

Commit 2a44dda

Browse files
committed
meta: Update deps.
1 parent a6cb4e5 commit 2a44dda

8 files changed

Lines changed: 14 additions & 61 deletions

File tree

meta/image/boot/efi/loader.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"entries": [
44
{
55
"name": "skiftOS",
6-
"kernel": "bundle://hjert/_bin",
6+
"kernel": "bundle://hjert/bin/hjert.elf",
77
"icon": "file:/skift/logo.qoi",
88
"blobs": [
99
"file:/skift/init.bootfs"

meta/plugins/start/image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ def _installProduct(self, product: builder.ProductScope):
4747

4848
# Copy the product binary/library
4949
if component.type == model.Kind.EXE:
50-
dest = f"{base}/_bin"
50+
dest = f"{base}/bin/{component.id}.elf"
5151
else:
52-
dest = f"{base}/_lib"
52+
dest = f"{base}/lib"
5353

5454
self.cp(str(product.path), f"{dest}")
5555

src/kernel/hjert/api/syscalls.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export Res<> _start(Cap cap, usize ip, usize sp, Args const* args) {
105105
}
106106

107107
export Res<> _map(Cap cap, usize* virt, Cap vmo, usize off, usize* len, Flags<MapFlags> flags) {
108-
return _syscall(Syscall::MAP, cap.raw(), (Arg)virt, vmo.raw(), off, (Arg)len, (Arg)flags);
108+
return _syscall(Syscall::MAP, cap.raw(), (Arg)virt, vmo.raw(), off, (Arg)len, flags.raw());
109109
}
110110

111111
export Res<> _unmap(Cap cap, usize virt, usize len) {

src/kernel/hjert/core/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Res<> enterUserspace(Handover::Payload& payload) {
4848
space->label("init-space");
4949

5050
logInfo("entry: mapping elf...");
51-
auto elfVmo = try$(_locateInit(payload, "bundles/strata-cm/_bin"));
51+
auto elfVmo = try$(_locateInit(payload, "bundles/strata-cm/bin/strata-cm.elf"));
5252
elfVmo->label("elf-shared");
5353
auto elfRange = try$(kmm().pmm2Kmm(elfVmo->range()));
5454
Vaerk::Elf::Image image{elfRange.bytes()};

src/libs/karm-sys/efi/sys.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ static Res<Ref::Path> resolve(Ref::Url url) {
245245
}
246246
}
247247

248-
Res<Rc<Fd>> openFile(Ref::Url const& url) {
248+
Res<Rc<Fd>> openFile(Ref::Url const& url, Flags<OpenOption> options) {
249+
(void)options;
249250
static Efi::SimpleFileSystemProtocol* fileSystem = nullptr;
250251
if (not fileSystem) {
251252
fileSystem = try$(Efi::openProtocol<Efi::SimpleFileSystemProtocol>(Efi::li()->deviceHandle));
@@ -288,14 +289,6 @@ Res<Vec<DirEntry>> readDirOrCreate(Ref::Url const&) {
288289
return Error::notImplemented();
289290
}
290291

291-
Res<Rc<Fd>> createFile(Ref::Url const&) {
292-
return Error::notImplemented();
293-
}
294-
295-
Res<Rc<Fd>> openOrCreateFile(Ref::Url const&) {
296-
return Error::notImplemented();
297-
}
298-
299292
Res<MmapResult> memMap(MmapProps const& options) {
300293
usize vaddr = 0;
301294

@@ -329,7 +322,7 @@ Res<> memFlush(void*, usize) {
329322
}
330323

331324
Res<Stat> stat(Ref::Url const& url) {
332-
auto file = try$(openFile(url));
325+
auto file = try$(openFile(url, OpenOption::READ));
333326
return file->stat();
334327
}
335328

src/libs/karm-sys/skift/sys.cpp

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -58,49 +58,15 @@ static Res<Ref::Path> _resolveUrl(Ref::Url const& url) {
5858
}
5959
}
6060

61-
Res<Rc<Fd>> openFile(Ref::Url const& url) {
61+
Res<Rc<Fd>> openFile(Ref::Url const& url, Flags<OpenOption> options) {
6262
auto path = try$(_resolveUrl(url));
6363
auto fid = try$(
6464
Sys::run(
6565
Skift::globalFsClient()
6666
.callAsync<Strata::IFs::Open>(
6767
{
6868
path._segs,
69-
{Strata::IFs::Open::OPEN},
70-
},
71-
Async::CancellationToken::uninterruptible()
72-
)
73-
)
74-
);
75-
return Ok(makeRc<Skift::FsFd>(fid));
76-
}
77-
78-
Res<Rc<Fd>> createFile(Ref::Url const& url) {
79-
auto path = try$(_resolveUrl(url));
80-
auto fid = try$(
81-
Sys::run(
82-
Skift::globalFsClient()
83-
.callAsync<Strata::IFs::Open>(
84-
{
85-
path._segs,
86-
{Strata::IFs::Open::CREATE},
87-
},
88-
Async::CancellationToken::uninterruptible()
89-
)
90-
)
91-
);
92-
return Ok(makeRc<Skift::FsFd>(fid));
93-
}
94-
95-
Res<Rc<Fd>> openOrCreateFile(Ref::Url const& url) {
96-
auto path = try$(_resolveUrl(url));
97-
auto fid = try$(
98-
Sys::run(
99-
Skift::globalFsClient()
100-
.callAsync<Strata::IFs::Open>(
101-
{
102-
path._segs,
103-
{Strata::IFs::Open::OPEN, Strata::IFs::Open::CREATE},
69+
options,
10470
},
10571
Async::CancellationToken::uninterruptible()
10672
)
@@ -131,7 +97,7 @@ Async::Task<Vec<DirEntry>> readDirAsync(Ref::Url const& url, Async::Cancellation
13197
auto fid = co_trya$(fs.callAsync<Strata::IFs::Open>(
13298
{
13399
path._segs,
134-
{Strata::IFs::Open::OPEN},
100+
{OpenOption::READ},
135101
},
136102
ct
137103
));
@@ -153,7 +119,7 @@ Res<Vec<DirEntry>> readDirOrCreate(Ref::Url const&) {
153119
}
154120

155121
Res<Stat> stat(Ref::Url const& url) {
156-
auto fd = try$(openFile(url));
122+
auto fd = try$(openFile(url, OpenOption::READ));
157123
return fd->stat();
158124
}
159125

src/srvs/strata-cm/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static Res<Hj::Task> loadElf(Sys::Context& ctx, String id, Rc<Sys::Skift::Duplex
2525
auto bootfs = try$(Sys::Skift::Bootfs::ensure());
2626

2727
logInfoIf(DEBUG_ELF, "mapping elf...");
28-
auto elfPath = Io::format("bundles/{}/_bin", id);
28+
auto elfPath = Io::format("bundles/{}/bin/{}.elf", id, id);
2929
auto [elfVmo, _] = try$(bootfs->openVmo(elfPath.str()));
3030
auto elfRange = try$(Hj::map(elfVmo, Hj::MapFlags::READ));
3131

src/srvs/strata-protos/ifs.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,8 @@ export using Fid = usize;
1212

1313
export struct Open {
1414
using Response = Fid;
15-
enum struct Option {
16-
OPEN,
17-
CREATE
18-
};
19-
using enum Option;
20-
2115
Vec<String> path;
22-
Flags<Option> options;
16+
Flags<Sys::OpenOption> options;
2317
};
2418

2519
export struct Close {

0 commit comments

Comments
 (0)