Commit graph

40 commits

Author SHA1 Message Date
bunnie
83e26ff4c7 update num-derive dependency
this became mandatory in 1.83 to remove warnings. I think it
should have no impact on functionality.
2024-12-02 18:52:59 +08:00
bunnie
043dfd84ae update formatting to latest nightly rules 2024-09-24 01:49:45 +08:00
bunnie
f494da21cc absorb new xous-ipc version 2024-09-23 22:05:50 +08:00
bunnie
75954de8d6 commit the version bump 2024-09-23 01:46:25 +08:00
bunnie
4c7c9312c1 change xous-ipc api to 0.10.0 2024-09-23 00:24:48 +08:00
bunnie
a1bf70b9ed regex search/replace instances of xous_ipc::String to String
split into a couple commits for ease of committing
2024-09-22 14:14:55 +08:00
bunnie
311154e231 absorb version bump 2024-06-27 00:26:12 +08:00
bunnie
a360f3ee52 bump xous pins for RawTrng API 2024-06-13 15:49:35 +08:00
bunnie
35e7cf3a5b bump xous dep revs 2024-05-29 02:07:06 +08:00
bunnie
9e66c1bee2 commit the version bump 2024-05-07 01:03:05 +08:00
bunnie
d6b33159a5 stage version pin bump 2024-04-01 15:46:26 +08:00
bunnie
5fb368ae05 partial progress on porting to ring-0.17 2024-02-09 17:18:41 +08:00
bunnie
699004e7b0 bump xous pins 2024-02-06 14:49:10 +08:00
bunnie
710da30952 inconsistencies in cargo fmt
running `cargo +nightly fmt -p app-loader` gives you one result.

running `cargo +nightly fmt --check` gives you another result.

manually opening and saving the files causes a result to agree
with the check.
2024-01-15 00:59:23 +08:00
bunnie
0267a56989 format Cargo.tomls
because apparently cargo fmt doesn't format Cargo.toml files???
2024-01-15 00:14:39 +08:00
bunnie
faafa9078b format app-loader 2024-01-14 18:54:13 +08:00
bunnie
fda782663a bump version pins for xous change 2023-12-26 00:13:10 +08:00
bunnie
fa3f349a0a bump pins as xous-rs has changed 2023-12-01 21:20:01 +08:00
bunnie
6ab88117f6 bump xous-api-log version & fix version pins 2023-10-31 20:07:28 +08:00
bunnie
bd8537f874 update README to note the need for the unsafe-app-loading feature 2023-10-31 00:19:05 +08:00
bunnie
57c00987b8 cleanup formatting; terminate process on panic; add missing unsafe{}
this is some general clean-up on the code to get it in line with
the rest of the guidelines in the system + addresses some of @xobs
comments.
2023-10-30 23:58:40 +08:00
Vihaan Jim
752642f62d Cleanup
I noticed that I actually hadn't changed anything in the xous-rs
directory, so I got rid of the patch. I also removed a few files
that weren't being used. Furthermore, I noticed that a couple of
random files were different from upstream so I changed them back.
I also modified the README slightly.
2023-10-15 15:55:25 -04:00
Vihaan Jim
d99f40047c Finally fix build issues
I was facing a bunch of issues with the build system and
dependencies. I fixed it by using the Cargo.lock from upstream/main. I
also modified app-loader since as_slice_mut is now unsafe.
2023-10-14 17:09:28 -04:00
Vihaan Jim
5402461794 Merge 2023-10-05 17:15:25 -04:00
Vihaan Jim
adeaea7757 Add App Loader README 2023-08-28 15:16:12 -04:00
Vihaan Jim
dc295fd9c0 Change `spawn' README 2023-08-26 21:58:16 -04:00
Vihaan Jim
5186a723f5 Add GAM menu token handling
This adds the tokens for app submenus. I am now successfully able to
load `vault'!
2023-08-10 20:09:19 -04:00
Vihaan Jim
7532a34769 Switch from Vec to MemoryRange
Instead of getting the slice by creating a large Vec, I now use
MapMemory to create this region directly. There is some sort of bug
with Vec that doesn't allow creation of large Vec's, and this change
makes it possible to load much larger apps (including `vault',
although there are still issues like menus to sort out).
2023-08-10 18:11:49 -04:00
Vihaan Jim
ec6fad51f5 Slight menu change
I have moved the items to load specific apps to a new menu so that it
will be easy to modify when we want to reload the list.
2023-08-09 21:43:55 -04:00
Vihaan Jim
20b978a126 Add English locales
I have not added translations for other languages yet
2023-08-09 17:33:20 -04:00
Vihaan Jim
698df7007c Add another progress bar + go back to menu
I have added another progressbar when the list of apps is being
loaded (I find that this makes stuff more clear).

I also discovered that if I use gam to "switch" to app-loader from
itself this works at bringing the menu back up
2023-08-09 14:49:54 -04:00
Vihaan Jim
9fc988186b Working + somewhat improved UI!
`app-loader' can now successfully download apps from the app server
and run them! I have also improved the UI by adding a progressbar
when an app is loading so that you know when it is done and also
replacing some panics with notifications that way the whole machine
doesn't shut down if the server has some problems.

The remaining UI work is to make sure that the menu pops back up when
you for example set the server.

I also need to add locales, a README, etc.
2023-08-09 13:49:33 -04:00
Vihaan Jim
2d74a44a89 Add almost working server/client
This creates:
1) An `xtask' command that allows someone to compile individual apps
without compiling the entire image (note that this is required because
xtask generates files that contain gam context names, and if you just
do a regular `cargo build' building the app will fail)
2) A python file app_server.py that acts as a server to give the
app-loader a list of the apps and actually send it the
3) A basic UX that allows app-loader to set the server, get the list
of apps, and load apps.

Currently, this mostly works, except that there is some random
`ShareViolation' when the app-loader loads the app.
2023-08-08 18:08:25 -04:00
Vihaan Jim
97bfd06bfe Cleanup
I have made `app-loader' more object oriented (to fit in with the
style of the other xous apps), and I am moving some of my personal
projects to another branch of my repo
2023-08-05 12:11:01 -04:00
Vihaan Jim
2d6e12f6b3 Fix to allow `app-loader' to switch app
`EXPECTED_APP_CONTEXTS' was added to the list of authorized
switchers. I don't think this is ideal, but I think it would be
difficult to come up with a better solution that doesn't make
`app-loader' "special" in some way.
2023-08-05 09:59:20 -04:00
Vihaan Jim
1e645a4b94 Allow registration of GAM names
This allows `app-loader' to register new names (which are then used by
the loaded apps to claim tokens). At the moment this is restricted to
apps that are pre-registered, i.e. included in the image.
2023-08-04 21:32:35 -04:00
Vihaan Jim
9eeed0d284 Add distinction between p_filesz and p_memsz
It turns out that in ELF files there *is* a difference between
file size and mem size. Mem size is the size of the chunk of memory,
but file size is the size of what we copy into there from the
file. Most of the time they are the same, which is why previously
`spawn' only considered mem size, but this caused issues.

In particular, in the xous implementation of the rust standard
library, there whenever something is allocated it has to first check
an AtomicI32 LOCKED to see if it is 0 or 1, and set it to 1 when it is
allocating so that only one thing is allocating at a time. However,
the mem size for the section containing LOCKED is larger than the file
size, meaning that `spawn' copied more of the file that it should
have. This lead to junk being put into LOCKED, which caused the new
process to assume that something else was perpetually allocating.

Now, `spawn' puts 0's in the space between the end of the file size
and the end of the memsize, which makes everything work as expected.

The only problem remaining is that when an app registers for GAM, GAM
checks whether the app is allowed to register, which is based on what
apps were included in the image. Obviously, this does not work when
you are trying to load apps that are not already in the image
2023-08-04 17:54:06 -04:00
Vihaan Jim
be58fbf0c3 Unmess-up stuff 2023-08-02 16:49:47 -04:00
Vihaan Jim
bb4b6ad55a Small changes to status and apploader
I forgot to revert to the previous versions of the other status
files (turns out I only need to do it for one). I also changed to
using the hello binary in debug.
2023-08-02 15:09:38 -04:00
Vihaan Jim
ded9049ee4 Turn app-loader into an app instead of a service
When the user selects App Loader from the app menu, a new menu shows
up that displays the currently loaded apps (in the future this will
contain options to add/remove apps as well). This is a much more sane
approach than whatever I was doing before because it requires minimal
changes to the rest of the source tree (I had to change xtask so that
it would replace -'s with _'s in constant names so that I could name
my app app-loader).
2023-08-01 22:16:40 -04:00