Hello Experts,
How can U-Boot/UBL in a NAND flash be upgraded from Linux? We're using the OMAP L-138 and unfortunately need to update thousands of units in the field.
Much thanks,
Bill
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Bill,
In kernel, you have to create separate partitions for UBL and u-boot then you would get /dev/mtdblock0 so on.. partitions for every binaries.
After booting, try the below commands to update new u-boot.
flash_eraseall /dev/mtd1
nandwrite -p /dev/mtd1 u-boot.bin
Note:
You have to use the same ECC mechanism and layout in both linux and bootloaders.
Hello Titusrathinaraj,
Thank you for the quick reply, it is appreciated! So I tried what you asked (after first re-writing the Linux partition to unlock the U-Boot partition). The good news is that our device did boot up, however it is still using the old U-Boot.
Here's how the partitions are laid out:
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00020000 00020000 "UBL"
mtd2: 00080000 00020000 "u-boot"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 1dc00000 00020000 "filesystem_large"
root@arago:~#
So, after rewriting the "kernel" partition, I was able to rewrite partition 2, "uboot". However, when I rebooted our device, I found that the OLD U-Boot was loaded, version:
U-Boot 2009.11 (Oct 21 2011 - 17:34:18)
Do I need to write a new UBL as well, or add a UBL header to the u-boot.bin file before I load it?
Help, (please..)
Much thanks,
Bill
Here's the output from writing the new U-Boot:
root@arago:~# flash_eraseall /dev/mtd2
Erasing 128 Kibyte @ 80000 -- 100 % complete.
root@arago:~# nandwrite -p /dev/mtd2 u-boot.bin
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
root@arago:~# sync
root@arago:~# reboot
Broadcast message from root (ttyS2) (Wed Jul 23 22:09:21 2014):
The system is going down for reboot NOW!
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
INIT: Sending prStopping syslogd/klogd: stopped syslogd (pid 1074)
stopped klogd (pid 1076)
done
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
mount: can't find /mnt/ram in /proc/mounts
umount: none busy - remounted read-only
mount: cannot read /proc/mounts: No such file or directory
Rebooting... Restarting system.
OMAP-L138 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy...
Valid magicnum, 0x55424CBB, found in block 0x00000006.
DONE
Jumping to entry point at 0xC1080000.
U-Boot 2009.11 (Oct 21 2011 - 17:34:18)
I2C: ready
DRAM: 64 MB
NAND: 512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
In: serial
Out: serial
Err: serial
ARM Clock : 300000000 Hz
DDR Clock : 150000000 Hz
Net: Ethernet PHY: GENERIC @ 0x00
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x400000, size 0x400000
NAND read from offset 400000 failed -74
4194304 bytes read: ERROR
Loading from NAND 512MiB 3,3V 8-bit, offset 0x200000
Image Name: Linux-2.6.33-rc4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2048816 Bytes = 2 MB
Load Address: c0008000
Entry Point: c0008000
## Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-2.6.33-rc4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2048816 Bytes = 2 MB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
-----------------------------------------------------------------------------------------
The NEW U-Boot I'm trying to load is as follows (this was flashed on to a different unit) :
OMAP-L138 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy...
Valid magicnum, 0x55424CBB, found in block 0x00000006.
DONE
Jumping to entry point at 0xC1080000.
NAND: 512 MiB
MMC: davinci: 0
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
nand_read_bbt: Bad block at 0x000001600000
nand_read_bbt: Bad block at 0x0000049e0000
nand_read_bbt: Bad block at 0x00000a980000
nand_read_bbt: Bad block at 0x00000cca0000
nand_read_bbt: Bad block at 0x00000ce80000
nand_read_bbt: Bad block at 0x00000d280000
nand_read_bbt: Bad block at 0x00000d480000
nand_read_bbt: Bad block at 0x00000d640000
nand_read_bbt: Bad block at 0x00000e500000
nand_read_bbt: Bad block at 0x00000e7c0000
nand_read_bbt: Bad block at 0x00000f5e0000
nand_read_bbt: Bad block at 0x00000fa80000
nand_read_bbt: Bad block at 0x000012ca0000
nand_read_bbt: Bad block at 0x000013720000
nand_read_bbt: Bad block at 0x000019560000
nand_read_bbt: Bad block at 0x000019c20000
nand_read_bbt: Bad block at 0x00001ccc0000
nand_read_bbt: Bad block at 0x00001d2e0000
nand_read_bbt: Bad block at 0x00001ed60000
nand_read_bbt: Bad block at 0x00001f140000
In: serial
Out: serial
Err: serial
i2c_read(): called with chip:80 addr:0x7f00 alen:2 len:6
Default using MAC address from environment
Net: DaVinci-EMAC
Hit any key to stop autoboot: 0
U-Boot > printenv
baudrate=115200
bootargs=davinci_emac.eth=00:50:c2:C0:c3:e7 mem=128M console=ttyS2,115200n8 root=/dev/mtdblock4 rw rootfstype=jffs2 ip=dhcp
bootcmd=nand read.e 0xc1180000 0x400000 0x400000; nboot.e 0xc0700000 0 0x200000; bootm
bootdelay=3
bootfile=uImage_2.6.33
ethact=DaVinci-EMAC
ethaddr=00:50:c2:C0:c3:e7
gatewayip=169.254.100.1
hw_version=1.3
ipaddr=169.254.100.204
netmask=255.255.255.0
nfshost=169.254.100.1
serverip=169.254.100.1
stderr=serial
stdin=serial
stdout=serial
ver=U-Boot 2012.04.01-00025-g9f45257-dirty (Jul 22 2014 - 16:44:49)
Environment size: 581/131068 bytes
U-Boot >
-----------------------------------------------
Hi Bill,
So I tried what you asked (after first re-writing the Linux partition to unlock the U-Boot partition). The good news is that our device did boot up, however it is still using the old U-Boot.
How did you confirm this ?
Could you please boot the board just after "flash_eraseall" command.
The board must not boot after "flash_eraseall" the u-boot location, right ?
root@arago:~# nandwrite -p /dev/mtd2 u-boot.bin
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000NAND read: device 0 offset 0x400000, size 0x400000
NAND read from offset 400000 failed -74
4194304 bytes read: ERRORLoading from NAND 512MiB 3,3V 8-bit, offset 0x200000
Image Name: Linux-2.6.33-rc4
Image Type: ARM Linux Kernel Image (uncompressed)
I think, it will boot the u-boot and not kernel, may be you can erase the kernel location,
Please confirm.
Also please provide your bootcmd and bootargs.
Titusrathinaraj,
I did the 'flash_eraseall /dev/mtd2' (which supposedly is U-Boot) and then power-cycled our device and it did boot:
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00020000 00020000 "UBL"
mtd2: 00080000 00020000 "u-boot"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 00200000 00020000 "kernel2"
mtd7: 1da00000 00020000 "filesystem_large"
root@arago:~# flash_eraseall /dev/mtd2
Erasing 128 Kibyte @ 80000 -- 100 % complete.
root@arago:~#
root@arago:~#
<Power-cycle the device and it came up>
OMAP-L138 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy...
Valid magicnum, 0x55424CBB, found in block 0x00000006.
DONE
Jumping to entry point at 0xC1080000.
U-Boot 2009.11 (Oct 21 2011 - 17:34:18)
I2C: ready
DRAM: 64 MB
NAND: 512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
In: serial
Out: serial
Err: serial
ARM Clock : 300000000 Hz
DDR Clock : 150000000 Hz
Net: Ethernet PHY: GENERIC @ 0x00
Hit any key to stop autoboot: 0
...
However, when I erased the UBL partition, it doesn't boot:
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00020000 00020000 "UBL"
mtd2: 00080000 00020000 "u-boot"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 00200000 00020000 "kernel2"
mtd7: 1da00000 00020000 "filesystem_large"
root@arago:~#
root@arago:~# flash_eraseall /dev/mtd1
Erasing 128 Kibyte @ 20000 -- 100 % complete.
root@arago:~#
root@arago:~# sync
root@arago:~# reboot
Broadcast message from root (ttyS2) (Thu Jul 24 17:55:39 2014):
The system is going down for reboot NOW!
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
INIT: Sending processStopping syslogd/klogd: stopped syslogd (pid 1081)
stopped klogd (pid 1083)
done
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
mount: can't find /mnt/ram in /proc/mounts
umount: none busy - remounted read-only
mount: cannot read /proc/mounts: No such file or directory
Rebooting... Restarting system.
<system hangs, as expected>
So here's the bootargs and bootcmd from U-Boot:
bootargs=davinci_emac.eth=28:c7:18:00:06:8e mem=128M console=ttyS2,115200n8 root=/dev/mtdblock4 rw rootfstype=jffs2 ip=dhcp
bootcmd=nand read.e 0xc1180000 0x400000 0x400000; nboot.e 0xc0700000 0 0x200000; bootm
BTW, I'm using the sfh_OMAP-L139.exe utility to flash the UBL and U-Boot onto the NAND. The command I'm using from a Cygwin window is:
./sfh_OMAP-L138.exe -flash -flashType NAND -v ./ubl_OMAPL138_NAND.bin u-boot-2012-04-01
So, it looks like it's not using /dev/mtd2 at all.
Here's how the partition is mapped in Linux (from ./arch/arm/mach-davinci/board-da850-evm.c) :
struct mtd_partition da850_evm_nandflash_partition[] = {
{ // partition 0
.name = "u-boot env",
.offset = 0,
.size = SZ_128K,
//.mask_flags = MTD_WRITEABLE,
.mask_flags = 0,
},
{ // partition 1
.name = "UBL",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
// .mask_flags = MTD_WRITEABLE,
.mask_flags = 0,
},
{ // partition 2
.name = "u-boot",
.offset = 0x80000,
.size = 4 * SZ_128K,
.mask_flags = 0,
},
{ // partition 3
.name = "kernel",
.offset = 0x200000,
.size = SZ_2M, // SZ_4M,
.mask_flags = 0,
},
{ // partition 4
.name = "filesystem",
.offset = MTDPART_OFS_APPEND,
.size = SZ_16M, // MTDPART_SIZ_FULL,
.mask_flags = 0,
},
{ // partition 5
.name = "ap4_fs",
.offset = MTDPART_OFS_APPEND,
.size = SZ_16M,
.mask_flags = 0,
},
{ // partition 6
.name = "kernel2",
.offset = MTDPART_OFS_APPEND,
.size = SZ_2M,
.mask_flags = 0,
},
{ // partition 7
.name = "filesystem_large",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
.mask_flags = 0,
},
};
Looks like the UBL and U-Boot images are concatenated and both stored in /dev/mtd1? Is that what the sfh_OMAP-L138.exe does?
So, what to try?
Thanks again..
Hi Bill,
Just try to do "flash_eraseall" the kernel location (mtd3) and then check whether the u-boot boots correctly or not.
How did you flash the UBL and u-boot into NAND flash ?
Try to get the actual base address of UBL & u-boot and offset for both too.
Then mention in board file for mtd partition.
Do you have multiple copies of ubl or uboot ?
Please attach your complete bootup log.
Hi Bill,
Regarding the U-Boot erasure not erasing the complete U-Boot, you can see why if you examine the partition used:
{ // partition 2
.name = "u-boot",
.offset = 0x80000,
.size = 4 * SZ_128K,
.mask_flags = 0,
},
You can see size is 4 blocks and U-Boot starts at offset 0x80000. So when you erase the partition with flash_eraseall, 4 blocks are being erased, ending at address 0xC0000. This is the start of block 6, and according to your boot log this where U-Boot was found even after you erased it.
So it makes sense when you erase U-Boot via Linux, only 4 blocks are being erased, but you need to erase much more than that. On the boards I am working on, the nand writer tool installs many copies of U-Boot. You can probably safely use a U-Boot partition size of (0x200000 - 0x80000), which corresponds to (OffsetOfLinux - OffsetOfUBoot).
You'll want to make sure when you erase the partition, that the bad block handling is done in a way that doesn't cause it to overflow into your Linux partition. There may be some flags to control this as well; I'm not sure as we don't use flash_eraseall.
Chris Richardson
Hey Chris, Titus, appreciate the posts..
Chris, thanks for pointing out the wrong u-boot partition size. Got further after changing it. Here's the log of where I'm at:
## Original Linux with U-Boot size of (4 * SZ_128K)
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00020000 00020000 "UBL"
mtd2: 00080000 00020000 "u-boot"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 1dc00000 00020000 "filesystem_large"
## Erasing the U-Boot partition using the above size:
root@arago:~# flash_eraseall /dev/mtd2
Erasing 128 Kibyte @ 80000 -- 100 % complete.
## Linux with NEW U-boot size of (0x200000 - 0x80000)
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00020000 00020000 "UBL"
mtd2: 00180000 00020000 "u-boot"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 00200000 00020000 "kernel2"
mtd7: 1da00000 00020000 "filesystem_large"
root@arago:~#
## Now, erasing it...
root@arago:~# flash_eraseall /dev/mtd2
Erasing 128 Kibyte @ 180000 -- 100 % complete.
## This now did work! U-Boot is no longer found:
root@arago:~# reboot
Broadcast message from root (ttyS2) (Fri Jul 25 18:13:41 2014):
The system is going down for reboot NOW!
INIT: Sending processes the TERM signal
INIT: Sending processStopping syslogd/klogd: stopped syslogd (pid 1089)
stopped klogd (pid 1091)
done
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
mount: can't find /mnt/ram in /proc/mounts
umount: none busy - remounted read-only
mount: cannot read /proc/mounts: No such file or directory
Rebooting... Restarting system.
OMAP-L138 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy...
No valid boot image found!
NAND Boot failed.
Aborting...
## After re-flashing the unit, erasing the U-Boot partition, and writing in a NEW u-boot.bin file (based on the latest release)
## the system DID boot U-Boot, however, it is still using the OLD (original U-Boot). On top of that, Linux doesn't boot:
root@arago:~# flash_eraseall /dev/mtd3
root@arago:~# ls -al u-boo*
-rw-r--r-- 1 root root 372036 Jul 25 19:04 u-boot-new.bin
root@arago:~# flash_eraseall /dev/mtd3
Erasing 128 Kibyte @ 200000 -- 100 % complete.
root@arago:~# nandwrite -p /dev/mtd3 u-boot-new.bin
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
root@arago:~# sync
root@arago:~#
root@arago:~# reboot
Broadcast message from root (ttyS2) (Fri Jul 25 19:05:37 2014):
The system is going down for reboot NOW!
INIT: Sending processes the TERM signal
INIT: Sending processStopping syslogd/klogd: stopped syslogd (pid 1082)
stopped klogd (pid 1084)
done
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
mount: can't find /mnt/ram in /proc/mounts
umount: none busy - remounted read-only
mount: cannot read /proc/mounts: No such file or directory
Rebooting... Restarting system.
OMAP-L138 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy...
Valid magicnum, 0x55424CBB, found in block 0x00000006.
DONE
Jumping to entry point at 0xC1080000.
U-Boot 2009.11 (Oct 21 2011 - 17:34:18) <-- wrong U-boot version
I2C: ready
DRAM: 64 MB
NAND: 512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
In: serial
Out: serial
Err: serial
ARM Clock : 300000000 Hz
DDR Clock : 150000000 Hz
Net: Ethernet PHY: GENERIC @ 0x00
Hit any key to stop autoboot: 0
U-Boot >
U-Boot > printenv
bootdelay=3
baudrate=115200
ethaddr=28:c7:18:00:06:7b
hw_version=1.4
ipaddr=169.254.100.201
nfshost=169.254.100.1
bootfile=uImage_2.6.33
gatewayip=169.254.100.1
netmask=255.255.255.0
serverip=169.254.100.1
bootcmd=nand read.e 0xc1180000 0x400000 0x400000; nboot.e 0xc0700000 0 0x200000; bootm
bootargs=davinci_emac.eth=28:c7:18:00:06:7b mem=128M console=ttyS2,115200n8 root=/dev/mtdblock4 rw rootfstype=jffs2 ip=dhcp
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 2009.11 (Oct 21 2011 - 17:34:18)
Environment size: 502/131068 bytes
U-Boot >
U-Boot > boot
NAND read: device 0 offset 0x400000, size 0x400000
NAND read from offset 400000 failed -74
4194304 bytes read: ERROR
Loading from NAND 512MiB 3,3V 8-bit, offset 0x200000
** Unknown image type
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot >
Titus, I'm using the following program to program UBL and U-boot onto our systems:
./sfh_OMAP-L138.exe -flash -flashType NAND -v ./ubl_OMAPL138_NAND.bin u-boot-2012-04-01
Here's the output from that programming:
$ ./sfh_OMAP-L138.exe -flash -flashType NAND -v ./ubl_OMAPL138_NAND.bin u-boot-
nand-fix.bin
-----------------------------------------------------
TI Serial Flasher Host Program for OMAP-L138
(C) 2011, Texas Instruments, Inc.
Ver. 1.67
-----------------------------------------------------
Platform is Windows.
[TYPE] UBL and application image
[UBL] ./ubl_OMAPL138_NAND.bin
[APP IMAGE] u-boot-nand-fix.bin
[TARGET] OMAPL138
[DEVICE] NAND
Attempting to connect to device COM1...
Press any key to end this program at any time.
(AIS Parse): Read magic word 0x41504954.
(AIS Parse): Waiting for BOOTME... (power on or reset target now)
(Serial Port): Read error! (The operation has timed out.)
(Serial Port): Read error! (The operation has timed out.)
(AIS Parse): BOOTME received!
(AIS Parse): Performing Start-Word Sync...
(AIS Parse): Performing Ping Opcode Sync...
(AIS Parse): Processing command 0: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 13920-Byte section to address 0x80000000.
(AIS Parse): Processing command 1: 0x58535901.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Loading section...
(AIS Parse): Loaded 1280-Byte section to address 0x80003660.
(AIS Parse): Processing command 2: 0x58535906.
(AIS Parse): Performing Opcode Sync...
(AIS Parse): Performing jump and close...
(AIS Parse): AIS complete. Jump to address 0x80000000.
(AIS Parse): Waiting for DONE...
(AIS Parse): Boot completed successfully.
Waiting for SFT on the OMAP-L138...
Target: BOOTUBL
Target: DONE
Flashing UBL ./ubl_OMAPL138_NAND.bin (13040 bytes) at 0x00000000
Target: SENDIMG
Target: BEGIN
100% [ ████████████████████████████████████████████████████████████ ]
Image data transmitted over UART.
Target: DONE
0% [ ------------------------------------------------------------ ]
0% Programming UBL into flash...
100% ████████████████████████████████████████████████████████████
UBL programming complete
Target: DONE
Flashing application u-boot-nand-fix.bin (197196 bytes) at 0x00010000
Target: SENDIMG
Target: BEGIN
100% [ ████████████████████████████████████████████████████████████ ]
Image data transmitted over UART.
Target: DONE
0% [ ------------------------------------------------------------ ]
Programming application into flash...
Target: Number of blocks needed for header and data: 0x0x00000002
Target: Attempting to start in block number 0x0x00000006.
Target: Magicnum: 0x0x55424CBB
Target: Entrypoint: 0x0xC1080000
100% ████████████████████████████████████████████████████████████
Application programming complete e 0x00000000
Target: DONE
Target: DONE
Operation completed successfully.
bgoetz@sj-swdev36 /cygdrive/c/omap
$
Hello,
I'm glad you were able to make some progress. I think I can see why the unit did not boot Linux. The commands you used to erase and write U-Boot are using mtd3 rather than mtd2, so in that case I think U-Boot was placed where Linux was supposed to be:
root@arago:~# flash_eraseall /dev/mtd3
root@arago:~# nandwrite -p /dev/mtd3 u-boot-new.bin
As for why it is still running the old U-Boot after you flashed the new one, I would double check that the file you are writing with sfh is the same as the file you are writing with nandwrite. I noticed they have different file names and sizes, which is why I suggest this.
File flashed with nandwrite:
372036 Jul 25 19:04 u-boot-new.bin
File flashed with sfh:
Flashing application u-boot-nand-fix.bin (197196 bytes) at 0x00010000
Chris Richardson
Hey Chris,
Thanks for catching that, my bad! Anyways, when writing the new U-Boot to the correct partition, UBL doesn't bring up U-Boot: (As per your last comment, I even made the U-Boot partition a bit smaller as to not interfere with the Linux partition)
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00020000 00020000 "UBL"
mtd2: 00160000 00020000 "u-boot"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 00200000 00020000 "kernel2"
mtd7: 1da00000 00020000 "filesystem_large"
root@arago:~# ls -al u-*
-rw-r--r-- 1 root root 372036 Jul 25 22:04 u-boot-new.bin
root@arago:~#
root@arago:~# flash_eraseall /dev/mtd2
Erasing 128 Kibyte @ 160000 -- 100 % complete.
root@arago:~# nandwrite -p /dev/mtd2 u-boot-new.bin
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
root@arago:~# sync
root@arago:~# sync
root@arago:~# reboot
Broadcast message from root (ttyS2) (Fri Jul 25 22:09:41 2014):
The system is going down for reboot NOW!
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
INIT: Sending processes thStopping syslogd/klogd: stopped syslogd (pid 1078)
stopped klogd (pid 1080)
done
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
mount: can't find /mnt/ram in /proc/mounts
umount: none busy - remounted read-only
mount: cannot read /proc/mounts: No such file or directory
Rebooting... Restarting system.
OMAP-L138 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy...
No valid boot image found!
NAND Boot failed.
Aborting...
Hello,
It sounds like you have everything in the correct flash locations now but I think you will need an additional header. We are using a header defined in the DM36x flash utils NANDWriter project, the source for which you can find somewhere on the TI site. There may be a different header for the OMAP device you are working on; I'm not sure.
The header structure we are using looks like this:
typedef struct
{
Uint32 magicNum; // Expected magic number
Uint32 entryPoint; // Entry point of the user application
Uint32 numPage; // Number of pages where boot loader is stored
Uint32 block; // Starting block number where User boot loader is stored
Uint32 page; // Starting page number where boot-loader is stored
Uint32 ldAddress; // Starting RAM address where image is to copied - XIP Mode
}
NANDWRITER_Boot;
We fill in the fields accordingly and write it to before the start of the raw file before writing each copy to flash. You will need some constants which are also defined alongside the struct, to fill in the magicNum field.
Chris Richardson
Chris, thanks again for the input. Found a handy utility that prepends the u-boot.bin file with the UBL header. It's called genublimg. (http://support.criticallink.com/gitweb/?p=u-boot-mitydspl138.git;a=summary)
Here's the header it's using, which is setup for the L138 already:
#define UBL_MAGIC_BINARY_BOOT (0x55424CBBu)
struct UBLHeader
{
uint32_t magicNum;
uint32_t entryPoint;
uint32_t appSize;
uint32_t memAddress;
uint32_t ldAddress;
};
struct UBLHeader UBLHeader = {
.magicNum = UBL_MAGIC_BINARY_BOOT,
.entryPoint = 0xC1080000,
.appSize = (512 << 10),
.memAddress = 0x10000 + sizeof(UBLHeader),
.ldAddress = 0xC1080000
};
void usage(void)
{
fprintf (stderr, "Usage: genublimage -i image.bin -o image_ubl.bin\n");
exit (-1);
}
(Note that the program later fills in the "appSize" field with the exact size of the U-boot.bin input file.)
I believe it's the correct header for the OMAP L138 but it's not working (yet). Unfortunately I even tried it with the CURRENT u-boot.bin file that the unit was originally flashed with, but that didn't work either (output below).
I verified that the MAGIC number and entry point are correct. I don't know if the other fields are correct. My guess is, the file isn't getting written to the correct place in the partition. I'm going to try take a newly flashed unit and attempt to find exactly where that Magic number is getting written to by the serial programmer program I'm using (sfh_OMAP-L138.exe).
Your suggestions have been very helpful, got any more??
Here's the output:
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00020000 00020000 "UBL"
mtd2: 00160000 00020000 "u-boot"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 00200000 00020000 "kernel2"
mtd7: 1da00000 00020000 "filesystem_large"
root@arago:~# flash_eraseall /dev/mtd2
Erasing 128 Kibyte @ 160000 -- 100 % complete.
root@arago:~# nandwrite -p /dev/mtd2 u-boot-nand-fix-ubl.bin
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
root@arago:~# sync
root@arago:~# sync
root@arago:~# sync
root@arago:~# reboot
Broadcast message from root (ttyS2) (Mon Jul 28 23:23:51 2014):
The system is going down for reboot NOW!
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
INIT: Sending processesStopping syslogd/klogd: stopped syslogd (pid 1083)
stopped klogd (pid 1085)
done
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
mount: can't find /mnt/ram in /proc/mounts
umount: none busy - remounted read-only
mount: cannot read /proc/mounts: No such file or directory
Rebooting... Restarting system.
OMAP-L138 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy...
No valid boot image found!
NAND Boot failed.
Aborting...
Hi Bill,
In my understanding,
The "genublimg" is used for generating AIS signed binary for UBL and it wont help for u-boot.
Why don't you try the latest u-boot released by TI ?
Because, Nowadays we don't use 2 stage bootloaders (UBL and u-boot) and we use only AIS signed u-boot alone to boot the linux.
I'm able to update u-boot (single stage bootloader) on OMAPL138 TI EVM board.
Hi Bill,
would you mind giving me the links you used to the latest GIT trees for the U-boot and Linux trades you used?
I'm using the latest MCSDK release for OMAPL138.
mcsdk_1_01_00_02/board-support/u-boot-2012.04.01-psp03.22.00.06.sdk
http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk/latest1/index_FDS.html
I'm not using CCS to make U-boot. I'm just compiling it from Linux. Hope that's the way you are testing it
No difference in case building and we have to provide different command to build AIS u-boot.
make u-boot.ais ARCH=arm CROSS_COMPILE=arm-arago-linux-gnueabi-
What's the name of the created U-boot executable I need to nandwrite to /dev/mtd2? Is it still u-boot.bin?
No, It is "u-boot.ais" ie u-boot with AIS signed header.
First, You have to boot your board through single bootloader (u-boot.ais) and flashed through "sfh_OMAP-L138.exe" tool.
Ex:
./sfh_OMAP-L138.exe -flash_noubl u-boot.ais -targetType OMAPL138_LCDK
Hi Bill,
I think it is possible though we are using single bootloader.
In field, First we have to update/boot the new kernel with partition modification.
OR
we have to boot the field device with any other boot methods (SD or RAM) for updating u-boot.ais with latest kernel.
Is it possible for field devices ?
If it is possible, surely we can update u-boot.ais.
Hi Bill,
Couldn't I write u-boot.ais to /dev/mtd6 then use "fw_setenv bootcmd ..." to boot from there?
Flashing u-boot.ais is not required now, the requirement is need to boot from new kernel that have new updated partition (ie only have single bootloader)
For that, we can flash the new kernel in mtd6 and boot from new kernel (fw_setenv or any other way) and we have to erase the 2 bootloaders (UBL and u-boot) then we have to update u-boot.ais.
I think it is possible.
What do you say ?
Hi Titus,
Actually, I really need to install a new U-Boot executable. We have thousands of units in the field and we're starting to see a whole bunch of units being returned because they are not rebooting after, say, a power outage. The error is the following:
Loading from NAND 512MiB 3,3V 8-bit, offset 0x200000
Image Name: Linux-2.6.33-rc4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2011412 Bytes = 1.9 MB
Load Address: c0008000
Entry Point: c0008000
## Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-2.6.33-rc4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2011412 Bytes = 1.9 MB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
I finally found that the problem was that the U-Boot image wasn't correcting bit errors found when loading the Linux partition. It turns out that even a SINGLE bit error in the Linux partition will cause the above error and the unit will NO LONGER BOOT. At this point, the unit must be shipped back to us for re-flashing. So, the U-Boot image NEEDS to be upgraded. Unfortunately, I cannot SAFELY first re-write the Linux partition then reboot the unit. Due to the bug in U-Boot, there's a good chance that the unit will NOT reboot safely. This is why I need to upgrade the U-Boot image WHILE the unit has power and is currently running Linux, then, tell the unit to boot from that new U-Boot partition.
The first step is to get a new U-Boot image loaded into the extra partition then get the system to boot off of it.
That said, after I build the u-boot.ais file, couldn't I just load it into /dev/mtd6 then, using the fw_setenv bootcmd / bootargs to boot from there?
Does that make sense?
thanks..
Hello,
If you would rather not modify your whole boot sequence to accommodate the different boot image, I would suggest attempting to verify the exact header that is being written when the device is flashed with sfh/sft. You should be able to dump the nand area in U-Boot and take a look at the header. I would dump at address 0x60000, and take a look at the first 6-8 uint32s. Make sure the magic number you place in the header is the same, and try to see if there is a value such as 0x00000003 in there. The 3 appears to correspond to the sector number where UBL expects a particular copy of U-Boot to reside. It has been quite a while since I worked on this, but we did basically exactly what you are trying to do, and were able to get it all working with the existing boot loader setup.
Chris Richardson
Hey Chris,
Unfortunately this is kind of a nasty problem. Due to the nature of this bug there's a chance that when these systems reboot, they will become a brick! What complicates it is the fact that the U-Boot partition is currently read-only in the thousands of units in the field (I remember thinking to myself "U-boot is so small and only has one function in life - just boot Linux. I'm sure that partition will never need to be upgraded!" I thought that if it ever was written into, it's probably due to a bug in my firmware.. so I made that partition read-only). So while the unit is up, I'm really forced to write a new u-boot to an unused partition, then using fw_setenv to boot from there.
Most of these units are attached to the high ceilings in large stores so are very difficult (and costly) to replace. Thus, I have to do all I can to make sure that I can upgrade U-boot while the unit is powered up. So, any help/advice you'd have would be greatly appreciated!
Thanks again,
Bill
Hello,
We had very similar problems, both on the technical side and the expense of taking our devices down and putting them back up, so I can understand wanting to get this exactly right the first time.
Unfortunately I'm not sure you can instruct UBL to search for U-Boot from a different location, without first writing a new UBL. If a UBL write fails your customer will of course have an actual brick that will need to go back to your factory, and for that reason we never update UBL in the field. If you can't actually write to mtd2 while Linux is running (even if you had the correct headers and all), you may be able to do something like this instead:
1. Write new U-Boot to mtd6 from Linux.
2. Change U-Boot boot arguments from normal Linux boot to "copy new U-Boot from mtd6 to mtd2 and reset". This could be something as simple as bootcmd=nandread XXXX YYYY; nandwrite ZZZZ YYYY; set bootcmd=YOUR_NORMAL_BOOT_COMMAND; saveenv; reset".
3. Reboot the device from Linux. When U-Boot starts up, it sees the boot command, copies the new U-Boot from NAND where mtd6 is located, into NAND where mtd2 is located, then sets the boot arguments back to normal Linux boot, saves the environment and resets itself.
4. When the unit boots up, the new U-Boot is actually running and hopefully corrects any ECC errors before booting Linux.
But, if your devices all have a working U-Boot, even with a broken Linux, it seems like you could change the boot arguments to do a TFTP copy of the new U-Boot from a server as well. Then you would just have the customer install a TFTP server on a machine on their network and do a boot command such as "serverip=YOUR_TFTP_SERVER_IP; bootcmd=tftp XXXX new-u-boot.bin; nandwrite YYYY ${filesize}; bootcmd=YOUR_NORMAL_BOOT_COMMAND; saveenv; reset".
There are probably many ways to solve this without bricking any of your customers' units...we just have to think of them.
Chris Richardson
Hey Chris,
Yes, that's exactly what I was thinking! Unfortunately mtd2 is locked so writing to it isn't an option.
Part of the new release (.tar.gz file) will contain the new u-boot file that the upgrade script will just copy into /dev/mtd6. Then, the script will write the new bootcmd to first load that into a spare place in RAM (e.g. C1040000), then use the 'go' command to jump to it. We'll see..
At least all new (and RMA'ed) units are getting flashed with the new U-boot with the fixes..
Thanks, Bill
Hi Titus,
Just a recap - since the version of U-Boot that's currently installed on these field units isn't fixing any bit errors when loading Linux (and it's using nand_read() instead of nand_read_skip_bad_blocks() when reading in the environment variables), if I write a new Linux to mtd6, I'll have to reboot for that uImage to get read into RAM. The problem is, if there's any single bit error in that partition, it'll brick the unit. That's why I'm hesitant about going down that route. I'd love to do it, and if I can't get the system to boot from mtd6, I just may have to go that route.
If I want to write u-boot.ais to mtd6, I'd have to use bootcmd to first load it using one nand read.e command, then load Linux after it using another nand read.e command, then use the 'go' command to jump to where u-boot.ais was loaded into memory. It seems really complicated, but if you have any insight how I might be able to get that to work, great! (I've also asked our customer interface person if I could use 'tftp' instead. This would completely eliminate attempting to load Linux from the NAND. I don't think this is an option though.)
Thanks again, Bill
Hi Bill,
Could you please point out me which SDK version are you using and UBL source code version to boot TI EVM board with UBL and u-boot.
I also had the experience like this but it was DM355 processor, I have easily updated UBL and U-boot from linux and u-boot shell,
But the OMAPL138 processor is different and it requires AIS gen header informations to boot, Anyway I will try UBL and u-boot combinations & try to update u-boot on TI EVM.
Hi Bill,
I had ECC errors in all the locations due to bad ECC codes in my product (UBL corruption, u-boot corruption and env too)
Please refer the below thread which I had
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/t/236870.aspx
Really the AM335x is a good choice.
As far as the L138, if you could give some insight on if/how I could upgrade u-boot without having to reboot, that would be extremely helpful. If its not that straight forward I may have to just risk it and upgrade Linux first with the new partitions then hope it boots up again.
Sure, I will try UBL and u-boot combinations.
I don't have old UBL and uboot sources so , could you please point out the location and versions.
Hi Titus,
I've given this a lot of thought the past couple of days and chosen a new course of action. For the units in the field I just simply want to update the U-Boot partition. But unfortunately I can't since it is locked (and the guy who wrote the MTD drivers in Linux for some reason didn't implement the MEMUNLOCK ioctl option so the flash_unlock utility doesn't work!)
A real concern is that writing a new Linux with all of the partitions unlocked, then rebooting the units will cause a bunch of them to brick with the "Error: can't get kernel image!" error. However, after giving this a lot more thought last night, it dawned on me that when we first started seeing these errors over a year ago, before I understood the problem, I just reflashed them. Guess what? EVERY single time I reflashed these units they ALL worked! U-boot was able to load in Linux! (What I didn't know at the time, was that they would all eventually fail again...)
However, knowing that fact, that installing a fresh copy of Linux should NOT brick the unit at least on the first reboot, I've decided to take the easy route to fix this problem - I'll just have the upgrade script erase the current Linux partition, then re-write it with a new Linux that has ALL of the partitions unlocked. Then, the script will reboot the unit and then erase the current U-Boot partition and write in the new one. That's it! This way I don't have to worry about a really complicated upgrade path that has a really complicated 'bootargs' command.
Anyways, let me work on that today and I'll let you know how it goes. Fortunately (or unfortunately, depending on how you look at it), we have a bunch of units returned from the field with this problem I can test this on (after they get reflashed with the old U-Boot).
Titus, Chris, once again, thanks for all the help!
Hi Titus,
Well that didn't work.. The upgrade script was able to erase the Linux partition, write it with one that unlocks all of the partitions for writing, reboot. Then, resume and erase the current U-Boot partition and then rewrite it, as well as update the firmware (additional changes needed by the release), however, when the system rebooted, UBL was not able to load in U-Boot with the following error:
U-Boot 2009.11 (Oct 21 2011 - 17:34:18)
I2C: ready
DRAM: 64 MB
NAND: 512 MiB
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
In: serial
Out: serial
Err: serial
ARM Clock : 300000000 Hz
DDR Clock : 150000000 Hz
Net: Ethernet PHY: GENERIC @ 0x00
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x400000, size 0x400000
NAND read from offset 400000 failed -74
4194304 bytes read: ERROR
Loading from NAND 512MiB 3,3V 8-bit, offset 0x200000
** Unknown image type
Wrong Image Format for bootm command
ERROR: can't get kernel image!
So, I need help, if you don't mind...
Here's the U-Boot code base I'm using:
# U-boot: repository at:
http://arago-project.org/git/projects/?p=u-boot-omapl1.git;a=summary
# And here's the branch I'm using:
git checkout v2009.11_DAVINCIPSP_03.20.00.10
Here's the Linux I'm using:
# Information about the Linux version
root@arago:~# cat /proc/cpuinfo
Processor : ARM926EJ-S rev 5 (v5l)
BogoMIPS : 149.50
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant : 0x0
CPU part : 0x926
CPU revision : 5
# The Linux tree is:
/omap_davinci_psp_sdk_3_20_00_06/DaVinci-PSP-SDK-03.20.00.06/src/kernel/linux-omap-l138-git-tree-09.24.10/linux-omapl1
Hardware : DaVinci DA850/OMAP-L138/AM18xx EVM
Revision : 0000
Serial : 0000000000000000
root@arago:~# uname -a
Linux arago 2.6.33-rc4 #26 PREEMPT Tue Jul 29 19:53:55 PDT 2014 armv5tejl unknown
root@arago:~#
I never build UBL. I did attach the one I'm using though. Hopefully you can try it out.
I really just need to be able to re-write u-boot.bin from Linux. Really shouldn't be that hard, should it..?
Thanks again,
Bill
Hi Bill,
Sorry for the delayed response.
I have used the below SPI partitions for u-boot update.
static struct mtd_partition spi_flash_partitions[] = { [0] = { .name = "U-Boot", .offset = 0, .size = SZ_256K, .mask_flags = 0, //MTD_WRITEABLE, //Titus }, [1] = { .name = "U-Boot Environment", .offset = MTDPART_OFS_APPEND, .size = SZ_64K, .mask_flags = MTD_WRITEABLE, }, [2] = { .name = "Linux", .offset = MTDPART_OFS_NXTBLK, .size = SZ_8M - (SZ_256K + SZ_64K + SZ_64K), .mask_flags = 0, }, [3] = { .name = "MAC Address", .offset = MTDPART_OFS_NXTBLK, .size = SZ_64K, .mask_flags = MTD_WRITEABLE, }, };
The followings commands are used to update u-boot from linux.
flash_eraseall /dev/mtd0
nandwrite -p /dev/mtd0 u-boot.ais
reboot
I will update you tomorrow in detail what I've done.
Hi Titus,
Thank you for the response!
We're using the NAND device, not the SPI device. It is on the extender board on LogicPD's/TI's dev kit.
The data structure is :
struct mtd_partition da850_evm_nandflash_partition[] = {
{ // partition 0
.name = "u-boot env",
.offset = 0,
.size = SZ_128K,
//.mask_flags = MTD_WRITEABLE,
.mask_flags = 0,
},
{ // partition 1
.name = "UBL",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
// .mask_flags = MTD_WRITEABLE,
.mask_flags = 0,
},
...
Would you mind verifying it works using that device?
Much thanks,
Bill
Hi Titus,
Another quick update. I did try using the following partition map in Linux:
{ // partition 0
.name = "u-boot",
.offset = 0,
.size = 4 * SZ_128K,
//.mask_flags = MTD_WRITEABLE,
.mask_flags = 0,
},
{ // partition 1
.name = "u-boot environment",
.offset = MTDPART_OFS_APPEND,
.size = 2 * SZ_128K,
// .mask_flags = MTD_WRITEABLE,
.mask_flags = 0,
},
// bgg - the remainder partitions stay the same, for now anyways..
{ // partition 3
.name = "kernel",
.offset = 0x200000,
// bgg try keeping it the same size as we currently have it!
.size = SZ_2M, // SZ_4M,
// bgg changed back 10/29/12
.mask_flags = 0,
// .mask_flags = MTD_WRITEABLE,
},
{ // partition 4
.name = "filesystem",
.offset = MTDPART_OFS_APPEND,
// bgg - try making the size small so it mounts faster
.size = SZ_16M, // MTDPART_SIZ_FULL,
.mask_flags = 0,
},
The idea was to do as you suggested, first rewrite Linux with this new partition map, allowing me to reboot our system, then, rewrite the larger /dev/mtd0 with the NEW u-boot.ais file (instead of the u-boot.bin file).
Unfortunately, after loading in the new Linux, the system didn't boot:
OMAP-L138 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy...
Valid magicnum, 0x55424CBB, found in block 0x00000006.
DONE
Jumping to entry point at 0xC1080000.
NAND: 512 MiB
MMC: davinci: 0
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
In: serial
Out: serial
Err: serial
i2c_read(): called with chip:80 addr:0x7f00 alen:2 len:6
Default using MAC address from environment
Net: DaVinci-EMAC
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x400000, size 0x400000
NAND read from offset 400000 failed -74
0 bytes read: ERROR
Loading from nand0, offset 0x200000
Image Name: Linux-2.6.33-rc4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2066196 Bytes = 2 MiB
Load Address: c0008000
Entry Point: c0008000
## Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-2.6.33-rc4
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2066196 Bytes = 2 MiB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kerneli - bgg.
Linux version 2.6.33-rc4 (bgoetz@volta5) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #27 PREEMPT Mon Aug 18 14:34:30 PDT 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DA850/OMAP-L138/AM18xx EVM
Memory policy: ECC disabled, Data cache writeback
bgg beginning of davinci_common_init
bgg after first if stmt..
DaVinci da850/omap-l138/am18xx variant 0x1
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: davinci_emac.eth=28:c7:18:00:06:be mem=128M console=ttyS2,115200n8 root=/dev/mtdblock4 rw rootfstype=jffs2 ip=dhcp
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 125552KB available (3676K code, 311K data, 124K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 149.50 BogoMIPS (lpj=747520)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 144 gpio irqs
regulator: core version 0.5
NET: Registered protocol family 16
bgg beginning of da850_evm_init.......
Success configuring NAND pins!
bio: create slab <bio-0> at 0
SCSI subsystem initialized
pca953x 1-0020: failed reading register
i2c-gpio i2c-gpio.1: using pins 20 (SDA) and 21 (SCL)
Switching to clocksource timer0_1
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
EMAC: MII PHY configured, RMII PHY will not be functional
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
SGI XFS with security attributes, large block/inode numbers, no debug enabled
msgmni has been set to 245
io scheduler noop registered (default)
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a 16550A
serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a 16550A
serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a 16550A
console [ttyS2] enabled
brd: module loaded
loop: module loaded
ahci ahci: forcing PORTS_IMPL to 0x1
ahci ahci: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
ahci ahci: flags: ncq sntf pm led clo only pmp pio slum part ccc
scsi0 : ahci
ata1: SATA max UDMA/133 irq 67
bgg start of nand_davinci_probe Chip Select=1 +++++++++++++++++++++++++++++++++++++++++++++
bgg aemif clock rate=25000000 (25000 KH)+++++++++++++++++++++++
bgg just wrote timing, register c8890014 value 0x80
nand_get_flash_type: bgg beginning of routine
bgg2 NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND 512MiB 3,3V 8-bit)
Creating 7 MTD partitions on "davinci_nand.1":
0x000000000000-0x000000080000 : "u-boot"
0x000000080000-0x0000000c0000 : "u-boot environment"
0x000000200000-0x000000400000 : "kernel"
0x000000400000-0x000001400000 : "filesystem"
0x000001400000-0x000002400000 : "ap4_fs"
0x000002400000-0x000002600000 : "kernel2"
0x000002600000-0x000020000000 : "filesystem_large"
davinci_nand davinci_nand.1: controller rev. 2.5
spi_davinci spi_davinci.1: DaVinci SPI driver in EDMA mode
Using RX channel = 18 , TX channel = 19 and event queue = 1
spi_davinci spi_davinci.1: Controller at 0xfef0e000
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
console [netcon0] enabled
bgg test2!!! netconsole: network logging started
i2c /dev entries driver
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1964 buckets, 7856 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
arp_tables: (C) 2002 David S. Miller
TCP cubic registered
NET: Registered protocol family 17
bgg Clocks: NOT DISABLING clock i2c1 !
Clocks: disable unused emac
Clocks: disable unused mcasp
Clocks: disable unused lcdc
Clocks: disable unused mmcsd
Clocks: disable unused spi0
Clocks: disable unused mcbsp0
Clocks: disable unused mcbsp1
Clocks: disable unused vpif
*************** MAC is 28:c7:18:0:6:be (28:c7:18:00:06:be)
emac-mii: probed
ata1: SATA link down (SStatus 0 SControl 300)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1:00, id=7c0f1)
Sending DHCP requests .
PHY: 1:00 - Link is Up - 100/Full
., OK
IP-Config: Got DHCP answer from 172.20.120.200, my address is 172.20.142.7
IP-Config: Complete:
device=eth0, addr=172.20.142.7, mask=255.255.255.0, gw=172.20.142.1,
host=172.20.142.7, domain=altierre.com, nis-domain=altierre,
bootserver=172.20.120.200, rootserver=172.20.120.200, rootpath=
VFS: Mounted root (jffs2 filesystem) on device 31:4.
Freeing init memory: 124K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
[<c002c744>] (unwind_backtrace+0x0/0xdc) from [<c02ec934>] (panic+0x48/0x128)
[<c02ec934>] (panic+0x48/0x128) from [<c0027608>] (init_post+0xe0/0x114)
[<c0027608>] (init_post+0xe0/0x114) from [<c0008450>] (kernel_init+0xec/0x128)
[<c0008450>] (kernel_init+0xec/0x128) from [<c002891c>] (kernel_thread_exit+0x0/0x8)
I'm really hoping you have a much easier time with this on the NAND than I'm having!
Thanks again,
Bill
Hi Bill,
bootserver=172.20.120.200, rootserver=172.20.120.200, rootpath=
VFS: Mounted root (jffs2 filesystem) on device 31:4.
Freeing init memory: 124K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
[<c002c744>] (unwind_backtrace+0x0/0xdc) from [<c02ec934>] (panic+0x48/0x1
I think, you might have erased the filesystem location instead of erasing the kernel location.
You should not change the filesystem location for the latest partition and you have to maintain the same offset and size for the filesystem.
0x000000000000-0x000000080000 : "u-boot"
0x000000080000-0x0000000c0000 : "u-boot environment"
0x000000200000-0x000000400000 : "kernel"
0x000000400000-0x000001400000 : "filesystem"
0x000001400000-0x000002400000 : "ap4_fs"
0x000002400000-0x000002600000 : "kernel2"
0x000002600000-0x000020000000 : "filesystem_large"
Could you please provide the old partition info
Hi Bill,
Sure, I will try to work with NAND flash too when I have time.
Also, please share the old partition map.
Hi Titus,
Apoloties for the last post. It actually looked MUCH better on my phone! For some reason, this application doesn't like carriage returns on my Android phone! Anyways, I'll try it again from my home computer. It should post OK, but if not, the same information is listed near then end of my second post on this topic.
So Titus, as long as uImage is less than SZ_2M in size (which it is, although it's very close), it shouldn't be writing into the filesystem partition, correct?
Thanks again...
Bill
struct mtd_partition da850_evm_nandflash_partition[] = {
{ // partition 0
.name = "u-boot env",
.offset = 0,
.size = SZ_128K,
//.mask_flags = MTD_WRITEABLE,
.mask_flags = 0,
},
{ // partition 1
.name = "UBL",
.offset = MTDPART_OFS_APPEND,
.size = SZ_128K,
// .mask_flags = MTD_WRITEABLE,
.mask_flags = 0,
},
{ // partition 2
.name = "u-boot",
.offset = 0x80000,
.size = 4 * SZ_128K,
.mask_flags = 0,
},
{ // partition 3
.name = "kernel",
.offset = 0x200000,
.size = SZ_2M, // SZ_4M,
.mask_flags = 0,
},
{ // partition 4
.name = "filesystem",
.offset = MTDPART_OFS_APPEND,
.size = SZ_16M, // MTDPART_SIZ_FULL,
.mask_flags = 0,
},
{ // partition 5
.name = "ap4_fs",
.offset = MTDPART_OFS_APPEND,
.size = SZ_16M,
.mask_flags = 0,
},
{ // partition 6
.name = "kernel2",
.offset = MTDPART_OFS_APPEND,
.size = SZ_2M,
.mask_flags = 0,
},
{ // partition 7
.name = "filesystem_large",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
.mask_flags = 0,
},
};
Hi Bill,
New partition:
0x000000000000-0x000000080000 : "u-boot"
0x000000080000-0x0000000c0000 : "u-boot environment"
0x000000200000-0x000000400000 : "kernel"
0x000000400000-0x000001400000 : "filesystem"
0x000001400000-0x000002400000 : "ap4_fs"
0x000002400000-0x000002600000 : "kernel2"
0x000002600000-0x000020000000 : "filesystem_large"
Old partition:
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00020000 00020000 "UBL"
mtd2: 00080000 00020000 "u-boot"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 1dc00000 00020000 "filesystem_large"
root@arago:~#
You should have same offset for older "filesystem_large" and newer "filesystem_large".
I have looked into old replies and had lot of partitions given by you and I've confused. So please provide which is the old partition and new partition (for to load newer kernel with new partition).
Hi Titus,
First, thanks for helping me through this. So the problem with booting Linux with the new partition map was that by combining the UBL and U-Boot partitions, I shrunk the number of partitions by 1. So, when Linux booted, it expected to find the filesystem in /dev/mtdblock4, however, by eliminating a partition, it was really in /dev/mtd3. So, to keep it as close to what I currently have, I just created a dummy partition. Linux now boots up with the new partition map.
Now, the final step to get this working is erasing the new, larger U-Boot + AIS partition and re-writing it with the new u-boot.ais file. Unfortunately, that doesn't work.
I tried putting it at the very start of the NAND and also tried putting it into the second partition (after the u-boot environment variables), and neither work. After writing the files and rebooting, I get NOTHING from the console port. Here's the output, starting with writing the new u-boot.ais file into the expanded u-boot partition:
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00080000 00020000 "u-boot.ais"
mtd2: 00020000 00020000 "u-boot env2"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 1dc00000 00020000 "filesystem_large"
root@arago:~# ls -al u*
-rw-r--r-- 1 root root 404804 Aug 20 18:13 u-boot.ais
-rw-r--r-- 1 root root 2066260 Aug 20 18:13 uImage
root@arago:~# flash_eraseall /dev/mtd1
Erasing 128 Kibyte @ 80000 -- 100 % complete.
root@arago:~# flash_eraseall /dev/mtd1
Erasing 128 Kibyte @ 80000 -- 100 % complete.
root@arago:~# flash_eraseall /dev/mtd1
Erasing 128 Kibyte @ 80000 -- 100 % complete.
root@arago:~# nandwrite -p /dev/mtd1 u-boot.ais
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
root@arago:~# sync
root@arago:~# sync
root@arago:~# sync
root@arago:~# sync
root@arago:~# sync
root@arago:~# reboot
Broadcast message from root (ttyS2) (Wed Aug 20 18:21:18 2014):
The system is going down for reboot NOW!
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
INIT: Sending processStopping syslogd/klogd: stopped syslogd (pid 1061)
stopped klogd (pid 1063)
done
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
mount: can't find /mnt/ram in /proc/mounts
umount: none busy - remounted read-only
mount: cannot read /proc/mounts: No such file or directory
Rebooting... Restarting system.
At this point, when the system reboots, NOTHING comes out of the console port.
What next?
Thanks, Bill
Hey Titus,
I'm pretty confident that if you can get your evaluation/development board to work well by do what you initially suggested:
flash_eraseall /dev/mtd0
followed by
nandwrite -p /dev/mtd0 u-boot.ais
with a new u-boot.ais file (changing something minor), and rebooting, if/when the development kit comes back up with the Linux prompt, I'm confident I can emulate what you did to get our systems upgraded in the field!
Thanks again,
Bill
Hi Bill,
BOARD : DA850 SDI EVM (OMAPL138)
FLASH : SPI
I'm sorry that I've forgot to attach the logs which I tried out.
I feel happy if you have any questions from the logs.
Here you go.
Log:
U-Boot 2009.11 (Jul 17 2012 - 16:59:18)
I2C: ready
DRAM: 64 MB
MMC: davinci: 0
In: serial
Out: serial
Err: serial
ARM Clock : 300000000 Hz
DDR Clock : 150000000 Hz
Net: Ethernet PHY: GENERIC @ 0x00
Hit any key to stop autoboot: 0
*** ERROR: `ipaddr' not set
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot >
U-Boot >
U-Boot > setenv ipaddr 10.100.1.96
U-Boot > saveenv
Saving Environment to SPI Flash...
Erasing SPI flash...Erase: 20 04 00 00
Erase: 20 04 10 00
Erase: 20 04 20 00
Erase: 20 04 30 00
Erase: 20 04 40 00
Erase: 20 04 50 00
Erase: 20 04 60 00
Erase: 20 04 70 00
Erase: 20 04 80 00
Erase: 20 04 90 00
Erase: 20 04 a0 00
Erase: 20 04 b0 00
Erase: 20 04 c0 00
Erase: 20 04 d0 00
Erase: 20 04 e0 00
Erase: 20 04 f0 00
Writing to SPI flash...done
U-Boot > boot
Using device
TFTP from server 10.100.1.94; our IP address is 10.100.1.96
Filename 'uImage'.
Load address: 0xc0700000
Loading: #################################################################
#################################################################
############################################################
done
Bytes transferred = 2781896 (2a72c8 hex)
## Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-3.3.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2781832 Bytes = 2.7 MB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.3.0 (titus@Titus) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro
GCC 2013.03) ) #57 PREEMPT Thu Aug 21 11:10:01 IST 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DA850 SDI Development Board
Memory policy: ECC disabled, Data cache writeback
BUG: mapping for 0x80000000 at 0xfffe0000 out of vmalloc space
DaVinci da850/omap-l138/am18x variant 0x1
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
Kernel command line: mem=32M console=/dev/ttyS2,115200 ip=dhcp nfsroot=10.100.1.94:/usr/local/filesystem_omapl138 root=/dev/nfs rw ro
otwait
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 25944k/25944k available, 6824k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xc2800000 - 0xff000000 ( 968 MB)
lowmem : 0xc0000000 - 0xc2000000 ( 32 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc05a6000 (5752 kB)
.init : 0xc05a6000 - 0xc05d3000 ( 180 kB)
.data : 0xc05d4000 - 0xc0638b40 ( 403 kB)
.bss : 0xc0638b64 - 0xc06570ec ( 122 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 148.88 BogoMIPS (lpj=744448)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc03af450 - 0xc03af4a8
gpiochip_add: registered GPIOs 0 to 31 on device: DaVinci
gpiochip_add: registered GPIOs 32 to 63 on device: DaVinci
gpiochip_add: registered GPIOs 64 to 95 on device: DaVinci
gpiochip_add: registered GPIOs 96 to 127 on device: DaVinci
gpiochip_add: registered GPIOs 128 to 143 on device: DaVinci
DaVinci: 144 gpio irqs
NET: Registered protocol family 16
Titus Debug : ############# PLL0_CTL = 00000049
######### Titus : before CFGCHIP 2 value 8f32
######### Titus : after CFGCHIP 2 value 8f32
########## da850_evm_init: eHRPWM module 0 cannot be used since it is being used by MII interface
######### da850_evm_init: eHRPWM module1 outputA cannot be used since it is being used by LCD
########## da850_evm_init: eHRPWM module1 outputB cannot be used since it is being used by spi1
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pca953x 1-0020: failed reading register
da850-sdi: Mute
i2c-gpio i2c-gpio.1: using pins 20 (SDA) and 21 (SCL)
Advanced Linux Sound Architecture Driver Version 1.0.24.
Switching to clocksource timer0_1
musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
musb-hdrc musb-hdrc: dma type: pio
MUSB255 controller's USBSS revision = 4ea11003
Waiting for USB PHY clock good...
musb-hdrc musb-hdrc: USB OTG mode controller at fee00000 using PIO, IRQ 58
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
EMAC: RMII PHY configured, MII PHY will not be functional
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 50
io scheduler noop registered (default)
da8xx_lcdc da8xx_lcdc.0: GLCD: Found Sharp_LK043T1DG01 panel
Console: switching to colour frame buffer device 60x34
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a AR7
serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a AR7
serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a AR7
console [ttyS2] enabled
brd: module loaded
spi_davinci spi_davinci.1: DMA: supported
spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0
m25p80 spi1.0: found s25fl064k, expected m25p64
m25p80 spi1.0: s25fl064k (8192 Kbytes)
Creating 4 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "U-Boot"
0x000000040000-0x000000050000 : "U-Boot Environment"
0x000000050000-0x0000007f0000 : "Linux"
0x0000007f0000-0x000000800000 : "MAC Address"
spi_davinci spi_davinci.1: Controller at 0xfef0e000
davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
davinci_mdio davinci_mdio.0: detected phy mask fffffffe
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio-0:00, driver SMSC LAN8710/LAN8720
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci ohci.0: DA8xx OHCI
ohci ohci.0: new USB bus registered, assigned bus number 1
Waiting for USB PHY clock good...
ohci ohci.0: irq 59, io mem 0x01e25000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver uas
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for debug
usbcore: registered new interface driver debug
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
input: DA850 SDI Controls as /devices/platform/i2c-gpio.1/i2c-1/1-0025/input/input0
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
omap_rtc: RTC power up reset detected
omap_rtc: already running
i2c /dev entries driver
lirc_dev: IR Remote Control driver registered, major 253
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR RC5 (streamzap) protocol handler initialized
IR SANYO protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR LIRC bridge handler initialized
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
watchdog watchdog: heartbeat 60 sec
cpuidle: using governor ladder
cpuidle: using governor menu
davinci_mmc davinci_mmc.1: Using DMA, 4-bit mode
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usbcore: registered new interface driver snd-usb-audio
asoc: tlv320aic3x-hifi <-> davinci-mcbsp.1 mapping ok
ALSA device list:
#0: DA850 SDI EVM
TCP cubic registered
NET: Registered protocol family 17
console [netcon0] enabled
netconsole: network logging started
davinci_emac davinci_emac.1: using random MAC addr: 62:2b:98:9e:cb:f9
omap_rtc omap_rtc: setting system clock to 2012-04-10 19:10:46 UTC (1334085046)
davinci_mdio davinci_mdio.0: resetting idled controller
net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
PHY: davinci_mdio-0:00 - Link is Up - 100/Full
Sending DHCP requests .., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 10.100.1.102
IP-Config: Complete:
device=eth0, addr=10.100.1.102, mask=255.255.255.0, gw=10.100.1.1,
host=10.100.1.102, domain=chennaiodc, nis-domain=(none),
bootserver=0.0.0.0, rootserver=10.100.1.94, rootpath=
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing init memory: 180K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
udevd (741): /proc/741/oom_adj is deprecated, please use /proc/741/oom_score_adj instead.
Root filesystem already rw, not remounting
Caching udev devnodes
Populating dev cachemv: cannot rename '/tmp/devices': No such file or directory
NET: Registered protocol family 10
logger: mount: mount point /proc/bus/usb does not exist
ALSA: Restoring mixer settings...
NOT configuring network interfaces: / is an NFS mount
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting Hardware abstraction layer hald
Starting Dropbear SSH server: dropbear.
Starting telnet daemon.
Starting network benchmark server: netserver.
Starting syslogd/klogd: done
Starting thttpd.
Starting Lighttpd Web Server: lighttpd.
2012-04-10 19:11:17: (log.c.166) server started
***************************************************************
***************************************************************
NOTICE: This file system contains the followin GPLv3 packages:
binutils-symlinks
binutils
gdbserver
If you do not wish to distribute GPLv3 components please remove
the above packages prior to distribution. This can be done using
the opkg remove command. i.e.:
opkg remove <package>
Where <package> is the name printed in the list above
NOTE: If the package is a dependency of another package you
will be notified of the dependent packages. You should
use the --force-removal-of-dependent-packages option to
also remove the dependent packages as well
***************************************************************
***************************************************************
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org omapl138-lcdk ttyS2
Arago 2011.09 omapl138-lcdk ttyS2
omapl138-lcdk login:
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org omapl138-lcdk ttyS2
Arago 2011.09 omapl138-lcdk ttyS2
omapl138-lcdk login: root
croot@omapl138-lcdk:~# cd /
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# flash_eraseall /dev/mtd0
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
Erasing 4 Kibyte @ 3f000 -- 100 % complete
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# nandwrite -p /dev/mtd0 u-boot.ais
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x1000
Writing data to block 2 at offset 0x2000
Writing data to block 3 at offset 0x3000
Writing data to block 4 at offset 0x4000
Writing data to block 5 at offset 0x5000
Writing data to block 6 at offset 0x6000
Writing data to block 7 at offset 0x7000
Writing data to block 8 at offset 0x8000
Writing data to block 9 at offset 0x9000
Writing data to block 10 at offset 0xa000
Writing data to block 11 at offset 0xb000
Writing data to block 12 at offset 0xc000
Writing data to block 13 at offset 0xd000
Writing data to block 14 at offset 0xe000
Writing data to block 15 at offset 0xf000
Writing data to block 16 at offset 0x10000
Writing data to block 17 at offset 0x11000
Writing data to block 18 at offset 0x12000
Writing data to block 19 at offset 0x13000
Writing data to block 20 at offset 0x14000
Writing data to block 21 at offset 0x15000
Writing data to block 22 at offset 0x16000
Writing data to block 23 at offset 0x17000
Writing data to block 24 at offset 0x18000
Writing data to block 25 at offset 0x19000
Writing data to block 26 at offset 0x1a000
Writing data to block 27 at offset 0x1b000
Writing data to block 28 at offset 0x1c000
Writing data to block 29 at offset 0x1d000
Writing data to block 30 at offset 0x1e000
Writing data to block 31 at offset 0x1f000
Writing data to block 32 at offset 0x20000
Writing data to block 33 at offset 0x21000
Writing data to block 34 at offset 0x22000
Writing data to block 35 at offset 0x23000
Writing data to block 36 at offset 0x24000
Writing data to block 37 at offset 0x25000
Writing data to block 38 at offset 0x26000
Writing data to block 39 at offset 0x27000
Writing data to block 40 at offset 0x28000
Writing data to block 41 at offset 0x29000
Writing data to block 42 at offset 0x2a000
Writing data to block 43 at offset 0x2b000
Writing data to block 44 at offset 0x2c000
Writing data to block 45 at offset 0x2d000
Writing data to block 46 at offset 0x2e000
Writing data to block 47 at offset 0x2f000
Writing data to block 48 at offset 0x30000
Writing data to block 49 at offset 0x31000
Writing data to block 50 at offset 0x32000
Writing data to block 51 at offset 0x33000
Writing data to block 52 at offset 0x34000
Writing data to block 53 at offset 0x35000
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# init 6
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signaaStopping Dropbear SSH server: stopped /usr/sbin/dropbear (pid 1287)
dropbear.
Stopping telnet daemon.
Stopping Hardware abstraction layer hald
Stopping system message bus: stopped process in pidfile '/var/run/dbus/pid' (pid 1250)
dbus.
Stopping network benchmark server: netserverstopped /usr/sbin/netserver (pid 1297)
.
Stopping thttpd.
ALSA: Storing mixer settings...
NOT deconfiguring network interfaces: / is an NFS mount
Stopping Lighttpd Web Server: stopped /usr/sbin/lighttpd (pid 1316)
lighttpd.
Stopping syslogd/klogd: stopped syslogd (pid 1302)
stopped klogd (pid 1304)
done
***************************************************************
***************************************************************
NOTICE: This file system contains the followin GPLv3 packages:
binutils-symlinks
binutils
gdbserver
If you do not wish to distribute GPLv3 components please remove
the above packages prior to distribution. This can be done using
the opkg remove command. i.e.:
opkg remove <package>
Where <package> is the name printed in the list above
NOTE: If the package is a dependency of another package you
will be notified of the dependent packages. You should
use the --force-removal-of-dependent-packages option to
also remove the dependent packages as well
***************************************************************
***************************************************************
Sending all processes the TERM signal...
SPI boot...
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
U-Boot 2012.04.01 (Jul 29 2014 - 13:22:04)
I2C: ready
DRAM: 128 MiB
WARNING: Caches not enabled
MMC: davinci: 0
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
In: serial
Out: serial
Err: serial
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
Default using MAC address from environment
Default using MAC address from environment
Net: DaVinci-EMAC
Hit any key to stop autoboot: 0
U-Boot >
U-Boot >
U-Boot >
Again one more updating new u-boot :
SPI boot...
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
U-Boot 2012.04.01 (Jul 29 2014 - 13:22:04)
I2C: ready
DRAM: 128 MiB
WARNING: Caches not enabled
MMC: davinci: 0
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
In: serial
Out: serial
Err: serial
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
Default using MAC address from environment
Default using MAC address from environment
Net: DaVinci-EMAC
Hit any key to stop autoboot: 0
U-Boot >
U-Boot >
U-Boot > boot
Using DaVinci-EMAC device
TFTP from server 10.100.1.94; our IP address is 10.100.1.96
Filename 'uImage'.
Load address: 0xc0700000
Loading: #################################################################
#################################################################
############################################################
done
Bytes transferred = 2781896 (2a72c8 hex)
## Booting kernel from Legacy Image at c0700000 ...
Image Name: Linux-3.3.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2781832 Bytes = 2.7 MiB
Load Address: c0008000
Entry Point: c0008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.3.0 (titus@Titus) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro
GCC 2013.03) ) #57 PREEMPT Thu Aug 21 11:10:01 IST 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DA850 SDI Development Board
Memory policy: ECC disabled, Data cache writeback
BUG: mapping for 0x80000000 at 0xfffe0000 out of vmalloc space
DaVinci da850/omap-l138/am18x variant 0x1
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
Kernel command line: mem=32M console=/dev/ttyS2,115200 ip=dhcp nfsroot=10.100.1.94:/usr/local/filesystem_omapl138 root=/dev/nfs rw ro
otwait
PID hash table entries: 128 (order: -3, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 25944k/25944k available, 6824k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0xc2800000 - 0xff000000 ( 968 MB)
lowmem : 0xc0000000 - 0xc2000000 ( 32 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc05a6000 (5752 kB)
.init : 0xc05a6000 - 0xc05d3000 ( 180 kB)
.data : 0xc05d4000 - 0xc0638b40 ( 403 kB)
.bss : 0xc0638b64 - 0xc06570ec ( 122 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 148.88 BogoMIPS (lpj=744448)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc03af450 - 0xc03af4a8
gpiochip_add: registered GPIOs 0 to 31 on device: DaVinci
gpiochip_add: registered GPIOs 32 to 63 on device: DaVinci
gpiochip_add: registered GPIOs 64 to 95 on device: DaVinci
gpiochip_add: registered GPIOs 96 to 127 on device: DaVinci
gpiochip_add: registered GPIOs 128 to 143 on device: DaVinci
DaVinci: 144 gpio irqs
NET: Registered protocol family 16
Titus Debug : ############# PLL0_CTL = 00000049
######### Titus : before CFGCHIP 2 value 8f32
######### Titus : after CFGCHIP 2 value 8f32
########## da850_evm_init: eHRPWM module 0 cannot be used since it is being used by MII interface
######### da850_evm_init: eHRPWM module1 outputA cannot be used since it is being used by LCD
########## da850_evm_init: eHRPWM module1 outputB cannot be used since it is being used by spi1
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pca953x 1-0020: failed reading register
da850-sdi: Mute
i2c-gpio i2c-gpio.1: using pins 20 (SDA) and 21 (SCL)
Advanced Linux Sound Architecture Driver Version 1.0.24.
Switching to clocksource timer0_1
musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
musb-hdrc musb-hdrc: dma type: pio
MUSB255 controller's USBSS revision = 4ea11003
Waiting for USB PHY clock good...
musb-hdrc musb-hdrc: USB OTG mode controller at fee00000 using PIO, IRQ 58
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
EMAC: RMII PHY configured, MII PHY will not be functional
JFFS2 version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 50
io scheduler noop registered (default)
da8xx_lcdc da8xx_lcdc.0: GLCD: Found Sharp_LK043T1DG01 panel
Console: switching to colour frame buffer device 60x34
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a AR7
serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a AR7
serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a AR7
console [ttyS2] enabled
brd: module loaded
spi_davinci spi_davinci.1: DMA: supported
spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0
m25p80 spi1.0: found s25fl064k, expected m25p64
m25p80 spi1.0: s25fl064k (8192 Kbytes)
Creating 4 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "U-Boot"
0x000000040000-0x000000050000 : "U-Boot Environment"
0x000000050000-0x0000007f0000 : "Linux"
0x0000007f0000-0x000000800000 : "MAC Address"
spi_davinci spi_davinci.1: Controller at 0xfef0e000
davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
davinci_mdio davinci_mdio.0: detected phy mask fffffffe
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio-0:00, driver SMSC LAN8710/LAN8720
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP Deflate Compression module registered
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci ohci.0: DA8xx OHCI
ohci ohci.0: new USB bus registered, assigned bus number 1
Waiting for USB PHY clock good...
ohci ohci.0: irq 59, io mem 0x01e25000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver uas
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for debug
usbcore: registered new interface driver debug
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
input: DA850 SDI Controls as /devices/platform/i2c-gpio.1/i2c-1/1-0025/input/input0
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
omap_rtc: RTC power up reset detected
omap_rtc: already running
i2c /dev entries driver
lirc_dev: IR Remote Control driver registered, major 253
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR RC5 (streamzap) protocol handler initialized
IR SANYO protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR LIRC bridge handler initialized
Linux video capture interface: v2.00
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
watchdog watchdog: heartbeat 60 sec
cpuidle: using governor ladder
cpuidle: using governor menu
davinci_mmc davinci_mmc.1: Using DMA, 4-bit mode
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usbcore: registered new interface driver snd-usb-audio
asoc: tlv320aic3x-hifi <-> davinci-mcbsp.1 mapping ok
ALSA device list:
#0: DA850 SDI EVM
TCP cubic registered
NET: Registered protocol family 17
console [netcon0] enabled
netconsole: network logging started
davinci_emac davinci_emac.1: using random MAC addr: 6a:cc:fd:90:2d:86
omap_rtc omap_rtc: setting system clock to 2012-04-10 19:17:51 UTC (1334085471)
davinci_mdio davinci_mdio.0: resetting idled controller
net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
PHY: davinci_mdio-0:00 - Link is Up - 100/Full
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 10.100.1.103
IP-Config: Complete:
device=eth0, addr=10.100.1.103, mask=255.255.255.0, gw=10.100.1.1,
host=10.100.1.103, domain=chennaiodc, nis-domain=(none),
bootserver=0.0.0.0, rootserver=10.100.1.94, rootpath=
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing init memory: 180K
INIT: version 2.86 booting
Please wait: booting...
Starting udev
udevd (745): /proc/745/oom_adj is deprecated, please use /proc/745/oom_score_adj instead.
udev: starting version 141
Root filesystem already rw, not remounting
Caching udev devnodes
Populating dev cachemv: cannot rename '/tmp/devices': No such file or directory
NET: Registered protocol family 10
logger: mount: mount point /proc/bus/usb does not exist
ALSA: Restoring mixer settings...
NOT configuring network interfaces: / is an NFS mount
INIT: Entering runlevel: 5
Starting system message bus: dbus.
Starting Hardware abstraction layer hald
Starting Dropbear SSH server: dropbear.
Starting telnet daemon.
Starting network benchmark server: netserver.
Starting syslogd/klogd: done
Starting thttpd.
Starting Lighttpd Web Server: lighttpd.
2012-04-10 19:18:26: (log.c.166) server started
***************************************************************
***************************************************************
NOTICE: This file system contains the followin GPLv3 packages:
binutils-symlinks
binutils
gdbserver
If you do not wish to distribute GPLv3 components please remove
the above packages prior to distribution. This can be done using
the opkg remove command. i.e.:
opkg remove <package>
Where <package> is the name printed in the list above
NOTE: If the package is a dependency of another package you
will be notified of the dependent packages. You should
use the --force-removal-of-dependent-packages option to
also remove the dependent packages as well
***************************************************************
***************************************************************
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org omapl138-lcdk ttyS2
Arago 2011.09 omapl138-lcdk ttyS2
omapl138-lcdk login: root
croot@omapl138-lcdk:~# cd /
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# flash_eraseall /dev/mtd0
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
Erasing 4 Kibyte @ 3f000 -- 100 % complete
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# nandwrite -p /dev/mtd0 u-boot_21-08-2014.ais
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x1000
Writing data to block 2 at offset 0x2000
Writing data to block 3 at offset 0x3000
Writing data to block 4 at offset 0x4000
Writing data to block 5 at offset 0x5000
Writing data to block 6 at offset 0x6000
Writing data to block 7 at offset 0x7000
Writing data to block 8 at offset 0x8000
Writing data to block 9 at offset 0x9000
Writing data to block 10 at offset 0xa000
Writing data to block 11 at offset 0xb000
Writing data to block 12 at offset 0xc000
Writing data to block 13 at offset 0xd000
Writing data to block 14 at offset 0xe000
Writing data to block 15 at offset 0xf000
Writing data to block 16 at offset 0x10000
Writing data to block 17 at offset 0x11000
Writing data to block 18 at offset 0x12000
Writing data to block 19 at offset 0x13000
Writing data to block 20 at offset 0x14000
Writing data to block 21 at offset 0x15000
Writing data to block 22 at offset 0x16000
Writing data to block 23 at offset 0x17000
Writing data to block 24 at offset 0x18000
Writing data to block 25 at offset 0x19000
Writing data to block 26 at offset 0x1a000
Writing data to block 27 at offset 0x1b000
Writing data to block 28 at offset 0x1c000
Writing data to block 29 at offset 0x1d000
Writing data to block 30 at offset 0x1e000
Writing data to block 31 at offset 0x1f000
Writing data to block 32 at offset 0x20000
Writing data to block 33 at offset 0x21000
Writing data to block 34 at offset 0x22000
Writing data to block 35 at offset 0x23000
Writing data to block 36 at offset 0x24000
Writing data to block 37 at offset 0x25000
Writing data to block 38 at offset 0x26000
Writing data to block 39 at offset 0x27000
Writing data to block 40 at offset 0x28000
Writing data to block 41 at offset 0x29000
Writing data to block 42 at offset 0x2a000
Writing data to block 43 at offset 0x2b000
Writing data to block 44 at offset 0x2c000
Writing data to block 45 at offset 0x2d000
Writing data to block 46 at offset 0x2e000
Writing data to block 47 at offset 0x2f000
Writing data to block 48 at offset 0x30000
Writing data to block 49 at offset 0x31000
Writing data to block 50 at offset 0x32000
Writing data to block 51 at offset 0x33000
Writing data to block 52 at offset 0x34000
Writing data to block 53 at offset 0x35000
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# init 6]
Usage: init 0123456SsQqAaBbCcUu
root@omapl138-lcdk:/#
root@omapl138-lcdk:/#
root@omapl138-lcdk:/# init 6
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signalStopping Dropbear SSH server: stopped /usr/sbin/dropbear (pid 1122)
dropbear.
Stopping telnet daemon.
Stopping Hardware abstraction layer hald
Stopping system message bus: stopped process in pidfile '/var/run/dbus/pid' (pid 1085)
dbus.
Stopping network benchmark server: netserverstopped /usr/sbin/netserver (pid 1132)
.
Stopping thttpd.
ALSA: Storing mixer settings...
NOT deconfiguring network interfaces: / is an NFS mount
Stopping Lighttpd Web Server: stopped /usr/sbin/lighttpd (pid 1151)
lighttpd.
Stopping syslogd/klogd: stopped syslogd (pid 1137)
stopped klogd (pid 1139)
done
***************************************************************
***************************************************************
NOTICE: This file system contains the followin GPLv3 packages:
binutils-symlinks
binutils
gdbserver
If you do not wish to distribute GPLv3 components please remove
the above packages prior to distribution. This can be done using
the opkg remove command. i.e.:
opkg remove <package>
Where <package> is the name printed in the list above
NOTE: If the package is a dependency of another package you
will be notified of the dependent packages. You should
use the --force-removal-of-dependent-packages option to
also remove the dependent packages as well
***************************************************************
***************************************************************
Sending all processes the TERM signal...
SPI boot...
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
U-Boot 2012.04.01 (Aug 21 2014 - 11:16:30)
I2C: ready
DRAM: 128 MiB
WARNING: Caches not enabled
MMC: davinci: 0
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
In: serial
Out: serial
Err: serial
SF: Detected W25Q64 with page size 4 KiB, total 8 MiB
Default using MAC address from environment
Default using MAC address from environment
Net: DaVinci-EMAC
Hit any key to stop autoboot: 0
U-Boot >
U-Boot >
Hi Bill,
I have a TI web link book marked that explains how to boot u-boot and Linux from the NAND if you need it.
:-)
Okay, I knew those TI links and will try to work that too (NAND).
Hi Bill,
Sorry I don't have a UI card and I will try to get it.
Just try this method,
1) Boot the board with new u-boot
2) Take data dump of new u-boot's partition.
3) Boot the board with old u-boot
4) NAND write the data dump of new u-boot's into u-boot partition.
flash_eraseall /dev/mtd2
nanddump -o -f /nand_uboot.bin.txt /dev/mtd2
or
dd if=/dev/mtd2 of=/nand_uboot.bin.txt
nandwrite -p -m /dev/mtd2 nand_uboot.bin.txt
Please try it and let me update, I will also try at my end after I received the UI board.
Hi Titus,
OK, now we're getting to the heart of the issue!
So I did exactly what you suggested and it failed.
I believe the problem is in the layout of the ECC bytes in the OOB is different between U-Boot and Linux. I'm really hoping that you have much better results than me! BTW, I have an extra LogicPD development kit I'd be happy to send you if you can't find one. Just let me know where to send it. Anyways, here's the output:
root@arago:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "u-boot env"
mtd1: 00020000 00020000 "UBL"
mtd2: 00160000 00020000 "u-boot"
mtd3: 00200000 00020000 "kernel"
mtd4: 01000000 00020000 "filesystem"
mtd5: 01000000 00020000 "ap4_fs"
mtd6: 1dc00000 00020000 "filesystem_large"
root@arago:~# flash_eraseall /dev/mtd2
Erasing 128 Kibyte @ 160000 -- 100 % complete.
root@arago:~# flash_eraseall /dev/mtd2
Erasing 128 Kibyte @ 160000 -- 100 % complete.
root@arago:~# sync
root@arago:~# sync
root@arago:~# nandwrite
Usage: nandwrite [OPTION] MTD_DEVICE [INPUTFILE|-]
Writes to the specified MTD device.
-a, --autoplace Use auto oob layout
-j, --jffs2 Force jffs2 oob layout (legacy support)
-y, --yaffs Force yaffs oob layout (legacy support)
-f, --forcelegacy Force legacy support on autoplacement-enabled mtd
device
-m, --markbad Mark blocks bad if write fails
-n, --noecc Write without ecc
-o, --oob Image contains oob data
-s addr, --start=addr Set start address (default is 0)
-p, --pad Pad to page size
-b, --blockalign=1|2|4 Set multiple of eraseblocks to align to
-q, --quiet Don't display progress messages
--help Display this help and exit
--version Output version information and exit
root@arago:~# nandwrite -p -m /dev/mtd2 nand_uboot.bin.txt
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
root@arago:~# sync
root@arago:~# sync
root@arago:~# reboot
Broadcast message from root (ttyS2) (Thu Aug 21 17:17:47 2014):
The system is going down for reboot NOW!
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
INIT: Sending processStopping syslogd/klogd: stopped syslogd (pid 1054)
stopped klogd (pid 1056)
done
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
mount: can't find /mnt/ram in /proc/mounts
umount: none busy - remounted read-only
mount: cannot read /proc/mounts: No such file or directory
Rebooting... Restarting system.
OMAP-L138 initialization passed!
Booting TI User Boot Loader
UBL Version: 1.65
UBL Flashtype: NAND
Starting NAND Copy...
No valid boot image found!
NAND Boot failed.
Aborting...