Skip to content

Instantly share code, notes, and snippets.

@jinleileiking
Created July 4, 2012 03:11
Show Gist options
  • Save jinleileiking/3045021 to your computer and use it in GitHub Desktop.
Save jinleileiking/3045021 to your computer and use it in GitHub Desktop.
335x script

system to nand

mlo & uboot from sdcard

mmc rescan ; nand erase 0x0 0x280000 ; nandecc hw 2; fatload mmc 0 0x81000000 MLO_nand; nand write 0x81000000 0x0 0x20000; nand write 0x81000000 0x20000 0x20000; nand write 0x81000000 0x40000 0x20000; nand write 0x81000000 0x60000 0x20000; fatload mmc 0 0x81000000 u-boot_nand.img; nand write 0x81000000 0x80000 0x1E0000;

kernel from sdard

mmc rescan ; nandecc hw 2; mw.b 0x82000000 0xff 0x500000; fatload mmc 0 0x82000000 uimage; nandecc hw 2; nand erase 0x00280000 0x00500000; nand write 0x82000000 0x00280000 0x500000

make ubifs fs

e mtd-tools
mkfs.ubifs -r base/ -F -o ubifs.img -m 2048 -e 126976 -c 1580
ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 ubinize.cfg

flash ubifs to nand from sdcard

In linux:

ubiformat /dev/mtd7 -f ubi.img -s 512 -O 2048
mw.b 0x82000000 0xFF 0xFC0000
mmc rescan
fatload mmc 0 0x82000000 ubi.img
nand erase 0x00780000 0xF880000
nandecc hw 2
nand write 0x82000000 0x780000 0xFC0000

not ok..

build uboot

export PATH=$PATH:`pwd`
make O=am335x CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm am335x_evm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment