Skip to content

missing kernel symbol in arm64 5.10.11-v8+ for anbox #4162

Closed

Description

@mgrouch

cat /var/lib/dkms/anbox-ashmem/1/build/make.log
DKMS make.log for anbox-ashmem-1 for kernel 5.10.11-v8+ (aarch64)
Sun 21 Feb 17:03:37 GMT 2021
make -C /lib/modules/5.10.11-v8+/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/linux-headers-5.10.11-v8+'
CC [M] /var/lib/dkms/anbox-ashmem/1/build/deps.o
CC [M] /var/lib/dkms/anbox-ashmem/1/build/ashmem.o
LD [M] /var/lib/dkms/anbox-ashmem/1/build/ashmem_linux.o
MODPOST /var/lib/dkms/anbox-ashmem/1/build/Module.symvers
ERROR: modpost: "kallsyms_lookup_name" [/var/lib/dkms/anbox-ashmem/1/build/ashmem_linux.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:111: /var/lib/dkms/anbox-ashmem/1/build/Module.symvers] Error 1
make[2]: *** Deleting file '/var/lib/dkms/anbox-ashmem/1/build/Module.symvers'
make[1]: *** [Makefile:1712: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.11-v8+'
make: *** [Makefile:12: all] Error 2

See also anbox/anbox-modules#67

Activity

  1. pelwell commented on Feb 21, 2021

    @pelwell
    Contributor

    And also anbox/anbox-modules#49.

    I particularly like the comments "What a bunch of incompetent monkeys." and "You do realise this project hasn't been properly maintained in ages right?"

    However, this comment suggests that you shouldn't need an out-of-tree module any more. Report back when you've found out what is needed.

  2. mgrouch commented on Feb 21, 2021

    @mgrouch
    Author
  3. Dark-Sky commented on Feb 22, 2021

    @Dark-Sky

    External modules are not needed in that kernel. They have to be enabled in the kernel config in 2 different places and recompiled though.

    # Android
    #
    CONFIG_ASHMEM=y
    # end of Android
    ...
    ...
    # Android
    #
    CONFIG_ANDROID=y
    CONFIG_ANDROID_BINDER_IPC=y
    CONFIG_ANDROID_BINDERFS=y
    CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
    # CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set
    # end of Android
    

    I have been testing anbox after each kernel new kernel compile with aarch64 for quite a while and it works well.

    anbox

  4. mgrouch commented on Feb 22, 2021

    @mgrouch
    Author
  5. Dark-Sky commented on Feb 22, 2021

    @Dark-Sky

    This area is for issues with the RPi kernels. You should open up a thread on the raspberry pi forums and provide the info I gave above and ask for help getting the kernel compiled since you evidently know very little about the subject.

    Really this issue should be closed as it has nothing to due with an issue with the kernel.

  6. mgrouch commented on Feb 22, 2021

    @mgrouch
    Author
  7. pelwell commented on Feb 22, 2021

    @pelwell
    Contributor

    We will usually consider enabling minor build options on request, but CONFIG_ANDROID does not sound like a minor build option - more like a personality transplant.

  8. choff commented on Mar 7, 2021

    @choff
    Contributor

    Hello @pelwell ,

    I just wanted to kindly repeat the request to consider enabling CONFIG_ANDROID in Raspberry Pi kernels per default. ashmem and binder (which are required for Anbox) are just about 5000 lines of C code. I don't think that this counts as a "personality transplant" :-) . Anbox used to work well before the upgrade to kernel 5.10 and I would be happy to use it still with newer kernels. Building a custom kernel is very involved and not user-friendly at all - to keep your system secure and up-to-date I'd also need to rebuild this kernel regularly.

    If the following kernel options could be enabled, I'd be very happy:

    CONFIG_ANDROID=y
    CONFIG_ANDROID_BINDER_IPC=y
    CONFIG_ANDROID_BINDERFS=y
    CONFIG_ASHMEM=y
    

    Unfortunately, it is no longer possible to build anbox and binder as kernel modules - except if I'd consider to apply dirt patches like this one lttng/lttng-modules@a657654 to "anbox-modules", which I'm almost desperate enough to do....

    Please consider it again.

    Best regards,

    Christian

  9. JamesH65 commented on Mar 7, 2021

    @JamesH65
    Contributor

    Since these options appear to need to be built in to the kernel (not modules), we would need to know the impact that having them has on the below, before we could even start to make a decision ion whether to include them.

    1. Kernel Size
    2. Kernel memory usage
    3. Kernel performance impact.
  10. choff commented on Mar 8, 2021

    @choff
    Contributor

    Hello @JamesH65 ,

    thanks for your response. I will get back to you as soon as I have an answer to all of your above questions. This might take me a couple of days, as I will need to build a custom kernel with these kernel options enabled. I will also need to review the code of Ashmem and Binder to be able to judge a potential impact on performance and memory usage.

    Best regards,

    Christian

  11. JamesH65 commented on Mar 8, 2021

    @JamesH65
    Contributor

    Just to warn you, if any of these things have any noticeable impact, then its very unlikely this option will be added, as it would affect everyone for only a few peoples benefit. (Not withstanding any other objections from our maintainer). Note, figures for Pi Zero would also be relevant here I think, as that show performance hits much more clearly than Pi4's.

  12. choff commented on Mar 14, 2021

    @choff
    Contributor

    Hello @JamesH65 and @pelwell ,

    sorry for the late reply - during the week I didn't have enough time to look into this topic and so I needed to postpone this Anbox kernel investigation to the weekend. I finally got Anbox to work again with a custom 5.10 kernel! Unfortunately, kernel modifications are required for this. Just enabling the kernel config options for ashmem and binder that I posted above is not sufficient...

    This was already an issue with older kernels, where ashmem and binder could still be compiled as modules. Back then the workaround was simply to compile the patched kernel modules out-of-tree. This is now no longer an option as ashmem and binder cannot be compiled as modules anymore. I think I finally need to get in touch with the developers of Binder and Anbox to resolve this issue, so that the required patch to Binder can be mainlined in some way.

    I will be on vacation starting next week (without internet access) and so all this will need to wait a while. I will get back to you as soon as I have an update.

    Ashmem and Binder should not have a negative impact on performance and memory size. Basically, these are just character devices that are created and if you don't use them, you don't have any memory or performance impact. I reviewed the source code to be sure. But I will get back to you with a more detailed report after the issue with the kernel modifications is solved.

    Best regards,

    Christian

  13. mgrouch commented on Mar 31, 2021

    @mgrouch
    Author

    Christian,

    Any updates on this? Should this be re-open?

    thanks

  14. choff commented on Apr 1, 2021

    @choff
    Contributor
  15. 10 remaining items

  16. mgrouch commented on Jul 30, 2021

    @mgrouch
    Author

    Hello,
    Did it make it into recently released
    raspberry pi kernel 20210727?

    thanks

  17. popcornmix commented on Jul 30, 2021

    @popcornmix
    Collaborator

    It's been in (64-bit) kernel builds since 16 June.

  18. mgrouch commented on Jul 30, 2021

    @mgrouch
    Author

    I have arm64 bit kernel 5.10.52-v8+

    There is /dev/ashmem
    but no
    /dev/binder

    What is the correct procedure to enable them?

    Thanks

  19. mgrouch commented on Oct 16, 2021

    @mgrouch
    Author

    @choff
    @chrihoff

    Christian,

    I've built an OS image with 64-bit kernel and armhf user space.
    https://bareboat-necessities.github.io/my-bareboat/bareboat-os.html
    I'd love to build (at least experimental) support for anbox.
    Have you got it running by any chance in this kind of set up?

    Thanks a lot,
    --MG

  20. Botspot commented on Mar 5, 2022

    @Botspot

    I have arm64 bit kernel 5.10.52-v8+

    There is /dev/ashmem but no /dev/binder

    What is the correct procedure to enable them?

    Thanks

    According to here, you can enable /dev/binder with these commands:

    sudo mkdir /dev/binderfs
    sudo mount -t binder binder /dev/binderfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions