Installing the Kernel Module
Each time the server is restarted, reload the ashmem_linux.ko and aosp_binder_linux.ko modules based on the following steps.
- After the new kernel is started, run the following commands to install the ashmem and binder modules.The num_devices parameter is required for installing aosp_binder_linux.ko. num_devices indicates the number of binder device nodes to be registered, which must exceed three times the number of containers to be started. For example, if 100 containers need to be started, the value must be greater than 300.
# cd /lib/modules/5.10.0/kernel/lib/ # sudo insmod aosp_binder_linux.ko num_devices=400 # sudo insmod ashmem_linux.ko
- Check whether the installation is successful.
1# lsmod | grep -E "ashmem|binder"If the following information is displayed, the installation is successful:
# lsmod | grep -E "ashmem|binder" ashmem_linux 24576 0 aosp_binder_linux 208896 0
- Assign permissions.
1 2 3 4
# sudo chmod 600 /dev/aosp_binder* # sudo chmod 600 /dev/ashmem # sudo chmod 600 /dev/dri/* # sudo chmod 600 /dev/input
- Check whether the permission modifications have taken effect.
1# ls -alh /dev/aosp_binder0 /dev/aosp_binder399 /dev/ashmemIf the following information is displayed, the configuration takes effect:
# ls -alh /dev/aosp_binder0 /dev/aosp_binder399 /dev/ashmem crw------- 1 root root 501, 0 Aug 26 08:41 /dev/aosp_binder0 crw------- 1 root root 501, 399 Aug 26 08:41 /dev/aosp_binder399 crw------- 1 root root 10, 58 Aug 26 08:42 /dev/ashmem
Parent topic: Deploying Kbox