how to enable various command support in u-boot-1.3.4?
Dear all,
I was using u-boot-1.1.5 all these days. so i decided to use SPI API improvements and some other improvements. so i switched to u-boot 1.3.4 . I'm using AT91SAM9261 board cross compiler with GCC 3.4.1. i was able to compile the u-boot but only few of files compiled. in the /common/ directory i want to compile cmd_fat.c and cmd_spi.c . though these files are there in Makefile im unable to compile. may i know what i need to do to compile these files in u-boot? do i need to enable something? thanks.:confused:
warm regards,
Ravi Kulkarni
Signature · 2 lines
View this message in context: http://www.nabble.com/how-to-enable-various-command-support-in-u-boot-1.3.4--tp25236687p25236687.html Sent from the Uboot - Users mailing list archive at Nabble.com.
Dear sunr2007,
Quoted 4 lines · In message <[email protected]> you wrote:
I was using u-boot-1.1.5 all these days. so i decided to use SPI API improvements and some other improvements. so i switched to u-boot 1.3.4 . I'm using AT91SAM9261 board cross compiler with GCC 3.4.1. i was able to
May I ask why you decided to switch from an ancient to a very old version, and not to a current one?
U-Boot 1.3.4 is more than a year old. Current release is v2009.08
Also, GCC 3.4.x is very, very old.
Why are you not using a recent tool chain?
Quoted 4 lines
compile the u-boot but only few of files compiled. in the /common/ directory i want to compile
cmd_fat.candcmd_spi.c. though these files are there inMakefileim unable to compile. may i know what i need to do to compile these files in u-boot? do i need to enable something? thanks.:confused:
I don't know what you are doing, buyt I can teel you that U-Boot releases 1.3.4 and 2009.08 build fine in all our tests;
we used ELDK 3.1.1 (gcc 3.3.3) through ELDK 4.2 (gcc 4.2.2) for this.
If you have problems, then you either must be doing something wrong, oryour tool chain is broken - but you don't provide enough information for any diagnosis of the actual problem.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de It became apparent that one reason why the Ice Giants were known as the Ice Giants was because they were, well, giants. The other was that they were made of ice. -Terry Pratchett, _Sourcery_
Quoted 92 lines · wd
Dear sunr2007,
Quoted 4 lines · In message <[email protected]> you wrote:
I was using u-boot-1.1.5 all these days. so i decided to use SPI API improvements and some other improvements. so i switched to u-boot 1.3.4 . I'm using AT91SAM9261 board cross compiler with GCC 3.4.1. i was able to
May I ask why you decided to switch from an ancient to a very old version, and not to a current one?
U-Boot 1.3.4 is more than a year old. Current release is v2009.08
Also, GCC 3.4.x is very, very old.
Why are you not using a recent tool chain?
since i use AT91SAM9261 boards the latest patch available for that board
is u-boot-1.3.4
so i used u-boot-1.3.4. i used 2009-08 version and compiled but there is no support patch file for tat.
i got this info frm linux4sam.org.Quoted 7 lines
compile the u-boot but only few of files compiled. in the /common/ directory
i want to compilecmd_fat.candcmd_spi.c. though these files are there inMakefileim unable to compile. may i know what i need to do to compile these
files in u-boot? do i need to enable something? thanks.:confused:I don't know what you are doing, buyt I can teel you that U-Boot releases 1.3.4 and 2009.08 build fine in all our tests;
we used ELDK 3.1.1 (gcc 3.3.3) through ELDK 4.2 (gcc 4.2.2) for this.If you have problems, then you either must be doing something wrong, oryour tool chain is broken - but you don't provide enough information for any diagnosis of the actual problem.
All i was tryin to do is to compilecmd_fat.candcmd_spi.cfiles
/common/ folder.
im not saying that i cant compile u-boot . i was able to compile u-boot but with only less commands. i wanted to use fatls and fatload , sspi and some other commands. these files are there in makefile but still i cant compile them.
i tried modifyingMakefileby changing this particular line COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
to
COBJS-y += cmd_fat.o
but the compiler gave a error which im posting herecommon/libcommon.a(cmd_fat.o): In function `do_fat_fsload':
/home/ravikulkarni/dasuboot_airforce/u-boot-1.3.4/common/cmd_fat.c:64:
undefined reference to `fat_register_device'/home/ravikulkarni/dasuboot_airforce/u-boot-1.3.4/common/cmd_fat.c:73:
undefined reference tofile_fat_read' common/libcommon.a(cmd_fat.o): In functiondo_fat_ls':/home/ravikulkarni/dasuboot_airforce/u-boot-1.3.4/common/cmd_fat.c:123:
undefined reference to `fat_register_device'/home/ravikulkarni/dasuboot_airforce/u-boot-1.3.4/common/cmd_fat.c:130:
undefined reference tofile_fat_ls' common/libcommon.a(cmd_fat.o): In functiondo_fat_fsinfo':/home/ravikulkarni/dasuboot_airforce/u-boot-1.3.4/common/cmd_fat.c:168:
undefined reference to `fat_register_device'/home/ravikulkarni/dasuboot_airforce/u-boot-1.3.4/common/cmd_fat.c:172:
undefined reference to `file_fat_detectfs'but i have checked tat all these functions are defined in
fat.h
so i may know what exactly is going wrong? and can anybody give a link for the latest toolchain which is advisable to compile u-boot? thanks a lot for ur replywarm regards,
Ravi KulkarniBest regards,
Wolfgang Denk
Signature · 10 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de It became apparent that one reason why the Ice Giants were known as the Ice Giants was because they were, well, giants. The other was that they were made of ice. -Terry Pratchett, _Sourcery_ _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
View this message in context: http://www.nabble.com/how-to-enable-various-command-support-in-u-boot-1.3.4--tp25236687p25237459.html Sent from the Uboot - Users mailing list archive at Nabble.com.
Dear sunr2007,
Please make sure to read http://www.netmeister.org/news/learn2quote.html
Your message is next to impossible to read as we cannot see who wrote what.
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Why are you not using a recent tool chain?
since i use AT91SAM9261 boards the latest patch available for that board
is u-boot-1.3.4
so i used u-boot-1.3.4. i used 2009-08 version and compiled but there is no support patch file for tat.
i got this info frm linux4sam.org.
There are several configurations for the at91sam9261ek board supported in recent U-Boot. Please look again.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
compile the u-boot but only few of files compiled. in the /common/ directory
i want to compilecmd_fat.candcmd_spi.c. though these files are there inMakefileim unable to compile. may i know what i need to do to compile these
files in u-boot? do i need to enable something? thanks.:confused:
You must not trry to compile single files, because you most likely don't get the required options right. Just add these features into your board configuration.
Quoted 5 lines
Quoted 5 lines
i tried modifying
Makefileby changing this particular line COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
to
COBJS-y += cmd_fat.o
but the compiler gave a error which im posting here
Don't do this. Instead, just add CONFIG_CMD_FAT to your board config file, usualklky include/configs/<name>.h
Then run "make <name>_config" and "make all"
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Imitation is the sincerest form of plagarism.
thanks a lot Deng. sorry about previous message postin tat way. Now i was able to compile cmd_fat.c by adding tat CONFIG_CMD_FAT in /include/configs/at91sam9261ek.h. Now i want to use the atmel_spi.c driver in /drivers/spi.
can u let me know what to add in the config file? i tried adding if define CONFIG_ATMEL_SPI AT91SAM9261_ID_SPI0
so that it used BUS0 of the atmel SPI controller but the compiler again gave some error which was similar to previous error which i posted . thanks a lot .
warm regards,
Ravi Kulkarni.
Quoted 62 lines · wd
Dear sunr2007,
Please make sure to read http://www.netmeister.org/news/learn2quote.html
Your message is next to impossible to read as we cannot see who wrote what.
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Why are you not using a recent tool chain?
since i use AT91SAM9261 boards the latest patch available for thatboard
Quoted 2 lines
is u-boot-1.3.4
so i used u-boot-1.3.4. i used 2009-08 version and compiled but thereis
Quoted 2 lines
no support patch file for tat.
i got this info frm linux4sam.org.There are several configurations for the at91sam9261ek board supported in recent U-Boot. Please look again.
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
compile the u-boot but only few of files compiled. in the /common/ directory
i want to compilecmd_fat.candcmd_spi.c. though these files arethere
Quoted 4 lines
Quoted 4 lines
in
Makefileim unable to compile. may i know what i need to do to compile these
files in u-boot? do i need to enable something? thanks.:confused:You must not trry to compile single files, because you most likely don't get the required options right. Just add these features into your board configuration.
Quoted 5 lines
Quoted 5 lines
i tried modifying
Makefileby changing this particular line COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
to
COBJS-y += cmd_fat.o
but the compiler gave a error which im posting hereDon't do this. Instead, just add
CONFIG_CMD_FATto your board config file, usualklky include/configs/<name>.hThen run "make <name>_config" and "make all"
Best regards,
Wolfgang Denk
Signature · 8 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Imitation is the sincerest form of plagarism. _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
View this message in context: http://www.nabble.com/how-to-enable-various-command-support-in-u-boot-1.3.4--tp25236687p25238770.html Sent from the Uboot - Users mailing list archive at Nabble.com.
yeah u are right denk. sorry i addressed as deng in last message. i added CONFIG_CMD_FAT in my config file /include/configs/at91sam9261ek.h and cmd_fat.c got compiled
. on these lines Now i want to compile the file /drivers/spi/atmel_spi.c , so enabled #define CONFIG_ATMEL_SPI 1 in config file but the compiler gave errors. can anybody let me know how to enable this driver in the config ?
Quoted 79 lines · sunr2007 wrote:
thanks a lot Deng. sorry about previous message postin tat way. Now i was able to compile
cmd_fat.cby adding tatCONFIG_CMD_FATin /include/configs/at91sam9261ek.h. Now i want to use theatmel_spi.cdriver in /drivers/spi.
can u let me know what to add in the config file? i tried adding if defineCONFIG_ATMEL_SPIAT91SAM9261_ID_SPI0
so that it used BUS0 of the atmel SPI controller but the compiler again gave some error which was similar to previous error which i posted . thanks a lot .
warm regards,
Ravi Kulkarni.Quoted 63 lines · wd
Dear sunr2007,
Please make sure to read http://www.netmeister.org/news/learn2quote.html
Your message is next to impossible to read as we cannot see who wrote what.
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Why are you not using a recent tool chain?
since i use AT91SAM9261 boards the latest patch available for thatboard
Quoted 2 lines
is u-boot-1.3.4
so i used u-boot-1.3.4. i used 2009-08 version and compiled but thereis
Quoted 2 lines
no support patch file for tat.
i got this info frm linux4sam.org.There are several configurations for the at91sam9261ek board supported in recent U-Boot. Please look again.
Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
compile the u-boot but only few of files compiled. in the /common/ directory
i want to compilecmd_fat.candcmd_spi.c. though these files arethere
Quoted 2 lines
Quoted 2 lines
in
Makefileim unable to compile. may i know what i need to do tocompile
Quoted 2 lines
Quoted 2 lines
these
files in u-boot? do i need to enable something? thanks.:confused:You must not trry to compile single files, because you most likely don't get the required options right. Just add these features into your board configuration.
Quoted 5 lines
Quoted 5 lines
i tried modifying
Makefileby changing this particular line COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
to
COBJS-y += cmd_fat.o
but the compiler gave a error which im posting hereDon't do this. Instead, just add
CONFIG_CMD_FATto your board config file, usualklky include/configs/<name>.hThen run "make <name>_config" and "make all"
Best regards,
Wolfgang Denk
Signature · 8 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Imitation is the sincerest form of plagarism. _______________________________________________ U-Boot mailing list U-Boot at lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
View this message in context: http://www.nabble.com/how-to-enable-various-command-support-in-u-boot-1.3.4--tp25236687p25252776.html Sent from the Uboot - Users mailing list archive at Nabble.com.
Dear sunr2007,
I asked you before: please make sure to read
http://www.netmeister.org/news/learn2quote.html
and then follow the rules.
Especially, do not top-post / full-quote.
Quoted 7 lines · In message <[email protected]> you wrote:
yeah u are right denk. sorry i addressed as deng in last message. i added
CONFIG_CMD_FATin my config file /include/configs/at91sam9261ek.h andcmd_fat.cgot compiled
. on these lines Now i want to compile the file /drivers/spi/atmel_spi.c , so enabled #defineCONFIG_ATMEL_SPI1 in config file but the compiler gave errors. can anybody let me know how to enable this driver in the config ?
You may also want to read
http://catb.org/esr/faqs/smart-questions.html
How do you expect us to help when all information you provide is "the compiler gave errors"? Do you think we can guess what your code looks like, which commands you used, or what the error messages might have been?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Language shapes the way we think, and determines what we can think about." - B. L. Whorf
Quoted 7 lines
Dear sunr2007,
I asked you before: please make sure to read
http://www.netmeister.org/news/learn2quote.html
and then follow the rules.
Quoted 5 lines
Especially, do not top-post / full-quote.
You may also want to read
http://catb.org/esr/faqs/smart-questions.html
Dear wolfgang denk,
please review and let me know if this is right way of posting. thanks for both the links. yeah sorry about top posting full quote . Now im trying to follow those rules in the links which u have given to me.
Quoted 2 lines
How do you expect us to help when all information you provide is "the compiler gave errors"? Do you think we can guess what your code looks
l>ike, which commands you used, or what the error messages might have
Quoted 1 line
been?
Now im writing in detail what im trying to do. all i want to do is compile the file in /drivers/spi/atmel_spi.c which is nothin but initialize the SPI controller in u-boot for my board AT91SAM9261. so i added the lines #define CONFIG_ATMEL_SPI 1
#define CONFIG_CMD_SPI 1
in my config file which is located at /include/configs/at91sam9261ek.h
but as i said i got a error which im posting below . may i know what is going wrong? thanks for those links again.
this is error i got when i was compiling uboot.
make -C drivers/spi/
make[1]: Entering directory `/home/ravikulkarni/dasuboot_airforce/u-boot-1.3.4/drivers/spi' /opt/timesys/toolchains/armv5l-linux/bin/armv5l-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -malignment-traps -D__KERNEL__ -DTEXT_BASE=0x27D00000 -I/home/ravikulkarni/dasuboot_airforce/u-boot-1.3.4/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/timesys/toolchains/armv5l-linux/lib/gcc/armv5l-linux/3.4.1/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -mapcs-32 -march=armv5te -mtune=arm926ejs -Wall -Wstrict-prototypes -c -o atmel_spi.o atmel_spi.c atmel_spi.c: In function `spi_setup_slave':
atmel_spi.c:51: error: `SPI0_BASE' undeclared (first use in this function) atmel_spi.c:51: error: (Each undeclared identifier is reported only once atmel_spi.c:51: error: for each function it appears in.) atmel_spi.c:73: warning: implicit declaration of function `get_spi_clk_rate' make[1]: *** [atmel_spi.o] Error 1
make[1]: Leaving directory `/home/ravikulkarni/dasuboot_airforce/u-boot-1.3.4/drivers/spi'
make: *** [drivers/spi/libspi.a] Error 2
I'm thinking we have to write an init function in the file
/board/atmel/at91sam9261ek/at91sam9261ek.c defining which pins and all? am i right?
warm regards,
Ravi Kulkarni.
_______________________________________________
Signature · 2 lines
View this message in context: http://www.nabble.com/how-to-enable-various-command-support-in-u-boot-1.3.4--tp25236687p25254451.html Sent from the Uboot - Users mailing list archive at Nabble.com.