Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
34889c0a
Commit
34889c0a
authored
Nov 23, 2017
by
Grzegorz Daniluk
Committed by
Adam Wujek
Nov 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kconfig option to enable/disable sdbfs generation command
parent
e1e0e356
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
0 deletions
+22
-0
Kconfig
Kconfig
+8
-0
spec_defconfig
configs/spec_defconfig
+2
-0
sdb-storage.c
dev/sdb-storage.c
+4
-0
storage.h
include/storage.h
+4
-0
cmd_sdb.c
shell/cmd_sdb.c
+4
-0
No files found.
Kconfig
View file @
34889c0a
...
...
@@ -279,6 +279,14 @@ config WR_NODE_SIM
MAC address destination and expects the simulation to return
these frames.
config GENSDBFS
depends on WR_NODE
default y
boolean "Shell command for SDBFS generation"
help
This option adds _sdb fs_ command to write empty SDBFS filesystem
image in Flash/EEPROM.
config ABSCAL
default y
boolean "Support absolute calibration"
...
...
configs/spec_defconfig
View file @
34889c0a
...
...
@@ -40,6 +40,8 @@ CONFIG_SDB_STORAGE=y
# CONFIG_LEGACY_EEPROM is not set
CONFIG_WR_DIAG=y
# CONFIG_WR_NODE_SIM is not set
CONFIG_GENSDBFS=y
CONFIG_ABSCAL=y
#
# wrpc-sw is tainted if you change the following options
...
...
dev/sdb-storage.c
View file @
34889c0a
...
...
@@ -740,6 +740,8 @@ out:
return
ret
;
}
#ifdef CONFIG_GENSDBFS
extern
uint32_t
_binary_tools_sdbfs_default_bin_start
[];
extern
uint32_t
_binary_tools_sdbfs_default_bin_end
[];
...
...
@@ -860,3 +862,5 @@ int storage_gensdbfs(int mem_type, uint32_t base_adr, uint8_t i2c_adr)
return
mem_type
;
}
#endif
include/storage.h
View file @
34889c0a
...
...
@@ -72,6 +72,8 @@ int storage_init_add(const char *args[]);
int
storage_init_show
(
void
);
int
storage_init_readcmd
(
uint8_t
*
buf
,
uint8_t
bufsize
,
uint8_t
next
);
#ifdef CONFIG_GENSDBFS
#define MEM_FLASH 0
#define MEM_EEPROM 1
#define MEM_1W_EEPROM 2
...
...
@@ -80,3 +82,5 @@ int storage_sdbfs_erase(int mem_type, uint32_t base_adr, uint8_t i2c_adr);
int
storage_gensdbfs
(
int
mem_type
,
uint32_t
base_adr
,
uint8_t
i2c_adr
);
#endif
#endif
shell/cmd_sdb.c
View file @
34889c0a
...
...
@@ -19,12 +19,15 @@
static
int
cmd_sdb
(
const
char
*
args
[])
{
#ifdef CONFIG_GENSDBFS
uint8_t
i2c_adr
;
#endif
if
(
!
args
[
0
])
{
sdb_print_devices
();
return
0
;
}
#ifdef CONFIG_GENSDBFS
if
(
args
[
3
])
i2c_adr
=
atoi
(
args
[
3
]);
else
...
...
@@ -37,6 +40,7 @@ static int cmd_sdb(const char *args[])
storage_sdbfs_erase
(
atoi
(
args
[
1
]),
atoi
(
args
[
2
]),
i2c_adr
);
return
0
;
}
#endif
return
-
EINVAL
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment