Kitz Forum

Computers & Hardware => Other Technologies & Hardware => Topic started by: Weaver on June 13, 2019, 03:05:53 AM

Title: Once more thinking about setting up a RPi
Post by: Weaver on June 13, 2019, 03:05:53 AM
Revisiting this topic again. :-(

I’m wondering if I might have the energy and concentration required to get a (local, on LAN) Raspberry Pi B+ going. The new model, with faster WLAN NIC and somewhat faster (wired) Ethernet which now approaches a miserable 300Mbps.

I asked about this before, but didn’t get very far. But now I’m thinking once more about finding someone to help me. Being in bed, I can’t get say the ‘Starter Kit’ from Pi Hut going as it requires a monitor and keyboard and obviously I can’t do that stuff. So to recap, what I would need is someone to help get me started by getting an o/s set up so that it will permit login, with say ssh or telnet, over the LAN, immediately from boot, with no keyboard mouse or display.

I would really want a 64-bit o/s an AAarch64 build of some sort, because I want to learn AArch64 asm, not the horrible old 32-bit instruction set. I don’t know if this is possible.

I need to get an SD card for it somehow and the Pi Hut starter kit comes with a card that must work although it is rather disappointingly piddly at 16MB, but I suppose that will have to do.

Ideally if I could find the right dealer they would install an o/s properly for me so it would just work, but I wouldn’t know where to begin. Pi Hut doesn’t seem to have any kind of cuddly customer service, they ship boxes, as far as I can see. Does anyone have any ideas?

Failing that, if I do find some volunteer to help me, I need to ship the machine to them and then get it shipped back.

One further problem occurs to me: what about assigning IP addresses to the Pi?

If I can find a helper what IP addresses will the Pi have on their network, and what will then happen when it is relocated to my LAN? For IPv6, I want the machine to do zeroconfig and just pick up a prefix from the router. For IPv4 I want the machine to either be a DHCP client or set IPv4 addresses for the NICs statically at my choice of fixed, routable (global) IPv4 addresses, which is going to be extremely awkward for my helper unless perhaps they set everything up and then changed it at the last minute. But that seems like way too much trouble, and being a DHCP client for IPv4 has to be the sane choice and also the safe one, less chance of it simply breaking when it arrives here.

Any thoughts?
Title: Re: Once more thinking about setting up a RPi
Post by: burakkucat on June 13, 2019, 05:31:35 PM
Revisiting this topic again. :-(

<snip

I would really want a 64-bit o/s an AAarch64 build of some sort, because I want to learn AArch64 asm, not the horrible old 32-bit instruction set. I don’t know if this is possible.

For aarch64 I would suggest that you consider the The Alternative Architecture SIG (https://wiki.centos.org/SpecialInterestGroup/AltArch) (Special Interest Group) of the CentOS Project, in particular that of aarch64 (https://wiki.centos.org/SpecialInterestGroup/AltArch/AArch64) (obviously). I would recommend that you make contact with Jim Perrin (https://wiki.centos.org/JimPerrin), explain your personal circumstances and desire for a 64-bit R-Pi.
Title: Re: Once more thinking about setting up a RPi
Post by: displaced on June 14, 2019, 12:13:01 AM
[edit: I shouldn’t post so late. Totally missed the aarch64 stuff. Please feel free to ignore!]

I set up a Pi Zero W the other day totally headless.

I downloaded a Raspbian image and wrote it to the SD Card. Then, you’ll see a volume named ‘boot’ on the card.

Create an empty file named simply ‘ssh’ in the root of ‘boot’ to enable ssh.

Then, create another file named ‘wpa_supplicant.conf’ in the same location. That’s where you can set your WiFi connection up.

Then, pop the SD card in the Pi and it’ll start up, connect to your WLAN with DHCP and you’ll be able to ssh into it.  Defaults are:

Hostname: raspberrypi
User: pi
Pass: raspberry

Here’s a link to an example wpa_supplicant.conf file and further instructions:
https://www.raspberrypi.org/documentation/configuration/wireless/headless.md

Once ssh’d in, run raspi-config to do the usual first-time setup.

You’ve then got a Debian-style Linux system at your disposal!
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 14, 2019, 10:28:24 PM
Thanks to displaced. That’s right I remember that it’s really simple. Of course I physically cannot do any of it as I can’t sit upright for that long and don’t have a display or keyboard (although those latter points could be remedied, the first can not). And the last time I tried this, with a helpful neighbour who has several pis volunteering, I got the wrong kind of SD card (too large? I don’t remember what). And I have no idea what makes a card qualify so Im think one way is that should really buy a card from a pi dealer as then it would be guaranteed to work. But it’s a shame that say the pi Hut offering is so tichy - rather limits future possibilities.
Title: Re: Once more thinking about setting up a RPi
Post by: burakkucat on June 14, 2019, 10:48:54 PM
If I was going to use a R-Pi for regular, everyday, work I would connect a disk drive, via USB, for all my user files. Just have the OS on the SD card . . . Hence a 4GB SD card would be ample.

Many years ago, when developing certain chunks of code for Bald_Eagle1 to incorporate into HG612_stats, I used a 4GB USB memory stick for all the user files and the log files.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 14, 2019, 11:11:09 PM
Yes, I was thinking about that - that would be a usb SSD? Or a mechanical magnetic one?

Yes you’re right 16GB is fine then in that case. Thank you.

So it’s the kit with 16GB card for me. Is Pi `Hut the best place or are there better places? Best would be one with customer service to set it up for me.

Or otherwise recommendations about where I should go to look for a volunteer.
Title: Re: Once more thinking about setting up a RPi
Post by: burakkucat on June 14, 2019, 11:34:52 PM
Yes, I was thinking about that - that would be a usb SSD? Or a mechanical magnetic one?

I used a standard USB SSD with 4GB capacity, if I am remembering correctly. Obviously USB memory sticks/SSDs will degrade with usage but not as rapidly as SD cards.

Quote
So it’s the kit with 16GB card for me. Is Pi `Hut the best place or are there better places? Best would be one with customer service to set it up for me.

I really cannot say. When I purchased my R-Pi (a model 1B) when they were first released, it was with a pre-loaded SD card and PSU from RS Components (https://uk.rs-online.com/web/). I subsequently purchased a set of three heat sinks, a USB to ttl serial console lead (that connects to the relevant GPIO pins) and a case from ModMyPi (https://www.modmypi.com/).

If you are still interested in a 64-bit, aarch64, version then further research is necessary.
Title: Re: Once more thinking about setting up a RP
Post by: Weaver on June 15, 2019, 02:43:00 AM
If one can find the sources and build an o/s, can one do an in-place self-overwrite install, like Windows?
Title: Re: Once more thinking about setting up a RPi
Post by: burakkucat on June 15, 2019, 02:17:49 PM
All things are possible but I suspect that what you have suggested would be fraught with problems should not be undertaken lightly.  :-\
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 15, 2019, 10:15:14 PM
Duly warned off. Thanks for the guidance.
Title: Re: Once more thinking about setting up a RPi
Post by: IanG on June 20, 2019, 01:02:54 AM
If you have not yet acquired a pi, the 3B may be the best option. As the 3A does not have an Ethernet port, connecting to a headless version can be a challenge.

For headless access, I recommend the free ssh client from Bitvise, which makes it very easy to transfer files and issue commands.

https://www.bitvise.com/ssh-client (https://www.bitvise.com/ssh-client)

SD cards of 16 or 32 GB are not expensive these days. It's straightforward to download the Raspbian operating system from the raspberry pi site. To load it onto the card from a Windows PC, use Etcher.

https://www.balena.io/etcher/ (https://www.balena.io/etcher/)

As 'displaced' says, you must follow his procedure to enable ssh, otherwise enabling it needs a keyboard and screen.

For the IP address (which you asked about), the modem will tell you what it is initially. I find it simplest to allocate a new number from the modem, and then reboot the pi from the Bitvise command window, as headless connections are simpler if the IP number never changes. Alternatively, the raspberry pi forum gives details of how to fix it in the pi. As a conceit, I currently have a pi sitting at address x.y.3.142.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 20, 2019, 10:22:52 AM
Hi Ian, I need to explain. I’m in bed all day every day all the time and can’t sit upright at a desk for more than a few minutes or so most of the time. Pain strange sensations, terrible itching and dizziness, tiredness and lack of concentration are my main symptoms.
Chronic pain and ME/chronic fatigue syndrome is my diagnosis but I have a lot of other problem symptoms besides, caused by the medication. I can get to the bathroom right next door so it’s effectively en-suite (~10m) although I sometimes need a little help steadying myself.

 I don’t have a windows box. I do everything from a huge iPad (the biggest one, iPad Pro v1). I have a programmer’s powerful text editor, Textastic, and several SSH and telnet clients. For file transfer to/from the Pi I just use the integrated file-xfer-over-SSH facilities of Textastic. The showstopper for me has always been that I cannot do the initial setup of the pi when a keyboard mouse and display is required.

If someone were willing to get me past the point in the Pi setup where SSH-login from boot time would be enabled by default, then I would be self-sufficient, if that’s the word ?

I’m using Ubuntu on my hosted pi now. Ideally an AAarch64 build would be my dream, if such a thing even exists, as I could then do some modern ARM asm. But that’s just a dream and otherwise the o/s version doesn’t matter because I am new to these things, never used *nix until recently and extremely ignorant despite having been a professional asm and C programmer for 14 years.
Title: Re: Once more thinking about setting up a RPi
Post by: johnson on June 20, 2019, 11:11:05 AM
The showstopper for me has always been that I cannot do the initial setup of the pi when a keyboard mouse and display is required.

If someone were willing to get me past the point in the Pi setup where SSH-login from boot time would be enabled by default, then I would be self-sufficient, if that’s the word ?

As @displaced was saying there are now mechanisms in place so you can set up a pi completely headless (there may have been for a while now, but I only encountered them recently setting up a pi zero w for TV). You just need to place a certain file on the boot partition and edit the wireless config on the sd card. I guess that means its not really headless as you have to use something with a screen and sd card slot, but no TV or keyboard need to be attached to the pi. This would get you a raspbian system up and running.

Of course a friendly member could post you an sd card with this configured, but if you wanted to play with different distributions, or just recover from a (bad) command fumble it would be better if you could write your own base images to sd cards. Lightning to SD card readers seem available and cheap (~£7), but the question is is there anyway to write an .img file to the sd card from within iOS... a bit of googling and I am none the wiser, but shall keep looking.
Title: Re: Once more thinking about setting up a RPi
Post by: IanG on June 20, 2019, 11:17:24 AM
Thanks for the explanation, and sorry to hear you are unwell.

I can certainly send you a working SD card with the standard Raspbian, but that is a 32-bit OS. My linux skills are very limited, and definitely not up to recompiling kernels, but I might have a try at installing 64-bit Ubuntu Mate on an SD card, if you think it might suit you.

https://ubuntu-mate.org/raspberry-pi/ (https://ubuntu-mate.org/raspberry-pi/)

It is not clear if that installation can operate headless without serious tweaking. The text on the page leads to an alternative:

https://wiki.ubuntu.com/ARM/RaspberryPi (https://wiki.ubuntu.com/ARM/RaspberryPi)

You will obviously also need a good debugging environment, particularly if writing assembler. From a Windows PC one can run something like X410 (https://token2shell.com/x410/ (https://token2shell.com/x410/)) but have no idea if there is a way of connectting to the pi from an X Window client on the iPad. By the way, the ARM documentation on low level instructions and architecture details is foul compared to Intel's, with many documents being restricted to trusted partners.

As my knowledge has completely run out at this point, advice from others would be welcome.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 20, 2019, 11:17:52 AM
>You just need to place a certain file on the boot partition

And that’s the bit that I physically cannot do in bed, lacking the kit, and the pain and required concentration is too much.

> friendly member could post you an sd card
 :no: :blush: :help:

Title: Re: Once more thinking about setting up a RPi
Post by: johnson on June 20, 2019, 11:45:31 AM
Thinking about it a bit more, we should be able to "bootstrap" you into a position to tinker with aarch64 etc with 1 properly configured sd card, an RPI 3B+ (or any for that matter, but why not get the fastest?) and a £3 sd card reader (plus several spare sd cards of course).

With the one booting pi that can join your wifi or ethernet network and the reader attached you can flash more images to spare cards easily. Easy to edit the configs to change network settings or try a completely different OS. I suppose any target OS would still need to have ssh and networking set up just from file system access, but magical things can be done with chroot one you get that far down the rabbit hole.

As well as IanG's kind offer I am of course willing to help!

Would swapping micro sd cards in and out of the reader/pi on a bedside table be feasible?
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 20, 2019, 12:08:50 PM
>I can certainly send you a working SD card with the standard Raspbian

Wow. That’s incredible,.  ???

So as a sanity test, what we just boot it and ssh-login to it over the lan and that’s it.

[Posts crossed over there because two kindly nurses just arrived in my bedroom.]

You will of course need to let me know how much I owe you for the card?

Or I can get a card delivered to you, but I don’t know which model to buy and screwed things up on a previous attempt of this kind before because, so I was told, I bought the wrong card.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 20, 2019, 12:41:27 PM
> As well as IanG's kind offer I am of course willing to help!

A second wow. Thank you so much my good friend, once more I am in your debt.

Could I ask you and IanG to PM each other and arrange things. (Arm-wrestling :no: )

> Would swapping micro sd cards in and out of the reader/pi on a bedside table be feasible?

I could get my missus to make some room, shifting all the bottles medicine etc. We have mains already for multiple iPads, so yes it would be very much feasible.  ;D

Once the experimentation is done the Pi would go back to its home in the office. (Somewhere near the main switch.)

‘Today is really looking up, thanks to everyone.
Title: Re: Once more thinking about setting up a RPi
Post by: IanG on June 20, 2019, 12:42:22 PM
Quote
ssh-login to it over the lan and that’s it.

That indeed is about it. Obviously, you need the IP number to log in. The pi by default gets its number allocated by DHCP, normally from the modem/router, and will appear in its list of connected devices. If you are currently unable to see that list, let us know.

The other thing that might be problematic is your ssh client on the iPad, which I don't think you mentioned in this thread.  It would help to know what it is.

Oh, and while I think of it, if the pi is to sit on your bed for a while, a wireless link may be more convenient than an Ethernet cable. The pi 3, unlike earlier versions, has built-in WiFi. The Wi-Fi login username/password can be edited via ssh login on a pi 3 with a wired Ethernet connection, after which the same pi can be used wirelessly.


Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on June 20, 2019, 12:51:13 PM
Not sure if this is exactly what you are looking for, but I installed the image and it appears to do what it says. I have a aarch64 host running as described. See here (https://github.com/sakaki-/raspbian-nspawn-64)
I'll post some screenshots once I get VNC installed.

Andy.

Edit - Screenshot added.
Title: Re: Once more thinking about setting up a RPi
Post by: displaced on June 20, 2019, 03:26:56 PM
If it helps, I’ve used a bunch of ssh clients on my iPhone and iPad - never had any issues connecting to any sshd servers!

Ended up settling on the Prompt app:
https://apps.apple.com/gb/app/prompt-2/id917437289

Supoorts PKI auth, which is nice.

(don’t think it’s free, but it’s made by Panic Inc. who are a great Mac/iOS indie developer from the days of yore, so I don’t mind supporting their products)
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 20, 2019, 06:36:42 PM
I use Prompt for interactive login and the file-xfer capabilities of Textastic over SSH.

Vic that is an amazing discovery. Thank you so much. Someone has just done a huge amount of work there. I was simply looking for any AAarch64 *nix that has a shell and which can run gcc (and the rest of the gcc collection). But this is amazing.

I would like all you guys to liaise together if you would.

So these guys have arranged this complex load of trickery so that standard unrecompiled raspbian 32-bit binaries will run.

I don’t know about it but perhaps if one builds a 64-bit o/s and finds there’s not so much stuff to run in it then life is sad. But don’t you then just get the sources snd recompile them then. And find the bugs in porting. Maybe the raspbian shell and apps don’t port, not without getting into a world of bug fixing.

Perhaps someone will enlighten me.

Vic if you have the time could you do me a favour. Could you see if there is an AArch64 build of GCC or even better GDC (the D language - https://dlang.org ) I can do this myself once I get hold of the system I suppose.

Another general question. Is there a GCC cross-compiler for x86-64 target AAarch64 - ie something that can produce AArch64 object files? I just wondered, because it might be massively faster doing huge builds on an x86 box. But I don’t have one anymore so the question is only if academic interest but might help someone else. I suppose I could get a fast x86 box from somewhere.
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on June 21, 2019, 07:58:55 AM
Vic if you have the time could you do me a favour. Could you see if there is an AArch64 build of GCC or even better GDC (the D language - https://dlang.org ) I can do this myself once I get hold of the system I suppose.
Yes, I've been able to instal GDC in the 64 bit machine in the usual way.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 21, 2019, 10:17:28 AM

:sun:  :blush:   ;D   :congrats:  :drink:  :dance:  :linux:


Vic, that’s fantastic. You’re an absolute star.

Guys, that’s the one. Vic has found my dream o/s build. I really thought I was asking for my dream pony on the moon on a stick. Thanks to all. 


:blush:   ;D   :congrats:  :drink:  :dance:   :linux:   :sun:

Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on June 21, 2019, 12:58:08 PM
Happy to help and continue so if required. However, I am off on holiday at the weekend, so won’t be around for a couple of weeks. 

I was a little concerned initially about this build as I had a few hangs, but booting the SD card on a different Pi seems to be stable. I have been playing with it this morning and it hasn’t crashed. Also the initial WiFi configuration using the wizard failed to connect to my AP. I had to add pairwise=CCMP to the wpa_supplicant.conf file. Other than that it seems fine.
Title: Re: Once more thinking about setting up a RPi
Post by: IanG on June 21, 2019, 01:00:36 PM
Congratulations to Vic. I did download the experimental 64-bit Ubuntu Mate, and got it to boot on a pi, but failed to complete an SSH link. Don't ask, as the details are messy and probably embarrassing. :'(
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on June 21, 2019, 02:41:43 PM
It's enabled on the Raspberry Pi Configuration dialog Interfaces tab from the Preferences Menu.  :)
Title: Re: Once more thinking about setting up a RPi
Post by: burakkucat on June 21, 2019, 03:50:12 PM
 :congrats:
Title: Re: Once more thinking about setting up a RPi
Post by: johnson on June 21, 2019, 10:24:56 PM
Excellent news!

That raspbian-nspawn-64 project is some clever stuff. Had not heard of systemd-nspawn before, kind of like docker meets chroots.

So where are we at with getting cards and hardware to the right place?

Unfortunately I don't have a 64bit pi, only a zero and some first versions, so I wouldn't be able to test the nspawn aarch64 version. But can easily get a couple of 32/16gb cards and load up normal raspbian, set my wireless to the same SSID and keys as Weavers and test to the point of joining the network with ssh enabled. Will be good to have backup cards that work. Also not a problem procuring a card reader if your unsure of which one to get (its hard to go wrong though).

Have you ordered a 3B+ yet Weaver? Do you have a power supply/case (if you want one) etc in mind?

Edit: Also does anyone know if the initial set up that runs automatically that resizes the partitions and does some config set up do anything specific to the model? E.g setting a certain GPU/CPU memory ratio or copying firmware? Can see that as potential stumbling block if I do the initial boot on a zero and it sets things that dont work with much different 3B+. Guess I should google.
Title: Re: Once more thinking about setting up a RPi
Post by: IanG on June 21, 2019, 11:40:12 PM
Yes, it's the old problem of setting up something blind.

I have a pi 3 and spare SD card, which can easily be loaded with standard Raspbian. However, I signally failed to ssh to the pi from the wife's fairly old iPad (which I never use), but did ssh from PuTTY (which I don't use either) from a PC. If the iPad issue is only my ineptitude, I can load and send the card. Please advise. Regarding johnson's late addendum, I can also expand the file system to make available all space on the card.

As regards a case, the official red/white one is quite fetching, and would not look out of place in a boudoir. :)
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on June 22, 2019, 07:18:41 AM
Any compiler experts here? I thought I’d check out GDC was working and cobbled up a little “Hello Word!” test, but it didn’t work.

Code: [Select]
pi@debian-buster-64:~/Documents $ gdc hw.d
cc1d: error: cannot find source code for runtime library file 'object.d'
cc1d: note: dmd might not be correctly installed. Run 'dmd -man' for installation instructions.

(null):0: confused by earlier errors, bailing out
pi@debian-buster-64:~/Documents $

I understand GDC is a front end to GCC which I have installed, but it looks like there may be some other dependencies which are eluding me. Can anyone shine a light on this for me, it’s not my area of expertise. Thanks.
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on June 22, 2019, 07:29:43 AM
Edit: Also does anyone know if the initial set up that runs automatically that resizes the partitions and does some config set up do anything specific to the model? E.g setting a certain GPU/CPU memory ratio or copying firmware? Can see that as potential stumbling block if I do the initial boot on a zero and it sets things that dont work with much different 3B+. Guess I should google.
Post installation of the nspawn aarch64 version a basic configuration setup is done, however I had to later expand the SD card storage and tweek the WiFi settings. I also did an update/upgrade on both systems.
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on June 22, 2019, 07:35:19 AM
Regarding the setting up of Weaver's Pi, I am probably best placed having already a working configuration, but as I mentioned previously I am on holiday for a couple of weeks, so an unavoidable delay in this case. Probably need Weaver’s input and also complete inventory of what he needs installed on the card initially.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 22, 2019, 06:17:18 PM
I’ve just ordered a 3B+ complete kit now, from pi Hut. Probably would never be able to find the previous one anyway.

Vic thank you so much. There’s absolutely no hurry at at.

If the compiler spits out an error message then that means that it’s running, so all is good.

It looks like it thinks that the .d file (the d language source) is a .obj file produced by a c compiler or d compiler of some sort. (DLang is C ABI compatible and it can just call any C routine.) you can tell some d compilers to pull in other object files and libraries.

One other thing. Don’t need to be thinking about wireless lans as I won’t be going there. So I’d like testing over wireful Ethernet.

Here is a small-ish simple D source file https://forum.kitz.co.uk/index.php/topic,21771.msg378325.html#msg378325
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 22, 2019, 06:44:22 PM
It says that it is looking for ‘dmd’. That is a different D compiler. There are three compilers at the moment :

(i) DMD the reference compiler, always the most up-to-date. Not a great back-end, not focused in optimisation so the output code is not great. I think it’s x86 (and now oh x86-64 too)-only. Offers inline x86 asm.

(ii) GDC part of the GCC collection, which uses the GCC back end and some of the heavily adapted source donated from DMD. Produces stunning quality output as it would, bring just GCC with all the optimal ions and the same back end. Offers GCC-style in-line asm. (For any professor iirc)

(iii) LDC LLVM based compiler. Possibly the best quality output code. Supports inline any-cpu asm but annoyingly the interface to asm’s syntax is or was slightly different to that of GDC. That may have been changed now, can’t remember.

If you get any trouble with gdc, try the ldc compiler instead. LDC sometimes refers to itself as LDC2. (A version number which is going to be stuck there forever I think.)
Title: Re: Once more thinking about setting up a RPi
Post by: burakkucat on June 22, 2019, 06:57:26 PM
I wonder whether you would prefer the R-Pi to have a static RFC1918 IPv4 address, a publicly routable IPv4 address (from your A&A provided block) or a dynamically assigned IPv4 address?

That could then be configured in advance, before dispatch of the card. Likewise the turning off of the WiFi and lots of other little things . . .
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 22, 2019, 07:13:06 PM
Thank goodness Burakkucat reminded me of this,

Is it easy to get the pi to be a dhcp client ?

Rfc1918 would be a bit of a nuisance for me.
As Burakkucat says either a static IPv4 address (a total pain for you) or a DHCP-client supplied address (ideal for me).

After that, I would like a bit of help making sure it obeys the IPv6 prefix handed out by my router.

Yes, and turning off the WiFi so that it doesn’t cause interference with the existing WAPs - well remembered.


I remembered that at https://dlang.org there’s a hello world type simple .d source file - you can edit D source, build it and run it live in the site, it has an IDE wrapped around ever example program!

Take a look at void main():

Code: [Select]
{
    import std.algorithm, std.conv, std.stdio;

    "Starting program".writeln;

    // Sort a constant declaration at Compile-Time
    enum a = [ 3, 1, 2, 4, 0 ];
    static immutable b = sort(a);

    // Print the result _during_ compilation
    pragma(msg, text("Finished compilation: ", b));
}

Incredible, but not unusual for D, the entire thing is run during compilation !
Title: Re: Once more thinking about setting up a RPi
Post by: burakkucat on June 22, 2019, 09:04:10 PM
Is it easy to get the pi to be a dhcp client ?

They are DHCP clients by default, straight out of the box. If you are happy having your FB2700 handing out a static address to the R-Pi then there should be no problem.

Quote
After that, I would like a bit of help making sure it obeys the IPv6 prefix handed out by my router.

b*cat is an IPv6 illiterate.  :-[

Quote
Yes, and turning off the WiFi so that it doesn’t cause interference with the existing WAPs - well remembered.

Should be quite straightforward (and would be even simpler without the monster that is systemd).
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on June 22, 2019, 09:24:37 PM
I’m not convinced the compiler is 100%, but I’ll do a bit more work on it when I get back. I found some library packages which stopped the object.d error, but the wretched thing only complained about something else which I can’t recall at the moment. It’s quite difficult to find arm64 packages that are not “experimental”.

The current “build” is using DHCP and I spotted a IPv6 address on the interface too.  :)

Just update the thread whenever you think of something to be tweaked.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 23, 2019, 04:22:23 AM
My router hands out IPv4 addresses by DHCP and these addresses never change for known machines because I keep them all fixed by a MAC-to-IPv4 lookup table set up in the Firebrick.

I really don’t want to cause you a great deal of work fixing the the AArch64 build of GDC. But I won’t stop you ! :-) you really are a hero.

* Tip : Iain Buclaw is the man behind GDC. He’s the man to ask.
* Tip : The DLang.org forum (https://forum.dlang.org) is there for our pleasure too. I didn’t intend to recruit a kitizen to get the compilers sorted out. But of course I won’t say no to any help.
* I can use LDC instead of GDC on AArch64 if the one is ahead of the other.
* If AArch64 GDC is going to be a pain for you/me/us, then what I could do is leave this until things AArch64-related just mature a bit and then we could try again. Just to avoid you doing work which will be unnecessary later on when other people have sorted various bugs out. Would you prefer to just put things on hold for a while to save a lot of work?

Getting my own machine up on my own network will be good because it will save me the monthly rental costs of the hosted machine. Also I will be able to start trying out certain little project things that I currently can’t do because I have to be inside the network as an essential part of the job.

The current release builds of GDC and LDC have been completely solid and bug-free for many years now so someone somewhere should be able to sort things out. And given that x86-64 builds Must have been thoroughly tested - I mean who uses i686 IA-32 any more ? I had an x86-64 o/s back in 2006 (vista prof (ultimate) x64).
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on June 23, 2019, 06:14:07 AM
Fair enough. In reality you are probably better placed than I to sort it out, but it is bugging me.  :'(

I think the system image is probably pretty much ready to go in that case once I make any changes to disable WiFi etc. I’ll PM you my address so you can send me your SD card(s). I’ll keep a copy of the image here too just in case. I use a utility called ApplePi-Baker which makes cloning the SD cards, well, a piece of cake! I’ll send them back to you on my return from holiday if that's ok with you.

A.
Title: Re: Once more thinking about setting up a RPi
Post by: johnson on June 24, 2019, 12:35:55 PM
I’ve just ordered a 3B+ complete kit now, from pi Hut.

https://raspi.tv/2019/raspberry-pi-4-launches-with-bcm2711-quad-core-cortex-a72-64-bit-soc-running-at-1-5ghz-with-dual-4k-display-capability (https://raspi.tv/2019/raspberry-pi-4-launches-with-bcm2711-quad-core-cortex-a72-64-bit-soc-running-at-1-5ghz-with-dual-4k-display-capability)

Sods law!  :D
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 25, 2019, 05:51:04 AM
God that’s a little monster. :-)  I’m very pleased that they have finally got gigabit Ethernet.
Title: Re: Once more thinking about setting up a RPi
Post by: johnson on June 25, 2019, 08:29:34 AM
I'm sure the pi hut and other vendors are very much prepared for returns on all the 3B+ models sold over the weekend at the very least. They have a 7 day return policy.

No one would fault you if you wanted to return and upgrade.  :)
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on June 26, 2019, 09:55:09 PM
> No one would fault you

Apart from me myself. I wouldn’t feel right about it. :-)

The 3B+ arrived this afternoon.

Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on July 03, 2019, 01:16:20 PM
Is the Raspberry Pi 4 likely to be hardware-incompatible ? That is, would a Linux binary meant for the AArch64 and a RPI 3 just boot and run happily in an Rpi4 or would it need to be recompiled and rebuilt (at least) ?
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on August 06, 2019, 03:24:36 AM
After an incredible struggle, I finally managed to get my beloved to come upstairs and plug the pi in for me, putting the buts together and then finding it a suitable home with mains and wired Ethernet straight into the main switch.

After a bit of initial stupidity, couldn’t work out what the default username was, it was "pi" iirc, fired the Pi up, logged in and all was well.

I assigned it a good IPv4 address as usual via DHCP which points to a fixed routable address set by the Firebrick acting as DHCP server according to the Pi’s ethernet MAC address.

Have set usernames and passwords, usual mucking about with ‘screen’ which is mysterious to me but just does something wonderful.

Fired up gdc and built a hello world exe from minimal D source, got some nice AAarch64 (not 32-bit mode) asm source out of it with a gdc -S.

It’s a thing of beauty. Can’t thank vic0239, IanG, Johnson and other contributors enough. I’ve said this before, sincerely meant.

I know vic0239 told me he has kept a backup of the card image for me, but I ought to back the whole system up somehow, before I do too much damage.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on August 06, 2019, 05:35:12 AM
FYI, I have posted a request on the dlang forum (https://forum.dlang.org/group/gdc) for a bit of guidance regarding the error messages coming out of the GDC compile inside the guest o/s, ie within AAARCH64 Debian Buster 64.

I got the error message that our earlier kitizens did, of course, when I tried to run gdc-AArch64 executable inside the ds64-shell - about dmd not having been installed properly. That means something originally went wrong in the make when it was built. (Fyi: DMD is a different compiler which is not installed here and is not supposed to be. DMD is the reference D compiler (https://dlang.org), and some of its sources have been used in the build of GDC, with very extensive wrappers around them and then the GCC middle and back ends.)
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on August 06, 2019, 07:18:03 AM
Yahoo! Glad (and relieved) you've got it working to your satisfaction, Mrs W has done a good job.

If you have a USB SD card adapter there is an SD Card Copier app in Accessories. The process takes a while, but can be done in real-time.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on August 06, 2019, 07:36:02 AM
Good tip, thanks. That sound like something accessible in the gui ?

I got VNC going too. It’s a bit horrible trying to drive a mouse pointer in emulation, pushin an arrow around and then picking it up, I don’t think I will be using that method of driving the GUI.

I tried one iPad VNC app which seems to want to locate other machines to talk to by using Bonjour. I did a Bonjour-scan using various existing ipad tools but they did not find the Pi, not surprisingly. So I tried to get avahi/ zeroconf/mdns installed on the Pi, no errors in the host o/s, installation failed when apt-get ran in the guest o/s though with a load of IPv6-address related error messages about various files not being locatable at particular IP addresses.

So I haven’t got bonjour sorted out. I bypassed that by entering a fixed literal IPv4 address into my VNC viewer app, which will work anyway as the address is always fixed; it’s locked in dhcp to a permanent fixed value, by recognising the MAC address.

This systemd-nspawn stuff is indeed incredibly clever.
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on August 06, 2019, 07:46:23 AM
Yes, GUI menu option. The shortcut appears to run 'sudo -A dbus-launch piclone' which you could run from a terminal session.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on August 06, 2019, 08:03:01 AM
On the iPad there is an iOS Shortcuts thing now which can use SSH to run a command remotely, and I have put a convenience wrapper function round it to allow me to effectively do a remote procedure call with input parameters, it sends code over, and gets results back. I can even drive it from the Siri voice interface because there is a mapping between particular command voice phrases and Shortcuts’ functions to be executed. I’m going to be driving the Pi from the iPad as much as possible.

I am relying on the magic of ‘screen’ all the time, as before, because the stupid iPad keeps dropping the ssh connection all the time and would otherwise log me off and I’d lose everything. The iPad Textastic app is doing file transfer over ssh, so I am all set.
Title: Re: Once more thinking about setting up a RPi
Post by: Weaver on May 14, 2020, 06:55:13 PM
Is there a way of updating the Debian buster AArch64 o/s subsystem from within raspbian?    I read an article about just such a possibility but the procedure given perhaps didn’t apply to my system as it didn’t work in the slightest.

I can’t upgrade the GDC package within Debian Buster aarch64 either. I’m stuck with a really old version I suspect.
Title: Re: Once more thinking about setting up a RPi
Post by: vic0239 on August 04, 2020, 03:20:15 PM
Might this be of interest? Raspberry Pi OS (64 bit) beta (https://www.raspberrypi.org/forums/viewtopic.php?f=117&t=275370)
Flashed to a SD card and it has the GCC and GDC front end is available via apt.