Skip to content

Commit 64d89eb

Browse files
committed
boards/arm/stm32f4: drop duplicated STM32_ROMFS, use common board logic
stm32f4discovery, nucleo-f446re and omnibusf4 each declared their own STM32_ROMFS Kconfig options and carried a near-identical copy of stm32_romfs_initialize.c. Signed-off-by: raiden00pl <raiden00@railab.me>
1 parent 7bf822b commit 64d89eb

18 files changed

Lines changed: 9 additions & 758 deletions

boards/arm/stm32f4/nucleo-f446re/Kconfig

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,4 @@ config NUCLEO_F446RE_AJOY_MINBUTTONS
3030
minimal set: SELECT (joystick down), FIRE (BUTTON B), and JUMP
3131
(BUTTON A).
3232

33-
config STM32_ROMFS
34-
bool "Automount baked-in ROMFS image"
35-
default n
36-
depends on FS_ROMFS
37-
---help---
38-
Select STM32_ROMFS_IMAGEFILE, STM32_ROMFS_DEV_MINOR, STM32_ROMFS_MOUNTPOINT
39-
40-
config STM32_ROMFS_DEV_MINOR
41-
int "Minor for the block device backing the data"
42-
depends on STM32_ROMFS
43-
default 64
44-
45-
config STM32_ROMFS_MOUNTPOINT
46-
string "Mountpoint of the custom romfs image"
47-
depends on STM32_ROMFS
48-
default "/rom"
49-
50-
config STM32_ROMFS_IMAGEFILE
51-
string "ROMFS image file to include into build"
52-
depends on STM32_ROMFS
53-
default "../../../rom.img"
54-
5533
endif # ARCH_BOARD_NUCLEO_F446RE

boards/arm/stm32f4/nucleo-f446re/src/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ if(CONFIG_BOARD_STM32_IHM08M1)
7070
list(APPEND SRCS stm32_foc_ihm08m1.c)
7171
endif()
7272

73-
if(CONFIG_STM32_ROMFS)
74-
list(APPEND SRCS stm32_romfs_initialize.c)
75-
endif()
76-
7773
target_sources(board PRIVATE ${SRCS})
7874

7975
set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f446re.ld")

boards/arm/stm32f4/nucleo-f446re/src/Make.defs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ ifeq ($(CONFIG_BOARD_STM32_IHM08M1),y)
7272
CSRCS += stm32_foc_ihm08m1.c
7373
endif
7474

75-
ifeq ($(CONFIG_STM32_ROMFS),y)
76-
CSRCS += stm32_romfs_initialize.c
77-
endif
78-
7975
DEPPATH += --dep-path board
8076
VPATH += :board
8177
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board

boards/arm/stm32f4/nucleo-f446re/src/stm32_bringup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@
6464
# include <nuttx/leds/userled.h>
6565
#endif
6666

67-
#include "stm32_romfs.h"
67+
#ifdef CONFIG_STM32_ROMFS
68+
# include "stm32_romfs.h"
69+
#endif
6870
#include "nucleo-f446re.h"
6971

7072
/****************************************************************************

boards/arm/stm32f4/nucleo-f446re/src/stm32_romfs.h

Lines changed: 0 additions & 63 deletions
This file was deleted.

boards/arm/stm32f4/nucleo-f446re/src/stm32_romfs_initialize.c

Lines changed: 0 additions & 141 deletions
This file was deleted.

boards/arm/stm32f4/omnibusf4/Kconfig

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,4 @@
55

66
if ARCH_BOARD_OMNIBUSF4
77

8-
config STM32_ROMFS
9-
bool "Automount baked-in ROMFS image"
10-
default n
11-
depends on FS_ROMFS
12-
---help---
13-
Select STM32_ROMFS_IMAGEFILE, STM32_ROMFS_DEV_MINOR, STM32_ROMFS_MOUNTPOINT
14-
15-
config STM32_ROMFS_DEV_MINOR
16-
int "Minor for the block device backing the data"
17-
depends on STM32_ROMFS
18-
default 64
19-
20-
config STM32_ROMFS_MOUNTPOINT
21-
string "Mountpoint of the custom romfs image"
22-
depends on STM32_ROMFS
23-
default "/rom"
24-
25-
config STM32_ROMFS_IMAGEFILE
26-
string "ROMFS image file to include into build"
27-
depends on STM32_ROMFS
28-
default "../../../rom.img"
29-
308
endif

boards/arm/stm32f4/omnibusf4/src/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ if(CONFIG_TIMER)
6262
list(APPEND SRCS stm32_timer.c)
6363
endif()
6464

65-
if(CONFIG_STM32_ROMFS)
66-
list(APPEND SRCS stm32_romfs_initialize.c)
67-
endif()
68-
6965
if(CONFIG_BOARDCTL_UNIQUEID)
7066
list(APPEND SRCS stm32_uid.c)
7167
endif()

boards/arm/stm32f4/omnibusf4/src/Make.defs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ ifeq ($(CONFIG_TIMER),y)
6363
CSRCS += stm32_timer.c
6464
endif
6565

66-
ifeq ($(CONFIG_STM32_ROMFS),y)
67-
CSRCS += stm32_romfs_initialize.c
68-
endif
69-
7066
ifeq ($(CONFIG_BOARDCTL_UNIQUEID),y)
7167
CSRCS += stm32_uid.c
7268
endif

boards/arm/stm32f4/omnibusf4/src/stm32_bringup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
#endif
3939

4040
#include "stm32.h"
41-
#include "stm32_romfs.h"
41+
#ifdef CONFIG_STM32_ROMFS
42+
# include "stm32_romfs.h"
43+
#endif
4244

4345
#ifdef CONFIG_STM32_OTGFS
4446
# include "stm32_usbhost.h"

0 commit comments

Comments
 (0)