Use the ADI test scripts to auto config and build a target for a set of function

Document created by Aaronwu Employee on Oct 23, 2013Last modified by Aaronwu Employee on May 15, 2014
Version 4Show Document
  • View in full screen mode

Q: I have passed the ADI default configuration build, now I want to build the Blackfin Linux release for a specific function, for example, I want to build it to support the USB OTG, what should I do?

 

A: Usually we need to enable a set of features in user space application, library, and kernel device drivers to support a specific function, in general you can follow our document wiki to select the features manually. However, this could be a little complex for some cases, and, sometimes the document updating is a little slower than the code updating, although we have tried the best to avoid this, this is especially true when you are trying to test a new feature from our git master.

 

An easy way is to use the ADI test scripts to do the configuration and build automatically for you. ADI test scripts is a set of auto configuration and test scripts that we use to test different functions before formal release. Take the USB OTG for example, follow steps below to take advantage of the test scripts:

 

assume ~/work/sf_git/buildroot_sf/ is where you store the buildroot  source code,

 

1) cd  ~/work/sf_git/buildroot_sf

2) vi testsuites/common/kernel_config.exp

3)specify the buildroot source code path in this kernel_config.exp file by modifying like this in my case:

 

--- testsuites/common/kernel_config.exp.orig 2013-10-24 02:48:50.911610322 +0800

+++ testsuites/common/kernel_config.exp 2013-10-24 02:49:44.071610617 +0800

@@ -9,7 +9,7 @@

} elseif { [info exists env(BOARD_CONFIG)] } {

     set src_root $workspace_root/src/kernel/label/$env(BOARD_CONFIG)

} else {

-    set src_root $workspace_root/src/kernel

+    set src_root ~/work/sf_git/buildroot_sf

}

set kernel_root $src_root/linux/linux-kernel

set custom_kernel $src_root/output/build/linux-custom

 

4)cd ~/work/sf_git/buildroot_sf/testsuites/usbotg

5)./build_usbotg_kernel.exp BF609-EZKIT dma

 

Then the buildroot will begin to do auto configuration and build.

 

In a real application, after the auto configuration with scripts is done, we usually need to customize more options, for example customize the kernel, then we need to do "make linuxmenuconfig", and make changes accordingly, after the kernel manually customization is done, run make in the buildroot again.

 

In case the auto configuration process is interrupted by error, please run the scripts again after fixing these errors, instead of a simple "make"

Attachments

    Outcomes