-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This page describes Buildroot 2011.05 for Beagleboard-xM. This is just a standard Buildroot with some additional stuff like X-Loader first stage boot loader, patches or U-Boot boot loader, Linux kernel patches and some additional package in Root Filesystem.
#Using ubuntu, here are the packages sudo apt-get install build-essential texinfo bison flex
gitclone git://github.com/matthew-l-weber/buildroot.git
cd buildroot
make opencvdemo_defconfig
make
This assumes the card has not automounted. If it has, umount the card and then proceed to run the command.
sudo board/beagleboard/xm/mkcard.sh /dev/sd[b/c/d/e/f]
Loading assumes your sdcard has auto-mounted to /media/boot and /media/rootfs.
sudo board/beagleboard/xm/loadCard.sh
The base build above provides you with a Neon and O2 optimized kernel and rootfs. The following tweaks the OpenCV and template matching code to be a variety of optimization configurations for metric recording.
Rebuild OpenCV and App with the Neon and O3 flags.
-
Edit ./output/toolchainfile.cmake to have the following
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CACHE STRING "Buildroot CFLAGS" FORCE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CACHE STRING "Buildroot CXXFLAGS" FORCE)
Then we need to edit the toplevel config
make menuconfig
Go to (Build Options->gcc optimization level) and set it to
optimization level 3
Then go to (Toolchain->Target Optimizations) and set it to
-pipe -mfpu=neon -ftree-vectorize -mfloat-abi=softfp
Exit and save Next rebuild
rm output/build/opencv-2.2.0 -rf ; make opencv ; make opencv_templatematch-clean ; make opencv_templatematch
Reload SDcard with new rootfs OpenCV libraries and App
sudo cp output/target/* /media/rootfs/ -r ; sudo chown root:root /media/rootfs/* -R ; sync ; sudo umount /media/rootfs /media/boot
Rebuild OpenCV and App with no optimization and flags (changes the target optimizations line above to just -pipe and nothing else. also changes gcc optimizations to size). This kernel won't boot because the kernel config will be built to use neon instructions. For my no optimization testing I took my kernel from my optimized build and filesystem created by this non-optimized build.