简体   繁体   中英

Documantation error at U-boot for qemu mips

I am trying to emulate some router I found online (just for practice), and this router runs u-boot as a bootloader. I want to understand how to use qemu and u-boot to create a linux-embedded machine.

Inside u-boot there's a doc that explains exactly how to run a linux-embedded system using qemu and u-boot. (u-boot/doc/board/emulation/qemu_mips.rst).

The following quote is stage 6 of that documentation:

Generate Ide Disk

 # dd of=ide bs=1k cout=100k if=/dev/zero

 # sfdisk -C 261 -d ide

 # partition table of ide
 unit: sectors

     ide1 : start=       63, size=    32067, Id=83
     ide2 : start=    32130, size=    32130, Id=83
     ide3 : start=    64260, size=  4128705, Id=83
     ide4 : start=        0, size=        0, Id= 0

To be clear, this is a copy paste from the documentation file.

The problem is, that sfdisk does not have a -C argument, so that the sfdisk command is invalid. Has anyone encountered that and has a solution?

Thanks!

You can use the following commands to create the partitioned disk image:

dd of=ide bs=1k count=100k if=/dev/zero

# Create partion table
sudo sfdisk ide << EOF
label: dos
label-id: 0x6fe3a999
device: image
unit: sectors
image1 : start=       63, size=    32067, Id=83
image2 : start=    32130, size=    32130, Id=83
image3 : start=    64260, size=  4128705, Id=83
EOF

I have posted a patch to correct the documentation:https://lists.denx.de/pipermail/u-boot/2020-January/395133.html

You can download it via the mbox link from https://patchwork.ozlabs.org/patch/1216937

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM