You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
3.1 KiB
47 lines
3.1 KiB
3 years ago
|
��������:
|
||
|
|
||
|
1). ��ѹ��Ĭ�ϵ��ļ���λ������D:\Linux-0.11,�����㲻�ǽ��ļ���ѹ����Ŀ¼��,
|
||
|
��Ҫ��MinGW32Ŀ¼�µ�MinGW32.bat�ļ�,��������PATHָ��MinGW32��binĿ¼.
|
||
|
2). ����Linux-0.11Ŀ¼,˫��MinGW32.bat���ݷ�ʽ,����̨.
|
||
|
3). make һ��,����1.44M��Boot.img���̾���,Ҫ��������������"make clean"
|
||
|
4). ������װ��bochs,ֱ��˫��bochsrc.bxrc��������Linux-0.11��.
|
||
|
5). Ҳ������������������Boot.img������,��������Kernel panic,��������������Ӳ��ɾ��
|
||
|
6). �ڳ���Insert root floppy and press ENTER�����Ժ�,��rootimage-0.11.img������������,�س�
|
||
|
|
||
|
����������windows�����±�����Linux 0.11��,������Cygwin,Ҳ��������������,����ʹ��MinGW.
|
||
|
��������Windows�±���Linux 0.11�������������Ͷ�ԭ�ļ�������:
|
||
|
|
||
|
1.�Ծ���ʿ�Ѿ����������������õ�C����(����Ƕ��������C����)���»���ȥ����,��MinGW��gcc������Ϊ��������Windows�µı��������ּ���,������ʶ����Щ�����»��ߵ�C����,�������ð�ԭ���Ѿ��ڻ���������ȥ���»��ߵ�C���������»���,ͬʱҲҪ�ѱ�C�������õĻ��������еı��������»���.
|
||
|
|
||
|
2.MinGW�в���as86������,������bootĿ¼��ԭ����as86������bootsect.s��setup.s���������ij�����nasm�����ij���.���Ҹ���Ϊbootsect.asm��setup.asm.
|
||
|
|
||
|
3.��Makefile������Ҫ��:
|
||
|
��LDFLAGS���--image-base 0x0000 ��elf_i386�ij�i386pe
|
||
|
��cd �� make ֮����;�ij�&,��cd kernel ; make �ij�cd kernel & make
|
||
|
MinGW��û��sync��������,������ע�͵�,���İ취��дһ��sync.c,����sync.cֻ����һ���յ�main����,������sync.exe
|
||
|
��Ϊ���Ƶ�ԭ��,make dep������
|
||
|
|
||
|
4.���ɵ�system�ļ���PE��ʽ��(PE��Portable Executable�ļ���),����windows�µĿ�ִ���ļ��ĸ�ʽ,��Ȼ�Dz���ֱ��ִ�е�,��������ת��.��ʵ����ͨ�����ַ�ʽ����ת��.
|
||
|
1)дһ������Trans.cpp��system.exe���Ĵ��������ݴ�PE�ļ�����������,����һ��system.bin�ļ�,�����ļ����ܱ�setupģ��ֱ�Ӽ��ص�.���Ѿ�����������������Linux-0.11��toolsĿ¼��,Ҫ���ı���������.
|
||
|
2)�Լ�дһ��PE Loader,���ַ�ʽ�Ƚ��鷳,���������Լ�Ҳ����һ��PE Loader,�������гɾе�,��������һ������Loader.�����Ǽ���Linux-0.11-With-PE-Loader\bootĿ¼�µ�setup.asm�ļ���,��������ϸ��ע��.
|
||
|
|
||
|
|
||
|
5.��tools�µ�build.c������,ʹ�������ɿ�������1.44M�����̾����ļ�Boot.img
|
||
|
|
||
|
6.��Link�Ĺ�����,initĿ¼�µ�main.c���������´���:
|
||
|
boot/head.o(.text+0x540c):fake: undefined reference to `_main'
|
||
|
init/main.o(.text+0x16f):main.c: undefined reference to `_alloca'
|
||
|
init/main.o(.text+0x174):main.c: undefined reference to `__main'
|
||
|
make: *** [tools/system.exe] Error 1
|
||
|
��һ��������һ����������,���м��Ǹ������Ǿ�Ī��������,��ΪLinux 0.11����û����������,��gcc�ı���ѡ����Ҳ��-nostdinc .��һ��������main��������һ����ͨ�ĺ���,MinGW gcc�������������Ĵ���.�����İ취��ʵҲ�ܼ���,��main.c������main��������Ϊ_main,�����Ǹɴ������ij�����һ������,�ij�start��.�ǵð�head.s����_mainҲ����.
|
||
|
|
||
|
������,Ҫ��л���Լ�����д����ϵͳ����������Ԩ����ʵ��Ҳ���Ƚ�ԭ��ֻ����Linux�±���������Դ������MinGW��ֲ��Windows�±����Ĺ����в�������Windows�±���Linux 0.11Դ�����ģ�������Windows�±���Linux 0.11Դ�����ľ��飬��ֲ�߰汾��Դ���룬��0.12,0.95,0.96�ȵȰ汾Ӧ�ò�����̫�����鷳�ˡ�
|
||
|
ҲҪ��лLinux�ں���ȫע�͵������Ծ���ʿ�����������˲���ϵͳ������ϵͳ�����ߵľ���.
|
||
|
����,��Ҳ�dz����Ͳ���ϵͳ�������ǹ�ͬ�����ĵ�����,Ҳϣ���ܶ���ʶһЩ����.
|
||
|
�ҵ�����:flyfish
|
||
|
�ҵ�QQ:785606288
|
||
|
E-mail:I2CBus@126.com
|
||
|
����,Ҫת���뱣�ֱ��ļ���������,�����ر��˵��Ͷ���ʵ.
|
||
|
|
||
|
|