Recent

Author Topic: Qemu - Arm.  (Read 10639 times)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Qemu - Arm.
« Reply #30 on: September 29, 2021, 01:32:05 pm »
P.S. Installed FPC from archive, but I can't install Lazarus from sources, because I can't even install make.

make is in the build-essential package. The effective prerequisites are build-essential, gdb, libgpm-dev (formerly libgpmg1-dev), libncurses5-dev and libncursesw5-dev... they're the ones that have been good for me for about 15 years.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: Qemu - Arm.
« Reply #31 on: September 29, 2021, 03:43:58 pm »
No, problem was with repositories.

Here it is. But I have problem. IDE start dialog says two things:
1) Lazarus version doesn't match source version
2) It can't find system.ppc
I'm not sure, if this problems are caused by previous install from archive or not.
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Qemu - Arm.
« Reply #32 on: September 29, 2021, 03:54:42 pm »
No, problem was with repositories.

Here it is. But I have problem. IDE start dialog says two things:
1) Lazarus version doesn't match source version
2) It can't find system.ppc
I'm not sure, if this problems are caused by previous install from archive or not.

You've said you've installed FPC from an archive: /what/ archive?

You've said you can't build Lazarus... but it's patently obvious you've got a running copy so what /exactly/ have you done and what's gone wrong?

I always install FPC from a freepascal.org tarball, then rebuild from source, then build Lazarus from source. So there's limited direct help I can provide, but I think you need to go into more details so that somebody more familiar with Debian packaging etc. can pick it up.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: Qemu - Arm.
« Reply #33 on: September 29, 2021, 04:00:49 pm »
You've said you've installed FPC from an archive: /what/ archive?

You've said you can't build Lazarus... but it's patently obvious you've got a running copy so what /exactly/ have you done and what's gone wrong?

I always install FPC from a freepascal.org tarball, then rebuild from source, then build Lazarus from source. So there's limited direct help I can provide, but I think you need to go into more details so that somebody more familiar with Debian packaging etc. can pick it up.

MarkMLl
I tell you it for 3rd time in a row. There was problem with repositories - I couldn't install anything. So I tried to install from here. But I couldn't install Lazarus from sources, cuz I couldn't install make. And then I fixed problem with repositories and installed everything from there. FPC.CFG files are in right places and it looks like they point to right directories. But still this errors.
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Qemu - Arm.
« Reply #34 on: September 29, 2021, 04:28:15 pm »
I tell you it for 3rd time in a row. There was problem with repositories

Yes, and three times you haven't told us /what/ repositories or what you did to fix it.

Are you talking about Debian's own repositories- and if so where does Synaptic come into it since Debian doesn't install it by default?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: Qemu - Arm.
« Reply #35 on: September 29, 2021, 04:48:49 pm »
Offtopic a little.
I wrote the list of req packaged to the wiki:
https://wiki.freepascal.org/Installing_Lazarus_on_Linux#Required_Linux_packages

You may correct this list.
« Last Edit: September 29, 2021, 04:52:50 pm by Alextp »

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: Qemu - Arm.
« Reply #36 on: September 29, 2021, 05:14:06 pm »
Yes, and three times you haven't told us /what/ repositories or what you did to fix it.

Are you talking about Debian's own repositories- and if so where does Synaptic come into it since Debian doesn't install it by default?

MarkMLl
Sorry. I've got tired of Debian a little bit. It's second day of fighting against it. It has taken whole day to just install it. Not sure, if Arm64 version is so bad or whole Debian. Nothing works out of the box. Problems started, when Debian refused to find DVD, it was actually booted from. And then I encountered many problems with configuring it. Like laking some Mate options and not having /sbin on PATH and therefore failing to start some programs. Even if I started some program from /sbin, it failed anyway, when it tried to start some other program, that was in /sbin too. Or sudo not working properly by default. Problem with repositories was with fact, that Debian configured it's DVD as main source of repositories. And this DVD wasn't accessible. As result I couldn't install anything. It wasn't showing some error. No. Just no programs in repository. First I though, that Arm64 repositories didn't have all packages. And decided to try to install FPC and Lazarus directly. FPC installed properly, but I couldn't install Lazarus from sources due to lack of make. This is when I realized, that there was some problem with repositories. Because they can lack Lazarus, but definitely not make. I fixed this problem and installed default FPC and Lazarus from there. I thought, that new installation would configure itself properly, even if there was some previous faulty ones. But it didn't. Problem with Lazarus sources isn't big deal. Looks like it simply misses "bsomething" at the end. But no FPC units - is worse problem. Nothing would compile without them. I checked files and everything looked fine. As I understand, "/x/bin/fpc" searches for configuration in "/x/etc/fpc.cfg", sources are in "/usr/lib/fpc" and arch name is "aarch64-linux".
« Last Edit: September 29, 2021, 05:16:30 pm by Mr.Madguy »
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Qemu - Arm.
« Reply #37 on: September 29, 2021, 10:34:04 pm »
Sorry. I've got tired of Debian a little bit. It's second day of fighting against it. It has taken whole day to just install it. Not sure, if Arm64 version is so bad or whole Debian. Nothing works out of the box.

I haven't a clue what you're trying to say with this "/x/" business, you're just not giving us enough information to make sense.

If you're still talking about Qemu, I suspect that the DVD problem is because you've not adjusted your command line to make it accessible... there's probably documentation somewhere that tells you all about that but in my case case it's 15 years relevant experience (of Qemu, and before that UML etc.). In any event that one's hardly an FPC/Lazarus problem.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: Qemu - Arm.
« Reply #38 on: September 30, 2021, 08:41:27 am »
I'm mostly Windows user. I'm not familiar with all that Linux file system mounting stuff. So, despite of DOS experience, user-unfriendly Linux distributives are hard for me. Unfortunately I've found out, that in many Linux distributives FPC/Lazarus packages are maintained badly, that causes them not to work out of the box. And Debian seems to have weird problems with paths. I don't know, what is wrong with it. Lazarus says that compiler is in "/usr/bin/fpc" (it's the same, as "/bin/fpc" or just "fpc"). Docs say, that in this case fpc.cfg should be "/etc/fpc.cfg". It's there. Ok. Unit paths are "-Fu/lib/fpc/$fpcversion/units/$fpctarget/<something>". And I have following directory - "/lib/fpc/3.2.2/units/aarch64-linux/". "rtl" is there and it has "system.ppu". I just don't understand, why Lazarus can't find it.

I just don't want to waste another day to try to reinstall everything from scratch. I'm reinstalling. This process just goes by itself anyway, while I can do my job. It just makes me a little bit tired.
« Last Edit: September 30, 2021, 08:59:19 am by Mr.Madguy »
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Qemu - Arm.
« Reply #39 on: September 30, 2021, 03:02:00 pm »
I don't want to prolong this thread since I suspect that OP's wandered off. However

Try Termux. I managed to use FPC on a phone with it.

That's what I used to get FPC to work on an x86_64 tablet. I remember there was something slightly odd about the internal paths that I had to fudge... if anybody goes this way I might have notes somewhere.

FDroid might have entered into the equation somewhere as well.

I've got a development "phablet" with Cyanogenmod based on Android 6 here, onto which it appears that I've already installed Termux.

Running passwd and then starting sshd, I'm able to login as root via port 8022. At that point I see:

Code: [Select]
~$ ssh -p 8022 root@172.27.16.176
root@172.27.16.176's password:
X11 forwarding request failed on channel 0

Welcome to Termux!

Wiki:            https://wiki.termux.com
Community forum: https://termux.com/community
Gitter chat:     https://gitter.im/termux/termux
IRC channel:     #termux on freenode

Working with packages:

 * Search packages:   pkg search <query>
 * Install a package: pkg install <package>
 * Upgrade packages:  pkg upgrade

Subscribing to additional repositories:

 * Root: pkg install root-repo

You are using legacy Termux environment.
Packages are unmaintained and will not
receive any updates.

$ uname -a
Linux localhost 3.10.72+ #1 SMP PREEMPT Thu Oct 13 18:38:52 CST 2016 aarch64 Android
$

I'm not putting any more time into this, and if anybody wants to discuss it I suggest a new thread. But note that that's aarch64... subject to the availability of standard utilities that should be enough to get FPC running natively and possibly Lazarus.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: Qemu - Arm.
« Reply #40 on: September 30, 2021, 03:27:31 pm »
Finally!
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

Seenkao

  • Hero Member
  • *****
  • Posts: 546
    • New ZenGL.
Re: Qemu - Arm.
« Reply #41 on: September 30, 2021, 04:53:50 pm »
Mr.Madguy, Congratulations! :)

-------------------------------------------------
Я сделал подробное описание установки Debian 11 используя Qemu (это было не просто...). Графическое окружение включено. Извиняюсь, пока только на русском. Если это нужно, то я сделаю перевод и выложу на вики (или вы можете перевести и выложить :)).
yandex translate:
I made a detailed description of installing Debian 11 using Qemu (it wasn't easy...). The graphical environment is enabled. I'm sorry, so far only in Russian. If it is necessary, then I will make a translation and post it on the wiki(or you can translate and post :)).
Debian 11 using Qemu

Rus: Только делал я на Linux, потому возможно будет сложно извлечь ядро, если человек будет эмулировать Debian на Windows.
FPC3.2.0/Lazarus в данной системе есть по умолчанию, но может не работать. Я устанавливал FPC/Lazarus используя FPCUPDELUXE. На работоспособность проверил.
End:I only did it on Linux, because it might be difficult to extract the kernel if a person emulates Debian on Windows.
FPC3.2.0/Lazarus is in this system by default, but it may not work. I installed FPC/Lazarus using FPCUPDELUXE. I checked for operability.

Rus: Отдельная благодарность Mr.Madguy! Если б он не поддержал, то я остановился бы на начатом.
Eng: Special thanks to Mr.Madguy! If he hadn't supported me, then I would have stopped what I started. ;)
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: Qemu - Arm.
« Reply #42 on: September 30, 2021, 05:23:47 pm »
My instruction would be a little bit shorter:
1) Download Debian installation DVD
2) To make things easier, do everything in QEMU folder. Admin rights are needed to do it. I use FAR manager for this purpose. It can remember your previous command lines, that is very useful feature for us.
3) Create disk via "qemu-img create -f qcow2 debian.qcow2 <size>G". qcow2 is used because it's size = size of data on it, not size of disk. Disk economy, you know. So, size of disk doesn't actually matter - you can even use 200G.
4) Use command line, I provided earlier. Specify debian.qcow2 as hda and installation DVD as hdb. Use -boot d to boot from DVD. Don't forget about USB keyboard support!
5) Install the same way, you would install x86 distributive. I used graphic installer. Have you ever installed any OS? I don't think, you'd have some problems.
6) When installer complains, that it can't find installation media - use "specify it manually" option and use /dev/vdb (if DVD is hdb)
7) When installer asks you to use network repository - agree to do it. This way you will avoid future problems with repositories and won't need to add them manually.
8) Complete installation
9) After reboot you'll notice, that EFI shell refuses to find installation automatically. May be it can be solved some way, but I don't know how. I guess, EFI storage just isn't emulated properly. I don't remember exact names of menu items. Pick 3rd one. Something like "Boot Maintenance Manager" and specify path of one of efi files manually. "/EFI/debian/grubsomething.efi" for example.
10) Boot to Debian. Start Synaptic and go to repositories config. Disable Debian DVD to avoid errors.
11) Just install Lazarus.
12) Lazarus will complain about source version mismatch. Not sure, if it's good way to solve this problem or it can cause some future problems, but I simply changed Lazarus version in file "version.ini" - added "+b2" at it's end.

P.S. I think I know how to solve #9 problem. Will test it tomorrow. First of all -pflash should be used instead of -bios. This will make UEFI area writable. But second pflash image is needed for EFI variables.
« Last Edit: September 30, 2021, 08:20:24 pm by Mr.Madguy »
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

Mr.Madguy

  • Hero Member
  • *****
  • Posts: 844
Re: Qemu - Arm.
« Reply #43 on: October 01, 2021, 10:00:58 am »
Everything works now. Instruction to enable EFI vars:
1) Run qemu-img.exe dd if=edk2-aarch64-code.fd of=debian0.img bs=1M count=64
2) Run qemu-img.exe create -f raw debian1.img 64M
3) Change -bios "edk2-aarch64-code.fd" to -pflash "debian0.img" -pflash "debian1.img"
4) Add "<your disk>/EFI/debian/shima64.efi" boot option and set it's as first one

Debian will do #4 automatically, if you'll add EFI vars support prior to installing it
« Last Edit: October 01, 2021, 10:05:21 am by Mr.Madguy »
Is it healthy for project not to have regular stable releases?
Just for fun: Code::Blocks, GCC 13 and DOS - is it possible?

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Qemu - Arm.
« Reply #44 on: October 05, 2021, 10:13:38 am »
That's what I used to get FPC to work on an x86_64 tablet. I remember there was something slightly odd about the internal paths that I had to fudge... if anybody goes this way I might have notes somewhere.

I took a look for my notes over the weekend, and it appears that the sticking point with Termux+FPC was that Android bundles libpthread somewhere unexpected and that caused problems for various things including fpcmkcfg. I can't remember whether I found an easy workaround or simply accepted that multithreaded programs might be a problem, a bit of Googling indicates that it's been discussed regularly since then so Termux itself might have got a fix.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018