Fixed
Created: Aug 10, 2014
Updated: Dec 3, 2018
Resolved Date: Oct 28, 2014
Found In Version: 6.0
Fix Version: 6.0.0.14
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Userspace
mcopy: command not found when make usb-image on Fedora18
Try to make usb-image on fedora18, it failed with mcopy command not found. Please see log below:
#======Create partition 1======
# Create FAT 16 partition - 68156928 - 1048576 + 512 = 67108864
dd if=/dev/zero of=/build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/img_tmp.1 bs=67108864 count=1
# OUTPUT: 1+0 records in
# OUTPUT: 1+0 records out
# OUTPUT: 67108864 bytes (67 MB) copied, 0.428033 s, 157 MB/s
mkdosfs /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/img_tmp.1
# OUTPUT: mkdosfs 3.0.16 (01 Mar 2013)
syslinux /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/img_tmp.1
# OUTPUT: sh: mcopy: command not found
# OUTPUT: syslinux: failed to create ldlinux.sys
# Copying files
mcopy -o /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/layers/wrlcompat/data/syslinux/help.txt /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/layers/wrlcompat/data/syslinux/splash.lss /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/layers/wrlcompat/data/syslinux/splash.txt m:
mcopy -o /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/host-cross/usr/share/syslinux/isolinux.bin /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/host-cross/usr/share/syslinux/vesamenu.c32 /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/host-cross/usr/share/syslinux/menu.c32 /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/syslinux.cfg m:
mcopy -o /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/intel-xeon-core-bzImage-WR5.0.1.5_preempt-rt m:vmlinuz
mcopy -o /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/layers/wrlcompat/data/syslinux/busybox-initrd-static m:initrd
#======Create partition 2======
# Modify rootfs
cd export/dist && ENV_FORCE_RW_USB=force /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/scripts/fakestart.sh sh /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/layers/wrlcompat/data/syslinux/readonly_root/fs_final.sh
./scripts/fakestart.sh genext2fs -z -b 627712 -d export/dist /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/img_tmp.2
e2label /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/img_tmp.2 wr_usb_boot
#======Create final image======
cat /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/img_tmp.0 /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/img_tmp.1 /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/img_tmp.2 > /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/usb.img
# Image created: /build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std/export/usb.img
:/build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std$ host-cross/usr/bin/qemu-system-x86_64 -boot c -drive file=$PWD/export/usb.img
:/build/5015lx02/06271717-boot_kvm_host_from_usb/combo1-intel-xeon-core-preempt-rt-glibc-std$ host-cross/usr/bin/qemu-system-x86_64 -boot c -drive file=$PWD/export/usb.img
usb.img was created, but fails to boot up.
Expected Behavior
======================
usb.img works well on Fedora18
Observed Behavior
======================
N/A
Logs
======================
N/A
Misc Info
======================
N/A
install mtools on fedora
1. /WR5015LX02/wrlinux-5/wrlinux/configure --enable-board=intel-xeon-core --enable-rootfs=glibc_std --enable-kernel=preempt_rt --enable-parallel-pkgbuilds=5 --enable-jobs=5 --with-sstate-dir=/5015lx02/PUBLIC_SSTATES/intel-xeon-core --with-rcpl-version=0005
2. make all && make usb.img
3. host-cross/usr/bin/qemu-system-x86_64 -boot c -drive file=$PWD/export/usb.img