Git: Prepare a repository for your project

 

Follow these steps to manage your project using GIT:
 
1. create an empty folder:
 
$ mkdir menospior.com && cd menospior.com
 
 
 
2. Create an empty repository:
 
$ git init
Initialized empty Git repository in /home/httpd/domains/menospior.com/.git/
 
3. Create a standard .gitignore file:
 
$ nano .gitignore
 
 
————————
cgi-bin/*
upload/
.idea/*
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
————————
 
 
4. Add and commit the file
 
$ git add .gitignore
$ git commit -m "Added standard .gitignore file"
[master (root-commit) 8bce6b1] Added standard .gitignore file
 1 file changed, 34 insertions(+)
 create mode 100644 .gitignore
 
 
5. Prepare your local repository for transportation
$ cd ..
$ git clone –bare menospior.com menospior.com.git
Cloning into bare repository 'menospior.com.git'…
done.
$ touch menospior.com.git/git-daemon-export-ok
 
 
6. Copy it to a remote server:
 
$ scp -r menospior.com.git mt:~/domains/git.portnumber53.com/html/menospior.com.git
exclude                                                                          100%  240     0.2KB/s   00:00
ce6b1371dfa41cb537d5272bb76e038e043f78                                           100%  148     0.1KB/s   00:00
4122f04b2c73f00f5ad1098df5f4cbf2707a14                                           100%   55     0.1KB/s   00:00
56e31ebcc35ab6555ef10a60b10fbc19944e90                                           100%  266     0.3KB/s   00:00
HEAD                                                                             100%   23     0.0KB/s   00:00
git-daemon-export-ok                                                             100%    0     0.0KB/s   00:00
update.sample                                                                    100% 3611     3.5KB/s   00:00
post-update.sample                                                               100%  189     0.2KB/s   00:00
applypatch-msg.sample                                                            100%  452     0.4KB/s   00:00
pre-commit.sample                                                                100% 1704     1.7KB/s   00:00
commit-msg.sample                                                                100%  896     0.9KB/s   00:00
pre-applypatch.sample                                                            100%  398     0.4KB/s   00:00
prepare-commit-msg.sample                                                        100% 1239     1.2KB/s   00:00
pre-rebase.sample                                                                100% 4951     4.8KB/s   00:00
packed-refs                                                                      100%   85     0.1KB/s   00:00
config                                                                           100%  125     0.1KB/s   00:00
description                                                                      100%   73     0.1KB/s   00:00
 
7. Finish preparing your repository on the remote server
 
 
$ ssh mt
Linux n22 3.2.6mtv10 #1 SMP Wed Apr 4 09:28:15 PDT 2012 x86_64
 
$ cd ~/domains/git.portnumber53.com/html/menospior.com.git/
$ git –bare update-server-info
$ cd hooks
$ mv post-update.sample post-update
$ chmod a+x post-update
$ exit
logout
Connection to s97042.gridserver.com closed.
 
 
 
 
 
 
8. Now clone your repository locally so you can start working
 
$ git clone mt:~/domains/git.portnumber53.com/html/menospior.com.git menospior.dev
Cloning into 'menospior.dev'…
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
 
 
 
 
 
 
 
 
 
 
 

 

ArchLinuxARM: Install PECL_HTTP

First install autoconf, php pear and curl

pacman -Syu autoconf php-pear curl

 

Then install pecl_http and iconv

pear install pecl.php.net/pecl_iconv

pear install pecl.php.net/pecl_http, iconv

 

Edit your php.ini

nano /etc/php/php.ini

 

Add 

extension=http.so

 

Restart apache

rc.d restart httpd

 

ArchLinux: imagick

Install Imagick

# pacman -S imagemagick libpng librsvg libwmf ghostscript libxml2 jasper openexr

 

#sudo pear install pecl.php.net/imagick

 

 

Git branch in Mac OSX bash prompt

I tried using the same changes for my linux boxes on my macbook air and they didn't work, so I googled around and stumbled upon using this instead:

 

 

c_cyan=`tput setaf 6`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`
parse_git_branch (){
    if git rev-parse --git-dir >/dev/null 2>&1
    then
        gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')
    else
        return 0
    fi
    echo -e $gitver
}
branch_color (){
    if git rev-parse --git-dir >/dev/null 2>&1
    then
        color=""
    if git diff --quiet 2>/dev/null >&2 
    then
        color="${c_green}"
    else
        color=${c_red}
    fi
    else
        return 0
    fi
    echo -ne $color
}

#Branch First
#PS1='[\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]] \u@\[${c_red}\]\w\[${c_sgr0}\]: '
#Branch Last
PS1=' \u@\[${c_red}\]\w\[${c_sgr0}\]: [\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]] '

 

original: http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt

 

Hosting: Backing up your MediaTemple using rsync and a linux box

Follow these steps to setup a decent backup solution for your MT hosting (you can adapt this to any other hosting that offers SSH and RSYNC access).

First you'll want your linux box to be able to SSH into your hosting without a password using a SSH key instead.

Then, just clone the following repository somewhere in your linux box

https://github.com/PortNumber53/mt-utils

Customize the file:

mt.sh.sample

Next, make sure the variables in

0-variables.sh

match your enviroment.

Then you just need to run:

mt.sh.sample

For extra peace of mind, set it to run from a cron job.

 

 

Kohana: core, adding submodules, customization

After cloning the repository, let's add the Kohana core, a few modules and customize the installation:

1. 

git submodule add git://github.com/kohana/core.git modules/system

git submodule add git://github.com/kohana/database.git modules/database

git submodule add git://github.com/kohana/cache.git modules/cache

git submodule add git://github.com/kohana/image.git modules/image

git submodule add git://github.com/kohana/pagination.git modules/pagination

 

2. Initialize the modules

 

$ git submodule init

 

$ git commit -m 'Added core kohana and initial submodules [cache,database,image,pagination]'
[master 1d5462d] Added core kohana and initial submodules [cache,database,image,pagination]
 6 files changed, 20 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 modules/cache
 create mode 160000 modules/database
 create mode 160000 modules/image
 create mode 160000 modules/pagination
 create mode 160000 modules/system
 
 
3. Push these changes
$ git pull origin master
From mt:~/domains/git.portnumber53.com/html/menospior.com
 * branch            master     -> FETCH_HEAD
Already up-to-date.
 
$ git push origin master
Counting objects: 5, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 663 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
To mt:~/domains/git.portnumber53.com/html/menospior.com.git
   8bce6b1..1d5462d  master -> master
 
 
We need some more files:
 
 

 

 

 

 

 

 

$ mkdir html
$ wget https://raw.github.com/kohana/kohana/3.2/master/index.php -O html/index.php
–2012-07-12 00:46:18–  https://raw.github.com/kohana/kohana/3.2/master/index.php
Resolving raw.github.com (raw.github.com)… 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 3292 (3.2K) [text/plain]
Saving to: `html/index.php'
 
100%[=========================================================================>] 3,292       –.-K/s   in 0s
 
2012-07-12 00:46:19 (76.6 MB/s) – `html/index.php' saved [3292/3292]
 
$ wget https://raw.github.com/kohana/kohana/3.2/master/example.htaccess -O html/.htaccess
–2012-07-12 00:46:47–  https://raw.github.com/kohana/kohana/3.2/master/example.htaccess
Resolving raw.github.com (raw.github.com)… 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 517 [text/plain]
Saving to: `html/.htaccess'
 
100%[=========================================================================>] 517         –.-K/s   in 0s
 
2012-07-12 00:46:48 (24.1 MB/s) – `html/.htaccess' saved [517/517]
 
$ mkdir -p modules/application
$ wget https://raw.github.com/kohana/kohana/3.2/master/application/bootstrap.php -O modules/application/bootstrap.php
–2012-07-12 00:47:32–  https://raw.github.com/kohana/kohana/3.2/master/application/bootstrap.php
Resolving raw.github.com (raw.github.com)… 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 3612 (3.5K) [text/plain]
Saving to: `modules/application/bootstrap.php'
 
100%[=========================================================================>] 3,612       –.-K/s   in 0s
 
2012-07-12 00:47:33 (104 MB/s) – `modules/application/bootstrap.php' saved [3612/3612]
 
 
 
If you try accessing your site you should see an error:
———-

 

 

 

 

Warning: require(/bootstrap.php): failed to open stream: No such file or directory in /home/httpd/domains/menospior.dev/html/index.php on line 102

 

Fatal error: require(): Failed opening required '/bootstrap.php' (include_path='.:/php/library/php-redis:/usr/share/pear') in/home/httpd/domains/menospior.dev/html/index.php on line 102

 

 

 

———————
 
 
Let's adjust the environment:
 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Chage a few settings:
html/index.php

$application = '../modules/application';

$modules = '../modules';

$system = '../modues/system';

 

Customize some kohana settings:

../modules/application/bootstrap.php

date_default_timezone_set('America/Los_Angeles');

 

Kohana::init(array(
'base_url'   => '/',
'index_file' => FALSE,
'cache_dir'  => DOCROOT.'../cache'
));
Kohana::$log->attach(new Log_File(DOCROOT.'../logs'));
 

 

 

 

 

 

 

 

 

Now create the logs folder

$ mkdir logs

 

 

At this point you should have a 404 error as there's no controller:

 

 

HTTP_Exception_404 [ 404 ]: The requested URL / was not found on this server.

SYSPATH/classes/kohana/request/client/internal.php [ 87 ]

82 
83 		try
84 		{
85 			if ( ! class_exists($prefix.$controller))
86 			{
87 				throw new HTTP_Exception_404('The requested URL :uri was not found on this server.',
88 													array(':uri' => $request->uri()));
89 			}
90 
91 			// Load the controller using reflection
92 			$class = new ReflectionClass($prefix.$controller);
  1. SYSPATH/classes/kohana/request/client.php [ 64 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  2. SYSPATH/classes/kohana/request.php [ 1138 ] » Kohana_Request_Client->execute(arguments)

  3. DOCROOT/index.php [ 109 ] » Kohana_Request->execute()

Environment

 

 

 

This is optional:

 

$ wget https://raw.github.com/kohana/kohana/3.2/master/install.php -O html/install.php
–2012-07-12 01:43:59–  https://raw.github.com/kohana/kohana/3.2/master/install.php
Resolving raw.github.com (raw.github.com)… 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 8411 (8.2K) [text/plain]
Saving to: `html/install.php'
 
100%[=========================================================================>] 8,411       –.-K/s   in 0s
 
2012-07-12 01:44:00 (19.5 MB/s) – `html/install.php' saved [8411/8411]
 
the step above download the install.php file that can be used to test your environment. There are a few things wrong in the script, but it can tell you if you env has all the bells and whisles to use Kohana
 
 

 

 

Problems you may want to fix:

The iconv extension is not loaded.

Uncomment the line

extension=iconv.so

in your php.ini file and restart Apache

 

Kohana requires mcrypt for the Encrypt class.

Uncomment the line

extension=mcrypt.so

in your php.ini file and restart Apache

 

Kohana requires GD v2 for the Image class.

Uncomment the line

extension=gd.so

in your php.ini file and restart Apache

 

Kohana can use the http extension for the Request_Client_External class.

Install the pecl_http extension

 

# pacman -Sy php-pear autoconf
# pecl install pecl_http
/usr/lib/gcc/arm-unknown-linux-gnueabi/4.7.1/cc1: error while loading shared libraries: libppl.so.12: cannot open shared object file: No such file or directory
pecl/pecl_http can optionally use PHP extension "iconv"
downloading pecl_http-1.7.4.tgz …
Starting to download pecl_http-1.7.4.tgz (174,503 bytes)
……………………………….done: 174,503 bytes
71 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
 

/usr/lib/php/modules/http.so

You should add "extension=http.so" to php.ini

 

 

Fix install.php folder checks:

 

<tr>
<th>Cache Directory</th>
<?php if (is_dir(APPPATH) AND is_dir(DOCROOT.'../cache') AND is_writable(DOCROOT.'../cache')): ?>
<td class="pass"><?php echo DOCROOT.'../cache' ?></td>
<?php else: $failed = TRUE ?>
<td class="fail">The <code><?php echo DOCROOT.'../cache' ?></code> directory is not writable.</td>
<?php endif ?>
</tr>
<tr>
<th>Logs Directory</th>
<?php if (is_dir(APPPATH) AND is_dir(DOCROOT.'../logs') AND is_writable(DOCROOT.'../logs')): ?>
<td class="pass"><?php echo DOCROOT.'../logs' ?></td>
<?php else: $failed = TRUE ?>
<td class="fail">The <code><?php DOCROOT.'../logs' ?></code> directory is not writable.</td>
<?php endif ?>
</tr>
 
 

 

Intranet: [ArchLinux] Setup a DNSCACHE for your network using DJBDNS

This is a version of this post http://blog.portnumber53.com/2012/01/15/intranet-setup-a-dnscache-for-your-network-using-djbdns/ for the ArchLinuxARM:

 

Essentials:

# pacman -Syu fakeroot patch make gcc dnsutils

 

Daemontools installation

$ wget https://aur.archlinux.org/packages/da/daemontools/daemontools.tar.gz

$ tar -xvzf daemontools.tar.gz

$ cd daemontools

$ nano PKGBUILD

——————–

arch=('arm')

——————–

$ makepkg

$ sudo pacman -U daemontools-0.76-5-arm.pkg.tar.xz

 

You shoould see this:

loading packages…
resolving dependencies…
looking for inter-conflicts…

Targets (1): daemontools-0.76-5

Total Installed Size:   0.30 MiB

Proceed with installation? [Y/n] y
(1/1) checking package integrity                                      [######################################] 100%
(1/1) loading package files                                           [######################################] 100%
(1/1) checking for file conflicts                                     [######################################] 100%
(1/1) installing daemontools                                          [######################################] 100%
Adding svscanboot to inittab…
init should start svscan now.
[root@heart daemontools]#

 

ucspi-tcp 0.88-3

 

 

 

 

 

 

 

 

UCSPI-TCP

$ wget https://aur.archlinux.org/packages/uc/ucspi-tcp/ucspi-tcp.tar.gz

$ tar -xvzf ucspi-tcp.tar.gz

$ cd ucspi-tcp

$ nano PKGBUILD

——————–

arch=('arm')

——————–

change line 36 to:

install -m 755 -D $bin $pkgdir/usr/bin/$bin

(refer to the comments at https://aur.archlinux.org/packages.php?ID=8330 )

 

$ sudo pacman -U ucspi-tcp-0.88-3-arm.pkg.tar.xz

 

 

Now for the real thing:

 

$ wget https://aur.archlinux.org/packages/dj/djbdns-ipv4/djbdns-ipv4.tar.gz

$ tar -xvzf djbdns-ipv4.tar.gz

$ cd djbdns-ipv4/

I built mine on my PogoPlug, so I needed to edit  PKGBUILD and edited: arch=('arm')

$ makepkg

$ sudo pacman -U djbdns-ipv4-1.05-2-arm.pkg.tar.xz

 

============

>>> Configure and run tinydns:
    tinydns-conf _tinydns _dnslog /service/tinydns [IP]
    ln -s /service/tinydns /etc/

>>> Configure and run dnscache as a recursive cache:
    dnscache-conf _dnscache _dnslog /service/dnscache [IP]
    ln -s /service/dnscache /etc/

>>> To change from recursive to forward-only:
    echo 1 > /service/dnscache/env/FORWARDONLY
    echo IP_address_of_a_recursive_DNS server > /service/dnscache/root/servers/@
    echo IP_address_of_another_recursive_DNS server >> /service/dnscache/root/servers/@

>>> To add a local authoritative server to a recursive or forward-only setup:
    echo IP_address_of_a_local_authoritative_server > /service/dnscache/root/servers/name.of.toplevel.domain

If [IP] is omitted dnscache will run on localhost.
More help can be found at http://cr.yp.to/djbdns.html

Read /usr/share/djbdns/README for more information about this package.

=================

 

Let's set up the dns cache on the box's IP (10.0.0.240 in the example)

 

 

# dnscache-conf _dnscache _dnslog /etc/dnscache 10.0.0.240

Start it

# ln -s /etc/dnscache /service/

ps ax should show something like:

9438 ?        S      0:00 supervise dnscache
 9439 ?        S      0:00 supervise log
 9440 ?        S      0:00 multilog t ./main
 9441 ?        S      0:00 /usr/bin/dnscache
 

Tell DNSCACHE to accept queries from your intranet:

touch /etc/dnscache/root/ip/10

 

Let's tail its log:

# tail -f /service/dnscache/log/main/current

And test it, opening another terminal

# dnsip www.cnn.com

As of this writing you should see:

157.166.255.18 157.166.255.19 157.166.226.26 157.166.226.25

and a bunch of log output

 

 

Kohana 3.2.0: Version Control your application with GIT

Follow these steps to manage your kohana application using GIT:

 

1. Create an empty directory

$ mkdir insertcoin.local && cd insertcoin.local

 

2. run git init to create the bare structure for a git repository

$ git init

 

3. create a folder for the core

$ mkdir vendor

 

4. Add submodules:

$ cd insertcoin.local/

$ git submodule add git://github.com/kohana/core.git vendor/kohana

$ git submodule add git://github.com/kohana/database.git modules/database

$ git submodule add git://github.com/kohana/cache.git modules/cache

$ git submodule add git://github.com/kohana/image.git modules/image

$ git submodule add git://github.com/kohana/pagination.git modules/pagination

 

5. Init these submodules

$ git submodule init

$ git commit -m 'Added core kohana and initial submodules [cache,database,image,pagination]'

 

6. push these changes

$ git pull origin master

$ git push origin master

 

 

7 Get some more files:

$ mkdir html

$ cd html

$ wget https://raw.github.com/kohana/kohana/3.2/master/index.php

$ cd ../modules/application/

$ wget https://raw.github.com/kohana/kohana/3.2/master/application/bootstrap.php

 

 

Chage a few settings:
html/index.php

$application = '../modules/application';

$modules = '../modules';

$system = '../vendor/kohana';

 

modules/application/bootstrap.php

date_default_timezone_set('America/Los_Angeles');

 

Kohana::init(array(
       'base_url'   => '/',
       'index_file' => false,
       'cache_dir'  => DOCROOT.'../cache'
));
Kohana::$log->attach(new Log_File(DOCROOT.'../logs'));
Kohana::modules(array(
       // 'auth'       => MODPATH.'auth',       // Basic authentication
       'cache'      => MODPATH.'cache',      // Caching with multiple backends
       // 'codebench'  => MODPATH.'codebench',  // Benchmarking tool
       'database'   => MODPATH.'database',   // Database access
       'image'      => MODPATH.'image',      // Image manipulation
       // 'orm'        => MODPATH.'orm',        // Object Relationship Mapping
       // 'unittest'   => MODPATH.'unittest',   // Unit testing
       // 'userguide'  => MODPATH.'userguide',  // User guide and API documentation
       ));
 
 
 

 

$ git clone git://github.com/kohana/core.git vendor/kohana/

 

$ mkdir -p modules/application/classes/controller

$ mkdir -p modules/application/config

$ touch -p modules/application/classes/controller/.gitignore

$ mkdir -p modles/application/views/templates/default

$ touch -p modules/applcation/views/template/default/.gitignore

wget https://github.com/kohana/kohana/raw/3.2/master/index.php

git clone mt:~/domains/git.portnumber53.com/html/in.sert.co.in insertcoin.local

$ cd modules/application

$ wget https://raw.github.com/kohana/kohana/3.2/master/application/bootstrap.php 

 

 

 

 

 

 

Setting the push script for the site:

 

$ mkdir export

$ git clone http://git.portnumber53.com/in.sert.co.in.git export/in.sert.co.in

$ git clone http://git.portnumber53.com/in.sert.co.in.git ~/domains/in.sert.co.in.temp

Kohana 3.2.x: How to install taking advantage of submodules

I have improved my Kohana 3.2.x installation steps.

This new way takes advantages of submodules with Git thus making your life easier when upgrading to a new version, assuming it's backwards compatible.

This guide will assume you have the following structure for your website:

 

root/html   <!– public html folder

root/modules   <!– kohana files

root/source   <!– environment dependable files

 

 

Ready? here we go:

 

1. Create an empty git repository following this:

 

 

2. Create a submodule with Kohana's core using:

$ git submodule add git://github.com/kohana/core.git modules/system

 

3. Add all the modules you'll need:

$ git submodule add git://github.com/kohana/database.git modules/database

$ git submodule add git://github.com/kohana/image.git modules/image

$ git submodule add git://github.com/kohana/pagination.git modules/pagination

 

4. Initialize the submodules

 

$ git submodule init

Submodule 'modules/database' (git://github.com/kohana/database.git) registered for path 'modules/database'
Submodule 'modules/image' (git://github.com/kohana/image.git) registered for path 'modules/image'
Submodule 'modules/pagination' (git://github.com/kohana/pagination.git) registered for path 'modules/pagination'
Submodule 'modules/system' (git://github.com/kohana/core.git) registered for path 'modules/system'

 

5. Commit these changes

 


$ git commit -m 'Added initial submodules'
 
 

 

6. Create the bare minimum folder structure:
 
$ mkdir -p modules/application/classes/{controller,model}
$ mkdir -p modules/application/{config,views}
$ mkdir -p modules/application/{cache,logs}
$ chmod 0777 modules/application/{cache,logs}
$ echo '[^.]*' > modules/application/logs/.gitignore
$ echo '[^.]*' > modules/application/cache/.gitignore
 
 

7. Now we need index.php and bootstrap.php files:

$ mkdir html

$ wget http://github.com/kohana/kohana/raw/3.0/master/index.php -O html/index.php

$ wget http://github.com/kohana/kohana/raw/3.0/master/application/bootstrap.php -O modules/application/bootstrap.php

 

 

8. Fix file paths on html/index.php

<?php

 

$application = '../modules/application';
$modules = '../modules';
$system = '../modules/system';

 

9. Change the default timezone

<?php

date_default_timezone_set('America/Los_Angeles');

 

Kohana::init(array(
        'base_url'   => '/',
        'index_file' => '',
));
 
 

10. Add a default .htaccess

wget  https://raw.github.com/kohana/kohana/3.2/master/example.htaccess -O html/.htaccess

 

 

 

 

Linux Hardware Compatibility: W311MI

This is just to let others know what piece of hardware worked during my linux experiments:

 

 

dmesg output

<5>[    0.000000] Linux version 2.6.31.6_SMP_820 (bdietrich@brad-ux) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #96 SMP Tue                Feb 8 12:08:54 PST 2011
<4>[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5387f
<4>[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
<4>[    0.000000] Machine: Oxsemi NAS
<5>[    0.000000] 1 memory region
<4>[    0.000000] Ignoring unrecognised tag 0x00000000
<4>[    0.000000] Memory policy: ECC disabled, Data cache writealloc
<7>[    0.000000] On node 0 totalpages: 32768
<7>[    0.000000] free_area_init_node: node 0, pgdat c0401080, node_mem_map c0424000
<7>[    0.000000]   Normal zone: 256 pages used for memmap
<7>[    0.000000]   Normal zone: 0 pages reserved
<7>[    0.000000]   Normal zone: 32512 pages, LIFO batch:7
<4>[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
<5>[    0.000000] Kernel command line: root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x0               0,0×30,0xe0,0x00,0x00,0x01 mem=128M poweroutage=yes
<4>[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
<6>[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
<6>[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
<6>[    0.000000] Memory: 128MB = 128MB total
<5>[    0.000000] Memory: 125496KB available (3712K code, 275K data, 120K init, 0K highmem)
<6>[    0.000000] Hierarchical RCU implementation.
<6>[    0.000000] NR_IRQS:96
<4>[    0.000000] OX820_RPS_init_irq: interrupts 64 to 96
<4>[    0.010000] Console: colour dummy device 80×30
<6>[    0.010000] console [ttyS0] enabled
<6>[    0.020000] Calibrating delay loop… 279.34 BogoMIPS (lpj=1396736)
<6>[    0.260000] Security Framework initialized
<4>[    0.260000] Mount-cache hash table entries: 512
<6>[    0.270000] CPU: Testing write buffer coherency: ok
<6>[    0.270000] Calibrating local timer… 350.00MHz.
<4>[    0.340000] CPU1: Booted secondary processor
<6>[    0.440000] Calibrating delay loop… 279.34 BogoMIPS (lpj=1396736)
<6>[    0.670000] Brought up 2 CPUs
<6>[    0.680000] SMP: Total of 2 processors activated (558.69 BogoMIPS).
<6>[    0.690000] NET: Registered protocol family 16
<6>[    0.690000] Number of DMA channels = 4, version = 4
<6>[    0.700000] Reserving a DMA channel for DirectRAID
<6>[    0.700000] Allocating 389 SRAM generic DMA descriptors
<4>[    0.720000] bio: create slab <bio-0> at 0
<5>[    0.730000] SCSI subsystem initialized
<7>[    0.730000] libata version 3.00 loaded.
<6>[    0.750000] NET: Registered protocol family 2
<6>[    0.750000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>[    0.760000] Switched to NOHz mode on CPU #0
<6>[    0.760000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
<6>[    0.760000] Switched to NOHz mode on CPU #1
<6>[    0.770000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
<6>[    0.780000] TCP: Hash tables configured (established 4096 bind 4096)
<6>[    0.780000] TCP reno registered
<6>[    0.790000] NET: Registered protocol family 1
<4>[    0.790000] Create fragment cache
<6>[    0.800000] fuse init (API version 7.12)
<6>[    0.800000] msgmni has been set to 245
<6>[    0.810000] alg: No test for stdrng (krng)
<6>[    0.810000] io scheduler noop registered
<6>[    0.820000] io scheduler anticipatory registered
<6>[    0.820000] io scheduler deadline registered
<6>[    0.830000] io scheduler cfq registered (default)
<6>[    0.850000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
<6>[    0.860000] serial8250: ttyS0 at MMIO 0x44200000 (irq = 55) is a 16550A
<6>[    0.880000] brd: module loaded
<6>[    0.890000] loop: module loaded
<6>[    0.890000] ox820sata: OX820 sata core.
<6>[    0.890000] scsi0 : oxnassata
<6>[    0.900000] scsi1 : oxnassata
<6>[    0.900000] ata1: SATA max UDMA/133 irq 50
<6>[    0.910000] ata2: SATA max UDMA/133 irq 50
<3>[    0.910000] ox820sata: reseting SATA core
<6>[    1.270000] ata1: SATA link down (SStatus 0 SControl 300)
<3>[    1.270000] ox820sata: reseting SATA core
<6>[    1.630000] ata2: SATA link down (SStatus 0 SControl 300)
<6>[    1.630000] tun: Universal TUN/TAP device driver, 1.6
<6>[    1.640000] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
<4>[    1.640000] NAND: Page read time 40ms
<6>[    1.650000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
<6>[    1.660000] Scanning device for bad blocks
<4>[    1.670000] Bad eraseblock 225 at 0x000001c20000
<4>[    1.680000] Bad eraseblock 273 at 0x000002220000
<5>[    1.740000] Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
<5>[    1.750000] 0x000000000000-0x000000e00000 : "boot"
<5>[    1.750000] 0x000000e00000-0x000008000000 : "rootfs"
<5>[    1.760000] UBI: attaching mtd2 to ubi0
<5>[    1.760000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
<5>[    1.770000] UBI: logical eraseblock size:    129024 bytes
<5>[    1.770000] UBI: smallest flash I/O unit:    2048
<5>[    1.780000] UBI: sub-page size:              512
<5>[    1.780000] UBI: VID header offset:          512 (aligned 512)
<5>[    1.790000] UBI: data offset:                2048
<5>[    2.200000] UBI: attached mtd2 to ubi0
<5>[    2.200000] UBI: MTD device name:            "rootfs"
<5>[    2.210000] UBI: MTD device size:            114 MiB
<5>[    2.210000] UBI: number of good PEBs:        910
<5>[    2.220000] UBI: number of bad PEBs:         2
<5>[    2.220000] UBI: max. allowed volumes:       128
<5>[    2.220000] UBI: wear-leveling threshold:    4096
<5>[    2.230000] UBI: number of internal volumes: 1
<5>[    2.230000] UBI: number of user volumes:     1
<5>[    2.240000] UBI: available PEBs:             0
<5>[    2.240000] UBI: total number of reserved PEBs: 910
<5>[    2.250000] UBI: number of PEBs reserved for bad PEB handling: 9
<5>[    2.250000] UBI: max/mean erase counter: 2/0
<5>[    2.260000] UBI: image sequence number: 0
<5>[    2.260000] UBI: background thread "ubi_bgt0d" started, PID 275
<6>[    2.270000] mice: PS/2 mouse device common for all mice
<6>[    2.270000] TCP cubic registered
<6>[    2.280000] NET: Registered protocol family 10
<6>[    2.280000] NET: Registered protocol family 17
<6>[    2.290000] RPC: Registered udp transport module.
<6>[    2.290000] RPC: Registered tcp transport module.
<5>[    2.520000] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
<5>[    2.530000] UBIFS: file system size:   114315264 bytes (111636 KiB, 109 MiB, 886 LEBs)
<5>[    2.540000] UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
<5>[    2.540000] UBIFS: media format:       w4/r0 (latest is w4/r0)
<5>[    2.550000] UBIFS: default compressor: zlib
<5>[    2.550000] UBIFS: reserved for root:  0 bytes (0 KiB)
<4>[    2.560000] VFS: Mounted root (ubifs filesystem) on device 0:10.
<6>[    2.570000] Freeing init memory: 120K
<5>[    3.440000] Probing for Synopsis GMAC, unit 0
<6>[    3.450000] eth0: Tuning GMAC 0 RGMII timings
<6>[    3.450000] eth0: PHY is Realtek RTL8211D, type 0x001cc914
<5>[    3.460000] eth0: GMAC ver = 53, vendor ver = 18 at 0xed400000, IRQ 40
<5>[    3.470000] eth0: Found PHY at address 3, type 0x001cc914 -> 10/100/1000
<5>[    3.480000] eth0: Ethernet addr: 00:30:e0:00:00:00
<6>[    3.500000] eth0: PHY is Realtek RTL8211D, type 0x001cc914
<6>[    3.500000] Offload is not active on eth0
<6>[    3.510000] Alloc'ing ARM descs 10240 bytes
<6>[    3.510000] eth0: Resetting GMAC
<6>[    3.520000] eth0: GMAC reset complete
<6>[    3.520000] eth0: Setting Rx flow control thresholds for LAN port
<6>[    4.080000] eth0: PHY is Realtek RTL8211D, type 0x001cc914
<6>[    4.580000] eth0: link down
<6>[    6.540000] ADDRCONF(NETDEV_UP): eth0: link is not ready
<6>[    8.080000] eth0: link up, 1000Mbps, full-duplex, using pause, lpa 0xCDE1
<6>[    8.080000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
<6>[   10.690000] usbcore: registered new interface driver usbfs
<6>[   10.700000] usbcore: registered new interface driver hub
<6>[   10.710000] usbcore: registered new device driver usb
<6>[   10.760000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<6>[   10.770000] oxnas-ehci oxnas-ehci.0: OXNAS EHCI Host Controller
<6>[   10.780000] oxnas-ehci oxnas-ehci.0: new USB bus registered, assigned bus number 1
<6>[   10.810000] oxnas-ehci oxnas-ehci.0: irq 39, io mem 0x00000000
<6>[   10.830000] oxnas-ehci oxnas-ehci.0: USB 0.0 started, EHCI 1.00
<6>[   10.840000] usb usb1: configuration #1 chosen from 1 choice
<6>[   10.840000] hub 1-0:1.0: USB hub found
<6>[   10.850000] hub 1-0:1.0: 2 ports detected
<6>[   10.940000] Initializing USB Mass Storage driver…
<6>[   10.940000] usbcore: registered new interface driver usb-storage
<6>[   10.950000] USB Mass Storage support registered.
<6>[   11.170000] usb 1-1: new high speed USB device using oxnas-ehci and address 2
<4>[   11.330000] ufsd: module license 'Commercial product' taints kernel.
<4>[   11.340000] Disabling lock debugging due to kernel taint
<6>[   11.470000] usb 1-1: configuration #1 chosen from 1 choice
<6>[   11.560000] hub 1-1:1.0: USB hub found
<6>[   11.570000] hub 1-1:1.0: 4 ports detected
<5>[   11.610000] ufsd: driver 8.3 (008_A) with acl LBD=ON with ioctl loaded at bf078000
<5>[   11.610000] NTFS read/write support included
<5>[   11.610000] Hfs+/HfsX read/write support included
<6>[   11.870000] usb 1-1.2: new high speed USB device using oxnas-ehci and address 3
<4>[   11.960000] rtusb init rt2870 —>
<6>[   11.970000] usbcore: registered new interface driver rt2870
<4>[   12.000000] Cloud Engines XCE Init [Version: 2.5.9.1]
<6>[   12.010000] XCE: CPU MEMORY MAP:
<6>[   12.010000] XCE:   — 0x00001000 – 0xbeffffff (3055 MB)  User Space Mappings
<6>[   12.020000] XCE:   — 0xbf000000 – 0xbfffffff (  16 MB)  Kernel module space
<6>[   12.020000] XCE:   — 0xc0000000 – 0xc7ffffff ( 128 MB)  Kernel direct-mapped ram
<6>[   12.030000] XCE:   — 0xc8800000 – 0xecffffff ( 584 MB)  Kernel vmalloc space
<6>[   12.040000] XCE:   — 0xed000000 – 0xfeffffff ( 287 MB)  Kernel platform space
<6>[   12.040000] XCE: CPU FEATURES:
<6>[   12.050000] XCE:   — I Cache:         enabled
<6>[   12.050000] XCE:   — D Cache:         enabled
<6>[   12.060000] XCE:   — Branch Predict:  disabled
<6>[   12.060000] XCE:   — MMU:             enabled
<6>[   12.070000] XCE:   — Alignment Abort: disabled
<6>[   12.070000] XCE: BLPARAMS: Locating parameter block…
<6>[   12.080000] XCE: BLPARAMS: reading 2048 bytes @ a0000
<6>[   12.080000] XCE: Loaded Property Size: 2048
<6>[   12.090000] XCE:    – 'cesvcid' -> '7BR8RPYW6XVXK3F2PKS978HRTN'
<6>[   12.090000] XCE:    – 'ceboardver' -> 'PPV3'
<4>[   12.100000] XCE: No board spec found matching boardid 'PPV3' — Using 'PPRO1'
<6>[   12.100000] XCE: Current GPIO State:
<6>[   12.110000] XCE:  GPIO A input:        0xf679fff7
<6>[   12.110000] XCE:  GPIO A OE status:    0x00000000
<6>[   12.120000] XCE:  GPIO A IRQ enable:   0x00000000
<6>[   12.120000] XCE:  GPIO A IRQ event:    0x00000000
<6>[   12.130000] XCE:  GPIO A output state: 0x00000000
<6>[   12.130000] XCE:  GPIO B input:        0x0003ffff
<6>[   12.140000] XCE:  GPIO B OE status:    0x00030000
<6>[   12.140000] XCE:  GPIO B IRQ enable:   0x00000000
<6>[   12.150000] XCE:  GPIO B IRQ event:    0x00000000
<6>[   12.150000] XCE:  GPIO B output state: 0x00030000
<6>[   12.290000] XCE: BLPARAMS: Locating parameter block…
<6>[   12.290000] XCE: BLPARAMS: reading 2048 bytes @ a0000
<6>[   12.300000] XCE: BLPARAMS: reading 2048 bytes @ a0800
<6>[   12.310000] XCE: BLPARAMS: reading 2048 bytes @ a1000
<6>[   12.310000] XCE: BLPARAMS: reading 2048 bytes @ a1800
<6>[   13.990000] usb 1-1.2: configuration #1 chosen from 1 choice
<6>[   14.010000] scsi2 : SCSI emulation for USB Mass Storage devices
<7>[   14.020000] usb-storage: device found at 3
<7>[   14.020000] usb-storage: waiting for device to settle before scanning
<6>[   17.800000] XCE: XCE: LED -> CONNECTED
<7>[   18.200000] eth0: no IPv6 routers present
<5>[   19.020000] scsi 2:0:0:0: Direct-Access        Mass  Storage Device        PQ: 0 ANSI: 0
<5>[   19.050000] sd 2:0:0:0: [sda] 625142446 512-byte logical blocks: (320 GB/298 GiB)
<7>[   19.050000] usb-storage: device scan complete
<5>[   19.050000] sd 2:0:0:0: [sda] Write Protect is off
<7>[   19.060000] sd 2:0:0:0: [sda] Mode Sense: 03 00 00 00
<3>[   19.060000] sd 2:0:0:0: [sda] Assuming drive cache: write through
<3>[   19.070000] sd 2:0:0:0: [sda] Assuming drive cache: write through
<6>[   19.070000]  sda: sda1
<3>[   19.220000] sd 2:0:0:0: [sda] Assuming drive cache: write through
<5>[   19.220000] sd 2:0:0:0: [sda] Attached SCSI disk
<5>[   19.930000] ufsd: use builtin utf8 instead of kernel utf8
<5>[   20.130000] ufsd: sda1 without journal
<6>[  517.820000] XCE: BLPARAMS: Locating parameter block…
<6>[  517.830000] XCE: BLPARAMS: reading 2048 bytes @ a0000
<6>[  517.840000] XCE: BLPARAMS: reading 2048 bytes @ a0800
<6>[  517.840000] XCE: BLPARAMS: reading 2048 bytes @ a1000
<6>[  517.850000] XCE: BLPARAMS: reading 2048 bytes @ a1800
 

 

.