diff options
Diffstat (limited to 'tools/XBMCLive/Creator/platforms')
18 files changed, 1299 insertions, 0 deletions
diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/exclude b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/exclude new file mode 100644 index 0000000000..cd3d05eb2c --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/exclude @@ -0,0 +1,2 @@ +boot +usr/sbin/policy-rc.d diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fsets/base.fset b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fsets/base.fset new file mode 100644 index 0000000000..4c822934d4 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fsets/base.fset @@ -0,0 +1,25 @@ +[Core] +DESC=Fundamental fset that provide a basic console based system +PKGS=ubuntu-minimal usplash-theme-ubuntu pm-utils vbetool busybox-initramfs initramfs-tools dosfstools psmisc +DEPS= + +[i386-Image-Generic] +DESC=Packages needed for the i386 platform (Generic) +PKGS=linux-image +DEPS=core + +#[i386-Image] +#DESC=Packages needed for the i386 platform (i386) +#PKGS=linux-image-386 +#DEPS=core + +[Generic-X11] +DESC=Minimal X11 packages set +PKGS=xorg fluxbox +DEPS= + +[RemoteAccess] +DESC=Install SSH +PKGS=openssh-server + + diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fsets/custom.fset b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fsets/custom.fset new file mode 100644 index 0000000000..ae1fc62683 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fsets/custom.fset @@ -0,0 +1,25 @@ +[DevelTools] +DESC=Application Development Toolkit +PKGS=subversion make build-essential autoconf automake gawk + +[MiscUtils] +DESC=Additional packages +PKGS=mingetty unrar nano lirc ntfs-3g hfsprogs grub dosfstools language-pack-en +#lcdproc + +[HWUtils] +DESC=Additional HW-related packages +PKGS=powernowd acpi acpi-support alsa-utils + +[OpenGL-X11] +DESC=OpenGl-enabled X11 package set +PKGS=mesa-utils libgl1-mesa-dri xlibmesa-glu + +[XBMC] +DESC=Install XBMC from PPAs +PKGS=xbmc hal + +[ModuleBuildTools] +DESC=Required packages to build kernel modules (e.g. ATI/AMD and nvidia) +PKGS=build-essential fakeroot dh-make debhelper debconf libstdc++5 dkms +# linux-headers-$(uname -r) diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fsets/moblin.org.fset b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fsets/moblin.org.fset new file mode 100644 index 0000000000..3fc59cf2cc --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fsets/moblin.org.fset @@ -0,0 +1,30 @@ +[GNOME-Mobile] +DESC=Subset of GNOME components for building mobile Linux stacks +PKGS=xorg xserver-xorg-input-evtouch libgl1-mesa-dri matchbox-window-manager libglib2.0-0 dbus libdbus-1-3 libdbus-glib-1-2 gconf2 libgnomevfs2-0 libgstreamer0.10-0 libtelepathy-glib0 libavahi-glib1 libgtk2.0-0 libpango1.0-0 libcairo2 libatk1.0-0 python python-dbus python-cairo python-gconf python-gst0.10 telepathy-core telepathy-mission-control gnome-icon-theme gnome-menus +# apt-get -y --force-yes install xorg xserver-xorg-input-evtouch libgl1-mesa-dri matchbox-window-manager libglib2.0-0 dbus libdbus-1-3 libdbus-glib-1-2 gconf2 libgnomevfs2-0 libgstreamer0.10-0 libbluetooth2 libtelepathy-glib0 libavahi-glib1 libgtk2.0-0 libpango1.0-0 libcairo2 libatk1.0-0 python python-dbuspython-cairo python-gconf python-gst0.10 telepathy-core telepathy-mission-control gnome-icon-theme gnome-menus +DEBUG_PKGS=xrestop + +[Ubuntu-Mobile] +DESC=Ubuntu Mobile using Hildon, and any base applications for same +PKGS=ubuntu-mobile gstreamer-dbus-media-service gstreamer0.10-x gstreamer0.10-ffmpeg gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad moblin-keyboard-manager mousepad gnome-nettool galculator moblin-applets moblin-media moblin-media-import evince hildon-libs-l10n-engb +DEBUG_PKGS=powertop +DEPS=gnome-mobile + +[Ubuntu-Staging] +DESC=Packages that are ready for inclusion into Ubuntu +PKGS=moblin-notes moblin-calc moblin-media-browser-plugin ppm moblin-clutter-home +DEBUG_PKGS= +DEPS=ubuntu-mobile + +# Not in Ubuntu yet/broken: moblin-chat moblin-applets moblin-media + +[Developer-Tools] +DESC=Tools for building source in the target (gcc, make, etc.) +PKGS=ubuntu-mobile-dev libtool autoconf automake hildon-desktop-dev man manpages curl python-dev dh-make libosso-dev +DEBUG_PKGS= +DEPS=core + +[FlashPlugin] +DESC=Adobe Flash plugin +PKGS=flashplugin-nonfree + diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fstab b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fstab new file mode 100644 index 0000000000..55cc26e1a3 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/fstab @@ -0,0 +1,3 @@ +unionfs / unionfs defaults 0 0 +proc /proc proc defaults 0 0 + diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/cd b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/cd new file mode 100755 index 0000000000..a5a4489175 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/cd @@ -0,0 +1,208 @@ +#!/bin/bash +# Live CD filesystem mounting -*- shell-script -*- + +#Function for parsing command line options with "=" in them +# get_opt("init=/sbin/init") will return "/sbin/init" +get_opt() { + echo "$@" | cut -d "=" -f 2 +} + +mountroot () +{ + CFG_FILE=/etc/moblin-initramfs.cfg + QUIET="$(grep "quiet" /proc/cmdline)" + + if [ -f ${CFG_FILE} ] + then + . ${CFG_FILE} + else + if [ "$QUIET" == "" ]; then + echo "Did not find config file: ${CFG_FILE}" + fi + sleep 5 + halt + fi + + + CMDLINE=$(cat /proc/cmdline) + + #Process command line options + XBMC_PARAMS="" + for i in ${CMDLINE}; do + case "${i}" in + xbmc\=*) + XBMC_PARAMS=$(get_opt $i) + ;; + esac + done + + AUTOGPU="$( echo $XBMC_PARAMS | grep "autogpu" )" + + if [ "$AUTOGPU" != "" ]; then + # Needs lspci in initramfs, not yet there + if [ "$QUIET" = "" ]; then + echo "found auto" + fi + XBMC_AMD="$(lspci -nn | grep 0300 | grep 1002)" + XBMC_NVIDIA="$(lspci -nn | grep 0300 | grep 10de)" + else + XBMC_NVIDIA="$( echo $XBMC_PARAMS | grep "nvidia" )" + XBMC_AMD="$( echo $XBMC_PARAMS | grep "amd" )" + fi + + BOOTMEDIAMNTPOINT=/bootmediamnt + mkdir -p $BOOTMEDIAMNTPOINT + mkdir -p /squashmnt1 + mkdir -p /squashmnt2 + mkdir -p /persistmnt + + if [ "$ROOT" != "" ]; then + if [ "$QUIET" == "" ]; then + echo "will mount root from ${ROOT}" + fi + + mount -o ro -t iso9660 ${ROOT} $BOOTMEDIAMNTPOINT 2> /dev/null + while [ ! -e $BOOTMEDIAMNTPOINT/rootfs.img ]; do + /bin/sleep 1 + if [ "$QUIET" == "" ]; then + echo "Trying again $ROOT ...." + fi + mount -o ro ${ROOT} -t iso9660 $BOOTMEDIAMNTPOINT 2> /dev/null + done + else + # Find the CD drive + found="no" + while true + do + for device in 'cdrom' 'scd0' 'scd1' 'scd2' 'scd3'; do + if [ "$QUIET" == "" ]; then + echo "Checking device /dev/${device} for installation source..." + fi + if [ -b /dev/${device} ]; then + mount -o ro -t iso9660 /dev/${device} $BOOTMEDIAMNTPOINT 2> /dev/null + if [ -e $BOOTMEDIAMNTPOINT/rootfs.img ] ; then + if [ "$QUIET" == "" ]; then + echo "Found CD Boot Drive at /dev/${device}" + fi + found="yes" + fi + umount $BOOTMEDIAMNTPOINT 2> /dev/null + if [ "$found" = "yes" ]; then + break; + fi + if [ "$QUIET" == "" ]; then + echo "/dev/${device} does not contain a rootfs" + fi + fi + done + if [ "$found" = "yes" ]; then + break; + fi + /bin/sleep 5 + done + if [ "$QUIET" == "" ]; then + echo "will mount root from /dev/${device}" + fi + + mount -o ro -t iso9660 /dev/${device} $BOOTMEDIAMNTPOINT 2> /dev/null + + while [ ! -e $BOOTMEDIAMNTPOINT/rootfs.img ]; do + /bin/sleep 1 + if [ "$QUIET" == "" ]; then + echo "Trying again /dev/${device} ...." + fi + mount -o ro -t iso9660 /dev/${device} $BOOTMEDIAMNTPOINT 2> /dev/null + done + fi + + XBMC_BOOTTORAM="$( echo $XBMC_PARAMS | grep "boottoram" )" + + if [ "$XBMC_BOOTTORAM" != "" ]; then + if [ "$QUIET" == "" ]; then + echo "Copying boot media to RAM ...." + fi + + # TODO calc size from boot media + mkdir /bootmediamntRAM + mount -t tmpfs -o size=500M none /bootmediamntRAM + cp -R $BOOTMEDIAMNTPOINT/* /bootmediamntRAM 2> /dev/null + umount $BOOTMEDIAMNTPOINT + $BOOTMEDIAMNTPOINT=/bootmediamntRAM + fi + + mount -o ro,loop -t squashfs $BOOTMEDIAMNTPOINT/rootfs.img /squashmnt1 + + if [ "$XBMC_NVIDIA" != "" ]; then + if [ -f $BOOTMEDIAMNTPOINT/restrictedDrivers.nvidia.img ]; then + if [ "$QUIET" = "" ]; then + echo "Mounting NVIDIA drivers..." + fi + mount -o ro,loop,noatime,nodiratime $BOOTMEDIAMNTPOINT/restrictedDrivers.nvidia.img /squashmnt2 + fi + else + if [ "$XBMC_AMD" != "" ]; then + if [ -f $BOOTMEDIAMNTPOINT/restrictedDrivers.amd.img ]; then + if [ "$QUIET" = "" ]; then + echo "Mounting AMD drivers..." + fi + mount -o ro,loop,noatime,nodiratime $BOOTMEDIAMNTPOINT/restrictedDrivers.amd.img /squashmnt2 + fi + else + mount -t tmpfs -o noatime,nodiratime none /squashmnt2 + + if [ "$QUIET" = "" ]; then + echo "Defaulting to Xorg autodetect..." + fi + fi + fi + + mount -t tmpfs -o noatime,nodiratime none /persistmnt + + mount -t unionfs -o dirs=/persistmnt=rw:/squashmnt2=ro:/squashmnt1=ro none ${rootmnt} + + # Correct the permissions of /: + chmod 755 "${rootmnt}" + + # Make sure the individual ro and rw mounts are accessible from within the root + # once the union is assumed as /. This makes it possible to access the + # component filesystems individually. + if [ ! -e "${rootmnt}/.bootMedia" ]; then + mkdir "${rootmnt}/.bootMedia" + fi + #mkdir "${rootmnt}/.ro1" "${rootmnt}/.ro2" "${rootmnt}/.rw" + + mount --bind $BOOTMEDIAMNTPOINT "${rootmnt}/.bootMedia" + #mount --bind /squashmnt1 "${rootmnt}/.ro1" + #mount --bind /squashmnt2 "${rootmnt}/.ro2" + #mount --bind /persistmnt "${rootmnt}/.rw" + + if [ -f $BOOTMEDIAMNTPOINT/config/fstab ]; then + cp $BOOTMEDIAMNTPOINT/config/fstab ${rootmnt}/etc/fstab +# rm $BOOTMEDIAMNTPOINT/config/fstab + fi + if [ -f $BOOTMEDIAMNTPOINT/config/shadow ]; then + cp $BOOTMEDIAMNTPOINT/config/shadow ${rootmnt}/etc +# rm $BOOTMEDIAMNTPOINT/config/fstab + chmod 640 ${rootmnt}/etc/shadow + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/rc.local ]; then + cp $BOOTMEDIAMNTPOINT/config/rc.local ${rootmnt}/etc + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/xorg.conf ]; then + cp $BOOTMEDIAMNTPOINT/config/xorg.conf ${rootmnt}/etc/X11 + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/lircd.conf ]; then + cp $BOOTMEDIAMNTPOINT/config/lircd.conf ${rootmnt}/etc/lirc + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/hardware.conf ]; then + cp $BOOTMEDIAMNTPOINT/config/hardware.conf ${rootmnt}/etc/lirc + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/interfaces ]; then + cp $BOOTMEDIAMNTPOINT/config/interfaces ${rootmnt}/etc/network + fi +} diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/disk b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/disk new file mode 100755 index 0000000000..35ed6f1600 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/disk @@ -0,0 +1,233 @@ +#!/bin/bash +# Fixed Disk filesystem mounting -*- shell-script -*- + +#Function for parsing command line options with "=" in them +# get_opt("init=/sbin/init") will return "/sbin/init" +get_opt() { + echo "$@" | cut -d "=" -f 2 +} + +mountroot () +{ + CFG_FILE=/etc/moblin-initramfs.cfg + QUIET="$(grep "quiet" /proc/cmdline)" + + if [ -f ${CFG_FILE} ] + then + . ${CFG_FILE} + else + if [ "$QUIET" == "" ]; then + echo "Did not find config file: ${CFG_FILE}" + fi + sleep 5 + halt + fi + + + CMDLINE=$(cat /proc/cmdline) + + #Process command line options + XBMC_PARAMS="" + for i in ${CMDLINE}; do + case "${i}" in + xbmc\=*) + XBMC_PARAMS=$(get_opt $i) + ;; + esac + done + + AUTOGPU="$( echo $XBMC_PARAMS | grep "autogpu" )" + + if [ "$AUTOGPU" != "" ]; then + # Needs lspci in initramfs, not yet there + if [ "$QUIET" = "" ]; then + echo "found auto" + fi + XBMC_AMD="$(lspci -nn | grep 0300 | grep 1002)" + XBMC_NVIDIA="$(lspci -nn | grep 0300 | grep 10de)" + else + XBMC_NVIDIA="$( echo $XBMC_PARAMS | grep "nvidia" )" + XBMC_AMD="$( echo $XBMC_PARAMS | grep "amd" )" + fi + + BOOTMEDIAMNTPOINT=/bootmediamnt + mkdir -p $BOOTMEDIAMNTPOINT + mkdir -p /squashmnt1 + mkdir -p /squashmnt2 + mkdir -p /persistmnt + + if [ "$ROOT" != "" ]; then + if [ "$QUIET" == "" ]; then + echo "will mount root from ${ROOT}" + fi + + mount -t vfat -o rw,umask=000 $ROOT $BOOTMEDIAMNTPOINT 2> /dev/null + while [ ! -e $BOOTMEDIAMNTPOINT/rootfs.img ]; do + /bin/sleep 1 + if [ "$QUIET" == "" ]; then + echo "Trying again $ROOT ...." + fi + mount -t vfat -o rw,umask=000 $ROOT $BOOTMEDIAMNTPOINT 2> /dev/null + done + else + # Find the disk drive + found="no" + while true + do + for device in 'sda' 'sdb' 'sdc' 'sdd' 'sde' 'sdf' 'sdg'; do + if [ "$QUIET" == "" ]; then + echo "checking device /dev/${device} for installation source..." + fi + if [ -b /dev/${device} ]; then + if [ -e /sys/block/${device}/removable ]; then + if [ "$(cat /sys/block/${device}/removable)" = "0" ]; then + if [ "$QUIET" == "" ]; then + echo "Found disk drive at /dev/${device}" + fi + mount -t vfat -o rw,umask=0 /dev/${device}1 $BOOTMEDIAMNTPOINT 2> /dev/null + if [ -f $BOOTMEDIAMNTPOINT/rootfs.img ] ; then + if [ "$QUIET" == "" ]; then + echo "Found Boot drive at /dev/${device}1" + fi + found="yes" + fi + umount $BOOTMEDIAMNTPOINT 2> /dev/null + if [ "$found" = "yes" ]; then + break; + fi + if [ "$QUIET" == "" ]; then + echo "/dev/${device}1 does not contain a rootfs" + fi + fi + fi + fi + done + if [ "$found" = "yes" ]; then + break; + fi + /bin/sleep 5 + done + if [ "$QUIET" == "" ]; then + echo "will mount root from /dev/${device}1" + fi + + mount -t vfat -o rw,umask=000 /dev/${device}1 $BOOTMEDIAMNTPOINT 2> /dev/null + + while [ ! -e $BOOTMEDIAMNTPOINT/rootfs.img ]; do + /bin/sleep 1 + if [ "$QUIET" == "" ]; then + echo "Trying again /dev/${device} ...." + fi + mount -t vfat -o rw,umask=000 /dev/${device}1 $BOOTMEDIAMNTPOINT 2> /dev/null + done + fi + + XBMC_BOOTTORAM="$( echo $XBMC_PARAMS | grep "boottoram" )" + + if [ "$XBMC_BOOTTORAM" != "" ]; then + if [ "$QUIET" == "" ]; then + echo "Copying boot media to RAM ...." + fi + + # TODO calc size from boot media + mkdir /bootmediamntRAM + mount -t tmpfs -o size=500M none /bootmediamntRAM + cp -R $BOOTMEDIAMNTPOINT/* /bootmediamntRAM 2> /dev/null + umount $BOOTMEDIAMNTPOINT + $BOOTMEDIAMNTPOINT=/bootmediamntRAM + fi + + mount -o ro,loop -t squashfs $BOOTMEDIAMNTPOINT/rootfs.img /squashmnt1 + + if [ "$XBMC_NVIDIA" != "" ]; then + if [ -f $BOOTMEDIAMNTPOINT/restrictedDrivers.nvidia.img ]; then + if [ "$QUIET" = "" ]; then + echo "Mounting NVIDIA drivers..." + fi + mount -o ro,loop,noatime,nodiratime $BOOTMEDIAMNTPOINT/restrictedDrivers.nvidia.img /squashmnt2 + fi + else + if [ "$XBMC_AMD" != "" ]; then + if [ -f $BOOTMEDIAMNTPOINT/restrictedDrivers.amd.img ]; then + if [ "$QUIET" = "" ]; then + echo "Mounting AMD drivers..." + fi + mount -o ro,loop,noatime,nodiratime $BOOTMEDIAMNTPOINT/restrictedDrivers.amd.img /squashmnt2 + fi + else + mount -t tmpfs -o noatime,nodiratime none /squashmnt2 + + if [ "$QUIET" = "" ]; then + echo "Defaulting to Xorg autodetect..." + fi + fi + fi + + if [ -f $BOOTMEDIAMNTPOINT/ext3fs.img ]; then + mount -o rw,loop,noatime,nodiratime $BOOTMEDIAMNTPOINT/ext3fs.img /persistmnt + else + mount -t tmpfs -o noatime,nodiratime none /persistmnt + fi + + mount -t unionfs -o dirs=/persistmnt=rw:/squashmnt2=ro:/squashmnt1=ro none ${rootmnt} + + # Correct the permissions of /: + chmod 755 "${rootmnt}" + + # Make sure the individual ro and rw mounts are accessible from within the root + # once the union is assumed as /. This makes it possible to access the + # component filesystems individually. + if [ ! -e "${rootmnt}/.bootMedia" ]; then + mkdir "${rootmnt}/.bootMedia" + fi + #mkdir "${rootmnt}/.ro1" "${rootmnt}/.ro2" "${rootmnt}/.rw" + + mount --bind $BOOTMEDIAMNTPOINT "${rootmnt}/.bootMedia" + #mount --bind /squashmnt1 "${rootmnt}/.ro1" + #mount --bind /squashmnt2 "${rootmnt}/.ro2" + #mount --bind /persistmnt "${rootmnt}/.rw" + + if [ -f $BOOTMEDIAMNTPOINT/config/fstab ]; then + cp $BOOTMEDIAMNTPOINT/config/fstab ${rootmnt}/etc/fstab + rm $BOOTMEDIAMNTPOINT/config/fstab + fi + + if [ -f $BOOTMEDIAMNTPOINT/ext3fs.img ]; then + XBMC_TEMPFS="$(echo $XBMC_PARAMS | grep "tempfs" )" + if [ "$XBMC_TEMPFS" != "" ]; then + ALREADY_DONE="$(cat ${rootmnt}/etc/fstab | grep "tmpfs" )" + if [ "$ALREADY_DONE" = "" ]; then + echo "tmpfs /var/log/apt tmpfs defaults 0 0" >> ${rootmnt}/etc/fstab + echo "tmpfs /var/log tmpfs defaults 0 0" >> ${rootmnt}/etc/fstab + echo "tmpfs /tmp tmpfs defaults 0 0" >> ${rootmnt}/etc/fstab + echo "tmpfs /var/tmp tmpfs defaults 0 0" >> ${rootmnt}/etc/fstab + fi + fi + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/shadow ]; then + cp $BOOTMEDIAMNTPOINT/config/shadow ${rootmnt}/etc + rm $BOOTMEDIAMNTPOINT/config/fstab + chmod 640 ${rootmnt}/etc/shadow + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/rc.local ]; then + cp $BOOTMEDIAMNTPOINT/config/rc.local ${rootmnt}/etc + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/xorg.conf ]; then + cp $BOOTMEDIAMNTPOINT/config/xorg.conf ${rootmnt}/etc/X11 + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/lircd.conf ]; then + cp $BOOTMEDIAMNTPOINT/config/lircd.conf ${rootmnt}/etc/lirc + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/hardware.conf ]; then + cp $BOOTMEDIAMNTPOINT/config/hardware.conf ${rootmnt}/etc/lirc + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/interfaces ]; then + cp $BOOTMEDIAMNTPOINT/config/interfaces ${rootmnt}/etc/network + fi +} diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/hooks/mobile b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/hooks/mobile new file mode 100755 index 0000000000..7091bcce3a --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/hooks/mobile @@ -0,0 +1,33 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# These paths are inside the target filesystem +. /usr/share/initramfs-tools/hook-functions +# These source files are put into the target's /etc/initramfs-tools/ by +# InstallImage.py + +# If we have a generated config file, copy it +CFG_FILE=/etc/initramfs-tools/moblin-initramfs.cfg +if [ -f ${CFG_FILE} ] +then + cp -f ${CFG_FILE} ${DESTDIR}/etc/ +fi + +cp -f /etc/initramfs-tools/usplash.conf ${DESTDIR}/etc/usplash.conf +copy_exec /etc/initramfs-tools/usb /scripts/usb +copy_exec /etc/initramfs-tools/disk /scripts/disk +copy_exec /etc/initramfs-tools/cd /scripts/cd diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/initramfs.conf b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/initramfs.conf new file mode 100644 index 0000000000..b0d1dc018c --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/initramfs.conf @@ -0,0 +1,54 @@ +# +# initramfs.conf +# Configuration file for mkinitramfs(8). See initramfs.conf(5). +# + +# +# MODULES: [ most | netboot | dep | list ] +# +# most - Add all framebuffer, acpi, filesystem, and harddrive drivers. +# +# dep - Try and guess which modules to load. +# +# netboot - Add the base modules, network modules, but skip block devices. +# +# list - Only include modules from the 'additional modules' list +# + +MODULES=most + +# BUSYBOX: [ y | n ] +# +# Use busybox if available. +# + +BUSYBOX=y + +# +# NFS Section of the config. +# + +# +# BOOT: [ local | nfs ] +# +# local - Boot off of local media (harddrive, USB stick). +# +# nfs - Boot using an NFS drive as the root of the drive. +# + +BOOT=local + +# +# DEVICE: ... +# +# Specify the network interface, like eth0 +# + +DEVICE=eth0 + +# +# NFSROOT: [ auto | HOST:MOUNT ] +# + +NFSROOT=auto + diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/modules b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/modules new file mode 100644 index 0000000000..a28aa1a052 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/modules @@ -0,0 +1,32 @@ +usbcore +asix +nfs +hid +usbhid +ehci-hcd +uhci-hcd +ide-core +scsi_mod +sd_mod +libusual +usb-storage +unionfs +squashfs +fat +vfat +nls_cp437 +nls_iso8859-1 +loop +mbcache +jbd +ext2 +ext3 +fbcon +cdrom +isofs +sg +ata_generic +#sr_mod +#sd_mod +libata + diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/nand b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/nand new file mode 100755 index 0000000000..59d785f159 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/nand @@ -0,0 +1,8 @@ +#!/bin/sh +# nand filesystem mounting -*- shell-script -*- +# current is only the hack shell inside the initrd + +mountroot () +{ + /bin/bash +} diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/usb b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/usb new file mode 100755 index 0000000000..e12e608479 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/usb @@ -0,0 +1,233 @@ +#!/bin/bash +# Live USB filesystem mounting -*- shell-script -*- + +#Function for parsing command line options with "=" in them +# get_opt("init=/sbin/init") will return "/sbin/init" +get_opt() { + echo "$@" | cut -d "=" -f 2 +} + +mountroot () +{ + CFG_FILE=/etc/moblin-initramfs.cfg + QUIET="$(grep "quiet" /proc/cmdline)" + + if [ -f ${CFG_FILE} ] + then + . ${CFG_FILE} + else + if [ "$QUIET" == "" ]; then + echo "Did not find config file: ${CFG_FILE}" + fi + sleep 5 + halt + fi + + + CMDLINE=$(cat /proc/cmdline) + + #Process command line options + XBMC_PARAMS="" + for i in ${CMDLINE}; do + case "${i}" in + xbmc\=*) + XBMC_PARAMS=$(get_opt $i) + ;; + esac + done + + AUTOGPU="$( echo $XBMC_PARAMS | grep "autogpu" )" + + if [ "$AUTOGPU" != "" ]; then + # Needs lspci in initramfs, not yet there + if [ "$QUIET" = "" ]; then + echo "found auto" + fi + XBMC_AMD="$(lspci -nn | grep 0300 | grep 1002)" + XBMC_NVIDIA="$(lspci -nn | grep 0300 | grep 10de)" + else + XBMC_NVIDIA="$( echo $XBMC_PARAMS | grep "nvidia" )" + XBMC_AMD="$( echo $XBMC_PARAMS | grep "amd" )" + fi + + BOOTMEDIAMNTPOINT=/bootmediamnt + mkdir -p $BOOTMEDIAMNTPOINT + mkdir -p /squashmnt1 + mkdir -p /squashmnt2 + mkdir -p /persistmnt + + if [ "$ROOT" != "" ]; then + if [ "$QUIET" == "" ]; then + echo "will mount root from ${ROOT}" + fi + + mount -t vfat -o rw,umask=000 $ROOT $BOOTMEDIAMNTPOINT 2> /dev/null + while [ ! -e $BOOTMEDIAMNTPOINT/rootfs.img ]; do + /bin/sleep 1 + if [ "$QUIET" == "" ]; then + echo "Trying again $ROOT ...." + fi + mount -t vfat -o rw,umask=000 $ROOT $BOOTMEDIAMNTPOINT 2> /dev/null + done + else + # Find the USB flash drive + found="no" + while true + do + for device in 'sda' 'sdb' 'sdc' 'sdd' 'sde' 'sdf' 'sdg'; do + if [ "$QUIET" == "" ]; then + echo "checking device /dev/${device} for installation source..." + fi + if [ -b /dev/${device} ]; then + if [ -e /sys/block/${device}/removable ]; then + if [ "$(cat /sys/block/${device}/removable)" = "1" ]; then + if [ "$QUIET" == "" ]; then + echo "Found USB flash drive at /dev/${device}" + fi + mount -t vfat -o rw,umask=0 /dev/${device}1 $BOOTMEDIAMNTPOINT 2> /dev/null + if [ -f $BOOTMEDIAMNTPOINT/rootfs.img ] ; then + if [ "$QUIET" == "" ]; then + echo "Found Boot drive at /dev/${device}1" + fi + found="yes" + fi + umount $BOOTMEDIAMNTPOINT 2> /dev/null + if [ "$found" = "yes" ]; then + break; + fi + if [ "$QUIET" == "" ]; then + echo "/dev/${device}1 does not contain a rootfs" + fi + fi + fi + fi + done + if [ "$found" = "yes" ]; then + break; + fi + /bin/sleep 5 + done + if [ "$QUIET" == "" ]; then + echo "will mount root from /dev/${device}1" + fi + + mount -t vfat -o rw,umask=000 /dev/${device}1 $BOOTMEDIAMNTPOINT 2> /dev/null + + while [ ! -e $BOOTMEDIAMNTPOINT/rootfs.img ]; do + /bin/sleep 1 + if [ "$QUIET" == "" ]; then + echo "Trying again /dev/${device} ...." + fi + mount -t vfat -o rw,umask=000 /dev/${device}1 $BOOTMEDIAMNTPOINT 2> /dev/null + done + fi + + XBMC_BOOTTORAM="$( echo $XBMC_PARAMS | grep "boottoram" )" + + if [ "$XBMC_BOOTTORAM" != "" ]; then + if [ "$QUIET" == "" ]; then + echo "Copying boot media to RAM ...." + fi + + # TODO calc size from boot media + mkdir /bootmediamntRAM + mount -t tmpfs -o size=500M none /bootmediamntRAM + cp -R $BOOTMEDIAMNTPOINT/* /bootmediamntRAM 2> /dev/null + umount $BOOTMEDIAMNTPOINT + $BOOTMEDIAMNTPOINT=/bootmediamntRAM + fi + + mount -o ro,loop -t squashfs $BOOTMEDIAMNTPOINT/rootfs.img /squashmnt1 + + if [ "$XBMC_NVIDIA" != "" ]; then + if [ -f $BOOTMEDIAMNTPOINT/restrictedDrivers.nvidia.img ]; then + if [ "$QUIET" = "" ]; then + echo "Mounting NVIDIA drivers..." + fi + mount -o ro,loop,noatime,nodiratime $BOOTMEDIAMNTPOINT/restrictedDrivers.nvidia.img /squashmnt2 + fi + else + if [ "$XBMC_AMD" != "" ]; then + if [ -f $BOOTMEDIAMNTPOINT/restrictedDrivers.amd.img ]; then + if [ "$QUIET" = "" ]; then + echo "Mounting AMD drivers..." + fi + mount -o ro,loop,noatime,nodiratime $BOOTMEDIAMNTPOINT/restrictedDrivers.amd.img /squashmnt2 + fi + else + mount -t tmpfs -o noatime,nodiratime none /squashmnt2 + + if [ "$QUIET" = "" ]; then + echo "Defaulting to Xorg autodetect..." + fi + fi + fi + + if [ -f $BOOTMEDIAMNTPOINT/ext3fs.img ]; then + mount -o rw,loop,noatime,nodiratime $BOOTMEDIAMNTPOINT/ext3fs.img /persistmnt + else + mount -t tmpfs -o noatime,nodiratime none /persistmnt + fi + + mount -t unionfs -o dirs=/persistmnt=rw:/squashmnt2=ro:/squashmnt1=ro none ${rootmnt} + + # Correct the permissions of /: + chmod 755 "${rootmnt}" + + # Make sure the individual ro and rw mounts are accessible from within the root + # once the union is assumed as /. This makes it possible to access the + # component filesystems individually. + if [ ! -e "${rootmnt}/.bootMedia" ]; then + mkdir "${rootmnt}/.bootMedia" + fi + #mkdir "${rootmnt}/.ro1" "${rootmnt}/.ro2" "${rootmnt}/.rw" + + mount --bind $BOOTMEDIAMNTPOINT "${rootmnt}/.bootMedia" + #mount --bind /squashmnt1 "${rootmnt}/.ro1" + #mount --bind /squashmnt2 "${rootmnt}/.ro2" + #mount --bind /persistmnt "${rootmnt}/.rw" + + if [ -f $BOOTMEDIAMNTPOINT/config/fstab ]; then + cp $BOOTMEDIAMNTPOINT/config/fstab ${rootmnt}/etc/fstab + rm $BOOTMEDIAMNTPOINT/config/fstab + fi + + if [ -f $BOOTMEDIAMNTPOINT/ext3fs.img ]; then + XBMC_TEMPFS="$(echo $XBMC_PARAMS | grep "tempfs" )" + if [ "$XBMC_TEMPFS" != "" ]; then + ALREADY_DONE="$(cat ${rootmnt}/etc/fstab | grep "tmpfs" )" + if [ "$ALREADY_DONE" = "" ]; then + echo "tmpfs /var/log/apt tmpfs defaults 0 0" >> ${rootmnt}/etc/fstab + echo "tmpfs /var/log tmpfs defaults 0 0" >> ${rootmnt}/etc/fstab + echo "tmpfs /tmp tmpfs defaults 0 0" >> ${rootmnt}/etc/fstab + echo "tmpfs /var/tmp tmpfs defaults 0 0" >> ${rootmnt}/etc/fstab + fi + fi + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/shadow ]; then + cp $BOOTMEDIAMNTPOINT/config/shadow ${rootmnt}/etc + rm $BOOTMEDIAMNTPOINT/config/shadow + chmod 640 ${rootmnt}/etc/shadow + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/rc.local ]; then + cp $BOOTMEDIAMNTPOINT/config/rc.local ${rootmnt}/etc + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/xorg.conf ]; then + cp $BOOTMEDIAMNTPOINT/config/xorg.conf ${rootmnt}/etc/X11 + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/lircd.conf ]; then + cp $BOOTMEDIAMNTPOINT/config/lircd.conf ${rootmnt}/etc/lirc + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/hardware.conf ]; then + cp $BOOTMEDIAMNTPOINT/config/hardware.conf ${rootmnt}/etc/lirc + fi + + if [ -f $BOOTMEDIAMNTPOINT/config/interfaces ]; then + cp $BOOTMEDIAMNTPOINT/config/interfaces ${rootmnt}/etc/network + fi +} diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/usplash.conf b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/usplash.conf new file mode 100644 index 0000000000..e4e25a1ed7 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/initramfs/usplash.conf @@ -0,0 +1,3 @@ +# Usplash configuration file +xres=1024 +yres=768 diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/install.sh b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/install.sh new file mode 100755 index 0000000000..949835595c --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/install.sh @@ -0,0 +1,271 @@ +#!/bin/bash + +# This is the script that will be placed onto the USB flash drive, that will +# run on bootup to install the software onto the device. + +# I want us to error out if we use an undefined variable, so we will catch errors. +set -u + +# Read in our config file, if it exists +if [ -f /install.cfg ] +then + echo "Sourcing ./install.cfg" + . /install.cfg +else + echo "ERROR: ./install.cfg not found!" + echo "In script: $0 $*" + sleep 10 + halt +fi + +#################### usplash functions start #################################### +SPLASHWRITE=0 +# Determine if we have usplash_write available +type usplash_write > /dev/null 2>&1 && SPLASHWRITE=1 + +# Disable usplash, since we want text mode +SPLASHWRITE=0 + +BOOTDEVICE=$1 + +# show the progress at status bar. +# $1 = 0-100 +splash_progress(){ + splash_write "PROGRESS $1" + return 0 +} +# display the text no matter whether verbose is set or not +splash_display(){ + echo "$@" + splash_write "TEXT-URGENT $@" + return 0 +} +# set the splash delay time +splash_delay(){ + splash_write "TIMEOUT $1" + return 0 +} +# call the usplash_write command, if enabled +splash_write(){ + if [ "${SPLASHWRITE}" -eq 1 ] + then + usplash_write "$@" + else: + echo "ussplash_write: $@" + fi +} +####################### usplash functions end ############################### + +splash_delay 200 +splash_display 'INSTALL..........' + +pre_scsi_disk_number=$( ls /sys/class/scsi_disk | wc -l) +found=no +# Find the install disk +while true; do + for device in 'hda' 'hdb' 'sda' 'sdb' + do + echo "checking device: /dev/${device} for installation target" + if [ -e /sys/block/${device}/removable ]; then + if [ "$(cat /sys/block/${device}/removable)" = "0" ]; then + if cat /proc/mounts | grep /dev/${device} + then + continue + else + found="yes" + splash_display "found harddisk at /dev/${device}" + break + fi + fi + fi + done + if [ "$found" = "yes" ]; then + break; + fi + /bin/sleep 5 + echo "Did not find an installation target device" +done +echo "will install to /dev/${device}" + +blocks=`fdisk -s /dev/${device}` +cylinders=$((blocks*2/63/255)) + +splash_display "Deleting Partition Table on /dev/${device} ..." +splash_delay 200 +dd if=/dev/zero of=/dev/${device} bs=512 count=2 +sync +splash_progress 5 +splash_delay 10 + +splash_display "Creating New Partiton Table on /dev/${device} ..." +splash_delay 200 + +fdisk /dev/${device} <<EOF +n +p +1 + +$((boot_partition_size*1000/8192)) +n +p +2 + +$((cylinders-((swap_partition_size+fat32_partition_size)*1000/8192))) +a +1 +w +EOF + +if [ $swap_partition_size -ne 0 ] +then + fdisk /dev/${device} <<EOF +n +p +3 + +$((cylinders-(fat32_partition_size*1000/8192))) +t +3 +82 +w +EOF + if [ $fat32_partition_size -gt 0 ] + then + fdisk /dev/${device} <<EOF +n +p +4 + + +t +4 +c +w +EOF + fi +else if [ $fat32_partition_size -gt 0 ] + then + fdisk /dev/${device} <<EOF +n +p +3 + + +t +3 +c +w +EOF + fi +fi + +sync +splash_progress 10 +splash_delay 10 + +splash_display "Formatting /dev/${device}1 w/ ext3..." +splash_delay 200 +mkfs.ext3 /dev/${device}1 +sync +splash_progress 20 +splash_delay 10 + +splash_display "Formatting /dev/${device}2 w/ ext3..." +splash_delay 200 +mkfs.ext3 /dev/${device}2 +sync +splash_progress 60 +splash_delay 10 + +if [ $swap_partition_size -ne 0 ] +then + splash_display "Formatting /dev/${device}3 w/ swap..." + splash_delay 1000 + mkswap /dev/${device}3 + if [ $fat32_partition_size -ne 0 ] + then + splash_display "Formatting /dev/${device}4 w/ vfat..." + splash_delay 1000 + mkfs.vfat /dev/${device}4 + fi +else if [ $fat32_partition_size -ne 0 ] + then + splash_display "Formatting /dev/${device}3 w/ vfat..." + splash_delay 1000 + mkfs.vfat /dev/${device}3 + fi +fi +sync +splash_progress 65 +splash_delay 10 + +splash_display 'Mounting partitions...' +splash_delay 200 +mkdir /tmp/boot +mount -o loop -t squashfs /tmp/install/bootfs.img /tmp/boot + +mount /dev/${device}2 /mnt +mkdir /mnt/boot +mount /dev/${device}1 /mnt/boot +splash_progress 70 +splash_delay 10 + +splash_display 'Copying system files onto hard disk drive...' +splash_delay 200 +cp -av /tmp/boot /mnt + +if [ "${use_squashfs}" -eq 1 ] +then + echo "Copying squashfs filesystem into place..." + cp -v /tmp/install/rootfs.img /mnt/boot +else + echo "Setting up NON squashfs filesystem..." + mkdir /tmp/root + mount -o loop -t squashfs /tmp/install/rootfs.img /tmp/root + splash_display 'Copying system ROOT onto hard disk drive...' + cp -av /tmp/root/. /mnt +fi +/usr/sbin/grub-install --root-directory=/mnt /dev/${device} +splash_progress 90 +splash_delay 10 + +splash_display 'Unmounting partitions...' +splash_delay 200 + +umount /mnt/boot +umount /mnt +umount /tmp/boot +umount /tmp/install + +splash_progress 95 +splash_delay 10 +sleep 1 +splash_delay 6000 +splash_display "Install Successfully" +# need to call reboot --help and let file system cache hold it, since we will +# unplug USB disk soon, and after that, reboot command will not be accessible. +# The reason why reboot still works sometimes without this is the whole +# "rootfs.img" is cached when it is copied to HD. But when rootfs.img become +# bigger and bigger the whole "rootfs.img" will not be able to fully cached (we +# have found this issue when creating big installation) +reboot --help > /dev/null 2>&1 + + +case $BOOTDEVICE in +usb) + splash_display "Unplug USB Key, System Will Reboot Automatically" + while [ $pre_scsi_disk_number = $(ls /sys/class/scsi_disk | wc -l) ] + do + sleep 1 + done + ;; +cd) + splash_display "Sysstem Will Reboot after 5 seconds" + sleep 5 + ;; +esac + +splash_progress 100 +splash_delay 1 + +reboot -f diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/nand.sh b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/nand.sh new file mode 100755 index 0000000000..6e941794f6 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/nand.sh @@ -0,0 +1,121 @@ +#!/bin/bash +# $1 is cmdline path +# $2 is bootstub path +# $3 is bzImage path +# $4 is initrd path +# $5 is rootfs path +# $6 is nand image size in MB +# $7 is boot image (content of logical partition1, DEBUG for ESL) +# $8 is output nand image (logical partition1 +logical partition2) + +if [ $# -lt 8 ]; then + echo "usage: nand.sh cmdline_path bootstub_path bzImage_path initrd_path rootfs_path img_size mem_size boot_path img_path" + exit 1 +fi + +if [ ! -e "$1" ]; then + echo "cmdline file not exist!" + exit 1 +fi + +if [ ! -e "$2" ]; then + echo "bootstub file not exist!" + exit 1 +fi + +if [ ! -e "$3" ]; then + echo "no kernel bzImage file!" + exit 1 +fi + +if [ ! -e "$4" ]; then + echo "no initrd file!" + exit 1 +fi + +if [ ! -d "$5" ]; then + echo "no rootfs path!" + exit 1 +fi + +# convert a decimal number to the sequence that printf could recognize to output binary integer (not ASCII) +binstring () +{ + h1=$(($1%256)) + h2=$((($1/256)%256)) + h3=$((($1/256/256)%256)) + h4=$((($1/256/256/256)%256)) + binstr=`printf "\x5cx%02x\x5cx%02x\x5cx%02x\x5cx%02x" $h1 $h2 $h3 $h4` +} + +# add cmdline to the first part of boot image +cat $1 /dev/zero | dd of=$7 bs=4096 count=1 + +# append bootstub +cat $2 /dev/zero | dd of=$7 bs=4096 count=1 seek=1 + +# append bzImage and initrd +cat $3 $4 | dd of=$7 bs=4096 seek=2 + +# fill bzImage_size and initrd_size +binstring `stat -c %s $3` +printf $binstr | dd of=$7 bs=1 seek=256 conv=notrunc +binstring `stat -c %s $4` +printf $binstr | dd of=$7 bs=1 seek=260 conv=notrunc + +# quick test by exiting here, only get *.bin.boot file for ESL +echo 'I will exit here to only produce [name].bin.boot file for ESL testing' +exit 0 + +# prepare the final image contains two logical partitions +HEADERS=4 +SECTORS=16 + +dd if=/dev/zero of=$8 bs=$((1024*1024)) count=$6 +size=`stat -c %s $7` +units=${HEADERS}*${SECTORS}*512 + +# partition1_cylinders actually contain the partition table's 1 track of sectors +partition1_cylinders=$(((size + units-1 + SECTORS*512)/units)) +echo "logical partition1 is $partition1_cylinders" +/sbin/fdisk -C $(($6*1024*1024/units)) -H ${HEADERS} -S ${SECTORS} $8 <<EOF +n +p +1 + +$partition1_cylinders +n +p +2 + + +w +EOF + +# ok, is time to slice the disk to pieces :-) +# first, it the logical partition table +dd if=$8 bs=512 count=${SECTORS} of=$8-0 +# then the logical partition1 +dd if=$8 bs=512 count=$((partition1_cylinders*HEADERS*SECTORS-SECTORS)) skip=${SECTORS} of=$8-1 +# then all the rest are for partition2 +dd if=$8 bs=512 skip=$((partition1_cylinders*HEADERS*SECTORS)) of=$8-2 + +# prepare the logical partition1 +dd if=$7 of=$8-1 bs=4096 conv=notrunc +# prepare the logical partition2, format it to ext3 and copy rootfs onto it +/sbin/mkfs -t ext3 $8-2 <<EOF +y +EOF +sudo mkdir -p /tmp/$(basename $8)-2.mnt +sudo mount -o loop $8-2 /tmp/$(basename $8)-2.mnt +echo "cp -a $5/* /tmp/$(basename $8)-2.mnt" +sudo cp -av $5/* /tmp/$(basename $8)-2.mnt +sudo umount $8-2 +sudo rm -rf /tmp/$(basename $8)-2.mnt + +# ok, is time to combine the slices +cat $8-0 $8-1 $8-2 | dd of=$8 bs=4096 +rm -rf $8-0 $8-1 $8-2 + +# done +echo "done with creating NAND image : whole image file (boot partition + rootfs partition)is $8, the boot image file is $7 (for ESL)" diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/sources/ubuntu.com.list b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/sources/ubuntu.com.list new file mode 100644 index 0000000000..ecc8efd998 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/sources/ubuntu.com.list @@ -0,0 +1,10 @@ +deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted universe multiverse + +deb http://archive.canonical.com/ubuntu jaunty partner + +deb http://security.ubuntu.com/ubuntu/ jaunty-security universe main multiverse restricted + +deb http://archive.ubuntu.com/ubuntu/ jaunty-updates universe main multiverse restricted +deb http://archive.ubuntu.com/ubuntu/ jaunty-backports universe main multiverse restricted + + diff --git a/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/sources/xbmc.org.list b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/sources/xbmc.org.list new file mode 100644 index 0000000000..83e6a2a1c9 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/i386-jaunty-xbmc/sources/xbmc.org.list @@ -0,0 +1,4 @@ +deb http://ppa.launchpad.net/team-xbmc-svn/ppa/ubuntu/ jaunty main +# deb http://ppa.launchpad.net/xbmc-addons/ppa/ubuntu/ jaunty main + + diff --git a/tools/XBMCLive/Creator/platforms/platforms.cfg b/tools/XBMCLive/Creator/platforms/platforms.cfg new file mode 100644 index 0000000000..2008646712 --- /dev/null +++ b/tools/XBMCLive/Creator/platforms/platforms.cfg @@ -0,0 +1,4 @@ +[i386-jaunty-xbmc] +description = Generic i386 platform using Jaunty +package_manager = apt +target_os = ubuntu |