am335x-boneblack-prusuart.dtb is loaded however I cannot find the Serial_Ports or they not enabled - linux-kernel

I want to activate more Serial Ports of the Beaglebone Black. Therfore I tried to activate the PRU-ICSS Soft UART. Firstly I made a new Kernel of the version: 4.19.94. There I configurated in menuconfig:
PRU_REMOTEPROC to built-in.
REMOTEPROC to built-in.
TI_PRUSS to built-in.
SERIAL_PRU_SUART to build-in.
Then i cross-compiled the new Kernel in my old One without any errors.I added to the uEnv.txt:dtb=am335x-boneblack-prusuart.dtb
It booted up correctly with the boneblack-prusuart as device tree.
However i cannot find the Serial Ports or something.
If i do
dmesg | grep tty
i only get shown ttyS0 that i am using to work with the beaglebone black.
If i do
dmesg | grep pru
or
dmesg | grep serial
i get nothing.
I also converted the dtb to a dts file and looked for pru_suart.
There is a pru_suart0 and a pru_suart1.
I noticed that they both need a firmware.
however this file is empty. And nowhere in the internet is something about this file.

Related

GRUB set address kernel is loaded at

How would I go about changing the address GRUB tries to load my kernel at without using the linker?
I would like to do this from GRUB config files.
Boot your machine. When you get to the grub menu press c. You will go into grub prompt.
With ls you can view your devices and partitions. Look through your partitions until you have the correct one.
ls
ls (hd0,gpt1)/
ls (hd0,gpt2)/
ls (hd1,gpt1)/
ls (hd1,gpt2)/
...
Let's assume the files are located at hd0,gpt2 and it is the only USB device -> /dev/sda2. We also assume at the root folder / there is your kernel vmlinuz and an initial ramdisk initrd.img.
Type into your grub prompt:
set root=(hd0,gpt2)
linux /vmlinuz root=/dev/sda2 rootdelay=10
initrd /initrd.img
When your machine boots correctly you can put this into your grub config files.

How to find COM port for PuTTy (Mac)

I am doing a lab for my class using Code Composer Studio and the Tiva Launchpad. I am using a macbook and I have downloaded PuTTy using MacPorts. Now that PuTTy is running I have to type in the serial line to communicate with CCS and the Launchpad.
It is necessary to type in the serial line for connection to work,
PuTTy Serial line
Any help or direction is very appreciated! First time posting sorry if I am unclear at any point.
Here's an easy way to find the device special file for any device.
Unplug the device and reboot your system.
Get a list of all device special files in /tmp/a
ls /dev > /tmp/a
Now plug in your device and wait a few seconds, and get a list of the device special files again, this time in /tmp/b:
ls /dev > /tmp/b
Now compare /tmp/a with /tmp/b:
opendiff /tmp/a /tmp/b # Yes, you could use "opendiff /tmp/[ab]"
Whatever is new in file /tmp/b corresponds to what you plugged in.

Wiping entire usb drive on Mac OS X

Is there a command for the apple terminal to brute force a wipe of everything including all partitions, master boot records, and data on a usb flash drive?
Just a little information about the situation:
I just got a stick from a friend which seems to be damaged but it isnt a physical defect. I guess he just removed the stick while formatting or so.
I already tried to repartition, reformat and erase the stick with the Mac Disc Utility and I tried to format it on windows. Nothing of it worked, so I decided to use terminal for it (im just getting used to terminal/bash, so im a complete newbie at this) and tried the commands (all with sudo and diskutil in front of them ofc) repairDisk, reformat, partitionDisk, eraseDisk or zeroDisk, but nothing worked. Im getting this error message now: Error: -69759: Securely erasing data to prevent recovery failed
Underlying error: 5: POSIX reports: Input/output error
So my final thought is now that I have to clean everything from this drive as it seems there is something broken on a very low level and i would assume that completely wiping it will result in my diskutil to install a complete new partition scheme and everything on the drive so it will eventually start working again..
Thank you all in advance!
Screenshots:
Try this in Terminal if you are CERTAIN it is disk3:
sudo dd if=/dev/zero of=/dev/rdisk3 bs=65536 count=1000
If it says the disk is busy, make it un-busy!
sudo diskutil unmountDisk /dev/disk3
First, check what disk# your usb is (to be certain) in a terminal:
sudo diskUtil list
then
sudo dd if=/dev/urandom of=/dev/<your_usb_disk_here> bs=1m
If you get busy error and/or if the usb is in use elsewhere, stop what you are doing there and unmount it first as Mark Setchell said
sudo diskutil unmountDisk /dev/<your_usb_disk_here>
If you get a funky name from using bootcamp assistant or something, and you cannot get dd or even Disk Utility to wipe it for some reason, like "permission" problem, use:
diskutil eraseVolume HFS+ NAME <your_usb_disk_here>
Note that the last arg is not e.g. /dev/disk2 , but just the last part, disk2

cpio decompression and compression from buildroot

I am successfully able to create and boot a little OS generated from buildroot on my embedded system.
Buildroot generates a cpio.
I decompress it (a working cpio, that boot with no problem )with
cpio -iv < ../rootfs.cpio
in a directory. After that I compress it again with
find . | cpio --quiet -o -H newc > ../rootfs.cpio
that is the command used in buildroot (in cpio.mk:31)
but at this point that cpio do not work anymore. If I compile my kernel with that file I get a kernel panic.
File persmission seems the same. With bcompare I saw that the "re-compressed" file has some additional zero at the end, just before the init script. I've tried to remove them, but at this point the system freeze, maybe there is some CRC check somewhere.
Any ideas?
the point is that I'd like to start from buildroot but I want to add my stuff to that rootfs and then embed it into my kernel.

Make attached media bootable

Good evening everyone! I have been working on this for sometime, but can't figure it out. I am simply trying to get the working bootcode of a bootloader installed on an attached media, but can't figure this out!!! I have tried grub legacy, lilo, and grub2... The host system has it's drive listed as /dev/sda* and the target attached media is listed as /dev/sdb* and is mounted to /mnt/target.
With grub legacy, I was attempting to work with another media (/dev/sdc*, /mnt/source) that already had it installed and tried dirty hacks like:
dd if=/mnt/source/boot/grub/stage1 of=/dev/sdb bs=446 count=1
dd if=/mnt/source/boot/grub/stage2 of=/dev/sdb bs=512 seek=1
This will actually boot into a grub interface where you can enter things like:
root (hd0,0)
setup (hd0)
I get no error messages, but grub will boot to garbage on the screen and then stop.
With lilo, I actually had the package installed and tried to setup (after creating a lilo.conf):
default=Test1
timeout=10
compact
prompt
lba32
backup=/mnt/target/boot/lilo/MBR.hda.990428
map=/mnt/target/boot/lilo/map
install=/mnt/target/boot/lilo/boot.b
image=/mnt/target/boot/vmlinuz
label=Test1
append="quiet ... settime"
initrd=/mnt/target/boot/ramdisks/working.gz
And then from the prompt execute the following:
$ lilo -C /mnt/target/boot/lilo/lilo.conf -b /dev/sdb
Warning: /dev/sdb is not on the first disk
Fatal: Sorry, don't know how to handle device 0x0701
With grub2, I tried something like:
grub-mkconfig -o /mnt/target/boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.0-12-generic
Found initrd image: /boot/initrd.img-3.11.0-12-generic
Found memtest86+ image: /boot/memtest86+.bin
No volume groups found
done
I couldn't even get the above to generate a grub.cfg correctly or in the right spot so I gave up on this one... The entries listed above are for the host system, not the target system.
I can provide any additional information that you guys need to help resolve this problem.
-UPDATE-
After working with the media a bit longer, I decided to run an 'fdisk -l' and was presented with the following info:
Partition 1 has different physical/logical beginnings (non-Linux?):
phys(0,32,33) logical(0,37,14)
Partition 1 has different physical/logical endings:
phys(62,53,55) logical(336,27,19)
I should also note that when I try to mount the partition I always get a message that states:
EXT4-fs (sdb1): couldn't mount as ext3 due to feature incompatibilities
Not sure if that is just specific to busybox, or if that is related to the fdisk output. Anyhow, I don't know if the fdisk info is indicating that there may be a problem with the disk geometry that could be causing all these bootloaders to not work.
First stage boot sector code for grub legacy is in "stage1", for grub(2) in "boot.img". Fist stage code contains the address of next stage to be loaded on same disk.
On some other disk the address of next stage to be loaded could be (and is maybe) different.
I think using chroot and grub-install would be a better way to go.
See Grub2/Installing.
As for disk/partition structure:
dd if=/mnt/source/boot/grub/stage2 of=/dev/sdb bs=512 seek=1
maybe has overwritten partition table in MBR of sdb.

Resources