jasper-initramfs/0000775000000000000000000000000011743722006011226 5ustar jasper-initramfs/apt/0000775000000000000000000000000011743722006012012 5ustar jasper-initramfs/apt/enable_additional_repos.py0000775000000000000000000000042211743722006017213 0ustar #! /usr/bin/python import aptsources.distro from aptsources.sourceslist import SourcesList, SourceEntry list=SourcesList() distro=aptsources.distro.get_distro() distro.get_sources(list) distro.enable_component("universe") distro.enable_component("multiverse") list.save() jasper-initramfs/debian/0000775000000000000000000000000011743722573012461 5ustar jasper-initramfs/debian/jasper.install0000664000000000000000000000025011743722006015321 0ustar scripts usr/share/initramfs-tools/ hooks usr/share/initramfs-tools/ init usr/share/jasper-initramfs/ apt usr/share/jasper-initramfs/ sysctl usr/share/jasper-initramfs/ jasper-initramfs/debian/jasper.triggers0000664000000000000000000000003211743722006015477 0ustar activate update-initramfs jasper-initramfs/debian/compat0000664000000000000000000000000211743722006013646 0ustar 7 jasper-initramfs/debian/source/0000775000000000000000000000000011743722006013750 5ustar jasper-initramfs/debian/source/format0000664000000000000000000000001511743722006015157 0ustar 3.0 (native) jasper-initramfs/debian/changelog0000664000000000000000000004427311743722573014345 0ustar jasper-initramfs (0.69) precise; urgency=low * Change default /proc mount options to mirror what's used by other installers, and tidy up header as well (LP: #985309) -- Adam Conrad Wed, 18 Apr 2012 23:39:54 -0600 jasper-initramfs (0.68) precise; urgency=low * add support for local preseed files (LP: #803752) -- Oliver Grawert Fri, 13 Jan 2012 12:14:58 +0100 jasper-initramfs (0.67) precise; urgency=low * remove TI PPA stuff, it is handled via the ti-omap4-ppa package in precise -- Oliver Grawert Mon, 09 Jan 2012 15:50:18 +0100 jasper-initramfs (0.66) oneiric; urgency=low * Point ppa/ti-omap4-ppa.list to oneiric instead of natty. -- Adam Conrad Wed, 05 Oct 2011 23:48:18 -0600 jasper-initramfs (0.65) oneiric; urgency=low * Rewrite the enable_omap4_ppa() function in jasper_setup: - Improve readability and maintainability a bit with split lines - Fix a minor bug where the whole installer stopped functioning because we were trying to act on files that didn't exist. -- Adam Conrad Sun, 02 Oct 2011 16:18:57 -0600 jasper-initramfs (0.64) oneiric; urgency=low * switch the TI PPA installer from gnome-open to xdg-open * move to dconf for adding the TI icon to favorites -- Oliver Grawert Thu, 29 Sep 2011 22:28:19 +0200 jasper-initramfs (0.63) oneiric; urgency=low * scripts/local-premount/jasper_growroot: Set the VFAT partition's label to SERVICEV001 to hide it from automounting tools. We do this at install time rather than image-creation time, so that users can more easily mangle their boot setup before installation. * scripts/local-premount/jasper_growroot: Fix up two spots where we were logging to console/plymouth but not to the filesystem. -- Adam Conrad Wed, 28 Sep 2011 13:24:34 -0600 jasper-initramfs (0.62) oneiric; urgency=low * Change the sfdisk grep in jasper_growroot to actually find the root partition based on a string that might actually match. -- Adam Conrad Tue, 20 Sep 2011 22:29:58 -0600 jasper-initramfs (0.61) oneiric; urgency=low * Set up correct partition numbers and uboot script for MX53 -- Jani Monoses Tue, 20 Sep 2011 22:22:49 +0300 jasper-initramfs (0.60) oneiric; urgency=low * ROOTPART refers to the name of the device node, not the full path, so fix up our querying it to actually find it correctly. * Switch from using fstype to blkid while fixing the above. -- Adam Conrad Mon, 19 Sep 2011 18:49:06 -0600 jasper-initramfs (0.59) oneiric; urgency=low * Use klibc's fstype binary to autodetect our root FS mount options. -- Adam Conrad Mon, 19 Sep 2011 14:18:50 -0600 jasper-initramfs (0.58) oneiric; urgency=low * scripts/local-premount/jasper_growroot: We do not touch the VFAT partition while resizing so do not save and restore its contents. Resize EXT3 partition by only changing its size field to empty in the partition table dump provided by sfdisk and feeding this back to sfdisk. -- Jani Monoses Wed, 14 Sep 2011 23:30:54 +0300 jasper-initramfs (0.57) oneiric; urgency=low * Adjust filesystem growing code to be in sync with partitioning changes in CD Image builds. -- Jani Monoses Fri, 01 Jul 2011 16:54:28 +0300 jasper-initramfs (0.56) natty; urgency=low * change description of TI software channel to point to 11.04 (LP: #759812) * make sure sources.list entry for TI software channel points to natty (LP: #759828) -- Oliver Grawert Wed, 13 Apr 2011 16:10:18 +0200 jasper-initramfs (0.55) natty; urgency=low * fix machine detection for panda, the current string does not match. * do not fail if gconf defaults can't be set, we still want to move on. -- Oliver Grawert Tue, 12 Apr 2011 18:21:14 +0200 jasper-initramfs (0.54) natty; urgency=low * Workaround to increase kernel min_free_kbytes to avoid page allocation failures (LP: #746137) -- Ricardo Salveti de Araujo Mon, 11 Apr 2011 00:31:33 -0300 jasper-initramfs (0.53) natty; urgency=low * fix typo * add logging to update-gconf-default -- Oliver Grawert Thu, 07 Apr 2011 19:34:27 +0200 jasper-initramfs (0.52) natty; urgency=low * fix strings of jasper_setup * move sysctl config into separate file, only apply SD optimizations if rootfs is actually on SD * re-enable omap4 ppa channel and installer icon -- Oliver Grawert Wed, 06 Apr 2011 13:52:43 +0200 jasper-initramfs (0.51) natty; urgency=low * don't add quiet, splash and fixrtc twice to the cmdline. * don't process cmdline in reverse order. -- Oliver Grawert Tue, 05 Apr 2011 18:56:19 +0200 jasper-initramfs (0.50) natty; urgency=low * add locale preseeding and default to en_US.UTF-8 for oem-config if nothing else is set. -- Oliver Grawert Thu, 24 Mar 2011 13:01:28 +0100 jasper-initramfs (0.49) natty; urgency=low * drop escape from quotes in debconf-communicate call -- Oliver Grawert Tue, 22 Mar 2011 10:53:44 +0100 jasper-initramfs (0.48) natty; urgency=low * fix typo -- Oliver Grawert Mon, 21 Mar 2011 15:55:30 +0100 jasper-initramfs (0.47) natty; urgency=low * handle root= option during cmdline parsing, not separately * change maintainer address to ubuntu-devel-discuss -- Oliver Grawert Mon, 21 Mar 2011 14:26:02 +0100 jasper-initramfs (0.46) natty; urgency=low * add handling of preseeding on cmdline -- Oliver Grawert Mon, 21 Mar 2011 13:46:35 +0100 jasper-initramfs (0.45) natty; urgency=low * transfer the existing cmdline completely to final install, only handle root= and serial console as special cases. * drop most of the HW specific hacks -- Oliver Grawert Mon, 21 Mar 2011 13:09:16 +0100 jasper-initramfs (0.44) natty; urgency=low * enable universe and multiverse in the target rootfs (LP: #659754) -- Oliver Grawert Thu, 17 Mar 2011 13:04:32 +0100 jasper-initramfs (0.43) natty; urgency=low * make serial console not grab tty while oem-config is running * add video settings to kernel cmdline on omap4 -- Oliver Grawert Fri, 11 Mar 2011 17:13:13 +0100 jasper-initramfs (0.42) natty; urgency=low * make sure the check for the swap file actually runs properly (LP: #728338) * simplify serial console upstart job * be more verbose on plymouth screen about the fact that we resize. * sleep 3 seconds instead of one when we reboot, so the user has a chance to actually read the reboot message on screen. -- Oliver Grawert Thu, 10 Mar 2011 15:28:51 +0100 jasper-initramfs (0.41) natty; urgency=low * only add swap to fstab, we dont need to create it on preinstalled images anymore, livecd-rootfs does that now, this gains us about 3min in first boot. -- Oliver Grawert Wed, 23 Feb 2011 14:59:20 +0100 jasper-initramfs (0.40) natty; urgency=low * add plymouth support to output * add fixrtc to prerequisites of jasper_growroot -- Oliver Grawert Wed, 23 Feb 2011 14:38:08 +0100 jasper-initramfs (0.39) natty; urgency=low * scripts/local-premount/jasper_growroot fix exporting of root device -- Oliver Grawert Sat, 22 Jan 2011 12:37:23 +0100 jasper-initramfs (0.38) natty; urgency=low * drop some hardcoding from the rootdev function * remove the ugly ti PPA handling from jasper_setup, ti-omap4-software-channel was uploaded to the archive, we will seed it once it is in main -- Oliver Grawert Thu, 13 Jan 2011 22:18:53 +0100 jasper-initramfs (0.37) natty; urgency=low * remove superfluous loopback device setup from jasper_setup * drop setting of the default desktop session, this is done in livecd-rootfs now * we do not need to remove mtab anymore, this is done in initramfs anyway -- Oliver Grawert Mon, 10 Jan 2011 23:41:38 +0100 jasper-initramfs (0.36) natty; urgency=low * merge the uncommited changes from loic in the jasper branch * revert pointless uncommenting of the Vcs-Bzr entry (please use launchpad merge requests for committing to branches you can not commit to instead of screwing around with fields in debian/control) * change maintainer field to the canonical-arm team which owns the upstream source tree. -- Oliver Grawert Sun, 09 Jan 2011 17:52:05 +0100 jasper-initramfs (0.35) natty; urgency=low * Update dep on u-boot to u-boot-tools, final package name for mkimage. -- Loïc Minier Sat, 08 Jan 2011 12:25:01 +0100 jasper-initramfs (0.34) natty; urgency=low * u-boot's mkimage moved from the uboot-mkimage to the u-boot package; update Depends to u-boot | uboot-mkimage to still allow for backports. * Temporary comment out Vcs-Bzr as I can't commit to this branch. -- Loïc Minier Mon, 20 Dec 2010 11:15:24 +0100 jasper-initramfs (0.33) maverick; urgency=low * make sure we use the VOLID from the actually specified root= kernel parameter in case a user modifies the initial boot.scr (LP: #652143) -- Oliver Grawert Sat, 02 Oct 2010 02:08:13 +0200 jasper-initramfs (0.32) maverick; urgency=low * take options for resolution of omap3 from commandline (LP: #605831) * also hand over serial console if it is set as last console= arg * As TI marketing requested, change the TI logo color in the PPA icon to black -- Oliver Grawert Fri, 01 Oct 2010 14:42:29 +0200 jasper-initramfs (0.30) maverick; urgency=low * add a proper icon for the TI PPA .desktop file -- Oliver Grawert Thu, 23 Sep 2010 17:38:52 +0200 jasper-initramfs (0.29) maverick; urgency=low * adjust the package name to the proper metapackage for the ti-omap4 PPA * PPA eula can not be html anymore with the latest software-center changes, switch to txt -- Oliver Grawert Thu, 23 Sep 2010 16:38:07 +0200 jasper-initramfs (0.28) maverick; urgency=low * fix typo, it is .desktop not .dektop -- Oliver Grawert Mon, 20 Sep 2010 16:24:09 +0200 jasper-initramfs (0.27) maverick; urgency=low * use the proper filename for the PPA .desktop file so it shows up properly in the efl launcher favorites * use gnome-open in the PPA .desktop file, software center wont be started without calling it. -- Oliver Grawert Mon, 20 Sep 2010 10:57:02 +0200 jasper-initramfs (0.26) maverick; urgency=low * do not link /proc/mounts to /etc/mtab, seems initramfs-tools does that now which breaks the resize script completely due to ln exiting non zero. -- Oliver Grawert Sun, 19 Sep 2010 18:41:08 +0200 jasper-initramfs (0.25) maverick; urgency=low * make sure we use the right partition for booting when running from SD on OMAP4 blaze (LP: #640406) -- Oliver Grawert Thu, 16 Sep 2010 18:27:07 +0200 jasper-initramfs (0.24) maverick; urgency=low * enable serial console autodetection -- Oliver Grawert Thu, 16 Sep 2010 18:02:22 +0200 jasper-initramfs (0.23) maverick; urgency=low * add the proper values for TI OMAP4 ppa .key and .list files -- Oliver Grawert Thu, 16 Sep 2010 15:49:52 +0200 jasper-initramfs (0.22) maverick; urgency=low * use the proper path for the PPA file installation -- Oliver Grawert Wed, 15 Sep 2010 21:11:47 +0200 jasper-initramfs (0.21) maverick; urgency=low [ Ricardo Salveti de Araujo ] * fixing swap file creation, as it can't use a sparse file (LP: #627201) [ Oliver Grawert ] * add basic support for the TI OMAP4 ppa through apturl. keys, eula text and the like as well as an icon for the .desktop file will follow. -- Oliver Grawert Wed, 15 Sep 2010 21:06:09 +0200 jasper-initramfs (0.20) maverick; urgency=low * re-enable swap file creation during first boot (LP: #627201) * redirect output of mount calls in jasper_growroot to logfile * change text about resizing time, it is a lot faster than 10min nowadays * add more info to swap creation text -- Oliver Grawert Tue, 14 Sep 2010 19:00:43 +0200 jasper-initramfs (0.19) maverick; urgency=low * the second mem= arg needs an M too in the value (blind me, gah) -- Oliver Grawert Fri, 10 Sep 2010 14:45:07 +0200 jasper-initramfs (0.18) maverick; urgency=low * only use 768M on the panda yet, until bug 633227 is fixed -- Oliver Grawert Thu, 09 Sep 2010 19:47:39 +0200 jasper-initramfs (0.17) maverick; urgency=low * drop the hack we needed with the beta kernel package, usb0 comes up fine now and can be handled by NetworkManager again. -- Oliver Grawert Tue, 07 Sep 2010 14:38:02 +0200 jasper-initramfs (0.16) maverick; urgency=low * Add correct mem argument for Panda ES2 (for 1gb) (LP: #629269) -- Ricardo Salveti de Araujo Fri, 03 Sep 2010 02:40:40 -0300 jasper-initramfs (0.15) maverick; urgency=low * add a hack to work around bug 625108 during maverick beta until the kernel is fixed -- Oliver Grawert Fri, 27 Aug 2010 12:50:06 +0200 jasper-initramfs (0.14) maverick; urgency=low * do not exit before resizing even if e2fsck found wrong last mount time etc. -- Oliver Grawert Thu, 26 Aug 2010 13:54:17 +0200 jasper-initramfs (0.13) maverick; urgency=low * jasper_growroot: - strip parentheses from resize2fs output - add proper percentage output for each single pass instead of plain dots so the user gets more details about the resize progress. - change info string and bind time to SD size (10min per 4G) * depend on bc for percentage calculation * copy bc in the jasper hook * jasper_setup: - run gdm-set-default-session chrooted - add /etc/sysctl.d/30-jasper-root-on-sd.conf file with options to reduce disk access. - temporary disable swapfile creation. - default to noop elevator on cmdline for a test - add more debug output (temporary) - mount / with noatime * reboot if the filesystem was resized -- Oliver Grawert Sun, 18 Jul 2010 09:02:16 +0200 jasper-initramfs (0.12) maverick; urgency=low * default to une-efl session if it is installed in the root filesystem * add progress reporting to resize2fs output -- Oliver Grawert Wed, 14 Jul 2010 14:01:07 +0200 jasper-initramfs (0.11) maverick; urgency=low * jasper_setup: create /root/boot/boot.script to make user editing of cmdline options easier, users only need to edit this file and run flash-kernel on the installed system now. * change upstream branch to lp:jasper-initramfs to match the new project name -- Oliver Grawert Fri, 09 Jul 2010 13:57:37 +0200 jasper-initramfs (0.10) maverick; urgency=low [ Oliver Grawert ] * jasper_setup: - fix whitespace - add proper logging and better logfile handling - fix typo in flash-kernel.conf creation - add quiet and splash to default cmdline - set board specific cmdline options in boot.scr for panda and beagleboard [ Alexander Sack ] * jasper_setup: improve match for proc line from /etc/fstab -- Oliver Grawert Tue, 06 Jul 2010 13:56:43 +0200 jasper-initramfs (0.9) maverick; urgency=low [ Alexander Sack ] * jasper_setup: allow rootfs to live on any device; don't assume its on mmc device if root= kernel command line already has a UUID= id there [ Oliver Grawert ] * jasper_setup: add swap file creation if not existing in fstab yet with a default value of 256M -- Oliver Grawert Thu, 01 Jul 2010 23:28:15 +0200 jasper-initramfs (0.7) maverick; urgency=low * jasper_growroot: dont call sync with full path in write_vfat, that makes the script choke -- Oliver Grawert Wed, 30 Jun 2010 20:27:28 +0200 jasper-initramfs (0.6) maverick; urgency=low * jasper_setup: - adjust variable handling - create new boot.scr with root=UUID=... entry - copy log to /var/log - write flash-kernel.conf * jasper_growroot: - add detection of rootdevice from cmdline - use DOS compatibility in sfdisk call to make sure vfat stays bootable - give a more precise time to the user in the script output - add caching and re-formatting of the vfat partition with the new CHS geometry of the SD card so we can be sure we are still able to boot * debian/control: drop dep on mtools, add dep on uboot-mkimage -- Oliver Grawert Tue, 22 Jun 2010 17:39:18 +0200 jasper-initramfs (0.5) maverick; urgency=low * jasper_setup: fix fstab creation * jasper_growroot: - add e2fsck call (LP: #594756) - use fdisk to get the blocksize of first partition - move removal of fake mtab file to end of the script - rework logging to /dev/.initramfs/jasper.log - rework partitioning code - fix SIZE detection -- Oliver Grawert Fri, 18 Jun 2010 15:59:38 +0200 jasper-initramfs (0.4) maverick; urgency=low * make the package arch: all ... no need to build it separately * be more agressive with the trigger * move debian/install and debian/triggers to package specific namespace -- Oliver Grawert Sun, 13 Jun 2010 17:11:12 +0200 jasper-initramfs (0.3) maverick; urgency=low * add update-initramfs trigger to make sure the scripts end up where they beling -- Oliver Grawert Sun, 13 Jun 2010 16:09:11 +0200 jasper-initramfs (0.2) maverick; urgency=low * jasper_growroot: use fake mtab in initramfs to please resize2fs, drop fsck, we need to do that at image build time, change UUID generation code. * jasper_setup: use ext3 filesystem in fstab, remount /root rw for write operations -- Oliver Grawert Thu, 10 Jun 2010 07:28:25 +0200 jasper-initramfs (0.1) maverick; urgency=low * Initial release. -- Oliver Grawert Fri, 04 Jun 2010 18:29:17 +0200 jasper-initramfs/debian/rules0000775000000000000000000000003611743722006013527 0ustar #! /usr/bin/make -f %: dh $@ jasper-initramfs/debian/control0000664000000000000000000000200611743722006014051 0ustar Source: jasper-initramfs Section: misc Priority: optional Maintainer: Canonical ARM Build-Depends: debhelper (>= 7.0.50~) Standards-Version: 3.8.4 Vcs-Bzr: lp:jasper-initramfs Package: jasper Architecture: all Section: misc Priority: extra Depends: ${shlibs:Depends}, ${misc:Depends}, initramfs-tools, busybox-initramfs, util-linux (>= 2.17.2-0), uuid-runtime, e2fsprogs (>= 1.41.11-1), coreutils (>= 7.4-2), oem-config, dosfstools, u-boot-tools | uboot-mkimage, bc, app-install-data Description: Configure a preinstalled ext2/3 system image Jasper is a tool to configure preinstalled ext2/3 images that were created using the ubuntu infrastructure from the initramfs. Such as armel omap3/4 images in Ubuntu 10.10 and beyond. . It grows the system partition of a preinstalled ext2/3 image to the full size of the SD card, configures fstab, loopback networking, adds the UUID to the kernel cmdline and properly sets up flash-kernel for the kernel package post installation scripts. jasper-initramfs/debian/copyright0000664000000000000000000000171211743722006014404 0ustar Author: Oliver Grawert Copyright: License (everything else): Copyright (C) 2010 Canonical Ltd. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it 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 along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian and Ubuntu systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL file. jasper-initramfs/scripts/0000775000000000000000000000000011743722006012715 5ustar jasper-initramfs/scripts/local-bottom/0000775000000000000000000000000011743724736015325 5ustar jasper-initramfs/scripts/local-bottom/jasper_setup0000775000000000000000000001401211743722423017744 0ustar #!/bin/sh -e PREREQ="" # Output pre-requisites prereqs() { echo "$PREREQ" } case "$1" in prereqs) prereqs exit 0 ;; esac LOGFILE=/dev/.initramfs/jasper.log # If we are already confiugured we dont want to run again [ -e /root/etc/flash-kernel.conf ] && exit 0 MYECHO="echo " if [ -x /bin/plymouth ] && plymouth --ping; then MYECHO="plymouth message --text=" fi # jasper_growroot should have exported this, if not, fall # back to a hardcoded value [ -n "${ROOTDEV}" ] || ROOTDEV="mmcblk0p" ROOTPART="${ROOTDEV}2" #iMX53 has rootfs on part 3 grep MX53 /proc/cpuinfo >/dev/null && ROOTPART="${ROOTDEV}"3 FSTYPE=$(blkid -o value -s TYPE "/dev/${ROOTPART}") DISKTYPE=$(echo $ROOTDEV|sed 's/blk[0-9]p//') if echo "$root" | grep -q '^UUID='; then VOLID=$root else if echo $root| grep -q ^/;then ROOTPART=$(basename $root) fi VOLID=$(blkid |grep ${ROOTPART}|awk '{print $2}'|tr -d [\"]) fi machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//') UBOOT_PART="/dev/mmcblk0p1" TMPDIR="/dev/.initramfs/jasper-tmp" BOOT_SCRIPT="/boot/boot.script" BOARD_OPTS="ro" if [ "${DISKTYPE}" = "mmc" ];then BOARD_OPTS="${BOARD_OPTS} elevator=noop" fi # make sure FS is writable mount -o remount,rw /root if [ -e /root/preseed.cfg ]; then chroot /root debconf-set-selections /preseed.cfg fi for x in $(cat /proc/cmdline); do case ${x} in preseed/file=*) locations="${x#preseed/file=} $locations" ;; file=*) locations="${x#file=} $locations" ;; console=tty[A-Z]*) $MYECHO"Enabling serial console login" cp /root/usr/share/jasper-initramfs/init/serial.conf /root/etc/init/ BOARD_OPTS="${BOARD_OPTS} ${x}" ;; root=*) BOARD_OPTS="${BOARD_OPTS} root=${VOLID}" ;; debian-installer/language=*) language=${x#debian-installer/language=} locale="$(lang2locale "$language")" set_locale="true" ;; debian-installer/locale=*) locale=${x#debian-installer/locale=} set_locale="true" ;; locale=*) locale=${x#locale=} set_locale="true" ;; */*=*) # handle preseeding options opt=${x%=*} val=${x#*=} pkg=${opt%/*} if [ $pkg = "debian-installer" ]; then pkg="oem-config" fi echo "set ${opt} ${val}" | chroot /root debconf-communicate ${pkg} >>$LOGFILE 2>&1 || true ;; *) BOARD_OPTS="${BOARD_OPTS} ${x}" ;; esac done if [ "$locations" ]; then for item in $locations; do cp $item /root/tmp chroot /root debconf-set-selections /tmp/$item rm /root/tmp/$item done fi if [ -z "${locale}" ]; then # Set a default locale locale=en_US.UTF-8 set_locale="true" fi if [ "${set_locale}" ]; then LANG=$(grep "^${locale}" /root/usr/share/i18n/SUPPORTED | grep UTF-8 |sed -e 's, .*,,' -e q) printf 'LANG="%s"\n' "${LANG}" >> /root/etc/default/locale printf 'LANG="%s"\n' "${LANG}" >> /root/etc/environment printf '%s UTF-8\n' "${LANG}" > /root/etc/locale.gen chroot /root /usr/sbin/locale-gen "${LANG}" >>$LOGFILE 2>&1 || true fi # create fstab in /root, we only support ext3 partitions atm $MYECHO"Setting up fstab" if grep -q 'UNCONFIGURED FSTAB' /root/etc/fstab; then cat > /root/etc/fstab <<-EOF # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # EOF fi if ! cat /root/etc/fstab | grep -v '^#' | awk '{print $3}' | grep -q ^proc; then echo "proc /proc proc nodev,noexec,nosuid 0 0" >>/root/etc/fstab fi if ! grep -q ${VOLID} /root/etc/fstab; then echo "${VOLID} / ${FSTYPE} defaults,noatime,errors=remount-ro 0 1" >>/root/etc/fstab fi $MYECHO"Setting up swap" if ! grep -q swap /root/etc/fstab; then if [ -e /root/SWAP.swap ]; then echo "/SWAP.swap none swap sw 0 0" >>/root/etc/fstab fi fi $MYECHO"Enabling oem-config" # switch oem-config on mkdir -p /root/var/lib/oem-config touch /root/var/lib/oem-config/run MMCPART="0:1" KERNELADDR=0x80000000 INITRDADDR=0x81600000 case "$machine" in "OMAP4430 4430SDP board") UBOOT_PART="/dev/mmcblk1p1" ;; "Freescale MX53 LOCO Board") UBOOT_PART="/dev/mmcblk0p2" MMCPART="0:2" KERNELADDR=0x70000000 INITRDADDR=0x72000000 ;; esac $MYECHO"Writing flash-kernel configuration" # create flash-kernel setup echo "UBOOT_PART=${UBOOT_PART}" >/root/etc/flash-kernel.conf echo "ROOT=${VOLID}" >>/root/etc/flash-kernel.conf # create new boot.scr file $MYECHO"Creating bootloader configuration" cat >"/root${BOOT_SCRIPT}" <>$LOGFILE 2>&1 umount ${TMPDIR} rm -rf ${TMPDIR} if [ "${DISKTYPE}" = "mmc" ];then cp /root/usr/share/jasper-initramfs/sysctl/30-jasper-root-on-sd.conf /root/etc/sysctl.d/ >>$LOGFILE 2>&1 fi # for bug 746137 cp /root/usr/share/jasper-initramfs/sysctl/30-jasper-smsc-min-free-kbytes.conf /root/etc/sysctl.d/ >>$LOGFILE 2>&1 chroot /root /usr/share/jasper-initramfs/apt/enable_additional_repos.py >>$LOGFILE 2>&1 # move jasper.log to root filesystem mv $LOGFILE /root/var/log/ # remount readonly mount -o remount,ro /root if [ -e /dev/.initramfs/jasper-reboot ];then $MYECHO"Rebooting into configuration session" sleep 3 reboot fi jasper-initramfs/scripts/local-premount/0000775000000000000000000000000011743722006015656 5ustar jasper-initramfs/scripts/local-premount/jasper_growroot0000775000000000000000000000654311743722006021042 0ustar #!/bin/sh -e PREREQ="fixrtc" # Output pre-requisites prereqs() { echo "$PREREQ" } case "$1" in prereqs) prereqs exit 0 ;; esac DISK=mmcblk0 SEP="p" LOG=/dev/.initramfs/jasper.log CACHE=/dev/.initramfs/jasper-vfat touch ${LOG} mkdir -p ${CACHE} BOOTPATH="" PARTITION="" MYECHO="echo " if [ -x /bin/plymouth ] && plymouth --ping; then MYECHO="plymouth message --text=" fi # we only handle mmc and sdX disk types atm if a UUID is already set we dont want # to do any action since we assume the system was configured before [ -z "`grep root=UUID /proc/cmdline`" ] || exit 0 for arg in $(cat /proc/cmdline) do case $arg in root=*) BOOTPATH=${arg#root=} PARTITION=${BOOTPATH#/dev/} case $PARTITION in mmcblk*) DISK=$(echo ${PARTITION}|sed -e 's/p[0-9]*$//') ;; sd*) DISK=$(echo ${PARTITION}|sed -e 's/[0-9]*$//') SEP="" ;; *) $MYECHO"E: Jasper error, can not handle this disk type" exit 1 ;; esac ;; esac done export ROOTDEV="/dev/${DISK}${SEP}" # The actual resizing function resize_partitions() { HEADS=128 SPT=32 DISKSIZE=`LANG=C /sbin/fdisk -l /dev/${DISK} | grep Disk | awk '{print $5}' | tr -d '\n'` CYLS=$(($DISKSIZE/$HEADS/$SPT/512)) sync # Enlarge the EXT3 partition to fill the rest of the disk. # Use sfdisk to dump out current layout then feed it back to sfdisk with the size field of # the EXT3 partition empty, which means as large as possible /sbin/sfdisk -H $HEADS -S $SPT -C $CYLS -uS -d /dev/$DISK | sed '/Id=83/ s/size=.*,/size=,/' | /sbin/sfdisk -H $HEADS -S $SPT -C $CYLS --no-reread -uS -D --force /dev/$DISK } $MYECHO"Resizing root partition ..." echo "Resizing root partition ..." >>${LOG} resize_partitions # Give some info to the user TODO: create plymouth output $MYECHO"Resizing root filesystem. Please wait, this will take a moment ..." echo "Resizing root filesystem ..." >>${LOG} export ROOTPART=`/sbin/sfdisk -H $HEADS -S $SPT -d /dev/$DISK | grep 'Id=83' | awk '{print $1}'` export VFATPART=`/sbin/sfdisk -H $HEADS -S $SPT -d /dev/$DISK | grep 'Id= c' | awk '{print $1}'` # little workaround for wrong clocks mount ${ROOTPART} /root >>${LOG} 2>&1 umount /root >>${LOG} 2>&1 $MYECHO"Checking filesystem before resizing..." /sbin/e2fsck -fy ${ROOTPART} >>${LOG} 2>&1 || true $MYECHO"Resizing, please wait..." pass=1 iter=0 LANG=C /sbin/resize2fs -p ${ROOTPART} 2>&1 | while read -n 1 input; do char=$(echo $input|sed 's/[)(]//') if [ "${char}" = "X" ];then if [ "${iter}" = "100.0" ];then iter=0 pass=$(($pass+1)) echo >>${LOG} fi iter=$(echo $iter+2.5|bc) printf "\rResizing, pass: %i [%3.0f/100]" $pass $iter fi if [ -z "${char}" ]; then echo -n " " >>${LOG} else echo -n "${char}" >>${LOG} fi done echo >>${LOG} echo 1>/dev/.initramfs/jasper-reboot # Set a new UUID to make sure we're unique in the world /sbin/tune2fs -U $(uuidgen) ${ROOTPART} >>${LOG} 2>&1 # Set the label on the vfat partition so it's invisible to the desktop /sbin/dosfslabel ${VFATPART} SERVICEV001 >>${LOG} 2>&1 rm -rf ${CACHE} jasper-initramfs/init/0000775000000000000000000000000011743722006012171 5ustar jasper-initramfs/init/serial.conf0000664000000000000000000000133711743722006014323 0ustar #!/bin/sh # # This service maintains a getty on serial port given as 'console' kernel argument. # # Last 'console' argument is used # start on (runlevel [23] or stopping oem-config-debconf) stop on runlevel [!23] respawn script # check for console entry [ -z "`grep console /proc/cmdline`" ] && exit 0 # we cant run while oem-config runs [ -e /etc/init/oem-config-debconf.conf ] && exit 0 for arg in $(cat /proc/cmdline) do case $arg in console=*) [ ! -z `echo $arg | egrep "tty([0-9]+)"` ] && exit 0 conargs=${arg#*=} DEV=${conargs%,*} exec /sbin/getty -m -8 115200,57600,38400,19200,9600,4800,2400,1200 $DEV esac done end script jasper-initramfs/hooks/0000775000000000000000000000000011743722006012351 5ustar jasper-initramfs/hooks/jasper0000775000000000000000000000102011743722006013554 0ustar #!/bin/sh -e # initramfs hook for jasper PREREQ="" # Output pre-requisites prereqs() { echo "$PREREQ" } case "$1" in prereqs) prereqs exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions copy_exec /sbin/resize2fs /sbin copy_exec /sbin/e2fsck /sbin copy_exec /sbin/tune2fs /sbin copy_exec /sbin/sfdisk /sbin copy_exec /sbin/fdisk /sbin copy_exec /usr/bin/uuidgen /bin copy_exec /bin/sync /bin copy_exec /sbin/dosfslabel /sbin copy_exec /sbin/mkswap /sbin copy_exec /usr/bin/bc /bin jasper-initramfs/sysctl/0000775000000000000000000000000011743722006012547 5ustar jasper-initramfs/sysctl/30-jasper-smsc-min-free-kbytes.conf0000664000000000000000000000136111743722006021065 0ustar # The driver smsc95xx, used by both Beagleboard XM and Pandaboard uses # turbo mode by default, that enables multiple frames per Rx transaction, # increasing performance but consuming more kernel memory. # To avoid page allocation failures and smsc kevent drops we need to # increase the minimum free system memory in the kernel to a higher value. # If you're still having page allocation failures, try to increase this # value to 12288 or even higher. You could also disable the driver's turbo # mode, but decreasing the ethernet performance. # If you encounter problems due to the settings please file a bug # against the jasper-initramfs ubuntu package. # For more details please check http://bugs.launchpad.net/bugs/746137 vm.min_free_kbytes = 8192 jasper-initramfs/sysctl/30-jasper-root-on-sd.conf0000664000000000000000000000063411743722006017124 0ustar # The values below try to reduce disk writes, they were put in place # by the jasper-initramfs package during first boot of this computer. # If you encounter problems due to the settings please file a bug # against the jasper-initramfs ubuntu package. vm.swappiness = 0 vm.vfs_cache_pressure=50 vm.dirty_background_ratio = 20 vm.dirty_expire_centisecs = 0 vm.dirty_ratio = 80 vm.dirty_writeback_centisecs = 6000