Results 1 to 2 of 2

Thread: Rpi2+Kali 2.0.1: how to get almost all the 1GB RAM instead of only 750MB

  1. #1
    Join Date
    2015-Aug
    Posts
    15

    Rpi2+Kali 2.0.1: how to get almost all the 1GB RAM instead of only 750MB

    This is what you get with Kali 2.0.1 stock image for Raspberry PI 2:
    Code:
    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:
    Code:
    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:
    Code:
    gpu_mem=16
    This is what you should get after booting the patched Kali image:
    Code:
    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:
    Code:
    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/...-to-cross.html
    Last edited by ovosodo; 2015-09-08 at 07:59.

  2. #2
    Join Date
    2015-Sep
    Posts
    8
    Thanks for the guide and resources. I already have a full package of Kali installed on my SD card.
    I installed the meta package which include all the available tools. So I did a fair share of downloading.
    Building the whole image again shall force me to download and install all those meta package tools once again which is time consuming and a pain.
    Instead, can I recompile and create just a 'patched-kernel-arm7l.deb' which can be installed via package manager ?
    Why a cross-compilation is necessary ? Because RPi2 doesn't have the power to compile fast ?
    If someone can create this kernel, can't this be shared on all the Kali RPi2 installs globally (except for the custom device drivers) ?

Similar Threads

  1. TFT 3.5" Screen w/ Kali Arm 2.1.2-rpi2
    By ApothLab in forum ARM Archive
    Replies: 2
    Last Post: 2016-12-23, 19:53
  2. Replies: 3
    Last Post: 2016-08-07, 15:59
  3. Updating Kali 1.1.0 to 2.0.1 - RPi2 - sound/others
    By mikrostart in forum ARM Archive
    Replies: 24
    Last Post: 2016-02-28, 08:32
  4. Kali 2.0 RPI2 image issues
    By tazdevil in forum ARM Archive
    Replies: 0
    Last Post: 2015-08-11, 22:43
  5. Replies: 2
    Last Post: 2015-04-16, 07:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •