This commit is contained in:
Tracker-Friendly 2023-09-05 17:28:40 +01:00
parent d992fa3e60
commit 33fa411c1c
38 changed files with 1430 additions and 19 deletions

View File

@ -1,9 +1,9 @@
NAME="Evolution"
ID="evolution"
NAME="EvolutionOS"
ID="evolutionos"
PRETTY_NAME="EvolutionOS"
HOME_URL="https://evolutionos.codeberg.page"
DOCUMENTATION_URL="https://evolutionos.codeberg.page/wiki/"
LOGO="evolution-logo"
ANSI_COLOR="0;38;2;71;128;97"
DISTRIB_ID="evolution"
DISTRIB_ID="evolutionos"

View File

@ -1,7 +1,7 @@
# Template file for 'base-files'
pkgname=base-files
version=0.143
revision=7
revision=9
bootstrap=yes
depends="xbps-triggers"
short_desc="Evolution Linux base system files"

View File

@ -30,7 +30,7 @@ CONFIG_FEATURE_INSTALLER=y
CONFIG_FEATURE_SUID=y
CONFIG_FEATURE_SUID_CONFIG=y
CONFIG_FEATURE_SUID_CONFIG_QUIET=y
CONFIG_FEATURE_PREFER_APPLETS=y
# CONFIG_FEATURE_PREFER_APPLETS not set
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
# CONFIG_SELINUX is not set
CONFIG_FEATURE_CLEAN_UP=y
@ -1205,7 +1205,7 @@ CONFIG_FEATURE_SH_MATH=y
CONFIG_FEATURE_SH_MATH_64=y
CONFIG_FEATURE_SH_MATH_BASE=y
CONFIG_FEATURE_SH_EXTRA_QUIET=y
CONFIG_FEATURE_SH_STANDALONE=y
# CONFIG_FEATURE_SH_STANDALONE not set
CONFIG_FEATURE_SH_NOFORK=y
CONFIG_FEATURE_SH_READ_FRAC=y
CONFIG_FEATURE_SH_HISTFILESIZE=y

View File

@ -1,7 +1,7 @@
# Template file for 'busybox'
pkgname=busybox-evolution
version=1.36.1
revision=2
revision=4
hostmakedepends="perl pkg-config"
checkdepends="tar which zip"
short_desc="Swiss Army Knife of Embedded Linux (evolutionOS edition)"
@ -64,8 +64,7 @@ do_configure() {
_patch_config busybox-static static
for t in busybox busybox-static; do
CONFIG_EXTRA_LDLIBS="pam"
make -C "${t}" KBUILD_SRC="${wrksrc}/src" -f "${wrksrc}/src/Makefile" oldconfig
make -C "${t}" KBUILD_SRC="${wrksrc}/src" -f "${wrksrc}/src/Makefile" oldconfig
make -C "${t}" KBUILD_SRC="${wrksrc}/src" -f "${wrksrc}/src/Makefile" prepare "${makejobs}"
done

View File

@ -0,0 +1,4 @@
#!/bin/sh
exec 2>&1
[ -r conf ] && . ./conf
exec dhcpcd -B eth0

View File

@ -0,0 +1,4 @@
#!/bin/sh
exec 2>&1
[ -r conf ] && . ./conf
exec dhcpcd -B

View File

@ -0,0 +1,62 @@
From 45e441ada6d3ea4355d623cf12d9a559a5c2afde Mon Sep 17 00:00:00 2001
From: Roy Marples <roy@marples.name>
Date: Tue, 23 May 2023 22:14:57 +0100
Subject: [PATCH] Linux: Improve learning IPv6 address flags
Rather than matching addresses during netlink message processing,
extract the local, address and flag parts.
Once done, then match local and address to the address we are
looking for and if equal apply the flags.
Fixes #201 and maybe #149.
---
src/if-linux.c | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/src/if-linux.c b/src/if-linux.c
index f2f609ed..212ed5df 100644
--- a/src/if-linux.c
+++ b/src/if-linux.c
@@ -1996,7 +1996,8 @@ _if_addrflags6(__unused struct dhcpcd_ctx *ctx,
size_t len;
struct rtattr *rta;
struct ifaddrmsg *ifa;
- bool matches_addr = false;
+ struct in6_addr *local = NULL, *address = NULL;
+ uint32_t *flags = NULL;
ifa = NLMSG_DATA(nlm);
if (ifa->ifa_index != ia->ifa_ifindex || ifa->ifa_family != AF_INET6)
@@ -2007,17 +2008,26 @@ _if_addrflags6(__unused struct dhcpcd_ctx *ctx,
for (; RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) {
switch (rta->rta_type) {
case IFA_ADDRESS:
- if (IN6_ARE_ADDR_EQUAL(&ia->ifa_addr, (struct in6_addr *)RTA_DATA(rta)))
- ia->ifa_found = matches_addr = true;
- else
- matches_addr = false;
+ address = (struct in6_addr *)RTA_DATA(rta);
+ break;
+ case IFA_LOCAL:
+ local = (struct in6_addr *)RTA_DATA(rta);
break;
case IFA_FLAGS:
- if (matches_addr)
- memcpy(&ia->ifa_flags, RTA_DATA(rta), sizeof(ia->ifa_flags));
+ flags = (uint32_t *)RTA_DATA(rta);
break;
}
}
+
+ if (local) {
+ if (IN6_ARE_ADDR_EQUAL(&ia->ifa_addr, local))
+ ia->ifa_found = true;
+ } else if (address) {
+ if (IN6_ARE_ADDR_EQUAL(&ia->ifa_addr, address))
+ ia->ifa_found = true;
+ }
+ if (flags && ia->ifa_found)
+ memcpy(&ia->ifa_flags, flags, sizeof(ia->ifa_flags));
return 0;
}

View File

@ -0,0 +1,24 @@
From 76ec6a63705e1c3591b4da94c10047a79f0f49db Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 20 Dec 2020 15:16:08 +0100
Subject: [PATCH] fix privsep build on ppc*
---
src/privsep-linux.c | 1 +
1 file changed, 1 insertion(+)
diff --git src/privsep-linux.c src/privsep-linux.c
index e588ecd..9d335ca 100644
--- a/src/privsep-linux.c
+++ b/src/privsep-linux.c
@@ -42,6 +42,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <termios.h>
#include "common.h"
#include "if.h"
--
2.29.2

View File

@ -0,0 +1,10 @@
--- a/hooks/10-wpa_supplicant 2014-11-26 16:34:35.000000000 +0100
+++ b/hooks/10-wpa_supplicant 2014-11-28 11:53:48.929217243 +0100
@@ -114,6 +114,6 @@ then
case "$reason" in
PREINIT) wpa_supplicant_start;;
RECONFIGURE) wpa_supplicant_reconfigure;;
- DEPARTED) wpa_supplicant_stop;;
+ DEPARTED|STOPPED) wpa_supplicant_stop;;
esac
fi

36
srcpkgs/dhcpcd/template Normal file
View File

@ -0,0 +1,36 @@
# Template file for 'dhcpcd'
pkgname=dhcpcd
version=10.0.1
revision=3
build_style=configure
make_check_target=test
configure_args="
--prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --rundir=/run/dhcpcd
$(vopt_if privsep --privsepuser=_dhcpcd) $(vopt_enable privsep)"
hostmakedepends="ntp pkg-config"
makedepends="eudev-libudev-devel"
short_desc="RFC2131 compliant DHCP client"
maintainer="Cameron Nemo <cam@nohom.org>"
license="BSD-2-Clause"
homepage="https://roy.marples.name/projects/dhcpcd"
distfiles="https://github.com/NetworkConfiguration/dhcpcd/archive/refs/tags/v${version}.tar.gz"
checksum=2bd3480bc93e6bff530872b8bc80cbcaa821449f7bf6aaf202fa12fb8c2e6f55
lib32disabled=yes
conf_files=/etc/dhcpcd.conf
system_accounts="_dhcpcd"
_dhcpcd_homedir="/var/db/dhcpcd"
build_options="privsep"
desc_option_privsep="Enable privilege separation mode for the daemon"
post_install() {
vsv dhcpcd
vsv dhcpcd-eth0
# Enable controlgroup by default, to make dhcpcd-ui work.
vsed -e 's,^#\(controlgroup.*\),\1,' -i ${DESTDIR}/etc/dhcpcd.conf
# License
vlicense LICENSE
}

View File

@ -0,0 +1,5 @@
type = scripted
command = /sbin/busybox ntpd -p pool.ntp.org
restart = false
depends-on = early-filesystems

View File

@ -8,4 +8,3 @@ logfile = /run/rootrw.log
depends-on = udevd
waits-for = hwclock
waits-for = rootfscheck

View File

@ -0,0 +1,4 @@
type = scripted
command = /sbin/busybox fbsplash -s /home/liqing/oldsplash.ppm
restart = false

View File

@ -1,7 +1,7 @@
#!/bin/sh
pkgname=dinit
version=0.17.1
revision=1
revision=3
short_desc="Simple Linux / BSD init system (NOT MY SOFTWARE)"
maintainer="Tracker-Friendly <jliwin98@danwin1210.de>"
homepage="https://github.com/davmac314/dinit"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,4 +1,23 @@
#!/bin/busybox ash
case "$ACTION" in
post)
busybox --install /usr/bin/
# Check if busybox is in the system
if command -v busybox >/dev/null 2>&1; then
for i in $(busybox --list-full); do
if [ -e "/$i" ]; then
busybox echo "Error: $i already exists."
else
busybox echo "Creating symlink from /bin/busybox to $i"
busybox ln -s "/usr/bin/busybox" "/$i"
fi
done
else
busybox echo "Busybox is not installed or not in the system."
fi
esac

View File

@ -0,0 +1,302 @@
#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix="/usr"
exec_prefix="/usr"
datarootdir="/usr/share"
. "$pkgdatadir/grub-mkconfig_lib"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=""
else
OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi
# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
/dev/loop/*|/dev/loop[0-9])
GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
;;
esac
# Default to disabling partition uuid support to maintian compatibility with
# older kernels.
GRUB_DISABLE_LINUX_PARTUUID=${GRUB_DISABLE_LINUX_PARTUUID-true}
# btrfs may reside on multiple devices. We cannot pass them as value of root= parameter
# and mounting btrfs requires user space scanning, so force UUID in this case.
if ( [ "x${GRUB_DEVICE_UUID}" = "x" ] && [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] ) \
|| ( [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
&& [ "x${GRUB_DISABLE_LINUX_PARTUUID}" = "xtrue" ] ) \
|| ( ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
&& ! test -e "/dev/disk/by-partuuid/${GRUB_DEVICE_PARTUUID}" ) \
|| ( test -e "${GRUB_DEVICE}" && uses_abstraction "${GRUB_DEVICE}" lvm ); then
LINUX_ROOT_DEVICE=${GRUB_DEVICE}
elif [ "x${GRUB_DEVICE_UUID}" = "x" ] \
|| [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ]; then
LINUX_ROOT_DEVICE=PARTUUID=${GRUB_DEVICE_PARTUUID}
else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
case x"$GRUB_FS" in
xbtrfs)
rootsubvol="`make_system_path_relative_to_its_root /`"
rootsubvol="${rootsubvol#/}"
if [ "x${rootsubvol}" != x ]; then
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
fi;;
xzfs)
rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
bootfs="`make_system_path_relative_to_its_root / | sed -e "s,@$,,"`"
LINUX_ROOT_DEVICE="ZFS=${rpool}${bootfs%/}"
;;
esac
title_correction_code=
linux_entry ()
{
os="$1"
version="$2"
type="$3"
args="$4"
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi
if [ x$type != xsimple ] ; then
case $type in
recovery)
title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
*)
title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
esac
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
fi
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
else
echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
fi
if [ x$type != xrecovery ] ; then
save_default_entry | grub_add_tab
fi
# Use ELILO's generic "efifb" when it's known to be available.
# FIXME: We need an interface to select vesafb in case efifb can't be used.
if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
echo " load_video" | sed "s/^/$submenu_indentation/"
if grep -qx "CONFIG_FB_EFI=y" "${config}" 2> /dev/null \
&& grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" "${config}" 2> /dev/null; then
echo " set gfxpayload=keep" | sed "s/^/$submenu_indentation/"
fi
else
if [ "x$GRUB_GFXPAYLOAD_LINUX" != xtext ]; then
echo " load_video" | sed "s/^/$submenu_indentation/"
fi
echo " set gfxpayload=$GRUB_GFXPAYLOAD_LINUX" | sed "s/^/$submenu_indentation/"
fi
echo " insmod gzio" | sed "s/^/$submenu_indentation/"
if [ x$dirname = x/ ]; then
if [ -z "${prepare_root_cache}" ]; then
prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | grub_add_tab)"
fi
printf '%s\n' "${prepare_root_cache}" | sed "s/^/$submenu_indentation/"
else
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | grub_add_tab)"
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
message="$(gettext_printf "Loading Linux %s ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if test -n "${initrd}" ; then
# TRANSLATORS: ramdisk isn't identifier. Should be translated.
message="$(gettext_printf "Loading initial ramdisk ...")"
initrd_path=
for i in ${initrd}; do
initrd_path="${initrd_path} ${rel_dirname}/${i}"
done
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
initrd $(echo $initrd_path)
EOF
fi
sed "s/^/$submenu_indentation/" << EOF
}
EOF
}
machine=`uname -m`
case "x$machine" in
xi?86 | xx86_64)
list=
for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
done ;;
*)
list=
for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
done ;;
esac
case "$machine" in
i?86) GENKERNEL_ARCH="x86" ;;
mips|mips64) GENKERNEL_ARCH="mips" ;;
mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;;
arm*) GENKERNEL_ARCH="arm" ;;
*) GENKERNEL_ARCH="$machine" ;;
esac
prepare_boot_cache=
prepare_root_cache=
boot_device_id=
title_correction_code=
# Extra indentation to add to menu entries in a submenu. We're not in a submenu
# yet, so it's empty. In a submenu it will be equal to '\t' (one tab).
submenu_indentation=""
is_top_level=true
while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list`
gettext_printf "Found linux image: %s\n" "$linux" >&2
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
initrd_early=
for i in ${GRUB_EARLY_INITRD_LINUX_STOCK} \
${GRUB_EARLY_INITRD_LINUX_CUSTOM}; do
if test -e "${dirname}/${i}" ; then
initrd_early="${initrd_early} ${i}"
fi
done
initrd_real=
for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \
"initrd-${version}" "initramfs-${version}.img" \
"initrd.img-${alt_version}" "initrd-${alt_version}.img" \
"initrd-${alt_version}" "initramfs-${alt_version}.img" \
"initramfs-genkernel-${version}" \
"initramfs-genkernel-${alt_version}" \
"initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
"initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
if test -e "${dirname}/${i}" ; then
initrd_real="${i}"
break
fi
done
initrd=
if test -n "${initrd_early}" || test -n "${initrd_real}"; then
initrd="${initrd_early} ${initrd_real}"
initrd_display=
for i in ${initrd}; do
initrd_display="${initrd_display} ${dirname}/${i}"
done
gettext_printf "Found initrd image: %s\n" "$(echo $initrd_display)" >&2
fi
config=
for i in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do
if test -e "${i}" ; then
config="${i}"
break
fi
done
initramfs=
if test -n "${config}" ; then
initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${config}" | cut -f2 -d= | tr -d \"`
fi
if test -z "${initramfs}" && test -z "${initrd_real}" ; then
# "UUID=" and "ZFS=" magic is parsed by initrd or initramfs. Since there's
# no initrd or builtin initramfs, it can't work here.
if [ "x${GRUB_DEVICE_PARTUUID}" = "x" ] \
|| [ "x${GRUB_DISABLE_LINUX_PARTUUID}" = "xtrue" ]; then
linux_root_device_thisversion=${GRUB_DEVICE}
else
linux_root_device_thisversion=PARTUUID=${GRUB_DEVICE_PARTUUID}
fi
fi
# The GRUB_DISABLE_SUBMENU option used to be different than others since it was
# mentioned in the documentation that has to be set to 'y' instead of 'true' to
# enable it. This caused a lot of confusion to users that set the option to 'y',
# 'yes' or 'true'. This was fixed but all of these values must be supported now.
if [ "x${GRUB_DISABLE_SUBMENU}" = xyes ] || [ "x${GRUB_DISABLE_SUBMENU}" = xy ]; then
GRUB_DISABLE_SUBMENU="true"
fi
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
linux_entry "${OS}" "${version}" simple \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
submenu_indentation="$grub_tab"
if [ -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi
# TRANSLATORS: %s is replaced with an OS name
echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
is_top_level=false
fi
linux_entry "${OS}" "${version}" advanced \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery \
"single ${GRUB_CMDLINE_LINUX}"
fi
list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
done
# If at least one kernel was found, then we need to
# add a closing '}' for the submenu command.
if [ x"$is_top_level" != xtrue ]; then
echo '}'
fi
echo "$title_correction_code"

View File

@ -0,0 +1,21 @@
#
# Configuration file for GRUB.
#
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=1
GRUB_DISTRIBUTOR="EvolutionOS"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=0 quiet vt.global_cursor_default=0"
# Uncomment to use basic console
#GRUB_TERMINAL_INPUT="console"
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
#GRUB_BACKGROUND=/usr/share/evolution-artwork/splash.png
#GRUB_GFXMODE=1920x1080x32
#GRUB_DISABLE_LINUX_UUID=true
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

View File

@ -1,6 +1,6 @@
pkgname=evolution-patches
version=1.0
revision=15
version=1.1
revision=2
build_style=meta
maintainer="Tracker-Friendly <jliwin98@danwin1210.de>"
short_desc="Simple patches that enable an usable OS out of the box"
@ -17,7 +17,7 @@ do_install() {
# Get the list of commands from busybox
commands="[ [[ arch ascii base32 base64 basename brctl cat chgrp chmod chown chroot comm cp crc32 cttyhack cut date dc dd df dirname dnsdomainname du dumpkmap echo ed env expand expr factor false fatattr fbset fold fsync fuser getty groups head hexedit i2cdetect i2cdump i2cget i2cset i2ctransfer id ifconfig ifenslave install iostat ipaddr iplink ipneigh iproute iprule iptunnel killall killall5 link ln loadkmap ls lsof lsscsi lzcat md5sum mkdir mkfifo mknod mkstat mv nc netstat nice nl nohup nproc nslookup od partprobe paste patch pipe_progress powertop printenv printf pstree pwd readlink realpath rm rmdir seq setfattr sha1sum sha256sum sha3sum sha512sum shred shuf sleep sort split ssl_client stat strings stty sum svok sync tac tail tee telnet test time touch tr true truncate ts tty uevent uname unexpand uniq unlink unxz unzip uudecode uuencode wc wget whoami whois xxd xz xzcat yes sh find diff gunzip tar gzip sed less which mktemp grep xargs cmp egrep fgrep lspci lsusb mpstat tree tsort zcat add-shell addgroup adduser adjtimex ar arp ash awk bc beep bunzip2 bzcat chat cksum conspy crond crontab cryptpw delgroup deluser depmod devmem dhcprelay dnsd dos2unix dpkg dpkg-deb dumpleases ether-wake fakeidentd fbsplash fdflush fdformat freeramdisk ftpd ftpget ftpput hd hdparm hostid hostname httpd hush ifdown ifplugd ifup inetd insmod ipcalc klogd linux32 linux64 loadfont logger logname logread lpd lpq lpr lsmod lzma lzop lzopcat makedevs makemime man mdev microcom mim minips mkdosfs mkfs.ext2 mkfs.vfat mkpasswd modinfo modprobe mt nameif nanddump nandwrite nbd-client netcat nmeter ntpd nuke ping ping6 popmaildir pscan raidautorun rdate rdev readahead reformime remove-shell reset resize resume rmmod route rpm rpm2cpio run-init runlevel rx seedrng sendmail setconsole setlogcons setserial slattach smemcap start-stop-daemon syslogd tcpsvd telnetd tftp tftpd timeout traceroute traceroute6 ttysize tunctl ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol udhcpc udhcpc6 udhcpd udpsvd uncompress unix2dos unlzma unlzop users usleep vconfig vi volname w watchdog who zcip"
commands="[ [[ arch ascii base32 base64 basename brctl cat chgrp chmod chown chroot comm cp crc32 cttyhack cut date dc dd df dirname dnsdomainname du dumpkmap echo ed env expand expr factor false fatattr fbset fold fsync fuser getty groups head hexedit i2cdetect i2cdump i2cget i2cset i2ctransfer id ifconfig ifenslave install iostat ipaddr iplink ipneigh iproute iprule iptunnel killall killall5 link ln loadkmap ls lsof lsscsi lzcat md5sum mkdir mkfifo mknod mkstat mv nc netstat nice nl nohup nproc nslookup od partprobe paste patch pipe_progress powertop printenv printf pstree pwd readlink realpath rm rmdir seq setfattr sha1sum sha256sum sha3sum sha512sum shred shuf sleep sort split ssl_client stat strings stty sum svok sync tac tail tee telnet test time touch tr true truncate ts tty uevent uname unexpand uniq unlink unxz unzip uudecode uuencode wc wget whoami whois xxd xz xzcat yes sh find diff gunzip tar gzip sed which mktemp grep xargs cmp egrep fgrep lspci lsusb mpstat tree tsort zcat add-shell addgroup adduser adjtimex ar arp ash awk bc beep chat cksum conspy crond crontab cryptpw delgroup deluser devmem dhcprelay dnsd dos2unix dpkg dpkg-deb dumpleases ether-wake fakeidentd fbsplash fdflush fdformat freeramdisk ftpd ftpget ftpput hd hdparm hostid hostname httpd hush ifdown ifplugd ifup inetd ipcalc klogd linux32 linux64 loadfont logger logname logread lpd lpq lpr lzma lzop lzopcat makedevs makemime mdev microcom mim minips mkdosfs mkfs.ext2 mkfs.vfat mkpasswd mt nameif nanddump nandwrite nbd-client netcat nmeter ntpd nuke ping ping6 popmaildir pscan raidautorun rdate rdev readahead reformime remove-shell resize resume route rpm rpm2cpio run-init runlevel rx seedrng sendmail setconsole setlogcons setserial slattach smemcap start-stop-daemon syslogd tcpsvd telnetd tftp tftpd timeout traceroute traceroute6 ttysize tunctl ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol udhcpc udhcpc6 udhcpd udpsvd uncompress unix2dos unlzma unlzop users usleep vconfig vi volname w watchdog who zcip"
mkdir -p ${DESTDIR}/usr/bin/
# Loop through each command
for cmd in $commands; do

1
srcpkgs/grub-arm64-efi Symbolic link
View File

@ -0,0 +1 @@
grub

1
srcpkgs/grub-i386-efi Symbolic link
View File

@ -0,0 +1 @@
grub

1
srcpkgs/grub-x86_64-efi Symbolic link
View File

@ -0,0 +1 @@
grub

View File

@ -0,0 +1,21 @@
#
# Configuration file for GRUB.
#
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EvolutionOS"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4"
# Uncomment to use basic console
#GRUB_TERMINAL_INPUT="console"
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
#GRUB_BACKGROUND=/usr/share/void-artwork/splash.png
#GRUB_GFXMODE=1920x1080x32
#GRUB_DISABLE_LINUX_UUID=true
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

View File

@ -0,0 +1,19 @@
#!/bin/sh
#
# Kernel hook for GRUB 2.
#
# Arguments passed to this script: $1 pkgname, $2 version.
#
PKGNAME="$1"
VERSION="$2"
export ZPOOL_VDEV_NAME_PATH=YES
if command -v grub-mkconfig >/dev/null 2>&1; then
if [ -d $ROOTDIR/boot/grub ]; then
grub-mkconfig -o $ROOTDIR/boot/grub/grub.cfg
exit $?
fi
fi
exit 0

View File

@ -0,0 +1,32 @@
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index f8cbb8d..f271608 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -246,6 +246,8 @@ export GRUB_DEFAULT \
GRUB_BACKGROUND \
GRUB_THEME \
GRUB_GFXPAYLOAD_LINUX \
+ GRUB_COLOR_NORMAL \
+ GRUB_COLOR_HIGHLIGHT \
GRUB_INIT_TUNE \
GRUB_SAVEDEFAULT \
GRUB_ENABLE_CRYPTODISK \
diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
index d2e7252..8259f45 100644
--- a/util/grub.d/00_header.in
+++ b/util/grub.d/00_header.in
@@ -125,6 +125,14 @@ cat <<EOF
EOF
+if [ x$GRUB_COLOR_NORMAL != x ] && [ x$GRUB_COLOR_HIGHLIGHT != x ] ; then
+ cat << EOF
+set menu_color_normal=$GRUB_COLOR_NORMAL
+set menu_color_highlight=$GRUB_COLOR_HIGHLIGHT
+
+EOF
+fi
+
serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do

View File

@ -0,0 +1,15 @@
EvolutionOS is not GNU/Linux, it is just Linux. To keep on par with branding, I removed that too. It's not evolutionOS Linux.
--- 10_linux
+++ a/util/grub.d/10_linux.in
@@ -29,9 +29,9 @@
CLASS="--class gnu-linux --class gnu --class os"
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
- OS="GNU/Linux"
+ OS=""
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR}"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi

View File

@ -0,0 +1,96 @@
From b98275138bf4fc250a1c362dfd2c8b1cf2421701 Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Tue, 28 Sep 2021 13:50:47 +0800
Subject: build: Fix build error with binutils 2.36
The following procedure to build xen/pvgrub is broken.
git clone https://git.savannah.gnu.org/git/grub.git
cd grub
./bootstrap
mkdir build-xen
cd build-xen
../configure --with-platform=xen
make
It fails with the message:
/usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld:
section .note.gnu.property VMA [0000000000400158,0000000000400187]
overlaps section .bss VMA [000000000000f000,000000000041e1af]
The most significant factor is that new assembler (GNU as) generates the
.note.gnu.property section as default. This note section overlaps with
.bss because it doesn't reposition with -Wl,-Ttext,0 with which the base
address of .text section is set, rather the address of .note.gnu.property
is calculated for some reason from 0x400000 where the ELF executable
defaults to start.
Using -Ttext-segment doesn't help either, though it is said to set the
address of the first byte of the text segment according to "man ld".
What it actually does is to override the default 0x400000, aka the image
base address, to something else. The entire process can be observed in
the default linker script used by gcc [1]. Therefore we can't expect it
to achieve the same thing as -Ttext given that the first segment where
.text resides is offset by SIZEOF_HEADERS plus some sections may be
preceding it within the first segment. The end result is .text always
has to start with non-zero address with -Wl,-Ttext-segment,0 if using
default linker script.
It is also worth mentioning that binutils upstream apparently doesn't
seem to consider this as a bug [2] and proposed to use -Wl,-Ttext-segment,0
which is not fruitful as what has been tested by Gentoo [3].
As long as GRUB didn't use ISA information encoded in .note.gnu.property,
we can safely drop it via -Wa,-mx86-used-note=no assembler option to
fix the linker error above.
This is considered a better approach than using custom linker script to
drop the .note.gnu.property section because object file manipulation can
also be hampered one way or the other in that linker script may not be
helpful. See also this commit removing the section in the process of objcopy.
6643507ce build: Fix GRUB i386-pc build with Ubuntu gcc
[1] In /usr/lib64/ldscripts/elf_x86_64.x or use 'gcc -Wl,--verbose ...'
PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x400000));
. = SEGMENT_START("text-segment", 0x400000) + SIZEOF_HEADERS;
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=27377
[3] https://bugs.gentoo.org/787221
Signed-off-by: Michael Chang <mchang@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
configure.ac | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'configure.ac')
diff --git a/configure.ac b/configure.ac
index eeb5d22..8d1c81a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -840,6 +840,20 @@ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$p
TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow"
fi
+if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ); then
+ AC_CACHE_CHECK([whether -Wa,-mx86-used-note works], [grub_cv_cc_mx86_used_note], [
+ CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no -Werror"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [grub_cv_cc_mx86_used_note=yes],
+ [grub_cv_cc_mx86_used_note=no])
+ ])
+
+ if test "x$grub_cv_cc_mx86_used_note" = xyes; then
+ TARGET_CFLAGS="$TARGET_CFLAGS -Wa,-mx86-used-note=no"
+ TARGET_CCASFLAGS="$TARGET_CCASFLAGS -Wa,-mx86-used-note=no"
+ fi
+fi
+
# GRUB doesn't use float or doubles at all. Yet some toolchains may decide
# that floats are a good fit to run instead of what's written in the code.
# Given that floating point unit is disabled (if present to begin with)
--
cgit v1.1

View File

@ -0,0 +1,71 @@
From 04aa0aa735f4bfa2d7a4f6593745fbe1d7fa0d0a Mon Sep 17 00:00:00 2001
From: Ian Campbell <ijc@hellion.org.uk>
Date: Sat, 6 Sep 2014 12:20:12 +0100
Subject: grub-install: Install PV Xen binaries into the upstream specified
path
Upstream have defined a specification for where guests ought to place their
xenpv grub binaries in order to facilitate chainloading from a stage 1 grub
loaded from dom0.
http://xenbits.xen.org/docs/unstable-staging/misc/x86-xenpv-bootloader.html
The spec calls for installation into /boot/xen/pvboot-i386.elf or
/boot/xen/pvboot-x86_64.elf.
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Bug-Debian: https://bugs.debian.org/762307
Forwarded: http://lists.gnu.org/archive/html/grub-devel/2014-10/msg00041.html
Last-Update: 2014-10-24
Patch-Name: grub-install-pvxen-paths.patch
---
v2: Respect bootdir, create /boot/xen as needed.
---
util/grub-install.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/util/grub-install.c b/util/grub-install.c
index b82c14d41..caadada98 100644
--- a/util/grub-install.c
+++ b/util/grub-install.c
@@ -1962,6 +1962,28 @@ main (int argc, char *argv[])
}
break;
+ case GRUB_INSTALL_PLATFORM_I386_XEN:
+ {
+ char *path = grub_util_path_concat (2, bootdir, "xen");
+ char *dst = grub_util_path_concat (2, path, "pvboot-i386.elf");
+ grub_install_mkdir_p (path);
+ grub_install_copy_file (imgfile, dst, 1);
+ free (dst);
+ free (path);
+ }
+ break;
+
+ case GRUB_INSTALL_PLATFORM_X86_64_XEN:
+ {
+ char *path = grub_util_path_concat (2, bootdir, "xen");
+ char *dst = grub_util_path_concat (2, path, "pvboot-x86_64.elf");
+ grub_install_mkdir_p (path);
+ grub_install_copy_file (imgfile, dst, 1);
+ free (dst);
+ free (path);
+ }
+ break;
+
case GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON:
case GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS:
case GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS:
@@ -1971,8 +1971,6 @@ main (int argc, char *argv[])
case GRUB_INSTALL_PLATFORM_MIPSEL_ARC:
case GRUB_INSTALL_PLATFORM_ARM_UBOOT:
case GRUB_INSTALL_PLATFORM_I386_QEMU:
- case GRUB_INSTALL_PLATFORM_I386_XEN:
- case GRUB_INSTALL_PLATFORM_X86_64_XEN:
case GRUB_INSTALL_PLATFORM_I386_XEN_PVH:
grub_util_warn ("%s",
_("WARNING: no platform-specific install was performed"));

View File

@ -0,0 +1,32 @@
From 54b741317568867fc4ad801a65397d05f3ea0f59 Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
Date: Thu, 25 Sep 2014 18:41:29 -0300
Subject: Include a text attribute reset in the clear command for ppc
Always clear text attribute for clear command in order to avoid problems
after it boots.
* grub-core/term/terminfo.c: Add escape for text attribute reset
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1295255
Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00076.html
Last-Update: 2014-09-26
Patch-Name: ieee1275-clear-reset.patch
---
grub-core/term/terminfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/term/terminfo.c b/grub-core/term/terminfo.c
index f0d3e3deb..7cb7909c8 100644
--- a/grub-core/term/terminfo.c
+++ b/grub-core/term/terminfo.c
@@ -151,7 +151,7 @@ grub_terminfo_set_current (struct grub_term_output *term,
/* Clear the screen. Using serial console, screen(1) only recognizes the
* ANSI escape sequence. Using video console, Apple Open Firmware
* (version 3.1.1) only recognizes the literal ^L. So use both. */
- data->cls = grub_strdup (" \e[2J");
+ data->cls = grub_strdup (" \e[2J\e[m");
data->reverse_video_on = grub_strdup ("\e[7m");
data->reverse_video_off = grub_strdup ("\e[m");
if (grub_strcmp ("ieee1275", str) == 0)

View File

@ -0,0 +1,220 @@
From 35118b5023b0d9b4e3ad82f6e15fb696ad8e2a10 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Tue, 28 Jan 2014 14:40:02 +0000
Subject: Port yaboot logic for various powerpc machine types
Some powerpc machines require not updating the NVRAM. This can be handled
by existing grub-install command-line options, but it's friendlier to detect
this automatically.
On chrp_ibm machines, use the nvram utility rather than nvsetenv. (This
is possibly suitable for other machines too, but that needs to be
verified.)
Forwarded: no
Last-Update: 2014-10-15
Patch-Name: install_powerpc_machtypes.patch
---
grub-core/osdep/basic/platform.c | 5 +++
grub-core/osdep/linux/platform.c | 72 ++++++++++++++++++++++++++++++
grub-core/osdep/unix/platform.c | 28 +++++++++---
grub-core/osdep/windows/platform.c | 6 +++
include/grub/util/install.h | 3 ++
util/grub-install.c | 11 +++++
6 files changed, 119 insertions(+), 6 deletions(-)
diff --git a/grub-core/osdep/basic/platform.c b/grub-core/osdep/basic/platform.c
index 4b5502aeb..2ab907976 100644
--- a/grub-core/osdep/basic/platform.c
+++ b/grub-core/osdep/basic/platform.c
@@ -30,3 +30,8 @@ grub_install_get_default_x86_platform (void)
return "i386-pc";
}
+const char *
+grub_install_get_default_powerpc_machtype (void)
+{
+ return "generic";
+}
diff --git a/grub-core/osdep/linux/platform.c b/grub-core/osdep/linux/platform.c
index 35f1bcc0e..9805c36d4 100644
--- a/grub-core/osdep/linux/platform.c
+++ b/grub-core/osdep/linux/platform.c
@@ -23,6 +23,7 @@
#include <grub/emu/misc.h>
#include <sys/types.h>
#include <dirent.h>
+#include <stdio.h>
#include <string.h>
#include <sys/utsname.h>
@@ -154,3 +154,74 @@ grub_install_get_default_x86_platform (void)
grub_util_info ("... not found");
return "i386-pc";
}
+
+const char *
+grub_install_get_default_powerpc_machtype (void)
+{
+ FILE *fp;
+ char *buf = NULL;
+ size_t len = 0;
+ const char *machtype = "generic";
+
+ fp = grub_util_fopen ("/proc/cpuinfo", "r");
+ if (! fp)
+ return machtype;
+
+ while (getline (&buf, &len, fp) > 0)
+ {
+ if (strncmp (buf, "pmac-generation",
+ sizeof ("pmac-generation") - 1) == 0)
+ {
+ if (strstr (buf, "NewWorld"))
+ {
+ machtype = "pmac_newworld";
+ break;
+ }
+ if (strstr (buf, "OldWorld"))
+ {
+ machtype = "pmac_oldworld";
+ break;
+ }
+ }
+
+ if (strncmp (buf, "motherboard", sizeof ("motherboard") - 1) == 0 &&
+ strstr (buf, "AAPL"))
+ {
+ machtype = "pmac_oldworld";
+ break;
+ }
+
+ if (strncmp (buf, "machine", sizeof ("machine") - 1) == 0 &&
+ strstr (buf, "CHRP IBM"))
+ {
+ if (strstr (buf, "qemu"))
+ {
+ machtype = "chrp_ibm_qemu";
+ break;
+ }
+ else
+ {
+ machtype = "chrp_ibm";
+ break;
+ }
+ }
+
+ if (strncmp (buf, "platform", sizeof ("platform") - 1) == 0)
+ {
+ if (strstr (buf, "Maple"))
+ {
+ machtype = "maple";
+ break;
+ }
+ if (strstr (buf, "Cell"))
+ {
+ machtype = "cell";
+ break;
+ }
+ }
+ }
+
+ free (buf);
+ fclose (fp);
+ return machtype;
+}
diff --git a/grub-core/osdep/unix/platform.c b/grub-core/osdep/unix/platform.c
index a3fcfcaca..28cb37e15 100644
--- a/grub-core/osdep/unix/platform.c
+++ b/grub-core/osdep/unix/platform.c
@@ -218,13 +218,29 @@ grub_install_register_ieee1275 (int is_prep, const char *install_device,
else
boot_device = get_ofpathname (install_device);
- if (grub_util_exec ((const char * []){ "nvsetenv", "boot-device",
- boot_device, NULL }))
+ if (strcmp (grub_install_get_default_powerpc_machtype (), "chrp_ibm") == 0)
{
- char *cmd = xasprintf ("setenv boot-device %s", boot_device);
- grub_util_error (_("`nvsetenv' failed. \nYou will have to set `boot-device' variable manually. At the IEEE1275 prompt, type:\n %s\n"),
- cmd);
- free (cmd);
+ char *arg = xasprintf ("boot-device=%s", boot_device);
+ if (grub_util_exec ((const char * []){ "nvram",
+ "--update-config", arg, NULL }))
+ {
+ char *cmd = xasprintf ("setenv boot-device %s", boot_device);
+ grub_util_error (_("`nvram' failed. \nYou will have to set `boot-device' variable manually. At the IEEE1275 prompt, type:\n %s\n"),
+ cmd);
+ free (cmd);
+ }
+ free (arg);
+ }
+ else
+ {
+ if (grub_util_exec ((const char * []){ "nvsetenv", "boot-device",
+ boot_device, NULL }))
+ {
+ char *cmd = xasprintf ("setenv boot-device %s", boot_device);
+ grub_util_error (_("`nvsetenv' failed. \nYou will have to set `boot-device' variable manually. At the IEEE1275 prompt, type:\n %s\n"),
+ cmd);
+ free (cmd);
+ }
}
free (boot_device);
diff --git a/grub-core/osdep/windows/platform.c b/grub-core/osdep/windows/platform.c
index 912269191..c30025b13 100644
--- a/grub-core/osdep/windows/platform.c
+++ b/grub-core/osdep/windows/platform.c
@@ -128,6 +128,12 @@ grub_install_get_default_x86_platform (void)
return "i386-efi";
}
+const char *
+grub_install_get_default_powerpc_machtype (void)
+{
+ return "generic";
+}
+
static void *
get_efi_variable (const wchar_t *varname, ssize_t *len)
{
diff --git a/include/grub/util/install.h b/include/grub/util/install.h
index 5ca4811cd..9f517a1bb 100644
--- a/include/grub/util/install.h
+++ b/include/grub/util/install.h
@@ -223,6 +223,9 @@ grub_install_get_default_arm_platform (void);
const char *
grub_install_get_default_x86_platform (void);
+const char *
+grub_install_get_default_powerpc_machtype (void);
+
int
grub_install_register_efi (grub_device_t efidir_grub_dev,
const char *efifile_path,
diff --git a/util/grub-install.c b/util/grub-install.c
index e1a0202da..70b22eec4 100644
--- a/util/grub-install.c
+++ b/util/grub-install.c
@@ -1179,7 +1179,18 @@ main (int argc, char *argv[])
if (platform == GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275)
{
+ const char *machtype = grub_install_get_default_powerpc_machtype ();
int is_guess = 0;
+
+ if (strcmp (machtype, "pmac_oldworld") == 0)
+ update_nvram = 0;
+ else if (strcmp (machtype, "cell") == 0)
+ update_nvram = 0;
+ else if (strcmp (machtype, "generic") == 0)
+ update_nvram = 0;
+ else if (strcmp (machtype, "chrp_ibm_qemu") == 0)
+ update_nvram = 0;
+
if (!macppcdir)
{
char *d;

View File

@ -0,0 +1,16 @@
Patches OS X detection out of os-prober hook on non-x86 architectures. The
menu entries generated for those are invalid for non-x86 Mac stuff.
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -45,6 +45,11 @@ if [ -z "${OSPROBED}" ] ; then
fi
osx_entry() {
+ # GRUB won't load OS X outside of x86, no entry
+ case "x`uname -m`" in
+ xi?86|xx86_64) ;;
+ *) return ;;
+ esac
if [ x$2 = x32 ]; then
# TRANSLATORS: it refers to kernel architecture (32-bit)
bitstr="$(gettext "(32-bit)")"

View File

@ -0,0 +1,52 @@
From efc381a55124b12fc74ed8117283f11367c9372a Mon Sep 17 00:00:00 2001
From: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com>
Date: Thu, 25 Sep 2014 19:33:39 -0300
Subject: Disable VSX instruction
VSX bit is enabled by default for Power7 and Power8 CPU models,
so we need to disable them in order to avoid instruction exceptions.
Kernel will activate it when necessary.
* grub-core/kern/powerpc/ieee1275/startup.S: Disable VSX.
Also-By: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Also-By: Colin Watson <cjwatson@debian.org>
Origin: other, https://lists.gnu.org/archive/html/grub-devel/2014-09/msg00078.html
Last-Update: 2015-01-27
Patch-Name: ppc64el-disable-vsx.patch
---
grub-core/kern/powerpc/ieee1275/startup.S | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/grub-core/kern/powerpc/ieee1275/startup.S b/grub-core/kern/powerpc/ieee1275/startup.S
index 21c884b43..de9a9601a 100644
--- a/grub-core/kern/powerpc/ieee1275/startup.S
+++ b/grub-core/kern/powerpc/ieee1275/startup.S
@@ -20,6 +20,8 @@
#include <grub/symbol.h>
#include <grub/offsets.h>
+#define MSR_VSX 0x80
+
.extern __bss_start
.extern _end
@@ -28,6 +30,16 @@
.globl start, _start
start:
_start:
+ _start:
+
+ /* Disable VSX instruction */
+ mfmsr 0
+ oris 0,0,MSR_VSX
+ /* The "VSX Available" bit is in the lower half of the MSR, so we
+ don't need mtmsrd, which in any case won't work in 32-bit mode. */
+ mtmsr 0
+ isync
+
li 2, 0
li 13, 0

View File

@ -0,0 +1,62 @@
Patch-Source: https://git.savannah.gnu.org/cgit/grub.git/commit/?id=7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763
useful because e2fsprogs 1.47 defaults to this enabled, and grub won't touch it
--
From 7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Fri, 11 Jun 2021 21:36:16 +0200
Subject: fs/ext2: Ignore checksum seed incompat feature
This incompat feature is used to denote that the filesystem stored its
metadata checksum seed in the superblock. This is used to allow tune2fs
changing the UUID on a mounted metdata_csum filesystem without having
to rewrite all the disk metadata. However, the GRUB doesn't use the
metadata checksum at all. So, it can just ignore this feature if it
is enabled. This is consistent with the GRUB filesystem code in general
which just does a best effort to access the filesystem's data.
The checksum seed incompat feature has to be removed from the ignore
list if the support for metadata checksum verification is added to the
GRUB ext2 driver later.
Suggested-by: Eric Sandeen <esandeen@redhat.com>
Suggested-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/fs/ext2.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
index e7dd78e..4953a15 100644
--- a/grub-core/fs/ext2.c
+++ b/grub-core/fs/ext2.c
@@ -103,6 +103,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
+#define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000
#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
/* The set of back-incompatible features this driver DOES support. Add (OR)
@@ -123,10 +124,15 @@ GRUB_MOD_LICENSE ("GPLv3+");
* mmp: Not really back-incompatible - was added as such to
* avoid multiple read-write mounts. Safe to ignore for this
* RO driver.
+ * checksum seed: Not really back-incompatible - was added to allow tools
+ * such as tune2fs to change the UUID on a mounted metadata
+ * checksummed filesystem. Safe to ignore for now since the
+ * driver doesn't support checksum verification. However, it
+ * has to be removed from this list if the support is added later.
*/
#define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
- | EXT4_FEATURE_INCOMPAT_MMP)
-
+ | EXT4_FEATURE_INCOMPAT_MMP \
+ | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
#define EXT3_JOURNAL_MAGIC_NUMBER 0xc03b3998U
--
cgit v1.1

View File

@ -0,0 +1,60 @@
Patch-Source: https://git.savannah.gnu.org/cgit/grub.git/patch/?id=2e9fa73a040462b81bfbfe56c0bc7ad2d30b446b
useful to support the large_dir ext4 feature
--
From 2e9fa73a040462b81bfbfe56c0bc7ad2d30b446b Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Tue, 30 Aug 2022 22:41:59 -0400
Subject: fs/ext2: Ignore the large_dir incompat feature
Recently, ext4 added the large_dir feature, which adds support for
a 3 level htree directory support.
The GRUB supports existing file systems with htree directories by
ignoring their existence, and since the index nodes for the hash tree
look like deleted directory entries (by design), the GRUB can simply do
a brute force O(n) linear search of directories. The same is true for
3 level deep htrees indicated by large_dir feature flag.
Hence, it is safe for the GRUB to ignore the large_dir incompat feature.
Fixes: https://savannah.gnu.org/bugs/?61606
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/fs/ext2.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
index 0989e26..e1cc5e6 100644
--- a/grub-core/fs/ext2.c
+++ b/grub-core/fs/ext2.c
@@ -104,6 +104,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
#define EXT4_FEATURE_INCOMPAT_MMP 0x0100
#define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
#define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000
+#define EXT4_FEATURE_INCOMPAT_LARGEDIR 0x4000 /* >2GB or 3 level htree */
#define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
/* The set of back-incompatible features this driver DOES support. Add (OR)
@@ -129,10 +130,17 @@ GRUB_MOD_LICENSE ("GPLv3+");
* checksummed filesystem. Safe to ignore for now since the
* driver doesn't support checksum verification. However, it
* has to be removed from this list if the support is added later.
+ * large_dir: Not back-incompatible given that the GRUB ext2 driver does
+ * not implement EXT2_FEATURE_COMPAT_DIR_INDEX. If the GRUB
+ * eventually supports the htree feature (aka dir_index)
+ * it should support 3 level htrees and then move
+ * EXT4_FEATURE_INCOMPAT_LARGEDIR to
+ * EXT2_DRIVER_SUPPORTED_INCOMPAT.
*/
#define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
| EXT4_FEATURE_INCOMPAT_MMP \
- | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
+ | EXT4_FEATURE_INCOMPAT_CSUM_SEED \
+ | EXT4_FEATURE_INCOMPAT_LARGEDIR)
#define EXT3_JOURNAL_MAGIC_NUMBER 0xc03b3998U
--
cgit v1.1

223
srcpkgs/grub/template Normal file
View File

@ -0,0 +1,223 @@
# Template file for 'grub'
pkgname=grub
version=2.06
revision=4
hostmakedepends="python3 pkg-config flex freetype-devel font-unifont-bdf help2man
automake gettext-devel-tools"
makedepends="libusb-compat-devel ncurses-devel freetype-devel
liblzma-devel device-mapper-devel fuse-devel"
depends="os-prober"
conf_files="/etc/default/grub /etc/grub.d/*"
short_desc="GRand Unified Bootloader 2"
maintainer="Tracker-Friendly <jliwin98@danwin1210.de>"
license="GPL-3.0-or-later"
homepage="https://www.gnu.org/software/grub/"
distfiles="${GNU_SITE}/grub/grub-${version}.tar.xz"
checksum=b79ea44af91b93d17cd3fe80bdae6ed43770678a9a5ae192ccea803ebb657ee1
archs="i686 x86_64-musl"
nopie=yes
subpackages="grub-utils"
# _SUPPLEMENTARY_BUILDS is a list of <TARGET>-<PLATFORN> version of grub to build
case "$XBPS_TARGET_MACHINE" in
x86_64*)
_NATIVE_PLATFORM=pc
_SUPPLEMENTARY_BUILDS="i386-efi x86_64-efi i386-coreboot x86_64-xen"
subpackages+=" grub-i386-efi grub-x86_64-efi grub-i386-coreboot grub-xen"
;;
i686*)
CFLAGS="-D_FILE_OFFSET_BITS=64"
hostmakedepends+=" cross-x86_64-linux-musl"
configure_args+=" ac_cv_sizeof_off_t=8"
_NATIVE_PLATFORM=pc
_SUPPLEMENTARY_BUILDS="i386-efi x86_64-efi i386-coreboot i386-xen"
subpackages+=" grub-i386-efi grub-x86_64-efi grub-i386-coreboot grub-xen"
;;
aarch64*)
_NATIVE_PLATFORM=efi
subpackages+=" grub-arm64-efi"
;;
ppc*)
_NATIVE_PLATFORM=ieee1275
subpackages+=" grub-powerpc-ieee1275"
;;
esac
pre_configure() {
autoreconf -fi
}
do_configure() {
# workaround for https://savannah.gnu.org/bugs/?60458
# some more info: https://www.linuxquestions.org/questions/showthread.php?p=6257712
# grub 2.06 reboots immediately when compiled with -O2,
# only affects legacy BIOS
export CFLAGS="${CFLAGS/-O2/-Os}"
export CXXFLAGS="${CXXFLAGS/-O2/-Os}"
unset CC AS LD RANLIB CPP
local freestanding_cflags="-fno-stack-protector"
# building with altivec generates broken grub core
case "$XBPS_TARGET_MACHINE" in
ppc*) freestanding_cflags+=" -mno-altivec" ;;
esac
CFLAGS+=" $freestanding_cflags"
configure_args+=" --enable-device-mapper --enable-cache-stats --enable-nls
--enable-grub-mkfont --enable-grub-mount --disable-werror
--sbindir=/usr/bin"
# build tools
msg_normal "Configuring grub tools...\n"
mkdir $wrksrc/build
cd $wrksrc/build
../configure --host=${XBPS_TARGET_MACHINE} ${configure_args} \
${_NATIVE_PLATFORM:+--with-platform=${_NATIVE_PLATFORM}}
for _SUPP_BUILD in ${_SUPPLEMENTARY_BUILDS}; do
_TARGET=${_SUPP_BUILD%%-*}
_PLATFORM=${_SUPP_BUILD##*-}
msg_normal "Configuring ${_TARGET} ${_PLATFORM} grub...\n"
mkdir $wrksrc/${_PLATFORM}_${_TARGET}_build
cd $wrksrc/${_PLATFORM}_${_TARGET}_build
if [ "$_TARGET" = x86_64 ] &&
[ "${XBPS_TARGET_MACHINE%-musl}" = i686 ]; then
_TARGET=x86_64-linux-musl
fi
CFLAGS="$freestanding_cflags" \
../configure --host=${XBPS_TARGET_MACHINE} \
--target=${_TARGET} \
--with-platform=${_PLATFORM} ${configure_args} \
--disable-efiemu \
--libdir=/usr/lib
done
}
do_build() {
# XXX remove the strip wrapper
rm ${XBPS_WRAPPERDIR}/strip
msg_normal "Building grub tools...\n"
cd $wrksrc/build
make ${makejobs}
for _SUPP_BUILD in ${_SUPPLEMENTARY_BUILDS}; do
_TARGET=${_SUPP_BUILD%%-*}
_PLATFORM=${_SUPP_BUILD##*-}
msg_normal "Building ${_TARGET} ${_PLATFORM} grub...\n"
cd $wrksrc/${_PLATFORM}_${_TARGET}_build
make ${makejobs}
done
}
do_install() {
# XXX remove the strip wrapper
rm ${XBPS_WRAPPERDIR}/strip
for _SUPP_BUILD in ${_SUPPLEMENTARY_BUILDS}; do
_TARGET=${_SUPP_BUILD%%-*}
_GRUB_TARGET=${_TARGET}
case "${_GRUB_TARGET}" in
aarch64*)
_GRUB_TARGET=arm64
;;
esac
_PLATFORM=${_SUPP_BUILD##*-}
cd $wrksrc/${_PLATFORM}_${_TARGET}_build
make DESTDIR=$DESTDIR/${_PLATFORM}_${_TARGET} install
# Remove non-platform specific files
rm -rf ${DESTDIR}/${_PLATFORM}_${_TARGET}/{boot,etc,usr/{share,bin}}
rm -f ${DESTDIR}/${_PLATFORM}_${_TARGET}/usr/lib/grub/${_GRUB_TARGET}-${_PLATFORM}/${_GRUB_TARGET}-*
rm -f ${DESTDIR}/${_PLATFORM}_${_TARGET}/usr/lib/grub/${_GRUB_TARGET}-${_PLATFORM}/*.{module,image}
cp -r ${DESTDIR}/${_PLATFORM}_${_TARGET}/* ${DESTDIR}
rm -rf ${DESTDIR}/${_PLATFORM}_${_TARGET}
done
cd $wrksrc/build
make DESTDIR=$DESTDIR install
# Required to compress info files.
vmkdir usr/share/info
touch -f ${DESTDIR}/usr/share/info/dir
vinstall ${FILESDIR}/grub.default 644 etc/default grub
# Kernel hooks.
vinstall ${FILESDIR}/kernel.d/grub.post 750 \
etc/kernel.d/post-install 50-grub
vinstall ${FILESDIR}/kernel.d/grub.post 750 \
etc/kernel.d/post-remove 50-grub
# update-grub for noobs.
printf "#!/bin/sh\ngrub-mkconfig -o /boot/grub/grub.cfg\nexit \$?\n" >> \
${DESTDIR}/usr/bin/update-grub
chmod 755 ${DESTDIR}/usr/bin/update-grub
vmkdir usr/share/bash-completion/completions
mv ${DESTDIR}/etc/bash_completion.d/grub \
${DESTDIR}/usr/share/bash-completion/completions
# Remove useless tools
rm ${DESTDIR}/usr/bin/grub-ofpathname
rm ${DESTDIR}/usr/bin/grub-sparc64-setup
}
grub-utils_package() {
short_desc+=" - additional utilities"
depends="grub>=${version}"
pkg_install() {
vmove usr/bin/grub-menulst2cfg
vmove usr/bin/grub-fstest
vmove usr/bin/grub-mkfont
}
}
grub-x86_64-efi_package() {
depends="grub>=$version dosfstools efibootmgr"
short_desc+=" - x86_64 EFI support"
pkg_install() {
vmove usr/lib/grub/x86_64-efi
}
}
grub-i386-efi_package() {
depends="grub>=$version dosfstools efibootmgr"
short_desc+=" - i386 EFI support"
pkg_install() {
vmove usr/lib/grub/i386-efi
}
}
grub-i386-coreboot_package() {
depends="grub>=$version"
short_desc+=" - i386 coreboot support"
pkg_install() {
vmove usr/lib/grub/i386-coreboot
}
}
grub-xen_package() {
depends="grub>=$version"
short_desc+=" - Xen PV support"
pkg_install() {
case "$XBPS_TARGET_MACHINE" in
x86_64*)
vmove usr/lib/grub/x86_64-xen
;;
i686*)
vmove usr/lib/grub/i386-xen
;;
esac
}
}
grub-arm64-efi_package() {
depends="grub>=$version dosfstools efibootmgr"
short_desc+=" - arm64 EFI support"
pkg_install() {
vmove usr/lib/grub/arm64-efi
}
}
grub-powerpc-ieee1275_package() {
depends="grub>=$version powerpc-utils"
short_desc+=" - powerpc Open Firmware support"
pkg_install() {
vmove usr/lib/grub/powerpc-ieee1275
}
}

View File

@ -1,13 +1,13 @@
# Template file for 'mdocml'
pkgname=mdocml
version=1.14.6
revision=8
revision=9
build_style=configure
make_build_args="all man.cgi"
make_check_target="regress"
hostmakedepends="less"
makedepends="zlib-devel"
depends="busybox-evolution"
depends="less"
checkdepends="perl"
conf_files="/etc/man.conf"
short_desc="UNIX manpage compiler toolset (mandoc)"

View File

@ -1,7 +1,7 @@
#!/bin/sh
pkgname=neofetch
version=7.1.0
revision=5
revision=6
short_desc="Simple system information script (not my software)"
maintainer="Tracker-Friendly <jliwin98@danwin1210.de>"
homepage="https://codeberg.org/EvolutionOS/neofetch"