Skip to contentSkip to conversation

TQM860L and JFFS2???

U-Boot-Users Steven Scholz 2 participants 4 messages Jun 2, 2003 – Jun 4, 2003

lore
Share & tools
lore
#0 lore raw

Hi there,

I want to use JFFS2 as root fs on a TQM860L board (with u-boot-0.3.0)

It has to flash banks:

Bank # 1: FUJITSU AM29LV160B (16 Mbit, bottom boot sect)
Size: 4 MB in 35 Sectors
Bank # 2: FUJITSU AM29LV160B (16 Mbit, bottom boot sect)
Size: 4 MB in 35 Sectors

I added a "CFG_CMD_JFFS2" to the CONFIG_COMMANDS and the lines

#define CFG_JFFS2_FIRST_BANK    1
#define CFG_JFFS2_FIRST_SECTOR  0
#define CFG_JFFS2_NUM_BANKS     1

in ./include/configs/TQM860L.h.

But when building the binary I always get :

ppc_8xx-ld -Bstatic -T /home/scholz/Projekte/u-boot/board/tqm8xx/u-boot.lds -Ttext 0x40000000 -n cpu/mpc8xx/start.o \
--start-group board/tqm8xx/libtqm8xx.a
cpu/mpc8xx/libmpc8xx.a lib_ppc/libppc.a fs/jffs2/libjffs2.a fs/fdos/libfdos.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a post/libpost.a post/cpu/libcpu.a common/libcommon.a lib_generic/libgeneric.a --end-group \
-Map u-boot.map -o u-boot
/home/scholz/Projekte/u-boot/board/tqm8xx/u-boot.lds:137 cannot move location counter backwards (from 40008124 to 40008000)

I tried different values for CFG_JFFS2_FIRST_BANK et.al. But I have to admit I am not sure about their meanings! ;-)

Is CFG_JFFS2_FIRST_BANK=1 the second bank?
Is CFG_JFFS2_NUM_BANKS the number of banks used only for JFFS? Or the total number of flash banks?

On a different board (DAB4K, with only one big flash bank) I just had

#define CFG_JFFS2_FIRST_BANK    0
#define CFG_JFFS2_FIRST_SECTOR  0
#define CFG_JFFS2_NUM_BANKS     1

and it worked.

How does the code find the JFFS partition? Just scanning the flash for
a bit of magic? (0x1985?)

Thanks a million in advance!

Steven

#1 lore raw
Quoted 2 lines · In message <[email protected]> you wrote:

I want to use JFFS2 as root fs on a TQM860L board (with u-boot-0.3.0)

...

Quoted 1 line

I added a "CFG_CMD_JFFS2" to the CONFIG_COMMANDS and the lines

...

Quoted 2 lines

/home/scholz/Projekte/u-boot/board/tqm8xx/u-boot.lds:137 cannot move location counter backwards (from 40008124 to 40008000)

You have to adjust the linker script (board/tqm8xx/u-boot.lds); one of the early sections grows because of youyr change, so it would overlap the location with the environment sectors.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Harrison's Postulate:
	For every action, there is an equal and opposite criticism.
#2 lore raw
Quoted 10 lines · Wolfgang Denk
Quoted 1 line · In message <[email protected]> you wrote:

I want to use JFFS2 as root fs on a TQM860L board (with u-boot-0.3.0)

...

Quoted 1 line

I added a "CFG_CMD_JFFS2" to the CONFIG_COMMANDS and the lines

...

Quoted 8 lines
Quoted 2 lines

/home/scholz/Projekte/u-boot/board/tqm8xx/u-boot.lds:137 cannot move location counter backwards (from 40008124 to 40008000)

You have to adjust the linker script (board/tqm8xx/u-boot.lds); one of the early sections grows because of youyr change, so it would overlap the location with the environment sectors.

Thanks for that hint! It's fine now.

Steven

#3 lore raw
In reply to Steven Scholz

It works now, but please again:

Is CFG_JFFS2_FIRST_BANK=1 the second bank?
Is CFG_JFFS2_NUM_BANKS the number of banks used only for JFFS? Or the total number of flash banks?

How does the code find the JFFS partition? Just scanning the flash for a bit of magic? (0x1985?)

Thanks,

Steven