Difference between revisions of "Development Environment HowTo (NELK)"

From DAVE Developer's Wiki
Jump to: navigation, search
m (Build/configure Linux kernel only)
m (Build/configure Linux kernel only)
Line 66: Line 66:
  
 
If needed, user can configure and build only the Linux kernel (this is useful, for example, if you are a kernel driver developer).
 
If needed, user can configure and build only the Linux kernel (this is useful, for example, if you are a kernel driver developer).
 +
 +
Linux kernel source are available inside ''EZSDK_INSTALL_DIR/board-support/linux-omap3.git''.
  
 
Enter the ''EZSDK_INSTALL_DIR'' and type:
 
Enter the ''EZSDK_INSTALL_DIR'' and type:

Revision as of 07:33, 3 May 2012

Info Box
Naon am387x-dm814x.png Applies to Naon


Introduction[edit | edit source]

In this HowTo we'll take a first look of Naon Embedded Linux Kit (NELK) development environment.

To allow fast development startup, NELK is provided as DVDK virtual appliance, in this way user can setup its development environment in minutes and get productive as soon as the VM starts.

Build the whole kit[edit | edit source]

Building the whole kit means:

  • build Linux kernel with default configuration
  • build u-boot with default configuration
  • build gstreamer and all the required libriaries
  • install the binaries into the root file system

After starting the DVDK and, in needed, login by using the default user, start a terminal and:

  • enter the EZSDK_INSTALL_DIR directory: cd /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-x.xx.xx.xx
    • where the x should be substituted with the current release which NELK is based (e.g. /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15)
  • run make all command
nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ make all
make -C /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/board-support/linux-2.6.37-psp04.01.00.06.patch2 ARCH=arm CROSS_COMPILE=/home/shared/devel/dave/naon-DAA/sw/linux/sdk/arm-2009q1//bin/arm-none-linux-gnueabi- uImage
make[1]: Entering directory `/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/board-support/linux-omap3.git'

[snip..]

max_DM81XX_RELEASE_0_03'
make[2]: Leaving directory `/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/component-sources/gst-openmax_DM81XX_RELEASE_0_03'
make[1]: Leaving directory `/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/component-sources/gst-openmax_DM81XX_RELEASE_0_03'
nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$
  • after the build finish (which may take a while, depending on user's PC power), user can install the binaries with sudo make install (sudo is required due file permission restriction on the root file system)
nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ sudo make install
[sudo] password for nelk: 
install -d /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/../rfs/nelk/boot
install  /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/board-support/linux-2.6.37-psp04.01.00.06.patch2/arch/arm/boot/uImage /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/../rfs/nelk/boot
install  /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/board-support/linux-2.6.37-psp04.01.00.06.patch2/vmlinux /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/../rfs/nelk/boot
install  /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/board-support/linux-2.6.37-psp04.01.00.06.patch2/System.map /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/../rfs/nelk/boot

[snip..]

make[3]: Entering directory `/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/component-sources/gst-openmax_DM81XX_RELEASE_0_03'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/component-sources/gst-openmax_DM81XX_RELEASE_0_03'
make[2]: Leaving directory `/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/component-sources/gst-openmax_DM81XX_RELEASE_0_03'
make[1]: Leaving directory `/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15/component-sources/gst-openmax_DM81XX_RELEASE_0_03'
nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ 
  • when the install process finishes all the binaries are installed

Build a custom application[edit | edit source]

Build/configure Linux kernel only[edit | edit source]

If needed, user can configure and build only the Linux kernel (this is useful, for example, if you are a kernel driver developer).

Linux kernel source are available inside EZSDK_INSTALL_DIR/board-support/linux-omap3.git.

Enter the EZSDK_INSTALL_DIR and type:

nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ make linux

This will build Linux uImage (suitable for U-Boot) and modules

To change the default configuration, execute:

nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ make linux_menuconfig

The usual Linux curses configuration interface will allow configuration changes.

To revert to the default configuration, type:

nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ make linux_defconfig

The configuration name in specified inside EZSDK_INSTALL_DIR/Rules.make into the variable DEFAULT_LINUXKERNEL_CONFIG

Two additional target are provided:

nelk@nelk-desktop:/home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-5.03.01.15$ make linux_install

Copy the binaries (uImage and modules) inside the root file system (see EXEC_DIR variable inside EZSDK_INSTALL_DIR/Rules.make)


Info-icon.png Please note that, after running make linux_install, the user should run the command depmod from the target shell
root@naon:~# depmod
Info-icon.png

Build/configure U-Boot only[edit | edit source]