Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
Govinda-Fichtner committed Feb 18, 2015
0 parents commit 504ef38
Show file tree
Hide file tree
Showing 10 changed files with 8,991 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*~

# ignore vagrant box specific configuration
.vagrant/

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
50 changes: 50 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# this Vagrantfile only works with VirtualBox so we set the default provider here
# so we can skip the --provider virtualbox option
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox'

# use half of the available memory
def get_memory_setting(host)
divider = 2
if host =~ /darwin/
mem = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / divider
elsif host =~ /linux/
mem = `grep 'MemTotal' /proc/meminfo | sed -e 's/MemTotal://' -e 's/ kB//'`.to_i / 1024 / divider
else # Windows
mem = `for /F "tokens=2 delims==" %i in ('wmic computersystem get TotalPhysicalMemory /value') do @echo %i`.to_i / 1024 / 1024 / divider
end
return mem
end

def get_cpu_setting(host)
if host =~ /darwin/
cpus = `sysctl -n hw.ncpu`.to_i
elsif host =~ /linux/
cpus = `nproc`.to_i
else # Windows
cpus = `for /F "tokens=2 delims==" %i in ('wmic cpu get NumberOfCores /value') do @echo %i`.to_i
end
return cpus
end

Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
# a private network is needed for using NFS
config.vm.network :private_network, ip: '192.168.50.50'
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp']
# config.bindfs.bind_folder "/vagrant", "/vagrant"
config.vm.define "docker-raspbian" do |config|
config.vm.hostname = "docker-raspbian"
config.ssh.forward_agent = true
config.vm.provision "shell", path: "scripts/provision.sh", privileged: false
config.vm.provider "virtualbox" do |vb|
# find out on which host os we are running
host = RbConfig::CONFIG['host_os']
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.memory = get_memory_setting(host)
vb.cpus = get_cpu_setting(host)
end
end
end
4 changes: 4 additions & 0 deletions build_results/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
18 changes: 18 additions & 0 deletions debian/raspberrypi-bootloader.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh -e
FILES="bootcode.bin fixup.dat fixup_cd.dat fixup_x.dat kernel.img kernel7.img
kernel_cutdown.img kernel_emergency.img kernel7_emergency.img start.elf start_cd.elf start_x.elf"

printf "Memory split is now set in /boot/config.txt.\n"
printf "You may want to use raspi-config to set it\n"


for FN in $FILES; do
# Need to rm first to avoid error "rename involves overwriting ... with
# different file ..., not allowed
rm -f /boot/$FN
dpkg-divert --package rpikernelhack --remove --rename /boot/$FN
sync
done


#DEBHELPER#
13 changes: 13 additions & 0 deletions debian/raspberrypi-bootloader.preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh -e
FILES="bootcode.bin fixup.dat fixup_cd.dat fixup_x.dat kernel.img kernel7.img
kernel_cutdown.img kernel_emergency.img kernel7_emergency.img start.elf start_cd.elf start_x.elf"

# dpkg-divert will error out otherwise
mkdir -p /usr/share/rpikernelhack

for FN in $FILES; do
dpkg-divert --package rpikernelhack --divert /usr/share/rpikernelhack/$FN \
/boot/$FN
done

#DEBHELPER#
Loading

0 comments on commit 504ef38

Please sign in to comment.