ovosodo
2015-09-08, 07:22
This is what you get with Kali 2.0.1 stock image for Raspberry PI 2:
root@kali:~# free
total used free shared buffers cached
Mem: 762468 97792 664676 5416 10276 44072
-/+ buffers/cache: 43444 719024
Swap: 0 0 0
To assign almost all the 1GB RAM to the ARM CPU instead of the GPU you must:
1. Patch and rebuild the kernel.
2. Add to the FAT boot partition a config.txt file containing gpu_mem=16
Here is the Linux kernel patch:
446c446,447
< # CONFIG_HIGHMEM is not set
---
> CONFIG_HIGHMEM=y
> # CONFIG_HIGHPTE is not set
460a462
> CONFIG_BOUNCE=y
3516d3517
< CONFIG_MMC_SPI=m
4154a4156
> # CONFIG_DEBUG_HIGHMEM is not set
Here is the config.txt:
gpu_mem=16
This is what you should get after booting the patched Kali image:
root@kali:~# free
total used free shared buffers cached
Mem: 998136 152244 845892 13168 13464 84704
-/+ buffers/cache: 54076 944060
Swap: 0 0 0
Note: the used RAM is 150KB because stock Kali image starts in graphical mode, but you can disable lightdm autostart:
systemctl set-default multi-user.target
WARNING: while 256MB more memory is a big deal especially for text-mode usages, it may break SonicPI (http://sonic-pi.net/) and few other tricky apps.
A detailed tutorial on how-to cross-compile ARM (Rpi2) on a Kali 2.0 host VM or PC, and gain 256MB RAM on your Rpi2 is here: http://cybersecnow.blogspot.it/2015/09/kalipi-custom-build-how-to-cross.html
root@kali:~# free
total used free shared buffers cached
Mem: 762468 97792 664676 5416 10276 44072
-/+ buffers/cache: 43444 719024
Swap: 0 0 0
To assign almost all the 1GB RAM to the ARM CPU instead of the GPU you must:
1. Patch and rebuild the kernel.
2. Add to the FAT boot partition a config.txt file containing gpu_mem=16
Here is the Linux kernel patch:
446c446,447
< # CONFIG_HIGHMEM is not set
---
> CONFIG_HIGHMEM=y
> # CONFIG_HIGHPTE is not set
460a462
> CONFIG_BOUNCE=y
3516d3517
< CONFIG_MMC_SPI=m
4154a4156
> # CONFIG_DEBUG_HIGHMEM is not set
Here is the config.txt:
gpu_mem=16
This is what you should get after booting the patched Kali image:
root@kali:~# free
total used free shared buffers cached
Mem: 998136 152244 845892 13168 13464 84704
-/+ buffers/cache: 54076 944060
Swap: 0 0 0
Note: the used RAM is 150KB because stock Kali image starts in graphical mode, but you can disable lightdm autostart:
systemctl set-default multi-user.target
WARNING: while 256MB more memory is a big deal especially for text-mode usages, it may break SonicPI (http://sonic-pi.net/) and few other tricky apps.
A detailed tutorial on how-to cross-compile ARM (Rpi2) on a Kali 2.0 host VM or PC, and gain 256MB RAM on your Rpi2 is here: http://cybersecnow.blogspot.it/2015/09/kalipi-custom-build-how-to-cross.html