-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
29 lines (25 loc) · 1.39 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
obj-y := InfParser/ QdssDiag/ rmnet/ GobiSerial/
PWD := $(shell pwd)
OUTPUTDIR=/lib/modules/$(shell uname -r)/kernel/drivers/net/usb/
OUTPUTDIR_MDM=/lib/modules/$(shell uname -r)/kernel/drivers/usb/serial/
SECUREBOOT := $(shell mokutil --sb-state)
all: clean
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
install: all
mkdir -p $(OUTPUTDIR)
ifeq ($(SECUREBOOT),SecureBoot enabled)
/usr/src/linux-headers-$(shell uname -r)/scripts/sign-file sha256 /opt/QTI/sign/Signkey.priv /opt/QTI/sign/Signkey_pub.der ./InfParser/qtiDevInf.ko
# /usr/src/linux-headers-$(shell uname -r)/scripts/sign-file sha256 /opt/QTI/sign/Signkey.priv /opt/QTI/sign/Signkey_pub.der ./GobiSerial/GobiSerial.ko
/usr/src/linux-headers-$(shell uname -r)/scripts/sign-file sha256 /opt/QTI/sign/Signkey.priv /opt/QTI/sign/Signkey_pub.der ./QdssDiag/QdssDiag.ko
/usr/src/linux-headers-$(shell uname -r)/scripts/sign-file sha256 /opt/QTI/sign/Signkey.priv /opt/QTI/sign/Signkey_pub.der ./rmnet/GobiNet.ko
endif
cp -f ./QdssDiag/QdssDiag.ko $(OUTPUTDIR)
cp -f ./rmnet/GobiNet.ko $(OUTPUTDIR)
cp -f ./InfParser/qtiDevInf.ko $(OUTPUTDIR)
# cp -f ./GobiSerial/GobiSerial.ko $(OUTPUTDIR_MDM)
depmod
clean:
$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
$(RM) Module.markers modules.order