Software to test FAT Implementation - testing

Do you know any software to verify a FAT Implementation?
I'm writing on a FAT32 Implementation which supports "basic wear leveling" on a SPI-Flash.
Now I want to know if my (binary) Image of the Flash is a "valid" FAT, maybe including a list of the FAT BootArea Parameters.
OS independent, tied to Windows on Work, but have my Linux Machine available.
If you know any software - perfect! Let me know!
If not - don't worry, thanks for reading :)

if you have binary image then run any disk check tool and see analyse the output. some of those tools may require you to mount the image so this will probably be much easier on linux. another test you can do is to: mount, install an OS on this image and then run it with virtualbox to check if the system boots correctly

Related

Automatic packing of server-side product as Docker and OVA image

We develop a server-side solution and to ease its deployment we would like to provide our cutomers with two options:
1. Docker image
2. VM image in OVA format
The images should be automatically created by our build machine.
As of today, we use packer for this purpose. First we create docker image and then update that image in preconfigured virtual machine image (using 'virtualbox-ovf' builder). This works pretty well, but there are some problems with this solution.
First, our vm includes docker framework and two OSes (host's and docker's), so our VM image is ~twice bigger than docker. Second, to base our solution on another linux distro, we should manually configure new VM machine.
We are looking for 'Dockerfile'-style solution to create and configure VM automatically and then export it in OVA format. 'virtualbox-iso' builder is the obvious way to do this, but the building process will be much longer.
If you are willing to use Debian as your base OS then you could look at TurnKey Linux's TKLDev. It's probably a bit of a learning curve initially but it's a pretty cool thing IMO (although I'm very biased - see below disclaimer). TKLDev will build you a TurnKey (Debian based) ISO with your software installed on top. Then using Buildtasks you can convert the ISO to OVA, VMDK, LXC, Docker, OpenStack, etc...
Unfortunately Buildtasks is not very well documented but significant chunks of it are in bash so if you are handy with a Linux commandline you could work it out. Otherwise ask on the TurnKey forums.
The initial development (from Packer to TKLDev) may take a little while, but once the heavy lifting is done the creation of an ISO (in a guest VM on a moderm multicore CPU PC) takes about 10-15 mins and the OVA probably another ~5; Docker another ~5.
If you wanted to make it build automatically then you could use a hook to trigger a fresh TKLDev build (including the buildtasks image creation) everytime a commit was made to a repo. I know that git supports this but I assume that other version control systems allow something similar.
Also if the appliance that you are making is open source then perhaps it could be added to the TurnKey Linux library?
Disclaimer: I work with TurnKey Linux. :)
FWIW this is essentially the process we use to create our library of appliances in most virtualisation formats known to human kind!

OpenCl: Minimal configuration to work with AMD GPU

Suppose we have AMD GPU (for example Radeon HD 7970) and minimal linux system without X and etc.
What should be installed and what should be launched and how it should be launched to have proper OpenCL environment? In best case it should be headless environment.
Requirements to environment:
GPU visible by OpenCL programs (clinfo for example)
It is possible to monitor temperature and set fan speed (for example using aticonfig).
P.S. Simple install Xserver, catalyst and run X :0 won't work properly. See X server with fglrx driver won't responce after exactly 49 accesses to X server
UPD When you use AMD GPU on linux, OpenCL applications don't see AMD GPU if Xserver isn't launched.
I had similar problem, asked a question and had succeed solving it by myself.
For R9 290 cards and newer i assume you have:
Built kernel 4.14 or later, with amdgpu driver support. There is option in linux kernel config under Graphics Support.
All nesesary firmware .bin blobs are incorporated. To do so easily you may edit buildroot/package/linux-firmware/* contents for buildroot, and manually add BR2_PACKAGE_LINUX_FIRMWARE_AMDGPU option by yourself, along with BR2_PACKAGE_LINUX_FIRMWARE_RADEON (use it as a template). Actually we should post that update to their git.
When booting you should see appropriate dmesg messages about amdgpu initializing, per each adapter. And screen mode should be switched. If you still see large console text and no videomode switch occured during init then you have problem in kernel/firmware, you should fix that out first.
To answer second question, controlling fan speeds/temperatures is achieved via powerplay filesystem, eg /sys/class/drm/.. like this:
cd sys/class/drm/card0/device/hwmon/hwmon0
echo 1 > pwm1_enable
cat pwm1_max > pwm1
You may dig a bit deeper and find powertune parameters nearby, in device folder.
But instead of using /sys/class/drm/card0/device/pp_dpm_sclk i highly recommend flashing that values directly in cards' bios. Set with required frequencies/voltages, as it is more reliable, stable and api independent - you either init it, or not :)
PS. Also put away 7970, buy something a bit newer. I dont know if it is still supported in the latest drivers, we havent such an old card by hands right now. I tested 290, 390, 480, 580 cards series. (for R9 270, miner fails to build cl code). For older cards better to use some older software <=16.40 and maybe a bit older kernel <=4.13

cross platform script to determine os (linux, windows, mac) and run a program depending on which os

I tried searching for the last several days and only found a few directions to go in, not really any solutions.
I can do some scripting and can learn enough of any language to fine tune this idea.
My situation:
From a USB drive, I want a single script that can run on any os, determine which os is running, and then execute an os specific executable/script.
I would like to be able to run this natively without installing additional software on each machine, as I will be using this on many different computers and may not have internet or other access to install/update software.
I have started looking into running a portable version of python, but seeing as I already have os independent scripts (bash/batch/sh/applescripts), I didnt know, and cant find, if there is an easier way to do this without the overhead of a portable interpreter.
Thanks for any help.
-mike
Sounds like a chicken-or-the-egg kind of thing, doesn't it?
If you're on a PC, you at least have a standard boot format.
If you're guaranteed a Java JRE on any platform, I would argue that Java might be your best bet.
Q: Is there any language interpeter (Java, Perl, Python or bash) that you're guaranteed to have on any host you'd want to run this USB stick on?

How to create bootable GUI programs?

*"for Retro computing purposes only"*
Some programs are directly bootable and have a nice GUI
e.g. Acronis OS Selector and Disk Director (screenshot)
How can they run wihtout underlying OS? Can this be acheived by using a minimal Linux distribution?
goal: the program should run such that it appears independent of the os (e.g you dont have to launch it from the os cmd or desktop)
also the OS should not have increase the size of the program a bit too much
Also I wonder if Qt GUI's can run like this...
I suspect that Acronis OS Selector and Disk Director uses their own version of Windows 7.
Yes, you can produce a program that has it's own operating system. You could use a bootable Linux distribution.
Knoppix, to pick one example, is a bootable Linux distribution.
The story behind a comprehensive GUI + bootable program is somewhat like this:
Develop the program in a linux GUI toolkit
On boot, load a linux kernel (without any desktop environment)
Hand over the control to the program GUI
more info: Bootable Qt-Linux Application

is there a stand alone JVM that run's on a PC without any OS

As i know java programs are able to run on any Operating System.
and there are JVM's for any kind of machines.
I need a JVM that runs on my PC stand alone, and not on my OS (windows or any thing else).
I mean a JVM that acts like a boot, instead of the OS boot
i searched for all versions of JVM on "www.java.com/en/download/manual.jsp", but i did not get the suitable JVM.
the following link helped me a little but that was not enough
http://java-virtual-machine.net/other.html#jvm
my PC CPU is AMD Athlon(tm) 64X2 Dual Core Processor 5200 + 2.69 GHz
any body can help me to find the suitable jvm version ?!
Sure, have a look at JRockit Virtual Edition. As I understand it it's basically a micro kernel especially tailored for the JRockit VM.
From this page:
Java without the OS: JRockit Virtual Edition (VE)
Am I the only one that's never heard of this before? The Oracle JRockit team is looking at eliminating the OS from the stack required to run Java. This product will be called JRockit VE (not out yet)
JavaOS
Good lucking getting hold of it, though, it's nothing more than a historical curiosity.
There are two JVMs that I am aware of, which have this property:
The Fiji WM: http://www.fiji-systems.com/index.html
According to http://rtjava.blogspot.com/2009/11/new-real-time-vm-was-born-fiji-vm.html it also runs on bare metal.
The next possibility is JNode: an open source operating system where most parts are written in Java (the rest in assembly): http://www.jnode.org/
JNode is still beta, though.
No.
There was an idea of making a machine that could run a JVM as an actual machine (non virtualized), similiar to LISP machines, but that idea never took off...
You need a host OS to run a JVM.
Googling "java real machine" might give you some interesting articles.
I've found two: one from 2004, talking about how such a machine could be built and another one, talking about how JVM runs as a real machine on hardware such as mobile devices.
Still, no dice with a plain PC.