Patch u-boot for the iconnect
The
original
u-boot
monitor
in the iconnect don't manage the new algorythms
installed
in
the
last
linux
kernel (the number of ecc bits have changed). I
understood this when
i
tried
to
install
the kernel in the flash. Whith the kernel in the
flash, you don't need
an
usb
boot
disk
to start linux anymore.
Dump your uBoot environment variables before proceeding !! This procedure erase the uBoot area and its environment variables.
To
compile
u-boot
you
need an arm cross compiler. Mine is from the
"Sourcery G++ Lite 2011.03-42".
I
downloaded
the
Denx
u-boot source code, but the iconnect was not in
their tables. It was
necessary
to
modify
it.
The result are these patches for two versions of u-boot :
I
used
git
to
download the u-boot's sources :
mkdir
/mnt/data/src/uboot/
mkdir
/mnt/data/src/uboot/denx-uboot-git/
cd
/mnt/data/src/uboot/denx-uboot-git/
git
pull
git://git.denx.de/u-boot.git
git
branch
-a
git
fetch
--tags
http://git.denx.de/u-boot.git
git
tag
-l
the
last
tag
was
"v2011.12-rc3" then my work directory is
"u-boot-2011.12-rc3.work" :
mkdir
/mnt/data/src/uboot/u-boot-2011.12-rc3.work/
git
archive
master
|
tar xCv /mnt/data/src/uboot/u-boot-2011.12-rc3.work/
cd
/mnt/data/src/uboot/u-boot-2011.12-rc3.work/
patch
-p1
<
/mnt/data/src/uboot/patches/iconnect-2011.12-rc3.patch
export
ARCH=arm;
export
CROSS_COMPILE=/usr/local/arm-none-eabi/bin/arm-none-eabi-;
export
BUILD_DIR=../bin;
export MAKEALL_LOGDIR=../bin; ./MAKEALL iconnect
make
-j4
ARCH=arm
CROSS_COMPILE=/usr/local/arm-none-eabi/bin/arm-none-eabi-
O=/mnt/data/src/uboot/bin/
uboot.kwb
The
result
file
is
uboot.kwb ready to be flashed on the iconnect.
The
board
parameter
file
of openocd for the iconnect is new too. This
file goes to
the
/usr/local/openocd/script/board/
directory
:
The
jtag
interface
i
used a dlp-usb1232h its file goes to the
directory of the interfaces scripts of openocd on your system (for me :
/usr/local/openocd/script/interface/) :
And
this
last
file
is to be put where you like, it contains parameters to
start openocd from
the
command
line
(like
in "openocd -f
../iconnect/openocd_iconnect2.cfg") :
In
the telnet window hit theses commands (explanations can be found in the
page "openocd and jtag to unbrick my iconnect")
init
init2
init4
iconnect_reset_cpu
nand
probe 0
nand
list
nand
erase 0 0x0 0xc0000
nand
info 0 0 10
nand
write 0
/mnt/data2/download/iconnect/arm-linux-3.3.0-rc7/iconnect-u-boot-2011.12-rc3.kwb
0 oob_softecc_kw
Reboot
the iConnect and look at the new prompt on the serial console :
U-Boot 2011.12 (Mar 19 2012 - 12:08:31)
Iomega iConnect Wireless
SoC: Kirkwood 88F6281_A0
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 512 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: egiga0
Warning: failed to set MAC address
PHY reset timed out
88E1116 Initialized on egiga0
Hit any key to stop autoboot: 0
Marvell>> printenv
baudrate=115200
bootcmd=${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; ${x_bootcmd_usb}; bootm 0x6400000;
bootdelay=3
ethact=egiga0
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200 mtdparts=orion_nand:512k(uboot),3m@1m(kernel),1m@4m(psm),13m@5m(rootfs) rw
x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2
x_bootcmd_kernel=nand read 0x6400000 0x100000 0x300000
x_bootcmd_usb=usb start
Environment size: 462/131068 bytes
Marvell>>
Iomega iConnect Wireless
SoC: Kirkwood 88F6281_A0
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 512 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: egiga0
Warning: failed to set MAC address
PHY reset timed out
88E1116 Initialized on egiga0
Hit any key to stop autoboot: 0
Marvell>> printenv
baudrate=115200
bootcmd=${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; ${x_bootcmd_usb}; bootm 0x6400000;
bootdelay=3
ethact=egiga0
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200 mtdparts=orion_nand:512k(uboot),3m@1m(kernel),1m@4m(psm),13m@5m(rootfs) rw
x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2
x_bootcmd_kernel=nand read 0x6400000 0x100000 0x300000
x_bootcmd_usb=usb start
Environment size: 462/131068 bytes
Marvell>>
Now
you'll have to rewrite the environment variables by the serial console.
Because the initial one provided by the new uBoot may not be what you
expect !