mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 12:30:44 +02:00
pentoo-livecd: fix b43 handling as well as makemo bug
This commit is contained in:
parent
5aba3fee23
commit
6d33e5b1c4
3 changed files with 22 additions and 12 deletions
|
|
@ -113,7 +113,7 @@ start() {
|
|||
ewarn "This setup is extremely unlikely to work without adding 'mem_encrypt=off' to the kernel line"
|
||||
fi
|
||||
#first we detect if the nvidia binary driver can actually support the hardware
|
||||
NV_TARBALL="$(FETCHCOMMAND="false" RESUMECOMMAND="false" FEATURES="-getbinpkg" emerge --color=n -f nvidia-drivers --nodeps 2> /dev/zero | \
|
||||
NV_TARBALL="$(FETCHCOMMAND="false" RESUMECOMMAND="false" FEATURES="-getbinpkg" emerge --getbinpkg=n --color=n -f nvidia-drivers --nodeps 2> /dev/zero | \
|
||||
grep "run BLAKE2B SHA512 size ;-) ..." | awk '{print $2}')"
|
||||
|
||||
if [ -n "${NV_TARBALL}" ]; then
|
||||
|
|
@ -234,7 +234,7 @@ start() {
|
|||
eerror "Unsupported arch."
|
||||
fi
|
||||
|
||||
ATI_TARBALL="$(FETCHCOMMAND="false" RESUMECOMMAND="false" FEATURES="-getbinpkg" emerge --color=n -f ati-drivers --nodeps 2> /dev/zero | \
|
||||
ATI_TARBALL="$(FETCHCOMMAND="false" RESUMECOMMAND="false" FEATURES="-getbinpkg" emerge --getbinpkg=n --color=n -f ati-drivers --nodeps 2> /dev/zero | \
|
||||
grep "BLAKE2B SHA512 size ;-) ..." | awk '{print $2}' | head -n1)"
|
||||
|
||||
if [ -n "${ATI_TARBALL}" ]; then
|
||||
|
|
@ -279,7 +279,7 @@ start() {
|
|||
for mod in ${BROADCOM_DETECTED}; do
|
||||
einfo "Detected: ${mod} hardware, please stand by..."
|
||||
TEST_FILE=""
|
||||
TEST_FILE="$(FETCHCOMMAND="false" RESUMECOMMAND="false" FEATURES="-getbinpkg" emerge --color=n -f ${mod}-firmware --nodeps 2> /dev/zero | \
|
||||
TEST_FILE="$(FETCHCOMMAND="false" RESUMECOMMAND="false" FEATURES="-getbinpkg" emerge --getbinpkg=n --color=n -f ${mod}-firmware --nodeps 2> /dev/zero | \
|
||||
grep "BLAKE2B SHA512 size ;-) ..." | awk '{print $2}' | head -n1)"
|
||||
if [ -n "${TEST_FILE}" ]; then
|
||||
BROADCOM_READY="${BROADCOM_READY} ${mod}-firmware"
|
||||
|
|
@ -305,7 +305,7 @@ start() {
|
|||
if [ -w /mnt/cdrom/modules ] && [ -x /usr/sbin/makemo ]; then
|
||||
run_merge="echo y | makemo"
|
||||
else
|
||||
run_merge="emerge --nodeps"
|
||||
run_merge="emerge --nodeps --getbinpkg=n"
|
||||
fi
|
||||
|
||||
ebegin "Setting up broadcom firmware if needed..."
|
||||
|
|
@ -321,6 +321,19 @@ start() {
|
|||
done
|
||||
if [ -n "${BROADCOM_DETECTED}" ]; then
|
||||
if handle_broadcom; then
|
||||
for mod in b43 b43legacy; do
|
||||
if grep -Eq "^${mod} " /proc/modules; then
|
||||
if [ ! -d /lib/firmware/${mod} ]; then
|
||||
eend "Something went wrong installing ${mod}-firmware."
|
||||
else
|
||||
einfo "${mod}-firmware is now available, reloading ${mod}"
|
||||
modprobe -r ${mod}
|
||||
sleep 1
|
||||
modprobe ${mod}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
eend 0
|
||||
else
|
||||
eend "Something went wrong installing broadcom drivers."
|
||||
|
|
@ -12,8 +12,6 @@ if [[ -z "$@" ]] ; then
|
|||
eerror "Please specify a package to build." && exit 1
|
||||
fi
|
||||
|
||||
einfo "Pentoo Overlay Module creator version 1.0 running..."
|
||||
|
||||
PKGDIR="$(portageq envvar PKGDIR)"
|
||||
if [ ! -d "${PKGDIR}" ]; then
|
||||
einfo "PKGDIR ${PKGDIR} missing, creating it"
|
||||
|
|
@ -28,8 +26,7 @@ if [ ! -w "${DST}" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
TMPDIR="/tmp/rootfs-$$"
|
||||
mkdir -p "${TMPDIR}"
|
||||
TMPDIR="$(mktemp -d)"
|
||||
|
||||
DEPS=$(emerge -pv "$@")
|
||||
# | ignore nomerge | find versions | remove [ ebuild N ] | remove use flags | remove repo from version | not sure
|
||||
|
|
@ -53,8 +50,8 @@ do
|
|||
einfo "Prepping all required packages for module inclusion..."
|
||||
quickpkg --include-config=y "=${x}"
|
||||
# remove slot from version since portage doesn't include slot in tarball name
|
||||
[[ ! -e /usr/portage/packages/"${x%:*}".tbz2 ]] && eerror "Build failed" && exit 1
|
||||
tar -I lbzip2 -xf /usr/portage/packages/"${x%:*}".tbz2 -C "${TMPDIR}"
|
||||
[[ ! -e ${PKGDIR}/"${x%:*}".tbz2 ]] && eerror "Build failed" && exit 1
|
||||
tar -I lbzip2 -xf ${PKGDIR}/"${x%:*}".tbz2 -C "${TMPDIR}"
|
||||
if [ -d "${TMPDIR}"/lib ] && [ -L /lib ]; then
|
||||
mkdir -p "${TMPDIR}$(realpath /lib)"
|
||||
mv -f "${TMPDIR}"/lib/* "${TMPDIR}$(realpath /lib)"
|
||||
|
|
@ -36,10 +36,10 @@ pkg_setup() {
|
|||
src_install() {
|
||||
#/usr/sbin
|
||||
newsbin "${FILESDIR}"/flushchanges-2018.0 flushchanges
|
||||
newsbin "${FILESDIR}"/makemo-2019.0 makemo
|
||||
newsbin "${FILESDIR}"/makemo-2020.3 makemo
|
||||
newsbin "${FILESDIR}"/livecd-setpass-r6 livecd-setpass
|
||||
|
||||
newinitd "${FILESDIR}"/binary-driver-handler.initd-2020.2 binary-driver-handler
|
||||
newinitd "${FILESDIR}"/binary-driver-handler.initd-2020.3 binary-driver-handler
|
||||
|
||||
exeinto /root/Desktop
|
||||
doexe "${FILESDIR}"/networkmanager.desktop
|
||||
Loading…
Reference in a new issue