无忧启动论坛

标题: fbinst编译for linux和windows--- 更新版本号1.7 [打印本页]

作者: teasiu    时间: 2013-9-22 10:44
标题: fbinst编译for linux和windows--- 更新版本号1.7
突然醒悟,原来可以交叉编译的,
稍微修改了一下源码,
在slitaz4.0 系统下完成了2种的编译。

得出的编译结果测试了,完全一致。

没有做什么功能修改,只是将版本号提升为1.7


附件包含了2个文档,
linux下的fbinst
windows下的fbinst.exe

fbinst.zip (158.04 KB, 下载次数: 524)


大家有需要研究的下载使用吧。

如果有提问,我会回答。

随便就贴出使用方法吧,
以下文字由./fbinst --help > 1.txt 产生。
  1. Usage:
  2.         fbinst [OPTIONS] DEVICE_OR_FILE COMMANDS [PARAMETERS]

  3. Global Options:
  4.   --help,-h                Display this message and exit
  5.   --version,-V                Print version information and exit
  6.   --list,-l                List all disks in system and exit
  7.   --verbose,-v                Print verbose messages
  8.   --debug,-d                Use the debug version of mbr

  9. Commands:
  10.   format                Format disk
  11.     --raw,-r                Format with normal layout (not bootable)
  12.     --force,-f                Force the creation of data partition
  13.     --zip,-z                Format as USB-ZIP
  14.     --fat16                Format data partition as FAT16
  15.     --fat32                Format data partition as FAT32
  16.     --align,-a                Align to cluster boundary
  17.     --nalign,-n NUM                NAND alignment
  18.     --unit-size,-u NUM        Unit size for FAT16/FAT32 in sectors
  19.     --base,-b NUM        Set base boot sector
  20.     --size,-s NUM        Set size of data partition
  21.     --primary,-p NUM        Set primary data size
  22.     --extended,-e NUM        Set extended data size
  23.     --list-size,-l NUM        Set size of file list
  24.     --max-sectors NUM        Set maximum number of sectors per read
  25.     --chs                Force chs mode
  26.     --archive FILE        Initialize fb using archive file
  27.   restore                Try to restore fb mbr
  28.   update                Update boot code
  29.   sync                        Synchronize disk information
  30.     --copy-bpb                Copy bpb from the first partition
  31.     --reset-bpb                Reset bpb to inital state
  32.     --clear-bpb                Clear bpb
  33.     --max-sectors NUM        Set maximum number of sectors per read
  34.     --chs                Force chs mode
  35.     --zip,-z                Format as USB-ZIP
  36.   info                        Show disk information
  37.   clear                        Clear files
  38.   add NAME [FILE]        Add/update file item
  39.     --extended,-e        Store the file in extended data area
  40.     --syslinux,-s        Patch syslinux boot file
  41.   add-menu NAME FILE        Add/update menu file
  42.     --append,-a                Append to existing menu file
  43.     --string,-s                The menu items are passed as command argument
  44.   resize NAME SIZE        Resize/create file item
  45.     --extended,-e        Store the file in extended data area
  46.     --fill,-f NUM        Set fill character for expansion
  47.   copy OLD NEW                Copy file item
  48.   move OLD NEW                Move file item
  49.   export NAME [FILE]        Export file item
  50.   remove NAME                Remove file item
  51.   cat NAME                Show the content of text file
  52.   cat-menu NAME                Show the content of menu file
  53.   pack                        Pack free space
  54.   check                        Check primary data area for inconsistency
  55.   save FILE                Save to archive file
  56.     --list-size,-l NUM        Set size of file list
  57.   load FILE                Load from archive file
  58.   create                Create archive file
  59.     --primary,-p NUM        Set primary data size
  60.     --extended,-e NUM        Set extended data size
  61.     --list-size,-l NUM        Set size of file list
复制代码

作者: teasiu    时间: 2013-9-22 10:47
本帖最后由 teasiu 于 2013-9-24 06:07 编辑

万分无聊,自己做了1个脚本,然后输入./mk,回答y和n就搞定了2种编译。
下面是输出的编译结果信息:
tux@slitaz:~/Documents$ ./mk
要制作windows的exe程序还是linux的程序,按y是windows: y
rm -f fbinst.exe   fb.mbr version.h fb_mbr.h *.o *.d  # Cleanup
perl ./ver2h.pl version version.h
i586-pc-mingw32-gcc -nostdlib -I. -I./ -Wl,-N -Wl,-T -Wl,./ldscript -o fb.exe fbmbr.S
i586-pc-mingw32-objcopy -O binary fb.exe fb_rel.mbr
rm fb.exe
perl ./bin2h.pl fb_rel.mbr fb_mbr_rel.h fb_mbr_rel
i586-pc-mingw32-gcc -nostdlib -I. -I./ -DDEBUG -DDEBUG_INT13 -Wl,-N -Wl,-T -Wl,./ldscript -o fb.exe fbmbr.S
i586-pc-mingw32-objcopy -O binary fb.exe fb_dbg.mbr
rm fb.exe
perl ./bin2h.pl fb_dbg.mbr fb_mbr_dbg.h fb_mbr_dbg
i586-pc-mingw32-gcc -I./ -I. -Wall -DWIN32 -c -MMD -o fbinst.o fbinst.c
i586-pc-mingw32-gcc -I./ -I. -Wall -DWIN32 -c -MMD -o xdio.o xdio.c
i586-pc-mingw32-gcc -I./ -I. -Wall -DWIN32 -c -MMD -o keytab.o keytab.c
i586-pc-mingw32-gcc -I./ -I. -Wall -DWIN32 -ofbinst.exe fbinst.o xdio.o keytab.o
tux@slitaz:~/Documents$ ./mk
要制作windows的exe程序还是linux的程序,按y是windows: n
rm -f fbinst   fb.mbr version.h fb_mbr.h *.o *.d  # Cleanup
perl ./ver2h.pl version version.h
gcc -nostdlib -I. -I./ -Wl,-N -Wl,-T -Wl,./ldscript -o fb fbmbr.S
objcopy -O binary fb fb_rel.mbr
rm fb
perl ./bin2h.pl fb_rel.mbr fb_mbr_rel.h fb_mbr_rel
gcc -nostdlib -I. -I./ -DDEBUG -DDEBUG_INT13 -Wl,-N -Wl,-T -Wl,./ldscript -o fb fbmbr.S
objcopy -O binary fb fb_dbg.mbr
rm fb
perl ./bin2h.pl fb_dbg.mbr fb_mbr_dbg.h fb_mbr_dbg
gcc -I./ -I. -Wall -DLINUX -c -MMD -o fbinst.o fbinst.c
gcc -I./ -I. -Wall -DLINUX -c -MMD -o xdio.o xdio.c
gcc -I./ -I. -Wall -DLINUX -c -MMD -o keytab.o keytab.c
gcc -I./ -I. -Wall -DLINUX -ofbinst fbinst.o xdio.o keytab.o

作者: teasiu    时间: 2013-9-24 06:03
回答网友提问。
作者: 612731    时间: 2013-9-24 08:03
虽然不懂linux,还是要支持一下。。
作者: jack95    时间: 2013-9-24 08:11
fb_mbr_rel.h 中的版本号不能改,改后就就不直接用目前的grldr读取数据了。也与现有的fba不兼容
作者: teasiu    时间: 2013-9-24 10:03
jack95 发表于 2013-9-24 08:11
fb_mbr_rel.h 中的版本号不能改,改后就就不直接用目前的grldr读取数据了。也与现有的fba不兼容

有这样的事?
作者: devilma    时间: 2013-9-24 10:30
不错。。。。支持神雕 啊。。。
作者: shan    时间: 2013-9-25 01:03
支持神雕大侠,好帖子不能沉默了。
作者: 2012morningstar    时间: 2013-9-25 23:02
这是一款经典软件工具,希望像楼主这样的大侠们不断改进完善!
作者: cheong0hk    时间: 2013-9-26 09:54
支持神雕大侠~
作者: singel    时间: 2013-9-26 19:19
支持楼主
作者: gsool    时间: 2014-1-1 11:58
可以在Windows下编译码?

作者: zds1210    时间: 2014-1-1 12:39
很牛啊。希望有实质的更新,大家都来用一下。
作者: singel    时间: 2014-1-1 20:02
下载玩一玩,多谢楼主
作者: Mindfly    时间: 2014-1-2 18:49
感谢你的分享
作者: bolodhzs    时间: 2014-1-3 09:41
linux下玩玩,谢谢分享@teasiu
作者: bolodhzs    时间: 2014-1-4 10:04
有个问题想要请教神雕大侠有没有在linux下测试fbinst所有的命令是否都可行。
作者: teasiu    时间: 2014-1-7 07:32
bolodhzs 发表于 2014-1-4 10:04
有个问题想要请教神雕大侠有没有在linux下测试fbinst所有的命令是否都可行。

我没有测试,但是,从代码和编译结果来看,是可行的。
作者: freesoft00    时间: 2014-1-7 10:38
http://bbs.wuyou.net/forum.php?m ... 244&pid=2883262
不知道这个版本修复了这里提到的bug吗。
另外,参数说明是否可以改为中文的?
作者: bolodhzs    时间: 2014-1-7 14:21
teasiu 发表于 2014-1-7 07:32
我没有测试,但是,从代码和编译结果来看,是可行的。

我发现都没几个人真正用fbinst直接做启动盘的,这方面仅仅只有命令,而没有教程,我自己测试了下,命令大多不好使,估计是我还是不熟,希望不仅仅是工具出来,还需要教程方法更加有用@teasiu
作者: gsool    时间: 2014-1-7 16:13
大师,能不能说一下怎么编译fbinst,我想重新编译fbinst
作者: gsool    时间: 2014-1-8 22:03
大师,可以把你修改的编译脚本发给我一份吗?
我的邮箱:gsool@163.com
作者: ×Κānɡ〇?    时间: 2014-1-24 16:37
看看学习....
作者: fhs1323    时间: 2014-1-26 15:26

支持神雕大侠~
作者: 阿弥陀佛    时间: 2014-4-14 16:31
windows下的版本体积好大。而且运行出错。提示“fbinst: error: version number not match”
作者: zds1210    时间: 2014-8-24 20:14
楼上大侠好。
现在有一个新问题,困惑大家。
就是新版fbinstool已经取消对ansi格式的fba支持。
但是fbinst命令行却只支持ansi格式的fba手工写入。
请问大侠能不能改进fbinst,使它写和uft-8的fba不乱码。
作者: JackPaul    时间: 2017-4-5 10:42
你好,能提供一下可以编译的代码吗?我找到的代码编译各种错误,谢谢
作者: boy6585948    时间: 2020-7-29 18:48
大佬 fbinst的源码去哪儿下载?
作者: 201287zr    时间: 2021-7-21 10:52
大佬 fbinst在哪儿能下载,找了论坛都是fbinstTool没有fbinst和源码啊
作者: id_user    时间: 2023-3-15 09:55
谢谢




欢迎光临 无忧启动论坛 (http://bbs.c3.wuyou.net/) Powered by Discuz! X3.3