From: Nicholas Kinar <n.kinar@usask.ca>
To: u-boot@lists.denx.de
Subject: [U-Boot] Booting kernel from NAND flash on AT91SAM9 custom board using fsload
Date: Tue, 29 Mar 2011 10:14:11 -0600 [thread overview]
Message-ID: <4D920553.8040809@usask.ca> (raw)
Hello,
I've designed a custom circuit board based around the AT91SAM9RL64
processor from Atmel. This is an ARM9 AT91SAM9 series chip. The Atmel
evaluation kit for this processor is supported by U-Boot, and the
configuration header file can be found in the u-boot-2010.09 source code
distribution (/include/configs/at91sam9rlek.h).
To support my custom hardware, I've made small changes to the
/include/configs/at91sam9rlek.h configuration file and to the files in
the /board/atmel/at91sam9rlek/ directory.
On my custom circuit board, the AT91bootstrap first-order bootloader is
loaded from SPI Dataflash. In turn, the AT91bootstrap code loads U-Boot
to SDRAM memory and then jumps to the load address. The U-Boot binary
is also stored on SPI dataflash. I am able to successfully load U-Boot
on my custom hardware, and I am able to use the nand subsystem commands
to access the NAND flash.
I would like to use the fsload command to load the Linux kernel from a
JFFS2 filesystem written to the NAND flash, but to me it is not
immediately clear what I need to modify in the U-Boot code to be able to
do this. Perhaps the YAFFS filesystem would be more appropriate?
I've found several mailing list threads on a related question, but I
still can't determine how to boot from NAND flash. Does fsload only
support NOR flash, or is it possible to use fsload on NAND flash?
[1] http://lists.denx.de/pipermail/u-boot/2007-December/027578.html
[2] http://www.mail-archive.com/u-boot at lists.denx.de/msg28173.html
[3] http://old.nabble.com/NAND-boot-from-file-td7930776.html
[4]
http://blackfin.uclinux.org/gf/project/u-boot/forum/?_forum_action=ForumMessageBrowse&thread_id=17711&action=ForumBrowse
As suggested in thread [4] above, I tried replacing jffs2_1pass.c with
jffs2_nand_1pass.c in the fs/jffs2 directory.
Also as instructed in the README.NAND, README.JFFS2 and
README.JFFS2_NAND files found in the /doc/ directory, I've tried
defining the following in my
/include/configs/at91sam9rlek.h configuration file:
#define CONFIG_JFFS2_NAND 1
#define CONFIG_CMD_JFFS2
#define CONFIG_SYS_MAX_FLASH_BANKS 1
#define CONFIG_CMD_NAND 1
However, after making these changes, the compilation process does not
work, with the following error being reported:
make[1]: Entering directory
`/home/nkinar/DEVICE-CODE/uboot/u-boot-2010.09/common'
arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8
-msoft-float -D__KERNEL__ -DTEXT_BASE=0x23f00000
-I/home/nkinar/DEVICE-CODE/uboot/u-boot-2010.09/include -fno-builtin
-ffreestanding -nostdinc -isystem
/home/nkinar/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/include
-pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux
-mno-thumb-interwork -march=armv5te -Wall -Wstrict-prototypes
-fno-stack-protector \
-o cmd_jffs2.o cmd_jffs2.c -c
cmd_jffs2.c: In function 'mtd_device_validate':
cmd_jffs2.c:172:24: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'flash_info'
cmd_jffs2.c:172:24: error: 'flash_info' undeclared (first use in this
function)
cmd_jffs2.c:172:24: note: each undeclared identifier is reported only
once for each function it appears in
cmd_jffs2.c:172:35: error: expected expression before ']' token
cmd_jffs2.c: In function 'get_part_sector_size_nor':
cmd_jffs2.c:275:22: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'flash_info'
cmd_jffs2.c:275:22: error: 'flash_info' undeclared (first use in this
function)
cmd_jffs2.c:275:33: error: expected expression before ']' token
cmd_jffs2.c:279:2: error: 'flash_info_t' undeclared (first use in this
function)
cmd_jffs2.c:279:16: error: 'flash' undeclared (first use in this function)
make[1]: *** [cmd_jffs2.o] Error 1
make[1]: Leaving directory
`/home/nkinar/DEVICE-CODE/uboot/u-boot-2010.09/common'
make: *** [common/libcommon.a] Error 2
What do I need to update in U-Boot to be able to use fsload on my custom
hardware?
next reply other threads:[~2011-03-29 16:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 16:14 Nicholas Kinar [this message]
2011-03-29 17:37 ` [U-Boot] Booting kernel from NAND flash on AT91SAM9 custom board using fsload Nicholas Kinar
2011-03-29 17:56 ` Scott Wood
2011-03-29 20:35 ` Nicholas Kinar
2011-03-29 20:46 ` Scott Wood
2011-03-29 20:57 ` Nicholas Kinar
2011-03-29 21:05 ` Wolfgang Denk
2011-03-29 21:46 ` Nicholas Kinar
2011-03-29 21:51 ` Wolfgang Denk
2011-04-02 17:38 ` Nicholas Kinar
2011-04-03 1:50 ` Nicholas Kinar
2011-04-04 1:25 ` Nicholas Kinar
2011-03-30 7:17 ` Joakim Tjernlund
2011-03-30 8:54 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D920553.8040809@usask.ca \
--to=n.kinar@usask.ca \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.