How to load Yocto generated U-boot binaries to t1042d4rdb board - linux

I created linux and U-boot images for NXP t1042d4rdb board using Yocto (using bitbake fsl-image-full command) on Ubuntu 16.04.6 . In my "yocto sdk directory"/"build directory"/tmp/deploy/images/t1042d4rdb directory, I have linux images and many binaries for u-boot (like u-boot.bin, u-boot-sdcard.bin, u-boot-nor.bin, u-boot-spi.bin ....).
you can see my /tmp/deploy/images/t1042d4rdb file here
I attached my UART serial converter to /dev/ttyUSB0 using minicom and wrote this command (found it on nxp forum)
"sudo dd if=u-boot.bin of=/dev/ttyUSB0 obs=4066 seek=1; sync"
nothing happened. Console messages from "dmesg" command
[ 4103.366033] ftdi_sio 3-4:1.0: FTDI USB Serial Device converter detected
[ 4103.366053] usb 3-4: Detected FT232RL
[ 4103.370147] usb 3-4: FTDI USB Serial Device converter now attached to ttyUSB
I am new at Yocto and U-boot. My question is, how can I load U-boot linux binaries to my board. Thanks for answers and any other suggestions.

Firstly, you cannot write serial port device (ttyUSB0) directly with dd despite it is not show any error your written data probably disappears because ttyUSB0 device just a communication device.
On Yocto build directory (tmp/deploy/images) you can probably find an .sdcard image file or an .wic image which is combined Linux kernel, U-Boot and Rootfs images. So you need to write this image to related block device that you will use as boot device. In this case you can write this image like this; "dd if= of=/dev/your-sd-card-device bs=1M sync".
I hope it will help your problem.

Related

Difference between wic and hddimg format in yocto

I have generated a core-image-minimal image for my Intel board in Yocto.
Looking into tmp/deploy/images folder they are many images.
I flashed *.wic image using dd command on USB and it created two partitions ( Boot and Platform ) and allowed only to perform a live booting without allowing it to install on the hard disk of the board.
I then flashed *.hddimg on the USB using dd command. It only created a "boot" partition which has rootfs.img, syslinux and EFI folder.
Booting using USB provided me an "Install" option, which installed on the board and when I rebooted after installing, it displays "No bootable media found"
Using bootable image there are two partitions in the hard disk. Why it is not booting..
Steps followed:
Created an minimal yocto image using "bitbake core-image-minimal" command
Flashed the USB using the dd command.
sudo dd if=tmp/deploy/images/intel-corei7-64/core-image-minimal-intel-corei7-64.hddimg of=/dev/sdb
Clicked on install and typed “sda”
The installation was successful and when I tried to restart by removing the USB Drive, it says “No boot options found. Please install bootable media and restart."
What is the mistake I am doing here.
Which image to choose and when..
There was not much info about online, so I asked this question in the intel community and here is the response of that:
Generally a .wic image is intended to be installed directly to its final destination, whereas an hddimg is for evaluation and installation elsewhere.
By default meta-intel .wic images only have an EFI bootloader, and will not boot via legacy BIOS.
An hddimg will have both an EFI bootloader and the syslinux binaries that let it boot from legacy BIOS.
On startup with your installer USB image do you get a light gray screen with four options? If so it is booting via legacy BIOS.

module_platform_driver order and mounting rootf

I am working on some embedded Linux system and I'm trying to run Linux from USB pendrive. I put "root=/dev/sda3 rootwait" to commandline parameters of the Linux but it doesn't recognize the USB at all when it should mount /dev/sda3.
When I try to run from /dev/mmcblk0p2 everything is ok - Linux kernel recognizes this device BEFORE mounting the rootfs. The problem is only when I try to mount USB as a rootfs.
The USB is recognized only when I run the system from initramfs, but it recognized AFTER the rootfs is mounted.
My question is: how can I move initiation of USB subsystem before mounting rootfs?

load routerOS Drivers from USB drive in linux

I'm trying to install routerOS(Mikrotik) from bootable USB drive on my PC.
it boots from USB at first and loads the Linux Kernel.
after detecting the H.D.D it requests me to insert the CD-ROM disk to installing the DRIVERS.
but the drivers are in the USB flash.
i opened the syslinux.cfg and isolinux.cfg files:
default system
label system
kernel linux
append load_ramdisk=1 initrd=initrd.rgz root=/dev/ram0
i'm thinking that the problem is here. it requests to load from CD-ROM.
how can i tell it to load the drivers from USB Flash?
** i've not worked with Linux.
In RouterOS you have 2 method of X86 installs.
CD-ROM ( not USB )
NetInstall
If your BIOS supports net boot and you have a Windows to run NetInstall, try with Mikoritk NetInstall

Can`t find ttyUSB[id]

I have just started with my Raspberry Pi and I have a project where I want to read data from the USB port. I have installed Java JDK8 and written the program that compiles and run. But I get the message that /dev/ttyUSB1 does not exist.
I just have a cable from the USB port on the Arduino going to the USB port on the RPi and I am using Raspbian Debian Wheezy
When I go to DIR /dev/ and use $ ls, I can only find tty0 up to tty63. I have searched on the internet and some say that you can use ttyAMA0, but this does not work. I have also searched for the same problem, but have not found a answer to my problem.
I have used $ lsusb which gave me 4 devices (001-004) on Bus 001. I can see that, for example, my USB keyboard is listed as Bus 001 Device 004: ID 1532:010b Razer USA, Ltd.
and if I run $ dmesg | grep Manufacturer I get that:
[xxxxxxxxx] usb 1-1.2: Manufacturer: Razer
So my question is why does my usb devices not get listed as ttyUSB[id]? Do I have to manually attach it?
I am a bit noob when it comes to Linux.
Hope someone can help me!
I have some bad news for you. The reason you have no /dev/ttyUSB[n] devices on the RPi (when you connect your Arduino) is because you need the Arduino drivers (FTDI drivers in particular). The unfortunate thing is that these drivers don't yet exist for the Arm platform (which includes the RPi). This is according to the FTDI web page showing support. Note the lack of Linux driver support for Arm.
Apparently on Arm running Linux the only way to program the Arduino is via the serial port interface directly via the GPIO pins. Information on doing this can be found here . You will also have to do something similar on the Arduino side see this information.
Once you have the two devices connected via straight serial then your going to probably run into another SNAFU. By default apparently on the RPi Linux will use the serial port for sending debug/console output. In order to use the serial interface for something that behavior has to be modified. This article discusses that. In particular disabling the kernel from using the serial port for terminal use this would seem to apply:
The following steps (based on a clean 2012-07-15-wheezy-raspbian install
Open a terminal on the Raspberry, or connect to Raspberry Pi through SSH.
Make a backup of the /boot/cmdline.txt file.
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt
Edit /boot/cmdline.txt file:
sudo vi /boot/cmdline.txt
This file contains:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 $
Remove the parameters that reference the UART serial port (ttyAMA0):
dwc_otg.lpm_enable=0 console=tty1 $
Comment next line in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Reboot Raspberry Pi
sudo reboot
If you use a different Linux distro than Debian it would be different but the basics would still apply (modifying the kernel command line)

CubieBoard Sound Driver

I'm using CubieBoard 1(A10), it have an Image of Linux Linaro to Run from MicroSD on its DVD. it has the sound drivers for HDMI and AUX Jack. in the "/proc/asound" there are some folders "Card0, Card1, Sun4iCodec, sun4isndhdmi". and I can Play Sounds and get the output from AUX Jack.
the problem is I need to build the kernel of Linux myself, so when I tried, the drivers would not install. I Included all of the sound Drivers in kernel, I tried every thing I could, but it doesn't included the Driver for AUX Jack or HDMI.
Any Idea how to install it?or how can I get the Drivers?
the kernel version of Image on DVD is: "3.0.57" and the version of kernel I use is: "3.4.67"

Resources