summaryrefslogtreecommitdiff
path: root/libre/grub/09_parabola
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-01-11 07:05:27 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-01-11 07:05:27 -0200
commit53cb03bea96ce5f971b327f64f4437c096124f18 (patch)
tree739c74ace7542db88838b2dd97bc25382da78cea /libre/grub/09_parabola
parentfcc59bd05df7c63e41d823c0d262d09c267f8ad9 (diff)
downloadabslibre-53cb03bea96ce5f971b327f64f4437c096124f18.tar.gz
abslibre-53cb03bea96ce5f971b327f64f4437c096124f18.tar.bz2
abslibre-53cb03bea96ce5f971b327f64f4437c096124f18.zip
grub-1:2.02.beta2-1: updating version
1) Removal of parabola_grub_mkconfig_fixes.patch, replaced with 09_parabola helper script, and grub-add-GRUB_COLOR_variables.patch (small non-Arch specific part of the earlier patch). Fixes https://bugs.archlinux.org/task/37904 2) Bump directly used unifont bdf file to working ver 6.3.20131217 as mentioned at http://savannah.gnu.org/bugs/?40330 3) grub-extras is now available as GIT repo, so removed bzr from makedepends. As a consequence removed python2 and used python(3) in makedepends. Incorrect GRUB_CONTRIB var also fixed. 4) grub-extras LUA and ntldr-img are set to be deprecated, so they are not built. The only grub-extras version built is 915resolution (for grub-bios aka target i386-pc alone) 5) PKGBUILD directly used GIT TAG support by makepkg to checkout the souce instead of downloading the upstream tarball 6) https://bugs.archlinux.org/task/38054 already fixed in 2.02-beta2 7) https://bugs.archlinux.org/task/38053 also fixed in 2.02-beta2 8) Added suffix grub-efi build dir so that it is easy for users to modify the PKGBUILD to build i386-efi in Parabola x86_64 if required (not officially supported) 9) Added 10_linux.in.patch to rebranding for some free distros
Diffstat (limited to 'libre/grub/09_parabola')
-rw-r--r--libre/grub/09_parabola178
1 files changed, 178 insertions, 0 deletions
diff --git a/libre/grub/09_parabola b/libre/grub/09_parabola
new file mode 100644
index 000000000..49cbad4ba
--- /dev/null
+++ b/libre/grub/09_parabola
@@ -0,0 +1,178 @@
+#!/usr/bin/env bash
+
+##
+## grub-mkconfig helper script specific to Parabola GNU/Linux-libre
+## Contributed by "Keshav Padram Amburay" <the ddoott ridikulus ddoott rat aatt geemmayil ddoott ccoomm>
+## Rebranded for Parabola by "André Silva" <emulatorman@parabola.nu>
+##
+## Script based on do_grub_config() function in Arch Archboot ISO Installer/Setup script
+## Some parts taken from /etc/grub.d/10_linux script shipped by GRUB(2) upstream
+##
+## This script can be freely distributed and/or modified
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This script is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+_FUNC_GRUB_FILE_PRESENT() {
+
+ [[ -z "${GRUB_PLATFORM}" ]] && GRUB_PLATFORM="x86"
+
+ if [[ "${GRUB_PLATFORM}" == "x86" ]]; then
+ check="--is-x86-linux32"
+ elif [[ "${GRUB_PLATFORM}" == "i386-xen-pae" ]]; then
+ check="--is-i386-xen-pae-domu"
+ elif [[ "${GRUB_PLATFORM}" == "x86_64-xen" ]]; then
+ check="--is-x86_64-xen-domu"
+ else
+ check="--is-${GRUB_PLATFORM}-linux"
+ fi
+
+ case "${GRUB_PLATFORM}" in
+ x86)
+ list="$(for i in "${GRUB_ROOT}"/boot/vmlinuz-linux* ; do
+ if grub_file_is_not_garbage "${i}" && "${grub_file}" ${check} "${i}" ; then echo -n "${i} " ; fi
+ done)" ;;
+ *)
+ list="$(for i in "${GRUB_ROOT}"/boot/vmlinuz-linux* ; do
+ if grub_file_is_not_garbage "${i}" && "${grub_file}" ${check} "${i}" ; then echo -n "${i} " ; fi
+ done)" ;;
+ esac
+}
+
+set -e
+
+prefix="/usr"
+exec_prefix="${prefix}"
+datarootdir="/usr/share"
+datadir="${datarootdir}"
+sysconfdir="/etc"
+
+. "${datarootdir}/grub/grub-mkconfig_lib"
+
+. "${sysconfdir}/default/grub"
+
+export TEXTDOMAIN="grub"
+export TEXTDOMAINDIR="${datarootdir}/locale"
+
+CLASS="--class parabola --class gnu-linux --class gnu --class os"
+
+[[ "${grub_file}" != "" ]] && _FUNC_GRUB_FILE_PRESENT
+
+BOOT_PART_FS_UUID="$(${grub_probe} --target="fs_uuid" "/boot" 2>/dev/null)"
+BOOT_PART_HINTS_STRING="$(${grub_probe} --target="hints_string" "/boot" 2>/dev/null)"
+BOOT_PART_FS="$(${grub_probe} --target="fs" "/boot" 2>/dev/null)"
+
+ROOT_PART_FS_UUID="$(${grub_probe} --target="fs_uuid" "/" 2>/dev/null)"
+ROOT_PART_HINTS_STRING="$(${grub_probe} --target="hints_string" "/" 2>/dev/null)"
+ROOT_PART_FS="$(${grub_probe} --target="fs" "/" 2>/dev/null)"
+
+if [[ "${ROOT_PART_FS_UUID}" == "${BOOT_PART_FS_UUID}" ]]; then
+ SUBDIR="/boot"
+else
+ SUBDIR=""
+fi
+
+if [[ "${GRUB_LINUX_ROOT_DEVICE}" == "" ]]; then
+ if [[ "${GRUB_DEVICE_UUID}" == "" ]] || \
+ [[ "${GRUB_DISABLE_LINUX_UUID}" == "true" ]] || \
+ [[ ! -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ]] || \
+ uses_abstraction "${GRUB_DEVICE}" lvm ; then
+ GRUB_LINUX_ROOT_DEVICE="${GRUB_DEVICE}"
+ else
+ GRUB_LINUX_ROOT_DEVICE="UUID=${GRUB_DEVICE_UUID}"
+ fi
+fi
+
+[[ "${GRUB_LINUX_PARAMS}" == "" ]] && GRUB_LINUX_PARAMS="${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+
+for _KERNEL_ in ${list} ; do
+
+ echo "Found linux image: ${_KERNEL_}" >&2
+
+ _KERNEL_FILE_="$(echo ${_KERNEL_} | sed 's,/boot/,,g')"
+ _KERNEL_PKG_="pkg-$(echo ${_KERNEL_FILE_} | sed 's,vmlinuz-,,g')"
+
+ _INITRAMFS_="${_KERNEL_FILE_/vmlinuz-/initramfs-}.img"
+
+ if [[ -e "/boot/${_INITRAMFS_}" ]]; then
+
+ echo "Found initramfs image: /boot/${_INITRAMFS_}" >&2
+
+cat << EOF
+
+menuentry "Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel" ${CLASS} {
+ if [ x\$feature_all_video_module = xy ]; then
+ insmod all_video
+ fi
+ set gfxpayload=keep
+ insmod ${BOOT_PART_FS}
+ if [ x\$feature_platform_search_hint = xy ]; then
+ search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID}
+ else
+ search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID}
+ fi
+ echo 'Loading Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel ...'
+ linux ${SUBDIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS}
+ echo 'Loading Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel initramfs ...'
+ initrd ${SUBDIR}/${_INITRAMFS_}
+}
+
+EOF
+ fi
+
+ _INITRAMFS_FALLBACK_="${_KERNEL_FILE_/vmlinuz-/initramfs-}-fallback.img"
+
+ if [[ -e "/boot/${_INITRAMFS_FALLBACK_}" ]]; then
+
+ echo "Found fallback initramfs image: /boot/${_INITRAMFS_FALLBACK_}" >&2
+
+cat << EOF
+
+menuentry "Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel (fallback initramfs)" ${CLASS} {
+ if [ x\$feature_all_video_module = xy ]; then
+ insmod all_video
+ fi
+ set gfxpayload=keep
+ insmod ${BOOT_PART_FS}
+ if [ x\$feature_platform_search_hint = xy ]; then
+ search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID}
+ else
+ search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID}
+ fi
+ echo 'Loading Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel ...'
+ linux ${SUBDIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS}
+ echo 'Loading Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel fallback initramfs ...'
+ initrd ${SUBDIR}/${_INITRAMFS_FALLBACK_}
+}
+
+EOF
+ fi
+
+ if [[ ! -e "/boot/${_INITRAMFS_}" ]] && [[ ! -e "/boot/${_INITRAMFS_FALLBACK_}" ]]; then
+cat << EOF
+
+menuentry "Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel (no initramfs)" ${CLASS} {
+ if [ x\$feature_all_video_module = xy ]; then
+ insmod all_video
+ fi
+ set gfxpayload=keep
+ insmod ${BOOT_PART_FS}
+ if [ x\$feature_platform_search_hint = xy ]; then
+ search --no-floppy --fs-uuid --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID}
+ else
+ search --no-floppy --fs-uuid --set=root ${BOOT_PART_FS_UUID}
+ fi
+ echo 'Loading Parabola GNU/Linux-libre ${_KERNEL_PKG_} kernel ...'
+ linux ${SUBDIR}/${_KERNEL_FILE_} root=${GRUB_LINUX_ROOT_DEVICE} rw ${GRUB_LINUX_PARAMS}
+}
+
+EOF
+ fi
+
+done