Operating Systems
RedBoot commands notes
0Editing Commands:
- ^A moves the cursor (insertion point) to the beginning of the line.
- ^K erases all characters on the line from the cursor to the end.
- ^P replaces the current line by a previous line from the history buffer.
- ^N replaces the current line by the next line from the history buffer.
RedBoot Commands:
1. ctrl-c to stop normal boot and enter RedBoot.2. net commands>ip/ip_address : show current net config.
>ip_address -l local_ip -h host_ip -d dns_ip : set net config.
3. some simple commands>version; >reset ; >ping
4. Download programs (from net, serial, disk..)>load [-m tftp|http|disk|xmodem|ymodem] [-h host_ip] [-b mem_addr] [-r -v] filename
-r -v options mean display a small spinner and the file is raw data.
RedBoot>load –r –v –b 0×1020000 –h 10.0.59.2 Redboot_ram.bin //default is tftp
RedBoot>go 0×1020000
-b mem_addr is in ram. Formatted data streams will have an implied load address which this option may override.
RedBoot> load /redboot.ROM -m HTTP -h 192.168.1.104
Address offset = 0x0c400000
Entry point: 0×80000000, address range: 0×80000000-0x8000fe80
RedBoot> load -mode disk hda1:hello.elf
Entry point: 0×00020000, address range: 0×00020000-0x0002fd70
5. file manager
fis list : list current files in Flash.
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0×50000000 0×50000000 0×00040000 0×03000000
RedBoot config 0×50FC0000 0×50FC0000 0×00001000 0×00000000
FIS directory 0×50FE0000 0×50FE0000 0×00020000 0×00000000
zImage 0×50040000 0×03000000 0×000C0000 0×03000000
ramdisk 0×50100000 0×00800000 0×00800000 0×00300000
fis load [-b load address] [-c ] [-d ] [name]: load an existing image file into ram.
-b ram_addr : If not specified, the address associated with the image in the FIS directory will be used.
-d: Decompress gzipped image while copying it from flash to RAM.
fis create {-b data address} {-l length} [-f flash address] [-e entry] [-r relocation address] [-s data length] [-n ] [name]
: create an flash image file from a file already in ram.
-b -l -f : necessary options. Write a length of data into flash as an image file. Normally used after “load” command.
RedBoot>load –r –v –b 0×3000000 –h 10.0.59.2 Redboot_rom.bin
RedBoot>load –r –v –m ymodem –b 0×3000000
RedBoot>fis create RedBoot –b 0×03000000 –f 0×50000000 –l 0×40000
-e entry: entry address of the image file. Default to last loaded file entry.
-s data length: actual length of file. Default to last loaded file size.
-r reloc addr: addr in ram which the image file should be relocated. Default to the load address of last loaded file.
fis delete {name} : Delete a image file in flash.
fis write {-b mem_address} {-l length} {-f flash_address}: write a length of ram data into flash.
fis erase {-f flash_address} {-l length} : erase a length of data in flash.
fis lock|unlock {-f flash_address} {-l length} : protect/unprotect a lengh of flash.
RedBoot> fis unlock RedBoot[RAM]
fis init [-f] : initialize the Flash Image System (FIS). It should normally only be executed once, when RedBoot is first installed on the hardware. If the reserved images or their sizes in the FIS change, due to a different configuration of RedBoot being used, it may be necessary to issue the command again though.6. options config command fcon|fconfig -l [-f | -n]— list all current options. (saved in flash, config section.)
-f : list the full name of options.
-n : list the nickname of options.
fconfig nickname value— change the value of an option.
fconfig— change the default bootscript.
7. Running a image file.go [-w timeout] [-c] [-n] [ start_address] — Execute a program. (-c: cache on. -n: network stopped. )
exec [-w timeout] [-r ramdisk_address] [-s ramdisk_length] [-b load_address {-l load_length} ] [-c kernel_command_line] [ entry_point] — Execute a Linux kernel.
-x: Boot kernel with endianess opposite of RedBoot endianess.
RedBoot> exec -b 0×100000 -l 0×80000 -c “noinitrd root=/dev/mtdblock3 console=ttySA0″
8. Memory commands.
dump {-b location} [-l length] [-1 | -2 | -4] — Display memory.
mcopy {-s source} {-d destination} {-l length} [-1 | -2 | -4] — Copy memory
mfill {-b location} {-l length} {-p value} [-1 | -2 | -4] — Fill RAM with a specified pattern
technorati tags:redboot
Default WebServer path for Mac OS X
0nice to know – the path per default is
/Library/WebServer/Documents
Confixx logfile – with automated directory creation – pipelog.pl
0[perl]
#!/usr/bin/perl
###### Confixx-Apache-PipeLog
## zum Loggen der Webzugriffe pro User
########## erstellt am Sun Sep 26 22:13:28 2004 ###
$logDir = “/var/log/apache2/sites/confixx/domains”;
$stdLog = “/var/log/apache2/sites/confixx/stdlog_access”;
while( ){
($domain, $log) = split(/:#?:/, $_, 2);
$domain = lc($domain);
$userLogDir = “$logDir/$domain”;
if(! -d $userLogDir){
`mkdir $userLogDir`;
}
$logfile = “$userLogDir/access.log”;
if(! -f $logfile){
`touch $logfile`;
}
$worked = 0;
if(-f $logfile){
$target = readlink($logfile);
unless(-l $target){
if(open(LOG, “>>$logfile”)){
print LOG $log;
close(LOG);
$worked=1;
}
}
}
unless($worked){
open(LOG, “>>$stdLog”) or next;
print LOG “$domain :: $log”;
close(LOG);
}
}
[/perl]
technorati tags:confixx
UNIX: debian backports
0Using backports.org is very simple:
1. Add this line
deb http://www.backports.org/debian sarge-backports main contrib non-free
to your /etc/apt/sources.list.
2. All backports are deactivated by default. You have to set a higher priority for each backport. For mutt, you add these lines:
Package: mutt
Pin: release a=sarge-backports
Pin-Priority: 999
to your /etc/apt/preferences (if you haven’t use pinning before, the file has to be created).
3. Then run apt-get update and apt-get install mutt as usual.
Another way is to skip the entry in /etc/apt/preferences and to use apt-get -t sarge-backports install mutt which is easier when the package requires additional backports.
Mac OS X: Network browsing not possible (only showing three folders)
0Thats the network folder if it gots mixed up:
$ ls -lo / | grep Network
drwxr-xr-x 5 root wheel – 170 12 Sep 2003 Network
$ ls -lo /Network
total 0
drwxr-xr-x 2 root wheel – 68 12 Sep 2003 Applications
drwxr-xr-x 2 root wheel – 68 12 Sep 2003 Library
drwxr-xr-x 2 root wheel – 68 12 Sep 2003 Users
As a solution for the problem start the Terminal.app and type this command:
$ sudo rm -rf /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
Now reboot the system and you should be done.
Check afterwards your Network folder:
$ ls -lo /Network