Commit 34889c0a authored by Grzegorz Daniluk's avatar Grzegorz Daniluk Committed by Adam Wujek

Kconfig option to enable/disable sdbfs generation command

parent e1e0e356
......@@ -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"
......
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment