I have built images for intel Edison board using edison supported buildroot on ubuntu 17.10 (64 bit).
I followed following steps
1 . make edison_defconfig.
2 . make
and Images are installed in output/images.
But when I tried to flash u-boot on board using This Link,
3 . Then I did truncate -s %4096 u-boot.bin in output/images
4 . dfu-util -v -d 8087:0a99 --alt u-boot0 -D u-boot.bin
5 . run do_force_flash_os on board
I am able to flash the u-boot on board successfully.
But board is not booting up with new u-boot .
What is process to use images built from buildroot ?
How to flash bzImage and .img file on board from output/images ?
Related
I ran Gstreamer tutorial's example code in both my own 2 computers.
One PC was install Ubuntu 20.04.2, GPU Nvidia GTX 1050Ti
And the remain one (i.e laptop) was install Ubuntu 18.04.5, with NVIDIA GeForce GTX 950M
And the result when built successfully ./basic-tutorial-1 was:
the ubuntu 20 PC can show the video in the display.
but the ubuntu 18 laptop is not display anything, or even any error logs.
Is there any Gstreamer's problem relate to OS.
There might be an issue with installation:
try:
sudo apt install gstreamer1.0-tools
sudo apt install gstreamer1.0-plugins-base
I install qemu-system-arm in Ubuntu 16.04 to run firmware of dlink DIR868L. But when I use the command chroot ./squashfs-root/ /bin/sh, it just shows Illegal instruction. I get squashfs-root/from DIR868LB1_FW203b01.bin by binwalk and I am sure that /bin/sh exists in squashfs-root/.
I start qemu by sudo qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -hda debian_squeeze_armel_standard.qcow2 -append "root=/dev/sda1" -net nic -net tap and use scp to cpoy squashfs-root/ into virtual mechine. And I met the same problem when using debian_wheezy_armel_standard.qcow2
What should I do ? It has bothered me for the whole afternoon.
Or can anyone give me an example to run the arm firmware in qemu ? I only find lots of examples using firmware based on mips.
Thanks a lot !
The problem is almost certainly because whatever CPU is in the DIR868lL is newer than the ARM926 CPU that the "versatilepb" board has. If the binaries from that firmware are built to use newer instructions, then running them in an emulation of an older CPU will result in an 'illegal instruction' signal, just as if you'd run them on real older ARM hardware.
This is similar to taking binaries that were built for a Core2 Duo and trying to run them on your old Pentium system: it won't work.
I'm trying to play with QEMU, especially with the virt board and device trees, but there isn't much documentation about it.
I managed to emulate a vexpress a9 board and install archlinux on it, mainly thanks to this link, with the following commands:
wget http://archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz
mkdir archlinux_arm_root
bsdtar -xpf ArchLinuxARM-armv7-latest.tar.gz -C archlinux_arm_root
qemu-img create -f raw disk_img.img 1G
mkfs.ext4 -F disk_img.img
sudo mkdir /mnt/root
sudo mount -o loop disk_img.img /mnt/root
sudo cp -rf archlinux_arm_root/* /mnt/root/
sudo umount /mnt/root
cp archlinux_arm_root/boot/zImage zImage
cp archlinux_arm_root/boot/dtbs/vexpress-v2p-ca9.dtb device_tree.dtb
qemu-system-arm -m 1024M -M vexpress-a9 -cpu cortex-a9 -kernel zImage -dtb device_tree.dtb -append "root=/dev/mmcblk0 rw roottype=ext4 console=ttyAMA0" -drive if=sd,driver=raw,cache=writeback,file=disk_img.img -nographic
I created a raw disk image, then manually installed archlinux (by mounting the disk image and copying the root file system of arch on it).
The command to emulate the board and boot on arch specifies the machine/cpu/kernel/device tree/disk image to use. The -drive option defines a new drive, and since it's an SD one I need to tell qemu to use /dev/mmcblk0 with -append. Please correct me if I said anything incorrect.
Firstly I simply want to emulate this machine without using the sd interface, but somehow just can't manage to do so.
But more importantly I'd like to emulate a virt board.
You can't really run the vexpress-a9 board without using the SD interface, because that is the only interface that hardware has for block devices, so your choices are "SD" or "no block device at all".
Our documentation for running Arm guests on QEMU is here https://wiki.qemu.org/Documentation/Platforms/ARM and that page links to a tutorial for booting Debian on the 'virt' board for 64-bit guests: https://translatedcode.wordpress.com/2017/07/24/installing-debian-on-qemus-64-bit-arm-virt-board/ and one for 32-bit guests: https://translatedcode.wordpress.com/2016/11/03/installing-debian-on-qemus-32-bit-arm-virt-board/ so I would start with whichever of those you want.
I'm going through a course on gdb. In the later lessons the course covers debugging on ARM architecture, so I'm presented a setup that allows me to emulate such situation.
My current setup comprises:
Windows 10: physical host
Ubuntu 12.04.5 LTS: guest os via Oracle Virtual Box on Windows 10
Linux debian-armel 2.6.32-5-versatile: guest os via qemu 2.8.0 on Ubuntu
The ARM Debian image comes from https://people.debian.org/~aurel32/qemu/armel/
The image is launched with
qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -hda debian_squeeze_armel_standard.qcow2 -append "root=/dev/sda1" -m 256 -redir tcp:2222::22
I modified the sources.list and apt.conf to allow apt to work, since the distro is quite outdated. I updated and upgraded and installed gcc and gdb.
The problem arises when trying to debug; I can load executables in gdb:
root#debian-armel:~/video-11/video-11# file ./main
./main: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
but when I try to run it inside gdb, I receive this message and the execution hangs, until I'm able to kill the gdb process from another console:
------------[ cut here ]------------
WARNING: at /build/linux-2.6-fIxTVd/linux-2.6-2.6.32/debian/build/source_armel_none/kernel/sched.c:2628 wake_up_process+0x2c/0x48()
Modules linked in: loop sg smc91x sr_mod mii cdrom psmouse evdev ext3 jbd mbcache sd_mod crc_t10dif sym53c8xx scsi_transport_spi scsi_mod
[<c002b068>] (unwind_backtrace+0x0/0xdc) from [<c0046f88>] (warn_slowpath_common+0x4c/0x80)
[<c0046f88>] (warn_slowpath_common+0x4c/0x80) from [<c00446f0>] (wake_up_process+0x2c/0x48)
[<c00446f0>] (wake_up_process+0x2c/0x48) from [<c0026930>] (arch_ptrace+0x214/0x4bc)
[<c0026930>] (arch_ptrace+0x214/0x4bc) from [<c00508d8>] (sys_ptrace+0x9c/0x164)
[<c00508d8>] (sys_ptrace+0x9c/0x164) from [<c0024ec0>] (ret_fast_syscall+0x0/0x28)
---[ end trace 98ab50bc781b314f ]---
How can I resolve this issue?
Not my answer, but to enable the question to be marked as closed:
This is likely a bug in the guest kernel (though not certainly so), so
I would start by trying with a more recent kernel than 2.6.32, which
is now nearly 8 years old. – Peter Maydell Mar 3 '17 at 13:14
I'm working on creating file that I can load with -kernel option of qemu. I mostly mind here u-boot config file that I have found information should be placed somewhere in file. That file have to contain u-boot binary, freebsd kernel and RTOS to run ( so i can choose which kernel to load or do some experimental developement in loading 2 OS at same time - eg. FreeBSD is loaded by u-boot and then FreeBSD loads FreeRTOS on 2nd core - so called ASMP ). It seems there is no tools around to do that in automatic way ( I mean supporting multiple kernels in one flash file ). So I need to know how is u-boot flash file structured to make my own and pass it to qemu emulating am versatilepb.
qemu-system-arm -M versatilepb -m 128M -nographic -kernel myflashfile
So the answer here depends in part on the board you are emulating with QEMU. Next, unfortunately the versatilepb has been dropped from mainline U-Boot some time ago (and being ARM926EJS it is not the ideal core for ASMP, you may wish to try vexpress a9 instead). Now, all of that said, you want -pflash to pass along a binary file you control the contents of as the parallel flash device used by the machine. And you lay that out however you like since you're still using -kernel u-boot.bin to boot the machine. You may however find it easier to use -tftp /some/dir and load the files via the network instead.