注意:使用cdrtools3.00(2.6版本的内核如果使用cdrtools2.xx会有问题的),我的硬件平台sigma SMP8655,内核linux-2.6.22.29
# 1、注释掉文件libfind/libfind.mk、libfind/shlfind.mk及libfind/libfind_p.mk的CPPOPTS += -DUSE_ACL
# 2、注释掉readcd/Makefile、librscg/librscg.mk及libscg/libscg.mk等文件的CPPOPTS += -DUSE_PG,使用sg驱动
# 3、增加cc-smp86xx.rul
# 4、修改RULES/mipsel-linux-gcc.rul文件
# include $(SRCROOT)/$(RULESDIR)/cc-gcc.rul
# 改成
# include $(SRCROOT)/$(RULESDIR)/cc-smp86xx.rul
# 5、注释掉rules.inc以下让语句,不自动产生align.h和avoffset.h两个头文件
# $(PTARGET): $(OINCSDIR) $(PTARGETC)
# @echo " ==> GENERATING include file /"$@/""; $(PTARGETC) > $@
# 因为交叉编译产生的align_test和avoffset无法在PC平台上运行,会生成的两个头文件是空的,会导致编译cdrecord的库及程序出错
# 6、先执行make COPTX=-EL LDOPTX=-EL K_ARCH=mipsel M_ARCH=24kf P_ARCH=mips32r2 C_ARCH=gcc O_ARCH=linux ARCH=mipsel CCOM=gcc BUILD=i386-linux HOST=mipsel-linux CONFFLAGS="--build=i386-linux --host=mipsel-linux --target=mips32" $1
# 会产生align_test和avoffset(但编译其他会错误),然后把align_test和avoffset放到目标平台去运行,将产生的头文件拷贝到/incs/mipsel-linux-gcc下
# align_test>align.h
# avoffset>avoffset.h
# 再修改incs/mipsel-linux-gcc/rules.cnf文件
# LIB_ACL= #-lacl # Full (test/set) ACL users like star
# LIB_ACL_TEST= #-lacl # Test only ACL users like libfind
# 7、最后按以下命令行进行重新make,可以编译完成
make COPTX=-EL LDOPTX=-EL K_ARCH=mipsel M_ARCH=24kf P_ARCH=mips32r2 C_ARCH=gcc O_ARCH=linux ARCH=mipsel CCOM=gcc BUILD=i386-linux HOST=mipsel-linux CONFFLAGS="--build=i386-linux --host=mipsel-linux --target=mips32" clean
make COPTX=-EL LDOPTX=-EL K_ARCH=mipsel M_ARCH=24kf P_ARCH=mips32r2 C_ARCH=gcc O_ARCH=linux ARCH=mipsel CCOM=gcc BUILD=i386-linux HOST=mipsel-linux CONFFLAGS="--build=i386-linux --host=mipsel-linux --target=mips32"