mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #3523 from HiassofT/le10-initramfs-cleanup
cleanup initramfs build, drop support for kernel modules in initramfs
This commit is contained in:
commit
17cda55c9f
@ -36,7 +36,6 @@ show_config() {
|
||||
fi
|
||||
config_message="$config_message\n - OpenGL (GLX) support (provider):\t $OPENGL_SUPPORT ($OPENGL)"
|
||||
config_message="$config_message\n - OpenGLES support (provider):\t\t $OPENGLES_SUPPORT ($OPENGLES)"
|
||||
config_message="$config_message\n - uvesafb support:\t\t\t $UVESAFB_SUPPORT"
|
||||
|
||||
# Hardware decoder support
|
||||
|
||||
@ -81,10 +80,6 @@ show_config() {
|
||||
config_message="$config_message\n - Include firmware:\t\t\t $config_firmware"
|
||||
done
|
||||
|
||||
for config_modules in $INITRAMFS_MODULES; do
|
||||
config_message="$config_message\n - Initramfs modules:\t\t\t $config_modules"
|
||||
done
|
||||
|
||||
# Network service configuration
|
||||
|
||||
config_message="$config_message\n\n Network service configuration:"
|
||||
|
@ -127,6 +127,11 @@ makeinstall_host() {
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
( cd $ROOT
|
||||
rm -rf $BUILD/initramfs
|
||||
$SCRIPTS/install initramfs
|
||||
)
|
||||
|
||||
if [ "$TARGET_ARCH" = "x86_64" ]; then
|
||||
# copy some extra firmware to linux tree
|
||||
mkdir -p $PKG_BUILD/external-firmware
|
||||
@ -147,10 +152,17 @@ pre_make_target() {
|
||||
}
|
||||
|
||||
make_target() {
|
||||
kernel_make modules
|
||||
kernel_make INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) modules_install
|
||||
rm -f $INSTALL/$(get_kernel_overlay_dir)/lib/modules/*/build
|
||||
rm -f $INSTALL/$(get_kernel_overlay_dir)/lib/modules/*/source
|
||||
# arm64 target does not support creating uImage.
|
||||
# Build Image first, then wrap it using u-boot's mkimage.
|
||||
if [[ "$TARGET_KERNEL_ARCH" = "arm64" && "$KERNEL_TARGET" = uImage* ]]; then
|
||||
if [ -z "$KERNEL_UIMAGE_LOADADDR" -o -z "$KERNEL_UIMAGE_ENTRYADDR" ]; then
|
||||
die "ERROR: KERNEL_UIMAGE_LOADADDR and KERNEL_UIMAGE_ENTRYADDR have to be set to build uImage - aborting"
|
||||
fi
|
||||
KERNEL_UIMAGE_TARGET="$KERNEL_TARGET"
|
||||
KERNEL_TARGET="${KERNEL_TARGET/uImage/Image}"
|
||||
fi
|
||||
|
||||
kernel_make $KERNEL_TARGET $KERNEL_MAKE_EXTRACMD modules
|
||||
|
||||
if [ "$PKG_BUILD_PERF" = "yes" ] ; then
|
||||
( cd tools/perf
|
||||
@ -185,26 +197,6 @@ make_target() {
|
||||
)
|
||||
fi
|
||||
|
||||
( cd $ROOT
|
||||
rm -rf $BUILD/initramfs
|
||||
$SCRIPTS/install initramfs
|
||||
)
|
||||
|
||||
# arm64 target does not support creating uImage.
|
||||
# Build Image first, then wrap it using u-boot's mkimage.
|
||||
if [[ "$TARGET_KERNEL_ARCH" = "arm64" && "$KERNEL_TARGET" = uImage* ]]; then
|
||||
if [ -z "$KERNEL_UIMAGE_LOADADDR" -o -z "$KERNEL_UIMAGE_ENTRYADDR" ]; then
|
||||
die "ERROR: KERNEL_UIMAGE_LOADADDR and KERNEL_UIMAGE_ENTRYADDR have to be set to build uImage - aborting"
|
||||
fi
|
||||
KERNEL_UIMAGE_TARGET="$KERNEL_TARGET"
|
||||
KERNEL_TARGET="${KERNEL_TARGET/uImage/Image}"
|
||||
fi
|
||||
|
||||
# the modules target is required to get a proper Module.symvers
|
||||
# file with symbols from built-in and external modules.
|
||||
# Without that it'll contain only the symbols from the kernel
|
||||
kernel_make $KERNEL_TARGET $KERNEL_MAKE_EXTRACMD modules
|
||||
|
||||
if [ -n "$KERNEL_UIMAGE_TARGET" ] ; then
|
||||
# determine compression used for kernel image
|
||||
KERNEL_UIMAGE_COMP=${KERNEL_UIMAGE_TARGET:7}
|
||||
@ -236,6 +228,10 @@ make_target() {
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
kernel_make INSTALL_MOD_PATH=$INSTALL/$(get_kernel_overlay_dir) modules_install
|
||||
rm -f $INSTALL/$(get_kernel_overlay_dir)/lib/modules/*/build
|
||||
rm -f $INSTALL/$(get_kernel_overlay_dir)/lib/modules/*/source
|
||||
|
||||
if [ "$BOOTLOADER" = "u-boot" ]; then
|
||||
mkdir -p $INSTALL/usr/share/bootloader
|
||||
for dtb in arch/$TARGET_KERNEL_ARCH/boot/dts/*.dtb arch/$TARGET_KERNEL_ARCH/boot/dts/*/*.dtb; do
|
||||
@ -259,31 +255,6 @@ makeinstall_target() {
|
||||
fi
|
||||
}
|
||||
|
||||
make_init() {
|
||||
: # reuse make_target()
|
||||
}
|
||||
|
||||
makeinstall_init() {
|
||||
if [ -n "$INITRAMFS_MODULES" ]; then
|
||||
mkdir -p $INSTALL/etc
|
||||
mkdir -p $INSTALL/usr/lib/modules
|
||||
|
||||
for i in $INITRAMFS_MODULES; do
|
||||
module=`find .install_pkg/$(get_full_module_dir)/kernel -name $i.ko`
|
||||
if [ -n "$module" ]; then
|
||||
echo $i >> $INSTALL/etc/modules
|
||||
cp $module $INSTALL/usr/lib/modules/`basename $module`
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$UVESAFB_SUPPORT" = yes ]; then
|
||||
mkdir -p $INSTALL/usr/lib/modules
|
||||
uvesafb=`find .install_pkg/$(get_full_module_dir)/kernel -name uvesafb.ko`
|
||||
cp $uvesafb $INSTALL/usr/lib/modules/`basename $uvesafb`
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
mkdir -p $INSTALL/$(get_full_firmware_dir)/
|
||||
|
||||
|
@ -374,12 +374,6 @@ load_splash() {
|
||||
if [ ! "$SPLASH" = "no" ]; then
|
||||
progress "Loading bootsplash"
|
||||
|
||||
# load uvesafb module if needed
|
||||
if [ -f "$MODULE_DIR/uvesafb.ko" -a ! -e /dev/fb0 ]; then
|
||||
progress "Loading kernel module uvesafb.ko"
|
||||
insmod "$MODULE_DIR/uvesafb.ko" && set_default_res=yes || progress "... Failed to load kernel module uvesafb, skipping"
|
||||
fi
|
||||
|
||||
if [ -e /dev/fb0 ]; then
|
||||
# Set framebuffer to a custom resolution and/or fallback to default resolution (1024x768-32), if required.
|
||||
if [ ! "$SWITCH_FRAMEBUFFER" = "no" ]; then
|
||||
|
@ -1,25 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="v86d"
|
||||
PKG_VERSION="0.1.10"
|
||||
PKG_SHA256="634964ae18ef68c8493add2ce150e3b4502badeb0d9194b4bd81241d25e6735c"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://dev.gentoo.org/~spock/projects/uvesafb/"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS_INIT="toolchain gcc:init"
|
||||
PKG_LONGDESC="v86d is the userspace helper that runs x86 code in an emulated environment."
|
||||
|
||||
pre_configure_init() {
|
||||
INIT_CONFIGURE_OPTS="--with-x86emu"
|
||||
|
||||
# v86d fails to build in subdirs
|
||||
cd $PKG_BUILD
|
||||
rm -rf .$TARGET_NAME-init
|
||||
}
|
||||
|
||||
makeinstall_init() {
|
||||
DESTDIR=$INSTALL/usr make install
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
diff -Naur v86d-0.1.10/libs/x86emu/Makefile v86d-0.1.10.patch/libs/x86emu/Makefile
|
||||
--- v86d-0.1.10/libs/x86emu/Makefile 2011-02-25 22:27:39.000000000 +0100
|
||||
+++ v86d-0.1.10.patch/libs/x86emu/Makefile 2012-06-28 20:15:36.486234182 +0200
|
||||
@@ -1,7 +1,7 @@
|
||||
OBJS = decode.o fpu.o ops.o ops2.o prim_ops.o sys.o
|
||||
|
||||
libx86emu.a: $(OBJS)
|
||||
- ar rv $@ $+
|
||||
+ $(AR) rv $@ $+
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c $(CFLAGS) -o $@ $<
|
@ -1,18 +0,0 @@
|
||||
diff -Naur v86d-0.1.10/Makefile v86d-0.1.10.patch/Makefile
|
||||
--- v86d-0.1.10/Makefile 2011-02-25 22:27:39.000000000 +0100
|
||||
+++ v86d-0.1.10.patch/Makefile 2013-01-14 19:20:13.385465794 +0100
|
||||
@@ -3,14 +3,12 @@
|
||||
.PHONY: clean install install_testvbe x86emu lrmi
|
||||
|
||||
INSTALL = install
|
||||
-KDIR ?= /lib/modules/$(shell uname -r)/source
|
||||
|
||||
ifeq ($(call config_opt,CONFIG_KLIBC),true)
|
||||
export CC = klcc
|
||||
endif
|
||||
|
||||
CFLAGS ?= -Wall -g -O2
|
||||
-CFLAGS += -I$(KDIR)/include
|
||||
|
||||
ifeq ($(call config_opt,CONFIG_X86EMU),true)
|
||||
CFLAGS += -Ilibs/x86emu
|
@ -10,10 +10,6 @@ PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS_INIT="toolchain gcc:init libpng"
|
||||
PKG_LONGDESC="Boot splash screen based on Fedora's Plymouth code"
|
||||
|
||||
if [ "$UVESAFB_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS_INIT="$PKG_DEPENDS_INIT v86d:init"
|
||||
fi
|
||||
|
||||
pre_configure_init() {
|
||||
# plymouth-lite dont support to build in subdirs
|
||||
cd $PKG_BUILD
|
||||
|
@ -7,7 +7,7 @@ PKG_VERSION=""
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.openelec.tv"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain libc:init busybox:init linux:init plymouth-lite:init util-linux:init e2fsprogs:init dosfstools:init fakeroot:host"
|
||||
PKG_DEPENDS_TARGET="toolchain libc:init busybox:init plymouth-lite:init util-linux:init e2fsprogs:init dosfstools:init fakeroot:host"
|
||||
PKG_SECTION="virtual"
|
||||
PKG_LONGDESC="debug is a Metapackage for installing initramfs"
|
||||
|
||||
|
@ -43,9 +43,6 @@
|
||||
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)
|
||||
OPENGLES="libmali"
|
||||
|
||||
# include uvesafb support (yes / no)
|
||||
UVESAFB_SUPPORT="no"
|
||||
|
||||
# Displayserver to use (x11 / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
@ -60,9 +57,6 @@
|
||||
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)
|
||||
KODIPLAYER_DRIVER="$OPENGLES"
|
||||
|
||||
# Modules to install in initramfs for early boot
|
||||
INITRAMFS_MODULES=""
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
# Space separated list is supported,
|
||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||
|
@ -3758,7 +3758,7 @@ CONFIG_FB_MODE_HELPERS=y
|
||||
# CONFIG_FB_ASILIANT is not set
|
||||
# CONFIG_FB_IMSTT is not set
|
||||
# CONFIG_FB_VGA16 is not set
|
||||
CONFIG_FB_UVESA=m
|
||||
# CONFIG_FB_UVESA is not set
|
||||
# CONFIG_FB_VESA is not set
|
||||
CONFIG_FB_EFI=y
|
||||
# CONFIG_FB_N411 is not set
|
||||
|
@ -59,18 +59,12 @@
|
||||
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)
|
||||
OPENGLES="no"
|
||||
|
||||
# include uvesafb support (yes / no)
|
||||
UVESAFB_SUPPORT="yes"
|
||||
|
||||
# Displayserver to use (x11 / no)
|
||||
DISPLAYSERVER="x11"
|
||||
|
||||
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)
|
||||
KODIPLAYER_DRIVER="default"
|
||||
|
||||
# Modules to install in initramfs for early boot
|
||||
INITRAMFS_MODULES=""
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
# Space separated list is supported,
|
||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||
|
@ -74,9 +74,6 @@
|
||||
# OpenGL-ES implementation to use (no / bcm2835-driver / mesa)
|
||||
OPENGLES="bcm2835-driver"
|
||||
|
||||
# include uvesafb support (yes / no)
|
||||
UVESAFB_SUPPORT="no"
|
||||
|
||||
# Displayserver to use (x11 / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
@ -94,9 +91,6 @@
|
||||
# KODI Player implementation to use (default / bcm2835-driver / mesa)
|
||||
KODIPLAYER_DRIVER="bcm2835-driver"
|
||||
|
||||
# Modules to install in initramfs for early boot
|
||||
INITRAMFS_MODULES=""
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
# Space separated list is supported,
|
||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||
|
@ -32,9 +32,6 @@
|
||||
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)
|
||||
OPENGLES="libmali"
|
||||
|
||||
# include uvesafb support (yes / no)
|
||||
UVESAFB_SUPPORT="no"
|
||||
|
||||
# Displayserver to use (weston / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
||||
@ -52,9 +49,6 @@
|
||||
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap)
|
||||
KODIPLAYER_DRIVER="$OPENGLES"
|
||||
|
||||
# Modules to install in initramfs for early boot
|
||||
INITRAMFS_MODULES=""
|
||||
|
||||
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
|
||||
# Space separated list is supported,
|
||||
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
|
||||
|
Loading…
x
Reference in New Issue
Block a user