Sunday, May 17

Fun with Kernels - Part 1





Prepping Raspberry Pi

  1. Installing software required to build the kernel
    1. apt-get install git -y  (14.0mb)
    2. apt-get install bc -y  (257kb)
    3. apt-get install libncurses5-dev -y   (37.4mb)
    4. apt-get install make -y   (1.294mb)
      1. apt-get install gcc make bc screen ncurses-dev
        if needed (wasn't needed)
  2. Downloading the kernel source code
    1. git clone --depth=1 https://github.com/raspberrypi/linux
      138.53mb
  3. Building first Test Kernel Build (8,480,100b Image file)
    1. cd linux
    2. make bcm2709_defconfig
      Raspberry Pi 2
      1. bcmrpi_defconfig
        Raspberry Pi 1's
    3. make  (8:02pm - 11:31pm)
      with an error - so not complete
    4. make (1:13am - 1:32am)
      finished
    5. make modules (1:33am - 1:37am)
    6. make modules_install (1:37am - 1:39am)
    7. cp arch/arm/boot/zImage   /boot/kernel7.img
      Copy the built kernel to boot sd card
  4. Second Test Kernel Build (8,480,100b Image file)
    with ".config" from /proc/config.gz
    1. zcat /proc/config.gz > .config
    2. cp .config linux/.config
    3. cd linux
    4. make (1:49am - 1:54am)
    5. make modules (1:54am - 1:58pm)
    6. make modules_install (1:59am - 2:01am)
  5. Third Test Kernel Build ( b Image file)
    1. make menuconfig
    2. make (2:21am - 2:40am)
      Error
      Makefile.build:263: recipe for target 'drivers/media/tuners/r820t.o' failed
      unable to handle kernel NULL pointer dereference at virtual address
    3. make (2:46am - 
    4. make modules (
    5. make modules_install

0 comments :

Post a Comment