Modify

Opened 3 years ago

Closed 3 years ago

#19015 closed defect (fixed)

Build for Mikrotik RB433UAH fails after upgrade to kernel v3.18

Reported by: duvi Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: Cc:

Description

It fails around the last steps of building.
I started with make dirclean.

  CC      fs/yaffs2/yaffs_vfs.o
fs/yaffs2/yaffs_vfs.c:799:14: error: 'generic_file_aio_read' undeclared here (not in a function)
  .aio_read = generic_file_aio_read,
              ^
fs/yaffs2/yaffs_vfs.c:800:15: error: 'generic_file_aio_write' undeclared here (not in a function)
  .aio_write = generic_file_aio_write,
               ^
fs/yaffs2/yaffs_vfs.c:805:18: error: 'generic_file_splice_write' undeclared here (not in a function)
  .splice_write = generic_file_splice_write,
                  ^
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_readlink':
fs/yaffs2/yaffs_vfs.c:1053:2: error: implicit declaration of function 'vfs_readlink' [-Werror=implicit-function-declaration]
  ret = vfs_readlink(dentry, buffer, buflen, alias);
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:257: recipe for target 'fs/yaffs2/yaffs_vfs.o' failed
make[7]: *** [fs/yaffs2/yaffs_vfs.o] Error 1
scripts/Makefile.build:402: recipe for target 'fs/yaffs2' failed
make[6]: *** [fs/yaffs2] Error 2
Makefile:937: recipe for target 'fs' failed
make[5]: *** [fs] Error 2
make[5]: Leaving directory '/mnt/sda/openwrt/rb433uah_stream/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_mikrotik/linux-3.18.7'
Makefile:24: recipe for target '/mnt/sda/openwrt/rb433uah_stream/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_mikrotik/linux-3.18.7/.image' failed
make[4]: *** [/mnt/sda/openwrt/rb433uah_stream/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_mikrotik/linux-3.18.7/.image] Error 2
make[4]: Leaving directory '/mnt/sda/openwrt/rb433uah_stream/target/linux/ar71xx'
Makefile:13: recipe for target 'install' failed
make[3]: *** [install] Error 2
make[3]: Leaving directory '/mnt/sda/openwrt/rb433uah_stream/target/linux'
target/Makefile:21: recipe for target 'target/linux/install' failed
make[2]: *** [target/linux/install] Error 2
m

Attachments (0)

Change History (5)

comment:1 Changed 3 years ago by anonymous

I cannot compile it either.

Here is the svn info:

root@debian:/home/george/openwrt/trunk# svn info
Path: .
URL: svn://svn.openwrt.org/openwrt/trunk
Repository Root: svn://svn.openwrt.org/openwrt
Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73
Revision: 44496
Node Kind: directory
Schedule: normal
Last Changed Author: blogic
Last Changed Rev: 44496
Last Changed Date: 2015-02-19 16:30:03 +0200 (Thu, 19 Feb 2015)

And here is the output:

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      fs/yaffs2/yaffs_vfs.o
fs/yaffs2/yaffs_vfs.c:799:14: error: 'generic_file_aio_read' undeclared here (not in a function)
  .aio_read = generic_file_aio_read,
              ^
fs/yaffs2/yaffs_vfs.c:800:15: error: 'generic_file_aio_write' undeclared here (not in a function)
  .aio_write = generic_file_aio_write,
               ^
fs/yaffs2/yaffs_vfs.c:805:18: error: 'generic_file_splice_write' undeclared here (not in a function)
  .splice_write = generic_file_splice_write,
                  ^
fs/yaffs2/yaffs_vfs.c: In function 'yaffs_readlink':
fs/yaffs2/yaffs_vfs.c:1053:2: error: implicit declaration of function 'vfs_readlink' [-Werror=implicit-function-declaration]
  ret = vfs_readlink(dentry, buffer, buflen, alias);
  ^
cc1: some warnings being treated as errors
make[7]: *** [fs/yaffs2/yaffs_vfs.o] Error 1
make[6]: *** [fs/yaffs2] Error 2
make[5]: *** [fs] Error 2
make[5]: Leaving directory `/home/george/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_mikrotik/linux-3.18.7'
make[4]: *** [/home/george/openwrt/trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_mikrotik/linux-3.18.7/.image] Error 2
make[4]: Leaving directory `/home/george/openwrt/trunk/target/linux/ar71xx'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/home/george/openwrt/trunk/target/linux'
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory `/home/george/openwrt/trunk'
make[1]: *** [/home/george/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.target_install] Error 2
make[1]: Leaving directory `/home/george/openwrt/trunk'
make: *** [world] Error 2

comment:2 Changed 3 years ago by alexisgreen

Yaffs2 patch:

Index: target/linux/generic/files/fs/yaffs2/yaffs_vfs.c
===================================================================
--- target/linux/generic/files/fs/yaffs2/yaffs_vfs.c    (revision 44497)
+++ target/linux/generic/files/fs/yaffs2/yaffs_vfs.c    (working copy)
@@ -764,8 +764,22 @@
        return 0;
 }

+#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 16, 0))
+static const struct file_operations yaffs_file_operations = {
+       .read = new_sync_read,
+       .write = new_sync_write,
+       .read_iter = generic_file_read_iter,
+       .write_iter = generic_file_write_iter,
+       .mmap = generic_file_mmap,
+       .flush = yaffs_file_flush,
+       .fsync = yaffs_sync_object,
+       .splice_read = generic_file_splice_read,
+       .splice_write = iter_file_splice_write,
+       .llseek = generic_file_llseek,
+};

-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22))
+
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22))
 static const struct file_operations yaffs_file_operations = {
        .read = do_sync_read,
        .write = do_sync_write,
@@ -1023,7 +1037,11 @@
        if (!alias)
                return -ENOMEM;

+#if LINUX_VERSION_CODE <= KERNEL_VERSION(3, 14, 99)
        ret = vfs_readlink(dentry, buffer, buflen, alias);
+#else
+       ret = readlink_copy(buffer, buflen, alias);
+#endif
        kfree(alias);
        return ret;
 }

RB433U gpio-latch patch:

--- a/target/linux/ar71xx/files/drivers/gpio/gpio-latch.c
+++ b/target/linux/ar71xx/files/drivers/gpio/gpio-latch.c
@@ -8,6 +8,7 @@
  *  by the Free Software Foundation.
  */

+#include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/module.h>
@@ -192,8 +193,12 @@ static int gpio_latch_probe(struct platform_device *pdev)
 static int gpio_latch_remove(struct platform_device *pdev)
 {
        struct gpio_latch_chip *glc = platform_get_drvdata(pdev);
-
-       return gpiochip_remove(&glc->gc);;
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(3, 18, 0))
+       return gpiochip_remove(&glc->gc);
+#else
+       gpiochip_remove(&glc->gc);
+       return 0;
+#endif
 }


comment:3 Changed 3 years ago by Damian Kaczkowski

+1

Patches make it work.

comment:4 Changed 3 years ago by duvi

Building fine with latest patches in trunk, thanks!

comment:5 Changed 3 years ago by jogo

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r45188.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.