From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 10 Apr 2015 08:07:01 +0200 Subject: [U-Boot] single build of uboot supporting env stored in dynamically detected boot device In-Reply-To: References: Message-ID: <55276885.8070205@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tim, (added Igor to cc) On 10.04.2015 00:58, Tim Harvey wrote: > It seems the U-Boot's env storage is implemented by various types of > storage from common/env_*.c, one (and only one) which is included by > common/Makefile based off of the CONFIG_ENV_IS_IN_* config. > > I want to build a single uboot image which can be installed on one of > several supported boot devices (NAND, SATA, SD for example) and have > the env storage hooked to the device that was detected as the boot > device. Am I correct in assuming this is not currently possible and > that instead I would have to build 3 versions of uboot each with one > type of storage defined? > > If it turns out that this is not currently possible, I'm open to > suggestions on how to rectify it (or if you think I'm crazy for > wanting to have a single uboot image for the above please explain your > reasoning). I'm thinking I would start by making the env_init/saveenv > functions (I believe those are the only ones that need to be > implemented by an env storage subsystem) unique function names, then > creating a wrapper for those functions that call the right one. IIRC, Compulab has such a feature implemented in some of their U-Boot versions. Igor, please either correct me if I'm wrong. Or elaborate how you have implemented this dynamic env feature. Thanks, Stefan