FDT: Question about embedded fdt enable
Dear, Simon Glass
I am preparing device tree in Exynos SoC and had already tested by using CONFIG_OF_SEPARATE. But, I couldn't test by using CONFIG_OF_EMBED because it has a compiler problem to make a binary in the dts/Makefile.
When I had used configuration as seaboard that I had changed configuration from CONFIG_OF_SEPARATE to CONFIG_OF_EMBED, it had a same problem.
How did you test in seaboard as it embedded? Is there any more configuration to compile ebedded option?
please reply my question.
Thank you,
Donghwa Lee
HI Donghwa,
Quoted 6 lines · Donghwa Lee
Dear, Simon Glass
I am preparing device tree in Exynos SoC and had already tested by using
CONFIG_OF_SEPARATE. But, I couldn't test by usingCONFIG_OF_EMBEDbecause it has a compiler problem to make a binary in the dts/Makefile.
Quoted 7 lines
When I had used configuration as seaboard that I had changed configuration from
CONFIG_OF_SEPARATEtoCONFIG_OF_EMBED, it had a same problem.How did you test in seaboard as it embedded? Is there any more configuration
to compile ebedded option?
Can you please send me the compiler output - then I can help with this.
I do use embedded for testing only. But there is an alignment patch which is needed and was NAKed. So it is not reliable at present.
Quoted 8 lines
please reply my question.
Thank you,
Donghwa LeeRegards,
Simon
Quoted 23 lines · Simon Glass
HI Donghwa,
On Wed, May 23, 2012 at 12:39 AM, Donghwa Lee <dh09.lee at samsung.com <mailto:[email protected]>> wrote:
Dear, Simon Glass
I am preparing device tree in Exynos SoC and had already tested by using
CONFIG_OF_SEPARATE. But, I couldn't test by usingCONFIG_OF_EMBEDbecause it has a compiler problem to make a binary in the dts/Makefile.When I had used configuration as seaboard that I had changed configuration from
CONFIG_OF_SEPARATEtoCONFIG_OF_EMBED, it had a same problem.How did you test in seaboard as it embedded? Is there any more configuration to compile ebedded option?
Can you please send me the compiler output - then I can help with this.
I do use embedded for testing only. But there is an alignment patch which is needed and was NAKed. So it is not reliable at present.
Quoted 9 lines
please reply my question.
Thank you,
Donghwa LeeRegards,
Simon
Dear, Simon Glass
Thank you for your reply. Below log is my compiler problem that was stopped while objcopy.
# We want the output format and arch.
# We also hope to win a prize for ugliest Makefile / shell interaction # We look in the LDSCRIPT first.
# Then try the linker which should give us the answer.
# Then check it worked.
oformat=`cat | sed -r -n 's/^OUTPUT_FORMAT[ ("]*([^")]*).*/\1/p'` ;\
oarch=`cat | sed -r -n 's/^OUTPUT_ARCH[ ("]*([^")]*).*/\1/p'` ;\
\
[ -z ${oformat} ] && \
oformat=`/opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x63300000 -I/home/leedonghwa/project/mainline/u-boot-trats/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/../lib/gcc/arm-linux-gnueabi/4.7.1/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -Wl,--verbose 2>&1 | sed -r -n 's/^OUTPUT_FORMAT[ ("]*([^")]*).*/\1/p'` ;\
[ -z ${oarch} ] && \
oarch=`/opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x63300000 -I/home/leedonghwa/project/mainline/u-boot-trats/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/../lib/gcc/arm-linux-gnueabi/4.7.1/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -Wl,--verbose 2>&1 | sed -r -n 's/^OUTPUT_ARCH[ ("]*([^")]*).*/\1/p'` ;\
\
[ -z ${oformat} ] && \
echo "Cannot read OUTPUT_FORMAT from lds file " && \
exit 1 || true ;\
[ -z ${oarch} ] && \
echo "Cannot read OUTPUT_ARCH from lds file " && \
exit 1 || true ;\
\
cd ./ && \
/opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi-objcopy -I binary -O ${oformat} -B ${oarch} \
dt.dtb dt.oAnd I have one more question about passing *.dtb to kernel.
I had make a .dtb binary by using CONFIG_OF_SEPARATE and confirmed normally working in u-boot. When kernel is booting, how could kernel access .dtb binary?
Could kernel access dtb binary by setting /memreserve/ in u-boot .dts file or by using "fdtaddrcontrol" environment variable in u-boot board file?
But, by my result, dt_phys address in setup_machine_fdt() in arch/arm/devtree.c had always indicated only one point regardless of /memreserve/ or fdtcontroladdr.
Thank you,
Donghwa Lee
Hi Donghwa,
Quoted 88 lines · Donghwa Lee
Quoted 3 lines · Simon Glass
HI Donghwa,
On Wed, May 23, 2012 at 12:39 AM, Donghwa Lee <[email protected]<mailto:
Quoted 4 lines · dh09.lee at samsung.com>> wrote:
Dear, Simon Glass
I am preparing device tree in Exynos SoC and had already tested by
using
Quoted 1 line
CONFIG_OF_SEPARATE. But, I couldn't test by usingCONFIG_OF_EMBEDbecause
Quoted 3 lines
it has a compiler problem to make a binary in the dts/Makefile.
When I had used configuration as seaboard that I had changed
configuration
Quoted 3 lines
from
CONFIG_OF_SEPARATEtoCONFIG_OF_EMBED, it had a same problem.How did you test in seaboard as it embedded? Is there any more
configuration
Quoted 6 lines
to compile ebedded option?
Can you please send me the compiler output - then I can help with this.
I do use embedded for testing only. But there is an alignment patch
which is needed and was NAKed. So it is not reliable at present.
Quoted 12 lines
please reply my question.
Thank you,
Donghwa LeeRegards,
SimonDear, Simon Glass
Thank you for your reply. Below log is my compiler problem that was stopped while objcopy.
# We want the output format and arch.
# We also hope to win a prize for ugliestMakefile/ shell interaction # We look in the LDSCRIPT first.
# Then try the linker which should give us the answer.
# Then check it worked.oformat=`cat | sed -r -n 's/^OUTPUT_FORMAT[ ("]*([^")]*).*/\1/p'` ;\ oarch=`cat | sed -r -n 's/^OUTPUT_ARCH[ ("]*([^")]*).*/\1/p'` ;\ \ [ -z ${oformat} ] && \oformat=`/opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi-gcc
(quoted diff) +0
-4-g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x63300000 -I/home/leedonghwa/project/mainline/u-boot-trats/include -fno-builtin -ffreestanding -nostdinc -isystem
/opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/../lib/gcc/arm-linux-gnueabi/4.7.1/include(quoted diff) +0
-3-pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -Wl,--verbose2>&1 | sed -r -n 's/^OUTPUT_FORMAT[ ("]*([^")]*).*/\1/p'` ;\ [ -z ${oarch} ] && \oarch=`/opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi-gcc
(quoted diff) +0
-4-g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x63300000 -I/home/leedonghwa/project/mainline/u-boot-trats/include -fno-builtin -ffreestanding -nostdinc -isystem
/opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/../lib/gcc/arm-linux-gnueabi/4.7.1/include(quoted diff) +0
-3-pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -fstack-usage -Wl,--verbose2>&1 | sed -r -n 's/^OUTPUT_ARCH[ ("]*([^")]*).*/\1/p'` ;\ \ [ -z ${oformat} ] && \ echo "Cannot read OUTPUT_FORMAT from lds file " && \ exit 1 || true ;\ [ -z ${oarch} ] && \ echo "Cannot read OUTPUT_ARCH from lds file " && \ exit 1 || true ;\ \ cd ./ && \
Quoted 5 lines
/opt/tools/gcc-linaro-arm-linux-gnueabi-2012.04-20120426_linux/bin/arm-linux-gnueabi-objcopy
-I binary -O ${oformat} -B ${oarch} \
dt.dtb dt.o
I don't actually see any output here, or any error. What is going wrong, please?
Quoted 11 lines
And I have one more question about passing *.dtb to kernel.
I had make a .dtb binary by usingCONFIG_OF_SEPARATEand confirmed normally working in u-boot.
When kernel is booting, how could kernel access .dtb binary? Could kernel access dtb binary by setting /memreserve/ in u-boot .dts file or by using "fdtaddrcontrol"
environment variable in u-boot board file?
But, by my result,dt_physaddress insetup_machine_fdt()inarch/arm/devtree.chad always indicated only
one point regardless of /memreserve/ or fdtcontroladdr.
Please be very careful - this is a completely separate FDT. The use of CONFIG_OF_CONTROL is for U-Boot's internal configuration only. The same FDT should not be passed to Linux in the normal case. Please continue to use the existing FDT support for passing a .dtb file to the kernel.
So you have an FDT for U-Boot which is available via CONFIG_OF_SEPARATE, and an FDT which U-Boot passes to the kernel, which is read using the normal uImage/Fit image method.
Regards,
Simon
Quoted 5 lines
Thank you,
Donghwa Lee
Quoted 3 lines · Simon Glass
Hi Donghwa,
On Wed, May 30, 2012 at 12:37 AM, Donghwa Lee <[email protected]> wrote:
...
Quoted 12 lines
Quoted 11 lines
And I have one more question about passing *.dtb to kernel.
I had make a .dtb binary by usingCONFIG_OF_SEPARATEand confirmed normally working in u-boot.
When kernel is booting, how could kernel access .dtb binary? Could kernel access dtb binary by setting /memreserve/ in u-boot .dts file or by using "fdtaddrcontrol"
environment variable in u-boot board file?
But, by my result,dt_physaddress insetup_machine_fdt()inarch/arm/devtree.chad always indicated only
one point regardless of /memreserve/ or fdtcontroladdr.
Quoted 8 lines
Please be very careful - this is a completely separate FDT. The use of
CONFIG_OF_CONTROLis for U-Boot's internal configuration only. The same FDT should not be passed to Linux in the normal case. Please continue to use the existing FDT support for passing a .dtb file to the kernel.So you have an FDT for U-Boot which is available via
CONFIG_OF_SEPARATE, and an FDT which U-Boot passes to the kernel, which is read using the normal uImage/Fit image method.
I echo this sentiment.
There is a very strong desire in the kernel community that the .dtb file and the kernel image be stored in similar ways - e.g. they both be stored as files in a /boot filesystem, or both be stored as specific partitions in some flash. The reason for this is so that both the kernel and .dtb image can be updated in the exact same way at the same time, and without changing the bootloader/firmware/... in any way at all. This allows kernel upgrades that rely on .dtb upgrades, and furthermore, it allows that without updating the firmware/bootloader, which may be risky in some cases.