Comments (8)
Hi,
What toolchain your are using? I've just tried CodeSourcery arm2010q1 arm-none-eabi and it builds fine.
BTW - "official" way to build U-Boot is with arm-uclinuxeabi toolchain. For U-Boot it doesn't matter, though.
Regards,
Sergei
from u-boot.
Hi, I've try with "(Sourcery G++ Lite 2011.03-46) arm-uclinuxeabi" and with arm-2011-09.
The problem is at line 7 of the generated u-boot.lds at the MEMORY section as shown:
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
MEMORY
{
NVM (r): ORIGIN = , LENGTH = <-------- this is line 7
RAM (rw): ORIGIN = , LENGTH =
RAM_BUF (r): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH =
MALLOC (r): ORIGIN = ORIGIN(RAM_BUF) + LENGTH(RAM_BUF), LENGTH =
STACK (r): ORIGIN = ORIGIN(MALLOC) + LENGTH(MALLOC), LENGTH =
}
I think this is the line generating the u-boot.lds file:
arm-uclinuxeabi-gcc -E -g -Os -g2 -mthumb -mcpu=cortex-m3 -fsigned-char -O2 -fno-builtin-puts -fno-common -ffixed-r8 -D__KERNEL__ -I/home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/include -fno-builtin -ffreestanding -isystem /home/mzee/CodeSourcery/Sourcery_G++Lite/bin/../lib/gcc/arm-uclinuxeabi/4.5.2/include -pipe -DCONFIG_ARM -D__ARM_ -DCONFIG_MEM_NVM_BASE= -DCONFIG_MEM_NVM_LEN= -DCONFIG_MEM_RAM_BASE= -DCONFIG_MEM_RAM_LEN= -DCONFIG_MEM_RAM_BUF_LEN= -DCONFIG_MEM_MALLOC_LEN= -DCONFIG_MEM_STACK_LEN= -I/home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/cpu/arm_cortexm3 -include /home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/include/u-boot/u-boot.lds.h -ansi -D__ASSEMBLY__ -P - </home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/cpu/arm_cortexm3/u-boot.lds >u-boot.lds
Thanks
from u-boot.
Hi,
The reason of the failure is that the respective #define-s are not defined in the board's config file, see in your snippet above:
...
DCONFIGMEM_NVM_BASE= -DCONFIG_MEM_NVM_LEN= -DCONFIG_MEM_RAM_BASE= -DCONFIG_MEM_RAM_LEN= -DCONFIG_MEM_RAM_BUF_LEN= -DCONFIG_MEM_MALLOC_LEN=
..
What u-boot configuration are you using for the Actel A2F500 board? You should use "make a2f-actel-dev-brd_config" before running "make".
Regards,
Sergei
from u-boot.
Hi, I did manage to have a successful build after I switch to a different OS which was Debian Squeeze. The OS I was using that was causing the above error was Linux Mint 10,I was getting the following command line warning that i think resulted to the error:
/home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/include/configs/a2f-actel-dev-brd.h:95:0: warning: "CONFIG_MEM_NVM_BASE" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
/home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/include/configs/a2f-actel-dev-brd.h:96:0: warning: "CONFIG_MEM_NVM_LEN" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
/home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/include/configs/a2f-actel-dev-brd.h:98:0: warning: "CONFIG_MEM_RAM_BASE" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
/home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/include/configs/a2f-actel-dev-brd.h:99:0: warning: "CONFIG_MEM_RAM_LEN" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
/home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/include/configs/a2f-actel-dev-brd.h:100:0: warning: "CONFIG_MEM_RAM_BUF_LEN" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
/home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/include/configs/a2f-actel-dev-brd.h:101:0: warning: "CONFIG_MEM_MALLOC_LEN" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
/home/mzee/kernel/uboot/EmcraftSystems-u-boot-3f592e1/include/configs/a2f-actel-dev-brd.h:102:0: warning: "CONFIG_MEM_STACK_LEN" redefined [enabled by default]
:0:0: note: this is the location of the previous definition
But in Debian these warning were not there.I do not know the reason,But I'll Continue using Debian.
Thanks
from u-boot.
I suffer from this bug too.
I am using the (up-to-date) Open Embedded toolchain on debian wheezy to compile u-boot.
I also configured before making.
u-boot.lds:9: nonconstant expression for origin
This is how the top of my u-boot.lds looks:
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
MEMORY
{
NVM (r): ORIGIN = (0x00000000 + 0x0), LENGTH = ((96 * 1024) - 0x0)
RAM (rw): ORIGIN = 0x20000000, LENGTH = (32 * 1024)
RAM_BUF (r): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH = (1 * 1024)
MALLOC (r): ORIGIN = ORIGIN(RAM_BUF) + LENGTH(RAM_BUF), LENGTH = (27 * 1024)
STACK (r): ORIGIN = ORIGIN(MALLOC) + LENGTH(MALLOC), LENGTH = (4 * 1024)
}
I tried compilation of several boards, also with a different toolchains, but I get the same result.
I wonder if this bug is related to the older u-boot version you are using.
from u-boot.
Hello,
We are aware of this issue. Since we are using the older CodeSourcery
toolchain, the current linker script works for us.
Unless we switch to the newer toolchain we have no plans to fix
this issue.
Consider to compare the linker script with the one from the current
U-Boot from denx.de, for the similar target board. Much probably is a
minor syntax change required to get it working.
Regards,
Sergei Poselenov,
Emcraft Systems
On Wed, 02 Oct 2013 02:20:16 -0700
tijs14tijs [email protected] wrote:
I suffer from this bug too.
I am using the (up-to-date) Open Embedded toolchain on debian wheezy
to compile u-boot. I also configured before making.u-boot.lds:9: nonconstant expression for origin
This is how the top of my u-boot.lds looks:OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
MEMORY
{
NVM (r): ORIGIN = (0x00000000 + 0x0), LENGTH = ((96 * 1024) - 0x0)
RAM (rw): ORIGIN = 0x20000000, LENGTH = (32 * 1024)
RAM_BUF (r): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH = (1 * 1024)
MALLOC (r): ORIGIN = ORIGIN(RAM_BUF) + LENGTH(RAM_BUF), LENGTH = (27
- STACK (r): ORIGIN = ORIGIN(MALLOC) + LENGTH(MALLOC), LENGTH =
(4 * 1024) }I tried compilation of several boards, also with a different
toolchains, but I get the same result. I wonder if this bug is
related to the older u-boot version you are using.
Reply to this email directly or view it on GitHub:
#1 (comment)
from u-boot.
MEMORY
{
NVM (r): ORIGIN = NVM_BASE,
LENGTH = NVM_LEN
RAM (rw): ORIGIN = CONFIG_MEM_RAM_BASE,
LENGTH = CONFIG_MEM_RAM_LEN
RAM_BUF (r): ORIGIN = CONFIG_MEM_RAM_BASE + CONFIG_MEM_RAM_LEN,
LENGTH = CONFIG_MEM_RAM_BUF_LEN
MALLOC (r): ORIGIN = CONFIG_MEM_RAM_BASE + CONFIG_MEM_RAM_LEN + CONFIG_MEM_RAM_BUF_LEN,
LENGTH = CONFIG_MEM_MALLOC_LEN
STACK (r): ORIGIN = CONFIG_MEM_RAM_BASE + CONFIG_MEM_RAM_LEN + CONFIG_MEM_RAM_BUF_LEN + CONFIG_MEM_MALLOC_LEN,
LENGTH = CONFIG_MEM_STACK_LEN
#if defined(CONFIG_MEM_RAMCODE_BASE) && defined(CONFIG_MEM_RAMCODE_LEN)
RAMCODE (rw): ORIGIN = CONFIG_MEM_RAMCODE_BASE,
LENGTH = CONFIG_MEM_RAMCODE_LEN
#endif
}
this is ok for link
from u-boot.
Yes of course, in the origin I add up 0x00000000 + 0x0, but I should have added up constants with these values instead. Thanks for posting the solution blueskycoco.
from u-boot.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from u-boot.