Skip to content

hermeli/amx

Repository files navigation

Getting Started

Get Repo

Enter the following to download make executable the "repo" binary:

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo 
chmod a+x ~/bin/repo

Initialize Repository

Now enter the following to initialize the repository:

mkdir ~/amx
cd ~/amx 
repo init -u ssh://git@github.com/luklanis/amx.git
repo sync

Start a local branch to work with:

repo start master --all

Using repo

Git and Repo

Build the AMX root file system and toolchain

cd buildroot
make

For more details read ./builroot/README.md

Build the AMX u-boot

cd uboot
export CROSS_COMPILE=</path/to/amx/buildroot/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi->
make amm_config
make all

Build the AMX kernel

The first time you need to install mkimage to build uImage

sudo aptitude install uboot-mkimage

cd kernel
./kernel_cross_build.sh

Build node

cd ./   // (root directory of amx repository)
git clone https://github.com/joyent/node.git
cp amx/node_cross_compile.sh node/
cd node
git checkout v0.8.12

The toolchain of buildroot uses uClibc. Because the V8 does a wrong test we have to remove some code:

vim vim deps/v8/src/platform-linux.cc
// type "1036 Ctrl-g 5dd jjj dd"
// This vim commands go to line 1036, removes the 5 rows below, goes 3 rows down and remove again a row.
// Type ":wq" to save and close vim

Now run the script to build node

./node_cross_compile.sh

Build node-sqlite3

cd ./   // (root directory of amx repository)
git clone git://github.com/developmentseed/node-sqlite3.git
cp amx/node-sqlite3_cross_compile.sh node-sqlite3/
cd node-sqlite3
./node-sqlite3_cross_compile.sh

Prepare for tftp

cp buildroot/output/images/rootfs.jffs2 /tftpboot/
cp uboot/u-boot.bin /tftpboot/
cp kernel/arch/arm/boot/uImage /tftpboot/

To set the ethernet env's type on AMX over serial terminal:

setenv ipaddr <ip address>
setenv gatewayip <gateway address>
setenv netmask <subnet mask>
setenv serverip <tftp server address>
saveenv

Update u-boot

On AMX over serial terminal type (env's already set):

tftp 0x21000000 u-boot.bin
protect off 0x10020000 0x1005FFFF
erase 0x10020000 0x1005FFFF
cp.b 0x21000000 0x10020000 ${filesize}

Update kernel only

On AMX over serial terminal type (env's already set):

tftp 0x21000000 uImage
erase 0x10080000 end    // end <- something like 0x1017FFFF (startaddr + ${filesize} < (endaddr == end of block))
cp.b 0x21000000 0x10080000 ${filesize}

Update root fs

On AMX over serial terminal type (env's already set):

tftp 0x21000000 rootfs.jffs2
erase 0x10400000 0x10ffffff
cp.b 0x21000000 0x10400000 ${filesize}

Update kernel and root fs together

On AMX over serial terminal type (env's already set):

setenv kernel uImage
setenv rootfs rootfs.jffs2
erase 0x10080000 0x10ffffff
run tftpinstallkernel

Releases

No releases published

Packages

No packages published

Languages