Difference between revisions of "Linux Kernel 2.6.35.y"
From IGEP - ISEE Wiki
(→Scenarios) |
|||
Line 1: | Line 1: | ||
− | (work in progress) | + | ( work in progress, based on linux-2.6.35.y-for-next branch ) |
= Introduction = | = Introduction = |
Revision as of 18:20, 30 June 2011
( work in progress, based on linux-2.6.35.y-for-next branch )
Contents
[hide]Introduction
The currently supported machines are as follows:
- IGEP0020
- IGEP0030
The currently supported expansion boards are as follows:
- IGEP0022
- BASE0010 (only Rev. A)
Build from sources
Download the latest stable version sources and follow next steps:
wget http://downloads.igep.es/sources/linux-omap-2.6.35.tar.gz tar xzf linux-omap-2.6.35.tar.gz cd [kernel version]
A generic configuration is provided for all IGEP machines, and can be used as the default by
make ARCH=arm CROSS_COMPILE=[your cross compiler] igep00x0_defconfig
Then build the kernel with:
make ARCH=arm CROSS_COMPILE=[your cross compiler] uImage modules
The result will be an uImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs
make ARCH=arm CROSS_COMPILE=[your cross compiler] modules_install INSTALL_MOD_PATH=[path to your target rootfs]
Kernel Parameters
The buddy parameter
buddy= [igep0022, base0010] Format: <string> igep0022: enable expansion board, supported by igep0020 board base0010: enable expansion board, supported by igep0030 board default: none
The buddy.modem parameter
buddy.modem= [yes] Format: <string> yes: enable modem on buddy board, supported by igep0022 expansion board. default: none
Scenarios
A. If you have and IGEP0020 board plus an IGEP0022 expansion board you should add in your kernel cmdline
buddy=igep0022
Optionally, if you wont enable the IGEP0022 modem which is disabled by default you should add in your kernel cmdline
buddy=igep0022 buddy.modem=yes
NOTE: UART1 can be used for bluetooth OR modem in expansion board but NOT at same time. They are INCOMPATIBLE.
B. If you have and IGEP0030 board plus an BASE0010 expansion board you should add in your kernel cmdline
buddy=base0010
Layout
Machine specific files are located in arch/arm/mach-omap2/ directory with name board-igep*.c. Like :
- board-igep0020.c : For IGEP0020 machine
- board-igep0030.c : For IGEP0030 machine
Expansion board files, also are located in arch/arm/mach-omap2/ directory with name exp-*.c. Like :
- exp-igep0022.c : For IGEP0022 expansion board
- exp-base0010.c : For BASE0010 expansion board
Adding New Expansion Boards
This chapter is meant to be a starting point for people to learn how to add your own expansion board in three steps.
Step 1: Add new expansion board file
As you can see in Layout chapter, an expansion board is called exp-<your board name>.c and should be located in arch/arm/mach-omap2 directory, so the first step will be add a new file for your new expansion board. Following example creates a new expansion board file called exp-dummy.c (arch/arm/mach-omap2/exp-dummy.c)
#include <linux/kernel.h> #include <linux/init.h>
void __init dummy_init(void) { pr_info("Initializing expansion board ... \n"); }
next, add the new file to be built
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 7505be9..a6572f2 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -156,6 +156,7 @@ obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o \ obj-$(CONFIG_MACH_IGEP0030) += board-igep0030.o \ board-igep00x0.o \ exp-base0010.o \ + exp-dummy.o \ hsmmc.o obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \ hsmmc.o
Step 2: Register new expansion board
Now, edit board-igep00x0.h and add an identifier for the new expansion board, for example,
diff --git a/arch/arm/mach-omap2/board-igep00x0.h b/arch/arm/mach-omap2/board-igep00x0.h index 6b9b677..a2325d7 100644 --- a/arch/arm/mach-omap2/board-igep00x0.h +++ b/arch/arm/mach-omap2/board-igep00x0.h @@ -15,6 +15,7 @@ #define IGEP00X0_BUDDY_NONE 0x01 #define IGEP00X0_BUDDY_IGEP0022 0x01 #define IGEP00X0_BUDDY_BASE0010 0x02 +#define IGEP00X0_BUDDY_DUMMY 0x03 #define IGEP00X0_BUDDY_HWREV_A (1 << 0) #define IGEP00X0_BUDDY_HWREV_B (1 << 1)
also, edit in board-igep00x0.c the buddy_early_param to add the new expansion board,
diff --git a/arch/arm/mach-omap2/board-igep00x0.c b/arch/arm/mach-omap2/board-igep00x0.c index 2a2d8eb..f2b5b27 100644 --- a/arch/arm/mach-omap2/board-igep00x0.c +++ b/arch/arm/mach-omap2/board-igep00x0.c @@ -192,6 +192,9 @@ static int __init buddy_early_param(char *str) if (!strcmp(name, "base0010")) { igep00x0_buddy_pdata.model = IGEP00X0_BUDDY_BASE0010; pr_info("IGEP: IGEP0030 machine + BASE0010 (buddy)\n"); + } else if (!strcmp(name, "dummy")) { + igep00x0_buddy_pdata.model = IGEP00X0_BUDDY_DUMMY; + pr_info("IGEP: IGEP0030 machine + DUMMY (buddy)\n"); } else pr_err("IGEP: Unknown buddy for IGEP0030 machine\n"); }
Step 3: Run expansion board initialization
Finally, modify the machine file and add support for the new expansion board, for example:
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index 2b97257..44b319d 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c @@ -204,6 +204,8 @@ static struct omap_board_mux board_mux[] __initdata = { /* Expansion board: BASE0010 */ extern void __init base0010_init(struct twl4030_platform_data *pdata); +/* Expansion board: DUMMY */ +extern void __init dummy_init(void); static void __init igep0030_init(void) { @@ -223,6 +225,10 @@ static void __init igep0030_init(void) /* - BASE0010 (adds twl4030_pdata) */ if (igep00x0_buddy_pdata.model == IGEP00X0_BUDDY_BASE0010) base0010_init(&twl4030_pdata); + /* - DUMMY */ + if (igep00x0_buddy_pdata.model == IGEP00X0_BUDDY_DUMMY) + dummy_init(); + /* Add twl4030 common data */ omap3_pmic_get_config(&twl4030_pdata, TWL_COMMON_PDATA_USB |