installing visual studio code on debian buster and the raspberry pi 4 model b rev 1.4

A long winded title to announce that I’ve managed to create a deb file from Visual Studio Code source, and to install it on the Raspberry Pi 4 8GiB running Debian Buster 64-bit compiled for arm64.

The deb file was built on the Jetson Xavier NX board, then copied to a thumb drive, then moved over via the thumb drive over to the Rasbperry Pi and installed from there. So far it’s behaved reasonably well. I’ve learned quite a bit about the build tools that come with the source. I suppose it’s good that I found some of the directions I did on the web, but now that I’ve gone through this whole process a number of times, what I used to start with short circuits what is available in the source tree cloned from GitHub.

I appreciate that I can use the Jetson NX as a build system. I also appreciate that there is a method in the source tree for building the deb file. That to me is super. Now I can keep up with releases, knowing I can target 64-bit ARM binaries for Debian/Ubuntu.

And speaking of Debian, the 64-bit OS running on the Raspberry Pi now identifies itself simply as Debian.

Once I feel comfortable running the full build suite in Visual Studio Code I’ll post a streamlined how-to for ARMv8/aarch64/arm64. Too many labels, frankly.

raspberry pi 4 8gb — first powerup and initial impressions


In what is a personal first for me, I ordered a newly announced Raspberry Pi variant the day it was announced and had it fulfilled the same day as the announcement. I ordered it last Thursday, it shipped Friday the next day, and I received it via the post yesterday Monday. I wasn’t quite giddy with excitement, but I was in something of a very mild state of shock (mild, I tell you).

Identity

Here’s what my tool rpinfo.sh returns for this board:

 Raspberry Pi 4 Model B Rev 1.4

         CPU Type : Cortex-A72
       Core Count : 4
         Hardware : BCM2835
         Revision : d03114
         MemTotal : 7.58233 GB
   Kernel Release : 5.4.42-v8+
   OS Description : Debian GNU/Linux 10 (buster)

Memory and Memory Usage

In order to get this one going I also installed the pre-announced 64-bit Raspberry Pi OS. Note that it’s not officially Raspbian any longer, although that’s what it still announces itself as. But the 64-bit build is real enough for the kernel and all the tools I’ve checked so far. What is more significant is the ability to see all 8 GiB of memory on the board. Here’s a copy of a terminal with htop running.

Open up the image and check the Mem line at the top, and you’ll see the footprint currently at 944 MiB with a total of 7.58 GiB of memory (remember that part of this is reserved for the graphics processor and display). And that’s with Chromium on the desktop with a number of open tabs, including a tab to write this post on my blog.

In order to get that 2 GiB of swap I had to modify /etc/dphys-swapfile per my post here: https://arcanesciencelab.wordpress.com/2019/08/03/increasing-swapfile-space-on-the-raspberry-pi-4/. Rather than pick anything larger than 2 GiB I followed my original instructions. I’ll figure out later if I want more than that.

And the reason swap was bumped up is that it still comes pre-configured with only 100 MiB of swap out-of-the-box. I know this is a pre-release, but 100 MiB on any of the 64-bit Raspberry Pi boards is like driving a Porsche Taycan on four midget spare tires. I could see it come configured with 1GB at a minimum, but not 100 MiB. That’s as bad as still offering a paltry 16 GiB micro SDHC card to boot from. A standard for these boards and all other 64-bit Raspberry Pi boards is 64 GiB. Even a good (SanDisk, for example) 64 GiB micro SDXC card is inexpensive enough to give to a new user.

Thermals

The original Raspberry Pi 4B was, for all practical purposes, a credit card-sized space heater. Merely booting up the 4 was enough to send its temperatures to 70°C, and doing any work pushed it up to throttle. To the credit of the developers, they managed to claw back operating overhead over a series of firmware releases aimed primarily at the USB controller, but it was never enough in my opinion. To this day I run my 2GiB and 4GiB boards in Flirc cases. The 1GiB sits in its anti-static bag to this day.

But this version of the 4 runs in open air without those issues. Depending on the load it runs 10°C to 20°C cooler with this version of 64-bit Raspbian. I’m attributing this to the overall re-design of the board for the 8 GiB memory chip. And it may even have some additional tweaks in both firmware and the Linux kernel.

It will still need a cooling solution if it’s going to be packaged and deployed as an embedded system, so there’s still that. Since learning to use and appreciate small fans on the Jetson Nano and NX I’m now looking for something similar that will still allow me to use the various HATs I’ve picked up over time.

Power

THEY FIXED THE USB C CONNECTOR POWER ISSUE!

I have been powering this board with an Anker PowerPort Atom III 60W supply, and it works just fine. None of my earlier 4s (1, 2, or 4 GiB) work with anything other than the official 20W power supply, and that’s a big problem.

Third Party Software

I’ve install 64 bit versions of Go (go1.14.4), Rust (1.43.1) and Julia (1.4.2). All of them work just fine. Once 64 bit Raspbian is official, then it will be far easier to find and install the latest languages and tools. I was struck time and again how easy it was to work on aarch64 Ubuntu on the Jetson Nano and NX, compared to the 32 bit version of Raspbian. That impediment on the Raspberry Pi 4 is about to go away.

Final Conclusion

Buy this one. Don’t get the 2 or 4 GiB (they stopped selling the 1 in May 2020). Get the 8 GiB and move on.