LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1813|回复: 4

按照附件中的说明,LZMA patch for squashfs,尝试编译内核时出错,信息出下

[复制链接]
发表于 2007-4-24 05:31:50 | 显示全部楼层 |阅读模式
按照附件txt文档中的步骤在ubuntu下LZMA patch for squashfs,make时出现如下信息,求高手解答

root@satfan-desktop:/Lzma# rm -rf squashfs3.2-r2/kernel-patches/linux-2.6.20/
root@satfan-desktop:/Lzma# ln -s linux-2.6.20/ squashfs3.2-r2/kernel-patches/linux-2.6.20
root@satfan-desktop:/Lzma# make
make -C /lib/modules/2.6.20-15-generic/build M=/Lzma/squashfs3.2-r2/kernel-patches/linux-2.6.20/fs/squashfs C=0 V=0 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
mkdir: `/Lzma/squashfs3.2-r2/kernel-patches/linux-2.6.20/fs/squashfs/.tmp_versions': Too many levels of symbolic links
make[1]: *** [crmodverdir] Error 1
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
make: *** [all_sq] Error 2
root@satfan-desktop:/Lzma#

另外我手上有几个script/tool,在linux pc上运行不起来,烦请各位大大抽空看看,出错信息如下:
./undreamboxfs cnDB_DM500_Alpha.img ./temp
9472+1 records in
9472+1 records out
4850064 bytes (4.9 MB) copied, 0.111335 seconds, 43.6 MB/s
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Could not mount Squashfs filesystem! Are you sure you're running a dream 1.06+ kernel?

dmesg出错信息:
loop: loaded (max 8 devices)
squashfs: version 3.1 (2006/08/19) Phillip Lougher
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [4d91ed:1c14]
SQUASHFS error: Unable to read inode [4d91ed:1c14]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2007-4-24 05:39:43 | 显示全部楼层
运行./mkdreamboxfs:
./mkdreamboxfs ./gemini test.img
./mkdreamboxfs: line 54: ./mkcramfs: cannot execute binary file
ls: tmp_mkdreambox_2: No such file or directory
./mkdreamboxfs: line 58: 1179648 -  : syntax error: operand expected (error token is " ")

dmesg出错信息:
loop: loaded (max 8 devices)
squashfs: version 3.1 (2006/08/19) Phillip Lougher
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [4d91ed:1c14]
SQUASHFS error: Unable to read inode [4d91ed:1c14]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [49e31c:ce0]
SQUASHFS error: Unable to read inode [49e31c:ce0]
SQUASHFS: Mounting a different endian SQUASHFS filesystem on loop0
SQUASHFS error: zlib_fs returned unexpected result 0xfffffffd
SQUASHFS error: Unable to read cache block [3f39a0:1a56]
SQUASHFS error: Unable to read inode [3f39a0:1a56]
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-24 05:41:02 | 显示全部楼层
mkdreamboxfs
-----------------------------------------

#!/bin/sh

TEMP_WORK_DIR=tmp_mkdreambox_1
TEMP_WORK_FILE1=tmp_mkdreambox_2
TEMP_WORK_FILE2=tmp_mkdreambox_3
TEMP_WORK_FILE3=tmp_mkdreambox_4

## some tool checks
TOOL_MKCRAMFS="${0%mkdreamboxfs*}mkcramfs"
if [ ! -x "$TOOL_MKCRAMFS" ]; then
  echo "Need the mkcramfs tool in same dir as mkdreamboxfs"
  echo "See original package"
  exit 0
fi
TOOL_MKSQUASHFS="${0%mkdreamboxfs*}mksquashfs"
if [ ! -x "$TOOL_MKSQUASHFS" ]; then
  echo "Need the mksquashfs tool in same dir as mkdreamboxfs"
  echo "See original package"
  exit 0
fi

if [ ! -e "/dev/zero" ]; then
  echo "Need the /dev/zero device"
  exit 0
fi

##check command line
if [ "$1" = "" -o "$2" = "" ]; then
  echo "Simple mkdreamboxfs script/tool for PPC/DB"
  echo "http://t-hydron.verkoyen.be"
        echo ""
  echo "Usage:"
  echo "mkdreamboxfs inputdir out.img"
  echo "Example:"
  echo "mkdreamboxfs my_dir cool.img"
  exit 0
fi

if [ ! -e "$1" ]; then
  echo "Input directory does not exist!"
  exit 0
fi

if [ -e "$2" ]; then
  echo "Output image already exists!"
  exit 0
fi

## first make the cramfs file part
rm -rf $TEMP_WORK_DIR
mkdir $TEMP_WORK_DIR
cp -a $1/root $TEMP_WORK_DIR/
rm -f $TEMP_WORK_FILE1
$TOOL_MKCRAMFS -bb $TEMP_WORK_DIR $TEMP_WORK_FILE1

ls -lsa $TEMP_WORK_FILE1 > $TEMP_WORK_FILE3
read DUMMY1 DUMMY2 DUMMY3 DUMMY4 DUMMY5 SIZE DUMMYREST < $TEMP_WORK_FILE3
THEREST=$(( 1179648 - $SIZE ))
THEREST_CHECK=$(( (1179648 - $SIZE) < 0 ))

if [ "$THEREST_CHECK" = "1" ]; then
  rm -rf $TEMP_WORK_DIR
  rm -f $TEMP_WORK_FILE1
  rm -f $TEMP_WORK_FILE3
  echo "CRAMFS image part too big!"
  exit 0
fi

rm -f $TEMP_WORK_FILE3
dd if=/dev/zero of=$TEMP_WORK_FILE3 bs=1 count=$THEREST

## now make the squashfs file part
rm -rf $TEMP_WORK_DIR
cp -a $1 $TEMP_WORK_DIR
rm -rf $TEMP_WORK_DIR/root
rm -f $TEMP_WORK_FILE2
echo "Ready to make the squashFS part! This can take 1 or 2 minutes!"
$TOOL_MKSQUASHFS $TEMP_WORK_DIR $TEMP_WORK_FILE2 -be

## now bring them together!
cat $TEMP_WORK_FILE1 $TEMP_WORK_FILE3 $TEMP_WORK_FILE2 > $2

## clean
rm -rf $TEMP_WORK_DIR
rm -f $TEMP_WORK_FILE1
rm -f $TEMP_WORK_FILE2
rm -f $TEMP_WORK_FILE3

ls -lsa $2 > $TEMP_WORK_FILE3
read DUMMY1 DUMMY2 DUMMY3 DUMMY4 DUMMY5 SIZE DUMMYREST < $TEMP_WORK_FILE3
SIZE_CHECK=$(( $SIZE > 6291456 ))

if [ "$SIZE_CHECK" = "1" ]; then
  rm -f $TEMP_WORK_FILE3
  rm -f $2
  echo "SQUASHFS image part too big (total image-size would be: $SIZE bytes)!"
  exit 0
fi

rm -f $TEMP_WORK_FILE3

echo "Done!"
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-24 05:41:52 | 显示全部楼层
undreamboxfs
----------------------------------------------------------------------------------------------------
TEMP_WORK_DIR=tmp_sqsh_work_dir
TEMP_WORK_FILE1=tmp_sqsh_work_file1

## some tool checks
if [ ! -x "uncramfs" ]; then
  echo "Need the uncramfs tool in local dir"
  echo "See original package"
  exit 0
fi

##check command line
if [ "$1" = "" -o "$2" = "" ]; then
  echo "Simple undreamboxfs script/tool for PPC/DB"
  echo "http://t-hydron.verkoyen.be"
        echo ""
  echo "Usage:"
  echo "undreamboxfs dreambox.img outputdir"
  echo "Example:"
  echo "undreamboxfs rel106.img output"
  exit 0
fi

if [ -e "$2" ]; then
  echo "Output dir already exists!"
  exit 0
fi

#offset is always 0x00120000 (see MTD partition 5)
OFFSET1=1179648

## get the squashed fs
BLOCKSIZE=512
BOFFSET=$(($OFFSET1 / $BLOCKSIZE))
BLOCKS=$((8000000 / $BLOCKSIZE))
dd if=$1 of=$TEMP_WORK_FILE1 bs=$BLOCKSIZE count=$BLOCKS skip=$BOFFSET

#mount the squashfs file on loop device
mkdir $TEMP_WORK_DIR
mount -t squashfs -o loop $TEMP_WORK_FILE1 $TEMP_WORK_DIR
CHECK=`mount | grep $TEMP_WORK_DIR`

if [ "$CHECK" = "" ]; then
  rm -rf $TEMP_WORK_FILE1
  rm -rf $TEMP_WORK_DIR
  echo "Could not mount Squashfs filesystem! Are you sure you're running a dream 1.06+ kernel?"
  exit 0
fi

rm -rf $2
cp -a $TEMP_WORK_DIR $2
umount $TEMP_WORK_DIR

rm -rf $TEMP_WORK_DIR
rm -rf $TEMP_WORK_FILE1
./uncramfs $TEMP_WORK_DIR $1 > /dev/null
cp -a $TEMP_WORK_DIR/* $2

##cleanup
rm -rf $TEMP_WORK_DIR
rm -rf $TEMP_WORK_FILE1

echo "Done!"
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-24 05:49:38 | 显示全部楼层
script中调用mkcramfs、mksquashfs、uncramfs,我自己查阅了一些资料,应该是要内核加入squashfs + lzma支持(img文件是squashfs + lzma),现在的问题是根本不能重编内核,郁闷啊~~~各位老大路过好心教教小弟,万分感谢!!!!

img文件下载地址:http://www.xxwxj.com/mygod/Nabilo.img
undreamboxfs、mkdreamboxfs运行有操作提示
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表