Building Yocto for i.MX8 in an external USB HDD - yocto

I'm trying to build an image using bitbake for the i.MX8 board.
I'm following these instructions:
https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf
Since I do not have enough space in local HDD, I'm using an external USB HDD (I have other unrelated stuff stored in this HDD).
I have been successfull at executing the imx-setup-release.sh script in that document, with which I built a configuration for the imx8mm-lppddr4-evk machine using the fslc-wayland distro.
However, when I try a command, such as "bitbake core-image-minimal", I get several failed tasks. It seems that the common deminator is the fact that, for some reason, when the path to my build folder is passed (which is within the external HDD), it is considered an invalid argument.
I get messages such as this:
OSError: [Errno 22] Invalid argument: '/media/home_dir/427AD2297AD2198D/imx-yocto-bsp/build_fslc_wayland_imx8mm_lpddr_evk/sstate-cache/95/51/sigtask.1jbsd4s4' -> '/media/home_dir/427AD2297AD2198D/imx-yocto-bsp/build_fslc_wayland_imx8mm_lpddr_evk/sstate-cache/95/51/sstate:core-image-minimal:imx8mm_lpddr4_evk-fslc-linux:1.0:r0:imx8mm_lpddr4_evk:3:955169ece771b852dc433575442e7ed805ac56cbcb1ebd3aa913a632da23a46b_clean.tgz.siginfo'.
It seems that bitbake is having trouble parsing the path to my HDD (that 427AD.../ folder).
What should I do to fix this?

The issue was that my HDD was not formatted with an ext4 format. Once I did that, those errors went away.

Related

OS Development. Creating bootable iso from files.

I'm studying OS development and I use brokenthorn resource but with a little bit different tool, namely, I use CentOS, NASM and Qemu as a test/dev environment. I've been facing some issues while creating bootable img file with secondary loader.
I've got two files:
1. bootloader.bin which is first stage loader.
2. stage2.bin which is secondary loader.
In order to create bootable img file I do the following:
dd if=/dev/zero of=floppy.iso bs=1024 count=1440 -- Creating empty file
mkfs.vfat -F 12 floppy.iso --Creating file system in the file
dd if=../bin/bootloader.bin of=floppy.iso bs=512 count=1 conv=notrunc --Writing first loader to the boot sector
sudo mount -o loop floppy.iso /mnt/floppy/ -- Try to mount file system to write secondary loader using previously create FAT-12 files system.
In the last step I'm getting the following error:
mount: /dev/loop0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
Can you please help me to understand what I'm doing wrong and what other ways I can use to accomplish creating bootable img with file system on board.
Thanks!
I once stumbled upon the similar problem and this answer may be of help to you.
However I would strongly recommend you switching to bootloader like Grub and spend time and effort developing the actual OS of yours. For that I would reccomend grub resque as it's simple to use and allows to to quickly create ISO that you can either burn or feed to virtual machine. Otherwise, you may just drown in all these minor things like enabling protected mode, loading your stages and so on.

Invalid token - invalid request BLR at offset 340 function F_LRTRIM is not defined

I am trying to synchronize two Firebird databases with each other. First of all, I already configured that the synchronization will be one-way. Therefore, one database is the Source-DB and the other is the target-DB.
To start a synchronization I use IBReplicator! When I start the synchronization, I get the error:
Exception: Invalid token
invalid request BLR at offset 340
function F_LRTRIM is not defined
module name or entrypoint could not be found
I started searching for the cause of the problem. What I already checked:
.dll files exist in the firebird directory
Firebird version is 32 - bit
IBExpert displays the UDF in the UDF Section of the database.
I read that it could be a problem when there is a mismatch between Firebird Server version and .dll file version. But I don't know how to verify the versions.
And I wanted to search for a .conf file to check the path for the UDF file (.dll) but I didn't find it. I only found the firebird.conf file and I already set the UDFAccess to Full.
I would really appreciate if someone could help me. I wasted a huge amount of time in this problem.
The error means that Firebird can't find the entrypoint or library when the function is executed. This means that
The library can't be found: it is not on the (library) path or in one of the folders listed in the UdfAccess configuration
The library was found, but it is 32 bit and you're running 64 bit (or it's 64 bit and you're running 32 bit)
The library was found, but doesn't have the entrypoint for the UDF.
Your problem seems to be the first, and the solution is to add the location of the UDF to the UdfAccess configuration. Given the comments, you should use
UdfAccess = Restrict UDF
Which will only allow UDF libraries from the UDF directory of your Firebird installation. If needed you can list multiple directories separated by ;.
You should never use UdfAccess = Full, it is unsafe as it can possibly be used to compromise your system with any library on the (library) path of your system.

What is the opposite of `mknod`?

I am learning to write character device drivers from the Kernel Module Programming Guide, and used mknod to create a node in /dev to talk to my driver.
However, I cannot find any obvious way to remove it, after checking the manpage and observing that rmnod is a non-existent command.
What is the correct way to reverse the effect of mknod, and safely remove the node created in /dev?
The correct command is just rm :)
A device node created by mknod is just a file that contains a device major and minor number. When you access that file the first time, Linux looks for a driver that advertises that major/minor and loads it. Your driver then handles all I/O with that file.
When you delete a device node, the usual Un*x file behavior aplies: Linux will wait until there are no more references to the file and then it will be deleted from disk.
Your driver doesn't really notice anything of this. Linux does not automatically unload modules. Your driver wil simply no longer receive requests to do anything. But it will be ready in case anybody recreates the device node.
You are probably looking for a function rather than a command. unlink() is the answer. unlink() will remove the file/special file if no process has the file open. If any processes have the file open, then the file will remain until the last file descriptor referring to it is closed. Read more here: http://man7.org/linux/man-pages/man2/unlink.2.html

PartCopy or bochs configuration failing in windows 7 (32 bit)

I am trying to create a bootloader following this link the things i did are
create a vfd as per given and formatted it.
used partcopy partcopy Boot1.bin 0 200 -f0
then created a config file for bochs emulator.
while bochs emulator loading it is asking for config file when i provide it, emulator stops saying panic
And i also want to know how to know if partcopy is has copied data into floppy. As i try to open the floppy drive after the copy it says format to use( i presume the problem is partcopy only ) .
how can i fix it??
The problem was in configuration file of the bochs.
romimage: file=BIOS-bochs-legacy, address=0xf0000
vgaromimage: file=VGABIOS-lgpl-latest
keep the rom image and vgaromimage in the same place as configuration file. it will work fine .

Using MPI with two RaspberryPi

I am trying to make a 'dual core' RaspberryPi for a project I am working on. I had followed this tutorial by Simon Cox. Unfortunately I could not get the two RasPi to talk to each other. (This was using Hydra as the process manager)
After looking more carefully at the MPICH installers guide, which can be found here, I tried to use the -phrase to pass the passphrase I had created. However I could not find it as part of the hydra commands. So I re-installed with smpd and after many compiling attempts. I configured with:
/configure -prefix=/home/pi/mpich-install --with-pm=smpd --with-pmi=smpd
I also had to install libbsl-dev to get the MD5 that smpd requires. I also exported the path that the commands mpiexec and mpicc are in. After setting the passphrase I copied the image to a second SD card and put it in a second RasPi. I then set up the passphrase using ssh-keygen.
I was able to run the cpi program on the master Pi and the slave Pi individually but when I tried to run multiple processes on both at the same time I got the error
Fatal error in MPI_Init: Other MPI error, error stack:
MPIR_Init``_thread(392).................:
MPID_Init(139)........................: channel initialization failed
MPIDI_CH3_Init(38)....................:
MPID_nem_init(196)....................:
MPIDI_CH3I_Seg_commit(366)............:
MPIU_SHMW_Hnd_deserialize(324)........:
MPIU_SHMW_Seg_open(863)...............:
MPIU_SHMW_Seg_create_attach_templ(637): open failed - No such file or directory
Can someone please suggest how I can either fix this problem or get the RaspberryPis to communicate using MPICH?
Thanks
E.Lee
If anyone else has this problem make sure your hosts don't have the same name!
You can change it by following this tutorial http://raspi.tv/2012/how-to-change-the-name-of-your-raspberry-pi-new-hostname