CHAPTER 4. THE LINUX KERNEL 7
checking connectivity... done.
checking out files: 100% (47441/47441), done.
$ cd linux
$ git reset --hard opt3001-v3.14
4.3 Kernel Configuration
After downloading the Kernel sources, we need to configure it for our setup.
We will start by running:
$ make ARCH=arm CROSS_COMPILE=arm-linux- omap2plus_defconfig
hostcc scripts/basic/fixdep
hostcc scripts/kconfig/conf.o
shipped scripts/kconfig/zconf.tab.c
shipped scripts/kconfig/zconf.lex.c
shipped scripts/kconfig/zconf.hash.c
hostcc scripts/kconfig/zconf.tab.o
hostld scripts/kconfig/conf
#
# configuration written to .config
#
This first command will select all common configuration for Texas Instruments’ SoCs, including AM335x. Now we need to enable OPT3001 driver. For
that, we will run:
$ make arch=arm cross_compile=arm-linux- menuconfig
You should see a screen such as below in Figure 4.1.
After that, let’s enable the industrial i/o framework and opt3001 driver, please
follow the steps below and refer to the Screen Captures, if necessary.
1. navigate to Device Drivers and press ENTER (see figure 4.2);
2. navigate to Industrial I/O support (see figure 4.3);
(a) press M3(see figure 4.4); or
(b) press Y4(see figure 4.5);
3. navigate to Light sensors and press ENTER (see figure 4.6);
4. navigate to Texas Instruments OPT3001 Light Sensor (see figure 4.7);
(a) press M (see figure 4.8); or
(b) press Y (see figure 4.9);
3
M will compile a dynamically linked module
4
Y will link the binary statically to the kernel image