summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorSimon Rettberg2014-07-05 16:31:46 +0200
committerSimon Rettberg2014-07-05 16:31:46 +0200
commit2f724e0ffd3ddc34bb5459f5f5fbd31b08e2727a (patch)
tree4b16adb0085b84aca8396554a1864ca3cfc9ad48 /remote
parent[branding-freiburg] Add ppm (diff)
downloadtm-scripts-2f724e0ffd3ddc34bb5459f5f5fbd31b08e2727a.tar.gz
tm-scripts-2f724e0ffd3ddc34bb5459f5f5fbd31b08e2727a.tar.xz
tm-scripts-2f724e0ffd3ddc34bb5459f5f5fbd31b08e2727a.zip
[stage31] Made splash-screen nicer
Diffstat (limited to 'remote')
-rw-r--r--remote/modules/busybox/fbsplash-center.patch16
-rw-r--r--remote/modules/busybox/fbsplash-fillbg.patch6
-rw-r--r--remote/modules/splash-openslx/data/etc/splash.ppmbin520854 -> 0 bytes
-rw-r--r--remote/modules/splash-openslx/data/etc/splash.ppm.gzbin0 -> 11233 bytes
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig6
-rwxr-xr-xremote/rootfs/rootfs-stage31/data/init7
6 files changed, 22 insertions, 13 deletions
diff --git a/remote/modules/busybox/fbsplash-center.patch b/remote/modules/busybox/fbsplash-center.patch
index 7e54a183..748420fd 100644
--- a/remote/modules/busybox/fbsplash-center.patch
+++ b/remote/modules/busybox/fbsplash-center.patch
@@ -1,5 +1,5 @@
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
-index 12a77b7..cae392c 100644
+index 7b695b2..e3a55ca 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -9,6 +9,7 @@
@@ -40,19 +40,21 @@ index 12a77b7..cae392c 100644
if (LONE_DASH(G.image_filename)) {
theme_file = stdin;
-@@ -396,6 +401,11 @@ static void fb_drawimage(void)
+@@ -396,6 +401,13 @@ static void fb_drawimage(void)
line_size = width*3;
pixline = xmalloc(line_size);
+ if (G.bcenter_image) {
-+ xoffset = ((G.scr_var.xres - width) * G.bytes_per_pixel) / 2;
-+ yoffset = (G.scr_var.yres - height) / 2;
++ if (width < G.scr_var.xres)
++ xoffset = ((G.scr_var.xres - width) / 2) * G.bytes_per_pixel;
++ if (height < G.scr_var.yres)
++ yoffset = (G.scr_var.yres - height) / 2;
+ }
+
if (width > G.scr_var.xres)
width = G.scr_var.xres;
if (height > G.scr_var.yres)
-@@ -407,7 +417,7 @@ static void fb_drawimage(void)
+@@ -407,7 +419,7 @@ static void fb_drawimage(void)
if (fread(pixline, 1, line_size, theme_file) != line_size)
bb_error_msg_and_die("bad PPM file '%s'", G.image_filename);
pixel = pixline;
@@ -61,7 +63,7 @@ index 12a77b7..cae392c 100644
for (i = 0; i < width; i++) {
unsigned thispix = fb_pixel_value(pixel[0], pixel[1], pixel[2]);
fb_write_pixel(src, thispix);
-@@ -463,6 +473,7 @@ int fbsplash_main(int argc UNUSED_PARAM, char **argv)
+@@ -463,6 +475,7 @@ int fbsplash_main(int argc UNUSED_PARAM, char **argv)
FILE *fp = fp; // for compiler
char *num_buf;
unsigned num;
@@ -69,7 +71,7 @@ index 12a77b7..cae392c 100644
bool bCursorOff;
INIT_G();
-@@ -471,8 +482,10 @@ int fbsplash_main(int argc UNUSED_PARAM, char **argv)
+@@ -471,8 +484,10 @@ int fbsplash_main(int argc UNUSED_PARAM, char **argv)
fb_device = "/dev/fb0";
cfg_filename = NULL;
fifo_filename = NULL;
diff --git a/remote/modules/busybox/fbsplash-fillbg.patch b/remote/modules/busybox/fbsplash-fillbg.patch
index f4ee0f73..51695ba7 100644
--- a/remote/modules/busybox/fbsplash-fillbg.patch
+++ b/remote/modules/busybox/fbsplash-fillbg.patch
@@ -1,5 +1,5 @@
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
-index 2201108..2195bcc 100644
+index e3a55ca..daea60d 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -23,11 +23,12 @@
@@ -48,7 +48,7 @@ index 2201108..2195bcc 100644
/**
* Draw image from PPM file
-@@ -418,6 +437,10 @@ static void fb_drawimage(void)
+@@ -420,6 +439,10 @@ static void fb_drawimage(void)
bb_error_msg_and_die("bad PPM file '%s'", G.image_filename);
pixel = pixline;
src = G.addr + (j + yoffset) * G.scr_fix.line_length + xoffset;
@@ -59,7 +59,7 @@ index 2201108..2195bcc 100644
for (i = 0; i < width; i++) {
unsigned thispix = fb_pixel_value(pixel[0], pixel[1], pixel[2]);
fb_write_pixel(src, thispix);
-@@ -482,10 +505,11 @@ int fbsplash_main(int argc UNUSED_PARAM, char **argv)
+@@ -484,10 +507,11 @@ int fbsplash_main(int argc UNUSED_PARAM, char **argv)
fb_device = "/dev/fb0";
cfg_filename = NULL;
fifo_filename = NULL;
diff --git a/remote/modules/splash-openslx/data/etc/splash.ppm b/remote/modules/splash-openslx/data/etc/splash.ppm
deleted file mode 100644
index cb1c5637..00000000
--- a/remote/modules/splash-openslx/data/etc/splash.ppm
+++ /dev/null
Binary files differ
diff --git a/remote/modules/splash-openslx/data/etc/splash.ppm.gz b/remote/modules/splash-openslx/data/etc/splash.ppm.gz
new file mode 100644
index 00000000..d30d44e2
--- /dev/null
+++ b/remote/modules/splash-openslx/data/etc/splash.ppm.gz
Binary files differ
diff --git a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig
index 5a97d7ac..35834d52 100644
--- a/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig
+++ b/remote/rootfs/rootfs-stage31/data/inc/activate_sysconfig
@@ -21,7 +21,7 @@ fetch_sysconfig() {
}
#########################################################################
#
-# This function downloads the config.tgz and unpacks it to $TARGET_PATH
+# This function downloads the config.tgz and unpacks it to $TARGET_PATH <-- no it doesn't!
#
fetch_config_files() {
[ -e "${CONFIG}.tgz" ] && echo "config.tgz already downloaded." && exit 0
@@ -33,7 +33,7 @@ fetch_config_files() {
#########################################################################
#
# This function updates the downloaded config with the IP information
-# received from /inc/setup_network
+# received from /inc/setup_network <-- plus 500 other things
update_sysconfig() {
# sanity checks
[ ! -e "${CONFIG}" ] && { echo "Cannot update. '$CONFIG' does not exist."; return 1; }
@@ -66,6 +66,8 @@ HEREEND
cd /
rm -rf -- "${TEMP_EXTRACT_DIR}"
[ $DEBUG -eq 0 ] && rm -f -- "${CONFIG}.tgz"
+ # Display branding logo if splash screen is shown
+ [ "x${MUTED_OUTPUT}" = "x1" ] && [ -e "${FUTURE_ROOT}/etc/branding.ppm" ] && fbsplash -c -s "${FUTURE_ROOT}/etc/branding.ppm" &
}
diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init
index 699c68ff..91ae5d43 100755
--- a/remote/rootfs/rootfs-stage31/data/init
+++ b/remote/rootfs/rootfs-stage31/data/init
@@ -51,7 +51,12 @@ if [ "$SPLASH" -eq 1 ]; then
exec 4>&1 5>&2 > /dev/null 2>&1
MUTED_OUTPUT=1
echo -e "\033[?25l"
- setsid fbsplash -x -c -s /etc/splash.ppm &
+ clear
+ if [ -e "/etc/splash.ppm.gz" ]; then
+ fbsplash -x -b -c -s "/etc/splash.ppm.gz" &
+ else
+ fbsplash -x -b -c -s "/etc/splash.ppm" &
+ fi
fi
else
setup_gfx