while building Multi-arch support on Docker Desktop for a react app, arm64 is taking 10x more time than amd64 for npm installation and build, please help me to figure out something that will reduce the time for arm64
Related
When I try to add it to sources as per debian install instructions I get this error. I'm guessing this means that there are no arm packages for it.
Failed to fetch https://dist.crystal-lang.org/apt/dists/crystal/InRelease Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)
I'm guessing I probably need to install it from source. How would I go about doing that with an arm cpu? When I check it out and run make I get the error:
You need to have a crystal executable in your path! Makefile:113:
recipe for target '.build/crystal' failed make: *** [.build/crystal]
Error 1
Any suggestions would be greatly appreciated.
EDIT: There's now a semi-official repository for crystal on raspbian, check it out here: http://public.portalier.com/raspbian
Crystal doesn't build Debian packages for ARM, and you're correct in that you'll need to build from source.
However, the Crystal compiler is written in Crystal. This presents the obvious problem of how to get a compiler to build the compiler. The answer is cross-compilation: building an arm binary on a x86 desktop computer and copying it across.
Here's a quick step-by-step based on my memory of last time I cross-compiled:
Install Crystal on a x86 desktop PC, and check it works.
Install all required libraries on the desktop and Raspberry Pi. You'll need the same LLVM version on the Raspberry Pi and desktop. This is probably the hardest and longest step. You can install llvm 3.9 from debian testing for ARM, see this stackoverflow post for how to install only LLVM from debian testing.
Check out the sources from git on both computers, and run make deps.
Cross-compile the compiler by running this command in the root of the git repository:
./bin/crystal build src/compiler/crystal.cr --cross-compile --target arm-unknown-linux-gnueabihf --release -s -D without_openssl -D without_zlib
This command will create a crystal.o file in your current directory, and also output a linker command (cc crystal.o -o crystal ...).
Copy crystal.o to the raspberry pi, and run the linker command. Be sure to edit the absolute path to llvm_ext.o so that it points to the Crystal checkout on your Raspberry Pi, not the checkout on your desktop. Also make sure that all references to llvm-config in the command are for the correct LLVM version. For example, changing /usr/local/bin/llvm-config to llvm-config-3.9 on Raspbian.
Run the crystal executable in your current directory (./crystal -v) and make sure it works.
Ensure to set CRYSTAL_PATH environment variable is set to lib:/path/to/crystal/source/checkout/src so that the compiler can find the standard library when compiling applications.
I'm fairly new to Linux kernel development. It is certainly quite a bit different than the Windows kernel (I am a recovering Microsoft engineer). Can you provide advice on how to iterate effectively on updating modules that come with the Linux kernel?
Specifically, I am updating hid and bcm5974 to support the latest Macbook Pro (early 2015), and am using Ubuntu 15.04 (kernel 3.19). Would you recommend I test it out in a Virtual Machine? Are there ways to incrementally build instead of clean + build the whole tree? I'd love to be able to build just the affected modules but I can't find a good way to do that. The Makefiles are rather complicated.
Time to answer my own question. After doing a full build, incrementals are pretty straightforward given you're not editing headers that are consumed by other modules.
make modules SUBDIRS=drivers/input/mouse
Once I've installed the kernel from the full build, iterating on new module compilations is a breeze. sudo rmmod bcm5974. scp file from build desktop to Macbook Pro. sudo insmod bcm5974.
Docker only supports 64 bit x86 Linux, but people have made images for the Raspberry Pi with a 32 bit ARM processor. Will these work with the TK1? I am new to Docker. I am trying to put Jupyterhub on my TK1 to take advantage of the GPU via Gnumpy package for Python.
I am trying to achieve something similar to your goal. However, I am "Work in Progress", so I will try to give my best, and I will come later to make some edits if needed.
First of all, there is a docker.io package (the official Docker package on Ubuntu distributions) at ports.ubuntu.com (which is the default on the Jetson Tegra K1). This means that you can apt-get install docker.io, but it won't work because the kernel is not ready for it.
I have heard that the kernel is quite limited, but fortunately there is a guy at the developer zone who has prepared some nice kernel:
https://devtalk.nvidia.com/default/topic/823132/-customkernel-the-grinch-21-3-3-for-jetson-tk1-developed/
For the last version (yesterday: 26 April 2015) there is an interesting thing:
Added Docker support: POSIX_MQUEUE, CGROUP_PERF, CFS_BANDWIDTH
... which should enable the docker. I have yet to test this last version, I plan to do it soon.
Is there a cross-compile tool like mingw-w64 that will compile code on a Linux ARM system for a Linux x86 system?
I have a BeagleBone Black that is running Debian wheezy that I would like to use to as a build server. It should just sit in the corner and each night build the code from certain repositories.
I have run some tests and found that I can get it to build the windows versions using mingw-w64. However, when I looked at what I thought would be the Linux build I noticed that it was building for ARM. I figure it should be possible to build the Linux versions, but I can't find a cross-compiler.
I need to install libssl1.0.0 on a ubuntu 10.04 machine offline.
After lots of search, I still cannot find any libssl1.0.0 packages built for ubuntu 10.04. Building it from source is not accepted, because it takes several minutes to complete the build and installation process while I only have few seconds to finish the job.
Please advise me how to quickly install libssl1.0.0 on ubuntu 10.04 offline.
Finally I use checkinstall to build debian package from last version of source. If checkinstall does not exist in the system, it can be installed by apt-get install checkinstall. The rest of steps are:
tar xf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
./config --prefix=/usr shared
make
checkinstall
Then openssl_1.0.1e-1_amd64.deb will be available under openssl-1.0.1e folder.