allow the installer to install many arches. warning, testing is ongoing. Reference: /n/atom/patch/applied/installmarch Date: Fri Apr 4 01:20:49 CES 2014 Signed-off-by: quanstro@quanstro.net --- /sys/lib/dist/amd64/install/copydistf Fri Apr 4 01:20:24 2014 +++ /sys/lib/dist/amd64/install/copydistf Fri Apr 4 01:20:24 2014 @@ -153,10 +153,13 @@ setvconf $arenas(1) venti/fmtindex $arenas(1) venti/venti -c $arenas(1) - vconf=$arenas(1) + venti=$arenas(1) } + +# needs to be made an ini variable (see main) if not - vconf=$vaddr + venti=$vaddr 9fat: -echo 'venti='^$vaddr>>/n/9fat/plan9.ini # yee ha. +echo 'venti='^$vconf>>/n/9fat/plan9.ini # yee ha. + copydistfossil --- /sys/lib/dist/amd64/install/domkall Fri Apr 4 01:20:24 2014 +++ /sys/lib/dist/amd64/install/domkall Fri Apr 4 01:20:25 2014 @@ -1,6 +1,6 @@ #!/bin/rc rfork en -archlist=amd64 +#archlist=amd64 bind /$objtype/bin /n/bin bind -a /rc/bin /n/bin @@ -11,4 +11,5 @@ bind /n/inst/$i /$i cd /sys/src -mk install && mk clean +for(i in $archlist) + mk install && mk clean --- /sys/lib/dist/amd64/install/main Fri Apr 4 01:20:25 2014 +++ /sys/lib/dist/amd64/install/main Fri Apr 4 01:20:25 2014 @@ -3,6 +3,7 @@ fn init { archlist = (386 68000 68020 alpha amd64 arm mips power power64 sparc sparc64) + archlist = (amd64 arm 386) nl=' ' yns=(yes no skip) @@ -30,12 +31,17 @@ vgasize user ) - + + kernel = /amd64/9termd + amd64kernel=/amd64/9termd + 386kernel=/386/9paed + kname=() + console='0 b115200' ipaddr=() ipmask=() gwaddr=() - bootfile=9termd + bootfile=() bootargs=() monitor=vesa vgasize=1024x768x16 @@ -104,8 +110,10 @@ # verify this is a valid option while(~ $match 0){ getcmd0 $x - if(~ $#cmd 0) + if(~ $#cmd 0){ cmd = $default + match = 1; + } for(i in $$2){ if(~ $i $cmd){ match = 1; @@ -128,20 +136,22 @@ fn pickfstype { fses = (kfs fossil+venti) - fspartskfs = fs - fspartsfossil = fs - fspartsfossil+venti = (isect arenas bloom fossil) pick 'filesys to install' fses $fses(1); fstype=$cmd - eval 'fsparts=$' ^ fsparts$fstype switch($fstype){ case kfs d=`{echo $disk | sed 's!/dev/sd!!g'} bootargs='local!#S/' ^ $d ^ '/fs -B 10000' + fsparts = fs + case fossil + fsparts = fs + d=`{echo $disk | sed 's!/dev/sd!!g'} + bootargs='local!#S/' ^ $d ^ /fs case fossil+venti echo warning: experimental ymmv >[1=2] d=`{echo $disk | sed 's!/dev/sd!!g'} bootargs='local!#S/' ^ $d ^ /fs + fsparts = (isect arenas bloom fossil) } } @@ -183,15 +193,29 @@ }} fn pickuser { - echo - echo -n pick a username for yourself ': ' + echo -n pick a username for yourself ^ ': ' getcmd user = $cmd } dhcpskip = (ipaddr ipmask gwaddr) fn buildini { - { + bootfile=$bootfile { + if(! ~ $#bootfile 1){ + echo '[menu]' + for(i in `{seq 1 $#bootfile}) + echo option$i^'='$kname(i) + echo 'default='^$kname(1) + + for(i in `{seq 1 $#bootfile}){ + echo + echo '[' ^ $kname(i) ^ ']' + echo 'bootfile=' ^ $bootfile(i) + } + + bootfile=() + } + for(i in $inivars){ if(~ $ethermethod current dhcp none && ~ $i $dhcpskip) echo '#' $i ^ '=' ^ $"$i ' #' ethermethod $ethermethod @@ -297,9 +321,32 @@ echo } -fn pickarches { - # skip this step for now -} +fn pickarches {def=amd64 list=$archlist a=() tmp=() tk=() { + kernel=() + while(){ + pick 'arches to install' list $def + if(~ $cmd quit) + break + a = ($a $cmd) + eval tk '=' '$' ^ $cmd ^ kernel + if(! ~ $#tk 0){ + kernel = ($kernel $tk) + kname = ($kname $cmd) + bootfile = ($bootfile `{basename $kernel}) + } + tmp = $list + list=() + for(i in $tmp) + ~ $i $cmd || list=($list $i) + if(~ $#list 0) + break + def=quit + } + if(~ $#kernel 0) + kernel=$amd64kernel + archlist = $list + log archlist $archlist +}} fn copydist { switch($fstype){ @@ -317,15 +364,15 @@ pickvga ipconfig pickuser +pickarches buildini pickdisk pickfstype makepartitions -copydist -pickarches -pick 'build full set of amd64 executables?' yns yes +copydist +pick 'build full set of ' ^ $arches ^ ' executables?' yns yes ~ $cmd yes && domkall pick 'halt system?' yns --- /sys/lib/dist/amd64/install/partition Fri Apr 4 01:20:25 2014 +++ /sys/lib/dist/amd64/install/partition Fri Apr 4 01:20:25 2014 @@ -3,7 +3,6 @@ loader=/386/iplfat pbs=/386/iplpbs mbr=/386/iplmbr -kernel=/amd64/9termd fn fail{ if(! ~ $#* 0)