Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add toradex apalis imx6 board configs #2

Merged
merged 3 commits into from
Apr 24, 2019

Conversation

deadloko
Copy link
Contributor

Greetings, this config's is working on my custom board. I was able to successfully build minimal image and boot into a root shell.

One thing I wonder though - minimal image is 2.2gb size, but there is no multimedia, heavy frameworks or x server, similar yocto images is only 100-200 mb size. Also, there are some x86 libraries that taking up some space:

[root@nixos-on-arm:~]# file /nix/store/k4mdai2d2qa5fdq2fflzan9ic6m43dz9-gcc-7.4.0/bin/gcc
/nix/store/k4mdai2d2qa5fdq2fflzan9ic6m43dz9-gcc-7.4.0/bin/gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /nix/store/64wbvpm20in97sxgx6pfy6xy5d56fa8m-glibc-2.27/lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, stripped

[root@nixos-on-arm:~]# du -sh /nix/store/k4mdai2d2qa5fdq2fflzan9ic6m43dz9-gcc-7.4
130M	/nix/store/k4mdai2d2qa5fdq2fflzan9ic6m43dz9-gcc-7.4.0/

@deadloko deadloko changed the title Toradex Apalis imx6 board configs Add toradex apalis imx6 board configs Apr 22, 2019
@deadloko
Copy link
Contributor Author

Unfortunately it won't build in travis, cause there is no cache in cachix, build causes full rebuild (cause of different cpu) and travis limit for entire job is 50m.

@illegalprime
Copy link
Owner

🎉
thank you @deadloko ! this board is pretty sweet. just saw thus so I'll review this PR tomorrow

@illegalprime
Copy link
Owner

re: size: yeah, recently @delroth and I did some work on removing x86 taint:
NixOS/nixpkgs#58606
NixOS/nixpkgs#59787

which brought the image size down to 1.5GB, we need to do more stripping:
NixOS/nixpkgs#21667 (comment)
NixOS/nixpkgs#15339

and finally the last remnants of x86 (build time contamination) should be eliminated by fixing patchShebangs:
NixOS/nixpkgs#33956
NixOS/nixpkgs#43833

the first gcc changes are included in the next branch, and I've been starting to track all the x86 contaminants of images in this file:
https://github.com/illegalprime/nixos-on-arm/blob/next/taint

so there's a lot of work to be done in decreasing size, apart from the above one could also try to disable things that NixOS installs by default, disable dependencies of some packages, etc.

hope that clears things up!

@illegalprime illegalprime self-requested a review April 23, 2019 04:20
@illegalprime
Copy link
Owner

code looks good, it's building on my machine so i'll approve when it finishes

@illegalprime illegalprime merged commit bb3c442 into illegalprime:master Apr 24, 2019
@illegalprime
Copy link
Owner

@deadloko if it still matters to you I got the image size down in master to 566MB
https://github.com/illegalprime/nixos-on-arm#a-note-on-image-size
there's still a lot of room to shrink the image, but it's a start.

@deadloko
Copy link
Contributor Author

@illegalprime It's good to know, now i may test and see if i can use nixos in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants