Commit graph

2751 commits

Author SHA1 Message Date
bunnie
a103536b58 add a non-blocking mount poller to the PDDB
The problem with the current is_mounted() call is that it blocks
while the PDDB is requesting a password or actively formatting
(otherwise it doesn't block). It's actually just...partially blocking.

That doesn't cut it for libstd-linked system services that need to run but
before the PDDB comes up. In particular, we need to be able to respond
to time queries *somehow*, even before our timezone and offsets are
loaded from the PDDB.

I considered doing a callback mechanism for mounting, but this
is kind of complex and probably not worth it. Instead, a separate
thread that can return the value of a single boolean revealing
the mount state of the PDDB is created, and you can create an
object that's capable of inspecting that boolean.
2022-03-27 02:52:29 +08:00
bunnie
a6af300157 don't repeat the menu key if it is press-held 2022-03-27 00:19:55 +08:00
bunnie
96f0a0d2ea add the actual thread to the code base and clean up some warnings.
Next up:
 - code up libstd glue
 - code up test cases
2022-03-26 02:42:42 +08:00
bunnie
b59e2ae2bf add reference to the time server.
We still need to *start* the thread, ya know...
2022-03-26 02:37:30 +08:00
bunnie
4ac38027a2 add function to return the hardware RTC value as u64
the u64 in and of itself is meaningless, without the context
from the PDDB that adds the offset to wall clock time plus
time zone. This is glued together by the time.rs stub inside
the status service.
2022-03-26 02:36:35 +08:00
bunnie
df96ca1429 test for libstd Instant 2022-03-26 02:35:59 +08:00
bunnie
319e0e0641 add a comment about not modifying ticktimer APIs due to libstd dependency 2022-03-26 02:35:38 +08:00
bunnie
91d0511fa4 add Seek trait to the PDDB 2022-03-26 02:34:57 +08:00
bunnie
86ab8c392d add libstd time handler glue stubs 2022-03-26 02:34:38 +08:00
bunnie
0abd4a1db6 add a response code for dictionary not found 2022-03-25 23:50:26 +08:00
bunnie
cda15a1bb3 add a routine to convert hw RTC to a seconds count. 2022-03-24 18:44:06 +08:00
bunnie
92f1552d94 Merge branch 'main' into bunnie-dev 2022-03-24 03:32:36 +08:00
bunnie
0bcc93c78e attempt to add persistent storage to hosted mode PDDB
This will create a 100MiB file in tools/ppdb-images/hosted.bin
(sorry!!) which is persistent storage for hosted mode.

Delete the file if you want to start over from scratch.

It's...pretty brittle. I expect problems, but maybe it will at
least get things moving.
2022-03-24 03:21:00 +08:00
bunnie
bfb8a17cd5 strip out legacy RTC calls in preparation for refactor 2022-03-24 02:19:26 +08:00
bunnie
b4c98528e8 add notes around names that are baked into libstd 2022-03-22 22:30:43 +08:00
bunnie
b50dbf0a69 silence a warning in the loader module about an unused macro 2022-03-22 22:18:40 +08:00
bunnie
7c3601bd25 convert the connection manager to use the new PDDB blocking call 2022-03-22 22:18:31 +08:00
bunnie
36ea69f6df add a one-liner API call to block execution until PDDB is mounted 2022-03-22 22:18:23 +08:00
bunnie
2cc8a1b24a silence a warning in the loader module about an unused macro 2022-03-22 22:17:27 +08:00
bunnie
fe52756a3d convert the connection manager to use the new PDDB blocking call 2022-03-22 22:17:04 +08:00
bunnie
86e86df68c add a one-liner API call to block execution until PDDB is mounted 2022-03-22 22:16:46 +08:00
bunnie
954840a5d0 Merge branch 'main' into bunnie-dev 2022-03-22 02:15:57 +08:00
Sean Cross
a70aee7bad loader: move loader into main workspace
Add the loader into the main workspace, removing it from its own
sub-workspace. We can do this now that we can specify the linker script
in `build.rs`.

This improves IDE support, and should shrink disk storage requirements.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-22 02:09:18 +08:00
bunnie
5d59390554 Merge branch 'main' into bunnie-dev 2022-03-21 18:59:10 +08:00
bunnie
9e5dec302c
Merge pull request #121 from blakesmith/sleep_screen_clear
During sleep, clear the rest of the screen around the sleep note
2022-03-21 13:58:19 +08:00
Blake Smith
77b5e7a2bb During sleep, clear the rest of the screen, to avoid
any secrets being persistently visible on the display.
2022-03-20 15:35:02 -05:00
bunnie
b4d20a643c add tts locale to hello example 2022-03-21 00:22:54 +08:00
bunnie
731b847560
add translations
I think "hello world" might actually be the phrase used by the Japanese in their intro texts so leaving that as English.
2022-03-21 00:07:07 +08:00
bunnie
c83ff4048e
Merge pull request #120 from blakesmith/hello_world_squash
Add a basic 'hello world' app example
2022-03-21 00:02:25 +08:00
bunnie
d27645f65b Merge branch 'main' of github.com:betrusted-io/xous-core into main 2022-03-20 15:25:55 +08:00
bunnie
526a7374b0 re-introduce PDDB structure nuking on SoC reset 2022-03-20 15:25:14 +08:00
Sean Cross
e96a7df267 xtask: remove renode-bypass for renode-image
The `renode-bypass` flag is used for development in order to speed up
certain features. This creates invalid keys and skips many checks, which
causes problems in the main image.

Remove this flag in order to fix the Renode image.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-20 10:37:17 +08:00
bunnie
b52b73ddfa add functionality to override the CSR data in case it is corrupted 2022-03-19 16:56:03 +08:00
bunnie
b06d7c4bb7 add a note about the hard reset 2022-03-19 16:31:37 +08:00
bunnie
1856a83e3e fix ordering of updates to prevent mid-update resets 2022-03-19 16:22:09 +08:00
bunnie
2aa72fae18
Update factory_reset.sh 2022-03-19 09:01:40 +08:00
bunnie
d9f4f6d041
Update factory_reset.ps1
move soc update to top so we don't get resets from latest xous
2022-03-19 09:00:58 +08:00
bunnie
eae61df786
Update factory_reset.sh
move soc update to the top to avoid wdt resets
2022-03-19 08:58:41 +08:00
Blake Smith
3fb30dc619 Add a basic 'hello world' app example 2022-03-18 12:43:54 -05:00
Sean Cross
18f7a4519c
Merge pull request #119 from gsora/gsora/fix-ci-download
fix: on non-TTY terminals, if forced, proceed with toolchain download and install
2022-03-19 00:27:17 +08:00
Gianguido Sorà
ae2762e7f5 fix: on non-TTY terminals if forced, proceed with toolchain download and install
This is a corner case in Github CI.
2022-03-18 17:17:34 +01:00
Gianguido Sorà
ccafeb21a3 if not tty but force install is true, keep going 2022-03-18 17:05:51 +01:00
Gianguido Sorà
d9f5fd0c6a use force on install toolkit 2022-03-18 16:47:12 +01:00
Sean Cross
65d2ec64db xtask: add --force parameter to install-toolkit
This parameter will remove the existing toolchain and target
directories, forcing a reinstall.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-18 23:35:42 +08:00
Sean Cross
5604d6aa1a
Merge pull request #117 from gsora/gsora/ci-hosted-native
Compile for hosted and real hardware on main push
2022-03-18 22:56:51 +08:00
Gianguido Sorà
cbd412a461 compile for hosted and real hardware on main push 2022-03-18 15:51:58 +01:00
bunnie
342e721481 Merge remote-tracking branch 'origin/main' into bunnie-dev 2022-03-18 21:46:54 +08:00
Sean Cross
af2d7e9099 Merge branch 'main' of github.com:betrusted-io/xous-core 2022-03-18 20:47:49 +08:00
Sean Cross
d6063d9992 net: don't close connection when setting fields
Due to overly liberal use of `.take()`, file handles were getting closed
when doing ordinary operations. This stops that.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-03-18 20:47:10 +08:00
bunnie
140f07ddc8 latest revised test 2022-03-18 20:28:36 +08:00