mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-20 17:32:57 +00:00
generic: platform/mikrotik: make soft_config writable without 4K sectors
Make soft_config writable in all cases. Performing soft_config commit will fail if mtd partition is not writable. Signed-off-by: Oskari Lemmela <oskari@lemmela.net> [bump rb_softconfig version number] Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
parent
2bb7c1db70
commit
6eb196ed0f
@ -56,23 +56,12 @@
|
|||||||
|
|
||||||
#include "routerboot.h"
|
#include "routerboot.h"
|
||||||
|
|
||||||
#define RB_SOFTCONFIG_VER "0.03"
|
#define RB_SOFTCONFIG_VER "0.04"
|
||||||
#define RB_SC_PR_PFX "[rb_softconfig] "
|
#define RB_SC_PR_PFX "[rb_softconfig] "
|
||||||
|
|
||||||
/*
|
#define RB_SC_HAS_WRITE_SUPPORT true
|
||||||
* mtd operations before 4.17 are asynchronous, not handled by this code
|
#define RB_SC_WMODE S_IWUSR
|
||||||
* Also make the driver act read-only if 4K_SECTORS are not enabled, since they
|
#define RB_SC_RMODE S_IRUSR
|
||||||
* are require to handle partial erasing of the small soft_config partition.
|
|
||||||
*/
|
|
||||||
#if defined(CONFIG_MTD_SPI_NOR_USE_4K_SECTORS)
|
|
||||||
#define RB_SC_HAS_WRITE_SUPPORT true
|
|
||||||
#define RB_SC_WMODE S_IWUSR
|
|
||||||
#define RB_SC_RMODE S_IRUSR
|
|
||||||
#else
|
|
||||||
#define RB_SC_HAS_WRITE_SUPPORT false
|
|
||||||
#define RB_SC_WMODE 0
|
|
||||||
#define RB_SC_RMODE S_IRUSR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ID values for software settings */
|
/* ID values for software settings */
|
||||||
#define RB_SCID_UART_SPEED 0x01 // u32*1
|
#define RB_SCID_UART_SPEED 0x01 // u32*1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user