ac100-tarball-installer-0.47/0000755000000000000000000000000012223006374012547 5ustar ac100-tarball-installer-0.47/debian/0000755000000000000000000000000012223006452013766 5ustar ac100-tarball-installer-0.47/debian/ac100-tarball-installer.postinst0000644000000000000000000000154512111401474022015 0ustar #!/bin/sh set -e apply_diversions() { DIR=/usr/share/initramfs-tools SUBDIRS="conf-hooks.d hooks scripts/local-bottom scripts/local-top scripts/init-top scripts/init-bottom scripts/panic" FILES="cryptsetup cryptgnupg cryptopenct cryptopensc cryptpassdev cryptroot plymouth" for file in $FILES; do for subdir in $SUBDIRS; do if [ -e $DIR/$subdir/$file ]; then diversion="$file.$(echo $subdir|sed -e 's/scripts\///'|sed -e 's/-/./').diverted" dpkg-divert --add --local --divert $DIR/$diversion --rename $DIR/$subdir/$file >/dev/null 2>&1 || true fi done done } if [ "$1" = "configure" ]; then # move bits out of the way that make our initrd to big apply_diversions fi #DEBHELPER# ac100-tarball-installer-0.47/debian/rules0000755000000000000000000000003612111401474015044 0ustar #! /usr/bin/make -f %: dh $@ ac100-tarball-installer-0.47/debian/install0000644000000000000000000000032212111401474015353 0ustar installer usr/share/initramfs-tools/scripts/ conf.d/ac100-installer etc/initramfs-tools/conf.d/ hooks/ac100-installer usr/share/initramfs-tools/hooks/ boot/bootimg.cfg-ac100 boot/ boot/bootimg.cfg-nexus7 boot/ ac100-tarball-installer-0.47/debian/copyright0000644000000000000000000000153412111401474015723 0ustar Copyright (c) 2011 Canonical Ltd. Author: Oliver Grawert These programs are free software; you can redistribute and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. These programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License with your Ubuntu system, in /usr/share/common-licenses/GPL-2, or with the ac100-tarball-installer source package as the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ac100-tarball-installer-0.47/debian/source/0000755000000000000000000000000012112700704015264 5ustar ac100-tarball-installer-0.47/debian/source/format0000644000000000000000000000001512111401474016474 0ustar 3.0 (native) ac100-tarball-installer-0.47/debian/compat0000644000000000000000000000000212111401474015163 0ustar 9 ac100-tarball-installer-0.47/debian/control0000644000000000000000000000174712223006305015377 0ustar Source: ac100-tarball-installer Section: devel Priority: optional Build-Depends: debhelper (>= 9) Maintainer: Oliver Grawert Standards-Version: 3.9.4 Homepage: https://launchpad.net/ac100 Package: ac100-tarball-installer Architecture: armhf Depends: ${misc:Depends}, initramfs-tools, util-linux (>= 2.17.2), coreutils (>= 8.5), tar (>= 1.25), flash-kernel, abootimg, parted, oem-config Description: Installer script to put the ac100 rootfs tarball in place This initramfs script detects the matching rootfs tarball on attached external disk devices, autodetects if it should unpack to internal or external target, formats the target partition and unpacks the tarball. . Subsequently the basic hardware configuration of the system is done, and a reboot into an oem-config session is triggered. . Do not use this package on normal systems; it is solely for creating initrd-based tarball installer images and requires accompanying changes in the used image build system. ac100-tarball-installer-0.47/debian/changelog0000644000000000000000000002707512223006452015653 0ustar ac100-tarball-installer (0.47) saucy; urgency=low * Set Architecture to armhf rather than all; this package will only work on armhf anyway, and is uninstallable on other architectures since flash-kernel is missing there. -- Colin Watson Wed, 02 Oct 2013 13:10:17 +0100 ac100-tarball-installer (0.46) raring; urgency=low * add a workaround for (LP: #1164071) (hardcode FRAMEBUFFER=Y into the initrd so plymouth does not freak out on boot) * quieten update-initramfs so it doesnt show a df warning when generating the initrd -- Oliver Grawert Thu, 04 Apr 2013 15:49:07 +0200 ac100-tarball-installer (0.45) raring; urgency=low * Copy across wifi settings if available. -- Dmitrijs Ledkovs Mon, 25 Feb 2013 15:22:29 +0000 ac100-tarball-installer (0.44) raring; urgency=low * roll back the preservation of modification times so the installer produces usable installs (re-opening bug 1109197) -- Oliver Grawert Fri, 08 Feb 2013 14:47:50 +0100 ac100-tarball-installer (0.43) raring; urgency=low * Ignore timestamp errors, not to spam users. Fallout from fixing (LP: #1109197). * Bump standards version & fix a couple minor lintian tags. -- Dmitrijs Ledkovs Wed, 30 Jan 2013 17:39:50 +0000 ac100-tarball-installer (0.42) raring; urgency=low * Remove redundant 'apt-get install abootimg' from flash-kernel path. -- Adam Conrad Wed, 30 Jan 2013 01:52:21 -0700 ac100-tarball-installer (0.41) raring; urgency=low * Aaaaand, fix the same bug in the nexus7 codepath too (LP: #1109197) -- Adam Conrad Tue, 29 Jan 2013 16:00:01 -0700 ac100-tarball-installer (0.40) raring; urgency=low * Preserve modification times when unpacking the root tarball (LP: #1109197) * Call tar with long option names to avoid my eyes crossing at the source. -- Adam Conrad Tue, 29 Jan 2013 12:12:46 -0700 ac100-tarball-installer (0.39) raring; urgency=low * drop framebuffer console rotation from nexus7 images, we boot in portrait now. -- Oliver Grawert Tue, 29 Jan 2013 12:45:28 +0100 ac100-tarball-installer (0.38) raring; urgency=low * add support for preseed.cfg files for nexus7 installs, either drop a file called /preseed.cfg next to rootfs.tar.gz in the rootfs image or make sure it ends up in / in the initramfs, both locations are checked and the file is processed. the initrd file overrides the file in the rootfs image if both exist -- Oliver Grawert Wed, 23 Jan 2013 16:01:25 +0100 ac100-tarball-installer (0.37) raring; urgency=low * set access=m2 on the nexus7 commandline, that will make onboard the default a11y tool instead of orca -- Oliver Grawert Tue, 27 Nov 2012 13:34:44 +0100 ac100-tarball-installer (0.36) raring; urgency=low * actually include abootimg in the initramfs if we want to use it (LP: #1079729) * add commented code for UUID generation for later use -- Oliver Grawert Fri, 23 Nov 2012 21:43:42 +0100 ac100-tarball-installer (0.35) raring; urgency=low * drop the stripping code for nexus7 tarballs completely * add detection of the largest partition, make sure this is used for /root and on the kernel cmdline to enable nexus7 32G+3G models (LP: #1079729) * improve uuid detection -- Oliver Grawert Thu, 22 Nov 2012 14:11:22 +0100 ac100-tarball-installer (0.34) raring; urgency=low * use -$SUBARCH extension as well for the ac100 bootimg.cfg * copy /media-info to /var/log/installer/ if it exists in the initramfs (LP: #1080747) * disable the tarball structure check, it is slow and of no use with official ubuntu rootfs tarballs since there are no prefix dirs to strip -- Oliver Grawert Thu, 22 Nov 2012 01:10:04 +0100 ac100-tarball-installer (0.33) raring; urgency=low * point to console=tty0 instead of tty1, plymouth seems to get along better with that -- Oliver Grawert Wed, 21 Nov 2012 14:30:20 +0100 ac100-tarball-installer (0.32) raring; urgency=low * do not unmount /root after unpacking teh nexus7 tarball, so teh boot can just move on -- Oliver Grawert Wed, 21 Nov 2012 14:18:47 +0100 ac100-tarball-installer (0.31) raring; urgency=low * add nexus7 booting.cfg file -- Oliver Grawert Tue, 20 Nov 2012 12:51:06 +0100 ac100-tarball-installer (0.30) raring; urgency=low * add support for nexus7 tarball installations (generic renaming of the package pending) -- Oliver Grawert Wed, 14 Nov 2012 12:18:08 +0100 ac100-tarball-installer (0.29) quantal; urgency=low * drop updating of the boot image name, it was already set correctly at build time * change the time estimate message for unpacking the tarball from "30 minutes" to a more fuzzy message (in the majority of cases this is done in 5 minutes) -- Oliver Grawert Thu, 19 Jul 2012 14:22:57 +0200 ac100-tarball-installer (0.28) quantal; urgency=low * make sure virtual filesystems are always mounted when chrooting * add missing chroot calls to abootimg commands in new bootloader setup code -- Oliver Grawert Tue, 17 Jul 2012 10:49:33 +0200 ac100-tarball-installer (0.27) quantal; urgency=low * switch all initrds to lzma compression to overcome corruption due to oversizedness -- Oliver Grawert Mon, 16 Jul 2012 17:37:35 +0200 ac100-tarball-installer (0.26) quantal; urgency=low * better use console=tty0 on the kernel commandline -- Oliver Grawert Mon, 16 Jul 2012 17:14:06 +0200 ac100-tarball-installer (0.25) quantal; urgency=low * fix typos in the mem= kernel option -- Oliver Grawert Fri, 13 Jul 2012 17:50:28 +0200 ac100-tarball-installer (0.24) quantal; urgency=low * update the bootimg creation config for live-build to match the new cmdline defaults * we dont want to keep bootimg.cfg around after we are removed, make it a regular file (instead of something created by a postinst) so it gets removed with the package -- Oliver Grawert Wed, 11 Jul 2012 16:36:58 +0200 ac100-tarball-installer (0.23) quantal; urgency=low * completely rewrite the initial bootloader setup to: - match the new flash-kernel 3.0 behavior of not using a config file for android bootimages anymore - detect the boot partition on the internal MMC fully automatic - use an existing tegrapart cmdline option from the device if it exists - default to use console=tty1 to work around current console issues with 3.1 kernels - default to use mem=512M@0M on the kernel commandline -- Oliver Grawert Wed, 11 Jul 2012 16:21:40 +0200 ac100-tarball-installer (0.22ubuntu1) quantal; urgency=low * Fix "notmal" typo in /debian/control (among other grammatical fixes) (LP: #848188) -- Logan Mon, 21 May 2012 03:16:29 -0400 ac100-tarball-installer (0.22) precise; urgency=low * make USB disks work as install targets (LP: #856278) -- Oliver Grawert Mon, 19 Mar 2012 16:51:45 +0100 ac100-tarball-installer (0.21) precise; urgency=low * And actually remove zram.conf stuff from debian/install too. -- Adam Conrad Wed, 25 Jan 2012 22:59:41 -0700 ac100-tarball-installer (0.20) precise; urgency=low * Remove zram.conf hackery, now moved to its own package. -- Adam Conrad Wed, 25 Jan 2012 22:33:42 -0700 ac100-tarball-installer (0.19) precise; urgency=low * zram modules options changed in 3.0, adjust the upstart job to use zram_num_devices instead of just num_devices -- Oliver Grawert Sun, 18 Dec 2011 11:10:17 +0100 ac100-tarball-installer (0.18) precise; urgency=low * Make sure to copy the zram config before we delete it. -- Adam Conrad Wed, 14 Dec 2011 13:58:27 -0700 ac100-tarball-installer (0.17) oneiric; urgency=low * No longer pass lp0_vec parameter to the kernel, it is not needed and it the cause of resume failing on various models. -- Jani Monoses Mon, 03 Oct 2011 17:26:14 +0300 ac100-tarball-installer (0.16) oneiric; urgency=low * Get rid of EXT3/EXT2 mount warning by mounting with the right type. -- Adam Conrad Wed, 28 Sep 2011 14:21:13 -0600 ac100-tarball-installer (0.15) oneiric; urgency=low * add upstart zram.conf job, so we prevent OOM through virtual swap (LP: #861322) -- Oliver Grawert Wed, 28 Sep 2011 13:21:36 +0200 ac100-tarball-installer (0.14) oneiric; urgency=low * change the code that searches the tarball to not fail if there is no tarball on the first device, only fail if we scanned all devices. -- Oliver Grawert Tue, 13 Sep 2011 19:40:44 +0200 ac100-tarball-installer (0.13) oneiric; urgency=low * drop data=ordered from fstab -- Oliver Grawert Mon, 12 Sep 2011 11:22:20 +0200 ac100-tarball-installer (0.12) oneiric; urgency=low * rename the $filesys variable in first_partition_has_tarball so it doesnt clash with the $filesys variable for format_target -- Oliver Grawert Mon, 12 Sep 2011 11:15:19 +0200 ac100-tarball-installer (0.11) oneiric; urgency=low * drop the external dependency on find and use busybox find instead -- Oliver Grawert Thu, 08 Sep 2011 15:35:55 +0200 ac100-tarball-installer (0.10) oneiric; urgency=low * install the local installer config to /etc, not to /usr -- Oliver Grawert Thu, 08 Sep 2011 13:25:42 +0200 ac100-tarball-installer (0.9) oneiric; urgency=low * fix typos and some message phrasing -- Oliver Grawert Wed, 07 Sep 2011 12:12:33 +0200 ac100-tarball-installer (0.8) oneiric; urgency=low * use find command based on bytesize to find the tarball on the source media since we cant use the actual name that was given during build at md5sum time. -- Oliver Grawert Wed, 07 Sep 2011 12:02:33 +0200 ac100-tarball-installer (0.7) oneiric; urgency=low * actually apply the diversions -- Oliver Grawert Fri, 26 Aug 2011 11:10:00 +0200 ac100-tarball-installer (0.6) oneiric; urgency=low * make sure oem-config is actually enabled after unpacking the tarball -- Oliver Grawert Thu, 25 Aug 2011 01:39:13 +0200 ac100-tarball-installer (0.5) oneiric; urgency=low * add dependency on oem-config * move diversion handling out of the installer script -- Oliver Grawert Thu, 25 Aug 2011 00:35:50 +0200 ac100-tarball-installer (0.4) oneiric; urgency=low * make sure there is a /boot/bootimg.cfg in place, else abootimg fails. -- Oliver Grawert Thu, 18 Aug 2011 14:40:28 +0200 ac100-tarball-installer (0.3) oneiric; urgency=low * make sure parted is actually there if we want to copy_exec it (add parted dependency) -- Oliver Grawert Tue, 16 Aug 2011 19:32:31 +0200 ac100-tarball-installer (0.2) oneiric; urgency=low * add initramfs hook that actually puts the installer and the needed binaries in place (warn if there is no md5 for the tarball) * switch to MODULES=list, "dep" breaks on the buildds -- Oliver Grawert Tue, 16 Aug 2011 17:24:09 +0200 ac100-tarball-installer (0.1) oneiric; urgency=low * Initial release. (closes LP: #825212) -- Oliver Grawert Fri, 12 Aug 2011 15:00:15 +0200 ac100-tarball-installer-0.47/installer0000644000000000000000000002153112127302317014470 0ustar targetpart="" sourcepart="" sourcedisk="" needs_partitioning="" checksum_file="/installer.md5" size_file="/installer.size" tarball="" checksum="" tarsize="" tempdir=$(mktemp -d) current_root=$(mount|grep "on / "|cut -d" " -f1) volid="" filesys="ext4" error() { echo "Error: ${1}" panic "Spawning a shell within the initramfs" reboot } get_checksum() { [ -e $checksum_file ] || error "Checksum file missing" checksum="$(cat ${checksum_file}|sed -e 's/ .*//')" [ -e $size_file ] || error "Size file missing" tarsize="$(cat ${size_file}|sed -e 's/ .*//')c" } blockdev_exists() { if [ -d /sys/block/${1} ];then return 0 fi return 1 } first_partition_has_tarball() { disk=$1 part="" # default partitions to look at for respective devices case $disk in sda) part="/dev/sda1" ;; mmcblk1) part="/dev/mmcblk1p1" ;; esac # make sure we are not mounted before checking if grep -q $part /proc/mounts;then umount $part fi # check if we have the right tarball fs=$(blkid -o value $part | tail -1) mount -t $fs $part $tempdir >/dev/null 2>&1 findings=$(find $tempdir -type f -regex .*tar.gz$ -size $tarsize) if [ -n "$findings" ] && [ -e "$findings" ]; then tarball=$(basename $findings) sourcepart=$part sourcedisk=$disk echo "Found $tarball on $part" verify_tarball $tempdir/$tarball return 0 else if grep -q $part /proc/mounts;then umount $part fi fi return 1 } verify_tarball() { path=$1 tarball=$(basename $path) echo -n "Verifying $tarball please wait ... " mysum=$(md5sum $path|cut -d " " -f1) if [ "${mysum}" != "${checksum}" ]; then echo "failed." error "Checksum does not match, please get a matching tarball and .bootimg" fi echo "done." } find_tarball() { for disk in sda mmcblk1; do if blockdev_exists $disk && first_partition_has_tarball $disk;then break fi done [ -n "${sourcepart}" ] || return 1 } find_biggest_internal_part() { dev=$1 if blockdev_exists;then oldpart=0 for partsize in $(ls /sys/block/${dev}/${dev}p?*/size);do partition=$(basename $(echo $partsize|sed -e 's/\/size//')) size=$(( $(cat $partsize) /2)) if [ $size -gt $oldpart ];then oldpart=$size targetpart=$partition fi done else error "Can not find usable partitions on ${1}" fi } find_source_and_target_devices() { # what do we want to install ? get_checksum # look if the rootfs is available find_tarball || error "No tarball found" # check if we have possible external target devices for file in $(ls -d /sys/block/*);do device=$(basename $file) if [ "${device}" != "${sourcedisk}" ];then case $device in mmcblk1) targetpart=${device}p1 needs_partitioning=$device ;; sd[a-z]*) targetpart=${device}1 needs_partitioning=$device ;; esac fi done # no external devices, find biggest internal partition if [ -z "${targetpart}" ] ; then find_biggest_internal_part mmcblk0 fi # if we failed with that as well, return false [ -z "${targetpart}" ] && return 1 return 0 } unmount_target() { device=$1 [ "${device}" != "${current_root}" ] || error "$device is current root device, can not install to it" if mount | grep -q $device;then umount $device || error "Target partition $device can not be unmounted" fi } mount_target() { device=$1 mount -t $filesys $device /root || error "Target partition $device can not be mounted" } format_target() { unmount_target /dev/$targetpart [ -z "${needs_partitioning}" ] || partition_target_dev echo -n "Formatting /dev/$targetpart ... " mkfs.$filesys /dev/$targetpart >/dev/null 2>&1 volid=$(blkid |grep ${targetpart}|awk '{print $2}'|tr -d [\"]) echo "done." } partition_target_dev() { device=$needs_partitioning size=$(($(($(cat /sys/block/$device/size)/2))/1000)) echo -n "Creating /dev/$targetpart on $device ... " parted -s /dev/$device mklabel msdos >/dev/null 2>&1 parted -s -a optimal /dev/$device mkpart primary 4 $size >/dev/null 2>&1 echo "done." } unpack_tarball() { mount_target /dev/$targetpart echo -n "Unpacking filesystem to /dev/$targetpart, please wait (this can take several minutes) ... " [ -e $tempdir/$tarball ] && zcat $tempdir/$tarball | \ tar --extract --numeric-owner --touch --directory /root echo "done." } create_fstab() { [ -e /root/etc/fstab ] || error "File /root/etc/fstab is missing, is /root mounted ?" echo "none /proc proc nodev,noexec,nosuid 0 0" >/root/etc/fstab echo "$volid / $filesys defaults,noatime,nodiratime 0 1" >>/root/etc/fstab } mount_vfs() { mount --bind /dev /root/dev chroot /root mount -t proc proc /proc chroot /root mount -t sysfs sys /sys } umount_vfs() { umount /root/proc umount /root/sys umount /root/dev } create_bootconfig() { DEVICE=$(basename /dev/mmcblk0) # if /sys/bus/mmc0\:0001/manfid = 0x000002 #TEGRAPART="tegrapart=recovery:700:a00:800,boot:1100:1000:800,mbr:2100:200:800" # if manfid = 0x000011 TEGRAPART="tegrapart=recovery:300:a00:800,boot:d00:1000:800,mbr:1d00:200:800" MAX_SIZE=-1 CMDLINE_DEFAULTS="mem=512M@0 root=$volid console=tty0 ro quiet splash" mount_vfs find_boot_part() { PART="" for partition in $(cat /proc/partitions |grep ${1}p|sed -e 's/^[0-9 ]*//'); do SIZE=$(chroot /root abootimg -i /dev/$partition 2>/dev/null|sed -rn 's/^\* image size = ([0-9]+) bytes.*/\1/p') if [ -n "$SIZE" ] && [ "$SIZE" -gt "$MAX_SIZE" ]; then PART="/dev/$partition" fi done echo $PART } find_tegrapart_option() { for option in $(chroot /root abootimg -i $1|sed -rn 's/^\* cmdline = ()/\1/p'); do case $option in tegrapart*) TEGRAPART="$option" ;; esac done echo $TEGRAPART } TGP=$(find_tegrapart_option $(find_boot_part $DEVICE)) CMDLINE="$TGP $CMDLINE_DEFAULTS" chroot /root abootimg -u $(find_boot_part $DEVICE) -c "cmdline=$CMDLINE" echo "MODULES=dep" >/root/usr/share/initramfs-tools/conf.d/ac100 echo "COMPRESS=lzma" >>/root/usr/share/initramfs-tools/conf.d/ac100 umount_vfs } confirm_proceeding() { while true do clear echo "Ubuntu AC100 Tarball Installer" echo case $targetpart in mmcblk1*|sd?*) echo "The installer detected that it will install to an external device," echo "if you instead want to install to the internal MMC, please remove" echo "/dev/$targetpart and reboot with keeping $sourcepart plugged in." echo ;; esac echo "If you enter Y below, all data on /dev/$targetpart will be destroyed" echo "and Ubuntu will be installed on it. Entering N will reboot." echo read -p "Are you sure you want to proceed? [y/n] " answer case $answer in [yY]* ) return 0 ;; [nN]* ) echo "Rebooting ..." reboot ;; * ) echo "Please enter Y or N" ;; esac done } flash_kernel() { mount_vfs # Workaround for (LP: #1084063 and #1164071) [ -e /root/etc/initramfs-tools/conf.d/framebuffer ] || echo "FRAMEBUFFER=Y" >/root/etc/initramfs-tools/conf.d/framebuffer # make sure we remove ourself first chroot /root dpkg --purge ac100-tarball-installer chroot /root update-initramfs -u 2>/dev/null [ -e /root/var/lib/oem-config/run ] || touch /root/var/lib/oem-config/run umount_vfs } apply_preseed() { [ -e /preseed.cfg ] && cp /preseed.cfg /root/preseed.cfg if [ -e /root/preseed.cfg ]; then mount_vfs chroot /root debconf-set-selections /preseed.cfg umount_vfs fi if [ -e /wifi.cfg ]; then target=/root/etc/NetworkManager/system-connections/active_ws_connection.conf cp /wifi.cfg $target chmod 600 $target fi } nexus7_install() { ROOTDEVICE=$(grep mmcblk0p /proc/partitions | sort -gr -k3 |awk 'NR == 1 {print $4}') ROOTPART=/dev/$ROOTDEVICE TARBALL=/root/rootfs.tar.gz #tune2fs -U $(uuidgen) ${ROOTPART} volid=$(blkid -o value -s UUID $ROOTPART) mount_target $ROOTPART clear [ -e $TARBALL ] || error "No tarball found on $ROOTPART, did you use the right rootfs.img ?" if ! $(grep -qs $ROOTPART /proc/cmdline); then abootimg -u /dev/mmcblk0p2 -c "cmdline=root=$ROOTPART ro console=tty1 fbcon=rotate:1 quiet" echo -n "Rebooting device with updated kernel commandline pointing to $ROOTPART for the filesystem" sleep 3 reboot fi echo -n "Preparing the root filesystem, please wait, this will take a few minutes ... " zcat $TARBALL | tar --extract --numeric-owner --touch --directory /root echo "done." create_fstab flash_kernel apply_preseed rm $TARBALL mkdir -p /root/var/log/installer cp /media-info /root/var/log/installer/ } ac100_install() { clear sleep 8 find_source_and_target_devices || error "No target device found" confirm_proceeding format_target && unpack_tarball && create_fstab && create_bootconfig && flash_kernel for dir in $tempdir /root/dev /root/proc; do if mount | grep -q $dir;then umount $dir fi done rm -rf $tempdir echo "Rebooting into configuration session ..." sleep 3 reboot } mountroot() { hardware=$(cat /proc/cpuinfo |grep "^Hardware"|sed 's/^.*: //') case "$hardware" in grouper) nexus7_install ;; *) ac100_install ;; esac } ac100-tarball-installer-0.47/conf.d/0000755000000000000000000000000012112700704013711 5ustar ac100-tarball-installer-0.47/conf.d/ac100-installer0000644000000000000000000000005212111401474016431 0ustar MODULES=list BOOT=installer COMPRESS=lzma ac100-tarball-installer-0.47/boot/0000755000000000000000000000000012112700704013505 5ustar ac100-tarball-installer-0.47/boot/bootimg.cfg-nexus70000644000000000000000000000034012111401474017053 0ustar bootsize = 0x800000 pagesize = 0x800 kerneladdr = 0x10008000 ramdiskaddr = 0x11000000 secondaddr = 0x10f00000 tagsaddr = 0x10000100 name = Ubuntu Boot Img cmdline = root=/dev/mmcblk0p9 ro console=tty0 access=m2 quiet splash ac100-tarball-installer-0.47/boot/bootimg.cfg-ac1000000644000000000000000000000044012111401474016427 0ustar bootsize = 0x800000 pagesize = 0x800 kerneladdr = 0x10008000 ramdiskaddr = 0x12000000 secondaddr = 0x10f00000 tagsaddr = 0x10000100 name = Ubuntu Boot Img cmdline = mem=512M@0 tegrapart=recovery:300:a00:800,boot:d00:1000:800,mbr:1d00:200:800 console=tty0 root=/dev/mmcblk0p7 quiet splash ac100-tarball-installer-0.47/hooks/0000755000000000000000000000000012112700704013665 5ustar ac100-tarball-installer-0.47/hooks/ac100-installer0000755000000000000000000000106112111401474016411 0ustar #!/bin/sh set -e PREREQ="" prereqs() { echo "${PREREQ}" } case "${1}" in prereqs) prereqs exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions manual_add_modules vfat copy_exec /usr/bin/md5sum /bin copy_exec /bin/tar /bin copy_exec /sbin/parted /sbin copy_exec /sbin/mkfs.ext4 /sbin copy_exec /usr/bin/abootimg /bin copy_exec /installer.md5 / || echo 'Warning: no tarball md5sum file found !' copy_exec /installer.size / || echo 'Warning: no tarball .size file found !' copy_exec /media-info / || echo 'Warning: no media-info file found !'