Hey,
I've written a couple of KernelModules to support SPI-NAND flash.
They are compiled and everything but don't seem to be available at boot.
My V3s is booted from SPI-NAND, u-boot and SPL works after writing some patches and the SPL itself.
When I manually add CONFIG_MTD_SPI_NAND=y
to the devices config, my kernel probes the SPI-NAND, mounts the FS and everything boots just fine. Since I don't like manually tinkering in "mainline-files" I added the SPI-NAND mtd-driver as KernelPackage and selected it via make menuconfig
.
Again, the modules are compiled and .ko files are created. However they are not available at boot. By looking at the boot output, the SPI-NAND isn't even probed and my kernel panics about a missing rootfs. Am I missing something in the KernelPackage defines or why are those modules not in my Kernel?
define KernelPackage/mtd-nand
TITLE:=mtd NAND driver
SUBMENU:=$(BLOCK_MENU)
KCONFIG:= \
CONFIG_MTD_NAND \
CONFIG_MTD_NAND_IDS \
CONFIG_MTD_NAND_ECC \
CONFIG_MTD_TESTS=n
FILES:=$(LINUX_DIR)/drivers/mtd/nand/raw/nand.ko $(LINUX_DIR)/drivers/mtd/nand/raw/nand_ecc.ko
AUTOLOAD:=$(call AutoLoad,20,nand_ecc nand,1)
endef
$(eval $(call KernelPackage,mtd-nand))
define KernelPackage/mtd-nandcore
TITLE:=Core mtd NAND driver
SUBMENU:=$(BLOCK_MENU)
KCONFIG:= \
CONFIG_MTD_NAND_CORE
DEPENDS:=+kmod-mtd-nand
FILES:=$(LINUX_DIR)/drivers/mtd/nand/nandcore.ko
AUTOLOAD:=$(call AutoLoad,20,nandcore,1)
endef
define KernelPackage/mtd-nandcore/description
Kernel support for NAND mtd-devices
endef
$(eval $(call KernelPackage,mtd-nandcore))
define KernelPackage/mtd-spinand
TITLE:=SPI-NAND mtd driver
SUBMENU:=$(BLOCK_MENU)
KCONFIG:= \
CONFIG_MTD_SPI_NAND \
CONFIG_MTD_ROOTFS_ROOT_DEV=y \
CONFIG_SPI=y \
CONFIG_SPI_MASTER=y
DEPENDS:=+kmod-mtd-nandcore +kmod-mtd-nand
FILES:=$(LINUX_DIR)/drivers/mtd/nand/spi/spinand.ko
AUTOLOAD:=$(call AutoLoad,20,spinand,1)
endef
define KernelPackage/mtd-spinand/description
Kernel support for SPI-NAND mtd-devices
endef
$(eval $(call KernelPackage,mtd-spinand))