* [cmd] clarification on syntax of 'chpart' command
@ 2021-05-05 7:58 Adarsh Babu Kalepalli
2021-05-07 6:45 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Adarsh Babu Kalepalli @ 2021-05-05 7:58 UTC (permalink / raw)
To: u-boot
Hi,
u-boot version: U-Boot 2021.07-rc1
Board: Beaglebone Black
I was trying to verify and use 'chpart' command on Beaglebone black with an
SDHC card ( with multiple partitions ) and am unable to get its exact
syntax.Is this command applicable to
any particular category of storage devices (viz. NOR flash,NAND flash etc)??
I tried using it as in its "help output" and also other combinations,
Am I missing anything,Please suggest its correct usage.
--------------------------------------------------------------------------------------------
Output Log from U-boot shell:
----------------------------------------
=> mmc list
OMAP SD/MMC: 0 (SD)
OMAP SD/MMC: 1
=> mmc dev 0
switch to partitions #0, OK
mmc0 is current device
=> mmc part
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 2048 524288 11d09956-01 0c Boot
2 526336 524288 11d09956-02 0c
3 1050624 524288 11d09956-03 83
4 1574912 524288 11d09956-04 83
=> chpart mmc0:2
Device nand0 not found!
=> chpart mmc0:3
Device nand0 not found!
=> chpart mmc2
Device nand0 not found!
=> chpart
Device nand0 not found!
=> help chpart
chpart - change active partition
Usage:
chpart part-id
- change active partition (e.g. part-id = nand0,1)
=>
=> chpart part-id=mmc0
Device nand0 not found!
=> chpart part-id=mmc1
Device nand0 not found!
=> chpart part-id = mmc1
chpart - change active partition
Usage:
chpart part-id
- change active partition (e.g. part-id = nand0,1)
=>
---------------------------------------------------------------------------------------------
Regards,
Adarsh
^ permalink raw reply [flat|nested] 2+ messages in thread* [cmd] clarification on syntax of 'chpart' command
2021-05-05 7:58 [cmd] clarification on syntax of 'chpart' command Adarsh Babu Kalepalli
@ 2021-05-07 6:45 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2021-05-07 6:45 UTC (permalink / raw)
To: u-boot
Dear Adarsh,
In message <CAJgxa7eTn4L5Jbg2YbDExPFc1_69viALtW2YQYHj9VsU7xzQbA@mail.gmail.com> you wrote:
>
> I was trying to verify and use 'chpart' command on Beaglebone black with an
> SDHC card ( with multiple partitions ) and am unable to get its exact
> syntax.Is this command applicable to
> any particular category of storage devices (viz. NOR flash,NAND flash etc)??
I agree that it is not obvious from the help output, but the fact
that the chpart command is implemented in the cmd/mtdparts.c source
file gives a clear hint: it works only for MTD devices, not for
general storage devides using DOS (or GPT) partitions.
> => mmc dev 0
> switch to partitions #0, OK
> mmc0 is current device
This is what you should look for. THe help output shoud tell you:
...
mmc dev [dev] [part] - show or set current mmc device [partition]
...
So instead of
> => chpart mmc0:2
> Device nand0 not found!
you would use:
=> mmc dev 0 2
Hope this helps.
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A person without a sense of humor is like a wagon without springs --
jolted by every pebble in the road. - Henry Ward Beecher (1813-1887)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-07 6:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-05 7:58 [cmd] clarification on syntax of 'chpart' command Adarsh Babu Kalepalli
2021-05-07 6:45 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox