资源简介
在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);
相关资源
- LINUX设备驱动程序开发pdf+源码
- ptp介绍和在linux上测试.docx
- STM32——ucLinux
- 《The Linux Command Line中文版》 PDF电子书
- LINUX 技术手册 第五版
- 基于Linux的设备分配及磁盘调度
- Kali Linux无线渗透工具集教程WiFi篇v4
- nasm-2.13.03.tar.gz安装包
- uclinux+傻瓜教程uclinux+傻瓜教程
- 《鸟哥的Linux私房菜-基础篇》第四版
- CDlinux-0.9.6.1-SSE-0429
- 鸟哥的linux私房菜 第四版 高清完整版
- linux 内核定时器 编程
- 鸟哥的Linux私房菜和
- Linux就该这么学完整版PDF
- 基于Linux系统的航班信息与订票系统
- linux、win版mycat、配置
- Linux内核设计与实现_第三版_中文版
- N显卡显存测试mats367.38.1-支持GTX1080以
- typora_0.9.69_amd64.deb
- splunk-7.2.3-linux-x86_64.tar
- Linux 设备驱动开发详解(第2版).pd
- eclipse linux32安装包
- CentOS6/7下gcc离线安装包,解决内网/内
- Linux内核源码剖析—TCP/IP实现 下册折
- D2RQ win和linux都有
- 鸟哥的linux私房菜合集高清完整PDF版
- jdk-8u171-linux-x64.zip
- 基于嵌入式系统的远程家电控制系统
- Understand-3.1.670-Linux-64bit.tgz2 part22-2
评论
共有 条评论