From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikolay Dimitrov Date: Fri, 26 Jun 2015 20:44:10 +0300 Subject: [U-Boot] [PATCH] arm: imx: Switch Wandboard to use config_distro_bootcmd.h. In-Reply-To: References: <1427505883-31529-1-git-send-email-vagrant@debian.org> <20150328131538.GG5034@excalibur.cnev.de> <20150329130518.GU32541@bill-the-cat> <87mw10cn9g.fsf@aikidev.net> Message-ID: <558D8F6A.70900@mail.bg> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi XoD, On 06/26/2015 02:54 PM, XoD wrote: > Hello, > I have now tested upstream uboot-imx with OpenELEC with SPL suppport for > wandbard. > > It's work great without your patch. but with your path, OpenELEC don't boot. > > The default uboot config assume than kernel file name is zImage. > But OpenELEC use a filename KERNEL. > The actual version of OpenELEC use a uEnv.txt file with this line : > zImage=/KERNEL > bootfile=/KERNEL > But this no longer work with your patch. > > How I can configure uboot to open a file named KERNEL instead of zImage (at > build time or at runtime) ? config_distro_bootcmd uses a cool feature called "extlinux", which allows you to define a boot configuration without hacking in U-Boot source/configuration. Here's how it works: 1. U-Boot scans a list of boot devices (mmc, usb, pxe, dhcp) 2. When it find a bootable local storage (mmc, usb) it looks for the first bootable partition, or just first one if no partition was marked as bootable 3. U-Boot looks for extlinux.conf in "/" and "/boot". This file contains the actual boot configuration (kernel image, bootargs, etc) that will be executed on boot. Here's how a simple extlinux.conf looks like: -----> cut <----- default linux label linux kernel /boot/zImage devicetree /boot/mydevicetree.dtb append console=ttymxc1,115200 root=/dev/mmcblk0p1 rw -----> cut <----- 4. U-Boot boots the "default" configuration. Hope this helps. Regards, Nikolay