diff --git a/configs/seeed-debian-jessie-gcp-iot-v4.4.conf b/configs/seeed-debian-jessie-gcp-iot-v4.4.conf new file mode 100644 index 0000000000000000000000000000000000000000..d653c0110ad0dfe1ef1375a2b0be15d1fe4c47c5 --- /dev/null +++ b/configs/seeed-debian-jessie-gcp-iot-v4.4.conf @@ -0,0 +1,175 @@ +## +release="8.5" +image_type="seeed-gcp-iot" +## +##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} +## +##Debian Jessie armhf +## +deb_distribution="debian" +deb_codename="jessie" +deb_arch="armhf" +# +deb_include=" \ + alsa-utils \ + apache2 \ + apt-transport-https \ + autoconf \ + automake \ + avahi-daemon \ + bash-completion \ + bc \ + bison \ + bluetooth \ + build-essential \ + ca-certificates \ + connman \ + cpufrequtils \ + curl \ + debhelper \ + dosfstools \ + fakeroot \ + file \ + firmware-atheros \ + firmware-ralink \ + firmware-realtek \ + firmware-zd1211 \ + flex \ + gdb \ + git-core \ + hdparm \ + hexedit \ + hostapd \ + htop \ + i2c-tools \ + info \ + initramfs-tools \ + iperf \ + iw \ + libncurses5-dev \ + libnss-mdns \ + libtool \ + libdbus-1-dev \ + libnl-3-dev \ + libnl-genl-3-dev \ + libusb-1.0-0-dev \ + linux-base \ + locales \ + lshw \ + lsof \ + lzma \ + lzop \ + memtester \ + openssh-server \ + pkg-config \ + ppp \ + rfkill \ + rsync \ + screen \ + ssl-cert \ + sudo \ + systemd \ + tmux \ + u-boot-tools \ + udhcpd \ + usb-modeswitch \ + usbutils \ + v4l-utils \ + vim \ + wget \ + wireless-tools \ + wpasupplicant \ + wvdial \ +" + +# +deb_exclude="" +# +deb_components="main contrib non-free" +deb_mirror="" +## +##Some packages fail to install via debootstrap: deb_additional_pkgs="<comma|space>" +## +#python-2.7: due to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769106 +# +deb_additional_pkgs=" \ + libpython2.7-dev \ + lsb-release \ + mpg123 \ + nodejs \ + pastebinit \ + pulseaudio \ + pulseaudio-module-bluetooth \ + pylint \ + python-dbus \ + python-dev \ + python-flask \ + python-minimal \ + python-pip \ +" + +## +rfs_username="debian" +rfs_fullname="Demo User" +rfs_password="temppwd" +rfs_hostname="beaglebone" +rfs_startup_scripts="enable" +rfs_opt_scripts="https://github.com/RobertCNelson/boot-scripts" +rfs_default_desktop="" +rfs_desktop_background="" +rfs_default_locale="en_US.UTF-8" +rfs_etc_dogtag="BeagleBoard.org Debian Image" +rfs_console_banner="Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian" +rfs_console_user_pass="enable" +rfs_ssh_banner="Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian" +rfs_ssh_user_pass="enable" +## +##enable kernel repo: http://repos.rcn-ee.com/(debian|ubuntu) +repo_rcnee="enable" +repo_rcnee_pkg_list=" \ + am335x-pru-package \ + bb-cape-overlays \ + bb-customizations \ + bb-node-red-installer \ + bb-wl18xx-firmware \ + bone101 \ + bonescript \ + c9-core-installer \ + device-tree-compiler \ + doc-beaglebone-getting-started \ + doc-beaglebonegreen-getting-started \ + doc-seeed-bbgw-getting-started \ + gcp-iot-demo \ + haveged \ + libsoc-dev \ + libsoc2 \ + linux-headers-4.4.16-ti-r38 \ + linux-image-4.4.16-ti-r38 \ + rcn-ee-archive-keyring \ + rcnee-access-point \ + seeed-wificonfig-installer \ + ti-pru-cgt-installer \ + ti-wlconf \ + tiomapconf \ + upm \ + wifidog-gateway \ +" + +## +##nodejs: https://github.com/nodesource/distributions +repo_nodesource="node_0.12" +#repo_nodesource="node_4.x" +#repo_nodesource="node_5.x" +## +repo_rcnee_pkg_version="4.4.16-ti-r38" +include_firmware="enable" +# +chroot_COPY_SETUP_SDCARD="enable" +chroot_before_hook="" +chroot_after_hook="" +chroot_script="seeed-jessie.sh" +chroot_post_uenv_txt="" +chroot_tarball="enable" diff --git a/publish/rcn-ee_seeed-gcp-stable.sh b/publish/rcn-ee_seeed-gcp-stable.sh new file mode 100755 index 0000000000000000000000000000000000000000..e2731df10129f4061a52d1d6ea3592e80390fcd8 --- /dev/null +++ b/publish/rcn-ee_seeed-gcp-stable.sh @@ -0,0 +1,152 @@ +#!/bin/bash -e + +time=$(date +%Y-%m-%d) +mirror_dir="/var/www/html/rcn-ee.us/rootfs/bb.org/testing" +DIR="$PWD" + +git pull --no-edit https://github.com/beagleboard/image-builder master + +export apt_proxy=apt-proxy:3142/ + +if [ -d ./deploy ] ; then + sudo rm -rf ./deploy || true +fi + +./RootStock-NG.sh -c seeed-debian-jessie-gcp-iot-v4.4 + +debian_jessie_seeed_gcp_iot="debian-8.5-seeed-gcp-iot-armhf-${time}" + +archive="xz -z -8" + +beaglebone="--dtb beaglebone --bbb-old-bootloader-in-emmc \ +--rootfs_label rootfs --hostname beaglebone --enable-cape-universal" + +arduino_tre="--dtb am335x-arduino-tre --boot_label ARDUINO-TRE \ +--rootfs_label rootfs --hostname arduino-tre" + +omap5_uevm="--dtb omap5-uevm --rootfs_label rootfs --hostname omap5-uevm" +beagle_x15="--dtb am57xx-beagle-x15 --rootfs_label rootfs \ +--hostname BeagleBoard-X15" + +cat > ${DIR}/deploy/gift_wrap_final_images.sh <<-__EOF__ +#!/bin/bash + +copy_base_rootfs_to_mirror () { + if [ -d ${mirror_dir}/ ] ; then + if [ ! -d ${mirror_dir}/${time}/\${blend}/ ] ; then + mkdir -p ${mirror_dir}/${time}/\${blend}/ || true + fi + if [ -d ${mirror_dir}/${time}/\${blend}/ ] ; then + if [ ! -f ${mirror_dir}/${time}/\${blend}/\${base_rootfs}.tar.xz ] ; then + cp -v \${base_rootfs}.tar ${mirror_dir}/${time}/\${blend}/ + cd ${mirror_dir}/${time}/\${blend}/ + ${archive} \${base_rootfs}.tar && sha256sum \${base_rootfs}.tar.xz > \${base_rootfs}.tar.xz.sha256sum & + cd - + fi + fi + fi +} + +archive_base_rootfs () { + if [ -d ./\${base_rootfs} ] ; then + rm -rf \${base_rootfs} || true + fi + if [ -f \${base_rootfs}.tar ] ; then + copy_base_rootfs_to_mirror + fi +} + +extract_base_rootfs () { + if [ -d ./\${base_rootfs} ] ; then + rm -rf \${base_rootfs} || true + fi + + if [ -f \${base_rootfs}.tar.xz ] ; then + tar xf \${base_rootfs}.tar.xz + fi + + if [ -f \${base_rootfs}.tar ] ; then + tar xf \${base_rootfs}.tar + fi +} + +copy_img_to_mirror () { + if [ -d ${mirror_dir} ] ; then + if [ ! -d ${mirror_dir}/${time}/\${blend}/ ] ; then + mkdir -p ${mirror_dir}/${time}/\${blend}/ || true + fi + if [ -d ${mirror_dir}/${time}/\${blend}/ ] ; then + if [ -f \${wfile}.bmap ] ; then + mv -v \${wfile}.bmap ${mirror_dir}/${time}/\${blend}/ + sync + fi + if [ ! -f ${mirror_dir}/${time}/\${blend}/\${wfile}.img.zx ] ; then + mv -v \${wfile}.img ${mirror_dir}/${time}/\${blend}/ + sync + if [ -f \${wfile}.img.xz.job.txt ] ; then + mv -v \${wfile}.img.xz.job.txt ${mirror_dir}/${time}/\${blend}/ + sync + fi + cd ${mirror_dir}/${time}/\${blend}/ + ${archive} \${wfile}.img && sha256sum \${wfile}.img.xz > \${wfile}.img.xz.sha256sum & + cd - + fi + fi + fi +} + +archive_img () { + if [ -f \${wfile}.img ] ; then + if [ ! -f \${wfile}.bmap ] ; then + if [ -f /usr/bin/bmaptool ] ; then + bmaptool create -o \${wfile}.bmap \${wfile}.img + fi + fi + copy_img_to_mirror + fi +} + +generate_img () { + if [ -d \${base_rootfs}/ ] ; then + cd \${base_rootfs}/ + sudo ./setup_sdcard.sh \${options} + sudo chown \${SUDO_USER}:\${SUDO_USER} *.img || true + sudo chown \${SUDO_USER}:\${SUDO_USER} *.job.txt || true + mv *.img ../ || true + mv *.job.txt ../ || true + cd .. + fi +} + +###seeed gcp iot image +base_rootfs="${debian_jessie_seeed_gcp_iot}" ; blend="seeed-gcp-iot" ; extract_base_rootfs + +options="--img-4gb bone-\${base_rootfs} ${beaglebone}" ; generate_img +options="--img-4gb BBGW-blank-\${base_rootfs} ${beaglebone} --bbgw-flasher" ; generate_img + +###archive *.tar +base_rootfs="${debian_jessie_seeed_gcp_iot}" ; blend="seeed-gcp-iot" ; archive_base_rootfs + +###archive *.img +base_rootfs="${debian_jessie_seeed_gcp_iot}" ; blend="seeed-gcp-iot" + +wfile="bone-\${base_rootfs}-4gb" ; archive_img +wfile="BBGW-blank-\${base_rootfs}-4gb" ; archive_img + +__EOF__ + +chmod +x ${DIR}/deploy/gift_wrap_final_images.sh + +if [ ! -d /mnt/farm/images/ ] ; then + #nfs mount... + sudo mount -a +fi + +if [ -d /mnt/farm/images/ ] ; then + mkdir /mnt/farm/images/${time}/ + echo "Copying: *.tar to server: images/${time}/" + cp -v ${DIR}/deploy/*.tar /mnt/farm/images/${time}/ + cp -v ${DIR}/deploy/gift_wrap_final_images.sh /mnt/farm/images/${time}/gift_wrap_final_images.sh + chmod +x /mnt/farm/images/${time}/gift_wrap_final_images.sh +fi +