Benamrouche Abdel email : draconux _at_ gmail _point_ com 2006/12/10 Note: ======== How to build linux 0.01 with newer gcc ? Note : I have not tested it in a real computer, because I d'ont have an empty HDD. I use qemu, and I will explain how to run linux 0.01 in qemu. If you want to try it in directly in your HDD, then do it at your own risk. Create your virtual HDD : ========================= please see this section in LINUX_0.01_GCC_1.40 documentation Linux 0.01 kernel : ===================== In the main Makefile : --------------------- You will find (echo -n "SYSSIZE = (";ls -l tools/system | grep system \ | cut -c25-31 | tr '\012' ' '; echo "+ 15 ) / 16") > tmp.s Well the cut -c25-31 is not beautifull : it's depend on your user name !!! here it's work if your username is 5 letters (as abdel or linus) if it's not 5 letters execute ls -l tools/system | grep system and see the value you need In include/linux/config.h and include/linux/hdreg.h kernel/hd.c : ------------------------------------------------------------------- update hdd parameters. (see LINUX_0.01_GCC_1.40 documentation for more info) Userland program: ================= Linux 0.01 don't want to load my a.out binay format builded with gcc 3.3. So for now I just use userland program compiled with gcc 1.40. (see LINUX_0.01_GCC_1.40 documentation if you want to build userland program) folowing command build a.out binary; but didn't work with linux 0.01 > gcc-2.95 -o empty_prog empty_prog.c ../../lib/lib.a -I../../include -nostdinc -nostdlib -Wall -e main -static -fwritable-strings > objcopy -O a.out-i386-linux -R .note -R .comment empty_prog empty_prog.bin Execute your kernel: ================= qemu -fda Image -hdb hdb.img -boot a -m 8 voila, that's all. happy hacking Abdel