无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
楼主: teasiu
打印 上一主题 下一主题

[分享] fbinst编译for linux和windows--- 更新版本号1.7

  [复制链接]
跳转到指定楼层
1#
发表于 2013-9-22 10:44:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
突然醒悟,原来可以交叉编译的,
稍微修改了一下源码,
在slitaz4.0 系统下完成了2种的编译。

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

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


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

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


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

如果有提问,我会回答。

随便就贴出使用方法吧,
以下文字由./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
复制代码

评分

参与人数 3无忧币 +15 收起 理由
快雪时晴 + 5 很给力!
Mindfly + 5 造福论坛和坛友
clonecd + 5

查看全部评分

2#
 楼主| 发表于 2013-9-22 10:47:41 | 只看该作者
本帖最后由 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
回复

使用道具 举报

3#
 楼主| 发表于 2013-9-24 06:03:02 | 只看该作者
回答网友提问。
回复

使用道具 举报

4#
发表于 2013-9-24 08:03:33 | 只看该作者
虽然不懂linux,还是要支持一下。。
回复

使用道具 举报

5#
发表于 2013-9-24 08:11:59 | 只看该作者
fb_mbr_rel.h 中的版本号不能改,改后就就不直接用目前的grldr读取数据了。也与现有的fba不兼容

点评

有这样的事?  详情 回复 发表于 2013-9-24 10:03
回复

使用道具 举报

6#
 楼主| 发表于 2013-9-24 10:03:48 | 只看该作者
jack95 发表于 2013-9-24 08:11
fb_mbr_rel.h 中的版本号不能改,改后就就不直接用目前的grldr读取数据了。也与现有的fba不兼容

有这样的事?
回复

使用道具 举报

7#
发表于 2013-9-24 10:30:36 | 只看该作者
不错。。。。支持神雕 啊。。。
回复

使用道具 举报

8#
发表于 2013-9-25 01:03:32 来自手机 | 只看该作者
支持神雕大侠,好帖子不能沉默了。
回复

使用道具 举报

9#
发表于 2013-9-25 23:02:36 | 只看该作者
这是一款经典软件工具,希望像楼主这样的大侠们不断改进完善!
回复

使用道具 举报

10#
发表于 2013-9-26 09:54:56 | 只看该作者
支持神雕大侠~
回复

使用道具 举报

11#
发表于 2013-9-26 19:19:33 | 只看该作者
支持楼主
回复

使用道具 举报

12#
发表于 2014-1-1 11:58:18 | 只看该作者
可以在Windows下编译码?
回复

使用道具 举报

13#
发表于 2014-1-1 12:39:55 | 只看该作者
很牛啊。希望有实质的更新,大家都来用一下。
回复

使用道具 举报

14#
发表于 2014-1-1 20:02:43 | 只看该作者
下载玩一玩,多谢楼主
回复

使用道具 举报

15#
发表于 2014-1-2 18:49:12 | 只看该作者
感谢你的分享
回复

使用道具 举报

16#
发表于 2014-1-3 09:41:42 | 只看该作者
linux下玩玩,谢谢分享@teasiu
回复

使用道具 举报

17#
发表于 2014-1-4 10:04:05 | 只看该作者
有个问题想要请教神雕大侠有没有在linux下测试fbinst所有的命令是否都可行。

点评

我没有测试,但是,从代码和编译结果来看,是可行的。  详情 回复 发表于 2014-1-7 07:32
回复

使用道具 举报

18#
 楼主| 发表于 2014-1-7 07:32:16 | 只看该作者
bolodhzs 发表于 2014-1-4 10:04
有个问题想要请教神雕大侠有没有在linux下测试fbinst所有的命令是否都可行。

我没有测试,但是,从代码和编译结果来看,是可行的。

点评

我发现都没几个人真正用fbinst直接做启动盘的,这方面仅仅只有命令,而没有教程,我自己测试了下,命令大多不好使,估计是我还是不熟,希望不仅仅是工具出来,还需要教程方法更加有用@teasiu  详情 回复 发表于 2014-1-7 14:21
回复

使用道具 举报

19#
发表于 2014-1-7 10:38:50 | 只看该作者
http://bbs.wuyou.net/forum.php?m ... 244&pid=2883262
不知道这个版本修复了这里提到的bug吗。
另外,参数说明是否可以改为中文的?
回复

使用道具 举报

20#
发表于 2014-1-7 14:21:29 | 只看该作者
teasiu 发表于 2014-1-7 07:32
我没有测试,但是,从代码和编译结果来看,是可行的。

我发现都没几个人真正用fbinst直接做启动盘的,这方面仅仅只有命令,而没有教程,我自己测试了下,命令大多不好使,估计是我还是不熟,希望不仅仅是工具出来,还需要教程方法更加有用@teasiu
回复

使用道具 举报

21#
发表于 2014-1-7 16:13:36 | 只看该作者
大师,能不能说一下怎么编译fbinst,我想重新编译fbinst
回复

使用道具 举报

22#
发表于 2014-1-8 22:03:27 | 只看该作者
大师,可以把你修改的编译脚本发给我一份吗?
我的邮箱:gsool@163.com
回复

使用道具 举报

23#
发表于 2014-1-24 16:37:28 | 只看该作者
看看学习....
回复

使用道具 举报

24#
发表于 2014-1-26 15:26:37 | 只看该作者

支持神雕大侠~
回复

使用道具 举报

25#
发表于 2014-4-14 16:31:09 | 只看该作者
windows下的版本体积好大。而且运行出错。提示“fbinst: error: version number not match”
回复

使用道具 举报

26#
发表于 2014-8-24 20:14:04 | 只看该作者
楼上大侠好。
现在有一个新问题,困惑大家。
就是新版fbinstool已经取消对ansi格式的fba支持。
但是fbinst命令行却只支持ansi格式的fba手工写入。
请问大侠能不能改进fbinst,使它写和uft-8的fba不乱码。
回复

使用道具 举报

27#
发表于 2017-4-5 10:42:27 | 只看该作者
你好,能提供一下可以编译的代码吗?我找到的代码编译各种错误,谢谢
回复

使用道具 举报

28#
发表于 2020-7-29 18:48:44 | 只看该作者
大佬 fbinst的源码去哪儿下载?
回复

使用道具 举报

29#
发表于 2021-7-21 10:52:07 | 只看该作者
大佬 fbinst在哪儿能下载,找了论坛都是fbinstTool没有fbinst和源码啊
回复

使用道具 举报

30#
发表于 2023-3-15 09:55:53 来自手机 | 只看该作者
谢谢
回复

使用道具 举报

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

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-20 17:38

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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