资源简介
在LINUX上,要把Systemback产生的sblive转换为iso,需要使用这个。下载后:
sudo make
sudo make install
/opt/schily/bin/mkisofs -iso-level 3 -r -V sblive -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c isolinux/boot.cat -o sblive.iso sblive
代码片段和文件信息
/* @(#)btcflash.c 1.18 17/07/15 2004-2017 J. Schilling */
#ifndef lint
static const char _sccsid[] =
“@(#)btcflash.c 1.18 17/07/15 2004-2017 J. Schilling“;
#endif
/*--------------------------------------------------------------------------*/
/*
* Firmware flash utility for BTC DRW1008 DVD+/-RW recorder
* Version 2004/04/29
* By David Huang
* This work is dedicated to the public domain
*
* This utility may also work with other BTC DVD recorders such as
* the DRW1004 and DRW1108 but they have not been tested.
*
* USE AT YOUR OWN RISK!
* btcflash is provided AS IS with NO WARRANTY either expressed or implied.
*
* Firmware files may be obtained by running BTC‘s Windows flash
* utility then searching in the WINDOWS\TEMP or WINNT\TEMP directory
* for a *.HEX file. It will probably be in a subdirectory named
* PAC*.tmp.DIR and the HEX file will be named Vnnnn.HEX where nnnn
* is the firmware version number. You‘ll also find IDEFLASH.EXE or
* BTCFLASH.EXE in the same directory.
*
* This utility will also accept firmware files in “.BIN“ format.
*/
#ifdef DO_INCLUDE
#include
#include
#include
#include
#endif
#define FLASHSIZE 0x100000 /* BTC flash is 1MB */
EXPORT unsigned char *loadfirmware __PR((const char *));
LOCAL int getbyte __PR((char **));
LOCAL unsigned short calcsum __PR((unsigned char *));
LOCAL int btcmain __PR((SCSI *scgp const char *fwfile));
EXPORT unsigned char *
loadfirmware(firmware)
const char * firmware;
{
FILE *f;
char line[80];
char *p;
unsigned char *fwbuf;
int bank;
int length;
int offset;
int type;
int hexsum;
int i;
int b;
fwbuf = malloc(FLASHSIZE);
if (!fwbuf) {
fprintf(stderr _(“Could not allocate memory for firmware\n“));
return (NULL);
}
f = fopen(firmware “r“);
if (!f) {
fprintf(stderr _(“%s: Unable to open: “) firmware);
perror(NULL);
free(fwbuf);
return (NULL);
}
/*
* Get length of file. If it‘s exactly FLASHSIZE assume it‘s a
* .bin file. Otherwise try to read it as a .hex file.
*/
fseek(f 0 SEEK_END);
if (ftell(f) == FLASHSIZE) {
rewind(f);
if (fread(fwbuf 1 FLASHSIZE f) != FLASHSIZE) {
fprintf(stderr _(“%s: Short read\n“) firmware);
fclose(f);
free(fwbuf);
return (NULL);
}
fclose(f);
return (fwbuf);
}
rewind(f);
memset(fwbuf 0xff FLASHSIZE);
bank = 0;
while (fgets(line sizeof (line) f)) {
if (line[0] != ‘:‘)
continue;
p = line + 1;
length = getbyte(&p);
offset = getbyte(&p) << 8 | getbyte(&p);
type = getbyte(&p);
if (length < 0 || offset < 0 || type < 0 ||
(type != 0 && length != 0)) {
errmsgno(EX_BAD _(“Malformed line: %.79s\n“) line);
fclose(f);
free(fwbuf);
return (NULL);
} else if (length == 0) {
if (strncmp(line “:00000155AA“ 11) == 0) {
if (++bank >= 16) {
errmsgno(EX_BAD
_(“Firmware file larger than 1MB\n“));
fclose(f);
相关资源
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- ubuntu9.10 可加载内核模块和字符设备驱
- MP3文件ID3v2ID3v2APEv2标签读取
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- linux 网络实验 ftp程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
- linux简易shell C实现
- linux实验报告及心得体会
- 基于GTK的Linux环境下的简易任务管理器
- linux扫雷游戏代码
- CAN Linux驱动代码
- Linux系统教材
- intel 82579LM 网卡驱动Linux系统版 v1.9.
- SA1110处理器掌上电脑液晶显示器设计
- 基于Linux的串口服务器设计
- Windows下访问LINUX的利器-SSH
评论
共有 条评论