Skip to content

Commit ec4d117

Browse files
authored
Merge pull request #14 from aiguo159/esd_inst
instruction to compile and install out-of-tree ESD kernel module
2 parents b5f6438 + 548b802 commit ec4d117

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

linux/ESDCAN-README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,27 @@
22

33
In the first release of Apollo software, ESD PCIe CAN is used for CAN communications with the vehicle -- please refer to *Apollo 1.0 Hardware and System Installation Guide* for more information. You MUST obtain ESD CAN driver (kernel module) software from ESD Electronics, and compile it with Apollo Linux kernel to run Apollo software stack.
44

5-
### How To Add ESD CAN Support
5+
### How To Add ESD CAN Support to Apollo Kernel
66

77
1. After/when you purchase CAN card from ESD Electronics, please contact [email protected] to obtain their supporting software package (search for can-pcie/402 to find it on their download website). We have tested version 3.10.3. You may need to make some changes if you use a different version.
8-
2. After unpacking the software package, please copy all files under src/ directory to drivers/esdcan/, except for Makefile.
8+
2. After unpacking the software package, please copy all files under src/ directory to drivers/esdcan/ (after having applied path linux/patches/esdcan.path), except for Makefile.
99
3. Do the following to prepare for build:
1010
```bash
1111
cd drivers/esdcan/;rm Makefile Kconfig;ln -s Makefile.esd Makefile;ln -s Kconfig.esd Kconfig;cd ../..
1212
```
1313
4. If you have run build.sh to customize your build, you may need to do it again. You can now run "./build.sh [target]" to build the kernel.
1414

15-
### Build ESD Kernel Driver with Pre-Built Apollo Kernel
15+
### Build & Install Out-of-Tree ESD Kernel Driver
1616

17-
The ESD CAN driver is not included in the pre-built kernel image release; you can build it after you install the pre-built image, follow the steps below.
18-
1. Download ESD CAN Linux software package from ESD as instructed above.
19-
2. Unpack the package, cd into the package directory; then do the following:
17+
The ESD CAN driver is not included in the pre-built Apollo kernel image release; you can build it after you install the pre-built image, follow the steps below. This also works for other pre-built Linux kernels.
18+
1. Install kernel headers for your version of Linux kernel, if not done already. Pre-built Apollo kernel comes with kernel headers.
19+
2. Download ESD CAN Linux software package from ESD as instructed above.
20+
3. Unpack the package, cd into the package directory; then do the following:
2021
```bash
21-
cd src/; mv Makefile Makefile.orig
22+
cd src/; make -C /lib/modules/`uname -r`/build M=`pwd`
23+
sudo make -C /lib/modules/`uname -r`/build M=`pwd` modules_install
2224
```
23-
3. Download Apollo's modified ESD kernel module makefile (path: linux/drivers/esdcan/Makefile.esd), and save Makefile.esd into the src/ directory.
24-
4. Do the following to build the kernel module:
25-
```bash
26-
ln -s Makefile.esd Makefile;make
27-
```
28-
5. The compiled ESD driver is esdcan-pcie402.ko.
25+
4. The newly compiled ESD driver is esdcan-pcie402.ko, and is installed into /lib/modules/`uname -r`/extra/.
2926

3027
### Legal Disclaimer
31-
The kernel image that you build contains the ESD CAN driver module compiled from source code provided by ESD Electronics (hereby referred as ESD) if ESD CAN driver code is added as instructed above. In the process of obtaining the software, you should have entered a licensing agreement with ESD which shall have granted you (as an individual or a business entity) the right to use the said software provided by ESD; however, you may (and likely you do) need explicit re-distribution permission from ESD to publish the kernel image for any other third party to consume. Such licensing agreement is solely between you and ESD, and is not covered by the license terms of the Apollo project (see file LICENSE under Apollo top directory).
28+
The kernel image that you build contains the ESD CAN driver module compiled from source code provided by ESD Electronics (hereby referred as ESD) if ESD CAN driver code is added as instructed above. In the process of obtaining the software, you should have entered a licensing agreement with ESD which shall have granted you (as an individual or a business entity) the right to use the said software provided by ESD; however, you may or may not need explicit re-distribution permission from ESD to publish the kernel image for any other third party to consume. Such licensing agreement is solely between you and ESD, and is not covered by the license terms of the Apollo project (see file LICENSE under Apollo top directory).

0 commit comments

Comments
 (0)