From 26d83377e16b5dce722f05664b633325caeec6a0 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Sun, 23 Jun 2024 23:56:39 +0800 Subject: [PATCH] fix for rust 3cb521a43 Signed-off-by: Sean Cross --- ...td-xous-add-support-for-args-and-env.patch | 4 +- 0002-net-fix-dead-code-warning.patch | 4 +- 0003-xous-add-senres.patch | 4 +- ...us-fs-add-initial-filesystem-support.patch | 27 ++++--------- 0005-fixup-pddb.patch | 38 ------------------- ...upstreaming-customize-tests-for-Xous.patch | 4 +- 6 files changed, 16 insertions(+), 65 deletions(-) delete mode 100644 0005-fixup-pddb.patch rename 0006-std-not-for-upstreaming-customize-tests-for-Xous.patch => 0005-std-not-for-upstreaming-customize-tests-for-Xous.patch (97%) diff --git a/0001-std-xous-add-support-for-args-and-env.patch b/0001-std-xous-add-support-for-args-and-env.patch index e9f6c4d..729f37f 100644 --- a/0001-std-xous-add-support-for-args-and-env.patch +++ b/0001-std-xous-add-support-for-args-and-env.patch @@ -1,7 +1,7 @@ -From e61d03dc7765931e8257df4d263219fceb40faaa Mon Sep 17 00:00:00 2001 +From 097d592a0ab86be0758b9c594ece4024289a956e Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Sun, 7 Jan 2024 22:49:22 +0800 -Subject: [PATCH 1/6] std: xous: add support for args and env +Subject: [PATCH 1/5] std: xous: add support for args and env Process arguments and environment variables are both passed by way of Application Parameters. These are a TLV format that gets passed in as diff --git a/0002-net-fix-dead-code-warning.patch b/0002-net-fix-dead-code-warning.patch index de16008..5fd1d2d 100644 --- a/0002-net-fix-dead-code-warning.patch +++ b/0002-net-fix-dead-code-warning.patch @@ -1,7 +1,7 @@ -From 3e942fe8e9cb8adfe0b2549af9915f0950ad66c4 Mon Sep 17 00:00:00 2001 +From 371adc83436c66ff954c0981c5eb265f00612f57 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Tue, 11 Jun 2024 00:31:32 +0800 -Subject: [PATCH 2/6] net: fix dead code warning +Subject: [PATCH 2/5] net: fix dead code warning Signed-off-by: Sean Cross --- diff --git a/0003-xous-add-senres.patch b/0003-xous-add-senres.patch index 4421e33..e80d20a 100644 --- a/0003-xous-add-senres.patch +++ b/0003-xous-add-senres.patch @@ -1,7 +1,7 @@ -From 44748657b07b73133ceeb4f32199e6840b8eb36c Mon Sep 17 00:00:00 2001 +From 1f307892c9a28f3875278bb81747abf2152dd538 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Tue, 7 Nov 2023 09:53:20 +0800 -Subject: [PATCH 3/6] xous: add senres +Subject: [PATCH 3/5] xous: add senres Senres is a method for sending and receiving structs. It is a cut-down version of rkyv and similar modules. diff --git a/0004-xous-fs-add-initial-filesystem-support.patch b/0004-xous-fs-add-initial-filesystem-support.patch index 503675a..58f30fe 100644 --- a/0004-xous-fs-add-initial-filesystem-support.patch +++ b/0004-xous-fs-add-initial-filesystem-support.patch @@ -1,7 +1,7 @@ -From 6e30c0131bf5f08b7b2379d2a2717040edc95abf Mon Sep 17 00:00:00 2001 +From 18e24b6011d6849c94989f9b81237acc2a6926c7 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Tue, 7 Nov 2023 10:41:10 +0800 -Subject: [PATCH 4/6] xous: fs: add initial filesystem support +Subject: [PATCH 4/5] xous: fs: add initial filesystem support Signed-off-by: Sean Cross --- @@ -9,10 +9,10 @@ Signed-off-by: Sean Cross library/std/src/os/xous/mod.rs | 3 + library/std/src/os/xous/path.rs | 42 ++ library/std/src/os/xous/services.rs | 3 + - library/std/src/os/xous/services/pddb.rs | 99 ++++ + library/std/src/os/xous/services/pddb.rs | 88 ++++ library/std/src/sys/pal/xous/fs.rs | 629 +++++++++++++++++++++++ library/std/src/sys/pal/xous/mod.rs | 1 - - 7 files changed, 809 insertions(+), 1 deletion(-) + 7 files changed, 798 insertions(+), 1 deletion(-) create mode 100644 library/std/src/os/xous/fs.rs create mode 100644 library/std/src/os/xous/path.rs create mode 100644 library/std/src/os/xous/services/pddb.rs @@ -135,10 +135,10 @@ index a75be1b8570..2ccf1a5d698 100644 diff --git a/library/std/src/os/xous/services/pddb.rs b/library/std/src/os/xous/services/pddb.rs new file mode 100644 -index 00000000000..3348c3e17d9 +index 00000000000..f8459b5bac9 --- /dev/null +++ b/library/std/src/os/xous/services/pddb.rs -@@ -0,0 +1,99 @@ +@@ -0,0 +1,88 @@ +use crate::io::SeekFrom; +use crate::os::xous::ffi::Connection; +use crate::os::xous::services::connect; @@ -152,20 +152,9 @@ index 00000000000..3348c3e17d9 + +#[repr(usize)] +pub(crate) enum PddbLendMut { -+ // // IsMounted = 0, -+ // // TryMount = 1, -+ -+ // // WriteKeyFlush = 18, -+ // // KeyDrop = 20, -+ -+ // // ListBasisStd = 26, -+ // // ListDictStd = 28, -+ // // ListKeyStd = 29, + OpenKeyStd, + ReadKeyStd(u16 /* fd */), -+ // CloseKeyStd = 34, + DeleteKeyStd = 35, -+ // // LatestBasisStd = 36, + ListPathStd = 37, + StatPathStd = 38, + @@ -240,7 +229,7 @@ index 00000000000..3348c3e17d9 +} diff --git a/library/std/src/sys/pal/xous/fs.rs b/library/std/src/sys/pal/xous/fs.rs new file mode 100644 -index 00000000000..45f5178e2bf +index 00000000000..fb2182e2091 --- /dev/null +++ b/library/std/src/sys/pal/xous/fs.rs @@ -0,0 +1,629 @@ @@ -258,7 +247,7 @@ index 00000000000..45f5178e2bf + +use super::senres::{self, Senres, SenresMut}; + -+pub use crate::sys_common::fs::try_exists; ++pub use crate::sys_common::fs::exists; + +pub struct File { + fd: u16, diff --git a/0005-fixup-pddb.patch b/0005-fixup-pddb.patch deleted file mode 100644 index d2a509e..0000000 --- a/0005-fixup-pddb.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 2f8dc4e87710b95e31d5de8a7870e1f15fd96f1d Mon Sep 17 00:00:00 2001 -From: Sean Cross -Date: Tue, 11 Jun 2024 00:47:52 +0800 -Subject: [PATCH 5/6] fixup pddb - -Signed-off-by: Sean Cross ---- - library/std/src/os/xous/services/pddb.rs | 11 ----------- - 1 file changed, 11 deletions(-) - -diff --git a/library/std/src/os/xous/services/pddb.rs b/library/std/src/os/xous/services/pddb.rs -index 3348c3e17d9..f8459b5bac9 100644 ---- a/library/std/src/os/xous/services/pddb.rs -+++ b/library/std/src/os/xous/services/pddb.rs -@@ -11,20 +11,9 @@ pub(crate) enum PddbBlockingScalar { - - #[repr(usize)] - pub(crate) enum PddbLendMut { -- // // IsMounted = 0, -- // // TryMount = 1, -- -- // // WriteKeyFlush = 18, -- // // KeyDrop = 20, -- -- // // ListBasisStd = 26, -- // // ListDictStd = 28, -- // // ListKeyStd = 29, - OpenKeyStd, - ReadKeyStd(u16 /* fd */), -- // CloseKeyStd = 34, - DeleteKeyStd = 35, -- // // LatestBasisStd = 36, - ListPathStd = 37, - StatPathStd = 38, - --- -2.45.0 - diff --git a/0006-std-not-for-upstreaming-customize-tests-for-Xous.patch b/0005-std-not-for-upstreaming-customize-tests-for-Xous.patch similarity index 97% rename from 0006-std-not-for-upstreaming-customize-tests-for-Xous.patch rename to 0005-std-not-for-upstreaming-customize-tests-for-Xous.patch index bc2a7e1..ad687bb 100644 --- a/0006-std-not-for-upstreaming-customize-tests-for-Xous.patch +++ b/0005-std-not-for-upstreaming-customize-tests-for-Xous.patch @@ -1,7 +1,7 @@ -From e81b67fff4a85d5a4864acb316c544d164801ce7 Mon Sep 17 00:00:00 2001 +From 9a60d04740d2ee4c80c1bee7b49f084761ed3b11 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Sun, 24 Dec 2023 15:15:01 +0800 -Subject: [PATCH 6/6] std: (not for upstreaming) customize tests for Xous +Subject: [PATCH 5/5] std: (not for upstreaming) customize tests for Xous Signed-off-by: Sean Cross ---