Skip to content

Commit

Permalink
ros: add hyrdo
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information
RobertCNelson committed Jan 13, 2015
1 parent 1bb0fe5 commit c54b192
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 5 deletions.
51 changes: 51 additions & 0 deletions configs/ros_hydro.conf
@@ -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"
10 changes: 5 additions & 5 deletions configs/ros_ubuntu.conf → configs/ros_indigo.conf
@@ -1,6 +1,6 @@
##
release="14.04.1"
image_type="ros"
image_type="ros-indigo"
##
##Debootstrap: https://wiki.debian.org/Debootstrap
##
Expand All @@ -27,10 +27,10 @@ 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="rcn-ee.net console Ubuntu Image"
rfs_console_banner="Support/FAQ: http://elinux.org/BeagleBoardUbuntu"
rfs_etc_dogtag="ROS Indigo Igloo"
rfs_console_banner=""
rfs_console_user_pass="enable"
rfs_ssh_banner="Support/FAQ: http://elinux.org/BeagleBoardUbuntu"
rfs_ssh_banner=""
rfs_ssh_user_pass="enable"
##
##enable kernel repo: http://repos.rcn-ee.net/(debian|ubuntu)
Expand All @@ -51,5 +51,5 @@ repo_external_pkg_list="ros-indigo-ros-base"
chroot_COPY_SETUP_SDCARD="enable"
chroot_before_hook=""
chroot_after_hook=""
chroot_script="ros.sh"
chroot_script="ros-indigo.sh"
chroot_tarball="enable"
File renamed without changes.
96 changes: 96 additions & 0 deletions target/chroot/ros-indigo.sh
@@ -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...

#

0 comments on commit c54b192

Please sign in to comment.