diff options
Diffstat (limited to 'build_tools')
74 files changed, 3148 insertions, 0 deletions
diff --git a/build_tools/archiso/mythvantage/aitab.netinstall b/build_tools/archiso/mythvantage/aitab.netinstall new file mode 100644 index 0000000..afab395 --- /dev/null +++ b/build_tools/archiso/mythvantage/aitab.netinstall @@ -0,0 +1,6 @@ +# <img> <mnt> <arch> <sfs_comp> <fs_type> <fs_size> +root-image / %ARCH% xz ext4 50% +lib-modules /lib/modules %ARCH% xz ext4 50% +var-lib-pacman /var/lib/pacman %ARCH% xz ext4 50% +data-storage-disk0-pacman-pkg /data/storage/disk0/pacman/pkg %ARCH% xz ext4 50% +usr-share /usr/share any xz ext4 50% diff --git a/build_tools/archiso/mythvantage/build.sh b/build_tools/archiso/mythvantage/build.sh new file mode 100755 index 0000000..bf8e2ea --- /dev/null +++ b/build_tools/archiso/mythvantage/build.sh @@ -0,0 +1,643 @@ +#!/bin/bash +set -e -u +iso_name=linhes.iso +iso_label="linhes_$(date +%Y%m)" +iso_version=$(date +%Y.%m.%d) +install_dir=arch +arch=$(uname -m) +work_dir=/tmp/work +out_dir=/tmp +verbose="" +cmd_args="" + +script_path=$(readlink -f ${0%/*}) + +pacman_cache_files="data-storage-disk0-pacman-pkg" +cache_dirs="/data/storage/disk0/pacman/pkg" +pacman_cache=${cache_dirs} + +setup_workdir() { + #JM + #this is complicated way todo a mv ${script_path}/pacman.conf $work_dir/pacman.conf + #but we can't do a move because it's called at least 3 times. + #cache_dirs=($(pacman --config ${script_path}/pacman.conf -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) + #cache_dirs=($(pacman -C ${pacman_conf} -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) + mkdir -p "${work_dir}" + + pacman_conf="${work_dir}/pacman.conf" + + sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${cache_dirs[@]})|g" \ + "${script_path}/pacman.conf" > "${pacman_conf}" + +} + +# Base installation (root-image) +make_basefs() { + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" init + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd curl" install +} + +# Additional packages (root-image) +make_packages() { + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" install +} + +# Copy mkinitcpio archiso hooks (root-image) +make_setup_mkinitcpio() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + local _hook + for _hook in archiso archiso_shutdown archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_loop_mnt; do + cp /usr/lib/initcpio/hooks/${_hook} ${work_dir}/root-image/usr/lib/initcpio/hooks + cp /usr/lib/initcpio/install/${_hook} ${work_dir}/root-image/usr/lib/initcpio/install + done + cp /usr/lib/initcpio/install/archiso_kms ${work_dir}/root-image/usr/lib/initcpio/install + cp /usr/lib/initcpio/archiso_shutdown ${work_dir}/root-image/usr/lib/initcpio + cp /usr/lib/initcpio/archiso_pxe_nbd ${work_dir}/root-image/usr/lib/initcpio + cp ${script_path}/mkinitcpio.conf ${work_dir}/root-image/etc/mkinitcpio-archiso.conf + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Prepare ${install_dir}/boot/ +make_boot() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + local _src=${work_dir}/root-image + local _dst_boot=${work_dir}/iso/${install_dir}/boot + mkdir -p ${_dst_boot}/${arch} + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ + -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' \ + run + mv ${_src}/boot/archiso.img ${_dst_boot}/${arch}/archiso.img + #mv ${_src}/boot/vmlinuz-linux ${_dst_boot}/${arch}/vmlinuz + #JM FINDME + cp ${_src}/boot/vmlinuz-linux ${_dst_boot}/${arch}/vmlinuz + cp ${_src}/boot/memtest86+/memtest.bin ${_dst_boot}/memtest + cp ${_src}/usr/share/licenses/common/GPL2/license.txt ${_dst_boot}/memtest.COPYING + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Prepare EFI "El Torito" boot image (using Linux >= 3.3 EFI boot stub) +make_boot_efi() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + if [[ ${arch} == "x86_64" ]]; then + mkdir -p ${work_dir}/iso/EFI/archiso + dd of=${work_dir}/iso/EFI/archiso/efiboot.img bs=1 seek=20M count=0 + mkfs.vfat ${work_dir}/iso/EFI/archiso/efiboot.img + + mkdir -p ${work_dir}/efiboot + mount ${work_dir}/iso/EFI/archiso/efiboot.img ${work_dir}/efiboot + + mkdir -p ${work_dir}/efiboot/EFI/archiso + cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/archiso/vmlinuz.efi + cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/archiso/archiso.img + + # There are plans to support command line options via a config file (not yet in linux-3.3) + #cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/boot/bootx64.efi + #cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/boot/linux.img + #echo "archisolabel=${iso_label} initrd=\EFI\boot\linux.img" | iconv -f ascii -t ucs2 > ${work_dir}/iso/EFI/boot/linux.conf + + # For now, provide an EFI-shell until 'linux.conf' hits mainline. + mkdir -p ${work_dir}/efiboot/EFI/boot + # EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell ) + #wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi + # EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell ) + wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi + + # Add an EFI shell script for automatic boot if ESC-key is not pressed within 5 seconds timeout. + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/EFI/boot/startup.nsh > ${work_dir}/efiboot/EFI/boot/startup.nsh + + umount ${work_dir}/efiboot + fi + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Prepare /${install_dir}/boot/syslinux +make_syslinux() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + local _src_syslinux=${work_dir}/root-image/usr/lib/syslinux + local _dst_syslinux=${work_dir}/iso/${install_dir}/boot/syslinux + mkdir -p ${_dst_syslinux} + for _cfg in ${script_path}/syslinux/*.cfg; do + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g; + s|%ARCH%|${arch}|g" ${_cfg} > ${_dst_syslinux}/${_cfg##*/} + done + cp ${script_path}/syslinux/splash.png ${_dst_syslinux} + cp ${_src_syslinux}/*.c32 ${_dst_syslinux} + cp ${_src_syslinux}/*.com ${_dst_syslinux} + cp ${_src_syslinux}/*.0 ${_dst_syslinux} + cp ${_src_syslinux}/memdisk ${_dst_syslinux} + mkdir -p ${_dst_syslinux}/hdt + cat ${work_dir}/root-image/usr/share/hwdata/pci.ids | gzip -9 > ${_dst_syslinux}/hdt/pciids.gz + cat ${work_dir}/root-image/lib/modules/*-ARCH/modules.alias | gzip -9 > ${_dst_syslinux}/hdt/modalias.gz + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Prepare /isolinux +make_isolinux() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + mkdir -p ${work_dir}/iso/isolinux + sed "s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/isolinux/isolinux.cfg > ${work_dir}/iso/isolinux/isolinux.cfg + cp ${work_dir}/root-image/usr/lib/syslinux/isolinux.bin ${work_dir}/iso/isolinux/ + cp ${work_dir}/root-image/usr/lib/syslinux/isohdpfx.bin ${work_dir}/iso/isolinux/ + : > ${work_dir}/build.${FUNCNAME} + fi +} + +#JM FIND ME +copy_pacman_root(){ + cp -f "${pacman_conf}" ${work_dir}/root-image/etc +} +find_size(){ + #find the size of the install. + #This is used to calculate progress on the install + tsize=`du -sm ${work_dir}/root-image | cut -f1` + echo "TOTALSIZE=$tsize" > ${work_dir}/root-image/root/.install_size + upsize=`du -sm --exclude data ${work_dir}/root-image |cut -f1` + echo "UPGRADESIZE=$upsize" >> ${work_dir}/root-image/root/.install_size +} + + +make_pristine_copy() { + echo "Creating copy of pristine file for later use" + cd $work_dir/root-image + pwd + cat ${script_path}/pristine.list | xargs tar -cf pristine.tar + cd - + +} + +make_cache_repo() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]] + then + local _url _urls _pkg_name _dst _pkgs _cache_dir + mkdir -p ${work_dir}/root-image/${pacman_cache} + old_cache=${work_dir}/old_cache + mkdir -p "$old_cache" + pacman --config "${pacman_conf}" -Sy -r ${work_dir}/root-image + echo "------------------------------------------" + for i in $(cat $script_path/packages.${arch}.cache) + do + echo "Adding $i to pacman cache" + _urls=$(pacman --config "${pacman_conf}" -Sp -r ${work_dir}/root-image ${i}) + cd $old_cache + for url in ${_urls} + do + echo "downloading $url" + wget -N ${url} + done + cd - + + done + cp -rp $old_cache/* ${work_dir}/root-image/${pacman_cache} + fi + echo "------------------------------------------" + + make_var_cache_pacman + make_var_lib_pacman +} + +make_var_cache_pacman(){ + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + mv ${work_dir}/root-image/${pacman_cache} ${work_dir}/${pacman_cache_files} + : > ${work_dir}/build.${FUNCNAME} + fi + +} +make_var_lib_pacman(){ + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + cp -rp ${work_dir}/root-image/var/lib/pacman ${work_dir}/var-lib-pacman + : > ${work_dir}/build.${FUNCNAME} + fi +} + + + +# Customize installation (root-image) +make_customize_root_image() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + cp -af ${script_path}/root-image ${work_dir} + chmod 750 ${work_dir}/root-image/etc/sudoers.d + chmod 440 ${work_dir}/root-image/etc/sudoers.d/g_wheel + mkdir -p ${work_dir}/root-image/etc/pacman.d + #JM + #mkdir -p ${work_dir}/storage/data/home + #wget -O ${work_dir}/root-image/etc/pacman.d/mirrorlist 'https://www.archlinux.org/mirrorlist/?country=all&protocol=http&use_mirror_status=on' + #sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist + #sed -i 's/#\(en_US\.UTF-8\)/\1/' ${work_dir}/root-image/etc/locale.gen + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ + -r 'locale-gen' \ + run + #JM + #mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ + # -r 'useradd -b "/storage/data/home" -m -p "" -G "audio,disk,optical,wheel,storage,video,users" mythtv' \ + # run + #: > ${work_dir}/build.${FUNCNAME} + fi +} + +# Split out /lib/modules from root-image (makes more "dual-iso" friendly) +make_lib_modules() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + mv ${work_dir}/root-image/lib/modules ${work_dir}/lib-modules + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Split out /usr/share from root-image (makes more "dual-iso" friendly) +make_usr_share() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + mv ${work_dir}/root-image/usr/share ${work_dir}/usr-share + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Make [core] repository, keep "any" pkgs in a separate fs (makes more "dual-iso" friendly) +make_core_repo() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + local _url _urls _pkg_name _dst _pkgs _cache_dir + mkdir -p ${work_dir}/repo-core-any + mkdir -p ${work_dir}/repo-core-${arch} + mkdir -p ${work_dir}/pacman.db/var/lib/pacman + pacman --config "${pacman_conf}" -Sy -r ${work_dir}/pacman.db + _pkgs=$(comm -2 -3 <(pacman --config "${pacman_conf}" -Sql -r ${work_dir}/pacman.db core | sort | sed 's@^@core/@') \ + <(grep -v ^# ${script_path}/core.exclude.${arch} | sort | sed 's@^@core/@')) + _urls=$(pacman --config "${pacman_conf}" -Sddp -r ${work_dir}/pacman.db ${_pkgs}) + pacman --config "${pacman_conf}" -Swdd -r ${work_dir}/pacman.db --noprogressbar --noconfirm ${_pkgs} + for _url in ${_urls}; do + _pkg_name=${_url##*/} + _dst=${work_dir}/repo-core-${arch}/${_pkg_name} + for _cache_dir in ${cache_dirs[@]}; do + if [[ -e "${_cache_dir}/${_pkg_name}" ]]; then + cp "${_cache_dir}/${_pkg_name}" ${_dst} + fi + done + # download the package signature + #curl -sC - -f "${_url}.sig" > "${_dst}.sig" + repo-add -q ${work_dir}/repo-core-${arch}/core.db.tar.gz ${_dst} + # remove the signature file again as it is now included in the db file + rm -f "${_dst}.sig" + if [[ ${_pkg_name} == *any.pkg.tar* ]]; then + mv ${_dst} ${work_dir}/repo-core-any/${_pkg_name} + ln -sf ../any/${_pkg_name} ${_dst} + fi + done + # Remove old copy of db file + rm -f ${work_dir}/repo-core-${arch}/core.db.tar.gz.old + mkdir -p ${work_dir}/iso/${install_dir} + pacman --config "${pacman_conf}" -Sp -r ${work_dir}/pacman.db --print-format "%r/%n-%v" ${_pkgs} | sort > ${work_dir}/iso/${install_dir}/pkglist.repo-core.${arch}.txt + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Process aitab +# args: $1 (core | netinstall) +make_aitab() { + local _iso_type=${1} + if [[ ! -e ${work_dir}/build.${FUNCNAME}_${_iso_type} ]]; then + sed "s|%ARCH%|${arch}|g" ${script_path}/aitab.${_iso_type} > ${work_dir}/iso/${install_dir}/aitab + : > ${work_dir}/build.${FUNCNAME}_${_iso_type} + fi +} + +# Build all filesystem images specified in aitab (.fs .fs.sfs .sfs) +make_prepare() { + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" pkglist + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" prepare +} + +# Build ISO +# args: $1 (core | netinstall) +make_iso() { + local _iso_type=${1} + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" checksum + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${_iso_type}-${arch}.iso" + #JM + cd ${out_dir} + rm -f test3.iso + ln -s ${iso_name}-${iso_version}-${_iso_type}-${arch}.iso test3.iso + cd - +} + +# Build dual-iso images from ${work_dir}/i686/iso and ${work_dir}/x86_64/iso +# args: $1 (core | netinstall) +make_dual() { + local _iso_type=${1} + if [[ ! -e ${work_dir}/dual/build.${FUNCNAME}_${_iso_type} ]]; then + if [[ ! -d ${work_dir}/i686/iso || ! -d ${work_dir}/x86_64/iso ]]; then + echo "ERROR: i686 or x86_64 builds does not exist." + _usage 1 + fi + local _src_one _src_two _cfg + if [[ ${arch} == "i686" ]]; then + _src_one=${work_dir}/i686/iso + _src_two=${work_dir}/x86_64/iso + else + _src_one=${work_dir}/x86_64/iso + _src_two=${work_dir}/i686/iso + fi + mkdir -p ${work_dir}/dual/iso + cp -a -l -f ${_src_one} ${work_dir}/dual + cp -a -l -n ${_src_two} ${work_dir}/dual + rm -f ${work_dir}/dual/iso/${install_dir}/aitab + rm -f ${work_dir}/dual/iso/${install_dir}/boot/syslinux/*.cfg + if [[ ${_iso_type} == "core" ]]; then + if [[ ! -e ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs || + ! -e ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs || + ! -e ${work_dir}/dual/iso/${install_dir}/x86_64/repo-core-x86_64.sfs ]]; then + echo "ERROR: core_iso_single build is not found." + _usage 1 + fi + else + rm -f ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs + rm -f ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs + rm -f ${work_dir}/dual/iso/${install_dir}/x86_64/repo-core-x86_64.sfs + rm -f ${work_dir}/dual/iso/${install_dir}/pkglist.repo-core.i686.txt + rm -f ${work_dir}/dual/iso/${install_dir}/pkglist.repo-core.x86_64.txt + fi + paste -d"\n" <(sed "s|%ARCH%|i686|g" ${script_path}/aitab.${_iso_type}) \ + <(sed "s|%ARCH%|x86_64|g" ${script_path}/aitab.${_iso_type}) | uniq > ${work_dir}/dual/iso/${install_dir}/aitab + for _cfg in ${script_path}/syslinux.dual/*.cfg; do + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/dual/iso/${install_dir}/boot/syslinux/${_cfg##*/} + done + mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" checksum + mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${_iso_type}-dual.iso" + : > ${work_dir}/dual/build.${FUNCNAME}_${_iso_type} + fi +} + +purge_single () +{ + if [[ -d ${work_dir} ]]; then + find ${work_dir} -mindepth 1 -maxdepth 1 \ + ! -path ${work_dir}/iso -prune \ + | xargs rm -rf + fi +} + +purge_dual () +{ + if [[ -d ${work_dir}/dual ]]; then + find ${work_dir}/dual -mindepth 1 -maxdepth 1 \ + ! -path ${work_dir}/dual/iso -prune \ + | xargs rm -rf + fi +} + +clean_single () +{ + rm -rf ${work_dir} + rm -f ${out_dir}/${iso_name}-${iso_version}-*-${arch}.iso +} + +clean_dual () +{ + rm -rf ${work_dir}/dual + rm -f ${out_dir}/${iso_name}-${iso_version}-*-dual.iso +} + +make_common_single() { + make_basefs + make_packages + make_setup_mkinitcpio + make_boot + make_boot_efi + make_syslinux + make_isolinux + + #JM FIND ME + make_cache_repo + make_pristine_copy + copy_pacman_root + find_size + + make_customize_root_image + make_lib_modules + make_usr_share + make_aitab $1 + make_prepare $1 + make_iso $1 +} + +_usage () +{ + echo "usage ${0} [options] command <command options>" + echo + echo " General options:" + echo " -N <iso_name> Set an iso filename (prefix)" + echo " Default: ${iso_name}" + echo " -V <iso_version> Set an iso version (in filename)" + echo " Default: ${iso_version}" + echo " -L <iso_label> Set an iso label (disk label)" + echo " Default: ${iso_label}" + echo " -D <install_dir> Set an install_dir (directory inside iso)" + echo " Default: ${install_dir}" + echo " -w <work_dir> Set the working directory" + echo " Default: ${work_dir}" + echo " -o <out_dir> Set the output directory" + echo " Default: ${out_dir}" + echo " -v Enable verbose output" + echo " -h This help message" + echo + echo " Commands:" + echo " build <mode> <type>" + echo " Build selected .iso by <mode> and <type>" + echo " purge <mode>" + echo " Clean working directory except iso/ directory of build <mode>" + echo " clean <mode>" + echo " Clean working directory and .iso file in output directory of build <mode>" + echo + echo " Command options:" + echo " <mode> Valid values 'single', 'dual' or 'all'" + echo " <type> Valid values 'netinstall', 'core' or 'all'" + exit ${1} +} + +if [[ ${EUID} -ne 0 ]]; then + echo "This script must be run as root." + _usage 1 +fi + +while getopts 'N:V:L:D:w:o:vh' arg; do + case "${arg}" in + N) + iso_name="${OPTARG}" + cmd_args+=" -N ${iso_name}" + ;; + V) + iso_version="${OPTARG}" + cmd_args+=" -V ${iso_version}" + ;; + L) + iso_label="${OPTARG}" + cmd_args+=" -L ${iso_label}" + ;; + D) + install_dir="${OPTARG}" + cmd_args+=" -D ${install_dir}" + ;; + w) + work_dir="${OPTARG}" + cmd_args+=" -w ${work_dir}" + ;; + o) + out_dir="${OPTARG}" + cmd_args+=" -o ${out_dir}" + ;; + v) + verbose="-v" + cmd_args+=" -v" + ;; + h|?) _usage 0 ;; + *) + _msg_error "Invalid argument '${arg}'" 0 + _usage 1 + ;; + esac +done + +shift $((OPTIND - 1)) + +if [[ $# -lt 1 ]]; then + echo "No command specified" + _usage 1 +fi +command_name="${1}" + +if [[ $# -lt 2 ]]; then + echo "No command mode specified" + _usage 1 +fi +command_mode="${2}" + +if [[ ${command_name} == "build" ]]; then + if [[ $# -lt 3 ]]; then + echo "No build type specified" + _usage 1 + fi +command_type="${3}" +fi + +if [[ ${command_mode} == "all" && ${arch} != "x86_64" ]]; then + echo "This mode <all> needs to be run on x86_64" + _usage 1 +fi + +if [[ ${command_mode} == "single" ]]; then + work_dir=${work_dir}/${arch} +fi + +setup_workdir + +case "${command_name}" in + build) + case "${command_mode}" in + single) + case "${command_type}" in + netinstall) + #make_common_single netinstall + make_common_single netinstall + ;; + core) + make_core_repo + make_common_single core + ;; + all) + make_common_single netinstall + make_core_repo + make_common_single core + ;; + *) + echo "Invalid build type '${command_type}'" + _usage 1 + ;; + esac + ;; + dual) + case "${command_type}" in + netinstall) + make_dual netinstall + ;; + core) + make_dual core + ;; + all) + make_dual netinstall + make_dual core + ;; + *) + echo "Invalid build type '${command_type}'" + _usage 1 + ;; + esac + ;; + all) + case "${command_type}" in + netinstall|core|all) + $0 ${cmd_args} build single ${command_type} + $0 ${cmd_args} purge single + linux32 $0 ${cmd_args} build single ${command_type} + linux32 $0 ${cmd_args} purge single + $0 ${cmd_args} build dual ${command_type} + $0 ${cmd_args} purge dual + ;; + *) + echo "Invalid build type '${command_type}'" + _usage 1 + ;; + esac + ;; + *) + echo "Invalid build mode '${command_mode}'" + _usage 1 + ;; + esac + ;; + purge) + case "${command_mode}" in + single) + purge_single + ;; + dual) + purge_dual + ;; + all) + $0 ${cmd_args} purge single + linux32 $0 ${cmd_args} purge single + $0 ${cmd_args} purge dual + ;; + *) + echo "Invalid purge mode '${command_mode}'" + _usage 1 + ;; + esac + ;; + clean) + case "${command_mode}" in + single) + clean_single + ;; + dual) + clean_dual + ;; + all) + $0 ${cmd_args} clean single + linux32 $0 ${cmd_args} clean single + $0 ${cmd_args} clean dual + ;; + *) + echo "Invalid clean mode '${command_mode}'" + _usage 1 + ;; + esac + ;; + *) + echo "Invalid command name '${command_name}'" + _usage 1 + ;; +esac diff --git a/build_tools/archiso/mythvantage/build.sh.backup b/build_tools/archiso/mythvantage/build.sh.backup new file mode 100755 index 0000000..243762e --- /dev/null +++ b/build_tools/archiso/mythvantage/build.sh.backup @@ -0,0 +1,630 @@ +#!/bin/bash +set -e -u +iso_name=linhes.iso +iso_label="linhes_$(date +%Y%m)" +iso_version=$(date +%Y.%m.%d) +install_dir=arch +arch=$(uname -m) +work_dir=work +out_dir=out +verbose="" +cmd_args="" + +script_path=$(readlink -f ${0%/*}) + +setup_workdir() { + cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) + mkdir -p "${work_dir}" + pacman_conf="${work_dir}/pacman.conf" + sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${cache_dirs[@]})|g" \ + "${script_path}/pacman.conf" > "${pacman_conf}" +} + +# Base installation (root-image) +make_basefs() { + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" init + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd curl" install +} + +# Additional packages (root-image) +make_packages() { + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -v ^# ${script_path}/packages.${arch})" install +} + +# Copy mkinitcpio archiso hooks (root-image) +make_setup_mkinitcpio() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + local _hook + for _hook in archiso archiso_shutdown archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_loop_mnt; do + cp /usr/lib/initcpio/hooks/${_hook} ${work_dir}/root-image/usr/lib/initcpio/hooks + cp /usr/lib/initcpio/install/${_hook} ${work_dir}/root-image/usr/lib/initcpio/install + done + cp /usr/lib/initcpio/install/archiso_kms ${work_dir}/root-image/usr/lib/initcpio/install + cp /usr/lib/initcpio/archiso_shutdown ${work_dir}/root-image/usr/lib/initcpio + cp /usr/lib/initcpio/archiso_pxe_nbd ${work_dir}/root-image/usr/lib/initcpio + cp ${script_path}/mkinitcpio.conf ${work_dir}/root-image/etc/mkinitcpio-archiso.conf + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Prepare ${install_dir}/boot/ +make_boot() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + local _src=${work_dir}/root-image + local _dst_boot=${work_dir}/iso/${install_dir}/boot + mkdir -p ${_dst_boot}/${arch} + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ + -r 'mkinitcpio -c /etc/mkinitcpio-archiso.conf -k /boot/vmlinuz-linux -g /boot/archiso.img' \ + run + mv ${_src}/boot/archiso.img ${_dst_boot}/${arch}/archiso.img + #mv ${_src}/boot/vmlinuz-linux ${_dst_boot}/${arch}/vmlinuz + #JM FINDME + cp ${_src}/boot/vmlinuz-linux ${_dst_boot}/${arch}/vmlinuz + cp ${_src}/boot/memtest86+/memtest.bin ${_dst_boot}/memtest + cp ${_src}/usr/share/licenses/common/GPL2/license.txt ${_dst_boot}/memtest.COPYING + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Prepare EFI "El Torito" boot image (using Linux >= 3.3 EFI boot stub) +make_boot_efi() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + if [[ ${arch} == "x86_64" ]]; then + mkdir -p ${work_dir}/iso/EFI/archiso + dd of=${work_dir}/iso/EFI/archiso/efiboot.img bs=1 seek=20M count=0 + mkfs.vfat ${work_dir}/iso/EFI/archiso/efiboot.img + + mkdir -p ${work_dir}/efiboot + mount ${work_dir}/iso/EFI/archiso/efiboot.img ${work_dir}/efiboot + + mkdir -p ${work_dir}/efiboot/EFI/archiso + cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/archiso/vmlinuz.efi + cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/archiso/archiso.img + + # There are plans to support command line options via a config file (not yet in linux-3.3) + #cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/boot/bootx64.efi + #cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/boot/linux.img + #echo "archisolabel=${iso_label} initrd=\EFI\boot\linux.img" | iconv -f ascii -t ucs2 > ${work_dir}/iso/EFI/boot/linux.conf + + # For now, provide an EFI-shell until 'linux.conf' hits mainline. + mkdir -p ${work_dir}/efiboot/EFI/boot + # EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell ) + #wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi + # EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell ) + wget -O ${work_dir}/efiboot/EFI/boot/bootx64.efi https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi + + # Add an EFI shell script for automatic boot if ESC-key is not pressed within 5 seconds timeout. + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/efiboot/EFI/boot/startup.nsh > ${work_dir}/efiboot/EFI/boot/startup.nsh + + umount ${work_dir}/efiboot + fi + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Prepare /${install_dir}/boot/syslinux +make_syslinux() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + local _src_syslinux=${work_dir}/root-image/usr/lib/syslinux + local _dst_syslinux=${work_dir}/iso/${install_dir}/boot/syslinux + mkdir -p ${_dst_syslinux} + for _cfg in ${script_path}/syslinux/*.cfg; do + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g; + s|%ARCH%|${arch}|g" ${_cfg} > ${_dst_syslinux}/${_cfg##*/} + done + cp ${script_path}/syslinux/splash.png ${_dst_syslinux} + cp ${_src_syslinux}/*.c32 ${_dst_syslinux} + cp ${_src_syslinux}/*.com ${_dst_syslinux} + cp ${_src_syslinux}/*.0 ${_dst_syslinux} + cp ${_src_syslinux}/memdisk ${_dst_syslinux} + mkdir -p ${_dst_syslinux}/hdt + cat ${work_dir}/root-image/usr/share/hwdata/pci.ids | gzip -9 > ${_dst_syslinux}/hdt/pciids.gz + cat ${work_dir}/root-image/lib/modules/*-ARCH/modules.alias | gzip -9 > ${_dst_syslinux}/hdt/modalias.gz + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Prepare /isolinux +make_isolinux() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + mkdir -p ${work_dir}/iso/isolinux + sed "s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/isolinux/isolinux.cfg > ${work_dir}/iso/isolinux/isolinux.cfg + cp ${work_dir}/root-image/usr/lib/syslinux/isolinux.bin ${work_dir}/iso/isolinux/ + cp ${work_dir}/root-image/usr/lib/syslinux/isohdpfx.bin ${work_dir}/iso/isolinux/ + : > ${work_dir}/build.${FUNCNAME} + fi +} + +#JM FIND ME +copy_pacman_root(){ + cp -f "${pacman_conf}" ${work_dir}/root-image/etc +} +find_size(){ + #find the size of the install. + #This is used to calculate progress on the install + tsize=`du -sm ${work_dir}/root-image | cut -f1` + echo "TOTALSIZE=$tsize" > ${work_dir}/root-image/root/.install_size + upsize=`du -sm --exclude data ${work_dir}/root-image |cut -f1` + echo "UPGRADESIZE=$upsize" >> ${work_dir}/root-image/root/.install_size +} + + +make_pristine_copy() { + echo "Creating copy of pristine file for later use" + cd $work_dir/root-image + pwd + cat ${script_path}/pristine.list | xargs tar -cf pristine.tar + cd - + +} + +make_cache_repo() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]] + then + local _url _urls _pkg_name _dst _pkgs _cache_dir + mkdir -p ${work_dir}/root-image/var/cache/pacman/pkg + old_cache=${work_dir}/old_cache + mkdir -p "$old_cache" + pacman --config "${pacman_conf}" -Sy -r ${work_dir}/root-image + echo "------------------------------------------" + for i in $(cat $script_path/packages.${arch}.cache) + do + echo "Adding $i to pacman cache" + _urls=$(pacman --config "${pacman_conf}" -Sp -r ${work_dir}/root-image ${i}) + cd $old_cache + for url in ${_urls} + do + echo "downloading $url" + wget -N ${url} + done + cd - + + done + cp -rp $old_cache/* ${work_dir}/root-image/var/cache/pacman/pkg + fi + echo "------------------------------------------" + + make_var_cache_pacman + make_var_lib_pacman +} + +make_var_cache_pacman(){ + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + mv ${work_dir}/root-image/var/cache/pacman ${work_dir}/var-cache-pacman + : > ${work_dir}/build.${FUNCNAME} + fi + +} +make_var_lib_pacman(){ + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + cp -rp ${work_dir}/root-image/var/lib/pacman ${work_dir}/var-lib-pacman + : > ${work_dir}/build.${FUNCNAME} + fi +} + + + +# Customize installation (root-image) +make_customize_root_image() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + cp -af ${script_path}/root-image ${work_dir} + chmod 750 ${work_dir}/root-image/etc/sudoers.d + chmod 440 ${work_dir}/root-image/etc/sudoers.d/g_wheel + mkdir -p ${work_dir}/root-image/etc/pacman.d + wget -O ${work_dir}/root-image/etc/pacman.d/mirrorlist 'https://www.archlinux.org/mirrorlist/?country=all&protocol=http&use_mirror_status=on' + sed -i "s/#Server/Server/g" ${work_dir}/root-image/etc/pacman.d/mirrorlist + #sed -i 's/#\(en_US\.UTF-8\)/\1/' ${work_dir}/root-image/etc/locale.gen + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ + -r 'locale-gen' \ + run + #JM + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \ +# -r 'useradd -m -p "" -G "audio,disk,optical,wheel,storage,video,users" mythtv' \ + run + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Split out /lib/modules from root-image (makes more "dual-iso" friendly) +make_lib_modules() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + mv ${work_dir}/root-image/lib/modules ${work_dir}/lib-modules + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Split out /usr/share from root-image (makes more "dual-iso" friendly) +make_usr_share() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + mv ${work_dir}/root-image/usr/share ${work_dir}/usr-share + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Make [core] repository, keep "any" pkgs in a separate fs (makes more "dual-iso" friendly) +make_core_repo() { + if [[ ! -e ${work_dir}/build.${FUNCNAME} ]]; then + local _url _urls _pkg_name _dst _pkgs _cache_dir + mkdir -p ${work_dir}/repo-core-any + mkdir -p ${work_dir}/repo-core-${arch} + mkdir -p ${work_dir}/pacman.db/var/lib/pacman + pacman --config "${pacman_conf}" -Sy -r ${work_dir}/pacman.db + _pkgs=$(comm -2 -3 <(pacman --config "${pacman_conf}" -Sql -r ${work_dir}/pacman.db core | sort | sed 's@^@core/@') \ + <(grep -v ^# ${script_path}/core.exclude.${arch} | sort | sed 's@^@core/@')) + _urls=$(pacman --config "${pacman_conf}" -Sddp -r ${work_dir}/pacman.db ${_pkgs}) + pacman --config "${pacman_conf}" -Swdd -r ${work_dir}/pacman.db --noprogressbar --noconfirm ${_pkgs} + for _url in ${_urls}; do + _pkg_name=${_url##*/} + _dst=${work_dir}/repo-core-${arch}/${_pkg_name} + for _cache_dir in ${cache_dirs[@]}; do + if [[ -e "${_cache_dir}/${_pkg_name}" ]]; then + cp "${_cache_dir}/${_pkg_name}" ${_dst} + fi + done + # download the package signature + #curl -sC - -f "${_url}.sig" > "${_dst}.sig" + repo-add -q ${work_dir}/repo-core-${arch}/core.db.tar.gz ${_dst} + # remove the signature file again as it is now included in the db file + rm -f "${_dst}.sig" + if [[ ${_pkg_name} == *any.pkg.tar* ]]; then + mv ${_dst} ${work_dir}/repo-core-any/${_pkg_name} + ln -sf ../any/${_pkg_name} ${_dst} + fi + done + # Remove old copy of db file + rm -f ${work_dir}/repo-core-${arch}/core.db.tar.gz.old + mkdir -p ${work_dir}/iso/${install_dir} + pacman --config "${pacman_conf}" -Sp -r ${work_dir}/pacman.db --print-format "%r/%n-%v" ${_pkgs} | sort > ${work_dir}/iso/${install_dir}/pkglist.repo-core.${arch}.txt + : > ${work_dir}/build.${FUNCNAME} + fi +} + +# Process aitab +# args: $1 (core | netinstall) +make_aitab() { + local _iso_type=${1} + if [[ ! -e ${work_dir}/build.${FUNCNAME}_${_iso_type} ]]; then + sed "s|%ARCH%|${arch}|g" ${script_path}/aitab.${_iso_type} > ${work_dir}/iso/${install_dir}/aitab + : > ${work_dir}/build.${FUNCNAME}_${_iso_type} + fi +} + +# Build all filesystem images specified in aitab (.fs .fs.sfs .sfs) +make_prepare() { + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" pkglist + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" prepare +} + +# Build ISO +# args: $1 (core | netinstall) +make_iso() { + local _iso_type=${1} + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" checksum + mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${_iso_type}-${arch}.iso" + #JM + cd ${out_dir} + rm -f test3.iso + ln -s ${iso_name}-${iso_version}-${_iso_type}-${arch}.iso test3.iso + cd - +} + +# Build dual-iso images from ${work_dir}/i686/iso and ${work_dir}/x86_64/iso +# args: $1 (core | netinstall) +make_dual() { + local _iso_type=${1} + if [[ ! -e ${work_dir}/dual/build.${FUNCNAME}_${_iso_type} ]]; then + if [[ ! -d ${work_dir}/i686/iso || ! -d ${work_dir}/x86_64/iso ]]; then + echo "ERROR: i686 or x86_64 builds does not exist." + _usage 1 + fi + local _src_one _src_two _cfg + if [[ ${arch} == "i686" ]]; then + _src_one=${work_dir}/i686/iso + _src_two=${work_dir}/x86_64/iso + else + _src_one=${work_dir}/x86_64/iso + _src_two=${work_dir}/i686/iso + fi + mkdir -p ${work_dir}/dual/iso + cp -a -l -f ${_src_one} ${work_dir}/dual + cp -a -l -n ${_src_two} ${work_dir}/dual + rm -f ${work_dir}/dual/iso/${install_dir}/aitab + rm -f ${work_dir}/dual/iso/${install_dir}/boot/syslinux/*.cfg + if [[ ${_iso_type} == "core" ]]; then + if [[ ! -e ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs || + ! -e ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs || + ! -e ${work_dir}/dual/iso/${install_dir}/x86_64/repo-core-x86_64.sfs ]]; then + echo "ERROR: core_iso_single build is not found." + _usage 1 + fi + else + rm -f ${work_dir}/dual/iso/${install_dir}/any/repo-core-any.sfs + rm -f ${work_dir}/dual/iso/${install_dir}/i686/repo-core-i686.sfs + rm -f ${work_dir}/dual/iso/${install_dir}/x86_64/repo-core-x86_64.sfs + rm -f ${work_dir}/dual/iso/${install_dir}/pkglist.repo-core.i686.txt + rm -f ${work_dir}/dual/iso/${install_dir}/pkglist.repo-core.x86_64.txt + fi + paste -d"\n" <(sed "s|%ARCH%|i686|g" ${script_path}/aitab.${_iso_type}) \ + <(sed "s|%ARCH%|x86_64|g" ${script_path}/aitab.${_iso_type}) | uniq > ${work_dir}/dual/iso/${install_dir}/aitab + for _cfg in ${script_path}/syslinux.dual/*.cfg; do + sed "s|%ARCHISO_LABEL%|${iso_label}|g; + s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/dual/iso/${install_dir}/boot/syslinux/${_cfg##*/} + done + mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" checksum + mkarchiso ${verbose} -w "${work_dir}/dual" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-${_iso_type}-dual.iso" + : > ${work_dir}/dual/build.${FUNCNAME}_${_iso_type} + fi +} + +purge_single () +{ + if [[ -d ${work_dir} ]]; then + find ${work_dir} -mindepth 1 -maxdepth 1 \ + ! -path ${work_dir}/iso -prune \ + | xargs rm -rf + fi +} + +purge_dual () +{ + if [[ -d ${work_dir}/dual ]]; then + find ${work_dir}/dual -mindepth 1 -maxdepth 1 \ + ! -path ${work_dir}/dual/iso -prune \ + | xargs rm -rf + fi +} + +clean_single () +{ + rm -rf ${work_dir} + rm -f ${out_dir}/${iso_name}-${iso_version}-*-${arch}.iso +} + +clean_dual () +{ + rm -rf ${work_dir}/dual + rm -f ${out_dir}/${iso_name}-${iso_version}-*-dual.iso +} + +make_common_single() { + make_basefs + make_packages + make_setup_mkinitcpio + make_boot + make_boot_efi + make_syslinux + make_isolinux + + #JM FIND ME + make_cache_repo + make_pristine_copy + copy_pacman_root + find_size + + make_customize_root_image + make_lib_modules + make_usr_share + make_aitab $1 + make_prepare $1 + make_iso $1 +} + +_usage () +{ + echo "usage ${0} [options] command <command options>" + echo + echo " General options:" + echo " -N <iso_name> Set an iso filename (prefix)" + echo " Default: ${iso_name}" + echo " -V <iso_version> Set an iso version (in filename)" + echo " Default: ${iso_version}" + echo " -L <iso_label> Set an iso label (disk label)" + echo " Default: ${iso_label}" + echo " -D <install_dir> Set an install_dir (directory inside iso)" + echo " Default: ${install_dir}" + echo " -w <work_dir> Set the working directory" + echo " Default: ${work_dir}" + echo " -o <out_dir> Set the output directory" + echo " Default: ${out_dir}" + echo " -v Enable verbose output" + echo " -h This help message" + echo + echo " Commands:" + echo " build <mode> <type>" + echo " Build selected .iso by <mode> and <type>" + echo " purge <mode>" + echo " Clean working directory except iso/ directory of build <mode>" + echo " clean <mode>" + echo " Clean working directory and .iso file in output directory of build <mode>" + echo + echo " Command options:" + echo " <mode> Valid values 'single', 'dual' or 'all'" + echo " <type> Valid values 'netinstall', 'core' or 'all'" + exit ${1} +} + +if [[ ${EUID} -ne 0 ]]; then + echo "This script must be run as root." + _usage 1 +fi + +while getopts 'N:V:L:D:w:o:vh' arg; do + case "${arg}" in + N) + iso_name="${OPTARG}" + cmd_args+=" -N ${iso_name}" + ;; + V) + iso_version="${OPTARG}" + cmd_args+=" -V ${iso_version}" + ;; + L) + iso_label="${OPTARG}" + cmd_args+=" -L ${iso_label}" + ;; + D) + install_dir="${OPTARG}" + cmd_args+=" -D ${install_dir}" + ;; + w) + work_dir="${OPTARG}" + cmd_args+=" -w ${work_dir}" + ;; + o) + out_dir="${OPTARG}" + cmd_args+=" -o ${out_dir}" + ;; + v) + verbose="-v" + cmd_args+=" -v" + ;; + h|?) _usage 0 ;; + *) + _msg_error "Invalid argument '${arg}'" 0 + _usage 1 + ;; + esac +done + +shift $((OPTIND - 1)) + +if [[ $# -lt 1 ]]; then + echo "No command specified" + _usage 1 +fi +command_name="${1}" + +if [[ $# -lt 2 ]]; then + echo "No command mode specified" + _usage 1 +fi +command_mode="${2}" + +if [[ ${command_name} == "build" ]]; then + if [[ $# -lt 3 ]]; then + echo "No build type specified" + _usage 1 + fi +command_type="${3}" +fi + +if [[ ${command_mode} == "all" && ${arch} != "x86_64" ]]; then + echo "This mode <all> needs to be run on x86_64" + _usage 1 +fi + +if [[ ${command_mode} == "single" ]]; then + work_dir=${work_dir}/${arch} +fi + +setup_workdir + +case "${command_name}" in + build) + case "${command_mode}" in + single) + case "${command_type}" in + netinstall) + #make_common_single netinstall + make_common_single netinstall + ;; + core) + make_core_repo + make_common_single core + ;; + all) + make_common_single netinstall + make_core_repo + make_common_single core + ;; + *) + echo "Invalid build type '${command_type}'" + _usage 1 + ;; + esac + ;; + dual) + case "${command_type}" in + netinstall) + make_dual netinstall + ;; + core) + make_dual core + ;; + all) + make_dual netinstall + make_dual core + ;; + *) + echo "Invalid build type '${command_type}'" + _usage 1 + ;; + esac + ;; + all) + case "${command_type}" in + netinstall|core|all) + $0 ${cmd_args} build single ${command_type} + $0 ${cmd_args} purge single + linux32 $0 ${cmd_args} build single ${command_type} + linux32 $0 ${cmd_args} purge single + $0 ${cmd_args} build dual ${command_type} + $0 ${cmd_args} purge dual + ;; + *) + echo "Invalid build type '${command_type}'" + _usage 1 + ;; + esac + ;; + *) + echo "Invalid build mode '${command_mode}'" + _usage 1 + ;; + esac + ;; + purge) + case "${command_mode}" in + single) + purge_single + ;; + dual) + purge_dual + ;; + all) + $0 ${cmd_args} purge single + linux32 $0 ${cmd_args} purge single + $0 ${cmd_args} purge dual + ;; + *) + echo "Invalid purge mode '${command_mode}'" + _usage 1 + ;; + esac + ;; + clean) + case "${command_mode}" in + single) + clean_single + ;; + dual) + clean_dual + ;; + all) + $0 ${cmd_args} clean single + linux32 $0 ${cmd_args} clean single + $0 ${cmd_args} clean dual + ;; + *) + echo "Invalid clean mode '${command_mode}'" + _usage 1 + ;; + esac + ;; + *) + echo "Invalid command name '${command_name}'" + _usage 1 + ;; +esac diff --git a/build_tools/archiso/mythvantage/core.exclude.i686 b/build_tools/archiso/mythvantage/core.exclude.i686 new file mode 100644 index 0000000..a04ceef --- /dev/null +++ b/build_tools/archiso/mythvantage/core.exclude.i686 @@ -0,0 +1,4 @@ +gcc-ada +gcc-fortran +gcc-go +gcc-objc diff --git a/build_tools/archiso/mythvantage/core.exclude.x86_64 b/build_tools/archiso/mythvantage/core.exclude.x86_64 new file mode 100644 index 0000000..a3f78d8 --- /dev/null +++ b/build_tools/archiso/mythvantage/core.exclude.x86_64 @@ -0,0 +1,6 @@ +gcc-ada +gcc-fortran +gcc-go +gcc-objc +xf86-video-intel-sna +xf86-video-intel-uxa diff --git a/build_tools/archiso/mythvantage/efiboot/EFI/boot/startup.nsh b/build_tools/archiso/mythvantage/efiboot/EFI/boot/startup.nsh new file mode 100644 index 0000000..f50aed2 --- /dev/null +++ b/build_tools/archiso/mythvantage/efiboot/EFI/boot/startup.nsh @@ -0,0 +1,10 @@ +@echo -off + +for %m run (0 9) + if exist fs%m:\EFI\archiso\vmlinuz.efi then + fs%m: + cd fs%m:\EFI\archiso + echo "Launching Arch Linux ISO Kernel fs%m:\EFI\archiso\vmlinuz.efi" + vmlinuz.efi archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% initrd=\EFI\archiso\archiso.img + endif +endfor diff --git a/build_tools/archiso/mythvantage/go.sh b/build_tools/archiso/mythvantage/go.sh new file mode 100755 index 0000000..c5f07d2 --- /dev/null +++ b/build_tools/archiso/mythvantage/go.sh @@ -0,0 +1,76 @@ +#!/bin/bash + +function copy_custom(){ + cp -f profile_files/$1.png syslinux/splash.png || exit 1 + cp -f profile_files/pacman.conf . ||exit 1 + cat profile_files/$1.pacman >> ./pacman.conf || exit 1 + + cp -f profile_files/packages.x86_64 . || exit 1 + cp -f profile_files/packages.x86_64.cache . || exit 1 + cp -f profile_files/pristine.list . || exit 1 + } + + + + +declare -a menuarray + +menuarray=( 'local_mirror_testing' + 'local_disk_testing' + 'remote_testing' + '-----------------' + 'local_mirror_release' + 'remote_release' ) + +#echo ${array1[@]} + +element_count=${#menuarray[*]} +element_count=`expr $element_count - 1` +clear +echo +echo +if [ x$1 = x ] +then + for i in `seq 0 $element_count` + do + echo "$i ) ${menuarray[$i]}" + echo + done + echo "Select the profile to use:" + read a + if [ "x"$a = "x" ] + then + a="0" + fi + profile=${menuarray[$a]} + + echo $profile + copy_custom $profile + echo "Creating ISO" + + #rm -rf work/ + ./build.sh clean all + ./build.sh -vv build single netinstall + status=$? + if [ $status = 0 ] + then +# if [ -f /usr/bin/isohybrid ] +# then +# echo "Running isohybrid..." +# /usr/bin/isohybrid /tmp/test2.iso +# else +# echo "Syslinux needs to be installed to run isohybrid" +# fi + + echo "*****************************************************" + echo "your $profile iso is complete (out/test3.iso)" + echo "*****************************************************" + rm -f pacman.conf + rm -f packages.x86_64 + rm -f packages.x86_64.cache + rm -f pristine.list + fi + + date + #cd $OLD +fi
\ No newline at end of file diff --git a/build_tools/archiso/mythvantage/isolinux/isolinux.cfg b/build_tools/archiso/mythvantage/isolinux/isolinux.cfg new file mode 100644 index 0000000..1040d3f --- /dev/null +++ b/build_tools/archiso/mythvantage/isolinux/isolinux.cfg @@ -0,0 +1,5 @@ +DEFAULT loadconfig + +LABEL loadconfig + CONFIG /%INSTALL_DIR%/boot/syslinux/archiso.cfg + APPEND /%INSTALL_DIR%/ diff --git a/build_tools/archiso/mythvantage/mkinitcpio.conf b/build_tools/archiso/mythvantage/mkinitcpio.conf new file mode 100644 index 0000000..b757b71 --- /dev/null +++ b/build_tools/archiso/mythvantage/mkinitcpio.conf @@ -0,0 +1,2 @@ +HOOKS="base udev memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs pata scsi sata virtio usb fw pcmcia filesystems usbinput" +COMPRESSION="xz" diff --git a/build_tools/archiso/mythvantage/old.cache b/build_tools/archiso/mythvantage/old.cache new file mode 100644 index 0000000..2ab71d3 --- /dev/null +++ b/build_tools/archiso/mythvantage/old.cache @@ -0,0 +1,41 @@ +B#added from error log +#mysql +#mythnews +#pycairo +#pygobject +#python-numeric +#pygtk +#fam +#sqlite3 +#xe +#romdb +#gconf +#gnome-keyring +#gnome-mime-data +#gnome-python +#gnome-python-extras +#gnome-vfs +#hunspell +#libbonobo +#libbonoboui +#libgnome +#libgnomecanvas +#libgnomeui +#libidl2 +#miro +#mozilla-common +#nspr +#nss +#orbit2 +#polkit +#pyorbit +#pyrex +#startup-notification +#xulrunner + +B +B +B +B +B + diff --git a/build_tools/archiso/mythvantage/profile_files/local_disk_testing.pacman b/build_tools/archiso/mythvantage/profile_files/local_disk_testing.pacman new file mode 100644 index 0000000..0c97f29 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/local_disk_testing.pacman @@ -0,0 +1,9 @@ +[core-testing] +SigLevel = Optional TrustedOnly +Server = file:///data/pkg_repo/$arch/$repo/ + +[extra-testing] +SigLevel = Optional TrustedOnly +Server = file:///data/pkg_repo/$arch/$repo/ + + diff --git a/build_tools/archiso/mythvantage/profile_files/local_disk_testing.png b/build_tools/archiso/mythvantage/profile_files/local_disk_testing.png Binary files differnew file mode 100644 index 0000000..162d7aa --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/local_disk_testing.png diff --git a/build_tools/archiso/mythvantage/profile_files/local_mirror_release.pacman b/build_tools/archiso/mythvantage/profile_files/local_mirror_release.pacman new file mode 100644 index 0000000..c822544 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/local_mirror_release.pacman @@ -0,0 +1,7 @@ +[core] +SigLevel = Optional TrustedOnly +Server = http://localmirror.lan/repo/$arch/$repo/ + +[extra] +SigLevel = Optional TrustedOnly +Server = http://localmirror.lan/repo/$arch/$repo/ diff --git a/build_tools/archiso/mythvantage/profile_files/local_mirror_release.png b/build_tools/archiso/mythvantage/profile_files/local_mirror_release.png Binary files differnew file mode 100644 index 0000000..79952c3 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/local_mirror_release.png diff --git a/build_tools/archiso/mythvantage/profile_files/local_mirror_testing.pacman b/build_tools/archiso/mythvantage/profile_files/local_mirror_testing.pacman new file mode 100644 index 0000000..24f06d6 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/local_mirror_testing.pacman @@ -0,0 +1,7 @@ +[core-testing] +SigLevel = Optional TrustedOnly +Server = http://localmirror.lan/repo/$arch/$repo/ + +[extra-testing] +SigLevel = Optional TrustedOnly +Server = http://localmirror.lan/repo/$arch/$repo/ diff --git a/build_tools/archiso/mythvantage/profile_files/local_mirror_testing.png b/build_tools/archiso/mythvantage/profile_files/local_mirror_testing.png Binary files differnew file mode 100644 index 0000000..76a0777 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/local_mirror_testing.png diff --git a/build_tools/archiso/mythvantage/profile_files/packages.i686 b/build_tools/archiso/mythvantage/profile_files/packages.i686 new file mode 100644 index 0000000..6012e7c --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/packages.i686 @@ -0,0 +1,46 @@ +aif +b43-fwcutter +btrfs-progs +crda +darkhttpd +ddrescue +dhclient +dialog +dmraid +dnsmasq +dnsutils +dosfstools +efibootmgr +elinks +gnu-netcat +gptfdisk +haveged +hdparm +ipw2100-fw +ipw2200-fw +irssi +lftp +lilo +linux-atm +mtools +netcfg +nfs-utils +nilfs-utils +nmap +ntfs-3g +ntfsprogs +ntp +openconnect +openssh +openvpn +parted +pptpclient +rp-pppoe +rsync +smartmontools +speedtouch +tcpdump +vpnc +wireless_tools +wpa_actiond +zd1211-firmware diff --git a/build_tools/archiso/mythvantage/profile_files/packages.x86_64 b/build_tools/archiso/mythvantage/profile_files/packages.x86_64 new file mode 100644 index 0000000..3dd6269 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/packages.x86_64 @@ -0,0 +1,141 @@ +#b43-fwcutter +acpid +btrfs-progs +crda +#darkhttpd +ddrescue +#dhclient +dhcpcd +dialog +dmraid +#dnsmasq +dnsutils +dcron +dosfstools +efibootmgr +#elinks +#gnu-netcat +gptfdisk +#haveged +hdparm +ipw2100-fw +ipw2200-fw +iputils +#irssi +#lftp +#lilo +#linux-atm +mtools +#netcfg +net-tools +nfs-utils +nilfs-utils +#nmap +#ntfs-3g +#ntfsprogs +ntp +#openconnect +openssh +#openvpn +parted +#pptpclient +#rp-pppoe +rsync +#smartmontools +#speedtouch +#tcpdump +#vpnc +wireless_tools +wpa_actiond +zd1211-firmware +python2 +LinHES-config +bc +libstatgrab +mysql-python +expect +curl +dnsutils +parted +sg3_utils +nmbscan +squashfs-tools +rsync +python-parted +python-pexpect +python-netifaces +python-iplib +openssh +xorg-apps +xorg-fonts +windowmaker +xf86-video-vesa +xorg-xinit +xorg-server +xorg-bdftopcf +xorg-docs +xorg-font-util +xorg-fonts-100dpi +#xorg-fonts-75dpi +xorg-fonts-encodings +xorg-iceauth +xorg-luit +xorg-mkfontdir +xorg-mkfontscale +#xorg-res-utils +xorg-server +xorg-sessreg +xorg-setxkbmap +xorg-x11perf +xorg-xauth +xorg-xbacklight +xorg-xcmsdb +xorg-xcursorgen +xorg-xdpyinfo +xorg-xdriinfo +xorg-xev +#xorg-xgamma +xorg-xhost +xorg-xinput +xorg-xkbcomp +xorg-xkbevd +xorg-xkbutils +xorg-xkill +xorg-xlsatoms +xorg-xlsclients +xorg-xmodmap +xorg-xpr +xorg-xprop +xorg-xrandr +xorg-xrdb +xorg-xrefresh +xorg-xset +xorg-xsetroot +xorg-xvinfo +xorg-xwd +xorg-xwininfo +xorg-xwud +xterm +xkeyboard-config +grub-common +grub-bios +LinHES-config +LinHES-system +mythtv +mysql +etcnet +alt_wm +mlocate + + +#mythtv-contrib +mytharchive +mythbrowser +mythgallery +mythgame +mythmusic +linhes-theme +linhes-scripts + +ivtv-utils +alsa-utils diff --git a/build_tools/archiso/mythvantage/profile_files/packages.x86_64.cache b/build_tools/archiso/mythvantage/profile_files/packages.x86_64.cache new file mode 100644 index 0000000..4de8d09 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/packages.x86_64.cache @@ -0,0 +1,26 @@ +runit-scripts +mythdb-initial +tigervnc + +nvidia +nvidia-utils +vdpauinfo +lighttpd +local-website +mythweb +nfs-utils +samba +mplayer +lcdproc +mythappletrailers +xscreensaver +supplemental-web +romdb +miro +oss +xf86-input-vmmouse +xf86-video-vmware +xf86-video-vesa +xf86-video-intel +libgl +svga-dri diff --git a/build_tools/archiso/mythvantage/profile_files/pacman.conf b/build_tools/archiso/mythvantage/profile_files/pacman.conf new file mode 100644 index 0000000..ef9acb6 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/pacman.conf @@ -0,0 +1,72 @@ +# +# /etc/pacman.conf +# +# See the pacman.conf(5) manpage for option and repository directives + +# +# GENERAL OPTIONS +# +[options] +# The following paths are commented out with their default values listed. +# If you wish to use different paths, uncomment and update the paths. +#RootDir = / +#DBPath = /var/lib/pacman/ +CacheDir = /data/storage/disk0/pacman/pkg +#LogFile = /var/log/pacman.log +#GPGDir = /etc/pacman.d/gnupg/ +HoldPkg = pacman glibc +# If upgrades are available for these packages they will be asked for first +SyncFirst = pacman +#XferCommand = /usr/bin/curl -C - -f %u > %o +#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u +#CleanMethod = KeepInstalled +Architecture = auto + +# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup +#IgnorePkg = +#IgnoreGroup = + +#NoUpgrade = +#NoExtract = + +# Misc options +#UseSyslog +#UseDelta +#TotalDownload +# We cannot check disk space from within a chroot environment +#CheckSpace +VerbosePkgLists + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Optional TrustedOnly + +# NOTE: You must run `pacman-key --init` before first using pacman; the local +# keyring can then be populated with the keys of all official Arch Linux +# packagers with `pacman-key --populate archlinux`. + +# +# REPOSITORIES +# - can be defined here or included from another file +# - pacman will search repositories in the order defined here +# - local/custom mirrors can be added here or in separate files +# - repositories listed first will take precedence when packages +# have identical names, regardless of version number +# - URLs will have $repo replaced by the name of the current repo +# - URLs will have $arch replaced by the name of the architecture +# +# Repository entries are of the format: +# [repo-name] +# Server = ServerName +# Include = IncludePath +# +# The header [repo-name] is crucial - it must be present and +# uncommented to enable the repo. +# + +# The testing repositories are disabled by default. To enable, uncomment the +# repo name header and Include lines. You can add preferred servers immediately +# after the header, and they will be used before the default mirrors. + + + diff --git a/build_tools/archiso/mythvantage/profile_files/pristine.list b/build_tools/archiso/mythvantage/profile_files/pristine.list new file mode 100644 index 0000000..8d732d6 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/pristine.list @@ -0,0 +1,2 @@ +./etc/hosts +./etc/rc.local diff --git a/build_tools/archiso/mythvantage/profile_files/remote_release.pacman b/build_tools/archiso/mythvantage/profile_files/remote_release.pacman new file mode 100644 index 0000000..e9ace81 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/remote_release.pacman @@ -0,0 +1,7 @@ +[core] +SigLevel = Optional TrustedOnly +Server = http://bits.linhes.org/repo/$arch/$repo/ + +[extra] +SigLevel = Optional TrustedOnly +Server = http://bits.linhes.org/repo/$arch/$repo/ diff --git a/build_tools/archiso/mythvantage/profile_files/remote_release.png b/build_tools/archiso/mythvantage/profile_files/remote_release.png Binary files differnew file mode 100644 index 0000000..92e8c7d --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/remote_release.png diff --git a/build_tools/archiso/mythvantage/profile_files/remote_testing.pacman b/build_tools/archiso/mythvantage/profile_files/remote_testing.pacman new file mode 100644 index 0000000..000e6a1 --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/remote_testing.pacman @@ -0,0 +1,7 @@ +[core-testing] +SigLevel = Optional TrustedOnly +Server = http://bits.linhes.org/repo/$arch/$repo/ + +[extra-testing] +SigLevel = Optional TrustedOnly +Server = http://bits.linhes.org/repo/$arch/$repo/ diff --git a/build_tools/archiso/mythvantage/profile_files/remote_testing.png b/build_tools/archiso/mythvantage/profile_files/remote_testing.png Binary files differnew file mode 100644 index 0000000..92e8c7d --- /dev/null +++ b/build_tools/archiso/mythvantage/profile_files/remote_testing.png diff --git a/build_tools/archiso/mythvantage/root-image/etc/arch-release b/build_tools/archiso/mythvantage/root-image/etc/arch-release new file mode 100644 index 0000000..d899e29 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/arch-release @@ -0,0 +1 @@ +MythVantage Live/Installation diff --git a/build_tools/archiso/mythvantage/root-image/etc/archiso/functions b/build_tools/archiso/mythvantage/root-image/etc/archiso/functions new file mode 100644 index 0000000..9fffdcb --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/archiso/functions @@ -0,0 +1,20 @@ +# vim: set ft=sh: + +# kernel_cmdline <param> <default> +# Looks for a parameter on the kernel's boot-time command line. +# +# returns: 0 if param was found. Also prints its value if it was a K=V param. +# 1 if it was not. Also prints value passed as <default> +# +kernel_cmdline () +{ + for param in $(/bin/cat /proc/cmdline); do + case "${param}" in + $1=*) echo "${param##*=}"; return 0 ;; + $1) return 0 ;; + *) continue ;; + esac + done + [ -n "${2}" ] && echo "${2}" + return 1 +} diff --git a/build_tools/archiso/mythvantage/root-image/etc/conf.d/dhcpcd b/build_tools/archiso/mythvantage/root-image/etc/conf.d/dhcpcd new file mode 100644 index 0000000..ab53c30 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/conf.d/dhcpcd @@ -0,0 +1,6 @@ +# +# Arguments to be passed to the DHCP client daemon +# + +DHCPCD_ARGS="-t 10 -h $HOSTNAME" + diff --git a/build_tools/archiso/mythvantage/root-image/etc/hostname b/build_tools/archiso/mythvantage/root-image/etc/hostname new file mode 100644 index 0000000..a616f6e --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/hostname @@ -0,0 +1 @@ +apheleia diff --git a/build_tools/archiso/mythvantage/root-image/etc/hosts b/build_tools/archiso/mythvantage/root-image/etc/hosts new file mode 100644 index 0000000..d23291e --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/hosts @@ -0,0 +1,9 @@ +# +# /etc/hosts: static lookup table for host names +# + +#<ip-address> <hostname.domain.org> <hostname> +127.0.0.1 localhost.localdomain localhost archiso +::1 localhost.localdomain localhost archiso + +# End of file diff --git a/build_tools/archiso/mythvantage/root-image/etc/hosts.allow b/build_tools/archiso/mythvantage/root-image/etc/hosts.allow new file mode 100755 index 0000000..f6cf005 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/hosts.allow @@ -0,0 +1,8 @@ +# +# /etc/hosts.allow +# +ALL: 192.168. +ALL: 10. +ALL: 127.0.0.1 +ALL: 172.16. +# End of file diff --git a/build_tools/archiso/mythvantage/root-image/etc/hosts.deny b/build_tools/archiso/mythvantage/root-image/etc/hosts.deny new file mode 100755 index 0000000..ca30ab4 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/hosts.deny @@ -0,0 +1,6 @@ +# +# /etc/hosts.deny +# +ALL + +# End of file diff --git a/build_tools/archiso/mythvantage/root-image/etc/inittab b/build_tools/archiso/mythvantage/root-image/etc/inittab new file mode 100644 index 0000000..1e65b5e --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/inittab @@ -0,0 +1,48 @@ +# +# /etc/inittab +# + +# Runlevels: +# 0 Halt +# 1(S) Single-user +# 2 Not used +# 3 Multi-user +# 4 Not used +# 5 X11 +# 6 Reboot + +## Only one of the following two lines can be uncommented! +# Boot to console +id:3:initdefault: +# Boot to X11 +#id:5:initdefault: + +rc::sysinit:/etc/rc.sysinit +rs:S1:wait:/etc/rc.single +rm:2345:wait:/etc/rc.multi +rh:06:wait:/etc/rc.shutdown +su:S:wait:/sbin/sulogin -p + +# -8 options fixes umlauts problem on login +#c1:2345:respawn:/sbin/agetty -8 -s -n -l /usr/bin/autologin 38400 tty1 linux +c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux +c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux +c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux +c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux +c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux + +# Serial Virtual Console for KVM and others VMs +#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux + +# Hypervisor Virtual Console for Xen and KVM +#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux + +ca::ctrlaltdel:/sbin/shutdown -t3 -r now + +# Example lines for starting a login manager +x:5:respawn:/usr/bin/xdm -nodaemon +#x:5:respawn:/usr/sbin/gdm -nodaemon +#x:5:respawn:/usr/bin/kdm -nodaemon +#x:5:respawn:/usr/bin/slim >/dev/null 2>&1 + +# End of file diff --git a/build_tools/archiso/mythvantage/root-image/etc/issue b/build_tools/archiso/mythvantage/root-image/etc/issue new file mode 100644 index 0000000..9b082c4 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/issue @@ -0,0 +1,5 @@ +[H[2J +MythVantage Live ISO (\l) +\s-\r \m. +Default logins "root" and "mythtv" have no password. +To begin installation, login as root. diff --git a/build_tools/archiso/mythvantage/root-image/etc/locale.conf b/build_tools/archiso/mythvantage/root-image/etc/locale.conf new file mode 100644 index 0000000..a8e6e6f --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/locale.conf @@ -0,0 +1 @@ +LOCALE="en_US.UTF-8" diff --git a/build_tools/archiso/mythvantage/root-image/etc/locale.gen b/build_tools/archiso/mythvantage/root-image/etc/locale.gen new file mode 100644 index 0000000..9fe42e0 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/locale.gen @@ -0,0 +1,462 @@ +## Configuration file for locale-gen +## +## lists of locales that are to be generated by the locale-gen command. +## +## Each line is of the form: +## +## <locale> <charset> +## +## where <locale> is one of the locales given in /usr/share/i18n/locales +## and <charset> is one of the character sets listed in /usr/share/i18n/charmaps +## +## Examples: +en_US ISO-8859-1 +en_US.UTF-8 UTF-8 +de_DE ISO-8859-1 +de_DE@euro ISO-8859-15 +## +## The locale-gen command will generate all the locales, +## placing them in /usr/lib/locale. +## +## A list of supported locales is included in this file. +## Uncomment the ones you need. +## +## This file names the currently supported and somewhat tested locales. +## If you have any additions please file a glibc bug report. +# +#aa_DJ.UTF-8 UTF-8 +#aa_DJ ISO-8859-1 +#aa_ER UTF-8 +#aa_ER@saaho UTF-8 +#aa_ET UTF-8 +#af_ZA.UTF-8 UTF-8 +#af_ZA ISO-8859-1 +#am_ET UTF-8 +#an_ES.UTF-8 UTF-8 +#an_ES ISO-8859-15 +#ar_AE.UTF-8 UTF-8 +#ar_AE ISO-8859-6 +#ar_BH.UTF-8 UTF-8 +#ar_BH ISO-8859-6 +#ar_DZ.UTF-8 UTF-8 +#ar_DZ ISO-8859-6 +#ar_EG.UTF-8 UTF-8 +#ar_EG ISO-8859-6 +#ar_IN UTF-8 +#ar_IQ.UTF-8 UTF-8 +#ar_IQ ISO-8859-6 +#ar_JO.UTF-8 UTF-8 +#ar_JO ISO-8859-6 +#ar_KW.UTF-8 UTF-8 +#ar_KW ISO-8859-6 +#ar_LB.UTF-8 UTF-8 +#ar_LB ISO-8859-6 +#ar_LY.UTF-8 UTF-8 +#ar_LY ISO-8859-6 +#ar_MA.UTF-8 UTF-8 +#ar_MA ISO-8859-6 +#ar_OM.UTF-8 UTF-8 +#ar_OM ISO-8859-6 +#ar_QA.UTF-8 UTF-8 +#ar_QA ISO-8859-6 +#ar_SA.UTF-8 UTF-8 +#ar_SA ISO-8859-6 +#ar_SD.UTF-8 UTF-8 +#ar_SD ISO-8859-6 +#ar_SY.UTF-8 UTF-8 +#ar_SY ISO-8859-6 +#ar_TN.UTF-8 UTF-8 +#ar_TN ISO-8859-6 +#ar_YE.UTF-8 UTF-8 +#ar_YE ISO-8859-6 +#az_AZ UTF-8 +#as_IN UTF-8 +#ast_ES.UTF-8 UTF-8 +#ast_ES ISO-8859-15 +#be_BY.UTF-8 UTF-8 +#be_BY CP1251 +#be_BY@latin UTF-8 +#bem_ZM UTF-8 +#ber_DZ UTF-8 +#ber_MA UTF-8 +#bg_BG.UTF-8 UTF-8 +#bg_BG CP1251 +#bho_IN UTF-8 +#bn_BD UTF-8 +#bn_IN UTF-8 +#bo_CN UTF-8 +#bo_IN UTF-8 +#br_FR.UTF-8 UTF-8 +#br_FR ISO-8859-1 +#br_FR@euro ISO-8859-15 +#brx_IN UTF-8 +#bs_BA.UTF-8 UTF-8 +#bs_BA ISO-8859-2 +#byn_ER UTF-8 +#ca_AD.UTF-8 UTF-8 +#ca_AD ISO-8859-15 +#ca_ES.UTF-8 UTF-8 +#ca_ES ISO-8859-1 +#ca_ES@euro ISO-8859-15 +#ca_FR.UTF-8 UTF-8 +#ca_FR ISO-8859-15 +#ca_IT.UTF-8 UTF-8 +#ca_IT ISO-8859-15 +#crh_UA UTF-8 +#cs_CZ.UTF-8 UTF-8 +#cs_CZ ISO-8859-2 +#csb_PL UTF-8 +#cv_RU UTF-8 +#cy_GB.UTF-8 UTF-8 +#cy_GB ISO-8859-14 +#da_DK.UTF-8 UTF-8 +#da_DK ISO-8859-1 +#de_AT.UTF-8 UTF-8 +#de_AT ISO-8859-1 +#de_AT@euro ISO-8859-15 +#de_BE.UTF-8 UTF-8 +#de_BE ISO-8859-1 +#de_BE@euro ISO-8859-15 +#de_CH.UTF-8 UTF-8 +#de_CH ISO-8859-1 +#de_DE.UTF-8 UTF-8 +#de_DE ISO-8859-1 +#de_DE@euro ISO-8859-15 +#de_LU.UTF-8 UTF-8 +#de_LU ISO-8859-1 +#de_LU@euro ISO-8859-15 +#dv_MV UTF-8 +#dz_BT UTF-8 +#el_GR.UTF-8 UTF-8 +#el_GR ISO-8859-7 +#el_CY.UTF-8 UTF-8 +#el_CY ISO-8859-7 +#en_AG UTF-8 +#en_AU.UTF-8 UTF-8 +#en_AU ISO-8859-1 +#en_BW.UTF-8 UTF-8 +#en_BW ISO-8859-1 +#en_CA.UTF-8 UTF-8 +#en_CA ISO-8859-1 +#en_DK.UTF-8 UTF-8 +#en_DK ISO-8859-1 +#en_GB.UTF-8 UTF-8 +#en_GB ISO-8859-1 +#en_HK.UTF-8 UTF-8 +#en_HK ISO-8859-1 +#en_IE.UTF-8 UTF-8 +#en_IE ISO-8859-1 +#en_IE@euro ISO-8859-15 +#en_IN UTF-8 +#en_NG UTF-8 +#en_NZ.UTF-8 UTF-8 +#en_NZ ISO-8859-1 +#en_PH.UTF-8 UTF-8 +#en_PH ISO-8859-1 +#en_SG.UTF-8 UTF-8 +#en_SG ISO-8859-1 +#en_US.UTF-8 UTF-8 +#en_US ISO-8859-1 +#en_ZA.UTF-8 UTF-8 +#en_ZA ISO-8859-1 +#en_ZM UTF-8 +#en_ZW.UTF-8 UTF-8 +#en_ZW ISO-8859-1 +#es_AR.UTF-8 UTF-8 +#es_AR ISO-8859-1 +#es_BO.UTF-8 UTF-8 +#es_BO ISO-8859-1 +#es_CL.UTF-8 UTF-8 +#es_CL ISO-8859-1 +#es_CO.UTF-8 UTF-8 +#es_CO ISO-8859-1 +#es_CR.UTF-8 UTF-8 +#es_CR ISO-8859-1 +#es_CU UTF-8 +#es_DO.UTF-8 UTF-8 +#es_DO ISO-8859-1 +#es_EC.UTF-8 UTF-8 +#es_EC ISO-8859-1 +#es_ES.UTF-8 UTF-8 +#es_ES ISO-8859-1 +#es_ES@euro ISO-8859-15 +#es_GT.UTF-8 UTF-8 +#es_GT ISO-8859-1 +#es_HN.UTF-8 UTF-8 +#es_HN ISO-8859-1 +#es_MX.UTF-8 UTF-8 +#es_MX ISO-8859-1 +#es_NI.UTF-8 UTF-8 +#es_NI ISO-8859-1 +#es_PA.UTF-8 UTF-8 +#es_PA ISO-8859-1 +#es_PE.UTF-8 UTF-8 +#es_PE ISO-8859-1 +#es_PR.UTF-8 UTF-8 +#es_PR ISO-8859-1 +#es_PY.UTF-8 UTF-8 +#es_PY ISO-8859-1 +#es_SV.UTF-8 UTF-8 +#es_SV ISO-8859-1 +#es_US.UTF-8 UTF-8 +#es_US ISO-8859-1 +#es_UY.UTF-8 UTF-8 +#es_UY ISO-8859-1 +#es_VE.UTF-8 UTF-8 +#es_VE ISO-8859-1 +#et_EE.UTF-8 UTF-8 +#et_EE ISO-8859-1 +#et_EE.ISO-8859-15 ISO-8859-15 +#eu_ES.UTF-8 UTF-8 +#eu_ES ISO-8859-1 +#eu_ES@euro ISO-8859-15 +#fa_IR UTF-8 +#ff_SN UTF-8 +#fi_FI.UTF-8 UTF-8 +#fi_FI ISO-8859-1 +#fi_FI@euro ISO-8859-15 +#fil_PH UTF-8 +#fo_FO.UTF-8 UTF-8 +#fo_FO ISO-8859-1 +#fr_BE.UTF-8 UTF-8 +#fr_BE ISO-8859-1 +#fr_BE@euro ISO-8859-15 +#fr_CA.UTF-8 UTF-8 +#fr_CA ISO-8859-1 +#fr_CH.UTF-8 UTF-8 +#fr_CH ISO-8859-1 +#fr_FR.UTF-8 UTF-8 +#fr_FR ISO-8859-1 +#fr_FR@euro ISO-8859-15 +#fr_LU.UTF-8 UTF-8 +#fr_LU ISO-8859-1 +#fr_LU@euro ISO-8859-15 +#fur_IT UTF-8 +#fy_NL UTF-8 +#fy_DE UTF-8 +#ga_IE.UTF-8 UTF-8 +#ga_IE ISO-8859-1 +#ga_IE@euro ISO-8859-15 +#gd_GB.UTF-8 UTF-8 +#gd_GB ISO-8859-15 +#gez_ER UTF-8 +#gez_ER@abegede UTF-8 +#gez_ET UTF-8 +#gez_ET@abegede UTF-8 +#gl_ES.UTF-8 UTF-8 +#gl_ES ISO-8859-1 +#gl_ES@euro ISO-8859-15 +#gu_IN UTF-8 +#gv_GB.UTF-8 UTF-8 +#gv_GB ISO-8859-1 +#ha_NG UTF-8 +#he_IL.UTF-8 UTF-8 +#he_IL ISO-8859-8 +#hi_IN UTF-8 +#hne_IN UTF-8 +#hr_HR.UTF-8 UTF-8 +#hr_HR ISO-8859-2 +#hsb_DE ISO-8859-2 +#hsb_DE.UTF-8 UTF-8 +#ht_HT UTF-8 +#hu_HU.UTF-8 UTF-8 +#hu_HU ISO-8859-2 +#hy_AM UTF-8 +#hy_AM.ARMSCII-8 ARMSCII-8 +#id_ID.UTF-8 UTF-8 +#id_ID ISO-8859-1 +#ig_NG UTF-8 +#ik_CA UTF-8 +#is_IS.UTF-8 UTF-8 +#is_IS ISO-8859-1 +#it_CH.UTF-8 UTF-8 +#it_CH ISO-8859-1 +#it_IT.UTF-8 UTF-8 +#it_IT ISO-8859-1 +#it_IT@euro ISO-8859-15 +#iu_CA UTF-8 +#iw_IL.UTF-8 UTF-8 +#iw_IL ISO-8859-8 +#ja_JP.EUC-JP EUC-JP +#ja_JP.UTF-8 UTF-8 +#ka_GE.UTF-8 UTF-8 +#ka_GE GEORGIAN-PS +#kk_KZ.UTF-8 UTF-8 +#kk_KZ PT154 +#kl_GL.UTF-8 UTF-8 +#kl_GL ISO-8859-1 +#km_KH UTF-8 +#kn_IN UTF-8 +#ko_KR.EUC-KR EUC-KR +#ko_KR.UTF-8 UTF-8 +#kok_IN UTF-8 +#ks_IN UTF-8 +#ks_IN@devanagari UTF-8 +#ku_TR.UTF-8 UTF-8 +#ku_TR ISO-8859-9 +#kw_GB.UTF-8 UTF-8 +#kw_GB ISO-8859-1 +#ky_KG UTF-8 +#lb_LU UTF-8 +#lg_UG.UTF-8 UTF-8 +#lg_UG ISO-8859-10 +#li_BE UTF-8 +#li_NL UTF-8 +#lij_IT UTF-8 +#lo_LA UTF-8 +#lt_LT.UTF-8 UTF-8 +#lt_LT ISO-8859-13 +#lv_LV.UTF-8 UTF-8 +#lv_LV ISO-8859-13 +#mai_IN UTF-8 +#mg_MG.UTF-8 UTF-8 +#mg_MG ISO-8859-15 +#mhr_RU UTF-8 +#mi_NZ.UTF-8 UTF-8 +#mi_NZ ISO-8859-13 +#mk_MK.UTF-8 UTF-8 +#mk_MK ISO-8859-5 +#ml_IN UTF-8 +#mn_MN UTF-8 +#mr_IN UTF-8 +#ms_MY.UTF-8 UTF-8 +#ms_MY ISO-8859-1 +#mt_MT.UTF-8 UTF-8 +#mt_MT ISO-8859-3 +#my_MM UTF-8 +#nan_TW@latin UTF-8 +#nb_NO.UTF-8 UTF-8 +#nb_NO ISO-8859-1 +#nds_DE UTF-8 +#nds_NL UTF-8 +#ne_NP UTF-8 +#nl_AW UTF-8 +#nl_BE.UTF-8 UTF-8 +#nl_BE ISO-8859-1 +#nl_BE@euro ISO-8859-15 +#nl_NL.UTF-8 UTF-8 +#nl_NL ISO-8859-1 +#nl_NL@euro ISO-8859-15 +#nn_NO.UTF-8 UTF-8 +#nn_NO ISO-8859-1 +#nr_ZA UTF-8 +#nso_ZA UTF-8 +#oc_FR.UTF-8 UTF-8 +#oc_FR ISO-8859-1 +#om_ET UTF-8 +#om_KE.UTF-8 UTF-8 +#om_KE ISO-8859-1 +#or_IN UTF-8 +#os_RU UTF-8 +#pa_IN UTF-8 +#pa_PK UTF-8 +#pap_AN UTF-8 +#pl_PL.UTF-8 UTF-8 +#pl_PL ISO-8859-2 +#ps_AF UTF-8 +#pt_BR.UTF-8 UTF-8 +#pt_BR ISO-8859-1 +#pt_PT.UTF-8 UTF-8 +#pt_PT ISO-8859-1 +#pt_PT@euro ISO-8859-15 +#ro_RO.UTF-8 UTF-8 +#ro_RO ISO-8859-2 +#ru_RU.KOI8-R KOI8-R +#ru_RU.UTF-8 UTF-8 +#ru_RU ISO-8859-5 +#ru_UA.UTF-8 UTF-8 +#ru_UA KOI8-U +#rw_RW UTF-8 +#sa_IN UTF-8 +#sc_IT UTF-8 +#sd_IN UTF-8 +#sd_IN@devanagari UTF-8 +#se_NO UTF-8 +#shs_CA UTF-8 +#si_LK UTF-8 +#sid_ET UTF-8 +#sk_SK.UTF-8 UTF-8 +#sk_SK ISO-8859-2 +#sl_SI.UTF-8 UTF-8 +#sl_SI ISO-8859-2 +#so_DJ.UTF-8 UTF-8 +#so_DJ ISO-8859-1 +#so_ET UTF-8 +#so_KE.UTF-8 UTF-8 +#so_KE ISO-8859-1 +#so_SO.UTF-8 UTF-8 +#so_SO ISO-8859-1 +#sq_AL.UTF-8 UTF-8 +#sq_AL ISO-8859-1 +#sq_MK UTF-8 +#sr_ME UTF-8 +#sr_RS UTF-8 +#sr_RS@latin UTF-8 +#ss_ZA UTF-8 +#st_ZA.UTF-8 UTF-8 +#st_ZA ISO-8859-1 +#sv_FI.UTF-8 UTF-8 +#sv_FI ISO-8859-1 +#sv_FI@euro ISO-8859-15 +#sv_SE.UTF-8 UTF-8 +#sv_SE ISO-8859-1 +#sw_KE UTF-8 +#sw_TZ UTF-8 +#ta_IN UTF-8 +#ta_LK UTF-8 +#te_IN UTF-8 +#tg_TJ.UTF-8 UTF-8 +#tg_TJ KOI8-T +#th_TH.UTF-8 UTF-8 +#th_TH TIS-620 +#ti_ER UTF-8 +#ti_ET UTF-8 +#tig_ER UTF-8 +#tk_TM UTF-8 +#tl_PH.UTF-8 UTF-8 +#tl_PH ISO-8859-1 +#tn_ZA UTF-8 +#tr_CY.UTF-8 UTF-8 +#tr_CY ISO-8859-9 +#tr_TR.UTF-8 UTF-8 +#tr_TR ISO-8859-9 +#ts_ZA UTF-8 +#tt_RU UTF-8 +#tt_RU@iqtelif UTF-8 +#ug_CN UTF-8 +#uk_UA.UTF-8 UTF-8 +#uk_UA KOI8-U +#unm_US UTF-8 +#ur_IN UTF-8 +#ur_PK UTF-8 +#uz_UZ ISO-8859-1 +#uz_UZ@cyrillic UTF-8 +#ve_ZA UTF-8 +#vi_VN.TCVN TCVN5712-1 +#vi_VN UTF-8 +#wa_BE ISO-8859-1 +#wa_BE@euro ISO-8859-15 +#wa_BE.UTF-8 UTF-8 +#wae_CH UTF-8 +#wal_ET UTF-8 +#wo_SN UTF-8 +#xh_ZA.UTF-8 UTF-8 +#xh_ZA ISO-8859-1 +#yi_US.UTF-8 UTF-8 +#yi_US CP1255 +#yo_NG UTF-8 +#yue_HK UTF-8 +#zh_CN.GB18030 GB18030 +#zh_CN.GBK GBK +#zh_CN.UTF-8 UTF-8 +#zh_CN GB2312 +#zh_HK.UTF-8 UTF-8 +#zh_HK BIG5-HKSCS +#zh_SG.UTF-8 UTF-8 +#zh_SG.GBK GBK +#zh_SG GB2312 +#zh_TW.EUC-TW EUC-TW +#zh_TW.UTF-8 UTF-8 +#zh_TW BIG5 +#zu_ZA.UTF-8 UTF-8 +#zu_ZA ISO-8859-1 diff --git a/build_tools/archiso/mythvantage/root-image/etc/nsswitch.conf b/build_tools/archiso/mythvantage/root-image/etc/nsswitch.conf new file mode 100644 index 0000000..2c66b68 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/nsswitch.conf @@ -0,0 +1,19 @@ +# Begin /etc/nsswitch.conf + +passwd: files +group: files +shadow: files + +publickey: files + +hosts: files mdns4_minimal dns mdns4 +networks: files + +protocols: files +services: files +ethers: files +rpc: files + +netgroup: files + +# End /etc/nsswitch.conf diff --git a/build_tools/archiso/mythvantage/root-image/etc/pam.d/su b/build_tools/archiso/mythvantage/root-image/etc/pam.d/su new file mode 100644 index 0000000..a291042 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/pam.d/su @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth sufficient pam_wheel.so trust use_uid +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so diff --git a/build_tools/archiso/mythvantage/root-image/etc/rc.conf b/build_tools/archiso/mythvantage/root-image/etc/rc.conf new file mode 100644 index 0000000..b4a9e46 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/rc.conf @@ -0,0 +1,7 @@ +USECOLOR="no" +LOCALE_DEFAULT="en_US.UTF-8" +DAEMON_LOCALE_DEFAULT="no" +CLOCK_DEFAULT="UTC" +TIMEZONE_DEFAULT="UTC" +KEYMAP_DEFAULT="us" +USECOLOR_DEFAULT="no" diff --git a/build_tools/archiso/mythvantage/root-image/etc/rc.d/functions.d/symlink_used_block_devices b/build_tools/archiso/mythvantage/root-image/etc/rc.d/functions.d/symlink_used_block_devices new file mode 100644 index 0000000..f6b6062 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/rc.d/functions.d/symlink_used_block_devices @@ -0,0 +1,7 @@ +symlink_used_block_devices() +{ + mkdir /run/aif + ln -s /run/archiso/used_block_devices /run/aif/ignore_block_devices +} + +add_hook multi_end symlink_used_block_devices diff --git a/build_tools/archiso/mythvantage/root-image/etc/rc.d/pacman-init b/build_tools/archiso/mythvantage/root-image/etc/rc.d/pacman-init new file mode 100755 index 0000000..bbbd719 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/rc.d/pacman-init @@ -0,0 +1,34 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Initializing pacman keyring" + if { pacman-key --init && pacman-key --populate archlinux; } &>/dev/null; then + add_daemon pacman-init + stat_done + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Removing pacman keyring" + rm -rf /etc/pacman.d/gnupg + rm_daemon pacman-init + stat_done + ;; + + restart) + $0 stop + $0 start + ;; + + *) + echo "usage: $0 {start|stop|restart}" +esac + +exit 0 diff --git a/build_tools/archiso/mythvantage/root-image/etc/rc.local b/build_tools/archiso/mythvantage/root-image/etc/rc.local new file mode 100755 index 0000000..b6ea57e --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/rc.local @@ -0,0 +1,110 @@ +#!/bin/bash +# +# /etc/rc.local: Local multi-user startup script. +# +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/profile +. ${MV_ROOT}/bin/install_functions.sh + +function mysql_check { + mysql -e "show databases;" 2>/dev/null >/dev/null + return $? +} + +function mythconverg_check { + mysql mythconverg -e "describe settings;" 2>/dev/null >/dev/null + return $? +} + +function install_db { + pacman --noconfirm -R mythdb-initial 2>/dev/null > /dev/null + pacman -S --noconfirm mythdb-initial 2>/dev/null > /dev/null +} + + + + +#check to see if mysql is running +stat_busy "Checking Mysql" +ATTEMPT=0 +mysql_check && printhl " Installing the initial database" &&install_db +mythconverg_check +status=$? +while [ ! $status = 0 ] +do + /etc/rc.d/mysqld start + mysqlstatus=$? + if [ $mysqlstatus = 0 ] + then + mysql_check && install_db + mythconverg_check + status=$? + else + ((ATTEMPT=ATTEMPT+1)) + /etc/rc.d/mysqld stop + sleep 2 + fi + if [ $ATTEMPT = 20 ] + then + printhl " Could not start mysql or install mythconverg within 20 attempts" + printhl " Aborting install" + exit 20 + fi +done +stat_done + +#check network parms +stat_busy "Checking network" +init_network +stat_done + +stat_busy "Probing network" +request_dhcp & +stat_done + +#save some cmdline options +stat_busy "Parsing command line" +parse_cmdline_2_db +bootsplash_setup +stat_done + +#search for remote +stat_busy "Checking for remote" +init_remote +stat_done +printhl "Finished" + +#creating /myth for live cd +. /usr/MythVantage/bin/mv_config.py +HDIR=`dirname $MYTHHOME` +mkdir -p $HDIR +useradd -b $HDIR -m -p "" -G "audio,disk,optical,wheel,storage,video,users" mythtv +chown -R mythtv.mythtv $MYTHHOME +#creating mountpoint for live cd +mkdir -p $DATAMOUNT +create_media_dirs.sh $DATAMOUNT +chown -R mythtv.mythtv $DATAMOUNT/media + + + +printhl "Finished" +/etc/rc.d/dbus start +/etc/rc.d/avahi-daemon start +echo $CMDLINE | grep -qi NoX +if [ $? = 0 ] +then + echo "" + printhl "No auto X option found" + # /usr/bin/chvt 2 +else + /root/startx & +fi + +# Set up automatically logged in user +if [ -f /.livesys/autologin ]; then + cp /.livesys/autologin /tmp/newuser +fi + +#sh /usr/bin/go.sh & + diff --git a/build_tools/archiso/mythvantage/root-image/etc/vconsole.conf b/build_tools/archiso/mythvantage/root-image/etc/vconsole.conf new file mode 100644 index 0000000..d89ef8a --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/etc/vconsole.conf @@ -0,0 +1 @@ +CONSOLEMAP="8859-1" diff --git a/build_tools/archiso/mythvantage/root-image/root/.post_process/go.sh b/build_tools/archiso/mythvantage/root-image/root/.post_process/go.sh new file mode 100755 index 0000000..a87ca0c --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/root/.post_process/go.sh @@ -0,0 +1,40 @@ +#!/bin/bash +#This script is run after data is copied, but before configuration. + +. /usr/MythVantage/bin/mv_config.py + +PD="/root/.post_process" +pacman -Sff --noconfirm runit-scripts + +HDIR=`dirname $MYTHHOME` +mkdir -p $HDIR +useradd -b $HDIR -m -p "" -G "audio,disk,optical,wheel,storage,video,users" mythtv + + + +chown -R mythtv.mythtv $MYTHHOME + +#creating /myth for live cd +mkdir -p $DATAMOUNT +create_media_dirs.sh $DATAMOUNT +chown -R mythtv.mythtv $DATAMOUNT/media + + + +python2 /root/.post_process/locale.py +echo "generating locales" +/usr/sbin/locale-gen + +rm -f /etc/issue +ln -s /etc/LinHES-release /etc/issue + +#remove files +rm -f /root/LinHES-install.sh +rm -f /root/startx +rm -f /root/.directory + + +#cp -rvpf /.post_process/home/mythtv /home/ +#cp -rvpf /.post_process/home/mythtv/.fluxbox /root +#cp -vpf /.post_process/nouveau.conf /etc/modprobe.d/nouveau.conf +mv $PD $PD.old diff --git a/build_tools/archiso/mythvantage/root-image/root/.post_process/locale.py b/build_tools/archiso/mythvantage/root-image/root/.post_process/locale.py new file mode 100644 index 0000000..70cfcbd --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/root/.post_process/locale.py @@ -0,0 +1,23 @@ +def genlocale(): + #logging.info("Generating locales") + locale_list=[ "en_US ISO-8859-1", "en_US.UTF-8 UTF-8" , "de_DE.UTF-8", "da_DK.utf8", "en_DK.utf8", "it_IT.utf8", "de_DE.UTF-8"] + #locale_list=['UTF-8', 'en_US ISO-8859-1'] + + localefile="/etc/locale.gen" + f = open(localefile) + lines = f.readlines() + f.close() + + f = open(localefile,'w') + + for line in lines: + outline = line + for locale in locale_list: + #print locale, line + if locale in line: + outline = line.replace('#','') + f.write(outline) + + f.close + +genlocale() diff --git a/build_tools/archiso/mythvantage/root-image/root/.post_process/menu.lst b/build_tools/archiso/mythvantage/root-image/root/.post_process/menu.lst new file mode 100755 index 0000000..0ecc2a7 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/root/.post_process/menu.lst @@ -0,0 +1,60 @@ +# Config file for GRUB - The GNU GRand Unified Bootloader +# /boot/grub/menu.lst + +# DEVICE NAME CONVERSIONS +# +# Linux Grub +# ------------------------- +# /dev/fd0 (fd0) +# /dev/hda (hd0) +# /dev/hdb2 (hd1,1) +# /dev/hda3 (hd0,2) +# + +# FRAMEBUFFER RESOLUTION SETTINGS +# +-------------------------------------------------+ +# | 640x480 800x600 1024x768 1280x1024 +# ----+-------------------------------------------- +# 256 | 0x301=769 0x303=771 0x305=773 0x307=775 +# 32K | 0x310=784 0x313=787 0x316=790 0x319=793 +# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794 +# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795 +# +-------------------------------------------------+ + +# general configuration: +timeout 5 +default 0 +#color light-blue/black light-cyan/blue + +# boot sections follow +# each is implicitly numbered from 0 in the order of appearance below +# +# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line. +# +#-* +hiddenmenu + +# (0) normal +title LinHes +root (hd0,0) +kernel /boot/vmlinuz26 root=/dev/hda1 ro init=/sbin/runit vmalloc=192M console=tty1 +initrd /boot/kernel26.img + +# (1) bootsplash +title LinHes-splashy +root (hd0,0) +kernel /boot/vmlinuz26 root=/dev/hda1 ro init=/sbin/runit vmalloc=192M quiet vga=0x314 splash=silent,theme:linhes console=tty1 +initrd /boot/kernel26.img + +# (2) noautologin +title LinHES-nologin +root (hd0,0) +kernel /boot/vmlinuz26 root=/dev/hda1 ro init=/sbin/runit quiet vga=0x314 splash=silent,theme:linhes console=tty1 nox +initrd /boot/kernel26.img + + +# (3) normal +title LinHes-init +root (hd0,0) +kernel /boot/vmlinuz26 root=/dev/hda1 ro console=tty1 +initrd /boot/kernel26.img diff --git a/build_tools/archiso/mythvantage/root-image/root/.post_process/rc.conf b/build_tools/archiso/mythvantage/root-image/root/.post_process/rc.conf new file mode 100755 index 0000000..43a275f --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/root/.post_process/rc.conf @@ -0,0 +1,71 @@ +# +# /etc/rc.conf - Main Configuration for Arch Linux +# + +# +# ----------------------------------------------------------------------- +# LOCALIZATION +# ----------------------------------------------------------------------- +# +# LOCALE: available languages can be listed with the 'locale -a' command +# HARDWARECLOCK: set to "UTC" or "localtime" +# TIMEZONE: timezones are found in /usr/share/zoneinfo +# KEYMAP: keymaps are found in /usr/share/kbd/keymaps +# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US) +# CONSOLEMAP: found in /usr/share/kbd/consoletrans +# USECOLOR: use ANSI color sequences in startup messages +# +LOCALE="en_US.utf-8" +HARDWARECLOCK="UTC" +TIMEZONE="US/Central" +KEYMAP="us" +CONSOLEFONT= +CONSOLEMAP= +USECOLOR="yes" + +# +# ----------------------------------------------------------------------- +# HARDWARE +# ----------------------------------------------------------------------- +# +# Scan hardware and load required modules at bootup +MOD_AUTOLOAD="yes" +if [ -f /etc/systemconfig ] +then + . /etc/systemconfig +fi + +if [ x$Audiotype = xOSS -a ! -f /tmp/.alsatest ] +then + ALSABLACKLIST="!soundcore" +else + if [ x$Audiotype = xOSS ] + then + ALSABLACKLIST="!soundcore" + else + ALSABLACKLIST="" + fi +fi + +# Module Blacklist - modules in this list will never be loaded by udev +MOD_BLACKLIST_=($ALSABLACKLIST !snd-pcsp !nouveau) +# +# Modules to load at boot-up (in this order) +# - prefix a module with a ! to blacklist it +# +MODULES=($MOD_BLACKLIST_) +# Scan for LVM volume groups at startup, required if you use LVM +USELVM="no" + +# +# ----------------------------------------------------------------------- +# NETWORKING +# ----------------------------------------------------------------------- +# +HOSTNAME=`cat /etc/hostname` + +#The following is only used on the install. After the first boot everything is set from /etc/net. + +#DAEMONS=(syslog-ng network netfs crond) +DAEMONS=(fbsplash !syslog-ng !hotplug !pcmcia !network !mysqld dbus avahi-daemon) +# End of file diff --git a/build_tools/archiso/mythvantage/root-image/root/LinHES-install.sh b/build_tools/archiso/mythvantage/root-image/root/LinHES-install.sh new file mode 100755 index 0000000..a4f8bd7 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/root/LinHES-install.sh @@ -0,0 +1,38 @@ +#!/bin/bash +#redirect stderr to stdout, then rediret stdout to file +. /etc/profile +exec 2>&1 +exec > /tmp/mythvantage_install.log +#/usr/bin/nvidia-settings -a InitialPixmapPlacement=2 +#keylaunch & +#/usr/bin/tilda & +#/usr/X11R6/bin/unclutter -root -idle 0 -jitter 400 -noevents & +export MALLOC_CHECK_=0 +xset s off +xset -dpms +xhost + + +CMDLINE=$(cat /proc/cmdline) +echo $CMDLINE |grep -q nfsroot +NFSROOT=$? +echo $CMDLINE |grep -q clean_upgrade +if [ $? = 0 ] +then + export CLEAN_UPGRADE=YES +else + export CLEAN_UPGRADE=NO +fi +MythVantage -r + +if [ x$NFSROOT = x1 ] +then + unbuffer MythVantage & +else + NETBOOT=YES MythVantage & +fi +cp -f /etc/keylaunchrc /root/.keylaunchrc +/usr/bin/keylaunch & + +#exec fluxbox > /var/log/fluxbox.log 2>&1 +export GNUSTEP_USER_ROOT=/usr/share/wm_data/GNUstep +exec wmaker diff --git a/build_tools/archiso/mythvantage/root-image/root/startx b/build_tools/archiso/mythvantage/root-image/root/startx new file mode 100755 index 0000000..ca11cdc --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/root/startx @@ -0,0 +1,37 @@ +#!/bin/bash +. /etc/profile + +export USER=root +export HOME=/root + +CMDLINE=$(cat /proc/cmdline) +TEMPVAR=${CMDLINE#*ip=} +IP=${TEMPVAR%% *} +echo $CMDLINE |grep -q vnc +USEVNC=$? + +if [ x$USEVNC = x1 ] +then + $MV_ROOT/bin/xconfig.sh 2>/dev/null +# cat /etc/X11/xorg.conf | sed -e 's/dev\/mouse/dev\/psaux/g'> /root/xorg.conf.install + #startx /root/LinHES-install.sh -- -logverbose 6 -config /root/xorg.conf.install -allowMouseOpenFail 2>/tmp/x.log + startx /root/LinHES-install.sh -- -logverbose 6 -allowMouseOpenFail 2>/tmp/x.log + else + #VNC + pacman -Sf --noconfirm tigervnc + /etc/rc.d/dbus start + cp -f $TEMPLATES/vnc.service /etc/avahi/services/ + /etc/rc.d/avahi-daemon start + cd /root + mkdir .vnc + echo 54321 |vncpasswd -f > /root/.vnc/passwd + chmod 500 /root/.vnc/passwd + rm -f /root/.vnc/xstartup 2>/dev/null + ln -s /root/LinHES-install.sh /root/.vnc/xstartup + vncserver + echo "The VNC server password is: 54321" + echo "Please connect to one of these ip's" + echo "-------------------------------------------" + ip addr show |grep "inet" |grep -v inet6|cut -d\/ -f1 + echo "-------------------------------------------" +fi diff --git a/build_tools/archiso/mythvantage/root-image/usr/bin/autologin b/build_tools/archiso/mythvantage/root-image/usr/bin/autologin new file mode 100755 index 0000000..c124f9e --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/usr/bin/autologin @@ -0,0 +1,2 @@ +#!/bin/bash +/bin/login -f root diff --git a/build_tools/archiso/mythvantage/root-image/usr/bin/go.sh b/build_tools/archiso/mythvantage/root-image/usr/bin/go.sh new file mode 100644 index 0000000..e6222e4 --- /dev/null +++ b/build_tools/archiso/mythvantage/root-image/usr/bin/go.sh @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/MythVantage/bin/mv_install.py --rootdisk=sda --rootfs=ext3 --rootsize=5000 --datafs=ext3 --datasize=50 --datadisk=sda --swapsize=2 -c full_install diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso.cfg new file mode 100644 index 0000000..d1817af --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso.cfg @@ -0,0 +1,11 @@ +DEFAULT select + +LABEL select +COM32 boot/syslinux/whichsys.c32 +APPEND -pxe- pxe -sys- sys -iso- sys + +LABEL pxe +CONFIG boot/syslinux/archiso_pxe_choose.cfg + +LABEL sys +CONFIG boot/syslinux/archiso_sys_choose.cfg diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_head.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_head.cfg new file mode 100644 index 0000000..81ad26e --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_head.cfg @@ -0,0 +1,25 @@ +SERIAL 0 38400 +UI boot/syslinux/vesamenu.c32 +MENU TITLE Arch Linux +MENU BACKGROUND boot/syslinux/splash.png + +MENU WIDTH 78 +MENU MARGIN 4 +MENU ROWS 7 +MENU VSHIFT 10 +MENU TABMSGROW 14 +MENU CMDLINEROW 14 +MENU HELPMSGROW 16 +MENU HELPMSGENDROW 29 + +# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu + +MENU COLOR border 30;44 #40ffffff #a0000000 std +MENU COLOR title 1;36;44 #9033ccff #a0000000 std +MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all +MENU COLOR unsel 37;44 #50ffffff #a0000000 std +MENU COLOR help 37;40 #c0ffffff #a0000000 std +MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std +MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std +MENU COLOR msg07 37;40 #90ffffff #a0000000 std +MENU COLOR tabmsg 31;40 #30ffffff #00000000 std diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe32.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe32.cfg new file mode 100644 index 0000000..4bdeefa --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe32.cfg @@ -0,0 +1,32 @@ +LABEL arch32_nbd +TEXT HELP +Boot the Arch Linux (i686) live medium (Using NBD). It allows you to install Arch Linux or +perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (i686) (NBD) +LINUX boot/i686/vmlinuz +INITRD boot/i686/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver} +IPAPPEND 3 + +LABEL arch32_nfs +TEXT HELP +Boot the Arch Linux (i686) live medium (Using NFS). It allows you to install Arch Linux or +perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (i686) (NFS) +LINUX boot/i686/vmlinuz +INITRD boot/i686/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt +IPAPPEND 3 + +LABEL arch32_http +TEXT HELP +Boot the Arch Linux (i686) live medium (Using HTTP). It allows you to install Arch Linux or +perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (i686) (HTTP) +LINUX boot/i686/vmlinuz +INITRD boot/i686/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ +IPAPPEND 3 diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe64.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe64.cfg new file mode 100644 index 0000000..1676236 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe64.cfg @@ -0,0 +1,32 @@ +LABEL arch64_nbd +TEXT HELP +Boot the Arch Linux (x86_64) live medium (Using NBD). It allows you to install Arch Linux or +perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (x86_64) (NBD) +LINUX boot/x86_64/vmlinuz +INITRD boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver} +IPAPPEND 3 + +LABEL arch64_nfs +TEXT HELP +Boot the Arch Linux (x86_64) live medium (Using NFS). It allows you to install Arch Linux or +perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (x86_64) (NFS) +LINUX boot/x86_64/vmlinuz +INITRD boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt +IPAPPEND 3 + +LABEL arch64_http +TEXT HELP +Boot the Arch Linux (x86_64) live medium (Using HTTP). It allows you to install Arch Linux or +perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (x86_64) (HTTP) +LINUX boot/x86_64/vmlinuz +INITRD boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ +IPAPPEND 3 diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe_32_inc.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe_32_inc.cfg new file mode 100644 index 0000000..e4115df --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe_32_inc.cfg @@ -0,0 +1,3 @@ +INCLUDE boot/syslinux/archiso_head.cfg +INCLUDE boot/syslinux/archiso_pxe32.cfg +INCLUDE boot/syslinux/archiso_tail.cfg diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe_both_inc.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe_both_inc.cfg new file mode 100644 index 0000000..324523e --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe_both_inc.cfg @@ -0,0 +1,4 @@ +INCLUDE boot/syslinux/archiso_head.cfg +INCLUDE boot/syslinux/archiso_pxe32.cfg +INCLUDE boot/syslinux/archiso_pxe64.cfg +INCLUDE boot/syslinux/archiso_tail.cfg diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe_choose.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe_choose.cfg new file mode 100644 index 0000000..6296065 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_pxe_choose.cfg @@ -0,0 +1,11 @@ +DEFAULT choose + +LABEL choose +COM32 boot/syslinux/ifcpu64.c32 +APPEND have64 -- nohave64 + +LABEL have64 +CONFIG boot/syslinux/archiso_pxe_both_inc.cfg + +LABEL nohave64 +CONFIG boot/syslinux/archiso_pxe_32_inc.cfg diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys32.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys32.cfg new file mode 100644 index 0000000..261579e --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys32.cfg @@ -0,0 +1,9 @@ +LABEL arch32 +TEXT HELP +Boot the Arch Linux (i686) live medium. It allows you to install Arch Linux or +perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (i686) +LINUX boot/i686/vmlinuz +INITRD boot/i686/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys64.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys64.cfg new file mode 100644 index 0000000..eb89813 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys64.cfg @@ -0,0 +1,9 @@ +LABEL arch64 +TEXT HELP +Boot the Arch Linux (x86_64) live medium. It allows you to install Arch Linux or +perform system maintenance. +ENDTEXT +MENU LABEL Boot Arch Linux (x86_64) +LINUX boot/x86_64/vmlinuz +INITRD boot/x86_64/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys_32_inc.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys_32_inc.cfg new file mode 100644 index 0000000..9e37093 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys_32_inc.cfg @@ -0,0 +1,3 @@ +INCLUDE boot/syslinux/archiso_head.cfg +INCLUDE boot/syslinux/archiso_sys32.cfg +INCLUDE boot/syslinux/archiso_tail.cfg diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys_both_inc.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys_both_inc.cfg new file mode 100644 index 0000000..4ed6b39 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys_both_inc.cfg @@ -0,0 +1,4 @@ +INCLUDE boot/syslinux/archiso_head.cfg +INCLUDE boot/syslinux/archiso_sys32.cfg +INCLUDE boot/syslinux/archiso_sys64.cfg +INCLUDE boot/syslinux/archiso_tail.cfg diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys_choose.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys_choose.cfg new file mode 100644 index 0000000..24c597a --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_sys_choose.cfg @@ -0,0 +1,11 @@ +DEFAULT choose + +LABEL choose +COM32 boot/syslinux/ifcpu64.c32 +APPEND have64 -- nohave64 + +LABEL have64 +CONFIG boot/syslinux/archiso_sys_both_inc.cfg + +LABEL nohave64 +CONFIG boot/syslinux/archiso_sys_32_inc.cfg diff --git a/build_tools/archiso/mythvantage/syslinux.dual/archiso_tail.cfg b/build_tools/archiso/mythvantage/syslinux.dual/archiso_tail.cfg new file mode 100644 index 0000000..a55548c --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/archiso_tail.cfg @@ -0,0 +1,27 @@ +LABEL existing +TEXT HELP +Boot an existing operating system. Press TAB to edit the disk and partition +number to boot. +ENDTEXT +MENU LABEL Boot existing OS +COM32 boot/syslinux/chain.c32 +APPEND hd0 0 + +# http://www.memtest.org/ +LABEL memtest +MENU LABEL Run Memtest86+ (RAM test) +LINUX boot/memtest + +# http://hdt-project.org/ +LABEL hdt +MENU LABEL Hardware Information (HDT) +COM32 boot/syslinux/hdt.c32 +APPEND modules_alias=boot/syslinux/hdt/modalias.gz pciids=boot/syslinux/hdt/pciids.gz + +LABEL reboot +MENU LABEL Reboot +COM32 boot/syslinux/reboot.c32 + +LABEL poweroff +MENU LABEL Power Off +COMBOOT boot/syslinux/poweroff.com diff --git a/build_tools/archiso/mythvantage/syslinux.dual/syslinux.cfg b/build_tools/archiso/mythvantage/syslinux.dual/syslinux.cfg new file mode 100644 index 0000000..3ee98de --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux.dual/syslinux.cfg @@ -0,0 +1,5 @@ +DEFAULT loadconfig + +LABEL loadconfig + CONFIG archiso.cfg + APPEND ../../ diff --git a/build_tools/archiso/mythvantage/syslinux/archiso.cfg b/build_tools/archiso/mythvantage/syslinux/archiso.cfg new file mode 100644 index 0000000..126fc77 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux/archiso.cfg @@ -0,0 +1,11 @@ +DEFAULT select + +LABEL select +COM32 boot/syslinux/whichsys.c32 +APPEND -pxe- pxe -sys- sys -iso- sys + +LABEL pxe +CONFIG boot/syslinux/archiso_pxe_inc.cfg + +LABEL sys +CONFIG boot/syslinux/archiso_sys_inc.cfg diff --git a/build_tools/archiso/mythvantage/syslinux/archiso_head.cfg b/build_tools/archiso/mythvantage/syslinux/archiso_head.cfg new file mode 100644 index 0000000..25911a1 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux/archiso_head.cfg @@ -0,0 +1,44 @@ +SERIAL 0 38400 +UI boot/syslinux/vesamenu.c32 +MENU TITLE LinHES: The Linux Home Entertainment System +MENU BACKGROUND boot/syslinux/splash.png + +prompt 1 +TIMEOUT 300 +TOTALTIMEOUT 9000 +DEFAULT linux + +#MENU WIDTH 78 +#MENU MARGIN 4 +#MENU ROWS 6 +#MENU VSHIFT 10 +#MENU TABMSGROW 14 +#MENU CMDLINEROW 14 +MENU HELPMSGROW 19 +MENU HELPMSGENDROW 29 + +MENU SEPARATOR + +MENU ROWS 10 +MENU CMDLINEROW 17 +MENU TIMEOUTROW 15 +MENU TABMSGROW 17 +MENU WIDTH 78 + +menu color border 30;44 #00000000 #00000000 none +menu color sel 7 #ff000000 #ffebb91c rev +menu color title 0 #ffffffff #ff0072BB +menu color tabmsg 0 #ff000000 #00000000 none +menu color unsel 0 #ffffffff #ff0072BB + +menu color hotsel 0 #ff000000 #ffffffff +menu color hotkey 7 #ffffffff #ff000000 +#menu color timeout_msg 0 #fffffff #ffffffff +#menu color timeout 0 #fffffff #ffffffff +menu color cmdline 0 #ff000000 #00000000 none + + +menu COLOR timeout_msg 37;40 #80ffffff #00000000 std +menu COLOR timeout 1;37;40 #c0ffffff #00000000 std + +# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu diff --git a/build_tools/archiso/mythvantage/syslinux/archiso_pxe_inc.cfg b/build_tools/archiso/mythvantage/syslinux/archiso_pxe_inc.cfg new file mode 100644 index 0000000..b2b6887 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux/archiso_pxe_inc.cfg @@ -0,0 +1,3 @@ +INCLUDE boot/syslinux/archiso_head.cfg +INCLUDE boot/syslinux/archiso_pxe.cfg +INCLUDE boot/syslinux/archiso_tail.cfg diff --git a/build_tools/archiso/mythvantage/syslinux/archiso_sys.cfg b/build_tools/archiso/mythvantage/syslinux/archiso_sys.cfg new file mode 100644 index 0000000..6185fc2 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux/archiso_sys.cfg @@ -0,0 +1,40 @@ + +MENU TITLE LinHES: The Linux Home Entertainment System + +label linux +MENU LABEL LinHES (default). +TEXT HELP +Boot the LinHES live medium. It allows you to install LinHES or +perform system maintenance. Add NoX to skip xwindows +ENDTEXT +LINUX boot/%ARCH%/vmlinuz +INITRD boot/%ARCH%/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash=silent,theme:linhes console=tty1 + + +label linux-nosplash +MENU LABEL LinHES without splash screen. +TEXT HELP +Boot the LinHES live medium. It allows you to install LinHES or +perform system maintenance. Add NoX to skip xwindows +ENDTEXT +LINUX boot/%ARCH%/vmlinuz +INITRD boot/%ARCH%/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% console=tty1 + +label linux-vnc +MENU LABEL LinHES VNC install. +TEXT HELP +Boot the LinHES live medium. It allows you to install LinHES or +perform system maintenance over vnc. DHCP will be used for the network +ENDTEXT +LINUX boot/%ARCH%/vmlinuz +INITRD boot/%ARCH%/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% console=tty1 vnc cip=dhcp + +label special +MENU LABEL Special Hardware +KERNEL boot/syslinux/vesamenu.c32 +APPEND boot/syslinux/hardsub.cfg + +MENU SEPARATOR diff --git a/build_tools/archiso/mythvantage/syslinux/archiso_sys_inc.cfg b/build_tools/archiso/mythvantage/syslinux/archiso_sys_inc.cfg new file mode 100644 index 0000000..56c6a17 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux/archiso_sys_inc.cfg @@ -0,0 +1,3 @@ +INCLUDE boot/syslinux/archiso_head.cfg +INCLUDE boot/syslinux/archiso_sys.cfg +INCLUDE boot/syslinux/archiso_tail.cfg diff --git a/build_tools/archiso/mythvantage/syslinux/archiso_tail.cfg b/build_tools/archiso/mythvantage/syslinux/archiso_tail.cfg new file mode 100644 index 0000000..a55548c --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux/archiso_tail.cfg @@ -0,0 +1,27 @@ +LABEL existing +TEXT HELP +Boot an existing operating system. Press TAB to edit the disk and partition +number to boot. +ENDTEXT +MENU LABEL Boot existing OS +COM32 boot/syslinux/chain.c32 +APPEND hd0 0 + +# http://www.memtest.org/ +LABEL memtest +MENU LABEL Run Memtest86+ (RAM test) +LINUX boot/memtest + +# http://hdt-project.org/ +LABEL hdt +MENU LABEL Hardware Information (HDT) +COM32 boot/syslinux/hdt.c32 +APPEND modules_alias=boot/syslinux/hdt/modalias.gz pciids=boot/syslinux/hdt/pciids.gz + +LABEL reboot +MENU LABEL Reboot +COM32 boot/syslinux/reboot.c32 + +LABEL poweroff +MENU LABEL Power Off +COMBOOT boot/syslinux/poweroff.com diff --git a/build_tools/archiso/mythvantage/syslinux/hardsub.cfg b/build_tools/archiso/mythvantage/syslinux/hardsub.cfg new file mode 100644 index 0000000..73a9b45 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux/hardsub.cfg @@ -0,0 +1,58 @@ +SERIAL 0 38400 +UI boot/syslinux/vesamenu.c32 +prompt 0 +#timeout 300 +INCLUDE boot/syslinux/archiso_head.cfg + +MENU TITLE Systems menu + +label atomic +MENU LABEL LinHES on Atomic Ant! +kernel /boot/vmlinuz26 +append initrd=/boot/larch.img vga=792 quiet splash=silent,theme:linhes console=tty1 disablemodules=agpart,intel_agp + + +label linux-serial +MENU LABEL use serial port ttyS0 for ir receiver +TEXT HELP +Boot the LinHES live medium. It allows you to install LinHES or +perform system maintenance. +ENDTEXT +LINUX boot/%ARCH%/vmlinuz +INITRD boot/%ARCH%/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% console=tty1 remoteport=ttyS0 remotebucket=common remote=mceusb + +label linux-vesa +MENU LABEL Force use of vesa driver +TEXT HELP +Boot the LinHES live medium. It allows you to install LinHES or +perform system maintenance. Force the use of the xorg vesa driver +ENDTEXT +LINUX boot/%ARCH%/vmlinuz +INITRD boot/%ARCH%/archiso.img +APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% console=tty1 forceXvesa + +#label dragon +#MENU LABEL Dragon Version 1 +#kernel /boot/vmlinuz26 +#append initrd=/boot/larch.img type=dragon vga=0x314 quiet splash=silent,theme:linhes console=tty1 + +#label dragon2 +#MENU LABEL Dragon Version 2 +#kernel /boot/vmlinuz26 +#append initrd=/boot/larch.img type=dragon2 vga=0x314 quiet splash=silent,theme:linhes console=tty1 + +#label ausdragon +#MENU LABEL Australian Dragon +#kernel /boot/vmlinuz26 +#append initrd=/boot/larch.img type=ausdragon vga=0x314 quiet splash=silent,theme:linhes console=tty1 + +#label 8400 +#MENU LABEL For the Nvidia 8400 chipset. +#kernel /boot/vmlinuz26 +#append initrd=/boot/larch.img vga=792 quiet splash=silent,theme:linhes console=tty1 disablemodules=agpart + +label goback +MENU LABEL Back +kernel boot/syslinux/vesamenu.c32 +append menu boot/syslinux/archiso_sys_inc.cfg diff --git a/build_tools/archiso/mythvantage/syslinux/splash.png b/build_tools/archiso/mythvantage/syslinux/splash.png Binary files differnew file mode 100644 index 0000000..76a0777 --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux/splash.png diff --git a/build_tools/archiso/mythvantage/syslinux/syslinux.cfg b/build_tools/archiso/mythvantage/syslinux/syslinux.cfg new file mode 100644 index 0000000..3ee98de --- /dev/null +++ b/build_tools/archiso/mythvantage/syslinux/syslinux.cfg @@ -0,0 +1,5 @@ +DEFAULT loadconfig + +LABEL loadconfig + CONFIG archiso.cfg + APPEND ../../ |