Skip to content

Commit b04dcc2

Browse files
committed
add smalldb flag, which builds a PDDB with a size of 4MiB
do not interchange this on devices with the full sized PDDB, you may corrupt the database
1 parent 6c2e86d commit b04dcc2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

services/pddb/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,6 @@ hwtest = []
8888
# routines to help with performance profiling of the PDDB in hosted mode
8989
pddb-flamegraph = ["hex"]
9090
perfcounter = ["perflib"]
91+
# make the PDDB very small (4MiB). Note that booting a device with an incompatible `smalldb` setting will break the PDDB image. Use with caution.
92+
smalldb = []
9193
default = ["mbbb"]

services/pddb/src/api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ pub(crate) const PDDB_VERSION: u32 = 0x00_00_02_01;
4343
#[allow(dead_code)]
4444
// PDDB_A_LEN may be shorter than xous::PDDB_LEN, to speed up testing.
4545
#[allow(dead_code)]
46-
#[cfg(not(any(feature="pddbtest",feature="autobasis",feature="ci")))]
46+
#[cfg(not(any(feature="pddbtest",feature="autobasis",feature="ci",feature="smalldb")))]
4747
pub(crate) const PDDB_A_LEN: usize = xous::PDDB_LEN as usize;
4848
#[allow(dead_code)]
49-
#[cfg(any(feature="pddbtest",feature="autobasis",feature="ci"))]
49+
#[cfg(any(feature="pddbtest",feature="autobasis",feature="ci",feature="smalldb"))]
5050
pub const PDDB_A_LEN: usize = 4 * 1024 * 1024;
5151

5252
/// range for the starting point of a journal number, picked from a random seed

0 commit comments

Comments
 (0)