=Build Linux Environment= ==Preparation== Change directory to a directory you want to use, and set WORKING_DIRECTORY to it: (e.g. use /home/user/cpss as working directory)
export WORKING_DIRECTORY=/home/user/cpss
Create some directory for building:
mkdir -p archives linux lsp
Get compiler package armv7-marvell-linux-gnueabi-softfp_i686_201201.tar.bz2, save it into archives directory, and extract it to /opt:
tar -xf archives/armv7-marvell-linux-gnueabi-softfp_i686_201201.tar.bz2 -C /opt
Setup compiler environment:
export PATH=/opt/Marvell_toolchain_201201/armv7-marvell-linux-gnueabi-softfp_i686/bin:$PATH
export CROSS_COMPILE=/opt/Marvell_toolchain_201201/armv7-marvell-linux-gnueabi-softfp_i686/bin/arm-marvell-linux-gnueabi-
export ARCH=arm
==Build kernel== Get linux-3.10.70.tar.xz for kernel.org, save it into archives directory. Then extract it:
tar -xf archives/linux-3.10.70.tar.xz
mv linux-3.10.70 kernel
Extract linux-3.10.70-2015_T1.2p15.zip from lsp package, and save it into lsp directory. Then extract it into kernel directory:
cd kernel
unzip -o ../lsp/linux-3.10.70-2015_T1.2p15.zip
Build kernel:
make mrproper
make mvebu_lsp_defconfig
make LOCALVERSION= zImage -j4
make armada-370-rd.dtb
=Burn files into main board= ==Burn into SPI NOR Flash== Partition structure:
0x0000000--0x0F00000 uboot
0x00f0000--0x0100000 uboot env
0x0100000--0x0900000 kernel
0x0900000--0x0910000 device tree
0x0920000--0x1900000 rootfs
0x1900000--0x2000000 app-jffs2
Probe SPI Flash:
sf probe
Burn u-boot: Send u-boot image from PC UART in 115200bps, 8N1, X-Modem mode
loadx 0x02000000
sf write 0x02000000 0x0 0x100000
Burn kernel: Send kernel image from PC UART in 115200bps, 8N1, X-Modem mode
loadx 0x02000000
sf write 0x02000000 0x100000 0x500000
Burn device tree: Send device tree file from PC UART in 115200bps, 8N1, X-Modem mode
loadx 0x02000000
sf write 0x02000000 0x900000 0x4000
Burn rootfs: Send rootfs image from PC UART in 115200bps, 8N1, X-Modem mode
loadx 0x02000000
sf write 0x02000000 0x920000 0x1400000
==Burn into NAND Flash== Partition structure:
0x00000000--0x00500000 uboot
0x00500000--0x00510000 uboot env
0x00600000--0x00E00000 kernel
0x00E00000--0x00E40000 device tree
0x00F00000--0x03000000 rootfs
0x03000000--0x20000000 app-yaffs2
Earse NAND:
nand erase 0 0x20000000
Burn u-boot: Send u-boot image from PC UART in 115200bps, 8N1, X-Modem mode
loadx 0x02000000
nand write 0x02000000 0x0 0x100000
Burn kernel: Send kernel image from PC UART in 115200bps, 8N1, X-Modem mode
loadx 0x02000000
nand write 0x02000000 0x600000 0x500000
Burn device tree: Send device tree file from PC UART in 115200bps, 8N1, X-Modem mode
loadx 0x02000000
nand write 0x02000000 0xE00000 0x40000
Burn rootfs: Send rootfs image from PC UART in 115200bps, 8N1, X-Modem mode
loadx 0x02000000
nand erase 0xF00000 0x1400000
nand write 0x02000000 0xF00000 0x1400000