Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors found in building kernal. #16

Closed
sdrzmgy opened this issue Apr 7, 2024 · 6 comments
Closed

Errors found in building kernal. #16

sdrzmgy opened this issue Apr 7, 2024 · 6 comments

Comments

@sdrzmgy
Copy link

sdrzmgy commented Apr 7, 2024

Referring the Doc, I tried to build the kernal to fit rkllm toolkit. But there are too many errors.
Firstly, there are too many implicit declaration of function such as 'vm_flags_clear', 'vm_flags_set', 'rockchip_uninit_opp_table' and so on. Above these, i can solve functions like 'vm_flags_clear' and 'vm_flags_set' by adding the declaration myself from raspberry pi. But other functions i cannot find any corresponding functions in the Internet.
Also there are many variables like 'MONITOR_TYPE_DEV' are not undeclared.
Can anybody offer a solution or a built kernal which fit rkllm?
When will these errors be solved?

@afox666
Copy link

afox666 commented Apr 7, 2024

Which board?

@sdrzmgy
Copy link
Author

sdrzmgy commented Apr 7, 2024

Which board?

Orangepi 5 Plus with RK3588

@sdrzmgy
Copy link
Author

sdrzmgy commented Apr 7, 2024

Which board?

The kernal source i use is from "https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-5.10-rk3588"

@afox666
Copy link

afox666 commented Apr 7, 2024

I have the same board with you.
The kernel version I have built is 6.1, and it runs well on my board.

Operate according to the following steps:

  1. Run build.sh,choose Full OS image for flashing, the whole codes that building needed will be downloaded.
  2. Add these code to kernel/orange-pi-6.1-rk35xx/include/linux/mm.h
static inline void vm_flags_set(struct vm_area_struct *vma,
                               vm_flags_t flags)
{

       vma->vm_flags |= flags;
}

static inline void vm_flags_clear(struct vm_area_struct *vma,
                                 vm_flags_t flags)
{

       vma->vm_flags &= ~flags;
}
  1. Modify userpatches/config-default.conf, set the value of IGNORE_UPDATES to yes
  2. Copy drivers/rknpu dir to kernel/orange-pi-6.1-rk35xx/drivers
  3. Rerun build.sh, choose Full OS image for flashing

Before you run the demo of rknn-llm, exec command: ulimit -u 8192

@sdrzmgy
Copy link
Author

sdrzmgy commented Apr 8, 2024

I have the same board with you. The kernel version I have built is 6.1, and it runs well on my board.

Operate according to the following steps:

  1. Run build.sh,choose Full OS image for flashing, the whole codes that building needed will be downloaded.
  2. Add these code to kernel/orange-pi-6.1-rk35xx/include/linux/mm.h
static inline void vm_flags_set(struct vm_area_struct *vma,
                               vm_flags_t flags)
{

       vma->vm_flags |= flags;
}

static inline void vm_flags_clear(struct vm_area_struct *vma,
                                 vm_flags_t flags)
{

       vma->vm_flags &= ~flags;
}
  1. Modify userpatches/config-default.conf, set the value of IGNORE_UPDATES to yes
  2. Copy drivers/rknpu dir to kernel/orange-pi-6.1-rk35xx/drivers
  3. Rerun build.sh, choose Full OS image for flashing

Before you run the demo of rknn-llm, exec command: ulimit -u 8192

I made it! THANKS a lot!

@sdrzmgy sdrzmgy closed this as completed Apr 12, 2024
@xxxxyu
Copy link

xxxxyu commented Apr 18, 2024

After re-building the kernel, the WiFi module cannot work normally.
I can see the network controller by lspci, but nmcli dev wifi gives empty output.
NetworkManager.service is enabled.
Did you guys encounter this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants