<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Ok, I have narrowed the problem to something with the compilation of the kernel. I think it's more an incompatibility between xilinx and linux patches, because the kernel fails to boot even if build by hand from the build_dir.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I will try to split the patch in more digestible parts, and see if I catch the error... Or maybe disable the openwrt patches and see where they can be colliding.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 1:24 AM, Javier Domingo Cansino <span dir="ltr"><<a href="mailto:javierdo1@gmail.com" target="_blank">javierdo1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">After hitting against this wall for a lot, I found a bug in my few lines of code, I was creating the uImage file from vmlinux instead of from zImage[1].</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I am still doing something wrong, because substituting the uImage generated from buildroot in the SD card (and leaving the rest of the files), makes at least the kernel boot, although crashes in sec 0.000000, at least prints booting.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I have discovered that after "Starting kernel ..." there should be a "Uncompressing Linux... done, booting the kernel." line. So I am still doing something wrong on the uImage generation, and I don't know what.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Moreover, I have compiled the uImage like the following, and it get's to the kernel panic at least:</div><div class="gmail_default"><font face="arial, helvetica, sans-serif">make -j9 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm CROSS_COMPILE=" /home/javier/proyectos/master/master-sce/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-" LOADADDR="0x8000" uImage</font><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">If you could tell me which should be the Image/BuildKernel part, I would be really appreciate it.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">target/linux/zynq/image/Makefile</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">===</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><pre style="color:rgb(0,0,0)">include $(TOPDIR)/<a href="http://rules.mk" target="_blank">rules.mk</a>
include $(INCLUDE_DIR)/<a href="http://image.mk" target="_blank">image.mk</a>
define Build/Compile
$(call Build/Compile/Default, zynq_zed.dtb)
endef
define Image/BuildKernel/Initramfs
(cd $(TARGET_DIR); \
find . | cpio -o -H newc | gzip -9 >$(KDIR)/zedboard-rootfs.cpio.gz )
mkimage -A arm -T ramdisk -C none -d $(KDIR)/zedboard-rootfs.cpio.gz \
$(BIN_DIR)/zedboard-uramdisk.image.gz
endef
define Image/BuildKernel
mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 \
-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
-d $(LINUX_DIR)/arch/arm/boot/zImage $(BIN_DIR)/zedboard-uImage
endef
define Image/Prepare
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
$(LINUX_DIR)/arch/arm/boot/dts/zynq-zed.dts > $(BIN_DIR)/zedboard.dtb
endef
$(eval $(call BuildImage))</pre><pre style="color:rgb(0,0,0)">===</pre></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">[1] Bug I should have found a lot of time ago: <a href="https://github.com/txomon/openwrt/commit/5e882bc2f14580f62a6ad78ddc57033d207261f9" target="_blank">https://github.com/txomon/openwrt/commit/5e882bc2f14580f62a6ad78ddc57033d207261f9</a></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Cheers</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Sun, Jun 29, 2014 at 1:35 PM, Javier Domingo Cansino <span dir="ltr"><<a href="mailto:javierdo1@gmail.com" target="_blank">javierdo1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I have manually executed the boot sequence in the uboot, and the result is that it fails on the command bootm loados. Any idea on how to debug what can be wrong?</div>
<div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Cheers and I will keep searching,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
<br clear="all" style="font-family:arial"><div style="font-family:arial">Javier Domingo Cansino</div></div><div class="gmail_default"><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">zynq-uboot> fatload mmc 0 0x3000000 uImage</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">reading uImage</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">4582152 bytes read in 405 ms (10.8 MiB/s)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">zynq-uboot> fatload mmc 0 0x2A00000 devicetree.dtb</font></div><span>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">reading devicetree.dtb</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">2739 bytes read in 15 ms (177.7 KiB/s)</font></div>
</span><div class="gmail_default"><font face="arial, helvetica, sans-serif">zynq-uboot> fatload mmc 0 0x2000000 uramdisk.image.gz</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">reading uramdisk.image.gz</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">796339 bytes read in 87 ms (8.7 MiB/s)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">zynq-uboot> help bootm</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">bootm - boot application image from memory</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">Usage:</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">bootm [addr [arg ...]]</font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif"> - boot application image stored in memory</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> passing arguments 'arg ...'; when booting a Linux kernel,</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> 'arg' can be the address of an initrd image</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> When booting a Linux kernel which requires a flat device-tree</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> a third argument is required which is the address of the</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> device-tree blob. To boot that kernel without an initrd image,</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> use a '-' for the second argument. If you do not pass a third</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> a bd_info struct will be passed instead</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">For the new multi component uImage format (FIT) addresses</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> must be extened to include component or configuration unit name:</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> addr:<subimg_uname> - direct component image specification</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> addr#<conf_uname> - configuration specification</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> Use iminfo command to get the list of existing component</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> images and configurations.</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default">
<font face="arial, helvetica, sans-serif">Sub-commands to do part of the bootm sequence. The sub-commands must be</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">issued in the order below (it's ok to not issue all sub-commands):</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> start [addr [arg ...]]</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> loados - load OS image</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> ramdisk - relocate initrd, set env initrd_start/initrd_end</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> fdt - relocate flat device tree</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> cmdline - OS specific command line processing/setup</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> bdt - OS specific bd_t processing</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> prep - OS specific prep before relocation or go</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> go - start OS</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">zynq-uboot> bootm start 0x3000000 0x2000000 0x2A00000</font></div><span><div class="gmail_default"><font face="arial, helvetica, sans-serif">## Booting kernel from Legacy Image at 03000000 ...</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> Image Name: ARM OpenWrt Linux-3.13.7</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> Image Type: ARM Linux Kernel Image (uncompressed)</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> Data Size: 4582088 Bytes = 4.4 MiB</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> Load Address: 80000000</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> Entry Point: 80000000</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> Verifying Checksum ... OK</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">## Loading init Ramdisk from Legacy Image at 02000000 ...</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> Image Name:</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> Image Type: ARM Linux RAMDisk Image (uncompressed)</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> Data Size: 796275 Bytes = 777.6 KiB</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> Load Address: 00000000</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"> Entry Point: 00000000</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> Verifying Checksum ... OK</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">## Flattened Device Tree blob at 02a00000</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> Booting using the fdt blob at 0x2a00000</font></div></span><div class="gmail_default"><font face="arial, helvetica, sans-serif">zynq-uboot> bootm loados</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"> Loading Kernel Image ...</font></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div>Javier Domingo Cansino</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Javier Domingo Cansino</div>
</div>