Tux
Communication
Mailing lists
Documentation
User Manual
Target board info.
Target chip info.
Support
Linux support
Bugzilla
Downloads
STLinux
Updates
Search
Google


The web
stlinux.com
Using STWorkbench with STLinux
Building an STLinux kernel
ST Logo
Previous   Contents   Next

Overview

This describes how to import the STLinux kernel into STWorkbench, and how to configure and build it.

It is assumed you are using an STb7100 Reference Board and building an ST40 kernel tree. However, this information applies to all ST platforms so it can still be followed on other combinations of board and kernel tree, provided the required values are substituted.

Importing and building the Linux Kernel

This describes how to import a Linux kernel tree into an STWorkbench project, how to modify the configuration and how to build it. It describes how to import the kernel, configure it for the STb7100 Reference Board, and compile it with debug info.

  1. Make sure you have a clean copy of the kernel tree in the filesystem at a location where you have permission to build.
    Kernels for ST40 and ST231 are provided at /opt/STM/STLinux-2.3/devkit/sources/kernel/.

    Note: STWorkbench will work with this copy of the kernel directly - it will not be copied into the workspace directory.

  2. For this example, uncheck Project > Build Automatically, otherwise STWorkbench will try to build the kernel each time it is configured.

  3. Click File > New > Project.... The New Project window appears.

  4. Select C > C Project from the Wizards tree/list and click Next. The C Project dialog appears.

  5. Enter 'STb7100ref' into the Project name text box

  6. Select STLinux Kernel project from the Project types list

  7. Select ST40 Linux GCC from the Toolchain list.

  8. Uncheck Use default location and browse to the directory containing your kernel.

    Note: the wizard will warn that "Directory with specified name already exists!". This is expected and can be ignored.

  9. Click Finish. If a confirmation appears, click Yes.

  10. Select Project > Configure Kernel > Apply Default Configuration.

  11. In the Configuring STb7100ref dialog box, select mb442 and click Apply. The default configuration is applied.

  12. Select Project > Configure Kernel > Menuconfig. A text-based kernel configuration GUI is displayed.

  13. In the Kernel hacking section, check the following options:

    • Kernel debugging,
    • Compile the kernel with debug info.

  14. Exit the kernel configuration GUI, saving the new kernel configuration.

  15. The kernel is now ready to be compiled. Right-click the project in the C/C++ Projects view and select Build Project. The kernel starts to build in the STWorkbench Console window.

Previous   Contents   Next
Valid HTML 4.01! Last updated: 17th December 2007
© Copyright STMicroelectronics Limited, 2005
Printer