X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=SETUP_DEV_ENV.pl;h=2c74c0ca7951091bbb6495c72253fc17de51d5b1;hp=ca3f0dccdf14f1f3ad2196b0298eb85c41d97ae9;hb=0121a4503305424096e2b5c5bd3b6c3af2d813e5;hpb=215bab8fd418e28fa454b784bb5c25b0d29544a6 diff --git a/SETUP_DEV_ENV.pl b/SETUP_DEV_ENV.pl index ca3f0dc..2c74c0c 100755 --- a/SETUP_DEV_ENV.pl +++ b/SETUP_DEV_ENV.pl @@ -2,9 +2,14 @@ -$location = `pwd`; -chomp $location; -$location .= "/devtools"; +$dev_root = `pwd`; +# +# On cygwin, do something like the following +# pwd behaves trangely on cygwin +# +#$dev_root='/home/pdinda/Codes/vmm-dev'; +chomp $dev_root; +$location = $dev_root . "/devtools"; print "\n"; @@ -14,8 +19,15 @@ print "Location: " . $location . "\n\n"; mkdir $location; -#install_nasm(); -install_gcc_3_4_6(); + +#install_binutils_2_16_91_i386(); +install_gcc_3_4_6_i386(); +install_nasm(); +# +# This part is not quite working yet +# on cygwin, do through it by hand +# +#install_dev86_0_16_17(); sub install_nasm { @@ -37,7 +49,7 @@ sub install_nasm { print "Installing..."; `make install`; print "Done!!\n\n"; - chdir $location; + chdir $dev_root; } @@ -50,20 +62,22 @@ sub install_binutils_2_16_91_i386 { print "done\n"; chdir "binutils-2.16.91.0.7"; print "Configuring..."; - `./configure --prefix=$location --target=i386-elf`; + `./configure --prefix=$location/i386 --target=i386-elf --disable-nls`; print "done\n"; print "Compiling..."; - `make`; + `make -j 4 all`; print "done\n"; print "Installing..."; `make install`; print "done!!\n"; - chdir $location; - + chdir $dev_root; } sub install_gcc_3_4_6_i386 { + install_binutils_2_16_91_i386(); + $ENV{'PATH'} = "$location/i386/bin:" . $ENV{'PATH'}; + print "Installing gcc v3.4.6\n"; chdir "./utils"; print "Unpacking..."; @@ -71,15 +85,15 @@ sub install_gcc_3_4_6_i386 { print "done\n"; chdir "gcc-3.4.6"; print "Configuring..."; - `./configure --prefix=$location`; + `./configure --prefix=$location/i386 --target=i386-elf --disable-nls --enable-languages=c,c++ --without-headers`; print "done\n"; print "Compiling..."; - `make`; + `make -j 4 all-gcc`; print "done\n"; print "Installing..."; - `make install`; + `make install-gcc`; print "done!!\n"; - chdir $location; + chdir $dev_root; } @@ -105,5 +119,23 @@ sub install_gcc_3_4_6_x86_64 { print "Installing...\n"; `make install-gcc`; print "done!!\n"; - chdir $location; + chdir $dev_root; +} + +sub install_dev86_0_16_17 { + + print "Installing bcc, ld86, as86, and bcc-cpp from Dev86src-0.16.17.tar.gz\n"; + chdir "./utils"; + print "Unpacking..."; + `tar -xzf Dev86src-0.16.17.tar.gz`; + print "done\n"; + chdir "./dev86-0.16.17"; + print "Compiling...\n"; + `make as86 ld86 bcc86`; + `make -C cpp`; + print "done\n"; + print "Installing...\n"; + `cp as/as86.exe bcc/bcc.exe bcc/bcc-cc1.exe cpp/bcc-cpp.exe ld/ld86.exe $location/bin`; + print "done!!\n"; + chdir $dev_root; }