world leader in high performance signal processing
Trace:

Differences

This shows you the differences between two versions of the page.

buildroot:build-system:build_a_target [2012/07/16 23:59]
sonicz [Build buildroot source from GIT]
buildroot:build-system:build_a_target [2013/03/14 06:08] (current)
sonicz [Build external source on local disk]
Line 6: Line 6:
 To build buildroot from GIT SCM, please checkout following tags. To build buildroot from GIT SCM, please checkout following tags.
 | **components** | **git repository** | **tag** | | **components** | **git repository** | **tag** |
-| kernel | [[git://blackfin.uclinux.org/git/linux-kernel]] | 2012R1-RC1-BF60X +| kernel | [[git://blackfin.uclinux.org/git/linux-kernel]] | 2012R2-RC5 
-| buildroot | [[git://blackfin.uclinux.org/git/buildroot]] | 2012R1-RC1-BF60X +| buildroot | [[git://blackfin.uclinux.org/git/buildroot]] | 2012R2-RC5 
-| testsuites | [[git://blackfin.uclinux.org/git/buildroot_test]] | 2012R1-RC1-BF60X |+| testsuites | [[git://blackfin.uclinux.org/git/buildroot_test]] | 2012R2-RC5 |
  
  
Line 17: Line 17:
 > git clone git://blackfin.uclinux.org/git/buildroot > git clone git://blackfin.uclinux.org/git/buildroot
 > cd buildroot > cd buildroot
-> git checkout 2012R1-RC1-BF60X+> git checkout 2012R2-RC5
 or or
-> git checkout -b 2012R1 remotes/origin/2012R1+> git checkout -b 2012R2 remotes/origin/2012R2
 </code> </code>
  
Line 26: Line 26:
 > git submodule update --init > git submodule update --init
 Enter password: anonymous Enter password: anonymous
-> cd linux/linux-2.6.x+> cd linux/linux-kernel
-> git checkout 2012R1-RC1-BF60X+> git checkout 2012R2-RC5
 or or
-> git checkout -b 2012R1 remotes/origin/2012R1+> git checkout -b 2012R2 remotes/origin/2012R2
 > cd ../../ > cd ../../
 > cd testsuites/ > cd testsuites/
-> git checkout 2012R1-RC1-BF60X+> git checkout 2012R2-RC5
 or or
-> git checkout -b 2012R1 remotes/origin/2012R1+> git checkout -b 2012R2 remotes/origin/2012R2
 > cd ../ > cd ../
 </code> </code>
Line 68: Line 68:
 <code> <code>
 > make menuconfig > make menuconfig
 +</code>
 +
 +If you are using buildroot with full uclibc toolchain, below extra configuration is needed.
 +<code>
 +Toolchain  --->    
 +     [*] Toolchain has IPv6 support?
 +     [*] Toolchain has WCHAR support?   
 </code> </code>
  
Line 88: Line 95:
 > make busybox-clean > make busybox-clean
 </code> </code>
 +
 +To reconfigure a specific package:
 +<code>
 +> make busybox-reconfigure
 +</code>
 +
 +To rebuild a specific package:
 +<code>
 +> make busybox-rebuild
 +</code>
 +
 +
 +===== Build external source on local disk =====
 +Some customer's application source code is on local disk other than a remote source server. You can direct buildroot to use local source in your package's make file by macro <PACKAGE>_OVERRIDE_SRCDIR. 
 +
 +If the local source package is generated by GNU autotools, define "<PACKAGE>_OVERRIDE_SRCDIR = your source path" is all you need to do. Otherwise, you have to define the other macro "<PACKAGE>_OVERRIDE_RSYNC = yes" as well. This macro tells buildroot to copy your source code to folder "buildroot/output/build/<PACKAGE>_custom/" before compiling.
 +
 +The buildroot make file for your local source may look like:
 +<code>
 +VIDEO_TEST_OVERRIDE_SRCDIR = /home/sonic/projects/test/video_test
 +VIDEO_TEST_OVERRIDE_RSYNC = yes
 +
 +define VIDEO_TEST_BUILD_CMDS
 +        $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
 +endef
 +
 +define VIDEO_TEST_INSTALL_TARGET_CMDS
 +        if ! [ -d "$(TARGET_DIR)/bin/" ]; then \
 +                mkdir -p $(TARGET_DIR)/bin/; \
 +        fi
 +        $(INSTALL) -D -m 0755 $(@D)/video_test $(TARGET_DIR)/bin/
 +endef
 +
 +define VIDEO_TEST_CLEAN_CMDS
 +        $(MAKE) -C $(@D) clean
 +endef
 +
 +define VIDEO_TEST_UNINSTALL_TARGET_CMDS
 +        rm -f $(TARGET_DIR)/bin/video_test
 +endef
 +
 +$(eval $(generic-package))
 +</code>
 +
  
 ===== Increment building ===== ===== Increment building =====