Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
- Loading branch information
1 parent
1bb0fe5
commit c54b192
Showing
4 changed files
with
152 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## | ||
release="12.04.5" | ||
image_type="ros-hydro" | ||
## | ||
##Debootstrap: https://wiki.debian.org/Debootstrap | ||
## | ||
##debootstrap --arch=${deb_arch} --include=${deb_include} --exclude=${deb_exclude} \ | ||
##--components=${deb_components} --foreign ${deb_codename} /tmp/tmp.dir/ http://${deb_mirror} | ||
## | ||
## | ||
deb_distribution="ubuntu" | ||
deb_codename="precise" | ||
deb_arch="armhf" | ||
deb_include="git-core,initramfs-tools,linux-base,locales,sudo,wget ca-certificates nano pastebinit file lsb-release bsdmainutils i2c-tools fbset hexedit hdparm memtester read-edid acpid dosfstools cpufrequtils ntpdate ppp usb-modeswitch usbutils apache2 openssh-server udhcpd avahi-daemon wireless-tools wpasupplicant lowpan-tools wvdial lshw hostapd rsync devmem2 linux-firmware" | ||
deb_exclude="" | ||
deb_components="main universe multiverse" | ||
deb_mirror="" | ||
## | ||
##Some packages fail to install via debootstrap: deb_additional_pkgs="<comma|space>" | ||
## | ||
deb_additional_pkgs="" | ||
## | ||
rfs_username="ubuntu" | ||
rfs_fullname="Demo User" | ||
rfs_password="temppwd" | ||
rfs_hostname="arm" | ||
rfs_startup_scripts="enable" | ||
rfs_opt_scripts="https://github.com/RobertCNelson/boot-scripts" | ||
rfs_default_locale="en_US.UTF-8" | ||
rfs_etc_dogtag="ROS Hydro Medusa" | ||
rfs_console_banner="" | ||
rfs_console_user_pass="enable" | ||
rfs_ssh_banner="" | ||
rfs_ssh_user_pass="enable" | ||
## | ||
kernel_url="https://rcn-ee.net/deb/precise-armhf/v3.8.13-bone69/" | ||
include_firmware="enable" | ||
# | ||
repo_external="enable" | ||
repo_external_arch="armhf" | ||
repo_external_server="http://packages.namniart.com/repos/ros" | ||
repo_external_dist="precise" | ||
repo_external_components="main" | ||
repo_external_key="packages.namniart.com-archive-keyring.asc" | ||
repo_external_pkg_list="ros-hydro-ros-base" | ||
# | ||
chroot_COPY_SETUP_SDCARD="enable" | ||
chroot_before_hook="" | ||
chroot_after_hook="" | ||
chroot_script="ros-hydro.sh" | ||
chroot_tarball="enable" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0
target/chroot/ros.sh → target/chroot/ros-hydro.sh
100644 → 100755
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#!/bin/sh -e | ||
# | ||
# Copyright (c) 2014 Robert Nelson <robertcnelson@gmail.com> | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
|
||
export LC_ALL=C | ||
|
||
#contains: rfs_username, release_date | ||
if [ -f /etc/rcn-ee.conf ] ; then | ||
. /etc/rcn-ee.conf | ||
fi | ||
|
||
if [ -f /etc/oib.project ] ; then | ||
. /etc/oib.project | ||
fi | ||
|
||
export HOME=/home/${rfs_username} | ||
export USER=${rfs_username} | ||
export USERNAME=${rfs_username} | ||
|
||
echo "env: [`env`]" | ||
|
||
is_this_qemu () { | ||
unset warn_qemu_will_fail | ||
if [ -f /usr/bin/qemu-arm-static ] ; then | ||
warn_qemu_will_fail=1 | ||
fi | ||
} | ||
|
||
qemu_warning () { | ||
if [ "${warn_qemu_will_fail}" ] ; then | ||
echo "Log: (chroot) Warning, qemu can fail here... (run on real armv7l hardware for production images)" | ||
echo "Log: (chroot): [${qemu_command}]" | ||
fi | ||
} | ||
|
||
git_clone () { | ||
mkdir -p ${git_target_dir} || true | ||
qemu_command="git clone ${git_repo} ${git_target_dir} --depth 1 || true" | ||
qemu_warning | ||
git clone ${git_repo} ${git_target_dir} --depth 1 || true | ||
sync | ||
echo "${git_target_dir} : ${git_repo}" >> /opt/source/list.txt | ||
} | ||
|
||
git_clone_branch () { | ||
mkdir -p ${git_target_dir} || true | ||
qemu_command="git clone -b ${git_branch} ${git_repo} ${git_target_dir} --depth 1 || true" | ||
qemu_warning | ||
git clone -b ${git_branch} ${git_repo} ${git_target_dir} --depth 1 || true | ||
sync | ||
echo "${git_target_dir} : ${git_repo}" >> /opt/source/list.txt | ||
} | ||
|
||
git_clone_full () { | ||
mkdir -p ${git_target_dir} || true | ||
qemu_command="git clone ${git_repo} ${git_target_dir} || true" | ||
qemu_warning | ||
git clone ${git_repo} ${git_target_dir} || true | ||
sync | ||
echo "${git_target_dir} : ${git_repo}" >> /opt/source/list.txt | ||
} | ||
|
||
cleanup_npm_cache () { | ||
if [ -d /root/tmp/ ] ; then | ||
rm -rf /root/tmp/ || true | ||
fi | ||
|
||
if [ -d /root/.npm ] ; then | ||
rm -rf /root/.npm || true | ||
fi | ||
} | ||
|
||
#custom functions... | ||
|
||
is_this_qemu | ||
#call your functions... | ||
|
||
# |