Author: sparky
Date: Fri Sep  8 19:04:31 2006
New Revision: 7737

Added:
   ppcrcd/trunk/peg2.txt
Modified:
   ppcrcd/trunk/Makefile
Log:
- added forth script for nicer booting on Pegasos 2


Modified: ppcrcd/trunk/Makefile
==============================================================================
--- ppcrcd/trunk/Makefile       (original)
+++ ppcrcd/trunk/Makefile       Fri Sep  8 19:04:31 2006
@@ -1,7 +1,8 @@
 
 #         @_VERSION_@
-VERSION = BeforeIllGo
+VERSION = NewOne
 VER13  = $(shell echo '"$(VERSION)"           ' | cut -c 1-13 )
+VER13s = $(shell echo "'$(VERSION)'           " | cut -c 1-13 )
 DATE   = $(shell date -I -u)
 
 SU = sudo
@@ -73,12 +74,13 @@
                -output $@                      \
                $(cdroot)
                
-$(cdroot):     $(ppcrcd_sqf) $(boot) bootinfo.txt
+$(cdroot):     $(ppcrcd_sqf) $(boot) bootinfo.txt peg2.txt
        rm -rf [EMAIL PROTECTED],.work}
        mkdir -p [EMAIL PROTECTED]/ppc
        ln -s ../images/ppcrcd.sqf [EMAIL PROTECTED]
        ln -s ../boot [EMAIL PROTECTED]
        ln -s $(PWD)/bootinfo.txt [EMAIL PROTECTED]/ppc
+       sed -e "s/'@_VERSION_@'/$(VER13s)/g" peg2.txt > [EMAIL PROTECTED]/peg2
        mv -f [EMAIL PROTECTED],}
 
 $(ppcrcd_sqf): $(root_stripped) $(touch)/stop-services $(POST_) 
$(touch)/pld-release

Added: ppcrcd/trunk/peg2.txt
==============================================================================
--- (empty file)
+++ ppcrcd/trunk/peg2.txt       Fri Sep  8 19:04:31 2006
@@ -0,0 +1,106 @@
+\ Script for booting PPCRCD on Pegasos II,
+\ based on script generated by BootCreator 1.1
+\
+\ terminal control stuff
+\
+: TTY.CSI d# 27 EMIT ASCII [ EMIT ;
+: TTY.HOME    TTY.CSI ASCII H EMIT ;
+: TTY.CLR_EOS TTY.CSI ASCII J EMIT ;
+: TTY.HOME_CLR TTY.HOME TTY.CLR_EOS ;
+\
+\ blue chars on white
+\
+1 to foreground-color
+f to background-color
+\
+\ boot menu stuff
+\
+: my-max-boot-num 3 ;
+: my-boot-default 1 ;
+: my-boot-delay d# 1000 ; \ unit = 100 ms
+: my-print-menu ( -- )
+  TTY.HOME_CLR
+  ."                                                    ÜÜŰŰŰÜ" cr
+  ."     ŰŰŰŰŰŰŰ  ŰŰ       ŰŰŰŰŰŰ                     ÜŰß   ŰŰÝ" cr
+  ."     ŰŰŰŰŰŰŰŰ ŰŰ       ŰŰŰŰŰŰŰ                   ÜŰß    ÜŰ" cr
+  ."    ŰŰ °°°Ű۰ŰŰ °°    ŰŰ °°°Ű۰                 ÜŰß    ÜŰ" cr
+  ."    ŰŰ °°°Ű۰ŰŰ °°    ŰŰ °°°Ű۰°              ÜŰß     ÜŰ" cr
+  ."   ŰŰŰŰŰŰŰŰ ŰŰ °°    ŰŰ °° ŰŰ °°             ŰŰ      Űß" cr
+  ."   ŰŰŰŰŰŰŰ  ŰŰ °°    ŰŰ °° ŰŰ °°           ÜŰß     ÜŰß" cr
+  ."  ŰŰ °°°°°°ŰŰ °°    ŰŰ °° ŰŰ °°           ÜŰß     ÜŰß" cr
+  ."  ŰŰ °°°°°°ŰŰ °°    ŰŰ °° ŰŰ °°          ÜŰ      Űß" cr
+  ." ŰŰ °°    ŰŰŰŰŰŰŰŰ ŰŰŰŰŰŰŰ  °°          Űß      ÜŰ   ÜŰ" cr
+  ." ŰŰ °°    ŰŰŰŰŰŰŰŰ ŰŰŰŰŰŰ   °°          ß      ÜŰß  ßŰŰŰÜ" cr
+  ."   °°       °°°°°°°° °°°°°°°                 ÜŰŰ      ßŰŰŰÜ" cr
+  ."   °°       °°°°°°°° °°°°°°                  ŰŰ         ßŰŰŰ" cr
+  ."                                             ŰŰ          ßŰŰŰ" cr
+  ."  Welcome to PPCRCD, version '@_VERSION_@'  ŢŰŰ           ßŰŰŰ" cr
+  ."   PLD Linux Distribution based RescueCD     ŰŰÜ           ßŰŰÜ" cr
+  ."    with some Pegasos II support             ßŰŰŰÜ          ßŰŰ" cr
+  ."                                              ßŰŰŰÜ        ŰÜßŰÝ" cr
+  ."     maintaner: [EMAIL PROTECTED]           ßŰŰŰŰÜÜ     ßŰÜßŰ" cr
+  ."     weg page: http://ppcrcd.pld-linux.org          ŢŰ      ŰŰŢŰÜ" cr
+  ."                                                     ŢŰ     ŢŰÝŰß" cr
+  ."                                                      ŰÝ     ŰÝŰŰ" cr
+  ."   defined images:                                    ŰÝ     ŰŰŰÝ" cr
+  ."                                                      ŰÝ     ŢŰŰ" cr
+  ."     1: fromcd - do not load to memory                ŰÝ      ŰŰ" cr
+  ."     2: tomempost - first boot kernel and then        ŰÝ      ßŰ" cr
+  ."                    copy image to memory              ŰÝ       ß" cr
+  ."     3: memtest - minimal boot (all read-only)        ŰÝ" cr
+  ."                  to allow check almost all memory    ŰÝ" cr
+  ."                                                      ŰÝ" cr
+  ."                                                      ŰŰ" cr
+;
+: my-boot-case ( num -- )
+  ."  " cr
+  case
+    1 of " cd boot/vmlinuz root=/dev/ram0 init=/linuxrc" endof
+    2 of " cd boot/vmlinuz root=/dev/ram0 init=/linuxrc tomempost" endof
+    3 of " cd boot/vmlinuz root=/dev/ram0 init=/linuxrc memtest" endof
+  endcase
+  $boot
+;
+: my-input-num ( wait-period max-boot-num default-num -- boot-num )
+  1 \ loop-inc = 1
+  3 pick 0 do
+    0d emit
+    ." press 1-"
+    ( wait-period max-boot-num default-num loop-inc )
+    2 pick ascii 0 + emit
+    dup 1 = if
+      ."  within "
+      3 pick i - d# 10 / .d
+      ."  seconds"
+    then
+    ."  (default: "
+    over ascii 0 + emit
+    ." ) :                   "
+    d# 100 ms
+    key? if
+       key
+       ( wait-period max-boot-num default-num loop-inc key )
+       dup 0d = if \ return pressed
+         drop leave
+       then
+
+       ascii 0 -
+       ( wait-period max-boot-num default-num loop-inc num )
+       dup 1 5 pick
+       ( wait-period max-boot-num default-num loop-inc num num 1 max-boot-num )
+       between if
+         rot drop swap leave
+       then
+
+       ( wait-period max-boot-num default-num loop-inc num )
+       TTY.HOME_CLR abort ( -- )
+    then
+  dup +loop
+  drop
+  ( wait-period max-boot-num boot-num )
+  nip nip
+;
+
+my-print-menu
+my-boot-delay my-max-boot-num my-boot-default my-input-num
+my-boot-case
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to