Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
In Socialtext Unplugged, the selected pages of your Socialtext workspace are displayed as individual "tiddlers" on the page. When the mouse passes over a tiddler a short toolbar menu appears at the top right. Use the commands here to manipulate that particular tiddler: notably closing and editting it. (You can double click on a tiddler as a shortcut to directly enter edit mode).
Over on the right hand side of the window are commands that affect the entire page, in particular "close all" which can be useful to clear the decks when many tiddlers are open at once.
The user is encouraged to ensure that they can SaveChanges before embarking on widespread editing.
Welcome to Socialtext Unplugged. This is a specially designed web page that you can use to view and edit your Socialtext content without having to be online to your Socialtext server.
There are three steps to using Socialtext Unplugged:
* First, learn how to SaveChanges to your local hard drive. This keeps your work safe even if you close your browser or have to reboot your computer
* Secondly, find out how to BrowseAndEdit your content while it is unplugged
* Thirdly, when you can reconnect to your Socialtext server, you can SyncChanges to save your unplugged changes to the server so that other people can see them too
You should also check your system meets the SystemRequirements.
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
<div class="socialtextLogo"><img src="http://www.eu.socialtext.net/static/2.3.0.0/images/st/logo/socialtext-logo-152x26.gif" width=152 height=26></div>
</div>
<!--}}}-->
Socialtext Unplugged lets you browse and edit your content while you're offline. When you make a change you need to SaveChanges to save the change to your local hard drive, before later performing a SyncChanges to synchronise the change back to the server.
The procedure for SaveChanges is slightly different for different browsers:
* SavingOnInternetExplorer
* SavingOnFireFox
* SavingOnSafari
* SavingOnOpera
You can save changes with any version of FireFox, and also many other browsers in the FireFox family, such as Camino on the Mac and MiniMo on mobile devices. The procedure is:
# Click the button labelled 'save changes' over in the right hand sidebar
# If prompted with an "Internet Security" dialog as follows, click the checkbox labelled "Remember this decision" and then the "Allow" button
## "A script from "file://" is requesting enhanced capabilities that are UNSAFE and could be used to compromise your machine or data..."
# You should then see a message at the top right of the window saying "Main TiddlyWiki file saved"
If you accidentally //deny// permission instead, you may need to UnravelFireFoxPermissions.
You can save changes with Internet Explorer versions 6 and 7, but not the earlier versions. The procedure is:
# Click the button labelled 'save changes' over in the right hand sidebar
# If prompted as follows, click "Yes":
## "An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?"
# You should then see a message at the top right of the window saying "Main TiddlyWiki file saved"
Note that there is currently [[a bug|http://trac.tiddlywiki.org/tiddlywiki/ticket/39]] that prevents Internet Explorer from saving correctly if you have specified a backup directory in AdvancedOptions.
To SaveChanges on Opera, see the instructions for using the TiddlySaver Java applet.
To SaveChanges on Safari, see the instructions for using the TiddlySaver Java applet.
<<search>><<closeAll>><<permaview>><<newTiddler 'New Tiddler' fields:'server.host:"https://saturn.ffzg.hr%2C%20saturn.ffzg.hr:443" server.workspace:"rot13" wikiformat:socialtext'>><<newJournal 'DD MMM YYYY' fields:'server.host:"https://saturn.ffzg.hr%2C%20saturn.ffzg.hr:443" server.workspace:"rot13" wikiformat:socialtext'>><<saveChanges>><<backstage sync>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
Dobrica Pavlinušić's random unstructured stuff
https://saturn.ffzg.hr/rot13/
[[SocialtextScreenStyle]]
[[SocialtextStyleOverrides]]
[[Styles HorizontalMainMenu]]
@@The user interface for synchronization is not finalized@@
To synchronize your changes back to the Socialtext server:
# click on [[Sync]] in the right-hand sidebar
<<tabs txtMoreTab Orphans 'Orphaned tiddlers' TabMoreOrphans Shadowed 'Shadowed tiddlers' TabMoreShadowed>>
Under FireFox, you can run into problems if you accidentally click 'Deny' on the permission request dialog, and have selected //Remember this decision//.
To reverse the effects, first locate the file {{{prefs.js}}} in your FireFox profile directory. Under Windows you'll find it at something like {{{C:\Documents and Settings\Jeremy\Application Data\Mozilla\Firefox\Profiles\o3dhupu6.default\prefs.js}}}, where {{{Jeremy}}} is the name of your windows profile and {{{o3dhupu6}}} will be a similar string of gobbledegook. On the Mac it'll be at {{{~/Library/Application Support/Firefox/Profiles/o3dhupu6.default/prefs.js}}} and on most versions of Linux, at {{{~/.mozilla/firefox/o3dhupu6.default/prefs.js}}}.
Open the file in a text editor and find the line {{{user_pref("capability.principal.codebase.p0.denied", "UniversalXPConnect");}}} and simply replace the word {{{denied}}} with {{{granted}}}.
//(Thanks to JonScully for figuring out this fix)//
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler references > fields syncing jump'></div>
<div class='workspace' id='st-page-wiki-title' macro='view socialtext.workspace'></div>
<div class='title' id='st-page-titletext' macro='view title'></div>
<div class='subtitle'>
Created on <span macro='view created date [[MMM DD, 0hh:0mm]]'></span>.
Updated by <span macro='view modifier link'></span>
on <span macro='view modified date [[MMM DD, 0hh:0mm]]'></span></div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></span></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
/***
To use, add {{{[[Styles HorizontalMainMenu]]}}} to your StyleSheet tiddler.
See http://www.w3schools.com/css/css_colors.asp for a color chart.
***/
/*{{{*/
#mainMenu {position:relative;left:auto;width:auto;text-align:left;line-height:normal;padding 0em 1em 0em 1em;font-size:normal;}
#mainMenu br {display:none;}
#mainMenu {background:#336699;}
#mainMenu {padding:2px;}
#mainMenu .button, #mainMenu .tiddlyLink {padding-left:0.5em;padding-right:0.5em;color:white;font-size:115%;}
#displayArea {
margin-top:0;margin-right:20em;margin-bottom:0;margin-left:1em;
padding-top:.1em;padding-bottom:.1em;
}
/*}}}*/
|''Type:''|socialtext|
|''URL:''|https://saturn.ffzg.hr%2C%20saturn.ffzg.hr:443 |
|''Workspace:''|rot13|
|''WorkspaceList:''||
|''Description:''|Dobrica Pavlinušić's random unstructured stuff|
The TiddlySaver Java applet allows TiddlyWiki from a {{{file://}}} URL to save changes Safari, Opera and other browsers.
It is a small file named [["TiddlySaver.jar"|TiddlySaver.jar]] that must be placed in the same directory as your TiddlyWiki file. Before you can use it, you need to give it the necessary privileges by editting your {{{.java.policy}}} file.
For Windows, the file will be at {{{C:\Documents and Settings\your-user-name\.java.policy}}}. Add the following lines (substituting the directory of your TiddlyWiki file as appropriate):
{{{
grant codeBase "file:${user.home}/My Documents/tiddlywiki-folder/*" {
permission java.io.FilePermission "${user.home}${/}My Documents${/}tiddlywiki-folder${/}*", "read,write";
};
}}}
On Mac OS X, the file is found at {{{/Users/your-user-name/.java.policy}}}:
{{{
grant codeBase "file:${user.home}/Documents/tiddlywiki-folder/*" {
permission java.io.FilePermission "${user.home}${/}Documents${/}tiddlywiki-folder${/}*", "read,write";
};
}}}
It can be tricky creating files whose name starts with a period, so you can use this [[pre-built .java.policy file|.java.policy]]. The same file is suitable for Macs too, just edit it and delete the "My " bit, leaving just "Documents". Make sure you save it in the right place for each operating system!
If you have trouble setting up the permissions correctly, you can try granting broader permissions to the applet like this:
{{{
grant codeBase "file://localhost/home/users/Desktop/
TiddlySaver.jar"
{ permission java.security.AllPermission; };
}}}
Note that there is currently [[a bug|http://trac.tiddlywiki.org/ticket/172]] that prevents TiddlySaver from working if you have specified a backup directory in AdvancedOptions.
/***
|''Name:''|SocialtextLocaleOverrides|
|''Description:''|Text changes for Socialtext|
***/
//{{{
merge(config.views.wikified.tag,{
labelNoTags: "No Tags",
labelTags: "Tags"});
merge(config.commands.references,{
text: "incoming links",
tooltip: "Show tiddlers that link to this one",
popupNone: "No incoming links"});
//}}}
/***
|''Name:''|SocialtextTweaksPlugin|
|''Description:''|Allows changes to be synchronised with a Socialtext server|
|''Source:''|http://stunplugged.tiddlywiki.com/#SocialtextTweaksPlugin|
|''Author:''|JeremyRuston (jeremy (at) osmosoft (dot) com)|
|''Version:''|1.0.2|
|''Date:''|Jun 15, 2006|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[BSD open source license]]|
|''~CoreVersion:''|2.2|
Make minor configuration tweaks specific to Socialtext Unplugged
***/
//{{{
// Ensure that the SocialtextTweaksPlugin is only installed once.
if(!version.extensions.SocialtextTweaksPlugin) {
version.extensions.SocialtextTweaksPlugin = {installed:true};
// Check version number of core code
if(version.major < 2 || (version.major == 2 && version.minor < 2))
{alertAndThrow("SocialtextTweaksPlugin requires TiddlyWiki 2.2 or later.");}
merge(config.defaultCustomFields,{
wikiformat:'socialtext',
'server.host':'https://saturn.ffzg.hr%2C%20saturn.ffzg.hr:443'
});
config.options.chkSinglePageMode = true;
config.options.chkEnableAnimations = true;
} // end of "install only once"
//}}}
/***
|''Name:''|SocialtextFormatterPlugin|
|''Description:''|Allows Tiddlers to use [[Socialtext|http://www.socialtext.com/]] text formatting|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com)|
|''Source:''|http://www.martinswiki.com/#SocialtextFormatterPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/formatters/SocialtextFormatterPlugin.js|
|''Version:''|0.9.4|
|''Date:''|Jan 21, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.1.0|
This is the SocialtextFormatterPlugin, which allows you to insert Socialtext formated text into a TiddlyWiki.
The aim is not to fully emulate Socialtext, but to allow you to work with Socialtext content off-line and then resync the content with your Socialtext wiki later on, with the expectation that only minor edits will be required.
To use Socialtext format in a Tiddler, tag the Tiddler with SocialtextFormat or set the tiddler's {{{wikiformat}}} extended field to {{{socialtext}}}
Please report any defects you find at http://groups.google.co.uk/group/TiddlyWikiDev
***/
//{{{
// Ensure that the SocialtextFormatter Plugin is only installed once.
if(!version.extensions.SocialtextFormatterPlugin) {
version.extensions.SocialtextFormatterPlugin = {installed:true};
if(version.major < 2 || (version.major == 2 && version.minor < 1))
{alertAndThrow('SocialtextFormatterPlugin requires TiddlyWiki 2.1 or later.');}
SocialtextFormatter = {}; // 'namespace' for local functions
wikify = function(source,output,highlightRegExp,tiddler)
{
if(source && source != '') {
var w = new Wikifier(source,getParser(tiddler),highlightRegExp,tiddler);
var out = output;
if(tiddler && (tiddler.isTagged(config.parsers.socialtextFormatter.formatTag) || (tiddler.fields.wikiformat==config.parsers.socialtextFormatter.format)) ) {
var d1 = createTiddlyElement(output,'div','content-display-body','content-section-visible');
var d2 = createTiddlyElement(d1,'div','wikipage');
out = createTiddlyElement(d2,'div',null,'wiki');
}
var time1,time0 = new Date();
w.subWikifyUnterm(out);
if(tiddler && config.options.chkDisplayInstrumentation) {
time1 = new Date();
var t = tiddler ? tiddler.title : source.substr(0,10);
displayMessage("Wikify '"+t+"' in " + (time1-time0) + " ms");
}
}
};
stDebug = function(out,str)
{
createTiddlyText(out,str.replace(/\n/mg,'\\n').replace(/\r/mg,'RR'));
createTiddlyElement(out,'br');
};
SocialtextFormatter.Tiddler_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
if((this.fields.wikiformat==config.parsers.socialtextFormatter.format) || this.isTagged(config.parsers.socialtextFormatter.formatTag)) {
// update the links array, by checking for Socialtext format links
this.links = [];
var tiddlerLinkRegExp = /(?:\"(.*?)\" ?)?\[([^\]]*?)\]/mg;
tiddlerLinkRegExp.lastIndex = 0;
var match = tiddlerLinkRegExp.exec(this.text);
while(match) {
var link = match[2];
this.links.pushUnique(link);
match = tiddlerLinkRegExp.exec(this.text);
}
}/* else {
return SocialtextFormatter.Tiddler_changed.apply(this,arguments);
}*/
this.linksUpdated = true;
};
SocialtextFormatter.wafl = function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var lm2 = lookaheadMatch[2];
switch(lookaheadMatch[1]) {
case 'image':
var img = createTiddlyElement(w.output,'img');
img.src = w.tiddler.title + '/' + lm2;
createTiddlyText(img,lm2);
break;
case 'file':
var s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
var a = createTiddlyElement(s,'a');
a.href = w.tiddler.title + '/' + lm2;
createTiddlyText(a,lm2);
break;
case 'link':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createTiddlyElement(s,'a');
var t = w.tiddler ? w.tiddler.title + ':' : '';
a.setAttribute('href','#' + t + lm2);
a.title = 'section link';
createTiddlyText(a,lm2);
break;
case 'weblog':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
var text = lm2;
var link = 'Weblog: ' + lm2;
createTiddlyText(createTiddlyLink(s,link,false,null,w.isStatic),text);
break;
case 'section':
a = createTiddlyElement(w.output,'a');// drop anchor
t = w.tiddler ? w.tiddler.title + ':' : '';
a.setAttribute('name',t + lm2);
break;
case 'date':
createTiddlyText(w.output,lm2);
break;
case 'user':
var oldSource = w.source;
w.source = lm2;
w.nextMatch = 0;
w.subWikifyUnterm(w.output);
w.source = oldSource;
break;
// Shortcut expansions - not strictly syntax
case 'google':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://www.google.com/search?q='+lm2);
createTiddlyText(a,lm2);
break;
case 'fedex':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://www.fedex.com/Tracking?tracknumbers='+lm2);
createTiddlyText(a,lm2);
break;
case 'map':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://maps.google.com/maps?q='+lm2);
createTiddlyText(a,lm2);
break;
case 'wikipedia':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://en.wikipedia.org/wiki/'+lm2);
createTiddlyText(a,lm2);
break;
case 'rt':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'http://rt.socialtext.net/Ticket/Display.html?id='+lm2);
createTiddlyText(a,lm2);
break;
case 'stcal':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'https://calendar.socialtext.net:445/view_t.php?timeb=1&id=3&date='+lm2);
createTiddlyText(a,lm2);
break;
case 'svn':
s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
a = createExternalLink(s,'https://repo.socialtext.net/listing.php?rev='+lm2+'sc=1');
createTiddlyText(a,lm2);
break;
default:
w.outputText(w.output,w.matchStart,w.nextMatch);
return;
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
} else {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
};
SocialtextFormatter.presence = function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var p = lookaheadMatch[1];
var text = lookaheadMatch[2];
var link;
var src;
if(p=='aim') {
link = 'aim:goim?screenname=' + text + '&message=hello';
src = 'http://big.oscar.aol.com/sleepleft?on_url=http://www.aim.com/remote/gr/MNB_online.gif&off_url=http://www.aim.com/remote/gr/MNB_offline.gif';
} else if(p=='yahoo'||p=='ymsgr') {
link = 'ymsgr:sendIM?'+text;
src = 'http://opi.yahoo.com/online?u=chrislondonbridge&f=.gif';
} else if(p=='skype'||p=='callto') {
link = 'callto:'+text;
src = 'http://goodies.skype.com/graphics/skypeme_btn_small_green.gif';
} else if(p=='asap') {
link = 'http://asap2.convoq.com/AsapLinks/Meet.aspx?l='+text;
src = 'http://asap2.convoq.com/AsapLinks/Presence.aspx?l='+text;
}
var s = createTiddlyElement(w.output,'span',null,'nlw_phrase');
var a = createExternalLink(s,link);
var img = createTiddlyElement(a,'img');
createTiddlyText(a,text);
img.src = src;
img.border='0';
img.alt = '(' + lookaheadMatch[1] + ')';
if(p=='aim') {
img.width='11'; img.height='13';
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
};
config.formatterHelpers.singleCharFormat = function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[0].substr(lookaheadMatch[0].length-2,1) != ' ') {
w.subWikifyTerm(createTiddlyElement(w.output,this.element),this.termRegExp);
} else {
w.outputText(w.output,w.matchStart,w.nextMatch);
}
};
config.socialtext = {};
config.socialtext.formatters = [
{
name: 'socialtextHeading',
match: '^\\^{1,6} ?',
termRegExp: /(\n+)/mg,
handler: function(w)
{
var len = w.matchText.trim().length;
var e = createTiddlyElement(w.output,'h' + len);
var a = createTiddlyElement(e,'a');// drop anchor
var t = w.tiddler ? w.tiddler.title + ':' : '';
len = w.source.substr(w.nextMatch).indexOf('\n');
a.setAttribute('name',t+w.source.substr(w.nextMatch,len));
w.subWikifyTerm(e,this.termRegExp);
}
},
{
name: 'socialtextTable',
match: '^\\|(?:(?:.|\n)*)\\|$',
lookaheadRegExp: /^\|(?:(?:.|\n)*)\|$/mg,
cellRegExp: /(?:\|(?:[^\|]*)\|)(\n|$)?/mg,
cellTermRegExp: /((?:\x20*)\|)/mg,
handler: function(w)
{
var table = createTiddlyElement(w.output,'table');
var rowContainer = createTiddlyElement(table,'tbody');
var prevColumns = [];
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
var r = this.rowHandler(w,createTiddlyElement(rowContainer,'tr'),prevColumns);
if(!r) {
w.nextMatch++;
break;
}
this.lookaheadRegExp.lastIndex = w.nextMatch;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
},
rowHandler: function(w,e,prevColumns)
{
this.cellRegExp.lastIndex = w.nextMatch;
var cellMatch = this.cellRegExp.exec(w.source);
while(cellMatch && cellMatch.index == w.nextMatch) {
w.nextMatch++;
var cell = createTiddlyElement(e,'td');
w.subWikifyTerm(cell,this.cellTermRegExp);
if(cellMatch[1]) {
// End of row
w.nextMatch = this.cellRegExp.lastIndex;
return true;
}
// Cell
w.nextMatch--;
this.cellRegExp.lastIndex = w.nextMatch;
cellMatch = this.cellRegExp.exec(w.source);
}
return false;
}
},
{
name: 'socialtextList',
match: '^[\\*#]+ ',
lookaheadRegExp: /^([\*#])+ /mg,
termRegExp: /(\n+)/mg,
handler: function(w)
{
var stack = [w.output];
var currLevel = 0, currType = null;
var itemType = 'li';
w.nextMatch = w.matchStart;
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
while(lookaheadMatch && lookaheadMatch.index == w.nextMatch) {
var listType = lookaheadMatch[1] == '*' ? 'ul' : 'ol';
var listLevel = lookaheadMatch[0].length;
w.nextMatch += listLevel;
if(listLevel > currLevel) {
for(var i=currLevel; i<listLevel; i++) {
stack.push(createTiddlyElement(stack[stack.length-1],listType));
}
} else if(listLevel < currLevel) {
for(i=currLevel; i>listLevel; i--) {
stack.pop();
}
} else if(listLevel == currLevel && listType != currType) {
stack.pop();
stack.push(createTiddlyElement(stack[stack.length-1],listType));
}
currLevel = listLevel;
currType = listType;
var e = createTiddlyElement(stack[stack.length-1],itemType);
w.subWikifyTerm(e,this.termRegExp);
this.lookaheadRegExp.lastIndex = w.nextMatch;
lookaheadMatch = this.lookaheadRegExp.exec(w.source);
}
}
},
{
name: 'socialtextQuoteByLine',
match: '^>+',
lookaheadRegExp: /^>+/mg,
termRegExp: /(\n)/mg,
element: 'blockquote',
handler: function(w)
{
var stack = [w.output];
var currLevel = 0;
var newLevel = w.matchLength;
var i;
do {
if(newLevel > currLevel) {
for(i=currLevel; i<newLevel; i++) {
stack.push(createTiddlyElement(stack[stack.length-1],this.element));
}
} else if(newLevel < currLevel) {
for(i=currLevel; i>newLevel; i--) {
stack.pop();
}
}
currLevel = newLevel;
w.subWikifyTerm(stack[stack.length-1],this.termRegExp);
createTiddlyElement(stack[stack.length-1],'br');
this.lookaheadRegExp.lastIndex = w.nextMatch;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
var matched = lookaheadMatch && lookaheadMatch.index == w.nextMatch;
if(matched) {
newLevel = lookaheadMatch[0].length;
w.nextMatch += newLevel;
}
} while(matched);
}
},
{
name: 'socialtextRule',
match: '^----+$\\n+',
handler: function(w)
{
createTiddlyElement(w.output,'hr');
}
},
{
name: 'socialtextPreformatted',
match: '^\\.pre\\s*\\n',
lookaheadRegExp: /^.pre\s*\n((?:.|\n)*?)\n.pre\s*\n/mg,
element: 'pre',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'socialtextHtml',
match: '^\\.html',
lookaheadRegExp: /\.html((?:.|\n)*?)\.html/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
createTiddlyElement(w.output,'span').innerHTML = lookaheadMatch[1];
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'macro',
match: '<<',
lookaheadRegExp: /<<([^>\s]+)(?:\s*)((?:[^>]|(?:>(?!>)))*)>>/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart && lookaheadMatch[1]) {
w.nextMatch = this.lookaheadRegExp.lastIndex;
invokeMacro(w.output,lookaheadMatch[1],lookaheadMatch[2],w,w.tiddler);
}
}
},
{
name: 'socialtextExplicitLink',
match: '(?:".*?" ?)?\\[',
lookaheadRegExp: /(?:\"(.*?)\" ?)?\[([^\]]*?)\]/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var link = lookaheadMatch[2];
var text = lookaheadMatch[1] ? lookaheadMatch[1] : link;
createTiddlyText(createTiddlyLink(w.output,link,false,null,w.isStatic,w.tiddler),text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'socialtextExternalLink',
match: '(?:".*?" ?)?<[a-z]{2,8}:',
lookaheadRegExp: /(?:\"(.*?)\" ?)?<([a-z]{2,8}:.*?)>/mg,
imgRegExp: /\.(?:gif|ico|jpg|png)/g,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var link = lookaheadMatch[2];
var text = lookaheadMatch[1] ? lookaheadMatch[1] : link;
this.imgRegExp.lastIndex = 0;
if(this.imgRegExp.exec(link)) {
var img = createTiddlyElement(w.output,'img');
if(lookaheadMatch[1]) {
img.title = text;
}
img.alt = text;
img.src = link;
} else {
createTiddlyText(createExternalLink(w.output,link),text);
}
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'socialtextUrlLink',
match: config.textPrimitives.urlPattern,
handler: function(w)
{
w.outputText(createExternalLink(w.output,w.matchText),w.matchStart,w.nextMatch);
}
},
{
name: 'socialtextBold',
match: '\\*(?![\\s\\*])',
lookaheadRegExp: /\*(?!\s)(?:.*?)(?!\s)\*(?=[$\s\|\._\-,])/mg,
termRegExp: /((?!\s)\*(?=[$\s\|\.\-_,]))/mg,
element: 'strong',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'socialtextItalic',
match: '_(?![\\s_])',
lookaheadRegExp: /_(?!\s)(?:.*?)(?!\s)_(?=[$\s\|\.\*\-,])/mg,
termRegExp: /((?!\s)_(?=[$\s\|\.\*\-,]))/mg,
element: 'em',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'socialtextStrike',
match: '-(?![\\s\\-])',
lookaheadRegExp: /-(?!\s)(?:.*?)(?!\s)-(?=[$\s\|\.\*_,])/mg,
termRegExp: /((?!\s)-(?=[$\s\|\.\*_,]))/mg,
element: 'del',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'socialtextMonoSpaced',
match: '`(?![\\s`])',
lookaheadRegExp: /`(?!\s)(?:.*?)(?!\s)`(?=[$\s\.\*\-_,])/mg,
termRegExp: /((?!\s)`(?=[$\s\.\*\-_,]))/mg,
element: 'tt',
handler: config.formatterHelpers.singleCharFormat
},
{
name: 'socialtextParagraph',
match: '\\n{2,}',
handler: function(w)
{
createTiddlyElement(w.output,'p');
}
},
{
name: 'socialtextLineBreak',
match: '\\n',
handler: function(w)
{
createTiddlyElement(w.output,'br');
}
},
{
name: 'socialtextNoWiki',
match: '\\{\\{',
lookaheadRegExp: /\{\{((?:.|\n)*?)\}\}/mg,
element: 'span',
handler: config.formatterHelpers.enclosedTextHelper
},
{
name: 'socialtextTrademark',
match: '\\{tm\\}',
handler: function(w)
{
createTiddlyElement(w.output,'span').innerHTML = '™';
}
},
{
name: 'socialtextWafl',
match: '\\{(?:[a-z]{2,16}): ?.*?\\}',
lookaheadRegExp: /\{([a-z]{2,16}): ?(.*?)\}/mg,
handler: SocialtextFormatter.wafl
},
{
name: 'socialtextPresence',
match: '(?:aim|yahoo|ymsgr|skype|callto|asap):\\w+',
lookaheadRegExp: /(aim|yahoo|ymsgr|skype|callto|asap):(\w+)/mg,
handler: SocialtextFormatter.presence
},
{
name: 'socialtextMailTo',
match: '[\\w\.]+@[\\w]+\.[\\w\.]+',
lookaheadRegExp: /([\w\.]+@[\w]+\.[\w\.]+)/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
createTiddlyText(createExternalLink(w.output,'mailto:'+text),text);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
},
{
name: 'socialtextHtmlEntitiesEncoding',
match: '&#?[a-zA-Z0-9]{2,8};',
handler: function(w)
{
createTiddlyElement(w.output,'span').innerHTML = w.matchText;
}
}
];
config.parsers.socialtextFormatter = new Formatter(config.socialtext.formatters);
config.parsers.socialtextFormatter.format = 'socialtext';
config.parsers.socialtextFormatter.formatTag = 'SocialtextFormat';
} // end of 'install only once'
//}}}
/***
|''Name:''|SocialtextAdaptorPlugin|
|''Description:''|Adaptor for moving and converting data to and from Socialtext Wikis|
|''Author:''|Martin Budden (mjbudden (at) gmail (dot) com) and JeremyRuston (jeremy (at) osmosoft (dot) com)|
|''Source:''|http://www.martinswiki.com/#SocialtextAdaptorPlugin|
|''CodeRepository:''|http://svn.tiddlywiki.org/Trunk/contributors/MartinBudden/adaptors/SocialtextAdaptorPlugin.js|
|''Version:''|0.5.1|
|''Date:''|Feb 25, 2007|
|''Comments:''|Please make comments at http://groups.google.co.uk/group/TiddlyWikiDev|
|''License:''|[[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|''~CoreVersion:''|2.2.0|
Socialtext REST documentation is at:
http://www.eu.socialtext.net/st-rest-docs/index.cgi?socialtext_rest_documentation
***/
//{{{
if(!version.extensions.SocialtextAdaptorPlugin) {
version.extensions.SocialtextAdaptorPlugin = {installed:true};
function SocialtextAdaptor()
{
this.host = null;
this.workspace = null;
return this;
}
SocialtextAdaptor.mimeType = 'text/x.socialtext-wiki';
SocialtextAdaptor.serverType = 'socialtext';
SocialtextAdaptor.serverParsingErrorMessage = "Error parsing result from server";
SocialtextAdaptor.errorInFunctionMessage = "Error in function SocialtextAdaptor.%0";
SocialtextAdaptor.prototype.setContext = function(context,userParams,callback)
{
if(!context) context = {};
context.userParams = userParams;
if(callback) context.callback = callback;
context.adaptor = this;
if(!context.host)
context.host = this.host;
if(!context.workspace && this.workspace)
context.workspace = this.workspace;
return context;
};
SocialtextAdaptor.doHttpGET = function(uri,callback,params,headers,data,contentType,username,password)
{
return doHttp('GET',uri,data,contentType,username,password,callback,params,headers);
};
SocialtextAdaptor.doHttpPOST = function(uri,callback,params,headers,data,contentType,username,password)
{
return doHttp('POST',uri,data,contentType,username,password,callback,params,headers);
};
SocialtextAdaptor.fullHostName = function(host)
{
if(!host)
return '';
if(!host.match(/:\/\//))
host = 'http://' + host;
if(host.substr(host.length-1) != '/')
host = host + '/';
return host;
};
SocialtextAdaptor.minHostName = function(host)
{
return host ? host.replace(/^http:\/\//,'').replace(/\/$/,'') : '';
};
// Convert a page title to the normalized form used in uris
SocialtextAdaptor.normalizedTitle = function(title)
{
var n = title.toLowerCase();
n = n.replace(/\s/g,'_').replace(/\//g,'_').replace(/\./g,'_').replace(/:/g,'').replace(/\?/g,'');
if(n.charAt(0)=='_')
n = n.substr(1);
return String(n);
};
// Convert a Socialtext date in YYYY-MM-DD hh:mm format into a JavaScript Date object
SocialtextAdaptor.dateFromEditTime = function(editTime)
{
var dt = editTime;
return new Date(Date.UTC(dt.substr(0,4),dt.substr(5,2)-1,dt.substr(8,2),dt.substr(11,2),dt.substr(14,2)));
};
SocialtextAdaptor.prototype.openHost = function(host,context,userParams,callback)
{
this.host = SocialtextAdaptor.fullHostName(host);
context = this.setContext(context,userParams,callback);
if(context.callback) {
context.status = true;
window.setTimeout(function() {callback(context,userParams);},0);
}
return true;
};
SocialtextAdaptor.prototype.openWorkspace = function(workspace,context,userParams,callback)
{
this.workspace = workspace;
context = this.setContext(context,userParams,callback);
if(context.callback) {
context.status = true;
window.setTimeout(function() {callback(context,userParams);},0);
}
return true;
};
SocialtextAdaptor.prototype.getWorkspaceList = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '%0data/workspaces';
var uri = uriTemplate.format([context.host]);
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getWorkspaceListCallback,context,{'accept':'application/json'});
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.getWorkspaceListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = SocialtextAdaptor.errorInFunctionMessage.format(['getWorkspaceListCallback']);
if(status) {
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,SocialtextAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
var list = [];
for(var i=0; i<info.length; i++) {
var item = {
title:info[i].title,
name:info[i].name,
modified:SocialtextAdaptor.dateFromEditTime(info[i].modified_time)
};
list.push(item);
}
context.workspaces = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.getTiddlerList = function(context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '%0data/workspaces/%1/pages?order=newest';//!! ? or ;
var uri = uriTemplate.format([context.host,context.workspace]);
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getTiddlerListCallback,context,{'accept':'application/json'});
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.getTiddlerListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = SocialtextAdaptor.errorInFunctionMessage.format(['getTiddlerListCallback']);
if(status) {
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,SocialtextAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
var list = [];
for(var i=0; i<info.length; i++) {
var tiddler = new Tiddler(info[i].name);
tiddler.modified = SocialtextAdaptor.dateFromEditTime(info[i].last_edit_time);
tiddler.modifier = info[i].last_editor;
tiddler.tags = info[i].tags;
tiddler.fields['server.page.id'] = info[i].page_id;
tiddler.fields['server.page.name'] = info[i].name;
tiddler.fields['server.page.revision'] = String(info[i].revision_id);
list.push(tiddler);
}
context.tiddlers = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.generateTiddlerInfo = function(tiddler)
{
var info = {};
var host = this && this.host ? this.host : SocialtextAdaptor.fullHostName(tiddler.fields['server.host']);
var workspace = this && this.workspace ? this.workspace : tiddler.fields['server.workspace'];
uriTemplate = '%0%1/index.cgi?%2';
info.uri = uriTemplate.format([host,workspace,SocialtextAdaptor.normalizedTitle(tiddler.title)]);
return info;
};
SocialtextAdaptor.prototype.getTiddler = function(title,context,userParams,callback)
{
return this.getTiddlerRevision(title,null,context,userParams,callback);
};
SocialtextAdaptor.prototype.getTiddlerRevision = function(title,revision,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
// request the page in json format to get the page attributes
if(revision) {
var uriTemplate = '%0data/workspaces/%1/pages/%2/revisions/%3';
context.revision = revision;
} else {
uriTemplate = '%0data/workspaces/%1/pages/%2';
context.revision = null;
}
uri = uriTemplate.format([context.host,context.workspace,SocialtextAdaptor.normalizedTitle(title),revision]);
context.tiddler = new Tiddler(title);
context.tiddler.fields.wikiformat = 'socialtext';
context.tiddler.fields['server.host'] = SocialtextAdaptor.minHostName(context.host);
context.tiddler.fields['server.workspace'] = context.workspace;
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getTiddlerCallback,context,{'accept':'application/json'});
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.getTiddlerCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
context.statusText = SocialtextAdaptor.errorInFunctionMessage.format(['getTiddlerCallback']);
if(status) {
try {
eval('var info=' + responseText);
context.tiddler.tags = info.tags;
context.tiddler.fields['server.page.id'] = info.page_id;
context.tiddler.fields['server.page.name'] = info.name;
context.tiddler.fields['server.page.revision'] = String(info.revision_id);
context.tiddler.modifier = info.last_editor;
context.tiddler.modified = SocialtextAdaptor.dateFromEditTime(info.last_edit_time);
} catch (ex) {
context.statusText = exceptionText(ex,SocialtextAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
context.status = true;
} else {
context.statusText = xhr.statusText;
if(context.callback)
context.callback(context,context.userParams);
return;
}
var uriTemplate = context.revision ? '%0data/workspaces/%1/pages/%2/revisions/%3' : '%0data/workspaces/%1/pages/%2';
var host = SocialtextAdaptor.fullHostName(context.tiddler.fields['server.host']);
var workspace = context.workspace ? context.workspace : context.tiddler.fields['server.workspace'];
uri = uriTemplate.format([host,workspace,SocialtextAdaptor.normalizedTitle(context.tiddler.title),context.revision]);
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getTiddlerCallback2,context,{'accept':SocialtextAdaptor.mimeType});
};
SocialtextAdaptor.getTiddlerCallback2 = function(status,context,responseText,uri,xhr)
{
context.tiddler.text = responseText;
if(status) {
context.status = true;
} else {
context.status = false;
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.getTiddlerRevisionList = function(title,limit,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
var uriTemplate = '%0data/workspaces/%1/pages/%2/revisions?accept=application/json';
if(!limit)
limit = 5;
var uri = uriTemplate.format([context.host,context.workspace,SocialtextAdaptor.normalizedTitle(title),limit]);
var req = SocialtextAdaptor.doHttpGET(uri,SocialtextAdaptor.getTiddlerRevisionListCallback,context);
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.getTiddlerRevisionListCallback = function(status,context,responseText,uri,xhr)
{
context.status = false;
if(status) {
var content = null;
try {
eval('var info=' + responseText);
} catch (ex) {
context.statusText = exceptionText(ex,SocialtextAdaptor.serverParsingErrorMessage);
if(context.callback)
context.callback(context,context.userParams);
return;
}
list = [];
for(var i=0; i<info.length; i++) {
var tiddler = new Tiddler(info[i].name);
tiddler.modified = SocialtextAdaptor.dateFromEditTime(info[i].last_edit_time);
tiddler.modifier = info[i].last_editor;
tiddler.tags = info[i].tags;
tiddler.fields['server.page.id'] = info[i].page_id;
tiddler.fields['server.page.name'] = info[i].name;
tiddler.fields['server.page.revision'] = info[i].revision_id;
list.push(tiddler);
}
var sortField = 'server.page.revision';
list.sort(function(a,b) {return a.fields[sortField] < b.fields[sortField] ? +1 : (a.fields[sortField] == b.fields[sortField] ? 0 : -1);});
context.revisions = list;
context.status = true;
} else {
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.putTiddler = function(tiddler,context,userParams,callback)
{
context = this.setContext(context,userParams,callback);
context.tiddler = tiddler;
context.title = tiddler.title;
var uriTemplate = '%0data/workspaces/%1/pages/%2';
var host = context.host ? context.host : SocialtextAdaptor.fullHostName(tiddler.fields['server.host']);
var workspace = context.workspace ? context.workspace : tiddler.fields['server.workspace'];
var uri = uriTemplate.format([host,workspace,tiddler.title,tiddler.text]);
//var req = doHttp('POST',uri,tiddler.text,SocialtextAdaptor.mimeType,null,null,SocialtextAdaptor.putTiddlerCallback,context,{"X-Http-Method": "PUT"});
var req = SocialtextAdaptor.doHttpPOST(uri,SocialtextAdaptor.putTiddlerCallback,context,{"X-Http-Method": "PUT"},tiddler.text,SocialtextAdaptor.mimeType);
return typeof req == 'string' ? req : true;
};
SocialtextAdaptor.putTiddlerCallback = function(status,context,responseText,uri,xhr)
{
if(status) {
context.status = true;
} else {
context.status = false;
context.statusText = xhr.statusText;
}
if(context.callback)
context.callback(context,context.userParams);
};
SocialtextAdaptor.prototype.close = function()
{
return true;
};
config.adaptors[SocialtextAdaptor.serverType] = SocialtextAdaptor;
} //# end of 'install only once'
//}}}
/***
SocialtextStyleOverrides
***/
/*{{{*/
.headerShadow {padding: 2em 0em .5em 1em;}
.headerForeground {padding: 2em 0em .5em 1em;}
#st-page-wiki-title {
font-size: 80%;
}
.subtitle {
font-style: italic;
font-size 80%;
}
/* from #st-tags */
.tagged {
border-color: #bbeebb;
background-color: #f4fff4;
}
.tagged .listTitle {
color: #595;
font-weight: bold;
}
.tagged .button {
color: #000;
}
.selected .tagged {
background-color: ColorPalette::TertiaryLight;
border: 1px solid ColorPalette::TertiaryMid;
}
/* from #st-incoming-links */
.tagging {
border-color: #ebb;
background-color: #fff4f4;
}
.tagging .listTitle {
color: #b78;
font-weight: bold;
}
.tagging .button {
color: #999;
}
.selected .tagging {
background-color: ColorPalette::TertiaryLight;
border: 1px solid ColorPalette::TertiaryMid;
}
.tiddler {/* Tiddler body */
border:1px solid #ccc;
margin:0.5em;
background:#fff;
padding:0.5em;
}
.viewer blockquote {border-left: 0px solid}
.tiddlyLinkNonExisting {
font-style: italic;
border-bottom: 1px dashed;
}
.editor input, .editor textarea {
background: #ffd;
border-style: solid;
border-color: #888 #ccc #ccc #888;
border-width: 2px;
}
.tabContents {white-space: nowrap;}
#displayArea {margin: 1em 20em 0em 14em;}
#sidebar {
position: absolute;
right: 3px;
width: 21em;
font-size: .9em;
}
#sidebarOptions .button {
border-color: #eee;
}
#sidebarTabs .tabContents {
width: 20em;
overflow: hidden;
}
.viewer tt {
font-size: 1.2em;
line-height: 1.4em;
}
ul {list-style-type: square;}
ul ul {list-style-type: circle;}
ol {list-style-type: decimal;}
ol ol {list-style-type: decimal;}
ol ol ol {list-style-type: decimal;}
ol ol ol ol {list-style-type: decimal;}
ol ol ol ol ol {list-style-type: decimal;}
ol ol ol ol ol ol {list-style-type: decimal;}
/*}}}*/
/***
SocialtextScreenStyle
http://www.eu.socialtext.net/static/2.0.0.1/css/st/screen.css
***/
/*{{{*/
body {
font-family: Arial, sans-serif;
color: #000;
background: #eee;
margin: 0;
}
/* Wiki Navigation */
.st-wiki-nav {
clear: both;
margin-left: 10px;
margin-right: 10px;
}
.st-wiki-nav-content {
background: url('../../images/st/wiki-nav/solid.gif') repeat-x left bottom;
margin-left: 24px;
margin-right: 24px;
padding-top: 3px;
min-height: 24px;
}
* html .st-wiki-nav-content {
padding-bottom: 3px;
height: 24px;
}
.st-wiki-nav-right {
background: url('../../images/st/wiki-nav/right-round.gif') no-repeat bottom right;
}
.st-wiki-nav-left {
background: url('../../images/st/wiki-nav/left-round.gif') no-repeat bottom left;
}
#st-home {
float: left;
margin-right: 60px;
padding-top: 2px;
}
#st-home-link {
color: white;
text-decoration: none;
font-weight: bold;
font-family: Helvetica, sans-serif;
font-size: 90%;
}
#st-editing-prefix-container {
border-collapse: collapse;
width: 100%;
padding: 0px;
margin: 0px;
margin-bottom: -20px;
}
#st-editing-prefix-container tr td {
margin: 0px;
padding: 0px;
}
#st-editing-title {
color: black;
background-color: white;
text-decoration: none;
font-weight: bold;
font-family: Helvetica, sans-serif;
font-size: 90%;
margin-bottom: 0.4em;
}
#st-wiki-title-invite {
font-size: 50%;
font-family: Helvetica, sans-serif;
}
#st-wiki-title-central-page-link {
font-size: 50%;
font-family: Helvetica, sans-serif;
}
#st-wiki-title-invite a {
color: #00f;
}
#st-wiki-logo {
text-align: center;
clear: both;
}
#st-wiki-logo-image {
}
.st-wiki-nav-actions {
float: right;
color: black;
font-size: 75%;
padding-top: 3px;
}
.st-wiki-nav-actions a {
padding: 2px;
color: white;
text-decoration: none;
font-family: Helvetica, sans-serif;
}
/* Wiki Subnav */
#st-wiki-subnav {
margin-top: 2px;
font-size: 70%;
font-weight: bold;
font-family: Helvetica, sans-serif;
color: #888;
}
#st-wiki-subnav a {
padding: 2px;
color: #008;
text-decoration: none;
}
#st-wiki-subnav-right {
float: right;
margin-right: 6em;
}
#st-wiki-subnav-left {
float: left;
margin-left: 6em;
}
* html #st-wiki-subnav-left {
margin-left: 3em;
}
/* Wiki Navigation Search Bar */
#st-search-form {
margin: 0;
padding: 0;
padding-top: 1px;
}
#st-search-form .button-table {
float: left;
font-size: 79%;
font-weight: bold;
margin-left: 5px;
margin-top: 1px;
}
#st-search-form #st-search-term {
float: left;
font-size: 60%;
}
/* Content Outline */
#st-content-border, #st-edit-border {
position: relative;
clear: both;
margin-left: 3px;
margin-right: 2px;
margin-bottom: 0px;
margin-top: 0px;
border-bottom: 1px solid #eee;
}
#st-content-border-left, #st-edit-border-left {
background: url('../../images/st/page-shadow/left.gif') left top repeat-y;
position: relative;
}
#st-content-border-right, #st-edit-border-right {
background: url('../../images/st/page-shadow/right.gif') right top repeat-y;
position: relative;
}
#st-content-border-top, #st-edit-border-top {
position: relative;
background: url('../../images/st/page-shadow/top.gif') left top repeat-x;
}
#st-content-border-bottom, #st-edit-border-bottom {
background: url('../../images/st/page-shadow/bottom.gif') left bottom repeat-x;
position: relative;
}
#st-content-border-left-top, #st-edit-border-left-top {
background: url('../../images/st/page-shadow/left-top.gif') left top no-repeat;
position: relative;
}
#st-content-border-right-top, #st-edit-border-right-top {
background: url('../../images/st/page-shadow/right-top.gif') right top no-repeat;
position: relative;
}
#st-content-border-left-bottom, #st-edit-border-left-bottom {
background: url('../../images/st/page-shadow/left-bottom.gif') left bottom no-repeat;
position: relative;
}
#st-content-border-right-bottom, #st-edit-border-right-bottom {
background: url('../../images/st/page-shadow/right-bottom.gif') right bottom no-repeat;
padding-top: 5px;
padding-bottom: 9px;
position: relative;
}
* html #st-content-border-right-bottom, * html #st-edit-border-right-bottom {
padding-top: 4px;
padding-left: 7px;
padding-right: 8px;
position: relative;
}
.st-content-width-controller {
width: 100%;
position: relative;
border-collapse: collapse;
}
.st-content-width-controller td {
vertical-align: top;
}
.st-content {
position: relative;
background-color: white;
margin-top: 0px;
margin-left: 7px;
margin-right: 8px;
margin-bottom: -1px;
border-left: 1px dotted #80a9f3;
border-right: 1px dotted #80a9f3;
border: 1px solid #80a9f3;
padding: 6px 12px 12px 12px;
}
* html .st-content {
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
}
/* This textarea is only for Safari. However, if we use display:none; here Safari ignores the .value operation in JS */
#st-raw-wikitext-textarea {
width:1px;
height:1px;
margin:0;
padding:0;
}
/* Action Buttons */
.button-table, .button-table tr td {
border-collapse: collapse;
margin: 0;
padding: 0;
}
.button-rounded {
background: url('../../images/st/grey-button/left-top-rounded.png') top left no-repeat;
margin: 0;
}
.button-rounded-right-top {
background: url('../../images/st/grey-button/right-top-rounded.png') top right no-repeat;
margin: 0;
}
.button-rounded-left-bottom {
background: url('../../images/st/grey-button/left-bottom-rounded.png') bottom left no-repeat;
margin: 0;
}
.button-rounded-right-bottom {
background: url('../../images/st/grey-button/right-bottom-rounded.png') bottom right no-repeat;
margin: 0;
}
.button-straight {
background: url('../../images/st/grey-button/left-top-straight.png') top left no-repeat;
margin: 0;
}
.button-straight-right-top {
background: url('../../images/st/grey-button/right-top-straight.png') top right no-repeat;
margin: 0;
}
.button-straight-left-bottom {
background: url('../../images/st/grey-button/left-bottom-straight.png') bottom left no-repeat;
margin: 0;
}
.button-straight-right-bottom {
background: url('../../images/st/grey-button/right-bottom-straight.png') bottom right no-repeat;
margin: 0;
}
.button-content {
font-size: 90%;
}
.button-content a {
display: block;
padding: 2px;
padding-left: 10px;
padding-right: 10px;
font-family: Helvetica, Verdana, sans-serif;
font-weight: bold;
text-decoration: none;
color: black;
}
.button-content input.submit {
border: 0px;
padding: 2px;
padding-left: 10px;
padding-right: 10px;
font-family: Helvetica, Verdana, sans-serif;
font-weight: bold;
text-decoration: none;
color: black;
background-color: transparent;
}
/* Personal Homepage */
#st-homepage {
background: white url('../../images/st/homepage/blue-fade.gif') top left no-repeat;
}
#st-homepage-layout {
margin-top: 15px;
clear: both;
width: 100%;
border-collapse: collapse;
}
#st-homepage-layout tr td.st-homepage-layout-cell {
padding: 5px;
vertical-align: top;
}
#st-homepage-layout-dashboard {
width: 50%
}
#st-homepage-layout-notes {
width: 50%;
}
#st-homepage-notes, #st-homepage-dashboard {
text-align: left;
width: 95%;
}
#st-user-greeting, #st-wiki-title {
font-family: Helvetica, Verdana, sans-serif;
font-size: 150%;
}
#st-wiki-title {
margin-left: 5px;
}
#st-user-greeting {
position: relative;
text-align: right;
float: right;
}
#st-group-notes-content, #st-personal-notes-content {
}
.st-homepage-section {
margin-bottom: 15px;
}
#st-homepage-notes .st-homepage-section {
background-color: white;
border: 1px solid #aaa;
padding: 15px;
}
.st-homepage-section-title {
font-size: 110%;
font-family: Helvetica, Verdana, sans-serif;
}
#st-homepage-notes .st-homepage-section-title {
color: #aaa;
text-decoration: underline;
}
.st-homepage-notes-edit-link {
background: url('../../images/st/homepage/edit-icon.gif') no-repeat left top;
display: block;
text-indent: -2000px;
height: 13px;
width: 36px;
text-decoration: none;
padding:0;
}
* html .st-homepage-notes-edit-link {
border:1px solid white;
}
.st-homepage-notes-edit {
font-family: Verdana, sans-serif;
font-size: 65%;
float: right;
}
.st-homepage-notes-content {
font-size: 85%;
margin-top: 10px;
padding-top: 0px;
padding-bottom: 0px;
font-family: Verdana, Helvetica, sans-serif;
}
#st-dyk {
border-color: #cca !important;
background-color: #ffe !important;
}
#st-dyk-title {
color: #e4a020 !important;
text-decoration: none !important;
}
/* Homepage Simple List */
#st-whats-new-title-link {
background: url('../../images/st/homepage/icon-28-pages.gif') no-repeat left top;
}
#st-watchlist-title-link {
background: url('../../images/st/homepage/icon-28-star.gif') no-repeat left top;
}
#st-wikis-title-link {
background: url('../../images/st/homepage/icon-28-group.gif') no-repeat left top;
}
.st-homepage-simplelist-title-link {
display: block;
padding-left: 32px;
min-height: 32px;
}
* html .st-homepage-simplelist-title-link {
height: 32px;
}
.st-homepage-simplelist-title {
}
.st-homepage-simplelist-table {
margin-left: 25px;
border: 1px dashed #ddd;
border-collapse: collapse;
font-family: Verdana, Helvetica, sans-serif;
font-size: 80%;
width: 95%;
}
.st-homepage-simplelist-table td {
padding: 2px;
}
.st-homepage-simplelist-table tr.st-homepage-simplelist-row-odd {
background-color: #f3f7f7;
}
.st-homepage-simplelist-table tr.st-homepage-simplelist-row-even {
background-color: white;
}
.st-homepage-simplelist-table a {
color: #4f55dd;
text-decoration: none;
}
.st-homepage-simplelist-table a:visited {
color: #551a8b;
}
.st-homepage-simplelist-subleft {
font-size: 80%;
margin-left: 1em;
color: #666;
}
.st-homepage-simplelist-right {
width: 20%;
}
.st-homepage-simplelist-subright {
font-size: 80%;
color: #666;
}
.st-homepage-simplelist {
}
.st-homepage-simplelist-header {
min-height: 35px;
}
.st-homepage-simplelist-header .button-table {
float: right;
margin-right: 15px;
font-size: 95%;
}
.st-homepage-simplelist-header .button-table .button-content {
padding: 1px;
}
.st-homepage-whatsnew-author, .st-homepage-whatsnew-date {
color: #555;
}
.st-homepage-whatsnew-attribution {
padding-left: 1em;
font-size: 80%;
color: #aaa;
}
/* Homepage Wikis List */
#st-wikis-title {
}
/* Data and Templates */
.st-jst-template, .st-json {
display: none;
}
/* Page Sidebox Common Styles */
#st-page-boxes-toggle {
position: relative;
float: right;
text-align: right;
font-family: Verdana, Arial, sans-serif;
font-weight: bold;
font-size: 80%;
margin-bottom: 0.7em;
}
#st-page-boxes-toggle-link {
text-decoration: none;
}
#st-page-boxes-underlay {
float: right;
margin-top: -10px;
margin-right: 10px;
background: white;
z-index: 198;
clear: both;
margin-left: 15px;
}
* html #st-page-boxes-underlay {
margin-right: 4px;
}
#st-page-boxes {
background: inherit;
position: absolute;
right: 23px;
z-index: 199;
margin-top: 15px;
margin-left: 20px;
}
#st-page-boxes, #st-page-boxes-underlay {
width: 225px;
/* padding-left: 15px; */ /* Gives the white border effect, cwest dislikes it. */
}
.st-page-box {
border: 1px solid black;
padding: 5px;
font-family: Verdana, Helvetica, sans-serif;
font-size: 80%;
margin-top: 15px;
}
.st-page-box-title {
font-family: Helvetica, Verdana, sans-serif;
font-weight: bold;
margin-bottom: 10px;
}
.st-page-box-listing {
margin: 0;
padding: 0;
}
.st-page-box-listing-entry {
display: block;
}
.st-page-boxes-nobacklinks {
font-family: Verdana, Helvetica, sans-serif;
font-size: 90%;
color: #888;
}
.st-page-box-first {
margin-top: 0px;
}
/* Page Display */
#st-page-content {
clear: left;
margin-top: 6px;
margin-bottom: 0;
padding-bottom: 0;
}
#st-page-content, #st-page-content td {
font-family: Verdana, Helvetica, sans-serif;
font-size: 90%;
}
#st-page-wiki-title {
font-family: Helvetica, Verdana, sans-serif;
font-size: 65%;
font-weight: bold;
color: #aaa;
margin-bottom: 0.2em;
margin-top: 0.1em;
padding-top: 0;
}
#wiki {
margin: 0;
padding: 0;
}
#st-page-title {
}
#st-page-titletext, .st-page-title {
font-family: Helvetica, Verdana, sans-serif;
font-size: 150%;
font-weight: bold;
color: #888;
border-bottom: 1px solid #888;
}
#st-newpage-pagename-edit {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
color: #000;
border: 1px solid black;
padding-left: 0.3em;
background-color: #ffd;
}
#st-page-details {
font-style: italic;
font-size: 75%;
font-family: Georgia, serif;
margin: 6px 10px 0 10px;
}
#st-page-details-feed-icon {
vertical-align: middle;
border: none;
}
#st-page-stats {
float: right;
vertical-align: middle;
}
#st-attribution {
float: left;
margin-bottom: 10px;
}
#st-page-editing-wysiwyg {
background: #ffd;
border-style: solid;
border-color: #888 #ccc #ccc #888;
border-width: 2px;
width: 100%;
}
#st-page-editing-toolbar {
margin-left: -6px;
overflow: hidden;
float: left;
height: 25px;
}
#wikiwyg_wikitext_textarea {
margin-top: 4px;
background: #ffd;
border-style: solid;
border-color: #888 #ccc #ccc #888;
border-width: 2px;
width: 100%;
font-family: monospace;
}
#st-page-maincontent {
}
#st-page-editing, #wikiwyg_wikitext_textarea {
}
#st-page-editing-pagebody-decoy, #st-page-editing-wysiwyg {
display: none;
}
#st-editing-tools-edit {
display: none;
}
#st-mode-wysiwyg-button
{
font-size: 70%;
margin-left: 4em;
}
#st-mode-wikitext-button
{
font-size: 70%;
}
#st-edit-tips
{
font-size: 70%;
}
.wikiwyg_button {
background: #FFFFFF;
border: 1px solid #FFFFFF;
cursor: pointer;
width: 20px;
height: 20px;
vertical-align: bottom;
}
.wikiwyg_button:hover {
border: 1px outset;
}
.wikiwyg_button:active {
border: 1px inset;
}
#wikiwyg_toolbar {
display: none;
}
/* Sidebox Pagetools: Revisions, Watchlist */
#st-side-box-pagetools {
border-collapse: collapse;
}
#st-rewind-norevisions {
font-family: Helvetica, Arial, sans-serif;
font-size: 11px;
color: #777;
text-decoration: none;
}
#st-side-box-pagetools a {
font-family: Helvetica, Arial, sans-serif;
font-size: 11px;
color: #555;
text-decoration: none;
}
/* Page View Tags/Incoming Links Sidebox */
#st-tags {
background: #f4fff4;
border-color: #bbeebb;
color: #999;
}
#st-tags-title {
color: #595;
}
#st-tags-addlink, #st-tags-addbutton {
font-weight: bold;
}
#st-tags-listing {
margin-bottom: 5px;
}
#st-tags-addinput, #st-tags-message, #st-tags-suggestion {
display: none;
}
#st-tags-deletemessage {
font-size: 90%;
color: #555;
display: none;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
#st-tags-suggestion {
margin-top: 2px;
}
.st-tags-level1 {
font-size: 90%;
}
.st-tags-level2 {
font-size: 100%;
}
.st-tags-level3 {
font-size: 110%;
}
.st-tags-level4 {
font-size: 120%;
}
.st-tags-level5 {
font-size: 130%;
}
.st-tags-tagline .st-tags-tagdelete {
text-decoration: none;
color: #ccc;
}
.st-tags-tagline a {
text-decoration: none;
color: #444;
}
#st-tags-field {
width: 95%;
}
#st-incoming-links {
border-color: #ebb;
background-color: #fff4f4;
}
#st-incoming-links-title {
color: #b78;
}
#st-attachments {
border-color: #bbe;
background-color: #f4f4ff;
}
#st-attachments-uploadbutton, #st-attachments-managebutton {
}
#st-attachments-buttons-uploadbutton {
margin: 0px;
padding: 0px;
padding-left: 2px;
}
#st-attachments-buttons-managebutton {
margin: 0px;
padding: 0px;
padding-right: 2px;
}
#st-attachments-buttons td {
padding-right: 3px;
font-size: 99%;
}
#st-attachments-buttons {
border-collapse: collapse;
margin: 0px;
padding: 0px;
margin-top: 5px;
}
#st-attachments-title {
color: #77b;
}
.st-attachments-line {
width:100%;
overflow:hidden;
}
/* Actions Bar */
#st-actions-bar-spacer {
clear:both;
height:0.5em;
overflow:hidden;
}
#st-actions-bar-spacer-clear {
clear:both;
height:1px;
overflow:hidden;
}
#st-actions-bar, #st-editing-tools-bar {
margin-left: 30px !important;
margin-right: 30px !important;
}
/* Footer */
#st-footer {
margin-top: -8px;
margin-bottom: 5px;
clear: both;
}
/* Socialtext Attribution */
#st-socialtext-attribution {
clear: both;
text-align: center;
font-size: 80%;
font-family: Helvetica, sans-serif;
}
#st-socialtext-attribution-link {
text-decoration: none;
}
#st-socialtext-attribution-image {
border: 0;
}
/* Page Actions */
#st-edit-button-border-left-middle, #st-login-to-edit-button-border-left-middle {
background: url('../../images/st/button-blue/left-middle.gif') left top repeat-y;
}
#st-edit-button-border-right-middle, #st-login-to-edit-button-border-right-middle {
background: url('../../images/st/button-blue/right-middle.gif') right top repeat-y;
}
#st-edit-button-border-left-top, #st-login-to-edit-button-border-left-top {
background: url('../../images/st/button-blue/left-top.gif') left top no-repeat;
}
#st-edit-button-border-right-top, #st-login-to-edit-button-border-right-top {
background: url('../../images/st/button-blue/right-top.gif') right top no-repeat;
}
#st-edit-button-border-left-bottom, #st-login-to-edit-button-border-left-bottom {
background: url('../../images/st/button-blue/left-bottom.gif') left bottom no-repeat;
}
#st-edit-button-border-right-bottom, #st-login-to-edit-button-border-right-bottom {
background: url('../../images/st/button-blue/right-bottom.gif') right bottom no-repeat;
}
#st-edit-button-link, #st-login-to-edit-button-link {
}
#st-comment-button-border-left-middle {
background: url('../../images/st/button-purple/left-middle.gif') left top repeat-y;
}
#st-comment-button-border-right-middle {
background: url('../../images/st/button-purple/right-middle.gif') right top repeat-y;
}
#st-comment-button-border-left-top {
background: url('../../images/st/button-purple/left-top.gif') left top no-repeat;
}
#st-comment-button-border-right-top {
background: url('../../images/st/button-purple/right-top.gif') right top no-repeat;
}
#st-comment-button-border-left-bottom {
background: url('../../images/st/button-purple/left-bottom.gif') left bottom no-repeat;
}
#st-comment-button-border-right-bottom {
background: url('../../images/st/button-purple/right-bottom.gif') right bottom no-repeat;
}
#st-comment-button-link {
}
#st-save-button-border-left-middle {
background: url('../../images/st/button-green/left-middle.gif') left top repeat-y;
}
#st-save-button-border-right-middle {
background: url('../../images/st/button-green/right-middle.gif') right top repeat-y;
}
#st-save-button-border-left-top {
background: url('../../images/st/button-green/left-top.gif') left top no-repeat;
}
#st-save-button-border-right-top {
background: url('../../images/st/button-green/right-top.gif') right top no-repeat;
}
#st-save-button-border-left-bottom {
background: url('../../images/st/button-green/left-bottom.gif') left bottom no-repeat;
}
#st-save-button-border-right-bottom {
background: url('../../images/st/button-green/right-bottom.gif') right bottom no-repeat;
}
#st-save-button-link {
}
#st-preview-button-border-left-middle {
background: url('../../images/st/button-gold/left-middle.gif') left top repeat-y;
}
#st-preview-button-border-right-middle {
background: url('../../images/st/button-gold/right-middle.gif') right top repeat-y;
}
#st-preview-button-border-left-top {
background: url('../../images/st/button-gold/left-top.gif') left top no-repeat;
}
#st-preview-button-border-right-top {
background: url('../../images/st/button-gold/right-top.gif') right top no-repeat;
}
#st-preview-button-border-left-bottom {
background: url('../../images/st/button-gold/left-bottom.gif') left bottom no-repeat;
}
#st-preview-button-border-right-bottom {
background: url('../../images/st/button-gold/right-bottom.gif') right bottom no-repeat;
}
#st-preview-button-link {
}
#st-cancel-button-border-left-middle {
background: url('../../images/st/button-crimson/left-middle.gif') left top repeat-y;
}
#st-cancel-button-border-right-middle {
background: url('../../images/st/button-crimson/right-middle.gif') right top repeat-y;
}
#st-cancel-button-border-left-top {
background: url('../../images/st/button-crimson/left-top.gif') left top no-repeat;
}
#st-cancel-button-border-right-top {
background: url('../../images/st/button-crimson/right-top.gif') right top no-repeat;
}
#st-cancel-button-border-left-bottom {
background: url('../../images/st/button-crimson/left-bottom.gif') left bottom no-repeat;
}
#st-cancel-button-border-right-bottom {
background: url('../../images/st/button-crimson/right-bottom.gif') right bottom no-repeat;
}
#st-cancel-button-link {
}
#st-edit-more-button-border-left-middle {
background: url('../../images/st/button-blue/left-middle.gif') left top repeat-y;
}
#st-edit-more-button-border-right-middle {
background: url('../../images/st/button-blue/right-middle.gif') right top repeat-y;
}
#st-edit-more-button-border-left-top {
background: url('../../images/st/button-blue/left-top.gif') left top no-repeat;
}
#st-edit-more-button-border-right-top {
background: url('../../images/st/button-blue/right-top.gif') right top no-repeat;
}
#st-edit-more-button-border-left-bottom {
background: url('../../images/st/button-blue/left-bottom.gif') left bottom no-repeat;
}
#st-edit-more-button-border-right-bottom {
background: url('../../images/st/button-blue/right-bottom.gif') right bottom no-repeat;
}
#st-edit-more-button-link {
}
.st-page-action-button-link {
min-height: 24px;
min-width: 100px;
text-align: center;
font-family: Helvetica, Verdana, sans-serif;
font-size: 90%;
text-decoration: none;
color: #fff;
font-weight: bold;
display: block;
padding-top: 8px;
padding-bottom: 0px;
margin-bottom: -3px;
width: 100%;
margin-left: -2px;
}
* html .st-page-action-button-link {
padding-top: 5px;
padding-bottom: 0px;
height: 24px;
}
.st-page-action-button {
float: left;
margin: 0;
padding: 0;
margin-right: 10px;
min-height: 20px;
border-collapse: collapse;
width: 100px;
}
/* Attach File Interface */
#st-attachments-attachinterface {
font-family: Helvetica, sans-serif;
font-size: 90%;
display: none;
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 2000;
background-image: url('../../images/st/popup/bg.png');
}
#st-attachments-manageinterface {
font-family: Helvetica, sans-serif;
font-size: 90%;
display: none;
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 2000;
background-image: url('../../images/st/popup/bg.png');
}
* html #st-attachments-attachinterface {
background-image: none;
}
* html #st-attachments-manageinterface {
background-image: none;
}
* html .popup-overlay {
background-image: url('../../images/st/popup/bg.png');
background-color: #000;
opacity: .70;
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 2001;
}
#st-attachments-attach-interface {
z-index: 2002;
background-color: #fff;
color: #000;
border: 4px solid #ccc;
padding: 1em;
width: 520px;
margin-left: auto;
margin-right: auto;
margin-top: 10%;
position: absolute;
top: 0px;
}
* html #st-attachments-attach-interface {
}
#st-attachments-attach-formtarget {
width: 0px;
height: 0px;
border: 0;
padding: 0;
margin: 0;
}
#st-attachments-attach-message {
font-size: 90%;
font-family: Verdana, Arial, Helvetica, Sans-Serif;
}
#st-attachments-attach-title {
font-weight: bold;
font-size: 120%;
}
#st-attachments-attach-close {
float: right;
margin-top: 6px;
}
#st-attachments-attach-uploadbutton {
float: right;
margin-right: 6px;
margin-top: 6px;
padding-bottom: 0;
}
#st-attachments-attach-fileprompt {
margin: 0.2em 0 0.4em 0;
padding-bottom: 0px;
}
#st-attachments-attach-submit {
font-size: 90%;
font-weight: bold;
}
#st-attachments-attach-filename {
font-size: 90%;
}
#st-attachments-attach-uploadmessage {
font-weight: bold;
margin-bottom: 1em;
display: none;
}
#st-attachments-attach-error {
font-weight: bold;
color: #f00;
margin-bottom: 1em;
display: none;
}
#st-attachments-attach-list {
display: none;
color: #666;
font-size: 90%;
margin-top: 1em;
margin-bottom: 1em;
border-top: 1px solid #4949BA;
border-bottom: 1px solid #4949BA;
background-color: #F5F5F5;
padding: 3px;
}
.st-attachments-attach-listlabel {
font-size: 90%;
color: #4949BA;
}
/* Queue File Dialog */
#st-attachmentsqueue-interface {
font-family: Helvetica, sans-serif;
font-size: 90%;
display: none;
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
background-image: url('../../images/st/popup/bg.png'); /* Don't forget IE hack for ship! */
z-index: 2000;
}
* html #st-attachmentsqueue-interface {
background-image: none;
}
#st-attachmentsqueue-dialog {
z-index: 2002;
background-color: #fff;
color: #000;
border: 4px solid #ccc;
padding: 1em;
width: 530px;
margin-left: auto;
margin-right: auto;
margin-top: 10%;
position: absolute;
top: 0px;
}
* html #st-attachmentsqueue-dialog {
}
#st-attachmentsqueue-fileprompt {
margin-bottom: 0.4em;
margin-top: 0;
padding-bottom: 0;
}
#st-attachmentsqueue-title {
font-weight: bold;
font-size: 120%;
}
#st-attachmentsqueue-close {
float: right;
margin-top: 6px;
}
#st-attachmentsqueue-uploadbutton {
float: right;
margin-right: 6px;
margin-top: 6px;
padding-bottom: 0;
}
#st-attachmentsqueue-submit {
font-size: 90%;
}
#st-attachmentsqueue-filename {
font-size: 90%;
}
#st-attachmentsqueue-message {
font-size: 90%;
font-family: Verdana, Arial, Helvetica, Sans-Serif;
}
#st-attachmentsqueue-uploadmessage {
font-weight: bold;
margin-bottom: 1em;
display: none;
}
#st-attachmentsqueue-error {
font-weight: bold;
color: #f00;
margin-bottom: 1em;
display: none;
}
#st-attachmentsqueue-list {
display: none;
color: #666;
font-size: 90%;
margin-top: 1em;
margin-bottom: 1em;
border-top: 1px solid #4949BA;
border-bottom: 1px solid #4949BA;
background-color: #F5F5F5;
padding: 3px;
}
.st-attachmentsqueue-listlabel {
font-size: 90%;
color: #4949BA;
}
/* Lists */
tr.st-trbg-even, tr.st-trbg-even td{
background-color: #f3f7f7;
}
tr.w-st-even-row, tr.w-st-even-row td {
background-color: #f3f7f7;
}
.query-results-header-title, .query-results-header-last-edit-by {
text-align: left;
}
.query-results-row-revisions {
text-align: right;
}
.query-results-content {
font-size: 85%;
border-collapse: collapse;
border: 1px dashed #ddd;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}
.query-results-row {
border-collapse: collapse;
border: 1px dashed #ddd;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}
.query-results-row a {
text-decoration: underline;
color: #00f;
}
.query-results-row td {
font-family: Verdana;
padding: 0.3em;
border-left: 1px dashed #ddd;
border-right: 1px dashed #ddd;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
}
.query-results-header-row {
border-collapse: collapse;
border: 1px dashed #ddd;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}
.query-results-header-row a {
text-decoration: underline;
color: #00f;
}
.query-results-header-row th {
font-family: Helvetica;
padding: 0.3em;
border-left: 1px dashed #ddd;
border-right: 1px dashed #ddd;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
}
div.st-actionbutton {
float: left;
}
div#deleteme-st-actions-bar {
clear: both;
margin: 0.8em 20px 0.2em auto;
padding: 0;
}
/* Manage File Interface */
#st-attachments-manage-interface {
z-index: 2002;
background-color: #fff;
color: #000;
border: 4px solid #ccc;
padding: 1em;
width: 520px;
margin-left: auto;
margin-right: auto;
margin-top: 10%;
position: absolute;
top: 0px;
}
#st-attachments-manage-filetable {
height: 150px;
margin: 0;
padding: 0;
width: 100%;
overflow: auto;
border: 1px solid #ccc;
}
#st-attachments-manage-filelisting tbody td {
font-size: 90%;
}
#st-attachments-manage-filelisting {
width: 100%;
border-collapse: collapse;
border: 0;
margin: 0;
padding: 0;
}
#st-attachments-manage-fileheader {
background: #ccc;
font-weight: bold;
border-bottom: 1px black solid;
}
#st-attachments-manage-close {
float: right;
margin-top: 3px;
margin-right: -2px;
font-weight: bold;
}
#st-attachments-manage-delete {
margin-top: 3px;
float: left;
font-weight: bold;
}
.st-attachments-manage-filerow {
border-bottom: 1px solid #ccc;
}
.row-odd {
background-color: #eee;
}
.row-even {
background-color: #fff;
}
.row-on {
background-color: #009 !important;
color: white !important;
}
.row-on a {
color: #fff !important;
}
#st-attachments-manage-deletemessage {
color: red;
}
/* Page tools icons */
#st-pagetools-print {
background: url('../../images/st/pagetools/print.gif')
left center no-repeat;
}
#st-pagetools-email {
background: url('../../images/st/pagetools/email.gif')
left center no-repeat;
}
#st-pagetools-tools {
background: url('../../images/st/pagetools/tools.gif')
left center no-repeat;
}
/*
#st-pagetools-watch {
background: url('../../images/st/pagetools/watch-blue.gif')
left center no-repeat;
}
*/
/* *********** Settings *********** */
#st-settings-pane {
}
* html #settings-pane { font-size: 85%;}
.settings-start-table {
}
* html .settings-start-table { font-size: 90%;}
#st-settings-select {
padding: 0px 10px 10px 10px;
vertical-align: top;
width: 1px;
background-color: #eff1ec;
border: none;
}
#st-settings-section {
padding: 0px 10px 10px 10px;
vertical-align: top;
}
.settings-top-header {
margin-top: 1em;
font-weight: bold;
width: 15em;
}
.settings-header {
margin-top: 1em;
font-weight: bold;
}
.settings-selections {
padding: 0px 0px 0px 20px;
line-height: 1.5em;
}
.settings-selections a:visited, .settings-selections a:active {
color: #0000ff;
}
.settings-link {
clear: both;
display: block;
}
.settings-section-left {
text-align: right;
}
.settings-label {
font-weight: bold;
}
.settings-help {
color: #888;
}
.settings-comment {
}
.users-invite-message {
padding: 0.5em 0.5em 0.5em 2em;
background-color: #eee;
/* This seems necessary to fix an IE bug that sometimes
causes the text in this div to be invisible */
z-index: 1000;
}
.workspace-entry-header {
margin-top: .5em;
font-weight: bold;
}
.workspace-entry {
margin-left: 3em;
}
.workspace-entry-p {
margin-top: .5em;
margin-bottom: .75em;
}
.workspace-subentry {
font-style: italic;
font-weight: bold;
margin-left: 1.5em;
}
.preferences-td {
padding:.5em 0 1.5em 0;
}
.preferences-query {
text-align: left;
}
.preference-radio {
background-color: #cec;
}
.user-settings-listall-headings td {
background-color: #eff3ef;
}
#st-settings-save {
padding-bottom: 0.5em;
}
.standard-button-cancel {
font-weight: bold;
background-color: #71004b;
border-left: 1px solid #aaa;
border-top: 1px solid #aaa;
border-bottom: 2px solid #333;
border-right: 2px solid #333;
color: #f4f3b9;
width: 8em;
}
.standard-button-submit {
font-weight: bold;
background-color: #656084;
border-left: 1px solid #aaa;
border-top: 1px solid #aaa;
border-bottom: 2px solid #333;
border-right: 2px solid #333;
color: #f4f3b9;
width: 8em;
}
#st-settings {
font-family: Verdana, Arial, Helvetica, Sans-Serif;
font-size: 90%;
}
/* Listview Tabs */
#st-listview a:visited {
color: #551a8b;
}
#st-listview-tabs ul {
display: block;
list-style: none outside;
margin: 0 0 0 4em;
padding: 0;
font-family: Helvetica, Arial, Sans-serif;
font-size: 80%;
}
#st-listview-tabs li {
display: block;
float: left;
margin: 0 0.8em 0 0;
padding: 3px 0.6em 0 0.6em;
border: 1px solid #d8d8d8;
border-bottom: 1px solid rgb(128, 169, 243);
background-color: #f4f4f4;
position: relative;
bottom: -2px;
}
#st-listview-tabs li.spacer {
margin: 0 0.8em 0 2em;
}
#st-listview-tabs a {
color: #bbb;
text-decoration: none;
}
#st-listview-tabs li.selected {
background-color: #fff !important;
border: 1px solid rgb(128, 169, 243) !important;
border-bottom: 1px solid #fff !important;
font-weight: bold !important;
}
#st-listview-tabs li.selected a {
color: #000 !important;
}
/* Category List Display */
#st-category-display-links {
margin-bottom: 1em;
font-size: 90%;
}
#st-tag-listbody {
font-family: Helvetica, Verdana, sans-serif;
}
/* Attachments List Display */
#st-attachments-list-body table.button-table {
margin-top: 0.1em;
font-size: 80%;
}
/* ********** PageTools Menu ************** */
div#st-editing-tools {
float: left;
}
div#st-pagetools {
z-index: 300;
font-family: Helvetica, Verdana, sans-serif;
font-size: 10px;
float: right;
margin: 18px 0 0 0em;
color: #000;
vertical-align: bottom;
position: relative;
}
#st-pagetools a {
text-decoration: none;
color: black;
padding-left: 17px;
}
#st-pagetools span {
color: inherit;
padding-left: 17px;
vertical-align: top;
}
#st-pagetools span.st-watchlist-link {
color: inherit;
vertical-align: top;
}
.st-watchlist-link {
cursor: pointer;
}
div#st-pagetools ul.level2 {
z-index: 300;
margin: 0;
padding: 0;
background: white;
border: 1px solid #CCC;
border-width: 0 1px;
}
div#st-pagetools li {
position: relative;
list-style: none;
margin: 0;
float: left;
width: 7em;
line-height: 11px;
}
div#st-pagetools ul ul li:hover {
background: #BFE2FF;
}
div#st-pagetools li a {
display: block;
text-decoration: none;
}
div#st-pagetools>ul a {
width: auto;
}
div#st-pagetools ul ul {
position: absolute;
width: auto;
display: none;
}
div#st-pagetools ul ul li {
line-height: 1.5em;
/* width: 100%; */
width: 14em;
}
.first {
border-top: 1px solid #CCC;
}
.separator {
border-bottom: 1px solid #CCC;
}
div#st-pagetools ul ul li a {
border-bottom: 1px solid #CCC;
padding-left: 15px;
padding-right: 3px;
margin-right: 3px;
border: 0px;
}
div#st-pagetools li.submenu li.submenu:hover {
z-index: 300;
background-color: #BFE2FF;
}
div#st-pagetools ul.level1 li.submenu:hover ul.level2 {
display:block;
}
div#st-pagetools ul.level2 {
top: 1.0em;
left: -9.5em;
}
/*
=head2 Revision List Display
Change these styles to update the page revision list.
*/
#st-revision-list-table {
border-collapse: collapse;
font-size: 85%;
color: #000;
}
.st-page-title-decorator {
color: #C80000;
}
.st-revision-header-emphasis {
color: #C80000;
}
.st-revision-list-compare-button-row {
}
.st-revision-list-compare-button-cell {
padding-top: 0.3em;
text-align: center;
}
.st-revision-list-compare-button {
}
#st-revision-list-header-row {
}
#st-revision-list-header-select {
padding: 6px 2px 2px 2px;
text-align: center;
}
#st-revision-list-header-revision {
padding: 6px 2px 2px 2px;
text-align: left;
}
#st-revision-list-header-edited-by {
padding: 6px 2px 2px 2px;
text-align: center;
}
#st-revision-list-header-date {
padding: 6px 2px 2px 2px;
text-align: center;
}
.st-revision-list-row {
border-collapse: collapse;
border: 1px dashed #ddd;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}
.st-revision-list-row td {
font-family: Verdana;
padding: 0.3em;
border-left: 1px dashed #ddd;
border-right: 1px dashed #ddd;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
}
.st-revision-list-row-select {
padding: 3px 0 2px 0;
text-align: center;
}
.st-revision-list-row-select-old {
}
.st-revision-list-row-select-new {
}
.st-revision-list-row-revision {
}
.st-revision-list-row-revision-link {
}
.st-revision-list-row-edited-by {
}
.st-revision-list-row-date {
}
/* Revision Menu */
#st-pagetools.st-revision-view-bar {
float: left;
}
ul.st-revision-menu {
list-style: none;
margin: 0;
padding: 0.2em;
font-size: 80%;
}
ul.st-revision-menu li {
float: left;
padding: 0 0.4em 0 0.4em;
border-right: thin solid #000000;
}
ul.st-revision-menu li.st-last {
border-right: none;
}
#st-restore-revision-button {
font-size: 80%;
}
/*
=head2 Revision Compare Display
When comparing two revisions of a page, these styles apply.
*/
#st-revision-compare-table {
background-color: #f0f0f0;
}
#st-revision-compare-table td {
background-color: white;
}
.st-revision-compare-old {
background-color: #fdd;
text-decoration: line-through;
}
.st-revision-compare-new {
background-color: #dfd;
font-weight: bold;
}
/* Weblog View */
#st-weblog {
padding: 0;
}
#st-content-weblog-display-width-controller {
}
#st-content-weblog-display-width-controller-nav {
width: 230px;
margin-left: 15px;
border-left: 5px solid #ddd;
margin-top: -1px;
}
#st-weblog-content {
font-family: Verdana, Helvetica, sans-serif;
margin-top: -1px;
margin-bottom: -1px;
border-top: 1px solid #80a9f3;
border-bottom: 1px solid #80a9f3;
}
#st-weblog-title {
font-family: 'Trebuchet MS', Verdana, Helvetica, sans-serif;
font-family: 'Times New Roman', serif;
background-color: #80a9f3;
color: #fff;
font-size: 150%;
font-weight: bold;
padding: 0.2em;
padding-left: 1em;
}
#st-weblog-wikititle {
font-family: Helvetica, Verdana, sans-serif;
font-style: italic;
font-size: 40%;
color: #fff;
margin-bottom: 0.2em;
margin-top: 0.1em;
padding-top: 0;
}
#st-weblog-titletext {
font-family: Helvetica, Verdana, sans-serif;
font-weight: bold;
color: #fff;
}
div.st-weblog-entry {
margin-top: 0.2em;
margin-bottom: 4.8em;
padding: 0 1.5em 0 1.5em;
}
.st-page-title {
clear: both;
}
div.st-weblog-entrytitle span.text {
font-family: Helvetica, Verdana, sans-serif;
font-size: 150%;
font-weight: bold;
color: #000;
}
.st-weblog-entrycontent {
font-family: Verdana, Helvetica, sans-serif;
font-size: 90%;
border-bottom: 1px solid #888;
}
.st-weblog-byline {
float: left;
text-align: left;
font-style: italic;
font-size: 70%;
font-family: Verdana, Helvetica, sans-serif;
}
.st-weblog-post-links {
float: right;
text-align: right;
font-size: 70%;
font-family: Verdana, Helvetica, sans-serif;
}
#st-weblog-archives, #st-weblog-navigation {
position: relative;
float: right;
width: 230px;
}
#st-weblog-archives {
margin-top: 15px;
clear: right;
}
#st-weblog-archives-title, #st-weblog-navigation-title {
margin-left: 15px;
font-family: Helvetica, sans-serif;
font-size: 95%;
font-weight: bold;
color: #999;
border-bottom: 2px solid #f99;
padding-bottom: 5px;
padding-top: 5px;
margin-bottom: 5px;
}
#st-weblog-navigation-content {
margin-left: 15px;
font-size: 80%;
}
#st-weblog-archives ul {
margin: 0;
padding: 0;
}
#st-weblog-archives ul li {
/* list-type: none; */
display: block;
font-size: 80%;
font-family: Helvetica, sans-serif;
padding-left: 15px;
}
#st-weblog-newpost {
padding: 0.5em 0.7em 0.3em 0.3em;
}
#st-weblog-newpost-button {
}
#st-weblog-actionbar-chooseweblog {
float: right;
}
#st-weblog-postbyemail {
font-size: 70%;
font-family: Verdana, Helvetica, sans-serif;
color: #def;
padding-top: 0.4em;
}
#st-weblog-postbyemail-link {
color: #00c;
}
.st-weblog-chooseprompt {
font-size: 90%;
font-family: Verdana, Helvetica, sans-serif;
padding-right: 0.2em;
color: #000;
}
.st-spacer {
padding-right: 0.1em;
padding-left: 0.1em;
}
.st-weblog-preventries {
padding-bottom: 20px;
clear: both;
}
.st-weblog-nextentries {
clear: both;
}
div.st-weblog-entrynav {
margin-top: 0.2em;
margin-bottom: 1.8em;
padding: 0;
}
span.st-weblog-previousentries, span.st-weblog-nextentries {
font-size: 90%;
font-family: Verdana, Helvetica, sans-serif;
padding-left: 1em;
}
/* ******* Page Stats ******** */
#st-usagereport-navbar {
font-size: 80%;
padding: 0;
margin: 0;
}
#st-usagereport-date {
font-weight: bold;
margin-top: 1em;
}
#st-page-usagereport h1 {
font-size: 1.3em;
font-weight: bold;
margin-top: 1.2em;
margin-bottom: 0.3em;
}
#st-page-usagereport h2 {
font-size: 1.1em;
font-weight: bold;
margin-top: 0.8em;
margin-bottom: 0.3em;
}
/* New Page */
#st-newpage-save, #st-newpage-duplicate {
display: none;
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
background: url('../../images/st/popup/bg.png'); /* Don't forget IE hack for ship! */
z-index: 2000;
}
#st-newpage-save-interface {
background-color: #fff;
color: #000;
border: 4px solid #ccc;
padding: 0.5em;
width: 450px;
margin-left: auto;
margin-right: auto;
margin-top: 10%;
position:absolute;
top:0px;
z-index:2003;
}
#st-newpage-duplicate-interface {
background-color: #fff;
color: #000;
border: 4px solid #ccc;
padding: 0.5em;
width: 530px;
margin-left: auto;
margin-right: auto;
margin-top: 10%;
position:absolute;
top:0px;
z-index:2003;
}
#st-newpage-save-title, #st-newpage-duplicate-title {
margin: 0;
padding: 0;
font-weight: bold;
font-family: Helvetica, sans-serif;
font-size: 100%;
}
#st-newpage-save-prompt, #st-newpage-duplicate-prompt {
font-family: Helvetica, sans-serif;
font-size: 90%;
margin-bottom: 0.4em;
}
#st-newpage-save-buttons, #st-newpage-duplicate-buttons {
margin-top: 0.8em;
text-align: right;
}
.st-newpage-duplicate-option {
font-family: Helvetica, sans-serif;
font-size: 90%;
margin: 0;
padding: 0;
}
#st-newpage-duplicate-pagename {
font-size: 90%;
}
.st-newpage-duplicate-emphasis {
background-color: #FFFF00;
font-weight: bold;
}
#st-newpage-save-field-pagename {
margin-bottom: 0;
margin-top: 0.2em;
padding-bottom: 0;
font-size: 90%;
}
#st-newpage-save-tip {
margin-bottom: 0;
margin-top: 1.2em;
padding-bottom: 0;
font-size: 75%;
color: #888;
}
/* Wikitext Styling */
.wiki {
}
.wiki hr {
margin-top: .4em;
margin-bottom: .4em;
}
.wiki .short-rule {
width: 25%;
}
.wiki .medium-rule {
width: 50%
}
.wiki ul,
.wiki ol,
.wiki blockquote {
margin-left: 2em;
padding-left: 0em;
}
.wiki table {
border-collapse: collapse;
}
.wiki td {
border: 1px;
border-style: solid;
padding: .2em;
vertical-align: top;
}
.wiki h1,
.wiki h2,
.wiki h3,
.wiki h4,
.wiki h5,
.wiki h6 {
font-weight: bold;
font-style: normal;
margin-top: 0.1em;
margin-bottom: 8px;
}
.wiki h1 {font-size: 200%;}
.wiki h2 {font-size: 170%;}
.wiki h3 {font-size: 145%;}
.wiki h4 {font-size: 125%;}
.wiki h5 {font-size: 110%;}
.wiki h6 {font-size: 100%;}
.wiki pre {
background-color: #eee; /* XXX */
margin-left: 1em;
margin-right: 1em;
padding: .2em;
}
.wiki .incipient {
text-decoration: none;
border-bottom: 1px dashed;
}
.wiki-include-title {
background-color: #ccccff;
}
.wiki .wiki {
position: relative;
background-color: #ddddff;
border: 1px solid #ccccff;
padding: 3px;
}
.wafl_existence_error {
color: rgb(200,0,0);
border-bottom: 0.2em dashed rgb(200,0,0);
}
#st-edit-mode-container {
}
#st-edit-mode-view {
}
#st-page-editing-uploadbutton {
z-index: 1500;
float: left;
}
/* Comment UI */
body#st-commentui {
background: #ffffff;
}
#st-commentui-container {
}
#st-commentui-container a:visited,
#st-commentui-container a:active {
color: #00f;
}
#st-commentui-notetop {
}
#st-commentui-controls {
}
#st-commentui-savelink {
background-color: #fffebd;
}
#st-commentui-cancellink {
}
#st-commentui-customfield {
}
#st-commentui-customfield .customfield-label {
}
#st-commentui-customfield .customfield-input {
}
#st-commentui-textarea {
padding: 0;
border-style: inset;
border-width: thin;
background-color: #ffd;
color: black;
width: 99%;
height: 150px;
}
/*
=head2 Send Page by Email
Styles for the 'Send Page by Email' popup, accessed from the 'Email' dropdown
menu on the page bar.
*/
#email-page {
background: #ffffff;
font-size: 80%;
}
.email-page-row {
clear: both;
}
.email-page-row-label {
font-weight: bold;
float: left;
width: 5em;
margin-left: 1.2em;
margin-right: 1.2em;
text-align: right;
}
.email-page-row-content {
float: left;
padding-bottom: 1.2em;
}
.email-page-user-select-column {
float: left;
padding-right: 1.2em;
width: 14em;
}
#email-page-user-select-column-center {
width: 10em;
}
.email-page-user-select-label {
text-align: center;
}
#email-page-user-select-add-label {
padding-top: 1em;
}
.email-page-user-select-button-group {
padding-bottom: 2em;
}
.email-page-input {
width: 120px;
clear: both;
display: block;
}
.email-page-select {
width: 175px;
font-size: x-small;
}
#email-page-error-message {
text-align: center;
}
#email-page-buttons-container {
clear: both;
}
#email-page-buttons {
text-align: center;
}
.email-page-input-new {
width: 175px;
}
/* System Status, Red with icon */
#st-system-status-alert {
clear: both;
width: 50%;
margin-left: 25%;
margin-top: 10px;
padding: 5px;
color: #c00;
font-weight: bold;
font-size: 80%;
background: transparent url('../../images/st/system-message/important-note.gif') no-repeat 5px center;
padding-left: 60px;
min-height: 38px;
}
* html #st-system-status-alert {
height: 38px;
}
/* System Status, Green */
#st-system-status {
clear: both;
text-align:center;
width: 80%;
margin-left: 10%;
padding: 8px 0 3px 0;
color: #0a0;
font-family: Arial, Helvetica, sans-serif;
font-size: 80%;
}
.socialtextLogo {
text-align: center;
}
/*}}}*/
/***
|''Name:''|SparklinePlugin|
|''Description:''|Sparklines macro|
***/
//{{{
if(!version.extensions.SparklinePlugin) {
version.extensions.SparklinePlugin = {installed:true};
//--
//-- Sparklines
//--
config.macros.sparkline = {};
config.macros.sparkline.handler = function(place,macroName,params)
{
var data = [];
var min = 0;
var max = 0;
var v;
for(var t=0; t<params.length; t++) {
v = parseInt(params[t]);
if(v < min)
min = v;
if(v > max)
max = v;
data.push(v);
}
if(data.length < 1)
return;
var box = createTiddlyElement(place,"span",null,"sparkline",String.fromCharCode(160));
box.title = data.join(",");
var w = box.offsetWidth;
var h = box.offsetHeight;
box.style.paddingRight = (data.length * 2 - w) + "px";
box.style.position = "relative";
for(var d=0; d<data.length; d++) {
var tick = document.createElement("img");
tick.border = 0;
tick.className = "sparktick";
tick.style.position = "absolute";
tick.src = "data:image/gif,GIF89a%01%00%01%00%91%FF%00%FF%FF%FF%00%00%00%C0%C0%C0%00%00%00!%F9%04%01%00%00%02%00%2C%00%00%00%00%01%00%01%00%40%02%02T%01%00%3B";
tick.style.left = d*2 + "px";
tick.style.width = "2px";
v = Math.floor(((data[d] - min)/(max-min)) * h);
tick.style.top = (h-v) + "px";
tick.style.height = v + "px";
box.appendChild(tick);
}
};
}
//}}}
/***
|''Name:''|CryptoFunctionsPlugin|
|''Description:''|Support for cryptographic functions|
***/
//{{{
if(!version.extensions.CryptoFunctionsPlugin) {
version.extensions.CryptoFunctionsPlugin = {installed:true};
//--
//-- Crypto functions and associated conversion routines
//--
// Crypto "namespace"
function Crypto() {}
// Convert a string to an array of big-endian 32-bit words
Crypto.strToBe32s = function(str)
{
var be = Array();
var len = Math.floor(str.length/4);
var i, j;
for(i=0, j=0; i<len; i++, j+=4) {
be[i] = ((str.charCodeAt(j)&0xff) << 24)|((str.charCodeAt(j+1)&0xff) << 16)|((str.charCodeAt(j+2)&0xff) << 8)|(str.charCodeAt(j+3)&0xff);
}
while (j<str.length) {
be[j>>2] |= (str.charCodeAt(j)&0xff)<<(24-(j*8)%32);
j++;
}
return be;
};
// Convert an array of big-endian 32-bit words to a string
Crypto.be32sToStr = function(be)
{
var str = "";
for(var i=0;i<be.length*32;i+=8)
str += String.fromCharCode((be[i>>5]>>>(24-i%32)) & 0xff);
return str;
};
// Convert an array of big-endian 32-bit words to a hex string
Crypto.be32sToHex = function(be)
{
var hex = "0123456789ABCDEF";
var str = "";
for(var i=0;i<be.length*4;i++)
str += hex.charAt((be[i>>2]>>((3-i%4)*8+4))&0xF) + hex.charAt((be[i>>2]>>((3-i%4)*8))&0xF);
return str;
};
// Return, in hex, the SHA-1 hash of a string
Crypto.hexSha1Str = function(str)
{
return Crypto.be32sToHex(Crypto.sha1Str(str));
};
// Return the SHA-1 hash of a string
Crypto.sha1Str = function(str)
{
return Crypto.sha1(Crypto.strToBe32s(str),str.length);
};
// Calculate the SHA-1 hash of an array of blen bytes of big-endian 32-bit words
Crypto.sha1 = function(x,blen)
{
// Add 32-bit integers, wrapping at 32 bits
add32 = function(a,b)
{
var lsw = (a&0xFFFF)+(b&0xFFFF);
var msw = (a>>16)+(b>>16)+(lsw>>16);
return (msw<<16)|(lsw&0xFFFF);
};
// Add five 32-bit integers, wrapping at 32 bits
add32x5 = function(a,b,c,d,e)
{
var lsw = (a&0xFFFF)+(b&0xFFFF)+(c&0xFFFF)+(d&0xFFFF)+(e&0xFFFF);
var msw = (a>>16)+(b>>16)+(c>>16)+(d>>16)+(e>>16)+(lsw>>16);
return (msw<<16)|(lsw&0xFFFF);
};
// Bitwise rotate left a 32-bit integer by 1 bit
rol32 = function(n)
{
return (n>>>31)|(n<<1);
};
var len = blen*8;
// Append padding so length in bits is 448 mod 512
x[len>>5] |= 0x80 << (24-len%32);
// Append length
x[((len+64>>9)<<4)+15] = len;
var w = Array(80);
var k1 = 0x5A827999;
var k2 = 0x6ED9EBA1;
var k3 = 0x8F1BBCDC;
var k4 = 0xCA62C1D6;
var h0 = 0x67452301;
var h1 = 0xEFCDAB89;
var h2 = 0x98BADCFE;
var h3 = 0x10325476;
var h4 = 0xC3D2E1F0;
for(var i=0;i<x.length;i+=16) {
var j,t;
var a = h0;
var b = h1;
var c = h2;
var d = h3;
var e = h4;
for(j = 0;j<16;j++) {
w[j] = x[i+j];
t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=16;j<20;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=20;j<40;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k2);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=40;j<60;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),(b&c)|(d&(b|c)),w[j],k3);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
for(j=60;j<80;j++) {
w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k4);
e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
}
h0 = add32(h0,a);
h1 = add32(h1,b);
h2 = add32(h2,c);
h3 = add32(h3,d);
h4 = add32(h4,e);
}
return Array(h0,h1,h2,h3,h4);
};
}
//}}}
/***
|''Name:''|DeprecatedFunctionsPlugin|
|''Description:''|Support for deprecated functions removed from core|
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin) {
version.extensions.DeprecatedFunctionsPlugin = {installed:true};
//--
//-- Deprecated code
//--
// @Deprecated: Use createElementAndWikify and this.termRegExp instead
config.formatterHelpers.charFormatHelper = function(w)
{
w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);
};
// @Deprecated: Use enclosedTextHelper and this.lookaheadRegExp instead
config.formatterHelpers.monospacedByLineHelper = function(w)
{
var lookaheadRegExp = new RegExp(this.lookahead,"mg");
lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = lookaheadRegExp.exec(w.source);
if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
var text = lookaheadMatch[1];
if(config.browser.isIE)
text = text.replace(/\n/g,"\r");
createTiddlyElement(w.output,"pre",null,null,text);
w.nextMatch = lookaheadRegExp.lastIndex;
}
};
// @Deprecated: Use <br> or <br /> instead of <<br>>
config.macros.br = {};
config.macros.br.handler = function(place)
{
createTiddlyElement(place,"br");
};
// Find an entry in an array. Returns the array index or null
// @Deprecated: Use indexOf instead
Array.prototype.find = function(item)
{
var i = this.indexOf(item);
return i == -1 ? null : i;
};
// Load a tiddler from an HTML DIV. The caller should make sure to later call Tiddler.changed()
// @Deprecated: Use store.getLoader().internalizeTiddler instead
Tiddler.prototype.loadFromDiv = function(divRef,title)
{
return store.getLoader().internalizeTiddler(store,this,title,divRef);
};
// Format the text for storage in an HTML DIV
// @Deprecated Use store.getSaver().externalizeTiddler instead.
Tiddler.prototype.saveToDiv = function()
{
return store.getSaver().externalizeTiddler(store,this);
};
// @Deprecated: Use store.allTiddlersAsHtml() instead
function allTiddlersAsHtml()
{
return store.allTiddlersAsHtml();
}
// @Deprecated: Use refreshPageTemplate instead
function applyPageTemplate(title)
{
refreshPageTemplate(title);
}
// @Deprecated: Use story.displayTiddlers instead
function displayTiddlers(srcElement,titles,template,unused1,unused2,animate,unused3)
{
story.displayTiddlers(srcElement,titles,template,animate);
}
// @Deprecated: Use story.displayTiddler instead
function displayTiddler(srcElement,title,template,unused1,unused2,animate,unused3)
{
story.displayTiddler(srcElement,title,template,animate);
}
// @Deprecated: Use functions on right hand side directly instead
var createTiddlerPopup = Popup.create;
var scrollToTiddlerPopup = Popup.show;
var hideTiddlerPopup = Popup.remove;
// @Deprecated: Use right hand side directly instead
var regexpBackSlashEn = new RegExp("\\\\n","mg");
var regexpBackSlash = new RegExp("\\\\","mg");
var regexpBackSlashEss = new RegExp("\\\\s","mg");
var regexpNewLine = new RegExp("\n","mg");
var regexpCarriageReturn = new RegExp("\r","mg");
}
//}}}
This page will document my expirience with "Proxmox"<http://pve.proxmox.com/wiki/Main_Page> which you might think as web-based version of [vz-tools].
^ Qucik tips
^^ Console using vncviewer
.pre
proxmox1:~# grep vnc /etc/inetd.conf
5901 stream tcp nowait root /usr/sbin/qm qm vncproxy 101 password-for-this-vnc-connection
.pre
{toc: }
This is somewhat interesting story, because I ended up migrating PVE installation on internal laptop disk to enable dual boot. First, I installed PVE on external USB drive (which wiped out mbr on internal disk, sic!) and than archived all files from it to move it to internal disk.
Installed system had following partitions:
.pre
/dev/mapper/pve-root on /mnt/pve type ext3 (rw)
/dev/sdb1 on /mnt/pve/boot type ext3 (rw)
/dev/mapper/pve-data on /mnt/pve/var/lib/vz type ext3 (rw)
.pre
So I re-created volume grup `pve` and logical volumes.
I have following partitions on my laptop:
.pre
root@tab:~# fdisk -l /dev/hda
Disk /dev/hda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3b7f0ef5
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1305 10482381 83 Linux
/dev/hda2 1306 1436 1052257+ 83 Linux
/dev/hda3 1437 1567 1052257+ 82 Linux swap / Solaris
/dev/hda4 1568 12161 85096305 5 Extended
/dev/hda5 1568 4178 20972826 8e Linux LVM
/dev/hda6 4179 6789 20972826 83 Linux
/dev/hda7 6790 9400 20972826 83 Linux
/dev/hda8 9401 12161 22177701 83 Linux
.pre
and I wanted to use `/dev/hda2` as boot and `/dev/hda5` for lvm
^ lvm
.pre
root@tab:~# pvcreate /dev/hda5
Physical volume "/dev/hda5" successfully created
root@tab:~# vgcreate pve /dev/hda5
Volume group "pve" successfully created
root@tab:~# lvcreate -L 1G -n root pve
Logical volume "root" created
root@tab:~# lvcreate -L 10G -n data pve
Logical volume "data" created
.pre
^ create file systems
.pre
root@tab:~# mke2fs -j -m 0 /dev/hda2
root@tab:~# mke2fs -j -m 0 /dev/pve/root
root@tab:~# mke2fs -j -m 0 /dev/pve/data
.pre
^ mount fs
.pre
root@tab:~# mkdir /mnt/pve/
root@tab:~# mount /dev/pve/root /mnt/pve/
root@tab:~# mkdir /mnt/pve/boot
root@tab:~# mount /dev/hda2 /mnt/pve/boot/
root@tab:~# mkdir -p /mnt/pve/var/lib/vz
root@tab:~# mount /dev/pve/data /mnt/pve/var/lib/vz/
root@tab:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/pve-root 1032088 34104 997984 4% /mnt/pve
/dev/hda2 1035692 34108 1001584 4% /mnt/pve/boot
/dev/mapper/pve-data 10321208 154232 10166976 2% /mnt/pve/var/lib/vz
.pre
^ unpack installation
.pre
root@tab:~# cd /mnt/pve/
root@tab:/mnt/pve# tar xvfj /mnt/usb/proxmox-ve_1.1-3664.tar.bz2
root@tab:/mnt/pve# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/pve-root 1032088 521128 510960 51% /mnt/pve
/dev/hda2 1035692 50868 984824 5% /mnt/pve/boot
/dev/mapper/pve-data 10321208 154268 10166940 2% /mnt/pve/var/lib/vz
.pre
^ grub
add Proxmox target into `/boot/grub/menu.lst` after `END DEBIAN AUTOMAGIC KERNELS LIST`
.pre
root@tab:~# tail -10 /boot/grub/menu.lst
title Debian GNU/Linux, kernel memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
### END DEBIAN AUTOMAGIC KERNELS LIST
title Proxmox Virtual Environment, kernel 2.6.24-2-pve
root (hd0,1)
kernel /vmlinuz-2.6.24-2-pve root=/dev/mapper/pve-root ro
initrd /initrd.img-2.6.24-2-pve
.pre
^ preference df
.pre
proxmox:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/pve/root 2064208 556244 1507964 27% /
/dev/sda2 2063536 52640 1906072 3% /boot
/dev/mapper/pve-data 20642428 407420 20235008 2% /var/lib/vz
.pre
[Lenovo Thinkpad Tablet]
{toc: }
^ EC_battery
https://github.com/dpavlin/linux/blob/thinktabletopensource-2.6.36/drivers/power/EC_battery.c
^^ battery info from shell
.pre
dpavlin@tegra20:~$ cat batt-info.sh
#!/bin/sh
printf 'BatCapacity: %d %%\n' `i2cget -y 5 0x58 0x00 w`
printf 'BatFullCapacity: %d\n' `i2cget -y 5 0x58 0x07 w`
printf 'BatDesignCapacity: %d\n' `i2cget -y 5 0x58 0x08 w`
printf 'ChargerStatus: %d\n' `i2cget -y 5 0x58 0x0b w`
printf 'UsbStatus: %d\n' `i2cget -y 5 0x58 0x5b w`
printf 'voltage: %d\n' `i2cget -y 5 0x58 0x01 w`
printf 'temperature: %d\n' `i2cget -y 5 0x58 0x0a w`
ec_status=`i2cget -y 5 0x58 0x0b w`
case $ec_status in
0x0000) ec_status_dec="discharging" ;;
0x0001) ec_status_dec="charging" ;;
0x0002) ec_status_dec="full" ;;
*) echo "unknown $ec_status" && exit 1
esac
printf 'EC_status: %d [%s]\n' $ec_status $ec_status_dec
dpavlin@tegra20:~$ sudo ./batt-info.sh
BatCapacity: 29 %
BatFullCapacity: 2670
BatDesignCapacity: 3250
ChargerStatus: 1
UsbStatus: 0
voltage: 7477
temperature: 2912
EC_status: 1 [charging]
.pre
^^ kernel 2.6 /sys/EcControl
.pre
shell@android:/sys/EcControl # grep . *
AssetNumber:
BTMAC:6c71d912972f
BatCapacity:66
BatCtlDisable:BatCtlDisable
BatCtlEnable:0
BatCurrent:-21
BatDesignCapacity:3250
BatFullCapacity:2786
BatLifeTime:0
BatLock:ok
BatStatus:Charging
BatteryUpdateMode:-2
BoardID:-258
Brandname:ThinkPad Tablet
ChargeLED:ChargeLED
ChargerStatus:1
Coldboot:0
DeviceStatus:0000000000001000
ECFwStatus:aa
ECRead:0x0c12
ECWrite:ECWrite
ECflashMode:0
ECflashread:B
ECflashwrite:ECflashwrite
EcVer:3f001900
FactoryStatus:INAKRUIN
GPSPower:0
IMEIwithBarcode:ffffffffffffff15
LEDAndroidOff:LEDAndroidOff
MFGBuildDate:2012/10/31
MTMSN:����������������
ManufactureDate:ffff-ff-ff
MicSwitch:2
NBUsbChargingCurrent:65278
OffLED:OffLED
OriStsLED:OriStsLED
PassCode:ECEG
PlanarSN:11S63Y1836Z1ZLFT2A70PT
PowerLED:PowerLED
PsensorPower:2
RebootAfterEcUpdate:RebootAfterEcUpdate
RecoveryMode:RecoveryMode
Reset:Reset
Resume:0
SerialNumber:49834956515650807177804989678086
SerialNumberwithoutBarcode:����������������������
Shutdown:Shutdown
SkuNumber:003f
Suspend:Suspend
SysStatus:1
ThreeGPower:1
UUID:5668546668516867494852664949695065575056546755496857495057555070
UsbStatus:0
WIFIMAC:ffffffffffff
.pre
^^ shell i2c tests
Sensor is not detected in i2cdetect since it returns 00 as first byte.
Arbitration errors on this bus (which are probably caused caused by scanning
other side of i2c mux or parent i2c controller -- I have to re-check this)
break communication with EC.
.pre
linux-2.6/drivers/power/EC_battery.c
# ready?
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x48 w
0x0008
# ready = ret & 0x00000008;
# BatCtlEnable_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x5b w
0x0000
# EcVer_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x30 w
0x3f00
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x31 w
0x2100
# UUID_show
for(i=0;i<16;i++)
{
val32 = i2c_smbus_read_word_data(EC_Bat_device->client,0x60);
val16 = val32 & 0x0000ffff;
TransformToByte(val16, &val8[2*i], &val8[2*i+1]);
msleep(10);
}
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x5768
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x6668
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x6567
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x5456
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x5070
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x5552
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x5651
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x5770
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x6948
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x4949
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x5549
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x6856
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x4966
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x4869
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x6965
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w
0x4854
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x60 w # 17 repeat?
0x5768
# BatCapacity_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x00 w
0x004d
# BatFullCapacity_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x07 w
0x0773
# BatDesignCapacity_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x08 w
0x0965
# BTMAC_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x62 w
0xbd9d
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x62 w
0x68ac
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x62 w
0x742f
## repeat?
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x62 w
0xbd9d
# ChargerStatus_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x0b w
0x0001
# UsbStatus_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x5b w
0x0000
# ECRead_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0xF1 w
0x0c12
# Shutdown_store
i2c_smbus_write_word_data(EC_Bat_device->client,0x52,0);
# Suspend_store
i2c_smbus_write_word_data(EC_Bat_device->client,0x53,0);
# Coldboot_store
Coldboot_val = buffer & 0x0000FFFF;
i2c_smbus_write_word_data(EC_Bat_device->client,0x55,Coldboot_val);
# Resume_store
Resume_val = buffer & 0x0000FFFF;
i2c_smbus_write_word_data(EC_Bat_device->client,0x56,Resume_val);
# RecoveryMode_store
i2c_smbus_write_word_data(EC_Bat_device->client,0x58,val);
# MicSwitch_store
//echo 0 > MicSwitch(front) , echo 1 > MicSwitch(back), echo 2 > MicSwitch(normal)
//echo 3 > MicSwitch(echo cancellation test), echo 4 > MicSwitch(disable echo cancellation)
i2c_smbus_write_word_data(EC_Bat_device->client,0x44,MicSwitch_val);
# ThreeGPower_store
//echo 1 > ThreeGPower(poweron) , echo 0 > ThreeGPower(poweroff), echo 2 > ThreeGPower(backtoOriginstate)
i2c_smbus_write_word_data(EC_Bat_device->client,0x45,ThreeGPower_val);
# enable_ThreeGPower
ThreeGPower_val = 1; # 1 = enable, 0 = disable
i2c_smbus_write_word_data(EC_Bat_device->client,0x45,ThreeGPower_val);
# SerialNumber_show
for(i=0;i<=7;i++) {
val32 = i2c_smbus_read_word_data(EC_Bat_device->client,0x66);
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x66 w # 0
0x5451
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x66 w # 1
0x5468
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x66 w # 2
0x8048
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x66 w # 3
0x5277
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x66 w # 4
0x8290
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x66 w # 5
0x5157
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x66 w # 6
0x4956
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x66 w # 7
0x4983
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x66 w # 0
0x5451
# SkuNumber_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x68 w
0xffff
# LEDAndroidOff_store
i2c_smbus_write_word_data(EC_Bat_device->client,0x5a,0);
# Reset_store
i2c_smbus_write_word_data(EC_Bat_device->client,0x54,0);
# BatCurrent_show
i2c_smbus_read_word_data(EC_Bat_device->client,0x03);
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x03 w
0xff43
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x03 w
0xff42
# BatLifeTime_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x70 w
0x0000
# BoardID_show
root@tegra20:/mnt/nuc/Tegra# i2cget -y 5 0x58 0x32 w
0xfefe
# GPSPower_store
# if(GPS_val == 0) OFF
i2c_smbus_write_word_data(EC_Bat_device->client,0x47,0);
# else if(GPS_val == 1) ON
i2c_smbus_write_word_data(EC_Bat_device->client,0x4a,0);
# PsensorPower_store
//echo 0 > PsensorPower(off), echo 1 > PsensorPower(on), echo 2 > PsensorPower(normal control)
i2c_smbus_write_word_data(EC_Bat_device->client,0x4b, PsensorPower_val);
root@tegra20:/mnt/nuc/Tegra# i2cset -y 5 0x58 0x4b 0x1 w
.pre
This is the home page for Dobrica Pavlinušić's random unstructured stuff.
Welcome to my new unsorted stuff site. If you are here to "learn about rot13"<http://en.wikipedia.org/wiki/ROT13> this might not be the right place.
If you are, however looking latest and/or unsorted snippets which didn't made to "my homepage"<http://www.rot13.org/~dpavlin/> or "blog"<http://blog.rot13.org/> you might be on right place.
| {search: category: projects} | {search: category: howto} | {recent_changes: rot13} |
{fetchrss: http://blog.rot13.org/index.xml}
Here are some quick notes about installation on clean Debian etch machine
This page is aimed towards system administrators, if you want information how to customize design of page take a look at [SocialText CSS design] (which is included on bottom of this page).
{toc: }
^ Helper packages
.pre
sudo apt-get install wv xpdf-utils unrtf unzip links
sudo cpan MP3::Tag
.pre
^ Install source
.pre
svn co https://repo.socialtext.net:8999/svn/socialtext/trunk socialtext
cd socialtext/nlw
# checkout lastest Socialtext::Resting client
svn export --force https://repo.socialtext.net:8999/svn/socialtext-clients/trunk/rest/perl/Socialtext-Resting/lib/Socialtext/ lib/Socialtext/
./configure --socialtext-open 1 --apache-proxy 0 --force-ssl-login 1
make
sudo bash
make install
update-rc.d -f apache-perl remove
update-rc.d st-apache defaults
update-rc.d ceqlotron defaults
/etc/init.d/st-apache start
/etc/init.d/ceqlotron start
.pre
^ Update existing checkout
.pre
cd socaialtext
svn update
cd nlw
./configure --socialtext-open 1 --apache-proxy 0 --force-ssl-login 1
make
make test
sudo make install
sudo /etc/init.d/st-apache stop
sudo /etc/init.d/ceqlotron restart
sudo /etc/init.d/st-apache start
.pre
^ Add new admin user
.pre
sudo -u www-data st-admin create-user --email dpavlin@rot13.org --password wikidream \
--first-name Dobrica --last-name Pavlinusic
sudo -u www-data st-admin add-workspace-admin --email dpavlin@rot13.org
.pre
^ Configuring mailer
^^ postfix
Install and configure postfix for mail delivery
.pre
apt-get install postfix
vi /etc/postfix/main
.pre
Important lines are following:
.pre
alias_maps = hash:/etc/aliases, hash:/etc/aliases.deliver
alias_database = hash:/etc/aliases, hash:/etc/aliases.deliver
.pre
They add `/etc/aliases.deliver` (which SocialText generates with names of wiki workspaces) to configuration.
Next, we need to create `/etc/aliases.deliver.db` which is binary version of database needed for postfix. It's extremly important that `aliases.deliver` file is owned by `www-data` because postfix picks user which will do e-mail delivery based on owner of aliases file. If your owner of `/var/www/socialtext` is some other user than `www-data` you will have to modify following command appropriately:
.pre
# make www-data owner of file
chown www-data:root /etc/aliases.deliver
# allow root group to write in /etc/
chmod g+w /etc/
# create /etc/aliases.deliver.db
sudo postalias /etc/aliases.deliver
.pre
Now restart postfix as `root` user
.pre
/etc/init.d/postfix restart
.pre
^^ crontab
Add following to `/etc/crontab` to refresh aliases database for postfix regularly:
.pre
*/10 * * * * root postalias /etc/aliases.deliver
.pre
^ Handling e-mail errors
.pre
sudo tail /var/log/mail.log | grep st-admin
.pre
> dsn=5.3.0, status=bounced (Command died with status 13: "/usr/local/bin/st-admin deliver-email --workspace bio". Command output: open nlw-stats.log: Permission denied at /usr/local/share/perl/5.8.8/Socialtext/Statistics.pm line 103. END failed--call queue aborted. )
This problem is reported on socialtext-devel list, but no response so far.
.pre
# sudo vi +24 /usr/local/share/perl/5.8.8/Socialtext/Statistics.pm
Readonly my $LOG_NAME => 'nlw-stats.log';
Readonly my $LOG_PATH => $ENV{APACHE_LOG_DIR}
? "$ENV{APACHE_LOG_DIR}/$LOG_NAME"
: "/tmp/$LOG_NAME";
.pre
^ Customize template
Remove "Did you know?" box from dashboard
.pre
sudo vi /usr/share/nlw/template/view/homepage
.pre
Or from your `socialtext/nlw` checkout (so that `make install` will install correct one):
.pre
vi share/template/view/homepage
.pre
^ Fix RSS feed errors
If you are using `{fetchrss http://blog.rot13.org/index.xml}` and having problems with RSS feeds, try to re-installing two perl modules:
.pre
sudo cpan XML::RSS XML::Atom
.pre
^ Change e-mail address of workspace
This configuration change will feed responses to e-mails generated by wiki back into wiki. You might not want to do that! :-)
.pre
st-admin set-workspace-config --workspace rot13 \
email_notification_from_address '"random unstructured stuff" <rot13@wiki.rot13.org>'
.pre
^ Access simple version of page
Every SocialText wiki has a lite version available at http://wiki.example.com/lite/page/:workspace/
For this wiki it's http://saturn.ffzg.hr/lite/page/rot13
^ Configure sane resource usage
Since SocialText wiki is designed to run on dedicated box, it's resource requiements are not for faint-hearted users. However, if you are installing it on machine with constraint hardware (or virtual machine) you might want to decrease number of `apache-perl` server which are created on startup and kept running. Each apache child takes about 80Mb of RAM, so lowering number of children will have beneficial effect on your memory usage.
If you open `/etc/apache-perl/st-httpd.conf` you will see comment that describes command used for generating this configuration. So, let's edit command limits, re-create config and restart apache:
.pre
vi +485 dev-bin/gen-config
dev-bin/gen-config --sitewide --apache-proxy=0 --hostname=saturn.ffzg.hr
/etc/init.d/st-apache reload
.pre
^ Convert RSS feed URLs to absolute
If you need to fetch RSS feeds from remote URLs and those providers create only relative URLs in feeds (like svnweb does) that this patch might help you: {file: FetchRSSPlugin.pm.diff}
It does dirty magic to prepend hostname before URL in feeds making them work from Socialtext wiki which is on different host.
^ Problems with 8-bit UTF-8 encoded characters in URLs
It seems that trunk of socialtext
.pre
Repository Root: https://repo.socialtext.net:8999/svn/socialtext
Repository UUID: 593ce9bc-2028-0410-bb98-c566b643a948
Revision: 6127
Node Kind: directory
Schedule: normal
Last Changed Author: jjp
Last Changed Rev: 6028
Last Changed Date: 2007-12-10 19:38:21 +0100 (Mon, 10 Dec 2007)
.pre
has problems with `CGI.pm` 3.31. As a temporary work-around use {file: backpan.sh} to download `CGI.pm` 3.29 which is known to work.
^ Enable html wafl in workspace
This enables `.html` markup which enables embedded html into wiki page
.pre
st-admin set-workspace-config --workspace razmjenavjestina allows_html_wafl 1
.pre
^ Upgrade to 2.2
There are various problems with this upgrade.
^^ Socialtext::Resting
For a start, you will have to install Socialtext::Resting clinet *in the middle* of `make install` because import of help workspace will fail.
You can get it from https://repo.socialtext.net:8999/svn/socialtext-clients/trunk/rest/perl/Socialtext-Resting
^^ Missing directory
.pre
mkdir /etc/apache-perl/socialtext-conf.d
.pre
^^ Missing skins
http://code.google.com/p/socialtext-skins/wiki/SkinningIssues
.pre
.pre
Problem not yet solved.
----
{include: [SocialText CSS design]}
{toc: }
{file: dove-bootlog.txt}
Xtreme PC LXD8541
Chip PC Linux-based Thinx OS
Product Specifications Xtreme PC LXD8541
Processor • Marvell Dove, Armada 510 800MHZ https://www.kernel.org/doc/html/v5.14/arm/marvell.html#dove-family-application-processor
Memory • 1GB, DDR3 @ 800MHz
Mass Storage • 2GB, High reliability eMMC NAND flash • Optional externally accessed MicroSD slot
Display Support • One DVI-I port
• Display Data Control (DDC) for automatic setting of resolution and refresh rate
Resolutions • Single: Up to 1920x1200 Pixels @ true color (32 bit)
• Dual: Up to 1920x1080 Pixels @ true color (24 bit)
Video Player • Various video codecs, including: DivX HD, H.264 (MPEG4), WMV9/VC1
• Up to 1080p local browser Flash support
Audio Support • High Definition Audio Codec
• Stereo Audio Output - 3 mm (1/8 inch) Audio-Out Jack; 16-bit Stereo, 96KHz
sample rate
• Microphone Input - 3 mm (1/8 inch), 8 bit
• Software volume / mute control
Input / Output ports • 6 x USB 2.0 ports (2 front, 4 back)
^ serial
https://forum.doozan.com/read.php?2,67954,76099#msg-76099
Koen Re: Debian on Chip PC LXD8941 January 04, 2019 02:33PM
Inside there is both a 4 pin and a 6 pin header. The 4 pin is the UART connection. With the power button towards you and the DVI connection away from you the connections are as follows: GND, TX, RX, VCC (from left to right).
^ kernel
Linux Kernel 6.6.2 MVEBU package and Debian armhf rootfs
https://forum.doozan.com/read.php?2,32146
.pre
mkfs.ext3 -L rootfs /dev/sda1
mount /dev/sda1 /mnt/sda1/
cd /mnt/sda1/
tar xvf /nuc/armada/Debian-6.6.2-mvebu-tld-1-rootfs-bodhi.tar.bz2
.pre
3. Create uImage with DTB appended.
.pre
root@nuc:/mnt/sda1# cd boot/
root@nuc:/mnt/sda1/boot# cp -a uImage uImage.orig
root@nuc:/mnt/sda1/boot# cp -a zImage-6.6.2-mvebu-tld-1 zImage.fdt
root@nuc:/mnt/sda1/boot# cat dts/dove-chip-lxd8941.dtb >> zImage.fdt
root@nuc:/mnt/sda1/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-6.6.2-mvebu-tld-1 -d zImage.fdt uImage
Image Name: Linux-6.6.2-mvebu-tld-1
Created: Tue Dec 19 18:00:34 2023
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5193798 Bytes = 5072.07 KiB = 4.95 MiB
Load Address: 00008000
Entry Point: 00008000
.pre
insert usb stick into back 4 usb ports, front 2 won't find storage device on usb
abort u-boot over serial and issue boot from usb:
.pre
setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial
usb start; ext2load usb 0:1 0x3000000 /boot/uImage; ext2load usb 0:1 0x4000000 /boot/uInitrd
bootm 0x3000000 0x4000000
.pre
^ video output
DRM and framebuffer are not currently (as of 6.6) supported in upstream kernel according to messages at
forum, but dove-chip-lxd8941.dts doesn't include lcd power and dove-hp-t5335z.dts does.
Let's try to boot with this dts but this does not work.
^ u-boot enviroment
^^ fw_printenv
.pre
root@dove:~# cat /etc/fw_env.config
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd1 0x000000 0x010000
.pre
^^ setup boot from usb
.pre
root@dove:~# fw_setenv bootusb 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial ; usb start; ext2load usb 0:1 0x3000000 /boot/uImage; ext2load usb 0:1 0x4000000 /boot/uInitrd ; bootm 0x3000000 0x4000000'
root@dove:~# fw_printenv bootcmd
bootcmd=run bootmmc
root@dove:~# fw_setenv bootcmd bootusb
.pre
fw_setenv this doesn't work from booted debian system, re-try over serial on u-boot prompt:
.pre
MIC>> printenv usbboot
usbboot=usb start; sleep 3; ext2load usb 0:1 0x2000000 /boot/uImage; run usbargs;bootm 0x2000000
MIC>> setenv usbboot 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial ; usb start; ext2load usb 0:1 0x3000000 /boot/uImage; ext2load usb 0:1 0x4000000 /boot/uInitrd ; bootm 0x3000000 0x4000000'
MIC>> printenv usbboot
usbboot=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial ; usb start; ext2load usb 0:1 0x3000000 /boot/uImage; ext2load usb 0:1 0x4000000 /boot/uInitrd ; bootm 0x3000000 0x4000000
MIC>> saveenv
Saving Environment to SPI Flash...
Erasing 0xc0000 - 0xd0000: [Done]
Writing to SPI flash: [Done]
MIC>> setenv bootcmd run usbboot
MIC>> saveenv
Saving Environment to SPI Flash...
Erasing 0xc0000 - 0xd0000: [Done]
Writing to SPI flash: [Done]
.pre
^ power button
seemes like it's on gpio 25
.pre
apt install gpiod
root@dove:/home/dpavlin# gpioget 0 0 1 2 3 4 5 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
1 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0
root@dove:/home/dpavlin# gpioget 0 0 1 2 3 4 5 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
1 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0
root@dove:/home/dpavlin# gpiomon 0 25
event: FALLING EDGE offset: 25 timestamp: [ 1466.369262333]
event: FALLING EDGE offset: 25 timestamp: [ 1466.632278096]
event: RISING EDGE offset: 25 timestamp: [ 1467.188375662]
event: RISING EDGE offset: 25 timestamp: [ 1468.390585489]
event: FALLING EDGE offset: 25 timestamp: [ 1470.143645190]
event: RISING EDGE offset: 25 timestamp: [ 1471.752436499]
event: FALLING EDGE offset: 25 timestamp: [ 1473.233499601]
event: RISING EDGE offset: 25 timestamp: [ 1474.560678725]
.pre
{toc: }
^ links
* bios upgrade http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=MIGR-70652
* hard drive firmware http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-63685
* http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk
^ grub2 memdisk config
.pre
menuentry "HD firmware update" {
linux16 /memdisk iso
initrd16 /fwsh33.iso
}
menuentry "BIOS update" {
linux16 /memdisk iso
initrd16 /7wuj39uc.iso
}
.pre
^ mount image
.pre
dpavlin@x200:~$ sudo fdisk -l -u /boot/bios.img
You must set cylinders.
You can do this from the extra functions menu.
Disk /boot/bios.img: 0 MB, 0 bytes
64 heads, 32 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/boot/bios.img1 * 32 47103 23536 4 FAT16 <32M
.pre
calculate offset
.pre
dpavlin@x200:~$ echo '32*512' | bc
16384
.pre
and mount it
.pre
dpavlin@x200:~$ sudo mount /boot/bios.img /tmp/bios/ -o loop,offset=16384 -t vfat
.pre
{toc}
ChinaChip CC1800-A
http://www.dingux.com/2011/03/running-code-on-ga330.html
^ dmesg
.pre
[164083.920115] usb 1-1: new high-speed USB device number 14 using ehci-pci
[164084.069506] usb 1-1: New USB device found, idVendor=07c4, idProduct=a4a5
[164084.069513] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=1
[164084.069516] usb 1-1: SerialNumber: A00A00A00A00
[164084.075555] usb-storage 1-1:1.0: USB Mass Storage device detected
[164084.109544] usb-storage 1-1:1.0: Quirks match for vid 07c4 pid a4a5: 420
[164084.132100] scsi5 : usb-storage 1-1:1.0
[164085.142318] scsi 5:0:0:0: Direct-Access ONDA MP4 PLAYER PQ: 0 ANSI: 0
[164085.142774] scsi 5:0:0:1: Direct-Access ONDA MP4 PLAYER PQ: 0 ANSI: 0
[164085.143181] sd 5:0:0:0: Attached scsi generic sg1 type 0
[164085.143560] sd 5:0:0:1: Attached scsi generic sg2 type 0
[164085.143877] sd 5:0:0:0: [sdb] 16179200 512-byte logical blocks: (8.28 GB/7.71 GiB)
[164085.145277] sd 5:0:0:0: [sdb] Write Protect is off
[164085.145287] sd 5:0:0:0: [sdb] Mode Sense: 00 06 00 00
[164085.147025] sd 5:0:0:0: [sdb] Asking for cache data failed
[164085.147032] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[164085.147930] sd 5:0:0:1: [sdc] Attached SCSI removable disk
[164085.152030] sdb:
[164085.155629] sd 5:0:0:0: [sdb] Attached SCSI removable disk
.pre
^ firmware extracting
* tools from http://forum.xda-developers.com/showpost.php?p=28329544&postcount=1
.pre
dpavlin@x200:/x200/Onda-VX575HD/imgRePacker_W201_L100$ ./imgrepacker ../ftp.onda.cn/download/driver/oamp3/VX575HD/VX575HD_V1.02.img
imgRePacker (version 1.00 linux)
LiveSuit's firmware image unpacker/packer
(c) RedScorpio, Moscow, 2012
RedScorpio@land.ru
==========================[ START ]==========================
--- Firmware unpacking ---
File "../ftp.onda.cn/download/driver/oamp3/VX575HD/VX575HD_V1.02.img" was read
- image.cfg creating -
image.cfg created
Can't check "sys_config"
- Files extracting -
"eFex/sys_config.fex" extracted
"eFex/split_c43a2a92-a8ed-4f92-abdb-ca0d5d29666d.bin" decrypted
"eFex/tools.fex" extracted
"eFex/fes_1.fex" extracted
"eFex/fes_2.fex" extracted
"eFex/fes.fex" extracted
"eGon/Boot0.bin" decrypted
"eGon/Boot1.bin" decrypted
"eFex/HW_scan.axf" decrypted
"eFex/update_Boot0.axf" decrypted
"eFex/update_Boot1.axf" decrypted
"eFex/fet_restore.axf" decrypted
"eFex/magic_cr_start.fex" extracted
"eFex/magic_cr_end.fex" extracted
"eFex/magic_de_start.fex" extracted
"eFex/magic_de_end.fex" extracted
"eFex/fed_nand.axf" decrypted
"setup/zdisk.img" decrypted
- Internal image (zdisk.img) processing -
- zdisk.cfg creating -
zdisk.cfg created
"eFex/verify.fex" extracted
"setup/rootfs.az" extracted
- AZXMAGIC processing (rootfs.az) -
AZKey don't found in "rootfs.az" (use "/8600" key for packing)
rootfs.az.iso.lzma created
-------------------------------------------------------------
Run XZ archivator (unpacking)
-------------------------------------------------------------
rootfs.az.iso created
"setup/startup1.bmp" extracted
"setup/startup2.bmp" extracted
"setup/startup3.bmp" extracted
"setup/startup4.bmp" extracted
- Filelist.txt creating -
Filelist.txt created
==========================[ STOP ]==========================
.pre
^ firmware download and binwalk
.pre
dpavlin@x200:/x200/Onda-VX575HD$ wget -m ftp://ftp.onda.cn/download/driver/oamp3/VX575HD/VX575HD*.img
dpavlin@x200:/x200/Onda-VX575HD/ftp.onda.cn/download/driver/oamp3/VX575HD$ binwalk -B -H -G *.img
Scan Time: 2015-01-30 18:29:59
Target File: VX575HD_VX585_FLASH_TOOLS.img
MD5 Checksum: 99b941b405409a829ada43eee3736532
DECIMAL HEXADECIMAL HEURISTIC ENTROPY ANALYSIS
--------------------------------------------------------------------------------
2048 0x800 Moderate entropy data, best guess: compressed, size: 17408, 102 low entropy blocks
34816 0x8800 High entropy data, best guess: encrypted, size: 65536, 0 low entropy blocks
105472 0x19C00 Moderate entropy data, best guess: compressed, size: 25600, 5 low entropy blocks
151552 0x25000 High entropy data, best guess: encrypted, size: 32768, 0 low entropy blocks
211968 0x33C00 High entropy data, best guess: encrypted, size: 21504, 0 low entropy blocks
236544 0x39C00 Moderate entropy data, best guess: compressed, size: 140288, 7 low entropy blocks
384000 0x5DC00 High entropy data, best guess: encrypted, size: 16384, 0 low entropy blocks
415744 0x65800 Moderate entropy data, best guess: compressed, size: 56320, 2 low entropy blocks
494592 0x78C00 Moderate entropy data, best guess: compressed, size: 56320, 2 low entropy blocks
579584 0x8D800 Moderate entropy data, best guess: compressed, size: 53248, 2 low entropy blocks
655360 0xA0000 High entropy data, best guess: encrypted, size: 9106432, 0 low entropy blocks
9782272 0x954400 High entropy data, best guess: encrypted, size: 13312, 0 low entropy blocks
9816064 0x95C800 High entropy data, best guess: encrypted, size: 13312, 0 low entropy blocks
.pre
* https://www.mp4nation.net/forum/onda-vx575hd-t10249.html
* https://www.mp4nation.net/forum/onda-vx575hd-t10249s30.html
VX575HD v1.02 beta version of the firmware
Updated 2009-09-24
Support Type VX575HD
1. Add files to copy, paste, cut function;
2. New e-book reading function of vertical screen;
3. New Sleep off function;
4. Added support for Traditional Chinese support
firmware download > ftp://ftp.onda.cn/download/driver/oamp3 ... _V1.02.img (right click > save as..)
livesuite download > ftp://ftp.onda.cn/download/driver/oamp3 ... veSuit.rar (right click > save as..)
Note:
1. Firmware upgrade must upgrade tool, please download the firmware upgrade tool file.
2. Firmware upgrade method, see the firmware upgrade tool documentation.
3. Test version of the firmware, there may be BUG, only for experienced users to download a trial.
{toc: }
^ X300 dongle
* [Altera] EPM3064A TC44-10N ftp://ftp.altera.com/outgoing/download/bsdl/3064at44.bsd
* LD1117A L33AUD
^^ JTAG
I took picture of both sides of board, corrected it using perspective tool in gimp and added layers with VCC (5V and 3.3V) and GND (checked with unimer continuity test).
{image: x300_dongle-jtag.jpg}
JTAG pinout doesn't match silkscreen designation of pin 1 (it's rotated). It also doesn't have VCC pin connected, so you need to supply 5V power via other means (I used PS/2 connector).
[Bus Blaster] jtag try:
.pre
jtag> cable jtagkey vid=0x0403 pid=0x6010 interface=0
Connected to libftd2xx driver.
jtag> detect
IR length: 10
Chain length: 1
Device Id: 00010111000001100100000011011101 (0x170640DD)
Manufacturer: Altera (0x0DD)
Part(0): EPM3064A (0x7064)
Stepping: 1
Filename: /usr/local/share/urjtag/altera/epm3064a/epm3064a
jtag> print chain
No. Manufacturer Part Stepping Instruction Register
-------------------------------------------------------------------------------------------------------------------
* 0 Altera EPM3064A 1 BYPASS BYPASS
# IMPORTANT: load signal aliases for this package
jtag> include /usr/local/share/urjtag/altera/epm3064a/t44
# get values of all pins
jtag> instruction SAMPLE/PRELOAD
jtag> shift ir
jtag> shift dr
jtag> dr
010010111010111010010111010010010010111111111010111010
111010010010010111010010010010010010010010010010010010
010010010010010010010010010010010010010010010010010010
010010010010010111010111010010
(0x0000000000000000000000000000000024924924924975D2)
jtag> print chain
No. Manufacturer Part Stepping Instruction Register
-------------------------------------------------------------------------------------------------------------------
* 0 Altera EPM3064A 1 SAMPLE/PRELOAD BSR
jtag> get signal IO2
IO2 = 1
jtag> get signal IO3
IO3 = 1
jtag> get signal IO43
IO43 = 1
jtag> get signal IO44
IO44 = 1
# toggle single pin
jtag> instruction EXTEST
jtag> shift ir
jtag> print chain
No. Manufacturer Part Stepping Instruction Register
-------------------------------------------------------------------------------------------------------------------
* 0 Altera EPM3064A 1 EXTEST BSR
jtag> set signal IO10 out 0
jtag> shift dr
# re-read values of all pins
jtag> instruction SAMPLE/PRELOAD
jtag> shift ir
jtag> shift dr
jtag> get signal IO10
IO10 = 0
.pre
^^ SVF programming
.pre
jtag> svf /blue-zfs/FPGA/Altera-x300/x300_dongle/output_files/dongle1.svf stop progress
detail: Parsing 20/520 ( 3%)warning: unimplemented mode 'ABSENT' for TRST
detail: Parsing 520/520 (100%)detail:
detail: Scanned device output matched expected TDO values.
.pre
^^ VHDL to toggle pins
Toggle pins on all four sides of CPLD and create additional two images with all one and all zero for easy test where pin is
{file: dongle1.vhd}
Then I connected logic analyzer on pins and tried different svf files (all-0, all-1, left, bottom, right, top) to locate which pin change depending on image loaded. To isolate pins I used EXTEST and toggled pins.
^^ RJ45
{image: rj45-pins.jpg} {image: Pro050-rj45.png}
| pin | pull | cable |
| 1 | | GND |
| 2 | 1 | VGA? |
| 3 | 0 | IO? |
| 4 | 1 | VGA? |
| 5 | 0 | IO? |
| 6 | 1 | VGA? |
| 7 | | IO10 |
| 8 | | 5V |
^^ PS2
{include: [PS2]}
Keyboard (left, purple)
| pin | IO |
| 1 (data) | IO43 |
| 5 (clock) | IO44 |
Mouse (right, green)
| pin | IO |
| 1 (data) | IO34 |
| 5 (clock) | IO35 |
^ Audio jack
R2R D2A
all measurements are done on Hantek 2090 with 500mV/div setting which may account for some accuracy errors
^^ channel 1
| state | min | max |
| off | 64.17 mV | 95.54 mV |
| IO23 | 1.664 V | 1.696 V |
| IO22 | 864 mv | 895 mV |
| IO21 | 472 mV | 503 mV |
| IO20 | 283 mV | 299 mV |
| IO19 | 189 mv | 221 mV |
^^ channel 2
| state | min | max |
| off | 3.3 | 50 mV |
| IO33 | 113 mV | 144 mV |
| IO31 | 207 mV | 254 mV |
| IO28 | 395 mV | 442 mV |
| IO27 | 803 mV | 850 mV |
| IO25 | 1.603 V | 1.635 V |
I have been backing up whole disk image from Eee PC, and mounting it using loop file system to access partition in it. However, I have problems with GNU fdisk which reports 4Gb image as:
.pre
Disk /backup/eee/hda: 3 GB, 3997486080 bytes
255 heads, 63 sectors/track, 486 cylinders, total 7807590 sectors
Units = sectors of 1 * 512 = 512 bytes
.pre
Device Boot Start End Blocks Id System
/backup/eee/hda1 63 4803435 2409718 83 Linux
/backup/eee/hda2 4819563 7759395 1469947 83 Linux
/backup/eee/hda3 7775523 7775460 0 c FAT32 LBA
/backup/eee/hda4 7791588 7791525 0 ef EFI FAT
For a start, disk size is wrong:
.pre
$ ls -al hda
-rwxrwxrwx 1 dpavlin root 4001292288 2008-01-20 00:59 hda
.pre
And then, even more wrong, offsets of partition seem to be wrong. When same image is examined using fdisk from `util-linux`, sectors are reported like this:
.pre
Disk hda: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x332b332a
.pre
Device Boot Start End Blocks Id System
hda1 63 4819499 2409718+ 83 Linux
hda2 4819500 7775459 1477980 83 Linux
hda3 7775460 7791524 8032+ c W95 FAT32 (LBA)
hda4 7791525 7807589 8032+ ef EFI (FAT-12/16/32)
And this is correct (let's ignore size for now). I can verify this by mounting second file system as:
.pre
sudo mount hda 1 -o loop,offset=`expr 4819500 \* 512`
.pre
This seems to be off-by-one error. There is "bug reported against Debian package"<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=442332> which seems related, but than again, in my case I'm examining same disk image.
Schematics and service manual for i9250: {file: Samsung_i9250_schem_sm.rar}
{toc: }
.pre
127|root@maguro:/ # cat /proc/cpuinfo
Processor : ARMv7 Processor rev 10 (v7l)
processor : 0
BogoMIPS : 1194.24
processor : 1
BogoMIPS : 1194.24
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10
Hardware : Tuna
Revision : 0009
Serial : 014994b30201c013
.pre
^ BLE
* https://github.com/metc/galaxy-nexus-ble
^ GSM modem over serial port
* https://github.com/2b-as/xgoldmon
^ HID keyboard
* https://github.com/pelya/android-keyboard-gadget
^ Unlegacy Android
ASOP for OMAP4 devices:
https://forum.xda-developers.com/galaxy-nexus/development/rom-omap4-aosp-project-t3334574
https://github.com/Unlegacy-Android/
^^ kernel
http://unlegacy-android.cf/
https://github.com/Unlegacy-Android/android_kernel_samsung_tuna
.pre
dpavlin@klin:/virtual/android/galaxy-nexus$ git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/
dpavlin@klin:/virtual/android/galaxy-nexus/omap$ git checkout -b asop-7.1 unlegacy/aosp-7.1
dpavlin@klin:/virtual/android/galaxy-nexus/omap$ make tuna_defconfig ARCH=arm
dpavlin@klin:/virtual/android/galaxy-nexus/omap$ cp include/linux/compiler-gcc4.h include/linux/compiler-gcc5.h
dpavlin@klin:/virtual/android/galaxy-nexus/omap$ make -j9 ARCH=arm CROSS_COMPILE=arm-none-eabi-
.pre
^ OMAP4 USB boot
Somewhat interesting things that I can take a look at some time in the future:
* https://github.com/swetland/omap4boot
** newer(ish) version is on https://github.com/dmitry-pervushin/usbboot-omap4
To compile it needs following change:
.pre
dpavlin@nuc:/nuc/Galaxy-Nexus-i9250/usbboot-omap4$ git diff
diff --git a/Makefile b/Makefile
index 2d10c73..9ea9461 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ BINDIR ?= $(DESTDIR)/usr/bin
DATADIR ?= $(DESTDIR)/usr/share/usbboot
DOCDIR ?= $(DESTDIR)/usr/share/doc/usbboot
-BOARD ?= panda
+BOARD ?= tuna
TARGET_CC := $(TOOLCHAIN)gcc
TARGET_LD := $(TOOLCHAIN)ld
diff --git a/tools/usb-linux.c b/tools/usb-linux.c
index e3492a1..09c40de 100755
--- a/tools/usb-linux.c
+++ b/tools/usb-linux.c
@@ -10,7 +10,7 @@ int linux_usb_init(void)
r = libusb_init(&ctx);
if (r != 0)
return r;
- libusb_set_debug(ctx,0x1);
+ //libusb_set_debug(ctx,0x1);
return 0;
}
.pre
^ Odin
* http://glassechidna.com.au/heimdall/
^ serial
* https://wiki.postmarketos.org/wiki/Serial_debugging#USB_debug_cable
{image: Nexus-usb-debug.png}
| Device | Codename | Resistor (R3) | Connected VCC |
| Google Galaxy Nexus (GSM) | samsung-maguro | 619K ohm | No |
| Samsung Galaxy Mini 2 | samsung-s6500d | 530K ohm | No |
| Samsung Galaxy S4 Mini LTE | samsung-i9195 | 619K ohm | No |
| Samsung Galaxy S5 | samsung-klte | 619K ohm | No |
It seems that other suggestion is 150k from https://redmine.replicant.us/projects/replicant/wiki/SamsungSerial - I will have to test which value works
^ UART modes
* https://wiki.postmarketos.org/wiki/Micro-USB_Interface_Controller
| Resistance | Jig | Boot |
| 150k | Inactive | Inactive |
| 523k | Active | Inactive |
| 619k | Active | Active |
.pre
RID_USB_OTG_MODE, /* 0 0 0 0 0 GND USB OTG Mode */
RID_AUD_SEND_END_BTN, /* 0 0 0 0 1 2K Audio Send_End Button*/
RID_AUD_REMOTE_S1_BTN, /* 0 0 0 1 0 2.604K Audio Remote S1 Button */
RID_AUD_REMOTE_S2_BTN, /* 0 0 0 1 1 3.208K Audio Remote S2 Button */
RID_AUD_REMOTE_S3_BTN, /* 0 0 1 0 0 4.014K Audio Remote S3 Button */
RID_AUD_REMOTE_S4_BTN, /* 0 0 1 0 1 4.82K Audio Remote S4 Button */
RID_AUD_REMOTE_S5_BTN, /* 0 0 1 1 0 6.03K Audio Remote S5 Button */
RID_AUD_REMOTE_S6_BTN, /* 0 0 1 1 1 8.03K Audio Remote S6 Button */
RID_AUD_REMOTE_S7_BTN, /* 0 1 0 0 0 10.03K Audio Remote S7 Button */
RID_AUD_REMOTE_S8_BTN, /* 0 1 0 0 1 12.03K Audio Remote S8 Button */
RID_AUD_REMOTE_S9_BTN, /* 0 1 0 1 0 14.46K Audio Remote S9 Button */
RID_AUD_REMOTE_S10_BTN, /* 0 1 0 1 1 17.26K Audio Remote S10 Button */
RID_AUD_REMOTE_S11_BTN, /* 0 1 1 0 0 20.5K Audio Remote S11 Button */
RID_AUD_REMOTE_S12_BTN, /* 0 1 1 0 1 24.07K Audio Remote S12 Button */
RID_RESERVED_1, /* 0 1 1 1 0 28.7K Reserved Accessory #1 */
RID_RESERVED_2, /* 0 1 1 1 1 34K Reserved Accessory #2 */
RID_RESERVED_3, /* 1 0 0 0 0 40.2K Reserved Accessory #3 */
RID_RESERVED_4, /* 1 0 0 0 1 49.9K Reserved Accessory #4 */
RID_RESERVED_5, /* 1 0 0 1 0 64.9K Reserved Accessory #5 */
RID_AUD_DEV_TY_2, /* 1 0 0 1 1 80.07K Audio Device Type 2 */
RID_PHONE_PWD_DEV, /* 1 0 1 0 0 102K Phone Powered Device */
RID_TTY_CONVERTER, /* 1 0 1 0 1 121K TTY Converter */
RID_UART_CABLE, /* 1 0 1 1 0 150K UART Cable */
RID_CEA936A_TY_1, /* 1 0 1 1 1 200K CEA936A Type-1 Charger(1) */
RID_FM_BOOT_OFF_USB, /* 1 1 0 0 0 255K Factory Mode Boot OFF-USB */
RID_FM_BOOT_ON_USB, /* 1 1 0 0 1 301K Factory Mode Boot ON-USB */
RID_AUD_VDO_CABLE, /* 1 1 0 1 0 365K Audio/Video Cable */
RID_CEA936A_TY_2, /* 1 1 0 1 1 442K CEA936A Type-2 Charger(1) */
RID_FM_BOOT_OFF_UART, /* 1 1 1 0 0 523K Factory Mode Boot OFF-UART */
RID_FM_BOOT_ON_UART, /* 1 1 1 0 1 619K Factory Mode Boot ON-UART */
RID_AUD_DEV_TY_1_REMOTE, /* 1 1 1 1 0 1000.07K Audio Device Type 1 with Remote(1) */
RID_AUD_DEV_TY_1_SEND = RID_AUD_DEV_TY_1_REMOTE , /* 1 1 1 1 0 1002K Audio Device Type 1 / Only Send-End(2) */
RID_USB_MODE, /* 1 1 1 1 1 Open USB Mode, Dedicated Charger or Accessory Detach */
.pre
{image: usbid_allresistorvalues.png}
^ PostmarketOS
.pre
dpavlin@nuc:/nuc/pmbootstrap$ ./pmbootstrap.py install --no-fde
[17:54:17] *** (1/5) PREPARE NATIVE CHROOT ***
[17:54:18] *** (2/5) CREATE DEVICE ROOTFS ("samsung-maguro") ***
[17:54:23] (rootfs_samsung-maguro) install
[17:54:27] (rootfs_samsung-maguro) install
[17:54:30] (rootfs_samsung-maguro) write /etc/os-release
[17:54:30] (rootfs_samsung-maguro) mkinitfs samsung-maguro
[17:54:34] *** SET LOGIN PASSWORD FOR: 'dpavlin' ***
New password:
Retype new password:
passwd: password updated successfully
[17:54:43] NOTE: No valid keymap specified for device
[17:54:46] *** (3/5) PREPARE INSTALL BLOCKDEVICE ***
[17:54:47] (native) create samsung-maguro.img (361M)
[17:54:47] (native) mount /dev/install (samsung-maguro.img)
[17:54:47] (native) partition /dev/install (boot: 31M, root: the rest)
[17:54:47] (native) format /dev/installp2
[17:54:48] (native) mount /dev/installp2 to /mnt/install
[Tue Sep 25 17:55:21 2018] EXT4-fs (loop0p2): mounted filesystem with ordered data mode. Opts: (null)
[17:54:48] (native) format /dev/installp1 (boot, ext2), mount to /mnt/install/boot
[Tue Sep 25 17:55:21 2018] EXT4-fs (loop0p1): mounting ext2 file system using the ext4 subsystem
[Tue Sep 25 17:55:21 2018] EXT4-fs (loop0p1): mounted filesystem without journal. Opts: (null)
[17:54:48] *** (4/5) FILL INSTALL BLOCKDEVICE ***
[17:54:48] (native) copy rootfs_samsung-maguro to /mnt/install/
[17:54:53] *** (5/5) FLASHING TO DEVICE ***
[17:54:53] Run the following to flash your installation to the target device:
[17:54:53] * pmbootstrap flasher flash_rootfs
[17:54:53] Flashes the generated rootfs image to your device:
[17:54:53] /nuc/pmbootstrap-work/chroot_native/home/pmos/rootfs/samsung-maguro.img
[17:54:53] (NOTE: This file has a partition table, which contains /boot and / subpartitions. That way we don't need to change the partition layout on your device.)
[17:54:53] * pmbootstrap flasher flash_kernel
[17:54:53] Flashes the kernel + initramfs to your device:
[17:54:53] /nuc/pmbootstrap-work/chroot_rootfs_samsung-maguro/boot
[17:54:53] (NOTE: fastboot also supports booting the kernel/initramfs directly without flashing. Use 'pmbootstrap flasher boot' to do that.)
[17:54:53] * If the above steps do not work, you can also create symlinks to the generated files with 'pmbootstrap export' and flash outside of pmbootstrap.
[17:54:53] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[17:54:53] Done
dpavlin@nuc:/nuc/pmbootstrap$ alias pmbootstrap=/nuc/pmbootstrap/pmbootstrap.py
dpavlin@nuc:/nuc/pmbootstrap$ pmbootstrap flasher flash_rootfs
[17:57:10] (native) flash rootfs image
< waiting for any device >
[Tue Sep 25 17:59:17 2018] usb 2-3.1: new high-speed USB device number 22 using xhci_hcd
[Tue Sep 25 17:59:17 2018] usb 2-3.1: New USB device found, idVendor=18d1, idProduct=4e30, bcdDevice= 1.00
[Tue Sep 25 17:59:17 2018] usb 2-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Tue Sep 25 17:59:17 2018] usb 2-3.1: Product: Android 1.0
[Tue Sep 25 17:59:17 2018] usb 2-3.1: Manufacturer: Google, Inc
[Tue Sep 25 17:59:17 2018] usb 2-3.1: SerialNumber: 014994B00C01A013
target didn't report max-download-size
Erasing 'system'...
OKAY [ 0.047s]
Sending 'system' (369664 KB)...
OKAY [ 50.498s]
Writing 'system'...
OKAY [ 26.436s]
Finished. Total time: 77.024s
[18:00:02] NOTE: chroot is still active (use 'pmbootstrap shutdown' as necessary)
[18:00:02] Done
dpavlin@nuc:/nuc/pmbootstrap$ [Tue Sep 25 19:24:27 2018] usb 2-3.1: USB disconnect, device number 22
[Tue Sep 25 19:24:27 2018] usb 2-3.1: new high-speed USB device number 23 using xhci_hcd
[Tue Sep 25 19:24:27 2018] usb 2-3.1: unable to get BOS descriptor
[Tue Sep 25 19:24:27 2018] usb 2-3.1: New USB device found, idVendor=0451, idProduct=d010, bcdDevice= 0.00
[Tue Sep 25 19:24:27 2018] usb 2-3.1: New USB device strings: Mfr=33, Product=37, SerialNumber=0
[Tue Sep 25 19:24:27 2018] usb 2-3.1: Product: OMAP4440
[Tue Sep 25 19:24:27 2018] usb 2-3.1: Manufacturer: Texas Instruments
[Tue Sep 25 19:24:30 2018] usb 2-3.1: USB disconnect, device number 23
.pre
^ u-boot
* https://github.com/Ksys-labs/uboot-tuna
over the years, I accumulated few thinkpads, so here are some relative measurements between them
^ T22
^ T42
.pre
t42:~# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.60GHz
stepping : 6
microcode : 0x18
cpu MHz : 600.000
cache size : 2048 KB
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe bts est tm2
bogomips : 1196.15
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:
t42:~# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1232 MB in 2.00 seconds = 616.23 MB/sec
Timing buffered disk reads: 100 MB in 3.02 seconds = 33.09 MB/sec
.pre
https://github.com/imx6-dongle
https://github.com/imx6-dongle/wiki/wiki
https://github.com/imx6-dongle/wiki/wiki/GK802-hardware
* kernel 4.4 https://github.com/dpavlin/linux-udoo
* u-boot https://github.com/dpavlin/uboot-imx6dongle
{toc: }
.pre
Bus 001 Device 045: ID 15a2:0054 Freescale Semiconductor, Inc. i.MX6Q SystemOnChip in RecoveryMode
.pre
^ chroot
.pre
root@nuc:/tmp/n3# cp `which qemu-arm-static` usr/bin/
root@nuc:/tmp/n3# chroot .
root@nuc:/# uname -a
Linux nuc 4.4.0-1-amd64 #1 SMP Debian 4.4.4-1 (2016-03-07) armv7l GNU/Linux
root@nuc:/# file /bin/bash
/bin/bash: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=1a8601b954c83a01d91298d0f2f8f61ca033ebdd, stripped
.pre
^ u-boot
^^ compile
https://github.com/imx6-dongle/wiki/wiki/U-Boot-basics
.pre
dpavlin@nuc:/nuc/imx6/uboot-imx6dongle$
sudo apt-get install make gcc-arm-none-eabi libusb-1.0
export ARCH=arm
export CROSS_COMPILE=arm-none-eabi-
make gk802_config
make
.pre
^^ dut
.pre
pi@rpi2 ~/imx6/uboot-imx6dongle $ git remote -v
origin https://github.com/imx6-dongle/uboot-imx6dongle (fetch)
origin https://github.com/imx6-dongle/uboot-imx6dongle (push)
pi@rpi2 ~/imx6/uboot-imx6dongle $ make gk802_config
Configuring for gk802 - Board: gk802, Options: IMX_CONFIG=board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
pi@rpi2 ~/imx6/uboot-imx6dongle $ sudo apt-get install libusb-1.0
make gk802_config tools
sudo ./tools/imxboot /nuc/imx6/uboot-imx6dongle/u-boot.imx
.pre
^^ boot
.pre
CPU: Freescale i.MX6Q rev1.1 at 792 MHz
CPU: Temperature 12 C, calibration data: 0x5834de7d
Reset cause: POR
Board: MX6Q-gk802
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
enable_hdmi: setup HDMI monitor
Display: HDMI (1024x768)
In: serial
Out: serial
Err: serial
.pre
^ kernel
^^ sources
* https://github.com/imx6-dongle/linux-imx
* https://github.com/patrykk/linux-udoo
* https://github.com/xobs/novena-linux
^^ compile kernel 4.4
.pre
dpavlin@klin:/klin/imx6/linux-imx$ git remote -v
boundarydevices https://github.com/boundarydevices/linux-imx6 (fetch)
boundarydevices https://github.com/boundarydevices/linux-imx6 (push)
gk802 https://github.com/imx6-dongle/linux-imx.git (fetch)
gk802 https://github.com/imx6-dongle/linux-imx.git (push)
origin https://github.com/xobs/novena-linux (fetch)
origin https://github.com/xobs/novena-linux (push)
patrykk https://github.com/patrykk/linux-udoo (fetch)
patrykk https://github.com/patrykk/linux-udoo (push)
dpavlin@klin:/klin/imx6/linux-imx$ git checkout -b patrykk/4.4-5.0.11.p7.3 remotes/patrykk/4.4-5.0.11.p7.3
dpavlin@klin:/klin/imx6/linux-imx$ sudo apt-get install firmware-realtek
dpavlin@klin:/klin/imx6/linux-imx$ git checkout -b imx_3.10.17_1.0.0_ga remotes/gk802/imx_3.10.17_1.0.0_ga
Checking out files: 100% (34524/34524), done.
Branch imx_3.10.17_1.0.0_ga set up to track remote branch imx_3.10.17_1.0.0_ga from gk802.
Switched to a new branch 'imx_3.10.17_1.0.0_ga'
dpavlin@klin:/klin/imx6/linux-imx$ make gk802_defconfig
export ARCH=arm
export CROSS_COMPILE=arm-none-eabi-
LOADADDR=0x10800000 make uImage modules -j 4
#mkdir /tmp/boot
#INSTALL_PATH=/tmp/boot make install
mkdir /tmp/modules
INSTALL_MOD_PATH=/tmp/modules make modules_install
.pre
^^ compile 3.0.x
https://github.com/imx6-dongle/wiki/wiki
http://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/arm-linux-gnueabi/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabi.tar.xz
^ pinout
{image: gk802-pinout.jpg}
*older stuff*
Hi-802 is clone of this one
* http://www.geekbuying.com/item/Unii-GK802-Fresscale-i-MX6-Quad-Dure-Cortex-A9-DDR3-1GB-RAM-8GB-ROM-TV-Box-Dongle----Black-312807.html
* http://forum.xda-developers.com/showthread.php?t=2044045
* FULL micro-sd images http://www.armtvtech.com/armtvtechforum/viewtopic.php?f=51&t=1113
* root http://www.armtvtech.com/armtvtechforum/viewtopic.php?f=50&t=226&start=80#p4516
* production, motherboard pictures http://www.hiapad.com/?p=1994
^ Serial
http://www.armtvtech.com/armtvtechforum/viewtopic.php?f=50&t=226&start=210#p6651
http://www.junklet.net/test/gk802_serial.jpg
^ XBMC
external player http://www.xbmcandroid.com/2012/12/10/how-to-install-xbmc-nightly-with-external-player-on-the-mk802-stick-or-other-android-tv-devices/
^ Linux
http://www.junklet.net/test/gk802_boot.txt
https://wiki.linaro.org/Boards/MX6QSabreLite
http://boundarydevices.com/linaro-12-09-for-i-mx6/
{toc: }
If you are not into hardware [Android development] is better page for you.
^ Service manual
{file: HTC Dream SM (A04).pdf}
^ How to brick your phone
* downgrade do "RC29"<http://code.google.com/p/android-roms/downloads/detail?name=DREAIMG-RC29.zip> to get root
* this will install 1.22 radio
* install AmonRA
* be inpatient and flash DangerSPL
* correct way would be to first flash Radio 2.22 (?)
^ How to unbrick your phone
* http://cafe.mobil.hr/threads/68894-HTC-G1-Dream-JTAG-i-serijski-kabel-za-unbrick
* http://wiki.cyanogenmod.com/index.php?title=JTAG_for_Dream/Magic
^ Serial cable
^^ ExtUSB connector
* http://handy-datenkabel.de/deutsch/produkte/datenstecker/index_usb.htm
* http://www.sparkfun.com/commerce/product_info.php?products_id=9167
{image: 09167-01.jpg}
{image: 09167-02.jpg}
* RS232<->TTL http://bestcelldist.com/htc_dream_serial_data_cable.html
* Upute: http://www.hackolog.com/2010/08/06/constructing-the-android-g1-serial-to-usb-cable/
* *swap rx/tx*: https://groups.google.com/group/android-platform/browse_thread/thread/439d3f3af7a88a09/a0eb2d193975fbb4?lnk=gst&q=serial+pinout#a0eb2d193975fbb4
* *3.3V* or 2.8V: http://forum.xda-developers.com/showpost.php?p=4271889&postcount=28
^^ Nokia DKU-5
http://pinouts.ru/forum/index.php?PHPSESSID=f3d7d4eae7be553fc6847f227bda1330&topic=358.msg5390#msg5390
I got an ark3116-based DKU-5 cable, and its pin layout is as following.
1: blue (ground-shield)
3: yellow
4: orange (3.3v)
6: green (rx)
7: white (tx)
8: red (ground)
I haven't tested them yet, so before connecting them, check the voltage btw orange and red.
*use only non-nokia CA-42 calble* http://www.dealextreme.com/details.dx/sku.45715
^^ home-made alternative
sim+cable strip
http://forum.xda-developers.com/showpost.php?p=7236424&postcount=724
^^ output
.pre
x200:/virtual/openmoko# ./neocon/neocon /dev/ttyUSB0
[Open /dev/ttyUSB0]
boot reason: PM_KPD_PWR_KEY_ON_RT_ST
(PowerOn Status,Boot Reason)=(1,1)
NAND_FLASH_READ_ID : SAMSUNG_256MB_FLASH_128MB_SDRAM
ARM9_BOOT_MODE1
.pre
^ Boot loader
* http://forum.xda-developers.com/wiki/index.php?title=Hermes_BootLoader
* http://forum.xda-developers.com/wiki/index.php?title=Hermes_BootLoaderPassword
* http://forum.xda-developers.com/wiki/index.php?title=Hermes_RadioBootLoader
* IMEI check: http://forum.xda-developers.com/showthread.php?t=280819&page=2
^ JTAG
{image: G1_JTAG_signals.jpg}
http://forum.xda-developers.com/showpost.php?p=6169249&postcount=481
{image: arm-jtag-layout.gif}
^^ JTAG board with connector
* http://www.multi-com.pl/index.php/en_US,details,id_pr,7183,menu_mode,categories.html
* info: {file: jtag_htc_dream_google_g1_en.pdf}
{image: product_1283419791_423993952_HTC_G1_RIFF_big.png}
^^ Low-power WIGGLER
* {file: LPT2LVJTAG_WIG.pdf}
* http://forum.xda-developers.com/showpost.php?p=6055979&postcount=412
* {file: dream_wiggler.cfg.txt}
^^ Info
* http://forum.xda-developers.com/wiki/index.php?title=JTAG_Softboot_for_Magic_and_Dream
* http://www.htcmania.com/mediawiki/index.php/JTAG_DREAM_AND_MAGIC
* http://forum.xda-developers.com/showthread.php?p=6100287&highlight=radata#post6100287
* http://www.omnia-repair.com/forum/topic/htc-dream-g1-jtag
* debugging: http://forum.xda-developers.com/showthread.php?t=591048&page=67
Reflash whole device: http://www.omnia-repair.com/forum/topic/htc-dream-g1-jtag/page/2
^^ OpenMoko Debug Board
* http://wiki.openmoko.org/wiki/Debug_Board_v3
{image: 800px-Neo1973_debugboard_v3_top.jpg}
^ ROM
http://code.google.com/p/htc-flasher/
^^ Radio
* http://nah6.com/~itsme/cvs-xdadevtools/xda2nbftool/parsegsmv2.pl
^^ recovery.img
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images
^ Stats
camera+power
.pre
DREAM PVT 320 ENG S-OFF
HBOOT-1.33.2005 (DREA10000)
CPLD-4
RADIO-2.22.19.261
Apr 20 2009, 15:30:43
.pre
^ Board testpoints
Pictures are too large to be opened in browser!
* {file: dream_main_pcb.zip}
{toc: }
^ Nano 3.0 Atmega328P-AU
http://dx.com/p/arduino-nano-v3-0-81877
but it doesn't work without bootloader
http://club.dx.com/forums/forums.dx/threadid.1185512
http://club.dx.com/forums/forums.dx/threadid.1218851
^^ avrdude
.pre
dpavlin@blue:~$ avrdude -c buspirate -P /dev/ttyUSB0 -p m328p -v
avrdude: Version 5.11.1, compiled on Mar 24 2013 at 00:54:55
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/dpavlin/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : buspirate
AVR Part : ATMEGA328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : BusPirate
Description : The Bus Pirate
Detecting BusPirate...
avrdude: buspirate_readline(): #
avrdude: buspirate_readline(): RE
avrdude: buspirate_readline(): Bus Pirate v3.b clone w/different PIC
avrdude: buspirate_readline(): Firmware v6.1 r1676 Bootloader v4.4
avrdude: buspirate_readline(): DEVID:0x044F REVID:0x3003 (24FJ64GA004 A3)
avrdude: buspirate_readline(): http://dangerousprototypes.com
avrdude: buspirate_readline(): HiZ>
**
BusPirate: using BINARY mode
BusPirate binmode version: 1
BusPirate SPI version: 1
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as 7
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as 7
avrdude: safemode: Fuses OK
BusPirate is back in the text mode
avrdude done. Thank you.
.pre
^ bootloader update
^^ bus pirate
http://dangerousprototypes.com/docs/Bus_Pirate_AVR_Programming
But *which* bootloader to use? (hint: not optiboot!)
.pre
dpavlin@blue:~$ ard-parse-boards nano328 bootloader.file
ATmegaBOOT_168_atmega328.hex
.pre
Ok, now flash it!
.pre
dpavlin@blue:~$ avrdude -c buspirate -P /dev/ttyUSB0 -p m328p -U flash:w:/usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex
Detecting BusPirate...
**
BusPirate: using BINARY mode
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex"
avrdude: input file /usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex auto detected as Intel Hex
avrdude: writing flash (32670 bytes):
Writing | ################################################## | 100% 56.84s
avrdude: 32670 bytes of flash written
avrdude: verifying flash memory against /usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex:
avrdude: load data flash data from input file /usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex:
avrdude: input file /usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex auto detected as Intel Hex
avrdude: input file /usr/share/arduino/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex contains 32670 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 55.22s
avrdude: verifying ...
avrdude: 32670 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
.pre
After re-flash using bus pirate as ISP from Arduino GUI fuses changed:
.pre
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 5
avrdude: safemode: Fuses OK
.pre
^^ usbasp bootloader update
.pre
Sun Jan 12 11:27:34 2020] usb 8-2: new low-speed USB device number 4 using uhci_hcd
[Sun Jan 12 11:27:34 2020] usb 8-2: New USB device found, idVendor=16c0, idProduct=05dc, bcdDevice= 1.02
[Sun Jan 12 11:27:34 2020] usb 8-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Sun Jan 12 11:27:34 2020] usb 8-2: Product: USBasp
[Sun Jan 12 11:27:34 2020] usb 8-2: Manufacturer: www.fischl.de
dpavlin@x200:~$ avrdude -v -patmega328p -cusbasp
avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/dpavlin/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : usbasp
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as FD
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:DA, L:FF)
avrdude done. Thank you.
.pre
^^^ flash ond nano bootloader
this is old nano bootloader, it doesn't work on 115200 but on 57600 with avrdude
.pre
dpavlin@x200:~$ avrdude -v -patmega328p -cusbasp -U flash:w:/tmp/nuc/opt/arduino/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex
.pre
^^^ flash optiboot
.pre
dpavlin@x200:~$ avrdude -v -patmega328p -cusbasp -U flash:w:/tmp/nuc/opt/arduino/hardware/arduino/avr/bootloaders/optiboot/optiboot_atmega328.hex
.pre
^ add bus pirate to arduino GUI
http://taylanayken.wordpress.com/2011/05/04/using-bus-pirate-with-arduino-ide/
.pre
root@blue:~# grep buspirate /usr/share/arduino/hardware/arduino/programmers.txt
buspirate.name=The Bus Pirate
buspirate.communication=serial
buspirate.protocol=buspirate
.pre
^ Simulators/Emulators
^^ emulino
console output, somewhat large network on github
https://github.com/ghewgill/emulino
^^ simuino
ncurses interface, single stepping, doesn't have source control link, can't compile it
http://code.google.com/p/simuino/
^^ emulare
Requres .net, need to test it with mono
http://emulare.sourceforge.net/
^^ simavr
* http://gitorious.org/simavr
* https://github.com/buserror-uk/simavr (more up-to-date according to mailing list)
* https://groups.google.com/forum/#!forum/simavr
^ programming sketches
* https://github.com/nickgammon/arduino_sketches
^ DebugWire protocol
http://www.ruemohr.org/docs/debugwire.html
^ Internal ADC reference
https://github.com/SensorsIot/ADC_Test/blob/master/ADC_Test.ino
I guess that you "already know everything about this"<http://thomer.com/howtos/nstx.html>. However, here is a list of changes specific to me:
* I wanted everything to be automatic: just `/etc/init.d/nstxcd start` and I *should* be ready to go
* I use dnsmasq for local DNS proxy (with cacheing) so my configuration use `/etc/resolv.conf-upstream`
^ Server setup
More or less standard, expect for fact that my DNS server has multiple IP addresses and I *do* want to run `bind` on some of them. So I added something like:
.pre
# /etc/bind/named.conf
options {
listen-on {
1.2.3.4;
}
}
.pre
Configuring `nstx` is straightforward:
.pre
# /etc/default/nstx
NSTX_DOMAIN="tunnel.example.com"
start_nstxd=yes
ifup_tun=tun0
NSTX_IFACE="1.2.3.4"
.pre
Rest of the setup is same as in "original instructions"<http://thomer.com/howtos/nstx.html>.
^ Client setup
Here comes the fun part.
.pre
# /etc/network/interfaces
iface tun0 inet static
address 10.0.0.2
netmask 255.0.0.0
mtu 500 # optional, may solve ssh problems
post-up route add -host `grep nameserver /etc/resolv.conf-upstream |head -1|awk '{print $2}'` gw `netstat -rn | grep ^0.0.0.0 | awk '{ print $2 }'` ; route del default ; route add -net default gw 10.0.0.1
post-down dhclient
.pre
`post-up` part is modified so that DNS server doesn't have to be in same network segment as my IP address (as it often isn't).
.pre
# /etc/default/nstx
NSTX_DOMAIN="tunnel.example.com"
NSTX_DNS_SERVER=`grep nameserver /etc/resolv.conf-upstream |head -1|awk '{print $2}'`
start_nstxcd=yes
ifup_tun=tun0
.pre
Since I don't want to start `nstxcd` on each startup (because I don't need it always) I did:
.pre
sudo update-rc.d -f nstx remove
sudo update-rc.d -f nstxc remove
.pre
With this, I can get IP address and just do `/etc/init.d/nstxcd start` and I'm ready to go...
^ pictures
^^ position of plastic clips to unclip after removing screws
{file: innobox-v80-case-clips-20210522_192312.jpg}
^^ top of board
{file: innobox-v80-top-20210522_192339.jpg}
^^ bottom of board
{file: innobox-v80-back-20210522_192256.jpg}
^ software version
Hardware version: 1.0
Active image: 2
Firmware image 1: 1.0.839
Firmware image 2: 1.1.966
Checksum of image 1: 34e4b3948d00a869d961283510a7eb08
Checksum of image 2: a6e08754c908c237d1539cb143611697
Firmware bootloader: 1.9
CRC of bootloader: a6e08754c908c237d1539cb143611697
^ serial
4 pins, pin 1 marked with triangle
1: TX
2: RX
3: GND
4: 3V3 (?)
^ serial output
(partial)
.pre
BGA IC
Xtal:1
DDR3 init.
DRAMC init done.
Calculate size.
DRAM size=128MB
Set new TRFC.
7512DRAMC V1.2.2 (0)
EN751221 at Fri Apr 16 11:48:25 CST 2021 version 1.9 free bootbase
Memory size 128MB
Set SPI Clock to 50 Mhz
spi_nand_probe: mfr_id=0xc8, dev_id=0x21
Using Flash ECC.
Detected SPI NAND Flash : _SPI_NAND_DEVICE_ID_F50L1G, Flash Size=0x8000000
bmt pool size: 81
BMT & BBT Init Success
>>>> [get_env_info] hw_id:InnboxV80_PW2
>>>> [set_gpio_define] g_hw_id:InnboxV80_PW2
Reset button GPIO is: 0
Press any key in 3 secs to enter boot command mode.
............................................................
Invalid Power GPIO, just return and don't turn on Power LED
NAND FLASH
>>>> CTC: boot_flag_addr: 53e0fff; flag: 1 version_addr:53e1000 version:1.9<FF><FF><FF><FF>
==> boot flag = 1
Decompress to 80002000 free_mem_ptr=80E00000 free_mem_ptr_end=807B0000
from slave
Uncompressing [LZMA] ... done.
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.18.21 (iskratel@2d7d74f016e9) (gcc version 4.6.3 (Buildroot 2015.08.1) ) #3 SMP Fri Apr 16 11:32:58 CST 2021
ISPRAM0: PA=00770000,Size=00010000,enabled
Config7: 0x80080500
memsize:120MB
EcoNet EN751221 SOC prom init
bootconsole [early0] enabled
CPU0 revision is: 00019558 (MIPS 34Kc)
Determined physical RAM map:
memory: 077fe000 @ 00002000 (usable)
Wasting 64 bytes for tracking 2 unused pages
Zone ranges:
Normal [mem 0x00002000-0x077fffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x00002000-0x077fffff]
Initmem setup node 0 [mem 0x00002000-0x077fffff]
Detected 1 available secondary CPU(s)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
PERCPU: Embedded 9 pages/cpu @810f3000 s5664 r8192 d23008 u36864
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 30478
Kernel command line: es=1
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Writing ErrCtl register=0002e01a
Readback ErrCtl register=0002e01a
nmi base is 81124200
Memory: 110280K/122872K available (7640K kernel code, 1290K rwdata, 1624K rodata, 304K init, 551K bss, 12592K reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:64
tc3162_time_init: Init bus timeout and watchdog
plat_set_irq_affinity: cpu 0
plat_set_irq_affinity: cpu 0 vpe_id 0
plat_set_irq_affinity: irq_vpe0 1 irq_vpe1 0, irq = 10
plat_set_irq_affinity: irq num 10
plat_set_irq_affinity: cpu 0
plat_set_irq_affinity: cpu 0 vpe_id 0
plat_set_irq_affinity: irq_vpe0 1 irq_vpe1 0, irq = 33
plat_set_irq_affinity: irq num 33
CPU frequency 900.00 MHz
plat_time_init: Entered, mips_timer_ack ptr is [80006dd4]
Using 200.000 MHz high precision timer.
r4k_clockevent_init: setup_irq OK, irq is [31]
console [ttyS0] enabled
console [ttyS0] enabled
bootconsole [early0] disabled
bootconsole [early0] disabled
Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
pid_max: default: 32768 minimum: 301
.pre
^ boot loader
.pre
bldr> ?
? Print out help messages.
help Print out help messages.
go Booting the linux kernel.
decomp Decompress kernel image to ram.
memrl <addr> Read a word from addr.
memwl <addr> <value> Write a word to addr.
dump <addr> <len> Dump memory content.
jump <addr> Jump to addr.
flash <dst> <src> <len> <oob> Write to flash from src to dst(oob: write nand oob if 1).
imginfo Show images info.
spinand_rwtest Flash Test
bdstore <flash dst> <bin src> Do backdoor config store
bdshow Show backdoor config
bdswitch[1|0] Enable or disable backdoor function
ddrcalswitch[1|0] Enable or disable ddr calibration funciton
drambistswitch[0|1|2] disable or enable, and quick or normal test
xmdm <addr> <len> Xmodem receive to addr.
miir <phyaddr> <reg> Read ethernet phy reg.
miiw <phyaddr> <reg> <value> Write ethernet phy reg.
cpufreq <freq num> / <m> <n> Set CPU Freq <156~450>(freq has to be multiple of 6)
ipaddr <ip addr> Change modem's IP.
httpd Start Web Server
mtd
bldr> bdshow
back door config is not support NAND Flash
.pre
{image: linux-containers.png}
This are notes for my LXC workshop, in state of flux
{toc: }
^ Cgroups
* http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
* http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html
* http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/ch01.html
* Resource allocation using cgroups http://blip.tv/file/4773168
^^ Systemd
* systemd, beyond init http://www.youtube.com/watch?v=TyMLi8QF6sw
launchd alterntive, somilar to inetd, but for unix sockets (mostly)
^ LXC
Virtual Servers and Checkpoint/Restart in Mainstream Linux http://lxc.sourceforge.net/doc/sigops/appcr.pdf
* you don't have hardware virtualization (netbooks, anyone?)
** http://lxc.teegra.net/
** http://en.gentoo-wiki.com/wiki/LXC
** http://sysadvent.blogspot.com/2010/12/day-1-linux-containers-lxc.html
* Amazon EC2
** http://www.phenona.com/blog/using-lxc-linux-containers-in-amazon-ec2/
* Running X
** http://blog.ikibiki.org/2011/04/05/Running_X_from_LXC/
* LVM integration
** http://s3hh.wordpress.com/2011/03/30/one-more-lxc-clone-update/
^ LXC inside KVM for testing
* http://sysadmin-cookbook.rot13.org/#lxc_kvm
^^ setup KVM LXC test machine
* http://www.landley.net/lxc/01-setup.html
^^^ Step 1: Create a root filesystem for the KVM system.
* http://sysadmin-cookbook.rot13.org/#01_create_kvm_root_sh 3m12.426s
^^^ Step 2: Build a kernel for KVM, with container support.
* http://sysadmin-cookbook.rot13.org/#02_build_kvm_kernel_sh 8m22.248s
^^^ Step 3: Boot the result under QEMU or KVM
* http://sysadmin-cookbook.rot13.org/#03_boot_kvm_sh
^^^ Step 4: ssh into the KVM instance.
.pre
ssh root@127.0.0.1 -p 9876
.pre
^^^ Step 5: Set up a simple busybox-based container under the KVM system.
.pre
wget http://busybox.net/downloads/binaries/latest/busybox-i686 -O busybox
chmod +x busybox
echo -e "lxc.utsname = container\nlxc.network.type = empty" > container.conf
PATH=$(pwd):$PATH lxc-create -f container.conf -t busybox -n container
.pre
^^^ Step 6: Launch the container
.pre
lxc-start -n container
# console is broken, so start another
lxc-console -n container
.pre
^^^ Step 7: Stop the container, and the KVM system.
.pre
lxc-stop -n container
# remove container
lxc-destroy -n container
.pre
^^ Setup networking
* http://www.landley.net/lxc/02-networking.html
^^^ Step 1: Add a TAP interface to the Laptop.
.pre
# FIXME change username
tunctl -u dpavlin -t kvm0
ifconfig kvm0 192.168.254.1 netmask 255.255.255.0
echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
.pre
^^^ Step 2: Launch KVM with two ethernet interfaces.
.pre
kvm -m 1024 -kernel ../01-setup/linux-2.6.*/arch/x86/boot/bzImage -no-reboot \
-hda ../01-setup/squeeze.ext3 -append "root=/dev/hda rw panic=1" \
-net nic,model=e1000 -net user -redir tcp:9876::22 \
-net nic,model=e1000 -net tap,ifname=kvm0,script=no
.pre
^^^ Step 3: Set up a new container in the KVM system.
.pre
root@kvm:~# cat > busybox.conf << EOF
lxc.utsname = busybox
lxc.network.type = phys
lxc.network.flags = up
lxc.network.link = eth1
#lxc.network.name = eth0
EOF
PATH=$(pwd):$PATH lxc-create -f busybox.conf -t busybox -n busybox
lxc-start -n busybox
.pre
.pre
root@kvm:~# lxc-console -n busybox
ifconfig eth1 192.168.254.2 netmask 255.255.255.0
route add default gw 192.168.254.1
.pre
^^^ Step 4: Fun with routing.
On host, bring up loopback alias in KVM network:
.pre
dpavlin@x200:~$ sudo ifconfig lo:1 10.0.2.200 netmask 255.255.255.0
.pre
busybox container can reach it, while KVM can't !
^ network hints
^^ prepare host machine
^^ macvlan
* aliased IP at eth devel
* new device with own mac *with* offloading
* can't communicate with other containers or host (< 2.6.33)
lxc.network.type=macvlan
lxc.network.link=eth0
lxc.network.flags=up
ip link add link <phys> name <vif> address <mac address> type macvlan mode (bridge|vepa|private)
ip link add link bond200 name bond200:0 address 00:aa:bb:cc:dd:ee type macvlan mode bridge
ip -d show link bond200:0
lxc.network.type = macvlan
lxc.network.macvlan.mode = bridge
lxc.network.flags = up
lxc.network.link = bond200
lxc.network.name = eth7
lxc.network.mtu = 1500
lxc.network.ipv4 = 192.168.90.11/24
lxc.network.hwaddr = 4a:49:43:49:79:0B
^^ veth
.pre
sudo apt-get install bridge-utils dnsmasq
# setup hints
sysctl -w net.ipv4.ip_forward=1
ptables -t nat -A POSTROUTING -o wlan0 -j SNAT --to-source=WLAN0_IP
# or for nat
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
.pre
lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up
# name inside container
lxc.network.name = eth0.12
lxc.network.mtu = 1500
lxc.network.ipv4 = 10.60.0.12/23
lxc.network.hwaddr = AC:DE:48:00:00:0C
# name host interface for bridge
lxc.network.veth.pair = veth12
^^^ host-only bridge
.pre
$ cat /etc/network/interfaces
auto br0
iface br0 inet static
bridge_ports dummy0
bridge_maxwait 0
address 172.16.16.1
netmask 255.255.255.0
.pre
^^^ pseudo-random mac?
http://en.wikipedia.org/wiki/Mac_address
x2:xx:xx:xx:xx:xx
x6:xx:xx:xx:xx:xx
xA:xx:xx:xx:xx:xx
xE:xx:xx:xx:xx:xx
IP=192.168.0.50 # container nic IP
HA=`printf "02:00:%x:%x:%x:%x" ${IP//./ }` # generate a MAC from the IP
^^^ slow network?
/usr/sbin/ethtool -K br0 sg off
/usr/sbin/ethtool -K br0 tso off
^^ phys
kernel > 2.6.35
lxc.network.type=phys
lxc.network.link=eth1
lxc.network.name=eth1
^ limit container resources
^^ cpuset.cpus
echo 1 > /cgroup/<name>/cpuset.cpus # 2nd CPU!
echo 1,2,3 > /cgroup/<name>/cpuset.cpus
echo 0-7 > /cgroup/<name>/cpuset.cpus
lxc-execute -n foo -s lxc.cgroup.cpuset.cpus="1,2,3" myforks
^^ cpu.shares
lxc-execute -n foo -s lxc.cgroup.cpu.shares=1 /bin/bash
lxc-execute -n bar -s /bin/bash
while $(true); do echo -n . ; done
lxc-cgroup -n foo cpu.shares=1024
^^ memory
lxc.cgroup.memory.limit_in_bytes = 256M
lxc.cgroup.memory.memsw.limit_in_bytes = 1G
^^ disk
^^^ usage
standard Linux tools:
* LVM
* quota (it can be bypassed if the container runs with CAP_SYS_ADMIN and/or CAP_SYS_RESOURCE capabilities)
^^^ limit disk bandwith using cgroup blkio
* http://www.mjmwired.net/kernel/Documentation/cgroups/blkio-controller.txt
Required kernel configuration
CONFIG_BLK_CGROUP=y
CONFIG_CFQ_GROUP_IOSCHED=y
CONFIG_BLK_DEV_THROTTLING=y
create containers for test
.pre
#!/bin/sh -xe
lxc-ls | xargs -i sh -c "lxc-stop -n {} ; lxc-destroy -n {}"
echo "lxc.network.type = empty" > blkio.conf
PATH=$(pwd):$PATH lxc-create -f blkio.conf -t busybox -n disk1
PATH=$(pwd):$PATH lxc-create -f blkio.conf -t busybox -n disk2
PATH=$(pwd):$PATH lxc-create -f blkio.conf -t busybox -n disk3
lxc-ls | xargs -i dd if=/dev/zero of=/var/lib/lxc/{}/rootfs/tmp/zero bs=1M count=100
cat > /tmp/speed.sh <<EOF
#!/bin/sh
while true ; do
sync ; echo 3 > /proc/sys/vm/drop_caches
dd if=/tmp/zero of=/dev/null 2>&1
done | grep MB
EOF
chmod +x /tmp/speed.sh
lxc-ls | xargs -i cp /tmp/speed.sh /var/lib/lxc/{}/rootfs/tmp/speed.sh
lxc-ls | xargs -i lxc-start -d -n {}
.pre
login into each container and run test
.pre
root@kvm:~# lxc-console -n disk1
Type <Ctrl+a q> to exit the console
disk1 login: root
~ # /tmp/speed.sh
104857600 bytes (100.0MB) copied, 0.958453 seconds, 104.3MB/s
.pre
Test limits (be careful not to enter 1000, you might oops kernel!)
.pre
root@kvm:~# echo 100 > /mnt/cgroup/disk1/blkio.weight
root@kvm:~# echo 200 > /mnt/cgroup/disk2/blkio.weight
root@kvm:~# echo 500 > /mnt/cgroup/disk3/blkio.weight
root@kvm:~# cat /mnt/cgroup/disk?/blkio.weight
100
200
500
.pre
Limit /dev/hda to 1Mb/s read
.pre
root@kvm:~# ls -al /dev/hda
brw-rw---- 1 root disk 3, 0 May 15 00:10 /dev/hda
root@kvm:~# echo "3:0 1048576" > /mnt/cgroup/disk1/blkio.throttle.read_bps_device
.pre
^^ network
* http://vger.kernel.org/netconf2009_slides/Network%20Control%20Group%20Whitepaper.odt
.pre
# mkdir -p /dev/cgroup
# mount -t cgroup net_cls -o net_cls /dev/cgroup
# mkdir /dev/cgroup/A
# mkdir /dev/cgroup/B
# cd /dev/cgroup
# echo 0x1001 > A/net_cls.classid # 10:1
# echo 0x1002 > B/net_cls.classid # 10:2
# tc qdisc add dev eth0 root handle 10: htb
# tc class add dev eth0 parent 10: classid 10:1 htb rate 40mbit
# tc class add dev eth0 parent 10: classid 10:2 htb rate 30mbit
# tc filter add dev eth0 parent 10: protocol ip prio 10 handle 1: cgroup
.pre
^ LXC commands
^^ lxc-create
/usr/lib/lxc/templates/
export MIRROR=<http://192.168.1.20:3142/ftp.debian.org>
export SUITE=lenny
cat > /tmp/lenny.conf
lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up
# <ctrl+d>
t61p:~# lxc-create -n lenny -t debian -f /tmp/lenny.conf
^^ lxc-execute
application container (shares filesystem!)
lxc-ssh
lxc-execute -n foo -s lxc.utsname=foo /bin/bash
lxc-execute -n bar -s lxc.utsname=bar /bin/bash
^^ lxc-attach
Needs kernel patch
lxc-attach -n n0 -- /usr/sbin/tcpdump -i eth0
^ devices
http://lwn.net/Articles/273208/
lxc.cgroup.devices.allow = <type> <major>:<minor> <perm>
<type> : b (block), c (char), etc ...
<major> : major number
<minor> : minor number (wildcard is accepted)
<perms> : r (read), w (write), m (mapping)
^ monitoring
^^ htop
htop - cgroups > r192
t61p:/tmp# apt-get source htop
t61p:/tmp# apt-get build-dep htop
t61p:/tmp# dpkg-source -x htop_0.9-2.dsc
t61p:/tmp# cd htop-0.9/
t61p:/tmp/htop-0.9# DEB_BUILD_OPTIONS="--enable-cgroup" fakeroot debian/rules binary
# sigh, no work, patch debian/rules to add --enable-cgroup
t61p:/tmp/htop-0.9# fakeroot debian/rules binary
t61p:/tmp/htop-0.9# dpkg -i ../htop_0.9-2_i386.deb
^^ procfs
http://lxc.sourceforge.net/download/procfs/procfs.tar.gz (fuse, defunct)
http://www.tinola.com/lxc/ (somewhat newer)
^^ debugging
lxc-start --logpriority=TRACE -o /tmp/trace.log --name my_container
(must have redirect to file!)
^ kernel patches
http://lxc.sourceforge.net/patches/linux/
^ Are we in container?
on host:
dpavlin@stage:~$ cat /proc/$$/cgroup
1:net_cls,freezer,devices,cpuacct,cpu,ns,cpuset:/
inside container:
dpavlin@narada:~$ cat /proc/$$/cgroup
1:net_cls,freezer,devices,cpuacct,cpu,ns,cpuset:/narada
^ 32-bit guest on 64-bit kernel
(lxc >= 0.7.3)
lxc.arch=x86
^ Container tweaks
^^ udev
echo udev hold | dpkg --set-selections
^^ nfs
kernel doesn't have nfs namespaces yet, use user-space nfs servers:
* http://unfs3.sourceforge.net
* http://sourceforge.net/apps/trac/nfs-ganesha
^^ chromium
* http://www.chromium.org/chromium-os/chromiumos-design-docs/system-hardening
* http://git.chromium.org/gitweb/?p=chromiumos/platform/minijail.git;a=summary
^^ pam
* http://pam-netns.sourceforge.net/
pam_netns allows to setup a private network namespace for every user
session (comparable with pam_namespace for filesystem namespaces). This
is especially useful on multiseat environments.
^^ X-server
* http://box.matto.nl/lxcxserver.html (Xnest example)
* https://launchpad.net/arkose - Arkose - Desktop Application Sandboxing (using aufs2)
^^ Virtual PCI network cards
* http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization/sect-Para-virtualized_Windows_Drivers_Guide-How_SR_IOV_Libvirt_Works.html
^^ don't delete files
dpkg-divert --rename /etc/init/theinitfile.conf
.pre
I'm sitting in c-base in Berlin and they have very cool multi-touch desk with multi-touch pong game. This got me thinking: same thing should be achievable with four USB mouses if I could get four different pointers on X11 screen.
First, I did some initial googling and came out with following pointers:
* http://gentoo-wiki.com/HOWTO_Advanced_Mouse
{toc: }
Similar board with instructions for Debian install: https://github.com/alexeicolin/javelin
^ NS4300N
* Porting openwrt to mpc8343-based NAS
** https://forum.openwrt.org/viewtopic.php?id=47856
Hold reset button below ethernet connector to reset admin account password to admin.
.pre
Operating System Embedded Linux
Version 01.02.0000.05
CPU MPC 8343
.pre
ssh package: http://www.16paws.com/projects/NS4300N/dropbear.html
telnet: http://www.avsforum.com/forum/26-home-theater-computers/859675-promise-smartstor-ns4300n-8.html#post15558981
^^ hack upgrade
http://www.avsforum.com/forum/26-home-theater-computers/859675-promise-smartstor-ns4300n-22.html
.pre
I spent some time digging around my NS4300N and found the symmetric key password for firmware upgrade packages and probably NS4600 plugins. I have verified that this password (used with bcrypt) decrypts and encrypts NSx700, NS4600, NS4300N, NS2300N firmware packages.
The password is "30570000"
it's quite simple to decrypt and unpackage a firmware release, for example (from a linux box):
mv ns4300_010512.upg ns4300_010512.bfe
bcrypt ns4300_010512.bfe
Encryption key: 30570000
dd if=ns4300_010512 of=ns4300_010512.tgz bs=1k skip=79
tar xzf ns4300_010512.tgz
leaves you with rev, fix_script, kernel, rootfs, pro_sqfs, & usr_sqfs files
you can then mount the various fs images on a loopback device and modify to you hearts content, reverse the above steps and use normal upgrade process to flash the modified firmware
have fun!
.pre
^^ get root with plugin
http://www.avsforum.com/forum/26-home-theater-computers/859675-promise-smartstor-ns4300n-7.html#post15191530
.pre
After much pain and suffering today, I got the engmode shell to be a full shell on the SR5 firmware. Here's the steps (assuming you are on Mac Os X or Linux):
1) Download the new itunes plugin frimware from promise--
itunes_plugin_0000_010002_A1.ppg
2) Extract the tarball:
dd if=itunes_plugin_0000_010002_A1.ppg of=test.tgz bs=97k skip=1
tar -zxvf test.tgz
This makes the file "rev" and the directory "itunes" in the current directory.
3) Edit the "itunes/upgrade_script" perl script. Add the following lines at the top after the "#!/usr/bin/perl" line:
system qq(sudo cp /etc/passwd /tmp/passwd);
system qq(sudo sed -e 's/engsh/sh/g' /tmp/passwd > /tmp/passwd.wks);
system qq(sudo cp /tmp/passwd.wks /etc/passwd);
Save the file.
4) Create a new plugin ".ppg" file with your changes:
tar -zcvf itunes.tgz ./rev ./itunes
dd if=/dev/zero of=itunes_plugin_0000_010002_A1_mod.ppg bs=97k count=1
cat itunes.tgz >> itunes_plugin_0000_010002_A1_mod.ppg
5) Put this modified file itunes_plugin_0000_010002_A1_mod.ppg on one of the NS4300N's shares.
6) Uninstall the itunes/firefly plugin (if you had it installed previously)
7) Install the modified itunes plugin
8) After the Installation OK dialoge comes up, test the telnet:
telnet YOUR_BOX_IP_ADDRESS 2380
login=engmode
pwd=hawk201
9) You may have to uninstall this plugin and reinstall the original, I saw some flakey behavior where itunes/firefly didn't want to startup till I reinstalled with the original plugin from promise. Might be I need a "chmod -R 777" or some such in the building of the plugin. But as uninstalling and reinstalling is not so much a pain I didn't take the time to verify.
This may be lost after reboot of the NS4300N (i have a feeling the passwd file is refreshed from /data after a reboot). I just wanted to get this out to everyone in case they wanted to play around.
For those that want to make the firefly config file writeable, keep in mind that the NS4300N's design overwrites the config file when the firefly server is enabled/disabled from the web interface with the original configuration file. I found it simpler to make some soft links than to work around Promise's design paradigms.
.pre
^ NS4600
.pre
Operating System Embedded Linux
Version 02.01.0000.16
CPU AMCC 431
Network Adapter Gigabit Ethernet Card 10/100/1000 Mbps
MAC Address 00:01:55:30:53:8D
.pre
* http://scratchpad.wikia.com/wiki/NS4600
Latest firmware:
Update 3TB HDD support models - 2011/11/17 02.01.0000.22
^^ hack upgrade
.pre
# bcyrypt as above....
dd if=foo of=foo.tbz bs=1k skip=46
mkdir foo-files
tar xvf ../foo.tbz
apt-get install mtd-utils
dpavlin@klin:/tmp/foo-files$ /usr/sbin/jffs2dump -v app_jffs2-p -c -b -e app2
dpavlin@klin:/tmp/foo-files$ ls -al app2
-rw-r--r-- 1 dpavlin dpavlin 41167608 Dec 1 21:04 app2
sudo modprobe mtdram total_size=41000 erase_size=256
sudo modprobe mtdblock
dpavlin@klin:/tmp/foo-files$ cat /proc/mtd
dev: size erasesize name
mtd0: 0280a000 00040000 "mtdram test device"
dpavlin@klin:/tmp/foo-files$ sudo dd if=app2 of=/dev/mtdblock0
80405+1 records in
80405+1 records out
41167608 bytes (41 MB) copied, 0.47149 s, 87.3 MB/s
dpavlin@klin:/tmp/foo-files$ mkdir /tmp/foo-app2
dpavlin@klin:/tmp/foo-files$ sudo mount /dev/mtdblock0 /tmp/foo-app2/ -t jffs2
dpavlin@klin:/tmp/foo-files$ ls -al /tmp/foo-app2/
total 39592
drwxr-xr-x 3 root root 0 Jan 1 1970 .
drwxrwxrwt 1 root root 1726 Dec 1 21:14 ..
-rwx------ 1 root root 40542208 Nov 2 2011 app_sqfs
dpavlin@klin:/tmp/foo-app2$ sudo unsquashfs -l app_sqfs | less
### ramdisk
dpavlin@klin:/tmp/foo-files/rootfs-ppc$ dd if=../rootfs-p of=rootfs-ppc.gz bs=64 skip=1
59783+1 records in
59783+1 records out
3826120 bytes (3.8 MB) copied, 0.164652 s, 23.2 MB/s
dpavlin@klin:/tmp/foo-files/rootfs-ppc$ file rootfs-ppc.gz
rootfs-ppc.gz: gzip compressed data, was "ramdisk.img", last modified: Wed Nov 2 20:57:28 2011, max compression, from Unix
dpavlin@klin:/tmp/foo-files/rootfs-ppc$ gzip -d rootfs-ppc.gz
dpavlin@klin:/tmp/foo-files/rootfs-ppc$ file rootfs-ppc
rootfs-ppc: Linux rev 0.0 ext2 filesystem data, UUID=00000000-0000-0000-0000-000000000000
dpavlin@klin:/tmp/foo-files/rootfs-ppc$ mkdir rootfs
dpavlin@klin:/tmp/foo-files/rootfs-ppc$ sudo mount rootfs-ppc rootfs/ -o loop
.pre
^^ serial port
* http://vogelchr.blogspot.hr/2011/06/promise-smartstor-ns4600-serial-port.html
{image: ns4600_pcb_cn11_labels.jpg}
https://plus.google.com/photos/102970072923818524447/albums/5025551365487818161/5614004462366176018?pid=5614004462366176018&oid=102970072923818524447
On my board (which is marked NS4600P GP0930-03 REV.A3) serial connector is marked CN6)
pinout:
| pin | voltage | serial |
| 1 | 3.3V | TX |
| 2 | 0V | GND |
| 3 | 1.7V | RX |
| 4 | 3.3V | VCC |
Serial port output:
.pre
U-Boot 1.3.4 (NS4600p - 013 - 800MHz) (Jun 01 2010 - 16:16:09)
CPU: AMCC PowerPC 431EXr at 800 MHz (PLB=200, OPB=100, EBC=100 MHz)
Security/Kasumi support
Bootstrap Option F - Boot ROM Location NAND (8 bits), booting from NAND
Internal PCI arbiter disabled
32 kB I-Cache 32 kB D-Cache
Board: NS4600p - PROMISE 4-bay NAS Target Board, 1*PCIe/1*SATA
I2C: ready
DRAM: 256 MB
Enclosure: Load fan configurations from VPD
NAND: 128 MiB
eth0 MAC = 00:01:55:30:53:89
eth1 MAC = 00:00:00:00:00:00
PCI: Bus Dev VenId DevId Class Int
PCIE1: successfully set as root-complex
01 00 105a 3f20 0104 00
SCSI: Net: ppc_4xx_eth0
Hit Ctrl + C to stop autoboot: 0
No wakeup events detected! Auto booting...
Leave clock generator PD mode... OK
Leave net PHY PD mode... OK
Turn on all activity LED power... OK
Blinking LED... OK
Turn on disk power... OK
NAND read: device 0 offset 0xc80000, size 0x300000
3145728 bytes read: OK
NAND read: device 0 offset 0xf80000, size 0x800000
8388608 bytes read: OK
NAND read: device 0 offset 0x100000, size 0x3000
12288 bytes read: OK
## Booting kernel from Legacy Image at 01200000 ...
Image Name: Linux-2.6.32.14
Created: 2011-01-20 4:39:31 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2339544 Bytes = 2.2 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01b00000 ...
Image Name: 02.01.0000.22
Created: 2011-11-02 20:57:34 UTC
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 3826120 Bytes = 3.6 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01a00000
Booting using the fdt blob at 0x1a00000
Uncompressing Kernel Image ... OK
Loading Ramdisk to 0fa55000, end 0fdfb1c8 ... OK
Loading Device Tree to 00ffa000, end 00ffffff ... OK
Using PowerPC 44x Platform machine description
Linux version 2.6.32.14 (root@ptk-229) (gcc version 4.2.2) #3 Thu Jan 20 12:39:14 CST 2011
Found initrd at 0xcfa55000:0xcfdfb1c8
Zone PFN ranges:
DMA 0x00000000 -> 0x00001000
Normal 0x00001000 -> 0x00001000
HighMem 0x00001000 -> 0x00001000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00001000
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4094
Kernel command line: root=/dev/ram rw console=ttyS0,115200 mtdparts=nand0:1024K(u-boot),512K(dtb),3072K(safe-k),8192K(safe-r),3072K(kernel),8192K(rootfs),16384K(usr),2048K(data),1024K(oem),87552K(app)
PID hash table entries: 1024 (order: -4, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 1, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 0, 65536 bytes)
Memory: 252096k/262144k available (4864k kernel code, 10048k reserved, 512k data, 269k bss, 384k init)
Kernel virtual memory layout:
* 0xffef0000..0xffff0000 : fixmap
* 0xfdee0000..0xffee0000 : highmem PTEs
* 0xfd6e0000..0xfdee0000 : consistent mem
* 0xfd6e0000..0xfd6e0000 : early ioremap
* 0xd1000000..0xfd6e0000 : vmalloc & ioremap
SLUB: Genslabs=15, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:512
UIC0 (32 IRQ sources) at DCR 0xc0
UIC1 (32 IRQ sources) at DCR 0xd0
UIC2 (32 IRQ sources) at DCR 0xe0
UIC3 (32 IRQ sources) at DCR 0xf0
clocksource: timebase mult[500000] shift[22] registered
Console: colour dummy device 80x25
Mount-cache hash table entries: 8192
xor: measuring software checksum speed
8regs : 96.000 MB/sec
8regs_prefetch: 128.000 MB/sec
32regs : 96.000 MB/sec
32regs_prefetch: 112.000 MB/sec
xor: using function: 8regs_prefetch (128.000 MB/sec)
NET: Registered protocol family 16
OCM1: 65536 Bytes (enabled)
OCM1: 65536 Bytes (non-cached)
OCM1: 0 Bytes (cached)
256k L2-cache enabled
PCIE0: Port disabled via device-tree
PCIE1: Checking link...
PCIE1: Device detected, waiting for link...
PCIE1: link is up !
PCI host bridge /plb/pciex@d20000000 (primary) ranges:
MEM 0x0000000e80000000..0x0000000effffffff -> 0x0000000080000000
MEM 0x0000000f00100000..0x0000000f001fffff -> 0x0000000000000000
IO 0x0000000f80010000..0x0000000f8001ffff -> 0x0000000000000000
Removing ISA hole at 0x0000000f00100000
4xx PCI DMA offset set to 0x00000000
/plb/pciex@d20000000: Legacy ISA memory support enabled
PCIE1: successfully set as root-complex
PCI: Probing PCI hardware
PCI: Hiding 4xx host bridge resources 0000:80:00.0
pci 0000:80:00.0: PCI bridge, secondary bus 0000:81
pci 0000:80:00.0: IO window: 0x1000-0x1fff
pci 0000:80:00.0: MEM window: 0x80000000-0x800fffff
pci 0000:80:00.0: PREFETCH window: disabled
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
mod_init:1047
ppc460ex_dma_per_chan_init:1059
Switching to clocksource timebase
NET: Registered protocol family 2
IP route cache hash table entries: 16384 (order: 0, 65536 bytes)
TCP established hash table entries: 8192 (order: 0, 65536 bytes)
TCP bind hash table entries: 8192 (order: -1, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 3736k freed
Probing AMCC DMA driver
PPC4xx PLB DMA engine @0x04_00018080 size 200 IRQ 25
PPC460ex PLB DMA engine @0x00_00000100 size 263
new_chan->chan_id 0x0
new_chan->chan->chan_id 0x0
PPC460ex PLB DMA engine @0x00_00000108 size 271
new_chan->chan_id 0x1
new_chan->chan->chan_id 0x1
PPC460ex PLB DMA engine @0x00_00000110 size 279
new_chan->chan_id 0x2
new_chan->chan->chan_id 0x2
PPC460ex PLB DMA engine @0x00_00000118 size 287
new_chan->chan_id 0x3
new_chan->chan->chan_id 0x3
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 16384 (order 0, 65536 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.13)
SGI XFS with ACLs, security attributes, large block/inode numbers, no debug enabled
SGI XFS Quota Management subsystem
msgmni has been set to 496
alg: No test for stdrng (krng)
async_tx: api initialized (async)
io scheduler noop registered
io scheduler deadline registered (default)
ppc4xx_gpio:gpio0_base(0xd13a0b00), gpio1_base(0xd13e0c00)
ppc4xx_gpio:Success to register driver (major = 253)
Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550A
4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550
4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550
brd: module loaded
loop: module loaded
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
10 cmdlinepart partitions found on MTD device nand0
Creating 10 MTD partitions on "nand0":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000180000 : "dtb"
0x000000180000-0x000000480000 : "safe-k"
0x000000480000-0x000000c80000 : "safe-r"
0x000000c80000-0x000000f80000 : "kernel"
0x000000f80000-0x000001780000 : "rootfs"
0x000001780000-0x000002780000 : "usr"
0x000002780000-0x000002980000 : "data"
0x000002980000-0x000002a80000 : "oem"
0x000002a80000-0x000008000000 : "app"
PPC 4xx OCP EMAC driver, version 3.54
mal0: descriptor-memory = ocm
MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels
ZMII /plb/opb/emac-zmii@ef600d00 initialized
RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support
TAH /plb/opb/emac-tah@ef601350 initialized
TAH /plb/opb/emac-tah@ef601450 initialized
/plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:01:55:30:53:89
eth0: found Generic MII PHY (0x00)
/plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode
/plb/opb/ethernet@ef600f00: can't find PHY!
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ppc-of-ehci 4bffd0400.ehci: OF EHCI
ppc-of-ehci 4bffd0400.ehci: new USB bus registered, assigned bus number 1
ppc-of-ehci 4bffd0400.ehci: irq 36, io mem 0x4bffd0400
ppc-of-ehci 4bffd0400.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OF EHCI
usb usb1: Manufacturer: Linux 2.6.32.14 ehci_hcd
usb usb1: SerialNumber: PPC-OF USB
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ppc-of-ohci 4bffd0000.usb: OF OHCI
ppc-of-ohci 4bffd0000.usb: new USB bus registered, assigned bus number 2
ppc-of-ohci 4bffd0000.usb: irq 37, io mem 0x4bffd0000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: OF OHCI
usb usb2: Manufacturer: Linux 2.6.32.14 ohci_hcd
usb usb2: SerialNumber: PPC-OF USB
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usblp
dwc_otg: version 2.60a 22-NOV-2006
dwc_otg: Using Slave mode
dwc_otg dwc_otg.0: DWC OTG Controller
dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 3
dwc_otg dwc_otg.0: irq 28, io mem 0x00000000
dwc_otg: Init: Port Power? op_state=1
dwc_otg: Init: Power Port (0)
usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: DWC OTG Controller
usb usb3: Manufacturer: Linux 2.6.32.14 dwc_otg_hcd
usb usb3: SerialNumber: dwc_otg.0
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
i2c /dev entries driver
ibm-iic 4ef600700.i2c: using standard (100 kHz) mode
rtc-pcf8563 0-0051: chip found, driver version 0.4.3
rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
ibm-iic 4ef600800.i2c: using standard (100 kHz) mode
W83L786: Load fan configurations from VPD
PPC4xx WDT : WDT start on boot !! The period is about 30 seconds
<ppc460ex_configure_raid_devices> line 371
<ppc460ex_configure_raid_devices> line 389
<ppc460ex_configure_raid_devices> line 405
ppc460ex_dma_1_channel.resource[0].start=0x31d6
<ppc460ex_configure_raid_devices> line 426 dma_reg1=0xd5720200
<ppc460ex_configure_raid_devices> line 444
--------------- ppc460ex_adma_probe: 4327-------------------------
Improved ADMA - 061508
adev->res[0].start=0x0
adev->id = 0x1 ppc460ex_dma_1_channel.resource[0].start=0xffffffff
descriptor-memory = ocm
<ppc460ex_adma_probe> irq=0x29
<ppc460ex_adma_probe> irq=0x36
--------------- ppc460ex_adma_probe: 4511-------------------------
<ppc460ex_adma_probe> ret=0x0
device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 5
rtc-pcf8563 0-0051: setting system clock to 2015-12-01 19:36:42 UTC (1448998602)
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing unused kernel memory: 384k init
INIT: version 2.86 booting
Mount MNT
Mount Usr
Mount Promise
Mount Data
Mount OEM
Mount nfsd
Enable RAID5
PPC460Ex RAID-5 has been activated successfully
Loading modules:
t3sas - t3sas 0000:81:00.0: enabling device (0006 -> 0007)
t3sas 0000:81:00.0: Found PDC42819 Controller 105a:3f20 with IRQ: 18
t3sas 0000:81:00.0: Driver version of PDC42819 : 1.3.0.14-NAS-15
scsi0 : t3sas
scsi 0:0:8:0: Processor Promise RAID Console 1.00 PQ: 0 ANSI: 3
scsi 0:0:8:0: Attached scsi generic sg0 type 3
usb-storage - Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
sata_dwc - sata-dwc sata-dwc.0: id 0, controller version 1.82
sata-dwc sata-dwc.0: DMA initialized
sata-dwc sata-dwc.0: **** No neg speed (nothing attached?)
scsi1 : sata-dwc
ata1: SATA max UDMA/133 irq 22
iscsi_trgt - iSCSI Enterprise Target Software - version 1.4.20.2
iscsi_trgt: Registered io type fileio
iscsi_trgt: Registered io type blockio
iscsi_trgt: Registered io type nullio
Copying config files to root fs
cp: `/usr/local/atalk/etc' is not a directory
cp: unable to preserve times of `/usr/local/atalk': Read-only file system
cp: unable to preserve ownership of `/usr/local/atalk': Read-only file system
cp: unable to preserve permissions of `/usr/local/atalk': Read-only file system
cp: `/usr/local/samba/lib' is not a directory
cp: `/usr/local/samba/private' is not a directory
cp: unable to preserve times of `/usr/local/samba': Read-only file system
cp: unable to preserve ownership of `/usr/local/samba': Read-only file system
cp: unable to preserve permissions of `/usr/local/samba': Read-only file system
cp: `/usr/local/proftp/etc' is not a directory
cp: unable to preserve times of `/usr/local/proftp': Read-only file system
cp: unable to preserve ownership of `/usr/local/proftp': Read-only file system
cp: unable to preserve permissions of `/usr/local/proftp': Read-only file system
cp: unable to preserve times of `/usr/local': Read-only file system
cp: unable to preserve ownership of `/usr/local': Read-only file system
cp: unable to preserve permissions of `/usr/local': Read-only file system
cp: `/usr/local/atalk/etc' is not a directory
No vg needs to be restored.
quotacheck: Can't find filesystem to check or filesystem not mounted with quota option.
mount: special device /dev/vg001/lv001 does not exist
Local time (GMT+1): Tue Dec 1 20:37:07 GMT+1 2015
0, 0, 0, 0, 0,
0, 0
1448998627
7,37,20,1,11,115,2,334,0
INIT: Entering runlevel: 2
Starting syslogd...syslogd: Already running.
klogd: Already running.
Starting base networking daemons: portmap inetd.
Starting periodic command scheduler: cron.
Starting LPD service...
Starting loopback...
Starting network...
eth0: link is down
eth0: link is down
Starting httpd...
Swap Memory On...LED => 1
Checking File System...0, 0, 0, 0, 0,
0, 0
1448998670
50,37,20,1,11,115,2,334,0
Starting SMB...sh invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0
Call Trace:
[c8735ce0] [c0005968] show_stack+0x50/0x154 (unreliable)
[c8735d20] [c0052860] oom_kill_process+0x54/0x1bc
[c8735d50] [c0052d18] __out_of_memory+0x144/0x160
[c8735d90] [c0052db0] out_of_memory+0x7c/0xa8
[c8735db0] [c00556a4] __alloc_pages_nodemask+0x3e4/0x4b8
[c8735e40] [c0063f8c] do_wp_page+0x3fc/0x78c
[c8735e90] [c0010c18] do_page_fault+0x294/0x41c
[c8735f40] [c000d70c] handle_page_fault+0xc/0x80
Mem-Info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
active_anon:1572 inactive_anon:1577 isolated_anon:0
active_file:19 inactive_file:21 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
free:128 slab_reclaimable:22 slab_unreclaimable:145
mapped:32 shmem:5 pagetables:91 bounce:0
DMA free:8192kB min:8192kB low:10240kB high:12288kB active_anon:100608kB inactive_anon:100928kB active_file:1216kB inactive_file:1344kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:262016kB mlocked:0kB dirty:0kB writeback:0kB mapped:2048kB shmem:320kB slab_reclaimable:1408kB slab_unreclaimable:9280kB kernel_stack:592kB pagetables:5824kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:32 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 1*8192kB 0*16384kB 0*32768kB 0*65536kB = 8192kB
45 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
4096 pages RAM
0 pages HighMem
180 pages reserved
277 pages shared
3591 pages non-shared
Out of memory: kill process 1934 (smbd) score 186 or a child
Killed process 1934 (smbd)
cron invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0
Call Trace:
[c0cffc50] [c0005968] show_stack+0x50/0x154 (unreliable)
[c0cffc90] [c0052860] oom_kill_process+0x54/0x1bc
[c0cffcc0] [c0052d18] __out_of_memory+0x144/0x160
[c0cffd00] [c0052db0] out_of_memory+0x7c/0xa8
[c0cffd20] [c00556a4] __alloc_pages_nodemask+0x3e4/0x4b8
[c0cffdb0] [c00577f0] __do_page_cache_readahead+0xa4/0x1f8
[c0cffe00] [c0051a84] filemap_fault+0x1d8/0x3d8
[c0cffe40] [c0063554] __do_fault+0x5c/0x438
[c0cffe90] [c0010c18] do_page_fault+0x294/0x41c
[c0cfff40] [c000d70c] handle_page_fault+0xc/0x80
Mem-Info:
DMA per-cpu:
CPU 0: hi: 0, btch: 1 usd: 0
active_anon:1578 inactive_anon:1585 isolated_anon:0
active_file:5 inactive_file:29 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
free:128 slab_reclaimable:20 slab_unreclaimable:145
mapped:17 shmem:5 pagetables:81 bounce:0
DMA free:8192kB min:8192kB low:10240kB high:12288kB active_anon:100992kB inactive_anon:101440kB active_file:320kB inactive_file:1856kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:262016kB mlocked:0kB dirty:0kB writeback:0kB mapped:1088kB shmem:320kB slab_reclaimable:1280kB slab_unreclaimable:9280kB kernel_stack:568kB pagetables:5184kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:43 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 1*8192kB 0*16384kB 0*32768kB 0*65536kB = 8192kB
39 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
4096 pages RAM
0 pages HighMem
180 pages reserved
209 pages shared
3609 pages non-shared
Out of memory: kill process 2014 (nmbd) score 184 or a child
Killed process 2014 (nmbd)
Starting FTP...
Starting AFP...
warning: `proftpd' uses 32-bit capabilities (legacy support in use)
Starting quota...
Starting Domain Integrate...
Starting alert agent...
I2 Event Daemon, Ver 1.0.0.0
Checking last shutdown...
Check Data Partition : OK
NS4600 R2.0 A1 (Version 02.01.0000.22) - Promise Technology, INC.
c014-nas login: LED => 1
.pre
^^ reset password
Hold button near ethernet connector until long beep is heard to reset password
.pre
INShutting down alert agent...killall: alert_agent: no process killed
Stopping periodic command scheduler: cronstopped /usr/sbin/cron (pid 1908).
.
Shutting down syslogd...killall: syslogd: no process killed
killall: klogd: no process killed
Shutting down Bonjour...
Shutting down AppleTalk services: Can't unregister C014-NAS:Workstation@*
Can't unregister C014-NAS:netatalk@*
cat: /var/lock/atalkd: No such file or directory
kill: Could not kill pid '2376': No such process
Shutting down FTP service...
Shutting down NFS...
Shutting down SMB service...Shutting down httpd...
Clear boot flag...
Sending all processes the TERM signal... done.
Sending all processes the KILL signal... done.
eepromctl 7.3, a 24Cxx EEPROM reader/writer
Bus: /dev/i2c0, Address: 0x50, Mode: 8bit
Deactivating swap...done.
Unmounting local filesystems...done.
U-Boot 1.3.4 (NS4600p - 013 - 800MHz) (Jun 01 2010 - 16:16:09)
CPU: AMCC PowerPC 431EXr at 800 MHz (PLB=200, OPB=100, EBC=100 MHz)
Security/Kasumi support
Bootstrap Option F - Boot ROM Location NAND (8 bits), booting from NAND
Internal PCI arbiter disabled
32 kB I-Cache 32 kB D-Cache
Board: NS4600p - PROMISE 4-bay NAS Target Board, 1*PCIe/1*SATA
I2C: ready
DRAM: 256 MB
Enclosure: Load fan configurations from VPD
NAND: 128 MiB
eth0 MAC = 00:01:55:30:53:89
eth1 MAC = 00:00:00:00:00:00
PCI: Bus Dev VenId DevId Class Int
PCIE1: successfully set as root-complex
01 00 105a 3f20 0104 00
SCSI: Net: ppc_4xx_eth0
Hit Ctrl + C to stop autoboot: 0
Waiting for PHY auto negotiation to complete...... TIMEOUT !
done
ENET Speed is 10 Mbps - HALF duplex connection (EMAC0)
Wake on POWER_BUTTON / LAN
Press Ctrl + C to leave...
.pre
^^ u-boot info
.pre
=> bdinfo
memstart = 0x00000000
memsize = 0x10000000
flashstart = 0x00000000
flashsize = 0x00000000
flashoffset = 0x00000000
sramstart = 0x00000000
sramsize = 0x00000000
bootflags = 0x0108C6F0
intfreq = 800 MHz
busfreq = 200 MHz
ethaddr = 00:01:55:30:53:89
eth1addr = 00:00:00:00:00:00
IP addr = 192.168.207.168
baudrate = 115200 bps
=> iprobe
Valid chip addresses: 2E 50 51 69
.pre
^^ u-boot boot to shell
.pre
=> printenv addtty
addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}
=> setenv addtty setenv bootargs \${bootargs} console=ttyS0,\${baudrate} init=/bin/sh
=> printenv addtty
addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate} init=/bin/sh
=> boot
Waiting for PHY auto negotiation to complete...... TIMEOUT !
done
Wake on POWER_BUTTON / LAN
Press Ctrl + C to leave...
# press power button to start boot
Set autoboot flag
Starting to write EEPROM
OK
Power button was pressed !
Leave clock generator PD mode... OK
Leave net PHY PD mode... OK
Turn on all activity LED power... OK
FAN_SET mode... OK
Blinking LED... OK
Turn on disk power... OK
# etc, etc....
.pre
^^ manual boot with root shell
.pre
$ cat /etc/init.d/checkroot
#!/bin/sh
/bin/mount -t proc /proc /proc
echo "Mount MNT"
/bin/mkdir /mnt/usr_fs
/bin/mount -t jffs2 -r /dev/mtdblock6 /mnt/usr_fs
/bin/mkdir /mnt/app_fs
/bin/mount -t jffs2 -r /dev/mtdblock9 /mnt/app_fs
echo "Mount Usr"
/bin/mount -o loop -t squashfs /mnt/usr_fs/usr_sqfs /usr
echo "Mount Promise"
/bin/mount -o loop -t squashfs /mnt/app_fs/app_sqfs /promise
#/bin/mount -t jffs2 /dev/mtdblock9 /promise
echo "Mount Data"
/bin/mount -t jffs2 /dev/mtdblock7 /data
echo "Mount OEM"
/bin/mkdir /mnt/oem
/bin/mount -t jffs2 -r /dev/mtdblock8 /mnt/oem
echo "Enable RAID5"
/sbin/enable_raid5 >/dev/null 2>/dev/null
$ /sbin/enable_raid5
PPC460Ex RAID-5PPC460Ex RAID-5 has been activated successfully
enable utility.
Current RAID-5 state:
PPC460Ex RAID-r5 capabilities are DISABLED.
Activate RAID-5.
RAID-5 state:
PPC460Ex RAID-r5 capabilities are ENABLED.
$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
t3sas
usb-storage
sata_dwc
iscsi_trgt
$ insmod /lib/modules/t3sas.ko
t3sas 0000:81:00.0: enabling device (0006 -> 0007)
t3sas 0000:81:00.0: Found PDC42819 Controller 105a:3f20 with IRQ: 18
t3sas 0000:81:00.0: Driver version of PDC42819 : 1.3.0.14-NAS-11
## this takes very long, but eventually....
scsi0 : t3sas
scsi 0:0:0:0: Direct-Access Promise 3+1 Disk RAID5 1.10 PQ: 0 ANSI: 4
sd 0:0:0:0: [sda] 2929926144 512-byte logical blocks: (1.50 TB/1.36 TiB)
sd 0:0:0:0: Attached scsi generic sg0 type 0
scsi 0:0:8:0: Processor Promise RAID Console 1.00 PQ: 0 ANSI: 3
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
scsi 0:0:8:0: Attached scsi generic sg1 type 3
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
$ mount /sys/
$ /usr/sbin/pvscan
PV /dev/sda1 VG vg001 lvm2 [1.36 TB / 488.00 MB free]
Total: 1 [1.36 TB] / in use: 1 [1.36 TB] / in no VG: 0 [0 ]
$ /usr/sbin/vgchange -a y vg001
2 logical volume(s) in volume group "vg001" now active
$ /usr/sbin/lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
lv001 vg001 -wi-a- 1.36T
nsswap vg001 -wi-a- 512.00M
$ mkdir /tmp/lv001
$ mount /dev/vg001/lv001 /tmp/lv001/ -o ro
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
$ cat /etc/rc2.d/S60servon
.pre
Cheerson CX-20 CX20 ESC Electronic Speed Controller
board name: MFL1218
Sil F330
http://www.olliw.eu/2012/owsilprog-tutorials/comment-page-3/
alternative firmware: https://github.com/bitdump/BLHeli (for silab chips, but not this board)