@metai
Many thanks.
Ha, I'm not really deep into that stuff and never thought of looking into the make file of the provide source code from Arcadian xD
I think I understood but somehow I don't get it to work. Googled a little bit around and found this site:
https://manned.org/lzma_alone.1
There I found the 'old lzma' parameters mentioned in the makefile.
Just for clarification I'll post the original command and the one where I think it should with xz-utils;
cat ./files/etc/lcd_boot_image/*.raw | $(STAGING_DIR_HOST)/bin/lzma e $(PKG_BUILD_DIR)/lcd_boot_image.lzma -si -a0
cat custom_boot_animation/*.raw | xz --format=lzma --lzma1=preset=0 - --stdout > lcd_boot_imgage.lzma
So the 'e' is for encoding which I assume just stands for compressing, the '-si' parameter tells lzma to take the data from stdin and the '-a0' parameter adjusts the compression-rate.
With xz-utils:
Buuuut, as expected this doesn't work. If I'm understand the makefile correctly the pictures won't get compressed individually rather than they get packed together in the 'lcd_boot_image.lmza' archive, correct?
Also I wonder why the heck the pictures from the source code have all the same size. The ones I converted from *.png to *.raw with ImageMagick use to have all different file sizes.
Here's the script I tried to create maybe you find the error if you like to check it:
#!/bin/bash
cat animation/*.raw | xz --format=lzma --lzma1=preset=9 - --stdout > lcd_boot_image.lzma
f_size=`du -k "lcd_boot_image.lzma" | cut -f1`
echo 'write first 16 bytes: identifier'
printf "%s" "lcd_boot_image" > lcd_boot_image
./pad2align.sh -n 16 lcd_boot_image >& /dev/null
echo 'write next 12 bytes: LZMA compressed image size'
printf "%lu" `ls -l lcd_boot_image.lzma | cut -d ' ' -f 5` >> lcd_boot_image
./pad2align.sh -n 28 lcd_boot_image >& /dev/null
echo 'write next 4 bytes: amount of files'
printf "%lu" `ls -1 animation/*.raw | wc -l` >> lcd_boot_image
./pad2align.sh -n 32 lcd_boot_image >& /dev/null
echo 'write next 16 bytes: original image size'
printf "%lu" `du -b -c animation/*.raw | awk '{ if ( $$$$2 == "total" ) print $$$$1 }'` >> lcd_boot_image
./pad2align.sh -n 48 lcd_boot_image >& /dev/null
echo 'write next 4 bytes: frame time slot, in msec '
echo "10" >> lcd_boot_image
./pad2align.sh -n 52 lcd_boot_image >& /dev/null
echo 'write next 108 bytes: bit vector format of display images, lsb'
echo "1111111111111111111111111111111111111111111111111111111111111101010101010101010110000000000" >> lcd_boot_image
./pad2align.sh -n 160 lcd_boot_image >& /dev/null
echo 'add lcd_boot_image.lzma'
cat lcd_boot_image.lzma >> lcd_boot_image
./pad2align.sh -n $f_size lcd_boot_image >& /dev/null
BTW; I wanted to try your lcd_boot_image on the LTE box I've laying around here but now I had recognize why I didn't continued the last time I was here because somehow I messed up the box¯\_(ツ)_/¯
(sry I forgot about that @QAuge, was not my intention to offer you 'junk'
)
Now somehow I'm not able to flash a image anymore but I'll try to recover it the next days.
(Last edited by somebodywhoisntme on 20 Nov 2017, 05:25)