Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
sunplus@ubuntu:/usr/src/linux-headers-5.10.201$ sudo rm source
sunplus@ubuntu:/usr/src/linux-headers-5.10.201$ sudo ln -s /usr/src/linux-headers-5.10.201 /lib/modules/5.10.201/build
sunplus@ubuntu:/usr/src/linux-headers-5.10.201$ ll /lib/modules/5.10.201/build/
total 736
drwxr-xr-x 6 4031  501   4096 Mar 27 21:53 ./
drwxr-xr-x 3 root root   4096 Mar 27 21:50 ../
drwxr-xr-x 3 4031  501   4096 Apr 24  2024 arch/
-rw-r--r-- 1 4031  501 135525 Apr 24  2024 .config
-rw-r--r-- 1 4031  501     39 Apr 24  2024 .gitignore
drwxr-xr-x 4 4031  501   4096 Apr 24  2024 include/
drwxr-xr-x 2 4031  501   4096 Apr 24  2024 kernel/
-rw-r--r-- 1 4031  501    141 Apr 24  2024 Makefile
-rw-r--r-- 1 4031  501   1044 Apr 24  2024 .missing-syscalls.d
-rw-r--r-- 1 4031  501 576967 Apr 24  2024 Module.symvers
drwxr-xr-x 8 4031  501   4096 Apr 24  2024 scripts/
sunplus@ubuntu:/usr/src/linux-headers-5.10.201$ 

Appendix: List of target headers in Makefile within Q654_code_folder/build/

Code Block
headers:
	@KERNELRELEASE=$(shell cat $(LINUX_PATH)/include/config/kernel.release 2>/dev/null)
	@if ! [ -f $(LINUX_PATH)/.config ]; then \
		echo File \'$(LINUX_PATH)/.config\' does not exist!; \
		exit 1; \
	fi
	@if ! [ -f $(LINUX_PATH)/Module.symvers ]; then \
		echo File \'$(LINUX_PATH)/Module.symvers\' does not exist!; \
		exit 1; \
	fi
	rm -rf linux-headers-$(KERNELRELEASE)
	mkdir -p linux-headers-$(KERNELRELEASE)
	cp -f $(LINUX_PATH)/.config linux-headers-$(KERNELRELEASE)
	cp -f $(LINUX_PATH)/Module.symvers linux-headers-$(KERNELRELEASE)
	cp -f $(LINUX_PATH)/Makefile linux-headers-$(KERNELRELEASE)
	$(MAKE_ARCH) $(MAKE_JOBS) -C $(LINUX_PATH) CROSS_COMPILE=$(CROSS_COMPILE_FOR_LINUX) mrproper
	$(MAKE_ARCH) $(MAKE_JOBS) -C $(LINUX_PATH) O=../../linux-headers-$(KERNELRELEASE) CROSS_COMPILE=$(CROSS_COMPILE_FOR_LINUX) modules_prepare
	$(MAKE_ARCH) $(MAKE_JOBS) -C $(LINUX_PATH) headers_install INSTALL_HDR_PATH=../../linux-headers-$(KERNELRELEASE) CROSS_COMPILE=$(CROSS_COMPILE_FOR_LINUX)
	rm linux-headers-$(KERNELRELEASE)/source
	cp -rf $(LINUX_PATH)/include linux-headers-$(KERNELRELEASE)
	mkdir -p linux-headers-$(KERNELRELEASE)/arch
	cp -rf $(LINUX_PATH)/arch/arm64 linux-headers-$(KERNELRELEASE)/arch
	cp -f $(LINUX_PATH)/Makefile linux-headers-$(KERNELRELEASE)
	cp -rf $(LINUX_PATH)/scripts linux-headers-$(KERNELRELEASE)