无忧启动论坛

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

[20100626正式版]SRS_F6 公用性SRS驱动的F6模块—XP/2003安装及PE 1.x的SRS驱动不愁缺

[复制链接]
1#
发表于 2009-10-3 00:35:46 | 显示全部楼层
我之前就有这个想法,不过比较懒反正现在的用着还可以,所以一直都没有去实现,呵呵.

就等楼主的成果了,如果在目前的0PE或MICROPE的基础上DIY应该是比较容易的,因为自动检测机制已经有了,只需要再生成一个TXTSETUP.OEM然后把驱动文件复制到B:就搞定了.
回复

使用道具 举报

2#
发表于 2010-1-4 21:18:22 | 显示全部楼层
新版的GRUB4DOS可以编写一个外部命令。

因为CHKPCI是汇编写的,应该很容易转成GRUB4DOS的外部命令。

至于返回,我想应该只需要通过sprintf函数,把返回的内容写入到内存某个地方就OK了吧。。。

不过我不懂汇编,呵呵。
回复

使用道具 举报

3#
发表于 2010-1-4 21:32:25 | 显示全部楼层
原帖由 netwinxp 于 2010-1-4 21:21 发表
约定一个存放检测到的信息的内存地址,我把检测的信息返回给你,然后你再在grub中做进一步处理,不知意下如何?
关键是要约定好调用和返回的标准,比如你把信息地址放到某几个寄存器中然后CALL我的子程序,我把 ...


嘿嘿,半路出家,没完全看懂。
目前GRUB4DOS可以存放自定义信息的范围
0x40000-0x50000

比如简单一点直接把信息放在0x40000开头位置或未尾。
回复

使用道具 举报

4#
发表于 2010-1-4 21:45:50 | 显示全部楼层
我再附上一点资料,grub4dos的readme中的。
******************************************************************************
***                          Running User Programs                         ***
******************************************************************************

From 0.4.5 on, user programs can be developed for running under grub4dos. The
executable program file must end with the 8-byte grub4dos EXEC signature:

                0x05, 0x18, 0x05, 0x03, 0xBA, 0xA7, 0xBA, 0xBC

The executable must have no relocations, and the entry point is at the very
beginning of the file, just like a DOS .com file(but the grub4dos executable
is 32-bit).

Here is a sample file echo.c:

/*================ begin echo.c ================*/

/*
* compile:                       

gcc -nostdlib -fno-zero-initialized-in-bss -fno-function-cse -fno-jump-tables -Wl,-N -fPIE echo.c

* disassemble:                        objdump -d a.out
* confirm no relocation:        readelf -r a.out
* generate executable:                objcopy -O binary a.out b.out
*
* and then the resultant b.out will be grub4dos executable.
*/

/*
* This is a simple ECHO command, running under grub4dos.
*/

int i = 0x66666666;        /* this is needed, see the following comment. */

/* gcc treat the following as data only if a global initialization like the
* above line occurs.
*/

/* a valid executable file for grub4dos must end with these 8 bytes */
asm(".long 0x03051805");
asm(".long 0xBCBAA7BA");
/* thank goodness gcc will place the above 8 bytes at the end of the b.out
* file. Do not insert any other asm lines here.
*/

int
main()
{
        void *p = &main;

        return
        /* the following line is calling the grub_sprintf function. */
        ((int (*)(char *, const char *, ...))((*(int **)0x8300)[0]))
        /* the following line includes arguments passed to grub_sprintf. */
                (0, p - (*(int *)(p - 8)));
}

/*================  end  echo.c ================*/

0x8300 is a pointer to the grub4dos system funtions(API). The system_functions
variable is defined in asm.S.
回复

使用道具 举报

5#
发表于 2010-1-4 23:46:13 | 显示全部楼层
@不点
现在已经24XKB了,我也是认为如非必要,能够使用编写外部命令实现的就用外部命令。

还得再进一步学习,没系统学习过编程,只是根据兴趣爱好,有兴趣就学点。呵呵。

目前很多C语言的知识我还是一知半解的,^_^.嘿嘿。
回复

使用道具 举报

6#
发表于 2010-2-1 19:47:15 | 显示全部楼层
因为这个菜单没有启动命令所以不能选择.
你可以在菜单最后面加一个boot或kernel或chainloader等命令,建议使用boot,呵呵
反正这一行执行不到.

因为菜单结尾默认命令就是boot,如果没有加boot命令的,执行时也会自动加上的.

[ 本帖最后由 chenall 于 2010-2-1 19:51 编辑 ]
回复

使用道具 举报

7#
发表于 2010-3-6 21:20:20 | 显示全部楼层
原帖由 zhhsh 于 2010-2-27 21:54 发表
我刚才测试得到一个不好的结果,ramdisk启动必须要ISO文件跟winnt.sif在同一个分区,怎么解决好?


记得论坛有一篇贴子介绍指定位置的。。。忘了在哪了。

应该可以通过ARC路径表示的.
multi(X)disk(Y)rdisk(Z)partition(W)\这样的形式使用的。

http://support.microsoft.com/kb/102873/zh-cn


这样只要使用GRUB4DOS找到ISO文件所在分区,并计算出x,y,z,w再修改WINNT.sif文件就搞定了。
回复

使用道具 举报

8#
发表于 2010-4-20 01:39:14 | 显示全部楼层
@agedwolf
建议使用英文版配合unifont来显示中文。
或中文版用内置的FONTFILE显示中文,都不会乱码。(如果用英文版配合外置的FONTFILE则菜单框会乱码)

@不点
其实并没有改进,还是图形界面。
不过由于使用了UNICODE编码这些文字不在这个范围内,所以用它的ASCII码显示。

UNIFONT只是替换了默认的图形界面显示的关键函数(也就是HACK了内置的一些函数)
回复

使用道具 举报

9#
发表于 2010-4-23 01:34:08 | 显示全部楼层
下载测试了一下,发现大部份的菜单都有find --set-root语句。

这样子很容易启动到其它地方的文件。

建议先测试一下当前root下是否有这个文件,如果没有再进行查找操作。

这样可以加快加载的速度。

甚至可以直接进行map操作失败了再查找因为新的GRUB4DOS支持多个&& ||连接使用。
回复

使用道具 举报

10#
发表于 2010-4-25 15:11:41 | 显示全部楼层
很明显的是GRUB4DOS版本不对,
必须替换里面的GRLDR才可以。。。
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2024-5-16 04:18

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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