Recent

Author Topic: ppcmipsel on openwrt/freetz  (Read 22707 times)

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: ppcmipsel on openwrt/freetz
« Reply #15 on: August 06, 2013, 01:28:41 pm »
Second part (when Linux works as well) of this exercise would be to run mySQL (or rather MariaDB) on the device and to connect to the db with the program. I'm using currently a SheevaPlug which has a very slow file access. That might become a problem too.
Lazarus 1.7 (SVN) FPC 3.0.0

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: ppcmipsel on openwrt/freetz
« Reply #16 on: August 06, 2013, 07:24:23 pm »
Ok ;)

Got a cross compiler build working after struggling a bit (started with an old version of the binutils to match my old fritz clone but that errored out during make).
However, the cross compile step in fpcup/fpc make seems to hang.

Haven't figured out what it is yet; testing by others welcome.

Thanks,
BigChimp
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

herux

  • Full Member
  • ***
  • Posts: 102
Re: ppcmipsel on openwrt/freetz
« Reply #17 on: August 05, 2016, 11:51:14 am »
Hi all

Any update about this ?

I have success build fpc cross compile for mips-linux, succeded too for compile helloworld.
when I copied to my http://www.gl-inet.com ,  It stucks just waiting for ctrl-c

I am using fpc trunk this day

stokito

  • Newbie
  • Posts: 2
Re: ppcmipsel on openwrt/freetz
« Reply #18 on: October 01, 2022, 11:12:11 am »
Does anybody tried to compile Pascal to OpenWrt?

Today routers becomes more powerful (64mb disk and 128mb ram) but still not enough to run usual programs in NodeJS, Python or Java.
Golang is working but it's binaries are too bloated. This is not a niche for it.
So I think that Pascal may be a reasonably good choice especially given that it much more mature.
Regular developers can easily write their own soft like home automation or even backend for a website.

I wish to write a small but user friendly Email server with SMTP and POP and Indy is a very cool library to do that  https://github.com/IndySockets/Indy
I'm fine if it will be bigger than if written in pure C but instead I'll have a code that is easy to understand.

I have two routers: TP WR1043ND with mips32 CPU and more powerful Turris Omnia with the armhf armv7 CPU.
On my Ubuntu 22.04 I installed Lazarus and configured armv7 target but it said that arm is not supported.
For the mips target I found a wiki page https://wiki.freepascal.org/Native_MIPS_Systems
But it looks so difficult so that I'm afraid to touch it.

So I have few questions to you guys:
1. What is your opinion about trying to use Pascal for routers?
2. Is it possible to compile for the arm, armhf and mips without a pain?
3. Is any chances to make binaries smaller? Is it possible to use musl libc that is used by the OpenWrt?

Thank you in advance.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: ppcmipsel on openwrt/freetz
« Reply #19 on: October 01, 2022, 11:51:18 am »
Yes, go back through the forum and in particular the mailing list.

My recollection is that people ran into issues with the standard (i.e. system level) libraries not providing all the required facilities or similar. I can't remember the precise details other than that the symptoms were such that I suggested that the file command be run on the generated binary to check that everything was as expected.

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

stokito

  • Newbie
  • Posts: 2
Re: ppcmipsel on openwrt/freetz
« Reply #20 on: October 03, 2022, 09:14:04 am »
Thank you, MarkML. This looks too complicated.
When I selected the target mips and restarted the project I got the error:

The project uses target OS=linux and CPU=mips.
The system.ppu for this target was not found in the FPC binary directories.

As far I understood I have to compile FPC with some flag to support the mips.
It would be great if I can just install some package in apt but looks like there is only fpc and nothing else.

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: ppcmipsel on openwrt/freetz
« Reply #21 on: October 03, 2022, 01:13:45 pm »
There are a  number of pre made FPC 'kits' to suit mips, mipsel and a range of arm cpus at https://sourceforge.net/projects/freepascal/files/Linux/3.2.2/

The wiki page, https://wiki.freepascal.org/Installing_the_Free_Pascal_Compiler#FPC_Tar_Balls talks about how to install them. While not specificially about cross compile, there should be enough information there. I think.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: ppcmipsel on openwrt/freetz
« Reply #22 on: October 03, 2022, 01:29:09 pm »
I was involved with some of the porting. It was about June, there were two different compiler attempts to be reconciled (they'd languished since SGI etc. had abandoned MIPS), and somebody in China was screaming for FPC support before the start of the next academic year: I suspect he'd sold a large number of small computers into schools on the basis that there was a Pascal compiler. The promised development hardware didn't arrive, so while I can say that it ran in emulation I never saw it running natively.

But since then I've /definitely/ seen reports of problems on OpenWRT, which I believe was a problem with the underlying libraries.

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