User avatar
rpdom
Posts: 18154
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to run .exe files on raspbian

Thu Dec 17, 2015 6:20 pm

gsgs wrote:> Reading and writing a raw device is easy in Linux, as long
> as the user has the correct permissions.

how does he get the correct permissions ?
Either run as root or make the user a member of a group that has read/write access to the device. You can see the groups with ls -l

Code: Select all

pi@raspi3 ~ $ ls -l /dev/mmcblk0
brw-rw---- 1 root disk 179, 0 Jan  1  1970 /dev/mmcblk0
In this case the group is "disk".
> For the SD card you could do something like
> card = open( "/dev/mmcblk0" )
> seek( card, address * 512 )
> read( buffer, card, 512 ) // Read a sector
> close( card )

thanks...sounds good ... what Linux is it ? bash ? reads the raspberry2b system-card or from USB ?
Do you mean what "language" is this? It's not. It's just the idea of the code required. It's close-ish to C, but you need to write your own code.
Now read all the sectors and write it to a file on another, bigger card in another USB-port
Or write it directly to their corresponding sectors/blocks
Not sure what you mean by this
> You can even read/write sectors from the command line with the skip/seek and count options of dd.

so the above wasn't the command line ?! what's dd ?
dd is a command. It is very flexible. Type "man dd" at the command line for the full, gory, details. Or look here http://manpages.debian.org/cgi-bin/man.cgi?query=dd
(I have no easy Linux access ATM)

how to do that in Windows cmd.exe commandline or with a C-program
or x86 assembly
No idea. Windows is too complicated.

wdt
Posts: 21
Joined: Wed Dec 16, 2015 6:04 am

Re: How to run .exe files on raspbian

Fri Dec 18, 2015 10:34 am

>(I have no easy Linux access ATM)

livecdlist.com

User avatar
DougieLawson
Posts: 40829
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to run .exe files on raspbian

Fri Dec 18, 2015 12:09 pm

wdt wrote:>(I have no easy Linux access ATM)

livecdlist.com
If you've got a RPi you're only an SDcard write away from a full Linux system.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: How to run .exe files on raspbian

Fri Dec 18, 2015 1:43 pm

no TV in this room, and the display that I got isn't working
I could boot this notebook with Linux, but it's a bit tedious, and I usually have DOS-programs
running in background. The raspberries were thought to run some of these ...

User avatar
DougieLawson
Posts: 40829
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to run .exe files on raspbian

Fri Dec 18, 2015 3:57 pm

Try using analog video.

Also forget ever running windows or DOS junk on your RPi. It isn't possible.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: How to run .exe files on raspbian

Fri Dec 18, 2015 6:39 pm

it may become possible later...
I wonder how well my old Windows/Dos GCC programs compile
under Linux GCC (not tested yet)

a simple Basic interpreter would also be fine, the simpler the better

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: How to run .exe files on raspbian

Fri Dec 18, 2015 8:30 pm

gsgs wrote:no TV in this room, and the display that I got isn't working
I could boot this notebook with Linux, but it's a bit tedious, and I usually have DOS-programs
You can ssh into the pi from your other machines, you don't need a head or keyboard or mouse or anything like that on them.
running in background. The raspberries were thought to run some of these ...
Do you have their source? If you have to run applications that were compiled for x86, it makes sense to find an x86 board. You can probably find some sort of an x86 netbook with problems somewhere, maybe you can, people toss things out ridiculously nowadays. I got an Acer for free that had a bad keyboard. I plugged in a USB keyboard and flattened the netbook whatever mess was on there and put on standard Linux. Now I use ssh in command line to run whatever so the keyboard isn't really even needed. It isn't set up for DOS, but that could be done, there is FreeDOS: http://www.freedos.org/ . But keep in mind that this is a step back in time. I guess I should probably try to find another similar one of these for that, since I would like to know how well the networking works and being able to run old DOS stuff without it being too fast might be useful.

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 6:02 am

yes, I know freedos. I don't know ssd.
I'm using dozends, hundreds of command line utilities and batch files to manipulate files,
analyse DNA-sequences designed for DOS or windows cmd.exe.
Most are in C (compiled with an old gcc compiler) , but also Basic (.bas, not compiled)
or 3rd party utilities (.exe, no source-code) - I'd like to reuse or convert some/many of those
if possible.


I know, I have to delete the crs (ascii 13) from my data files since unix/linex
only has lf (ascii10) at line-end. Usually (but not always) my programs can handle both types

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 6:17 am

for example, now I have this set of 5000 bacterial genomes from genbank, 20 GB in total,
and I'd like to compare each one with each other one. That takes 5000hours on my notebook ...
could I just let the quadcore raspberry run on it for ~100 days or 2 for 50days

needs a C-program and batch files and 64GB HD or SD and 500MB RAM

each file is being read 5000 times

the raspberry is small, takes little power, can be ignored for 100days

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 7:32 am

gsgs wrote:for example, now I have this set of 5000 bacterial genomes from genbank, 20 GB in total,
and I'd like to compare each one with each other one. That takes 5000hours on my notebook ...
could I just let the quadcore raspberry run on it for ~100 days or 2 for 50days

needs a C-program and batch files and 64GB HD or SD and 500MB RAM

each file is being read 5000 times

the raspberry is small, takes little power, can be ignored for 100days
Why don't you try it?

It shouldn't be hard for you to whip up a quick Python script to compare these files. Depending on the nature of the comparison there may be a Unix utility that can compare the files efficiently.

berniek
Posts: 1
Joined: Sat Dec 19, 2015 11:38 am

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 11:50 am

I face a similar challenge. I'd like to use my RPi for some coding. The included packages are great, but I'd like to have an additional (all-purpose) editor. On Windows I use Notepad++ and I understand that this one may not work under Raspian. I found Geany and Scite as good alternative and they are also for Linux.
They come as an .exe file and simple double clicking only asks me what app I'd like to use to run them. Using sudo get-... does not do the trick either.

I am searching the web now for days and cannot find a solution. :?:

Help, please, anyone!? Thanks and enjoy Christmas.

wdt
Posts: 21
Joined: Wed Dec 16, 2015 6:04 am

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 1:51 pm

It's nice that you finally told us enough to say something intelegant
5000 hrs is more than 200 days, you must not be in a hurry
I doubt the rpi is as powerful as your netbook, more likely 1/2
I should think you would be better off tuning the software and geting
a desktop, (with lots of memory), unless you don't mind waiting 1/2 year

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 2:08 pm

berniek wrote:I face a similar challenge. I'd like to use my RPi for some coding. The included packages are great, but I'd like to have an additional (all-purpose) editor. On Windows I use Notepad++ and I understand that this one may not work under Raspian. I found Geany and Scite as good alternative and they are also for Linux.
They come as an .exe file and simple double clicking only asks me what app I'd like to use to run them. Using sudo get-... does not do the trick either.

I am searching the web now for days and cannot find a solution. :?:

Help, please, anyone!? Thanks and enjoy Christmas.
You probably won't find Notepad++ on Linux and almost certainly not find it compiled for ARM. The bad news is that I'm afraid you need to change your editor. The good news is that there are editors with all the features of Notepad++ and more, that run on Windows, Linux, x86, ARM and anything else you have and they are just as free as Notepad++.

Here's a fan-boy post I made recently: viewtopic.php?p=864868#p864868

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 2:17 pm

gsgs wrote:for example, now I have this set of 5000 bacterial genomes from genbank, 20 GB in total,
and I'd like to compare each one with each other one. That takes 5000hours on my notebook ...
could I just let the quadcore raspberry run on it for ~100 days or 2 for 50days

needs a C-program and batch files and 64GB HD or SD and 500MB RAM

each file is being read 5000 times

the raspberry is small, takes little power, can be ignored for 100days
You realise that running an x86 emulator slows the computer by a factor of at least ten, right? Can you wait 1000 days?

If you have the C and .bas files, then they can be made to compile on the RaspPi without too much effort. They are not trying to display windows and the C libraries are all the same. It's very likely that most of them just require a little fiddling around where they deal with file names. The Basic programs may need you to search out the right compiler to match the dialect of Basic that they use, but there's a good chance it is out there.

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 2:20 pm

well, I calculate 4*900 MHz for the piB2 vs. 2GHz for my notebook (?)

I'm planning to try to compile and -if successful- benchmark that program later today

----------------------------------------

berniek, you can edit on your Windows-notebook and transfer the edited files on SD-card

replace cr/lf by lf , if necessary

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 2:28 pm

rurwin, I didn't know about the factor 10, thinking more at 2-3

there will probably be some problems with C and BAS files, different dialects,
graphics, files

C is gcc version 3.2 , Basic is mostly GWBasic , also batch files

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 2:45 pm

It's about ten times. A 600MHz PC emulates a 60MHz PC. It needs to decode each instruction and then implement it. How many assembler instructions would you have to write just to decode the instruction? It's not 2-3.

gcc is not a problem. You'll be using gcc anyway; it won't have changed much. You might have to search out some compiler flags to get it working the way you want.

GW-Basic is also not a problem. See: http://sourceforge.net/projects/pcbasic/

For batch files, yes there will be issues. But Bash has all the same features. It's possible to convert the files although maybe not automatically. See: http://linux.die.net/abs-guide/dosbatch.html

wdt
Posts: 21
Joined: Wed Dec 16, 2015 6:04 am

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 3:04 pm

>well, I calculate 4*900 MHz for the piB2 vs. 2GHz for my notebook (?)
arm cpu vrs atom? P3? celeron? from a 17 2core to rpi2 is 50x
But you are mem and io constrained, the usb2 is 2-3 slower than rotating disk, 20x SSD
And only 1G mem, in the real world you would have 32 G, a ramdisk big enough for dataset....
and only wait 2 days or less
If you split your dataset, and with clever programing, might be feasable

User avatar
jojopi
Posts: 3424
Joined: Tue Oct 11, 2011 8:38 pm

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 3:36 pm

berniek wrote:I found Geany and Scite as good alternative and they are also for Linux.
They come as an .exe file and simple double clicking only asks me what app I'd like to use to run them. Using sudo get-... does not do the trick either.
They only come as .exe files if you specifically download the Windows binary versions.

Both are available in Raspbian:

Code: Select all

sudo apt-get install geany scite

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 5:45 pm

OK, here my begiiner's experience to run a windows .exe on the raspberry 2 B.
The .exe was a compiled C-program, using the gcc compiler version 3.2 on windows' cmd.exe.

1.) copy the C - program to an SD-card with USB-adapter, not one of the raspberry cards but one
of the windows cards. I renamed the program "epi.c" , all lower case.



2.) insert the Raspberian booting SD and connect the power cable

[other than what I read here, the LED won't bling for 20sec, since the pi is waiting for a keyboard input.
The operation system on the card, that I bought, is not installed yet. Actually I had tried several cards,
all the same, no 20sec. irregular LED-blinking.. I had also bought a dusplay before, but it remained white.
So I tried to connect it differently to the pins and the power supply flashed, indicationg some short circuit.
So I thought I might have destroyed the pi and ordered another one. But still no blinking.
Finally I figured out how to connect it to TV (no instructions for the TV). You also need keyboard and mouse., both connected to USB- ports. Then I saw it booting(?) ! But requiring some input
what to install, I chose Raspberrian (recommended) and it installed (took 15 min) ,
then shut down and booted raspberrian with blinking LED ]


3.) enter terminal-commandline mode by clicking the 5th icon in the top bar

4.) activate the file manager by clicking the 4th icon in the top bar, it shows the files on the
Raspberian booting card

5.) insert the prepared windows-SD card on a free USB-port

6.) the filemanager opens another window asking whether he should start, click yes (or ok?)

7.) it shows the files on the windows-card

8.) drag with the mouse the needed programs in the windows-card to the top "pi"
in the raspberrian card, it will copy the files and try to start them, which fails, no problem.

9.) in the terminal screen type gcc epi.c -o epi

10.) it gave 5 errors, /32 at file end or such, which was the ascii-26 end-of-file character,
which my DOS-editor generates. Remove it. (e.g. with a utility or another editor)
then it didn't like the "exit" commands in my program. I replaced them by goto last line of program
That was all done in windows, I copied the new program to the windows card, overwriting epi.c
and repeated 1.) - 9) and it worked.

11) in the terminal screen type chmod +x epi

12) run the program with ./epi



----------------------------------------

I had found this on a webpage

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 5:46 pm

sorry, I need another post, editing long post gives problems here with my browser.

So, I had found the guide at : http://www.noveldevices.co.uk/rp-gcc

Now the benchmark : ~2 sec. on my Windows notebook with 2GHz
~13 sec. on the pi more : 80sec vs. 510sec

it did run correctly on the pi, produced the correct output reading and comparing
2 bacterial files of ~2MB and 5MB, using 500MB of RAM
(marking each length=16 subsequence from {A,C,G,T}^16 in a binary table.

----------------------------------------------------------------

how to boot from USB
how to run the first(default?) program from a USB multiboot stick

how to address the files on USB
how to switch to the root-directory on USB

try to attach my external windows 3TB HD to pi-USB

how to make batch files in Raspberian
Last edited by gsgs on Sat Dec 19, 2015 8:35 pm, edited 1 time in total.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 6:36 pm

gsgs wrote:it did run correctly on the pi, produced the correct output reading and comparing
2 bacterial files of ~2MB and 5MB, using 500MB of RAM
(marking each length=16 subsequence from {A,C,G,T}^16 in a binary table.
Previously it was 5000 files totalling 20gig and now it's two files of 2meg and 5meg. What works on the one will likely not work the same on the other.
how to boot from USB
You can only boot the pi from the sdcard.
how to run the first(default?) program from a USB multiboot stick
I don't know what that means.
how to address the files on USB
how to switch to the root-directory on USB
You can mount the flash drive or other drive wherever you want to on the tree. Linux doesn't use drive letters.
how to make batch files in Raspberian
You can write your scripting files in various languages, BASH is popular.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 6:54 pm

gsgs wrote:for example, now I have this set of 5000 bacterial genomes from genbank, 20 GB in total, and I'd like to compare each one with each other one. That takes 5000hours on my notebook ...
This is reaching into the realm of "bigData". You might consider Amazon's servers which you can use to run huge datasets on.
could I just let the quadcore raspberry run on it for ~100 days or 2 for 50days
You continue to assume that parallelism is trivial. You might be able to divide up your jobs such that they do operate at the same time but I suspect there could be a bottleneck in your data access and this easy division is by no means the rule.
needs a C-program and batch files and 64GB HD or SD and 500MB RAMeach file is being read 5000 times
If you are going to compare each file with each file, you would seem to need to read each file for 5000 file reads and then drop one file out and compare the next to the remaining 4998 files and then drop a file and the next. But maybe I am misunderstanding what you mean by "compare each file with each file".
the raspberry is small, takes little power, can be ignored for 100days
I think you'd be better served if you thought about the process and what you were trying to do rather than just leaving it running for several thousand years. Perhaps something involving hashing such that runs, whatever length you need, are deposited into bins with tags saying which file and where in that file they came from. Then you'd just be reading each file once and you'd then have an output that you could use to find those matches and if you did it right, you could then build larger matches from the bins. More importantly, you could begin to look at near matches, situations where the match was effectively occurring but was missed because of something modified or inserted or left out somewhere. This is going to hugely expand your saved data set but you could then work on it in various ways.

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: How to run .exe files on raspbian

Sat Dec 19, 2015 9:03 pm

this example seems not so good for the pi.
It probably can't be parallellized because each processor needs 500MB RAM.
Hmm, well, at least not so easily.

But even with one processor the speed is bad here. I speculate this
is because the x86 processor has more/better RAM-caching
So I better run this on another x86 machine
200 days with 40W is ~60Euro
Yes, I could cut by half by comparing A to B and not B to A,
but there are some differences ... I also count length=32-sequences
all of whose length=16 subsequences are marked.

--------------------------edit----------------------
http://infocenter.arm.com/help/topic/co ... p3_trm.pdf

chapter 6, page 152 into the .pdf
max.64KB (8KB-64KB) L1-cache blocks of 64bit

chapter 7 page 167
max 1MB (128K-1M) L2-cache, "8-way" seems to support all 4 processors
independently (?), blocks of 64bits
-----------vs.------------
Intel Core2 Duo CPU T7500, 2.2GHz
789 MHz, 1.98 GB RAM
L1 : 2*32KB , blocks of 64bit
L2: 4MB , "16way"
----------6.4 times faster-----------------------

well, thinking again ... that program presumably accesses 500MB of ram
almost randomly, uncached, so the caching won't matter. (I may rewrite it to
improve that) Why is it so much faster then ?

same program without memory-access: 16s (after 64s) on the notebook
xxxs (after 510s) on the raspberry

momzzz123
Posts: 1
Joined: Thu Jan 21, 2016 11:50 pm

Re: How to run .exe files on raspbian

Thu Jan 21, 2016 11:56 pm

Im asking a question, is there an operating system for the raspberry pi that will be able to run exe files on it?

Return to “Beginners”