2010-09-25 16:28:35     bf548 - problems flashing kernel

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-09-25 16:28:35     bf548 - problems flashing kernel

Dusko Cencan (GERMANY)

Message: 93840   

 

Hi,

 

I ran into a problem a few days ago, which I couldnt solve. NowI tried it again, but still have no lock. I have a bf548 custom board with 128MB DDR and 32MB parallel NOR flash. I tried to flash vmImage with the according rootfs.jffs2.

 

My partition table config is unchanged:

 

static struct mtd_partition ezkit_partitions[] = {

    {

        .name       = "bootloader(nor)",

        .size       = 0x40000,

        .offset     = 0,

    }, {

        .name       = "linux kernel(nor)",

        .size       = 0x400000,

        .offset     = MTDPART_OFS_APPEND,

    }, {

        .name       = "file system(nor)",

        .size       = MTDPART_SIZ_FULL,

        .offset     = MTDPART_OFS_APPEND,

    }

};

 

In uboot (successfully flashed a long time ago...) I type this:

 

protect off 0x20040000 0x2043FFFF

 

erase 0x20040000 0x2043FFFF

 

tftp 0x1000000 vmImage

 

cp.b 0x1000000 0x20040000 $(filesize)

 

 

 

And for rootfs.jffs the same, but on address 0x20440000:

 

protect off 0x20440000 0x20FF7FFF

 

erase 0x20440000 0x20FF7FFF

 

tftp 0x1000000 rootfs.jffs2

 

cp.b 0x1000000 0x20440000 $(filesize)

 

 

 

The I set the uboot config to:

 

setenv bootargs root=/dev/mtdblock2 rootfstype=jffs2 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600

 

 

 

But when I try to start the kernel I got following error. It's not quite an error, because the system just hangs:

 

bfin>

 

run flashboot

 

## Booting kernel from Legacy Image at 20040000 ...

 

Image

 

Name: bf548-2.6.34-ADI-2010R1-pre-svn8

 

Created: 2010-09-12 20:57:17 UTC

 

Image Type: Blackfin Linux Kernel Image (gzip compressed)

 

Data Size: 1479155 Bytes = 1.4 MiB

 

Load Address: 00500000

 

Entry Point: 007a48f4

 

Verifying Checksum ...

 

OK

 

Uncompressing Kernel Image ...

 

OK

 

Starting Kernel at = 007a48f4

 

 

 

 

 

.... At this point the system just hang. No error, nothing else. I guess the kernel was flashed OK, because it is successfully uncompressed.

 

 

 

Does anyone have an idea? I read all possible docs in the uclinux documentation, but I think I did it right?

 

 

 

Thanks in Advance!

 

 

 

QuoteReplyEditDelete

 

 

2010-09-25 16:39:16     Re: bf548 - problems flashing kernel

Mike Frysinger (UNITED STATES)

Message: 93841   

 

"run flashboot" probably clobbers your bootargs, so the value you have in it is irrelevant.  please review your u-boot env to see what you're actually doing.

 

if you still cant figure out how to get console output, there is always:

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:debug:post_mortem

QuoteReplyEditDelete

 

 

2010-09-25 16:45:59     Re: bf548 - problems flashing kernel

Dusko Cencan (GERMANY)

Message: 93842   

 

Hi Mike!

 

 

 

I think I've found the problem. The output console was wrong. Now I set ttyBF1 instead of ttyBF0 and the kernel boots. I see the filesystem and when I create a folder, the next time I boot its still there. But I got some errors at bootup:

 

rtc-bfin rtc-bfin: setting system clock to 1970-12-17 05:35:14 UTC (30260114)

 

Empty flash at 0x0000fffc ends at 0x00010000

 

CLEANMARKER node found at 0x00010000, not first node in block (0x00000000)

 

CLEANMARKER node found at 0x00030000, not first node in block (0x00020000)

 

Empty flash at 0x0004fffc ends at 0x00050000

 

CLEANMARKER node found at 0x00050000, not first node in block (0x00040000)

 

Empty flash at 0x0006fffc ends at 0x00070000

 

CLEANMARKER node found at 0x00070000, not first node in block (0x00060000)

 

Empty flash at 0x0008fffc ends at 0x00090000

 

CLEANMARKER node f

 

ound at 0x00090000, not first node in block (0x00080000)

 

Empty flash at 0x000afffc ends at 0x000b0000

 

CLEANMARKER node found at 0x000b0000, not first node in block (0x000a0000)

 

Empty flash at 0x000cfffc ends at 0x000d0000

 

CLEANMARKER node found at 0x000d0000, not first node in block (0x000c0000)

 

Empty flash at 0x000efffc ends at 0x000f0000

 

CLEANMARKER node found at 0x000f0000, not first node in block (0x000e0000)

 

Empty flash at 0x0010fffc ends at 0x00110000

 

CLEANMARKER node found at 0x00110000, not first node in block (0x00100000)

 

Empty flash at 0x0012fffc ends at 0x00130000

 

CLEANMARKER node found at 0x00130000, not first node in block (0x00120000)

 

Empty flash at 0x0014fffc ends at 0x00150000

 

CLEANMARKER node found at 0x00150000, not first node in block (0x00140000)

 

CLEANMARKER node found at 0x00170000, not first node in block (0x00160000)

 

Empty flash at 0x0018fffc ends at 0x00190000

 

CLEANMARKER node found at 0x00190000, not first node in block (0x00180000)

 

Empty flash at 0x001afffc ends at 0x001b0000

 

CLEANMARKER node found at 0x001b0000, not first node in block (0x001a0000)

 

Empty flash at 0x001cfffc ends at 0x001d0000

 

CLEANMARKER node found at 0x001d0000, not first node in block (0x001c0000)

 

Empty flash at 0x001efffc ends at 0x001f0000

 

CLEANMARKER node found at 0x001f0000, not first node in block (0x001e0000)

 

Empty flash at 0x0020fffc ends at 0x00210000

 

CLEANMARKER node found at 0x00210000, not first node in block (0x00200000)

 

Empty flash at 0x0022fffc ends at 0x00230000

 

CLEANMARKER node found at 0x00230000, not first node in block (0x00220000)

 

Empty flash at 0x0024fffc ends at 0x00250000

 

CLEANMARKER node found at 0x00250000, not first node in block (0x00240000)

 

Empty flash at 0x0026fffc ends at 0x00270000

 

CLEANMARKER node found at 0x00270000, not first node in block (0x00260000)

 

Empty flash at 0x0028fffc ends at 0x00290000

 

CLEANMARKER node found at 0x00290000, not first node in block (0x00280000)

 

Empty flash at 0x002afffc ends at 0x002b0000

 

CLEANMARKER node found at 0x002b0000, not first node in block (0x002a0000)

 

Empty flash at 0x002cfffc ends at 0x002d0000

 

CLEANMARKER node found at 0x002d0000, not first node in block (0x002c0000)

 

Empty flash at 0x002efffc ends at 0x002f0000

 

CLEANMARKER node f

 

ound at 0x002f0000, not first node in block (0x002e0000)

 

Empty flash at 0x0030fffc ends at 0x00310000

 

CLEANMARKER node found at 0x00310000, not first node in block (0x00300000)

 

Empty flash at 0x0032fffc ends at 0x00330000

 

CLEANMARKER node found at 0x00330000, not first node in block (0x00320000)

 

Empty flash at 0x0034fffc ends at 0x00350000

 

CLEANMARKER node found at 0x00350000, not first node in block (0x00340000)

 

Empty flash at 0x0036fffc ends at 0x00370000

 

CLEANMARKER node found at 0x00370000, not first node in block (0x00360000)

 

VFS: Mounted root (jffs2 filesystem) on device 31:2.

 

Freeing unused kernel memory: 156k freed

 

 

 

What's the meaning of this?

 

"df" command shows:

 

 

Filesystem 1K-blocks Used Available Use% Mounted

 

on

 

/dev/root 12032 4128 7904 34% /

 

 

 

 

 

 

 

Thanks!

 

QuoteReplyEditDelete

 

 

2010-09-25 17:19:07     Re: bf548 - problems flashing kernel

Mike Frysinger (UNITED STATES)

Message: 93843   

 

please search the wiki:

  docs.blackfin.uclinux.org/doku.php?id=linux-kernel:jffs

QuoteReplyEditDelete

 

 

2010-09-26 08:39:34     Re: bf548 - problems flashing kernel

Dusko Cencan (GERMANY)

Message: 93859   

 

The troubleshooting section mentions exactly my problem:

 

 

 

jffs2_scan_empty(): Empty block at 0x0012fffc ends at 0x00130000 (with 0xe0021985)! Marking dirty

 

if it finds free space in between the nodes in an erase block. This situation is harmless though - it's just a little bit of wasted space, that's all.

 

Both of these situations can occur if you create a JFFS2 image with mkfs.jffs2 using the wrong value for the erase block size (the -e option). The default is 64KiB, because that's the smallest erase block size you're likely to encounter often, and creating an image with smaller eraseblock size than the actual hardware is harmless -- it just gives annoying messages. If you see the messages mentioned above, check the erase block size of your device (look in /proc/mtd if you don't know), and create your JFFS2 image for it with the correct -e option.

 

 

The thing is, that I didn't mont the filesystem by myself from withing the booted linux kernel, it all happened "automatically".

 

But, can I assume that for now I will not have any errors on the filesystem, just wasted some memory on the flash? If that's so, I can live with that for now.

Attachments

    Outcomes