Opened 3 years ago

Last modified 3 years ago

#17445 new defect

ar71xx/3.14 kernel: yaffs MTD_BLOCK_MAJOR undeclared

Reported by: raver@… Owned by: developers
Priority: normal Milestone:
Component: kernel Version: Trunk
Keywords: Cc:


I began to experiment with the new 3.14 kernel on the ar71xx platform, and got this error.

# configuration written to .config
make[5]: Leaving directory `/home/raver/OpenWrt/trunk/build_dir/target-mips_24kc_uClibc-'
make[5]: Entering directory `/home/raver/OpenWrt/trunk/build_dir/target-mips_24kc_uClibc-'
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/
  CHK     include/generated/compile.h
  CC      fs/yaffs2/yaffs_mtdif.o
fs/yaffs2/yaffs_mtdif.c: In function 'yaffs_get_mtd_device':
fs/yaffs2/yaffs_mtdif.c:256:21: error: 'MTD_BLOCK_MAJOR' undeclared (first use in this function)
  if (MAJOR(sdev) != MTD_BLOCK_MAJOR)
fs/yaffs2/yaffs_mtdif.c:256:21: note: each undeclared identifier is reported only once for each function it appears in
make[7]: *** [fs/yaffs2/yaffs_mtdif.o] Error 1
make[6]: *** [fs/yaffs2] Error 2
make[5]: *** [fs] Error 2
make[5]: Leaving directory `/home/raver/OpenWrt/trunk/build_dir/target-mips_24kc_uClibc-'
make[4]: *** [/home/raver/OpenWrt/trunk/build_dir/target-mips_24kc_uClibc-] Error 2
make[4]: Leaving directory `/home/raver/OpenWrt/trunk/target/linux/ar71xx'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/home/raver/OpenWrt/trunk/target/linux'
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory `/home/raver/OpenWrt/trunk'
make[1]: *** [/home/raver/OpenWrt/trunk/staging_dir/target-mips_24kc_uClibc-] Error 2
make[1]: Leaving directory `/home/raver/OpenWrt/trunk'
make: *** [world] Error 2

I managed to solve it by applying the following patch.

--- a/fs/yaffs2/yaffs_mtdif.c   2014-08-07 17:59:32.296136842 +0100
+++ b/fs/yaffs2/yaffs_mtdif.c   2014-08-07 18:29:45.384183130 +0100
@@ -16,6 +16,7 @@
 #include "yaffs_mtdif.h"

 #include "linux/mtd/mtd.h"
+#include "uapi/linux/major.h"
 #include "linux/types.h"
 #include "linux/time.h"
 #include "linux/mtd/nand.h"

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by n3ph@…

confirming defect - patch fix the problem...

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.