From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 4 Mar 2011 11:34:41 +0100 Subject: [U-Boot] issue with 'ubi part' In-Reply-To: <4D70BC12.3060904@matrix-vision.de> References: <4D6E63AD.1040101@matrix-vision.de> <201103041100.37867.sr@denx.de> <4D70BC12.3060904@matrix-vision.de> Message-ID: <201103041134.41172.sr@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 Andre, On Friday 04 March 2011 11:16:50 Andre Schwarz wrote: > >> => ubi part root > >> Creating 1 MTD partitions on "nand0": > >> 0x000000000000-0x000040000000 : "mtd=0" > >> UBI: attaching mtd2 to ubi0 > >> UBI error: io_init: unaligned VID header shift 2 > >> UBI error: ubi_init: cannot attach mtd2 > >> UBI error: ubi_init: UBI error: cannot initialize UBI, error -22 > >> UBI init error -22 > >> exit not allowed from main input shell. > >> => > > > > Did you erase the flash partition before trying to attach UBI on it? > > yes - the ubi volume has been created by linux and is working fine : > > ubiformat /dev/NAND -y > ubiattach /dev/ubi_ctrl -m 9 > ubimkvol /dev/ubi0 -N rootfs -m > mount -t ubifs ubi0:rootfs /mnt/nand > > Actually I'm running Linux with rootfs on this very ubi volume. > > All I wanna do is get the kernel + dtb from this volume for stand-alone > boot. > Meanwhile I'm getting both files using tftp from the server - but that's > no long term solution. I have no real idea then why this fails in U-Boot, sorry. What versions of U- Boot and Linux are you using? I suggest you debug a bit, to see where this error results from. > I'm still curious why we get > > 0x000000000000-0x000040000000 : "mtd=0" -> 0 ! > and > UBI error: ubi_init: cannot attach mtd2 -> 2 ! > > > Is this the expected behaviour ? IIRC, it's because the NOR flash partitions are enumerated first. So 2 NOR partitions (0...1) makes the first NAND partition #2. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de