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

From DAVE Developer's Wiki
Jump to: navigation, search
(added a note regarding make linux_install)
(Build the whole kit)
Line 20: Line 20:
 
* install the binaries into the root file system
 
* install the binaries into the root file system
  
After starting the [[:Category:DVDK|DVDK]] and, in needed, login by using the default user, start a terminal and:
+
After starting the [[:Category:DVDK|DVDK]] and, when prompted, login by using the default user, start a terminal and:
 
* enter the ''EZSDK_INSTALL_DIR'' directory: <code>cd /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-x.xx.xx.xx</code>
 
* enter the ''EZSDK_INSTALL_DIR'' directory: <code>cd /home/shared/devel/dave/naon-DAA/sw/linux/sdk/sdk-x.xx.xx.xx</code>
 
** 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'')
 
** 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'')

Revision as of 09:45, 9 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, when prompted, 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), under the directory:

  • $EXEC_DIR/boot: for uImage
  • $EXEC_DIR/lib/modules/$KERNEL_VERSION: for the modules


Info-icon.png Please note that, on DVDK, $EXEC_DIR/boot is inside the TFTP root directory, thanks to the symbolic link: /srv/tftp/naon -> $EXEC_DIR/boot.

So requesting naon/uImage to DVDK's TFTP server will return $EXEC_DIR/boot/uImage

Info-icon.png


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


Info-icon.png Please note that sudo make linux_install delete all other installed linux kernel modules. For this reason, after this command the user should also run
sudo make syslink_install sgx-driver_install
Info-icon.png

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