Import buildroot 2016.02.01
This commit is contained in:
56
firmware/buildroot/support/misc/Vagrantfile
vendored
Normal file
56
firmware/buildroot/support/misc/Vagrantfile
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
################################################################################
|
||||
#
|
||||
# Vagrantfile
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# Buildroot version to use
|
||||
RELEASE='2015.11.1'
|
||||
|
||||
### Change here for more memory/cores ###
|
||||
VM_MEMORY=2048
|
||||
VM_CORES=1
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'ubuntu/trusty64'
|
||||
|
||||
config.vm.provider :vmware_fusion do |v, override|
|
||||
v.vmx['memsize'] = VM_MEMORY
|
||||
v.vmx['numvcpus'] = VM_CORES
|
||||
end
|
||||
|
||||
config.vm.provider :virtualbox do |v, override|
|
||||
v.memory = VM_MEMORY
|
||||
v.cpus = VM_CORES
|
||||
|
||||
required_plugins = %w( vagrant-vbguest )
|
||||
required_plugins.each do |plugin|
|
||||
system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provision 'shell' do |s|
|
||||
s.inline = 'echo Setting up machine name'
|
||||
|
||||
config.vm.provider :vmware_fusion do |v, override|
|
||||
v.vmx['displayname'] = "Buildroot #{RELEASE}"
|
||||
end
|
||||
|
||||
config.vm.provider :virtualbox do |v, override|
|
||||
v.name = "Buildroot #{RELEASE}"
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provision 'shell', inline:
|
||||
"sudo dpkg --add-architecture i386
|
||||
sudo apt-get -q update
|
||||
sudo apt-get -q -y install build-essential libncurses5-dev \
|
||||
git bzr cvs mercurial subversion libc6:i386 unzip
|
||||
sudo apt-get -q -y autoremove
|
||||
sudo apt-get -q -y clean"
|
||||
|
||||
config.vm.provision 'shell', privileged: false, inline:
|
||||
"echo 'Downloading and extracting buildroot #{RELEASE}'
|
||||
wget -q -c http://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz
|
||||
tar axf buildroot-#{RELEASE}.tar.gz"
|
||||
end
|
||||
29
firmware/buildroot/support/misc/target-dir-warning.txt
Normal file
29
firmware/buildroot/support/misc/target-dir-warning.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
Warning!
|
||||
========
|
||||
|
||||
This directory does *not* contain the root filesystem that you can use
|
||||
on your embedded system. Since Buildroot does not run as root, it
|
||||
cannot create device files and set the permissions and ownership of
|
||||
files correctly in this directory to make it usable as a root
|
||||
filesystem.
|
||||
|
||||
For that reason, do *not* use the contents of this directory to mount
|
||||
your root filesystem over NFS or copy the contents of this directory
|
||||
to a SD card or USB key, thinking it will work as the root filesystem
|
||||
for your embedded system. It will simply *not* work.
|
||||
|
||||
Instead, if you need a usable root filesystem, please select one of
|
||||
the filesystem image formats available in the Buildroot configuration
|
||||
interface (make menuconfig or others) in the "Filesystem images"
|
||||
sub-menu. If you want to get a filesystem image that you can easily
|
||||
extract to your SD card or to some directory exposed through NFS,
|
||||
please use the "tar the root filesystem" option. It will generate a
|
||||
images/rootfs.tar image in your Buildroot output directory, which you
|
||||
can extract as root:
|
||||
|
||||
sudo tar -C /destination/of/extraction -xf images/rootfs.tar
|
||||
|
||||
Those image files are created using the contents of the target/
|
||||
directory, but there is a post-processing step to create device files
|
||||
and set owernship/permissions properly even if Buildroot does not run
|
||||
as root.
|
||||
31
firmware/buildroot/support/misc/toolchainfile.cmake.in
Normal file
31
firmware/buildroot/support/misc/toolchainfile.cmake.in
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# CMake toolchain file for Buildroot
|
||||
#
|
||||
|
||||
# In order to allow the toolchain to be relocated, we calculate the
|
||||
# HOST_DIR based on this file's location: $(HOST_DIR)/usr/share/buildroot
|
||||
# and store it in RELOCATED_HOST_DIR.
|
||||
# All the other variables that need to refer to HOST_DIR will use the
|
||||
# RELOCATED_HOST_DIR variable.
|
||||
string(REPLACE "/usr/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR @@CMAKE_SYSTEM_PROCESSOR@@)
|
||||
|
||||
set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@ ${CMAKE_C_FLAGS}" CACHE STRING "Buildroot CFLAGS")
|
||||
set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@ ${CMAKE_CXX_FLAGS}" CACHE STRING "Buildroot CXXFLAGS")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@ ${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Buildroot LDFLAGS")
|
||||
set(CMAKE_INSTALL_SO_NO_EXE 0)
|
||||
|
||||
set(CMAKE_PROGRAM_PATH "${RELOCATED_HOST_DIR}/usr/bin")
|
||||
set(CMAKE_FIND_ROOT_PATH "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
|
||||
|
||||
# This toolchain file can be used both inside and outside Buildroot.
|
||||
set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC@@")
|
||||
set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX@@")
|
||||
Reference in New Issue
Block a user