Skip to contentSkip to conversation

m68k/nommu: prevent setting ROMKERNEL when ROM is not set

PATCH In review Randy Dunlap 2 participants 2 messages Jul 7, 2021 – Jul 8, 2021 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k/nommu: prevent setting ROMKERNEL when ROM is not set

When CONFIG_ROMKERNEL is set but CONFIG_ROM is not set, the linker
complains:
m68k-linux-ld:./arch/m68k/kernel/vmlinux.lds:5: undefined symbol `CONFIG_ROMSTART' referenced in expression

# CONFIG_ROM is not set
# CONFIG_RAMKERNEL is not set
CONFIG_ROMKERNEL=y

Since ROMSTART depends on ROM, make ROMKERNEL also depend on ROM.

---
 arch/m68k/Kconfig.machine |    1 +
 1 file changed, 1 insertion(+)
arch/m68k/Kconfig.machine +1 -0
@@ -464,6 +464,7 @@ config RAMKERNEL
 
 config ROMKERNEL
 	bool "ROM"
+	depends on ROM
 	help
 	  The kernel will be resident in FLASH/ROM when running. This is
 	  often referred to as Execute-in-Place (XIP), since the kernel
#1 lore raw

Hi Randy,

Quoted 8 lines · Randy Dunlap

When CONFIG_ROMKERNEL is set but CONFIG_ROM is not set, the linker
complains:
m68k-linux-ld:./arch/m68k/kernel/vmlinux.lds:5: undefined symbol `CONFIG_ROMSTART' referenced in expression

# CONFIG_ROM is not set
# CONFIG_RAMKERNEL is not set
CONFIG_ROMKERNEL=y

Quoted 6 lines

Since ROMSTART depends on ROM, make ROMKERNEL also depend on ROM.

Looks good, thanks.
I will apply to for-next branch of m68knommu git tree when the current merge window closes.

Regards
Greg

Quoted 15 lines
---
  arch/m68k/Kconfig.machine |    1 +
  1 file changed, 1 insertion(+)
arch/m68k/Kconfig.machine +1 -0
@@ -464,6 +464,7 @@ config RAMKERNEL
 
  config ROMKERNEL
  	bool "ROM"
+	depends on ROM
  	help
  	  The kernel will be resident in FLASH/ROM when running. This is
  	  often referred to as Execute-in-Place (XIP), since the kernel