sturgix / firmware-mod-kit

Automatically exported from code.google.com/p/firmware-mod-kit
0 stars 0 forks source link

not working on ppc hosts #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
make -C ./squashfs-3.0-lzma-damn-small-variant/
make[1]: Entering directory 
`/home/axet/source/firmware-mod-kit-read-only/src/squashfs-3.0-lzma-damn-small-v
ariant'
cc -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -funroll-loops -mtune=opteron 
-march=opteron -mfpmath=sse -m3dnow -msse2 -O3 -D_LZMA_PARAMS    -c -o 
mksquashfs.o mksquashfs.c
cc1: error: bad value (opteron) for -mtune
cc1: error: unrecognized command line option ‘-march=opteron’
cc1: error: unrecognized command line option ‘-mfpmath=sse’
cc1: error: unrecognized command line option ‘-m3dnow’
cc1: error: unrecognized command line option ‘-msse2’
make[1]: *** [mksquashfs.o] Error 1
make[1]: Leaving directory 
`/home/axet/source/firmware-mod-kit-read-only/src/squashfs-3.0-lzma-damn-small-v
ariant'
make: *** [all] Error 2
Build failed! Quitting...
axet@mini:~/source/firmware-mod-kit-read-only$ 

Original issue reported on code.google.com by kuznetsov.alexey on 2 Jul 2012 at 3:27

GoogleCodeExporter commented 8 years ago
I doubt it will until someone who cares about PPC works on it. Recommend simply 
using Linux in a Virtual Machine.

Original comment by jeremy.collake@gmail.com on 2 Jul 2012 at 3:43

GoogleCodeExporter commented 8 years ago
here is a problem: you should use configure instead prebuilded makefiles.

i just dropped x86 compatible flags. seems like they are only for optimal speed 
and nothing more. which is not important on ~32mb firmwares.

Index: 
src/squashfs-3.0-lzma-damn-small-variant/lzma/C/7zip/Compress/LZMA_Lib/makefile
===================================================================
--- 
src/squashfs-3.0-lzma-damn-small-variant/lzma/C/7zip/Compress/LZMA_Lib/makefile 
(revision 309)
+++ 
src/squashfs-3.0-lzma-damn-small-variant/lzma/C/7zip/Compress/LZMA_Lib/makefile 
(working copy)
@@ -1,5 +1,5 @@
 PROG = liblzma.a
-CXX = g++ -O3  -funroll-loops -mtune=opteron -march=opteron -mfpmath=sse 
-m3dnow -msse2 -mmmx -msse -msse3 -O3 -Wall -finline-functions
+CXX = g++ -O3  -funroll-loops -O3 -Wall -finline-functions
 AR = ar
 RM = rm -f
 CFLAGS = -c  -I ../../../
Index: src/squashfs-3.0-lzma-damn-small-variant/Makefile
===================================================================
--- src/squashfs-3.0-lzma-damn-small-variant/Makefile   (revision 309)
+++ src/squashfs-3.0-lzma-damn-small-variant/Makefile   (working copy)
@@ -1,7 +1,7 @@
 INCLUDEDIR = .
 LZMAPATH = ./lzma/C/7zip/Compress/LZMA_Lib

-CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-funroll-loops -mtune=opteron -march=opteron -mfpmath=sse -m3dnow -msse2 -O3 
-D_LZMA_PARAMS 
+CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-funroll-loops -O3 -D_LZMA_PARAMS 

 all: mksquashfs-lzma unsquashfs-lzma

Original comment by kuznetsov.alexey on 2 Jul 2012 at 5:57

GoogleCodeExporter commented 8 years ago
it builds, but unable to find any fs's inside. seems like big / little endians 
problem.

Original comment by kuznetsov.alexey on 2 Jul 2012 at 5:59

GoogleCodeExporter commented 8 years ago
If it's not finding any file systems then that sounds like a bug in binwalk 
which the FMK uses to identify file systems in firmware images, so you should 
probably report that issue on the binwalk google code page. 

However with that said, the squashfs utilities that we've included in the FMK 
are from their respective vendors who probably never intended for them to be 
used on non-intel machines. Jeremy and I have discussed this previously, and 
we've decided that it's easiest to only support the intel Linux platform. If 
you're running something else (like Mac PPC) you can try using bochs or Qemu to 
run Linux VMs, but we don't have plans to support additional platforms at this 
time.

Original comment by heffne...@gmail.com on 8 Jul 2012 at 11:42

GoogleCodeExporter commented 8 years ago
binwalk works fine. i'm reporing against firmware-mod-kit

Original comment by kuznetsov.alexey on 8 Jul 2012 at 2:17

GoogleCodeExporter commented 8 years ago
Then the file system should be found, since fmk uses binwalk to find the file 
system inside a firmware image. I suspect what you meant was that the file 
system wasn't properly extracted, which is likely an issue with the unsquashfs 
utility, which again, we don't currently support on PPC systems.

Original comment by heffne...@gmail.com on 8 Jul 2012 at 6:19