Skip to content

Commit 6bd2ec5

Browse files
committed
apollo-kernel: refactor for apollo patches
* refactor esd can driver related files into esdcan.patch * refactor other changes into pre_rt.patch
1 parent c626057 commit 6bd2ec5

File tree

13 files changed

+102
-34
lines changed

13 files changed

+102
-34
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ In the first release, we add the most popular solution, Linux Kernel, under the
55

66
## Linux Kernel
77

8-
Apollo Linux Kernel is based on Linux Kernel 4.4.32 with some modifications.
8+
Apollo Linux Kernel is based on official [Linux Kernel 4.4.32](https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.32.tar.gz) with some modifications.
99

1010
### What is the difference
1111

@@ -15,6 +15,8 @@ Apollo Linux Kernel is based on Linux Kernel 4.4.32 with some modifications.
1515
* Double free in the inet_csk_clone_lock function patch (https://bugzilla.redhat.com/show_bug.cgi?id=1450972)
1616
* Other cve security patches
1717

18+
[Kernel config files](https://github.com/ApolloAuto/apollo-kernel/tree/master/linux/configs) are modified for Apollo based on Ubuntu's config-4.4.0-X-generic.
19+
1820
The Apollo team would like to thank everybody in the open source community. The GitHub apollo-kernel/linux is based on Linux. Currently, Apollo team maintains this repository. In near future, we’ll send patches back to Linux community.
1921

2022
### Add ESD CAN Support

linux/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VERSION = 4
22
PATCHLEVEL = 4
33
SUBLEVEL = 32
4-
EXTRAVERSION = -apollo-1
4+
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

77
# *DOCUMENTATION*

linux/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@ function kernel_cleanall() {
132132
}
133133

134134
function kernel_patch() {
135+
# patch pre_rt.patch
136+
grep '#res' scripts/setlocalversion > /dev/null
137+
if [ $? -ne 0 ]; then
138+
k_patch patches/pre_rt.patch
139+
fi
140+
# patch esdcan
141+
if [ -d drivers/esdcan ]; then
142+
k_patch patches/esdcan.patch
143+
fi
135144
# patch e1000e.patch
136145
grep E1000_DEV_ID_PCH_LBG_I219_LM3 drivers/net/ethernet/intel/e1000e/hw.h > /dev/null
137146
if [ $? -ne 0 ]; then

linux/drivers/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,4 @@ source "drivers/hwtracing/intel_th/Kconfig"
198198

199199
source "drivers/fpga/Kconfig"
200200

201-
source "drivers/esdcan/Kconfig"
202-
203201
endmenu

linux/drivers/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,3 @@ obj-$(CONFIG_STM) += hwtracing/stm/
172172
obj-$(CONFIG_ANDROID) += android/
173173
obj-$(CONFIG_NVMEM) += nvmem/
174174
obj-$(CONFIG_FPGA) += fpga/
175-
obj-$(CONFIG_ESDCAN) += esdcan/

linux/drivers/esdcan/Kconfig

Lines changed: 0 additions & 1 deletion
This file was deleted.

linux/drivers/esdcan/Kconfig.esd

Lines changed: 0 additions & 6 deletions
This file was deleted.

linux/drivers/esdcan/Makefile

Lines changed: 0 additions & 1 deletion
This file was deleted.

linux/drivers/esdcan/Makefile.esd

Lines changed: 0 additions & 19 deletions
This file was deleted.

linux/kernel/locking/rtmutex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ void rt_mutex_destroy(struct rt_mutex *lock)
15201520
#endif
15211521
}
15221522

1523-
EXPORT_SYMBOL(rt_mutex_destroy);
1523+
EXPORT_SYMBOL_GPL(rt_mutex_destroy);
15241524

15251525
/**
15261526
* __rt_mutex_init - initialize the rt lock

0 commit comments

Comments
 (0)