From cf57b43ef559471006b07abca763aa58f36efc62 Mon Sep 17 00:00:00 2001 From: Daniel <790119+DanTheMan827@users.noreply.github.com> Date: Thu, 30 Nov 2017 22:54:05 -0600 Subject: add /bin/decodepng and convert the splash to png format --- .gitattributes | 1 + .gitignore | 1 + .gitmodules | 3 +++ 3rdparty/decodepng | 1 + mod/hakchi/init | 4 ++-- mod/hakchi/rootfs/etc/hakchi.fb | Bin 11576 -> 0 bytes mod/hakchi/rootfs/etc/hakchi.png | Bin 0 -> 4620 bytes mod/hakchi/rootfs/etc/preinit.d/b0010_functions | 3 ++- mod/hakchi/rootfs/etc/preinit.d/p7010_bootlogo | 6 +----- 9 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 .gitattributes create mode 160000 3rdparty/decodepng delete mode 100644 mod/hakchi/rootfs/etc/hakchi.fb create mode 100644 mod/hakchi/rootfs/etc/hakchi.png diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c329ef6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eof=lf diff --git a/.gitignore b/.gitignore index 39a6f51..8cad04d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,6 @@ kernel*/ data/ dump/ mod/bin/ +mod/hakchi/rootfs/bin/decodepng mod/hakchi/transfer/ .DS_Store diff --git a/.gitmodules b/.gitmodules index 549fc82..dbef24e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "3rdparty/mkbootfs"] path = 3rdparty/mkbootfs url = https://github.com/osm0sis/mkbootfs/ +[submodule "3rdparty/decodepng"] + path = 3rdparty/decodepng + url = https://github.com/DanTheMan827/decodepng.git diff --git a/3rdparty/decodepng b/3rdparty/decodepng new file mode 160000 index 0000000..ac7f36a --- /dev/null +++ b/3rdparty/decodepng @@ -0,0 +1 @@ +Subproject commit ac7f36a559396b2acae2bec3302078ac49b9eb1a diff --git a/mod/hakchi/init b/mod/hakchi/init index f3c78de..50fc66a 100644 --- a/mod/hakchi/init +++ b/mod/hakchi/init @@ -10,7 +10,7 @@ init(){ /bin/busybox --install -s /bin/ mkdir -p "$temppath" for dir in etc lib usr; do - [ -e "/$1" ] || ln -s "$mountpoint/$1" "/$1" + [ -e "/$dir" ] || ln -s "$mountpoint/$dir" "/$dir" done export PATH="/sbin:$modpath/rootfs/bin:/bin:$mountpoint/sbin:/usr/sbin:$mountpoint/bin:/usr/bin" @@ -18,7 +18,7 @@ init(){ source "$modpath/script/base" if [ -d "$modpath/transfer" ]; then - cf_usb='n' + export cf_usb='n' source "$modpath/script/transfer" else mount_base diff --git a/mod/hakchi/rootfs/etc/hakchi.fb b/mod/hakchi/rootfs/etc/hakchi.fb deleted file mode 100644 index a261147..0000000 Binary files a/mod/hakchi/rootfs/etc/hakchi.fb and /dev/null differ diff --git a/mod/hakchi/rootfs/etc/hakchi.png b/mod/hakchi/rootfs/etc/hakchi.png new file mode 100644 index 0000000..f18bc87 Binary files /dev/null and b/mod/hakchi/rootfs/etc/hakchi.png differ diff --git a/mod/hakchi/rootfs/etc/preinit.d/b0010_functions b/mod/hakchi/rootfs/etc/preinit.d/b0010_functions index ea73c19..7ec9965 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/b0010_functions +++ b/mod/hakchi/rootfs/etc/preinit.d/b0010_functions @@ -335,7 +335,8 @@ showImage(){ [ -f "$image" ] || image="$rootfs$1" [ -f "$image" ] || image="$squashfs$1" [ -f "$image" ] || return 1 - xz -cd "$image" > "/dev/fb0" & + decodepng "$image" > "/dev/fb0" & + return 0 } hwmon(){ diff --git a/mod/hakchi/rootfs/etc/preinit.d/p7010_bootlogo b/mod/hakchi/rootfs/etc/preinit.d/p7010_bootlogo index 9beeade..75f57f6 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/p7010_bootlogo +++ b/mod/hakchi/rootfs/etc/preinit.d/p7010_bootlogo @@ -1,5 +1 @@ -if [ -f "$cfg_boot_logo" ]; then - showImage "$cfg_boot_logo" -else - showImage "$rootfs/etc/$modname.fb" -fi +showImage "$cfg_boot_logo" || showImage "$rootfs/etc/$modname.png" -- cgit v1.2.3