new package:

- add and run plymouth-lite as bootsplash
- various cleanups to initramfs init scripts
- add an option to build busybox statically
This commit is contained in:
Stephan Raue 2009-09-28 14:10:32 +02:00
parent 31cc68e8f8
commit 912134564b
14 changed files with 213 additions and 10 deletions

View File

@ -7,7 +7,9 @@ $SCRIPTS/build module-init-tools
export INSTALL=$(kernel_path)
$SCRIPTS/install busybox-initramfs
$SCRIPTS/install uClibc initramfs
[ "$BUSYBOX_STATIC" = "no" ] && \
$SCRIPTS/install uClibc initramfs
unset LDFLAGS
DEPMOD=`ls -d $ROOT/$BUILD/module-init-tool*/build/depmod`

View File

@ -3,6 +3,7 @@ dir /dev 755 0 0
dir /bin 755 1000 1000
slink /bin/sh busybox 777 0 0
file /bin/busybox initramfs/bin/busybox 755 0 0
file /bin/ply-image initramfs/bin/ply-image 755 0 0
dir /proc 755 0 0
dir /sys 755 0 0
@ -11,3 +12,4 @@ dir /sysroot 755 0 0
dir /storage 755 0 0
file /init initramfs/init 755 0 0
file /splash.png initramfs/splash.png 644 0 0

View File

@ -40,7 +40,7 @@ CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
#
# Build Options
#
# CONFIG_STATIC is not set
CONFIG_STATIC=y
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set

View File

@ -2,6 +2,7 @@
. config/options
$SCRIPTS/unpack linux
$SCRIPTS/install plymouth-lite initramfs
PKG_DIR=`find $PACKAGES -type d -name $1`

View File

@ -14,9 +14,20 @@
debugging)
DEBUG=yes
;;
splash)
SPLASH=yes
;;
esac
done
show_splash() {
if [ "$SPLASH" = yes ]; then
if [ -f "/bin/ply-image" -a -f "/splash.png" ]; then
/bin/ply-image /splash.png
fi
fi
}
progress() {
if test "$DEBUG" = yes; then
echo "### $1 ###"
@ -45,21 +56,23 @@
update() {
if [ -f "$UPDATE_DIR/$2" ]; then
progress "updating $1..."
echo "updating $1..."
/bin/busybox mount -o remount,rw /flash
/bin/busybox mv $UPDATE_DIR/$2 $3
/bin/busybox mount -o remount,ro /flash
/bin/busybox sync
progress "... done"
if [ $4 = reboot ]; then
progress "System reboots now"
echo "System reboots now"
/bin/busybox reboot
fi
fi
}
show_splash
mount_part "$BOOT" "/flash" "ro,noatime"
[ -n $DISK ] && mount_part "$DISK" "/storage" "rw,noatime"
# mount_part "$DISK" "/storage" "rw,noatime"
update "Kernel" "openelec.kernel" "/flash/openelec.kernel" "reboot"
update "System" "openelec.system" "/flash/openelec.system" "noreboot"

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -0,0 +1,20 @@
#!/bin/sh
. config/options
$SCRIPTS/build toolchain
$SCRIPTS/build libpng
cd $PKG_BUILD
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--disable-static \
--enable-shared \
make
$STRIP ply-image

View File

@ -0,0 +1,21 @@
#!/bin/sh
. config/options
# $SCRIPTS/install libpng
PKG_DIR=`find $PACKAGES -type d -name $1`
if [ "$2" = initramfs ]; then
mkdir -p $INSTALL/initramfs/bin
cp -PR $PKG_BUILD/ply-image $INSTALL/initramfs/bin
mkdir -p $INSTALL/initramfs
cp -PR $PKG_DIR/background/OpenELEC1.png $INSTALL/initramfs/splash.png
exit 0
fi
mkdir -p $INSTALL/bin
cp -PR $PKG_BUILD/ply-image $INSTALL/usr/bin
mkdir -p $INSTALL/usr/share/plymouth/
cp -PR $PKG_DIR/background/OpenELEC1.png $INSTALL/usr/share/plymouth/splash.png

View File

@ -0,0 +1,11 @@
--- plymouth-lite-0.6.0/ply-image.c~ 2009-03-06 16:20:52.000000000 -0800
+++ plymouth-lite-0.6.0/ply-image.c 2009-03-06 16:20:52.000000000 -0800
@@ -439,7 +439,7 @@
exit_code = 0;
-// hide_cursor ();
+ hide_cursor ();
if (argc == 1)
image = ply_image_new ("/usr/share/plymouth/splash.png");

View File

@ -0,0 +1,10 @@
--- plymouth-lite-0.6.0/Makefile~ 2009-07-22 11:22:32.000000000 -0700
+++ plymouth-lite-0.6.0/Makefile 2009-07-22 11:22:32.000000000 -0700
@@ -1,6 +1,6 @@
ply-image: ply-image.c ply-frame-buffer.c Makefile
- gcc -O2 -march=core2 -mtune=generic -lm `pkg-config --cflags libpng12` `pkg-config --libs libpng12` ply-image.c ply-frame-buffer.c -o ply-image
+ $(CC) -Os -static -march=core2 -mtune=generic `pkg-config --cflags libpng12` ply-image.c ply-frame-buffer.c -o ply-image `pkg-config --libs libpng12` -lm -lz
clean:
rm -f ply-image *~ gmon.out

View File

@ -0,0 +1,110 @@
diff -urN plymouth-lite-0.6.0/ply-frame-buffer.c plymouth-lite-0.6.0.change/ply-frame-buffer.c
--- plymouth-lite-0.6.0/ply-frame-buffer.c 2009-02-19 19:14:24.000000000 +0800
+++ plymouth-lite-0.6.0.change/ply-frame-buffer.c 2009-06-13 17:44:05.000000000 +0800
@@ -47,41 +47,6 @@
#define PLY_FRAME_BUFFER_DEFAULT_FB_DEVICE_NAME "/dev/fb0"
#endif
-struct _ply_frame_buffer
-{
- char *device_name;
- int device_fd;
-
- char *map_address;
- size_t size;
-
- uint32_t *shadow_buffer;
-
- uint32_t red_bit_position;
- uint32_t green_bit_position;
- uint32_t blue_bit_position;
- uint32_t alpha_bit_position;
-
- uint32_t bits_for_red;
- uint32_t bits_for_green;
- uint32_t bits_for_blue;
- uint32_t bits_for_alpha;
-
- int32_t dither_red;
- int32_t dither_green;
- int32_t dither_blue;
-
- unsigned int bytes_per_pixel;
- unsigned int row_stride;
-
- ply_frame_buffer_area_t area;
- ply_frame_buffer_area_t area_to_flush;
-
- void (*flush)(ply_frame_buffer_t *buffer);
-
- int pause_count;
-};
-
static bool ply_frame_buffer_open_device (ply_frame_buffer_t *buffer);
static void ply_frame_buffer_close_device (ply_frame_buffer_t *buffer);
static bool ply_frame_buffer_query_device (ply_frame_buffer_t *buffer);
diff -urN plymouth-lite-0.6.0/ply-frame-buffer.h plymouth-lite-0.6.0.change/ply-frame-buffer.h
--- plymouth-lite-0.6.0/ply-frame-buffer.h 2009-02-19 17:35:54.000000000 +0800
+++ plymouth-lite-0.6.0.change/ply-frame-buffer.h 2009-06-13 17:31:42.000000000 +0800
@@ -38,6 +38,41 @@
unsigned long height;
};
+struct _ply_frame_buffer
+{
+ char *device_name;
+ int device_fd;
+
+ char *map_address;
+ size_t size;
+
+ uint32_t *shadow_buffer;
+
+ uint32_t red_bit_position;
+ uint32_t green_bit_position;
+ uint32_t blue_bit_position;
+ uint32_t alpha_bit_position;
+
+ uint32_t bits_for_red;
+ uint32_t bits_for_green;
+ uint32_t bits_for_blue;
+ uint32_t bits_for_alpha;
+
+ int32_t dither_red;
+ int32_t dither_green;
+ int32_t dither_blue;
+
+ unsigned int bytes_per_pixel;
+ unsigned int row_stride;
+
+ ply_frame_buffer_area_t area;
+ ply_frame_buffer_area_t area_to_flush;
+
+ void (*flush)(ply_frame_buffer_t *buffer);
+
+ int pause_count;
+};
+
#define PLY_FRAME_BUFFER_COLOR_TO_PIXEL_VALUE(r,g,b,a) \
(((uint8_t) (CLAMP (a * 255.0, 0.0, 255.0)) << 24) \
| ((uint8_t) (CLAMP (r * 255.0, 0.0, 255.0)) << 16) \
diff -urN plymouth-lite-0.6.0/ply-image.c plymouth-lite-0.6.0.change/ply-image.c
--- plymouth-lite-0.6.0/ply-image.c 2009-02-19 19:16:36.000000000 +0800
+++ plymouth-lite-0.6.0.change/ply-image.c 2009-06-13 17:42:52.000000000 +0800
@@ -43,6 +43,7 @@
#include <png.h>
#include <linux/fb.h>
+#include "ply-frame-buffer.h"
#define MIN(a,b) ((a) <= (b)? (a) : (b))
#define MAX(a,b) ((a) >= (b)? (a) : (b))
@@ -464,6 +465,8 @@
return exit_code;
}
+ image = ply_image_resize(image, buffer->area.width, buffer->area.height);
+
animate_at_time (buffer, image);
ply_frame_buffer_close (buffer);

View File

@ -0,0 +1 @@
http://sources.openelec.tv/svn/plymouth-lite-0.6.0.tar.bz2

View File

@ -1,16 +1,23 @@
# Welcome Message for e.g. SSH Server (up to 5 Lines)
GREATING0="#######################################################"
GREATING1="# Welcome to OpenELEC - the powerfull Mediacenter4you #"
GREATING2="# .......... visit http://www.openelec.tv .......... #"
GREATING2="# .......... visit http://www.openelec.tv ........... #"
GREATING3="#######################################################"
GREATING4=""
# Root password to integrate in the target system
ROOT_PASSWORD="openelec"
# build with static busybox (this makes kernel smaller if
# only busybox exists in initramfs) (yes /no )
BUSYBOX_STATIC=yes
# Mediacenter to use (moovida / mythtv / no)
MEDIACENTER=moovida
# build with plymouth graphical boot (yes / no)
PLYMOUTH=yes
# build with network support (yes / no)
NETWORK=yes
@ -18,7 +25,8 @@
DISPLAYSERVER=xorg-server
# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nouveau)
# Space separated list is supported, e.g. GRAPHIC_DRIVERS="i915 i965 radeon nouveau"
# Space separated list is supported,
# e.g. GRAPHIC_DRIVERS="i915 i965 radeon nouveau"
GRAPHIC_DRIVERS="i965"
# MESA to use (Mesa / Mesa-master)
@ -28,10 +36,10 @@
LIBDRM=libdrm
# build with games support (yes / no)
GAMES=yes
GAMES=no
# build with emulator support (yes / no)
EMULATORS=yes
EMULATORS=no
# Coreboot support (yes / no)
COREBOOT=no
@ -40,6 +48,10 @@
## Do not change anything below this line
#####################################################################
# if [ "$PLYMOUTH" = "yes" ]; then
# BUSYBOX_STATIC=no
# fi
if [ "$DISPLAYSERVER" = xorg-server ]; then
CAIRO=cairo
elif [ "$DISPLAYSERVER" = wayland ]; then