From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ladislav Michl Date: Wed, 7 Sep 2005 10:29:46 +0200 Subject: [U-Boot-Users] mtdparts In-Reply-To: <20050906194708.B3F64352B3A@atlas.denx.de> References: <20050906180248.GA5160@orphique> <20050906194708.B3F64352B3A@atlas.denx.de> Message-ID: <20050907082946.GA19256@orphique> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Sep 06, 2005 at 09:47:08PM +0200, Wolfgang Denk wrote: > > In above scheme my custom part function allowed only chpart [34], so it > > was not even possible to change partition to evn sector for example. > > Ummm... I can understand what you mean, but this is not how things > normally are done in a UNIX environment. It seems a very arbitrary > restriction to me, which I wouldn;t like if I was working on such a > system. Ack. I have no strong requirement for such feature. > > Moreover it was pretty easy to construct kernel command line this way: > > setenv bootargs '$bootargs root=/dev/mtdblock$partition ro rootfstype=jffs2' > > What prevents you from doing the same now? Previously I did it in environment: if test -n $swapos; then if test $ospart -eq 0; then chpart 4; else chpart 3; fi; setenv swapos; saveenv; else if test $ospart -eq 0; then chpart 3; else chpart 4; fi; fi flashargs=run setpart; fixroot; setenv bootargs $bootargs \ root=/dev/mtdblock$partition ro rootfstype=jffs2 fboot=run flashargs;fsload;bootm This no longer possible, because $partiton is nand0,1 now, so finding corresponding Linux device is more tricky. For now I solved it in C by writing new command which does the trick. Hush doesn't support 'eval' nor something like echo $fs`echo $ospart` where fs0=/dev/mtdblock3 and fs1=/dev/mtdblock4, so it's hard to do it using builtin commands. In case I'm the only one who needs something like this, I'm perfectly fine with my current solution. Best regards, ladis