<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.linuxmce.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gerry</id>
	<title>LinuxMCE - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.linuxmce.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gerry"/>
	<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php/Special:Contributions/Gerry"/>
	<updated>2026-07-21T23:09:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18717</id>
		<title>Mini2440</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18717"/>
		<updated>2009-05-02T01:46:52Z</updated>

		<summary type="html">&lt;p&gt;Gerry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[Image:Mini2440.jpg|thumb|200px|mini2440]]&lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
This is a howto install uboot and a new kernel on the mini2440. Big thanks to BusError for the instructions and guidance. DISCLAIMER: This worked for me, if it eats your cat or burns your kitchen sink, don&#039;t blame me.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
== Toolchain ==&lt;br /&gt;
I used this one: http://www.codesourcery.com/sgpp/lite/arm/portal/package3696/public/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Add the bin dir to the $PATH. If you have a toolchain with another prefix (like arm-linux-) adapt the CROSS_COMPILE environment variable in the next steps.&lt;br /&gt;
&lt;br /&gt;
= Setting up the bootloader =&lt;br /&gt;
== Compiling uboot ==&lt;br /&gt;
Clone the git tree:&lt;br /&gt;
 mkdir uboot ; cd uboot&lt;br /&gt;
 git clone git://repo.or.cz/u-boot-openmoko/mini2440.git&lt;br /&gt;
Setup cross compiling:&lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
or edit your .bashrc eg. &lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
 export PS1=&amp;quot;\[\033[1;34m\]\u \[\033[0m\]\w:\$: \[\033[0m\]&amp;quot;&lt;br /&gt;
 #export PS1=&amp;quot;\u:\w\$&amp;gt;&amp;quot;&lt;br /&gt;
 LS_OPTIONS=&amp;quot;--color=auto&amp;quot;&lt;br /&gt;
 alias ls=&amp;quot;ls $LS_OPTIONS&amp;quot;&lt;br /&gt;
Prepare the mini2440 target:&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 make mini2440_config&lt;br /&gt;
Compile:&lt;br /&gt;
 make all&lt;br /&gt;
This will give you a &amp;quot;u-boot.bin&amp;quot;. If you get an error about a missing whatever-gcc, verifiy if there is a hardcoded CROSS_COMPILE setting in the Makefile&lt;br /&gt;
&lt;br /&gt;
== Flashing uboot ==&lt;br /&gt;
We use the installed vivi bootloader to load uboot via usb. Power the board off, set the NOR switch to on, power the board on. You&#039;ll get the vivi output on the serial console. Press &#039;q&#039; to go to the shell and do the &amp;quot;load flash&amp;quot; on address 0 with the size of &amp;quot;u-boot.bin&amp;quot; (238232 bytes in this example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[q] Goto shell of vivi                                                          &lt;br /&gt;
Enter your selection: q                                                         &lt;br /&gt;
Supervivi&amp;gt; load flash 0 238232 u                                                &lt;br /&gt;
USB host is connected. Waiting a download.                                      &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;s3c2410_boot_usb&amp;quot; utility (http://mini2440.googlecode.com/files/s3c2410_boot_usb-20060807.tar.bz2) to upload the &amp;quot;u-boot.bin&amp;quot; via usb:&lt;br /&gt;
 ./s3c2410_boot_usb u-boot.bin &lt;br /&gt;
You&#039;ll see something like this as output, ignore the error message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
csum = 0x9a6e&lt;br /&gt;
send_file: addr = 0x33f80000, len = 0x0003a298&lt;br /&gt;
Error downloading program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and this on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Now, Downloading [ADDRESS:30000000h,TOTAL:238242]                               &lt;br /&gt;
RECEIVED FILE SIZE:  238242 (232KB/S, 1S)                                       &lt;br /&gt;
Downloaded file at 0x30000000, size = 238232 bytes                              &lt;br /&gt;
Found block size = 0x0003c000                                                   &lt;br /&gt;
Erasing...    ... done                                                          &lt;br /&gt;
Writing...    ... done                                                          &lt;br /&gt;
Written 238232 bytes                                                            &lt;br /&gt;
Supervivi&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you see&lt;br /&gt;
 MINI2440 # saveenv&lt;br /&gt;
 &lt;br /&gt;
 Saving Environment to NAND...&lt;br /&gt;
 &lt;br /&gt;
 Erasing Nand...nand_erase: attempt to erase a bad block at page 0x00000260&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 MINI2440 # nand scrub&lt;br /&gt;
 ...&lt;br /&gt;
 Really scrub this NAND flash? &amp;lt;y/N&amp;gt;&lt;br /&gt;
press y and enter. After erasing make&lt;br /&gt;
 MINI2440 # nand createbbt&lt;br /&gt;
press y and enter. Now you can save the environment&lt;br /&gt;
  MINI2440 # saveenv&lt;br /&gt;
&lt;br /&gt;
Now power off the board, set the NOR switch back to off, and power on the board. We verify the version and then prepare config storage in flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINI2440 # version                                                              &lt;br /&gt;
                                                                                &lt;br /&gt;
U-Boot 1.3.2-dirty-moko12 (Mar  8 2009 - 13:50:19)  &lt;br /&gt;
&lt;br /&gt;
MINI2440 # dynenv set 40000                                                     &lt;br /&gt;
device 0 offset 0x40000, size 0x3fc0000                                         &lt;br /&gt;
45 4e 56 30 - 00 00 04 00           &lt;br /&gt;
&lt;br /&gt;
MINI2440 # saveenv                                                              &lt;br /&gt;
Saving Environment to NAND...                                                   &lt;br /&gt;
Erasing Nand...Writing to Nand... done                                          &lt;br /&gt;
&lt;br /&gt;
MINI2440 # reset                                                                &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
do a &amp;quot;printenv&amp;quot; to show active settings. Adjust the IP for uboot and the tftp server. We need proper IP connectivity to load the kernel with tftp. &amp;quot;setenv&amp;quot; is your friend. &amp;quot;saveenv&amp;quot; stores the setting to flash.&lt;br /&gt;
&lt;br /&gt;
= Kernel =&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Fetch from git:&lt;br /&gt;
 mkdir kernel ; cd kernel&lt;br /&gt;
 git clone git://repo.or.cz/linux-2.6/mini2440.git&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 mkdir -p ../kernel-bin&lt;br /&gt;
Generate .config from mini2440 template:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ mini2440_defconfig&lt;br /&gt;
Compile kernel and modules:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/&lt;br /&gt;
Generate &amp;quot;uImage&amp;quot; with the &amp;quot;mkimage&amp;quot; tool:&lt;br /&gt;
 ../uboot/mini2440/tools/mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d ../kernel-bin/arch/arm/boot/zImage /tftpboot/uImage&lt;br /&gt;
&lt;br /&gt;
== Flash kernel ==&lt;br /&gt;
Verify partitions, we need the offset for the kernel partition (probably 0x60000):&lt;br /&gt;
 mtdparts&lt;br /&gt;
Erase the kernel partition:&lt;br /&gt;
 nand erase 60000 &amp;lt;padded size&amp;gt;&lt;br /&gt;
Load the kernel with uboot into ram:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
Note the size, pad it to 512 byte and use the nand write command to flash it:&lt;br /&gt;
 nand write 32000000 60000 &amp;lt;padded size&amp;gt;.&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
We use a nfs chroot for now:&lt;br /&gt;
 setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.80.12 root=/dev/nfs rw nfsroot=192.168.80.1:/home/public/arm&lt;br /&gt;
This is helpful for automatic booting:&lt;br /&gt;
 setenv bootcmd &#039;nboot.e kernel ; bootm&#039;&lt;br /&gt;
= Setting up embedian =&lt;br /&gt;
Follow this nice howto from BusError http://code.google.com/p/mini2440/wiki/Emdebian&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
== Write errors ==&lt;br /&gt;
When you have bad blocks in NAND, you&#039;ll get write errors. This gives more information: http://wiki.openmoko.org/wiki/NAND_bad_blocks&lt;br /&gt;
&lt;br /&gt;
Clear the flash (do not reset the board till uboot is reinstalled, or you need to use NOR/vivi to reinstall uboot via usb):&lt;br /&gt;
 nand scrub&lt;br /&gt;
Create new bad blocks table:&lt;br /&gt;
 nand createbbt&lt;br /&gt;
Reflash uboot (use the size in the output from the tftp command and pad it to hit 512 byte boundaries for the nand write command)&lt;br /&gt;
 tftp 0x32000000 u-boot.bin&lt;br /&gt;
 nand write 32000000 0 &amp;lt;size of u-boot.bin&amp;gt;&lt;br /&gt;
 reset&lt;br /&gt;
Create dynamic partitions:&lt;br /&gt;
 dynpart&lt;br /&gt;
 dynenv set u-boot_env&lt;br /&gt;
 saveenv&lt;br /&gt;
 reset&lt;br /&gt;
And then use write.e to write to the mtdparts, e.g.:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
 nand write.e 32000000 kernel&lt;br /&gt;
 nboot.e kernel&lt;br /&gt;
= Links =&lt;br /&gt;
http://bliterness.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/mini2440/&lt;br /&gt;
&lt;br /&gt;
http://blog.cor-net.org/ (Qt 4.5 on mini2440)&lt;/div&gt;</summary>
		<author><name>Gerry</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18716</id>
		<title>Mini2440</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18716"/>
		<updated>2009-05-02T01:46:12Z</updated>

		<summary type="html">&lt;p&gt;Gerry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[Image:Mini2440.jpg|thumb|200px|mini2440]]&lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
This is a howto install uboot and a new kernel on the mini2440. Big thanks to BusError for the instructions and guidance. DISCLAIMER: This worked for me, if it eats your cat or burns your kitchen sink, don&#039;t blame me.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
== Toolchain ==&lt;br /&gt;
I used this one: http://www.codesourcery.com/sgpp/lite/arm/portal/package3696/public/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Add the bin dir to the $PATH. If you have a toolchain with another prefix (like arm-linux-) adapt the CROSS_COMPILE environment variable in the next steps.&lt;br /&gt;
&lt;br /&gt;
= Setting up the bootloader =&lt;br /&gt;
== Compiling uboot ==&lt;br /&gt;
Clone the git tree:&lt;br /&gt;
 mkdir uboot ; cd uboot&lt;br /&gt;
 git clone git://repo.or.cz/u-boot-openmoko/mini2440.git&lt;br /&gt;
Setup cross compiling:&lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
or edit your .bashrc eg. &lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
 export PS1=&amp;quot;\[\033[1;34m\]\u \[\033[0m\]\w:\$: \[\033[0m\]&amp;quot;&lt;br /&gt;
 #export PS1=&amp;quot;\u:\w\$&amp;gt;&amp;quot;&lt;br /&gt;
 LS_OPTIONS=&amp;quot;--color=auto&amp;quot;&lt;br /&gt;
 alias ls=&amp;quot;ls $LS_OPTIONS&amp;quot;&lt;br /&gt;
Prepare the mini2440 target:&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 make mini2440_config&lt;br /&gt;
Compile:&lt;br /&gt;
 make all&lt;br /&gt;
This will give you a &amp;quot;u-boot.bin&amp;quot;. If you get an error about a missing whatever-gcc, verifiy if there is a hardcoded CROSS_COMPILE setting in the Makefile&lt;br /&gt;
&lt;br /&gt;
== Flashing uboot ==&lt;br /&gt;
We use the installed vivi bootloader to load uboot via usb. Power the board off, set the NOR switch to on, power the board on. You&#039;ll get the vivi output on the serial console. Press &#039;q&#039; to go to the shell and do the &amp;quot;load flash&amp;quot; on address 0 with the size of &amp;quot;u-boot.bin&amp;quot; (238232 bytes in this example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[q] Goto shell of vivi                                                          &lt;br /&gt;
Enter your selection: q                                                         &lt;br /&gt;
Supervivi&amp;gt; load flash 0 238232 u                                                &lt;br /&gt;
USB host is connected. Waiting a download.                                      &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;s3c2410_boot_usb&amp;quot; utility (http://mini2440.googlecode.com/files/s3c2410_boot_usb-20060807.tar.bz2) to upload the &amp;quot;u-boot.bin&amp;quot; via usb:&lt;br /&gt;
 ./s3c2410_boot_usb u-boot.bin &lt;br /&gt;
You&#039;ll see something like this as output, ignore the error message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
csum = 0x9a6e&lt;br /&gt;
send_file: addr = 0x33f80000, len = 0x0003a298&lt;br /&gt;
Error downloading program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and this on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Now, Downloading [ADDRESS:30000000h,TOTAL:238242]                               &lt;br /&gt;
RECEIVED FILE SIZE:  238242 (232KB/S, 1S)                                       &lt;br /&gt;
Downloaded file at 0x30000000, size = 238232 bytes                              &lt;br /&gt;
Found block size = 0x0003c000                                                   &lt;br /&gt;
Erasing...    ... done                                                          &lt;br /&gt;
Writing...    ... done                                                          &lt;br /&gt;
Written 238232 bytes                                                            &lt;br /&gt;
Supervivi&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you see&lt;br /&gt;
 MINI2440 # saveen&lt;br /&gt;
 &lt;br /&gt;
 Saving Environment to NAND...&lt;br /&gt;
 &lt;br /&gt;
 Erasing Nand...nand_erase: attempt to erase a bad block at page 0x00000260&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
 MINI2440 # nand scrub&lt;br /&gt;
 ...&lt;br /&gt;
 Really scrub this NAND flash? &amp;lt;y/N&amp;gt;&lt;br /&gt;
press y and enter. After erasing make&lt;br /&gt;
 MINI2440 # nand createbbt&lt;br /&gt;
press y and enter. Now you can save the environment&lt;br /&gt;
  MINI2440 # saveenv&lt;br /&gt;
&lt;br /&gt;
Now power off the board, set the NOR switch back to off, and power on the board. We verify the version and then prepare config storage in flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINI2440 # version                                                              &lt;br /&gt;
                                                                                &lt;br /&gt;
U-Boot 1.3.2-dirty-moko12 (Mar  8 2009 - 13:50:19)  &lt;br /&gt;
&lt;br /&gt;
MINI2440 # dynenv set 40000                                                     &lt;br /&gt;
device 0 offset 0x40000, size 0x3fc0000                                         &lt;br /&gt;
45 4e 56 30 - 00 00 04 00           &lt;br /&gt;
&lt;br /&gt;
MINI2440 # saveenv                                                              &lt;br /&gt;
Saving Environment to NAND...                                                   &lt;br /&gt;
Erasing Nand...Writing to Nand... done                                          &lt;br /&gt;
&lt;br /&gt;
MINI2440 # reset                                                                &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
do a &amp;quot;printenv&amp;quot; to show active settings. Adjust the IP for uboot and the tftp server. We need proper IP connectivity to load the kernel with tftp. &amp;quot;setenv&amp;quot; is your friend. &amp;quot;saveenv&amp;quot; stores the setting to flash.&lt;br /&gt;
&lt;br /&gt;
= Kernel =&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Fetch from git:&lt;br /&gt;
 mkdir kernel ; cd kernel&lt;br /&gt;
 git clone git://repo.or.cz/linux-2.6/mini2440.git&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 mkdir -p ../kernel-bin&lt;br /&gt;
Generate .config from mini2440 template:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ mini2440_defconfig&lt;br /&gt;
Compile kernel and modules:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/&lt;br /&gt;
Generate &amp;quot;uImage&amp;quot; with the &amp;quot;mkimage&amp;quot; tool:&lt;br /&gt;
 ../uboot/mini2440/tools/mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d ../kernel-bin/arch/arm/boot/zImage /tftpboot/uImage&lt;br /&gt;
&lt;br /&gt;
== Flash kernel ==&lt;br /&gt;
Verify partitions, we need the offset for the kernel partition (probably 0x60000):&lt;br /&gt;
 mtdparts&lt;br /&gt;
Erase the kernel partition:&lt;br /&gt;
 nand erase 60000 &amp;lt;padded size&amp;gt;&lt;br /&gt;
Load the kernel with uboot into ram:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
Note the size, pad it to 512 byte and use the nand write command to flash it:&lt;br /&gt;
 nand write 32000000 60000 &amp;lt;padded size&amp;gt;.&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
We use a nfs chroot for now:&lt;br /&gt;
 setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.80.12 root=/dev/nfs rw nfsroot=192.168.80.1:/home/public/arm&lt;br /&gt;
This is helpful for automatic booting:&lt;br /&gt;
 setenv bootcmd &#039;nboot.e kernel ; bootm&#039;&lt;br /&gt;
= Setting up embedian =&lt;br /&gt;
Follow this nice howto from BusError http://code.google.com/p/mini2440/wiki/Emdebian&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
== Write errors ==&lt;br /&gt;
When you have bad blocks in NAND, you&#039;ll get write errors. This gives more information: http://wiki.openmoko.org/wiki/NAND_bad_blocks&lt;br /&gt;
&lt;br /&gt;
Clear the flash (do not reset the board till uboot is reinstalled, or you need to use NOR/vivi to reinstall uboot via usb):&lt;br /&gt;
 nand scrub&lt;br /&gt;
Create new bad blocks table:&lt;br /&gt;
 nand createbbt&lt;br /&gt;
Reflash uboot (use the size in the output from the tftp command and pad it to hit 512 byte boundaries for the nand write command)&lt;br /&gt;
 tftp 0x32000000 u-boot.bin&lt;br /&gt;
 nand write 32000000 0 &amp;lt;size of u-boot.bin&amp;gt;&lt;br /&gt;
 reset&lt;br /&gt;
Create dynamic partitions:&lt;br /&gt;
 dynpart&lt;br /&gt;
 dynenv set u-boot_env&lt;br /&gt;
 saveenv&lt;br /&gt;
 reset&lt;br /&gt;
And then use write.e to write to the mtdparts, e.g.:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
 nand write.e 32000000 kernel&lt;br /&gt;
 nboot.e kernel&lt;br /&gt;
= Links =&lt;br /&gt;
http://bliterness.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/mini2440/&lt;br /&gt;
&lt;br /&gt;
http://blog.cor-net.org/ (Qt 4.5 on mini2440)&lt;/div&gt;</summary>
		<author><name>Gerry</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18715</id>
		<title>Mini2440</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18715"/>
		<updated>2009-05-02T01:37:11Z</updated>

		<summary type="html">&lt;p&gt;Gerry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[Image:Mini2440.jpg|thumb|200px|mini2440]]&lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
This is a howto install uboot and a new kernel on the mini2440. Big thanks to BusError for the instructions and guidance. DISCLAIMER: This worked for me, if it eats your cat or burns your kitchen sink, don&#039;t blame me.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
== Toolchain ==&lt;br /&gt;
I used this one: http://www.codesourcery.com/sgpp/lite/arm/portal/package3696/public/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Add the bin dir to the $PATH. If you have a toolchain with another prefix (like arm-linux-) adapt the CROSS_COMPILE environment variable in the next steps.&lt;br /&gt;
&lt;br /&gt;
= Setting up the bootloader =&lt;br /&gt;
== Compiling uboot ==&lt;br /&gt;
Clone the git tree:&lt;br /&gt;
 mkdir uboot ; cd uboot&lt;br /&gt;
 git clone git://repo.or.cz/u-boot-openmoko/mini2440.git&lt;br /&gt;
Setup cross compiling:&lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
or edit your .bashrc eg. &lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
 export PS1=&amp;quot;\[\033[1;34m\]\u \[\033[0m\]\w:\$: \[\033[0m\]&amp;quot;&lt;br /&gt;
 #export PS1=&amp;quot;\u:\w\$&amp;gt;&amp;quot;&lt;br /&gt;
 LS_OPTIONS=&amp;quot;--color=auto&amp;quot;&lt;br /&gt;
 alias ls=&amp;quot;ls $LS_OPTIONS&amp;quot;&lt;br /&gt;
Prepare the mini2440 target:&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 make mini2440_config&lt;br /&gt;
Compile:&lt;br /&gt;
 make all&lt;br /&gt;
This will give you a &amp;quot;u-boot.bin&amp;quot;. If you get an error about a missing whatever-gcc, verifiy if there is a hardcoded CROSS_COMPILE setting in the Makefile&lt;br /&gt;
&lt;br /&gt;
== Flashing uboot ==&lt;br /&gt;
We use the installed vivi bootloader to load uboot via usb. Power the board off, set the NOR switch to on, power the board on. You&#039;ll get the vivi output on the serial console. Press &#039;q&#039; to go to the shell and do the &amp;quot;load flash&amp;quot; on address 0 with the size of &amp;quot;u-boot.bin&amp;quot; (238232 bytes in this example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[q] Goto shell of vivi                                                          &lt;br /&gt;
Enter your selection: q                                                         &lt;br /&gt;
Supervivi&amp;gt; load flash 0 238232 u                                                &lt;br /&gt;
USB host is connected. Waiting a download.                                      &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;s3c2410_boot_usb&amp;quot; utility (http://mini2440.googlecode.com/files/s3c2410_boot_usb-20060807.tar.bz2) to upload the &amp;quot;u-boot.bin&amp;quot; via usb:&lt;br /&gt;
 ./s3c2410_boot_usb u-boot.bin &lt;br /&gt;
You&#039;ll see something like this as output, ignore the error message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
csum = 0x9a6e&lt;br /&gt;
send_file: addr = 0x33f80000, len = 0x0003a298&lt;br /&gt;
Error downloading program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and this on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Now, Downloading [ADDRESS:30000000h,TOTAL:238242]                               &lt;br /&gt;
RECEIVED FILE SIZE:  238242 (232KB/S, 1S)                                       &lt;br /&gt;
Downloaded file at 0x30000000, size = 238232 bytes                              &lt;br /&gt;
Found block size = 0x0003c000                                                   &lt;br /&gt;
Erasing...    ... done                                                          &lt;br /&gt;
Writing...    ... done                                                          &lt;br /&gt;
Written 238232 bytes                                                            &lt;br /&gt;
Supervivi&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now power off the board, set the NOR switch back to off, and power on the board. We verify the version and then prepare config storage in flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINI2440 # version                                                              &lt;br /&gt;
                                                                                &lt;br /&gt;
U-Boot 1.3.2-dirty-moko12 (Mar  8 2009 - 13:50:19)  &lt;br /&gt;
&lt;br /&gt;
MINI2440 # dynenv set 40000                                                     &lt;br /&gt;
device 0 offset 0x40000, size 0x3fc0000                                         &lt;br /&gt;
45 4e 56 30 - 00 00 04 00           &lt;br /&gt;
&lt;br /&gt;
MINI2440 # saveenv                                                              &lt;br /&gt;
Saving Environment to NAND...                                                   &lt;br /&gt;
Erasing Nand...Writing to Nand... done                                          &lt;br /&gt;
&lt;br /&gt;
MINI2440 # reset                                                                &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
do a &amp;quot;printenv&amp;quot; to show active settings. Adjust the IP for uboot and the tftp server. We need proper IP connectivity to load the kernel with tftp. &amp;quot;setenv&amp;quot; is your friend. &amp;quot;saveenv&amp;quot; stores the setting to flash.&lt;br /&gt;
&lt;br /&gt;
= Kernel =&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Fetch from git:&lt;br /&gt;
 mkdir kernel ; cd kernel&lt;br /&gt;
 git clone git://repo.or.cz/linux-2.6/mini2440.git&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 mkdir -p ../kernel-bin&lt;br /&gt;
Generate .config from mini2440 template:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ mini2440_defconfig&lt;br /&gt;
Compile kernel and modules:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/&lt;br /&gt;
Generate &amp;quot;uImage&amp;quot; with the &amp;quot;mkimage&amp;quot; tool:&lt;br /&gt;
 ../uboot/mini2440/tools/mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d ../kernel-bin/arch/arm/boot/zImage /tftpboot/uImage&lt;br /&gt;
&lt;br /&gt;
== Flash kernel ==&lt;br /&gt;
Verify partitions, we need the offset for the kernel partition (probably 0x60000):&lt;br /&gt;
 mtdparts&lt;br /&gt;
Erase the kernel partition:&lt;br /&gt;
 nand erase 60000 &amp;lt;padded size&amp;gt;&lt;br /&gt;
Load the kernel with uboot into ram:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
Note the size, pad it to 512 byte and use the nand write command to flash it:&lt;br /&gt;
 nand write 32000000 60000 &amp;lt;padded size&amp;gt;.&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
We use a nfs chroot for now:&lt;br /&gt;
 setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.80.12 root=/dev/nfs rw nfsroot=192.168.80.1:/home/public/arm&lt;br /&gt;
This is helpful for automatic booting:&lt;br /&gt;
 setenv bootcmd &#039;nboot.e kernel ; bootm&#039;&lt;br /&gt;
= Setting up embedian =&lt;br /&gt;
Follow this nice howto from BusError http://code.google.com/p/mini2440/wiki/Emdebian&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
== Write errors ==&lt;br /&gt;
When you have bad blocks in NAND, you&#039;ll get write errors. This gives more information: http://wiki.openmoko.org/wiki/NAND_bad_blocks&lt;br /&gt;
&lt;br /&gt;
Clear the flash (do not reset the board till uboot is reinstalled, or you need to use NOR/vivi to reinstall uboot via usb):&lt;br /&gt;
 nand scrub&lt;br /&gt;
Create new bad blocks table:&lt;br /&gt;
 nand createbbt&lt;br /&gt;
Reflash uboot (use the size in the output from the tftp command and pad it to hit 512 byte boundaries for the nand write command)&lt;br /&gt;
 tftp 0x32000000 u-boot.bin&lt;br /&gt;
 nand write 32000000 0 &amp;lt;size of u-boot.bin&amp;gt;&lt;br /&gt;
 reset&lt;br /&gt;
Create dynamic partitions:&lt;br /&gt;
 dynpart&lt;br /&gt;
 dynenv set u-boot_env&lt;br /&gt;
 saveenv&lt;br /&gt;
 reset&lt;br /&gt;
And then use write.e to write to the mtdparts, e.g.:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
 nand write.e 32000000 kernel&lt;br /&gt;
 nboot.e kernel&lt;br /&gt;
= Links =&lt;br /&gt;
http://bliterness.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/mini2440/&lt;br /&gt;
&lt;br /&gt;
http://blog.cor-net.org/ (Qt 4.5 on mini2440)&lt;/div&gt;</summary>
		<author><name>Gerry</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18714</id>
		<title>Mini2440</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18714"/>
		<updated>2009-05-02T01:36:34Z</updated>

		<summary type="html">&lt;p&gt;Gerry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[Image:Mini2440.jpg|thumb|200px|mini2440]]&lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
This is a howto install uboot and a new kernel on the mini2440. Big thanks to BusError for the instructions and guidance. DISCLAIMER: This worked for me, if it eats your cat or burns your kitchen sink, don&#039;t blame me.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
== Toolchain ==&lt;br /&gt;
I used this one: http://www.codesourcery.com/sgpp/lite/arm/portal/package3696/public/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Add the bin dir to the $PATH. If you have a toolchain with another prefix (like arm-linux-) adapt the CROSS_COMPILE environment variable in the next steps.&lt;br /&gt;
&lt;br /&gt;
= Setting up the bootloader =&lt;br /&gt;
== Compiling uboot ==&lt;br /&gt;
Clone the git tree:&lt;br /&gt;
 mkdir uboot ; cd uboot&lt;br /&gt;
 git clone git://repo.or.cz/u-boot-openmoko/mini2440.git&lt;br /&gt;
Setup cross compiling:&lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
or edit you .bashrc eg. &lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi-&lt;br /&gt;
 export PS1=&amp;quot;\[\033[1;34m\]\u \[\033[0m\]\w:\$: \[\033[0m\]&amp;quot;&lt;br /&gt;
 #export PS1=&amp;quot;\u:\w\$&amp;gt;&amp;quot;&lt;br /&gt;
 LS_OPTIONS=&amp;quot;--color=auto&amp;quot;&lt;br /&gt;
 alias ls=&amp;quot;ls $LS_OPTIONS&amp;quot;&lt;br /&gt;
Prepare the mini2440 target:&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 make mini2440_config&lt;br /&gt;
Compile:&lt;br /&gt;
 make all&lt;br /&gt;
This will give you a &amp;quot;u-boot.bin&amp;quot;. If you get an error about a missing whatever-gcc, verifiy if there is a hardcoded CROSS_COMPILE setting in the Makefile&lt;br /&gt;
&lt;br /&gt;
== Flashing uboot ==&lt;br /&gt;
We use the installed vivi bootloader to load uboot via usb. Power the board off, set the NOR switch to on, power the board on. You&#039;ll get the vivi output on the serial console. Press &#039;q&#039; to go to the shell and do the &amp;quot;load flash&amp;quot; on address 0 with the size of &amp;quot;u-boot.bin&amp;quot; (238232 bytes in this example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[q] Goto shell of vivi                                                          &lt;br /&gt;
Enter your selection: q                                                         &lt;br /&gt;
Supervivi&amp;gt; load flash 0 238232 u                                                &lt;br /&gt;
USB host is connected. Waiting a download.                                      &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;s3c2410_boot_usb&amp;quot; utility (http://mini2440.googlecode.com/files/s3c2410_boot_usb-20060807.tar.bz2) to upload the &amp;quot;u-boot.bin&amp;quot; via usb:&lt;br /&gt;
 ./s3c2410_boot_usb u-boot.bin &lt;br /&gt;
You&#039;ll see something like this as output, ignore the error message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
csum = 0x9a6e&lt;br /&gt;
send_file: addr = 0x33f80000, len = 0x0003a298&lt;br /&gt;
Error downloading program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and this on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Now, Downloading [ADDRESS:30000000h,TOTAL:238242]                               &lt;br /&gt;
RECEIVED FILE SIZE:  238242 (232KB/S, 1S)                                       &lt;br /&gt;
Downloaded file at 0x30000000, size = 238232 bytes                              &lt;br /&gt;
Found block size = 0x0003c000                                                   &lt;br /&gt;
Erasing...    ... done                                                          &lt;br /&gt;
Writing...    ... done                                                          &lt;br /&gt;
Written 238232 bytes                                                            &lt;br /&gt;
Supervivi&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now power off the board, set the NOR switch back to off, and power on the board. We verify the version and then prepare config storage in flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINI2440 # version                                                              &lt;br /&gt;
                                                                                &lt;br /&gt;
U-Boot 1.3.2-dirty-moko12 (Mar  8 2009 - 13:50:19)  &lt;br /&gt;
&lt;br /&gt;
MINI2440 # dynenv set 40000                                                     &lt;br /&gt;
device 0 offset 0x40000, size 0x3fc0000                                         &lt;br /&gt;
45 4e 56 30 - 00 00 04 00           &lt;br /&gt;
&lt;br /&gt;
MINI2440 # saveenv                                                              &lt;br /&gt;
Saving Environment to NAND...                                                   &lt;br /&gt;
Erasing Nand...Writing to Nand... done                                          &lt;br /&gt;
&lt;br /&gt;
MINI2440 # reset                                                                &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
do a &amp;quot;printenv&amp;quot; to show active settings. Adjust the IP for uboot and the tftp server. We need proper IP connectivity to load the kernel with tftp. &amp;quot;setenv&amp;quot; is your friend. &amp;quot;saveenv&amp;quot; stores the setting to flash.&lt;br /&gt;
&lt;br /&gt;
= Kernel =&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Fetch from git:&lt;br /&gt;
 mkdir kernel ; cd kernel&lt;br /&gt;
 git clone git://repo.or.cz/linux-2.6/mini2440.git&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 mkdir -p ../kernel-bin&lt;br /&gt;
Generate .config from mini2440 template:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ mini2440_defconfig&lt;br /&gt;
Compile kernel and modules:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/&lt;br /&gt;
Generate &amp;quot;uImage&amp;quot; with the &amp;quot;mkimage&amp;quot; tool:&lt;br /&gt;
 ../uboot/mini2440/tools/mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d ../kernel-bin/arch/arm/boot/zImage /tftpboot/uImage&lt;br /&gt;
&lt;br /&gt;
== Flash kernel ==&lt;br /&gt;
Verify partitions, we need the offset for the kernel partition (probably 0x60000):&lt;br /&gt;
 mtdparts&lt;br /&gt;
Erase the kernel partition:&lt;br /&gt;
 nand erase 60000 &amp;lt;padded size&amp;gt;&lt;br /&gt;
Load the kernel with uboot into ram:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
Note the size, pad it to 512 byte and use the nand write command to flash it:&lt;br /&gt;
 nand write 32000000 60000 &amp;lt;padded size&amp;gt;.&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
We use a nfs chroot for now:&lt;br /&gt;
 setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.80.12 root=/dev/nfs rw nfsroot=192.168.80.1:/home/public/arm&lt;br /&gt;
This is helpful for automatic booting:&lt;br /&gt;
 setenv bootcmd &#039;nboot.e kernel ; bootm&#039;&lt;br /&gt;
= Setting up embedian =&lt;br /&gt;
Follow this nice howto from BusError http://code.google.com/p/mini2440/wiki/Emdebian&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
== Write errors ==&lt;br /&gt;
When you have bad blocks in NAND, you&#039;ll get write errors. This gives more information: http://wiki.openmoko.org/wiki/NAND_bad_blocks&lt;br /&gt;
&lt;br /&gt;
Clear the flash (do not reset the board till uboot is reinstalled, or you need to use NOR/vivi to reinstall uboot via usb):&lt;br /&gt;
 nand scrub&lt;br /&gt;
Create new bad blocks table:&lt;br /&gt;
 nand createbbt&lt;br /&gt;
Reflash uboot (use the size in the output from the tftp command and pad it to hit 512 byte boundaries for the nand write command)&lt;br /&gt;
 tftp 0x32000000 u-boot.bin&lt;br /&gt;
 nand write 32000000 0 &amp;lt;size of u-boot.bin&amp;gt;&lt;br /&gt;
 reset&lt;br /&gt;
Create dynamic partitions:&lt;br /&gt;
 dynpart&lt;br /&gt;
 dynenv set u-boot_env&lt;br /&gt;
 saveenv&lt;br /&gt;
 reset&lt;br /&gt;
And then use write.e to write to the mtdparts, e.g.:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
 nand write.e 32000000 kernel&lt;br /&gt;
 nboot.e kernel&lt;br /&gt;
= Links =&lt;br /&gt;
http://bliterness.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/mini2440/&lt;br /&gt;
&lt;br /&gt;
http://blog.cor-net.org/ (Qt 4.5 on mini2440)&lt;/div&gt;</summary>
		<author><name>Gerry</name></author>
	</entry>
	<entry>
		<id>http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18713</id>
		<title>Mini2440</title>
		<link rel="alternate" type="text/html" href="http://wiki.linuxmce.org/index.php?title=Mini2440&amp;diff=18713"/>
		<updated>2009-05-02T01:31:31Z</updated>

		<summary type="html">&lt;p&gt;Gerry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Hardware]]&lt;br /&gt;
[[Image:Mini2440.jpg|thumb|200px|mini2440]]&lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
This is a howto install uboot and a new kernel on the mini2440. Big thanks to BusError for the instructions and guidance. DISCLAIMER: This worked for me, if it eats your cat or burns your kitchen sink, don&#039;t blame me.&lt;br /&gt;
&lt;br /&gt;
= Preparations =&lt;br /&gt;
== Toolchain ==&lt;br /&gt;
I used this one: http://www.codesourcery.com/sgpp/lite/arm/portal/package3696/public/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2&lt;br /&gt;
&lt;br /&gt;
Add the bin dir to the $PATH. If you have a toolchain with another prefix (like arm-linux-) adapt the CROSS_COMPILE environment variable in the next steps.&lt;br /&gt;
&lt;br /&gt;
= Setting up the bootloader =&lt;br /&gt;
== Compiling uboot ==&lt;br /&gt;
Clone the git tree:&lt;br /&gt;
 mkdir uboot ; cd uboot&lt;br /&gt;
 git clone git://repo.or.cz/u-boot-openmoko/mini2440.git&lt;br /&gt;
Setup cross compiling:&lt;br /&gt;
 export CROSS_COMPILE=arm-none-linux-gnueabi- &lt;br /&gt;
Prepare the mini2440 target:&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 make mini2440_config&lt;br /&gt;
Compile:&lt;br /&gt;
 make all&lt;br /&gt;
This will give you a &amp;quot;u-boot.bin&amp;quot;. If you get an error about a missing whatever-gcc, verifiy if there is a hardcoded CROSS_COMPILE setting in the Makefile&lt;br /&gt;
&lt;br /&gt;
== Flashing uboot ==&lt;br /&gt;
We use the installed vivi bootloader to load uboot via usb. Power the board off, set the NOR switch to on, power the board on. You&#039;ll get the vivi output on the serial console. Press &#039;q&#039; to go to the shell and do the &amp;quot;load flash&amp;quot; on address 0 with the size of &amp;quot;u-boot.bin&amp;quot; (238232 bytes in this example):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[q] Goto shell of vivi                                                          &lt;br /&gt;
Enter your selection: q                                                         &lt;br /&gt;
Supervivi&amp;gt; load flash 0 238232 u                                                &lt;br /&gt;
USB host is connected. Waiting a download.                                      &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the &amp;quot;s3c2410_boot_usb&amp;quot; utility (http://mini2440.googlecode.com/files/s3c2410_boot_usb-20060807.tar.bz2) to upload the &amp;quot;u-boot.bin&amp;quot; via usb:&lt;br /&gt;
 ./s3c2410_boot_usb u-boot.bin &lt;br /&gt;
You&#039;ll see something like this as output, ignore the error message:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
csum = 0x9a6e&lt;br /&gt;
send_file: addr = 0x33f80000, len = 0x0003a298&lt;br /&gt;
Error downloading program&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and this on the serial console:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Now, Downloading [ADDRESS:30000000h,TOTAL:238242]                               &lt;br /&gt;
RECEIVED FILE SIZE:  238242 (232KB/S, 1S)                                       &lt;br /&gt;
Downloaded file at 0x30000000, size = 238232 bytes                              &lt;br /&gt;
Found block size = 0x0003c000                                                   &lt;br /&gt;
Erasing...    ... done                                                          &lt;br /&gt;
Writing...    ... done                                                          &lt;br /&gt;
Written 238232 bytes                                                            &lt;br /&gt;
Supervivi&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now power off the board, set the NOR switch back to off, and power on the board. We verify the version and then prepare config storage in flash:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MINI2440 # version                                                              &lt;br /&gt;
                                                                                &lt;br /&gt;
U-Boot 1.3.2-dirty-moko12 (Mar  8 2009 - 13:50:19)  &lt;br /&gt;
&lt;br /&gt;
MINI2440 # dynenv set 40000                                                     &lt;br /&gt;
device 0 offset 0x40000, size 0x3fc0000                                         &lt;br /&gt;
45 4e 56 30 - 00 00 04 00           &lt;br /&gt;
&lt;br /&gt;
MINI2440 # saveenv                                                              &lt;br /&gt;
Saving Environment to NAND...                                                   &lt;br /&gt;
Erasing Nand...Writing to Nand... done                                          &lt;br /&gt;
&lt;br /&gt;
MINI2440 # reset                                                                &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
do a &amp;quot;printenv&amp;quot; to show active settings. Adjust the IP for uboot and the tftp server. We need proper IP connectivity to load the kernel with tftp. &amp;quot;setenv&amp;quot; is your friend. &amp;quot;saveenv&amp;quot; stores the setting to flash.&lt;br /&gt;
&lt;br /&gt;
= Kernel =&lt;br /&gt;
== Compilation ==&lt;br /&gt;
Fetch from git:&lt;br /&gt;
 mkdir kernel ; cd kernel&lt;br /&gt;
 git clone git://repo.or.cz/linux-2.6/mini2440.git&lt;br /&gt;
 cd mini2440&lt;br /&gt;
 mkdir -p ../kernel-bin&lt;br /&gt;
Generate .config from mini2440 template:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/ mini2440_defconfig&lt;br /&gt;
Compile kernel and modules:&lt;br /&gt;
 CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make O=../kernel-bin/&lt;br /&gt;
Generate &amp;quot;uImage&amp;quot; with the &amp;quot;mkimage&amp;quot; tool:&lt;br /&gt;
 ../uboot/mini2440/tools/mkimage -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d ../kernel-bin/arch/arm/boot/zImage /tftpboot/uImage&lt;br /&gt;
&lt;br /&gt;
== Flash kernel ==&lt;br /&gt;
Verify partitions, we need the offset for the kernel partition (probably 0x60000):&lt;br /&gt;
 mtdparts&lt;br /&gt;
Erase the kernel partition:&lt;br /&gt;
 nand erase 60000 &amp;lt;padded size&amp;gt;&lt;br /&gt;
Load the kernel with uboot into ram:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
Note the size, pad it to 512 byte and use the nand write command to flash it:&lt;br /&gt;
 nand write 32000000 60000 &amp;lt;padded size&amp;gt;.&lt;br /&gt;
== Configure uboot ==&lt;br /&gt;
We use a nfs chroot for now:&lt;br /&gt;
 setenv bootargs console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=1tb ip=192.168.80.12 root=/dev/nfs rw nfsroot=192.168.80.1:/home/public/arm&lt;br /&gt;
This is helpful for automatic booting:&lt;br /&gt;
 setenv bootcmd &#039;nboot.e kernel ; bootm&#039;&lt;br /&gt;
= Setting up embedian =&lt;br /&gt;
Follow this nice howto from BusError http://code.google.com/p/mini2440/wiki/Emdebian&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
== Write errors ==&lt;br /&gt;
When you have bad blocks in NAND, you&#039;ll get write errors. This gives more information: http://wiki.openmoko.org/wiki/NAND_bad_blocks&lt;br /&gt;
&lt;br /&gt;
Clear the flash (do not reset the board till uboot is reinstalled, or you need to use NOR/vivi to reinstall uboot via usb):&lt;br /&gt;
 nand scrub&lt;br /&gt;
Create new bad blocks table:&lt;br /&gt;
 nand createbbt&lt;br /&gt;
Reflash uboot (use the size in the output from the tftp command and pad it to hit 512 byte boundaries for the nand write command)&lt;br /&gt;
 tftp 0x32000000 u-boot.bin&lt;br /&gt;
 nand write 32000000 0 &amp;lt;size of u-boot.bin&amp;gt;&lt;br /&gt;
 reset&lt;br /&gt;
Create dynamic partitions:&lt;br /&gt;
 dynpart&lt;br /&gt;
 dynenv set u-boot_env&lt;br /&gt;
 saveenv&lt;br /&gt;
 reset&lt;br /&gt;
And then use write.e to write to the mtdparts, e.g.:&lt;br /&gt;
 tftp 0x32000000 uImage&lt;br /&gt;
 nand write.e 32000000 kernel&lt;br /&gt;
 nboot.e kernel&lt;br /&gt;
= Links =&lt;br /&gt;
http://bliterness.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
http://code.google.com/p/mini2440/&lt;br /&gt;
&lt;br /&gt;
http://blog.cor-net.org/ (Qt 4.5 on mini2440)&lt;/div&gt;</summary>
		<author><name>Gerry</name></author>
	</entry>
</feed>