wok-6.x rev 18758
syslinux: compress kbd file
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Dec 29 10:21:19 2015 +0100 (2015-12-29) |
parents | ef4ed701a27f |
children | d94dea3c101e |
files | syslinux/receipt syslinux/stuff/extra/loadhigh.u syslinux/stuff/extra/md5sum.c |
line diff
1.1 --- a/syslinux/receipt Tue Dec 29 08:59:31 2015 +0100 1.2 +++ b/syslinux/receipt Tue Dec 29 10:21:19 2015 +0100 1.3 @@ -123,6 +123,8 @@ 1.4 echo "$msg" 1.5 done 1.6 ( cd $src/kbd; cat ../kbd.l | cpio -o -H newc ) >$fs/boot/isolinux/kbd 1.7 + lzma e $fs/boot/isolinux/kbd $fs/boot/isolinux/kbd.lzma 1.8 + mv -f $fs/boot/isolinux/kbd.lzma $fs/boot/isolinux/kbd 1.9 chown root.root $fs/boot/isolinux/* 1.10 } 1.11
2.1 --- a/syslinux/stuff/extra/loadhigh.u Tue Dec 29 08:59:31 2015 +0100 2.2 +++ b/syslinux/stuff/extra/loadhigh.u Tue Dec 29 10:21:19 2015 +0100 2.3 @@ -44,7 +44,7 @@ 2.4 + break; 2.5 + case 0x2204: 2.6 + case 0x2102: 2.7 -+ buf = unlz4(unpacked, buf); 2.8 ++ buf = unlz4((unsigned char *) unpacked, (unsigned char *) buf); 2.9 + break; 2.10 + } 2.11 +#endif 2.12 @@ -529,7 +529,7 @@ 2.13 + if (magic) { 2.14 + if (magic > 0) 2.15 + for (end_chunk = p + magic; p < end_chunk;) { 2.16 -+ char *dico; 2.17 ++ unsigned char *dico; 2.18 + unsigned char token = *p++; 2.19 + 2.20 + n = lz4cnt(&p, token >> 4);
3.1 --- a/syslinux/stuff/extra/md5sum.c Tue Dec 29 08:59:31 2015 +0100 3.2 +++ b/syslinux/stuff/extra/md5sum.c Tue Dec 29 10:21:19 2015 +0100 3.3 @@ -573,6 +573,7 @@ 3.4 syslinux_setadv(slot++, strlen(*argv), *argv); 3.5 } 3.6 3.7 +#include "../../core/unlzma.c" 3.8 static int main_kbdmap(int argc, char *argv[]) 3.9 { 3.10 const struct syslinux_keyboard_map *const kmap = syslinux_keyboard_map(); 3.11 @@ -592,8 +593,18 @@ 3.12 3.13 msg = "Load error"; 3.14 if (kmap->version != 1 || 3.15 - loadfile(argv[1], (void **) &kbdmap, &map_size) || 3.16 - strncmp(kbdmap, "07070", 5)) 3.17 + loadfile(argv[1], (void **) &kbdmap, &map_size)) 3.18 + goto kbdmap_error; 3.19 + if (* (short *) kbdmap == 0x005D) { 3.20 + void *p = malloc(map_size = * (long *) (kbdmap + 5)); 3.21 + void *heap = malloc(2*(1846 + (768 << (3 + 0))) + 16); 3.22 + 3.23 + unlzma(kbdmap, p, heap); 3.24 + free(heap); 3.25 + free(kbdmap); 3.26 + kbdmap = p; 3.27 + } 3.28 + if (strncmp(kbdmap, "07070", 5)) 3.29 goto kbdmap_error; 3.30 3.31 // search for mapfile in cpio archive