* [U-Boot] FDT: Question about embedded fdt enable @ 2012-05-23 7:39 Donghwa Lee 2012-05-30 6:13 ` Simon Glass 0 siblings, 1 reply; 5+ messages in thread From: Donghwa Lee @ 2012-05-23 7:39 UTC (permalink / raw) To: u-boot 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] FDT: Question about embedded fdt enable 2012-05-23 7:39 [U-Boot] FDT: Question about embedded fdt enable Donghwa Lee @ 2012-05-30 6:13 ` Simon Glass 2012-05-30 7:37 ` Donghwa Lee 0 siblings, 1 reply; 5+ messages in thread From: Simon Glass @ 2012-05-30 6:13 UTC (permalink / raw) To: u-boot HI Donghwa, On Wed, May 23, 2012 at 12:39 AM, Donghwa Lee <dh09.lee@samsung.com> 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 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? > 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. > > please reply my question. > > Thank you, > Donghwa Lee > > > Regards, Simon ^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] FDT: Question about embedded fdt enable 2012-05-30 6:13 ` Simon Glass @ 2012-05-30 7:37 ` Donghwa Lee 2012-05-30 14:26 ` Simon Glass 0 siblings, 1 reply; 5+ messages in thread From: Donghwa Lee @ 2012-05-30 7:37 UTC (permalink / raw) To: u-boot On Wed, May 23, 2012 at 15:13, Simon Glass wrote: > HI Donghwa, > > On Wed, May 23, 2012 at 12:39 AM, Donghwa Lee <dh09.lee at samsung.com <mailto:dh09.lee@samsung.com>> 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 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? > > > 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. > > > > please reply my question. > > Thank you, > Donghwa Lee > > > Regards, > 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.o And 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] FDT: Question about embedded fdt enable 2012-05-30 7:37 ` Donghwa Lee @ 2012-05-30 14:26 ` Simon Glass 2012-05-30 16:28 ` Stephen Warren 0 siblings, 1 reply; 5+ messages in thread From: Simon Glass @ 2012-05-30 14:26 UTC (permalink / raw) To: u-boot Hi Donghwa, On Wed, May 30, 2012 at 12:37 AM, Donghwa Lee <dh09.lee@samsung.com> wrote: > On Wed, May 23, 2012 at 15:13, Simon Glass wrote: > > > HI Donghwa, > > > > On Wed, May 23, 2012 at 12:39 AM, Donghwa Lee <dh09.lee@samsung.com<mailto: > dh09.lee at samsung.com>> 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 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? > > > > > > 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. > > > > > > > > please reply my question. > > > > Thank you, > > Donghwa Lee > > > > > > Regards, > > 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.o > > I don't actually see any output here, or any error. What is going wrong, please? > And 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. > 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 > > Thank you, > Donghwa Lee > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] FDT: Question about embedded fdt enable 2012-05-30 14:26 ` Simon Glass @ 2012-05-30 16:28 ` Stephen Warren 0 siblings, 0 replies; 5+ messages in thread From: Stephen Warren @ 2012-05-30 16:28 UTC (permalink / raw) To: u-boot On 05/30/2012 08:26 AM, Simon Glass wrote: > Hi Donghwa, > > On Wed, May 30, 2012 at 12:37 AM, Donghwa Lee <dh09.lee@samsung.com> wrote: ... >> And 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. >> > > 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. 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-05-30 16:28 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-23 7:39 [U-Boot] FDT: Question about embedded fdt enable Donghwa Lee 2012-05-30 6:13 ` Simon Glass 2012-05-30 7:37 ` Donghwa Lee 2012-05-30 14:26 ` Simon Glass 2012-05-30 16:28 ` Stephen Warren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox