1 Reply Latest reply on Jan 30, 2016 2:00 AM by xbolshe

    Building Debian image using 3.19 kernel

    dfwJones

      Now that we mostly have the 3.19 kernel built the way we need it, my next problem is getting it to work with Debian.

       

      Up to this point we've been using the Debian environment we set up with the old 3.8.7 kernel. There are a few problems with out of date files, and we are seeing other problems like the segfault with libpthreads.

       

      This time the Debian stuff isn't going too well.  The kernel boots part way and then it hangs with this message:
      [....] The mptctl module is missing. Please have a look at the README.Debian.gz.[FAI failed!
      . ok

       

      We are trying to use Debian 7.9.  Is that a good version? Is there a newer one that works? Based on previous posts, there are apparently issues with 8.x. I also saw one post from someone saying they are using 7.3.

       

      Can someone take a look at the steps we are following to create the Debian environment and offer suggestions on how to fix it?

       

      Thanks.


      1. Prepare a new SD card - format to fat32 if neccessary, copy to SD the files built with kernel found in the ./tmp/deploy/images/quark/ directory
      image-full-quark.ext3
      core-image-minimal-initramfs-quark.cpio.gz
      bzImage
      grub.efi
      boot (directory)

      2. Set up a simple vm in virtualbox, and installed a minimal debian linux image in it.
      using Debian 7.9 net install image downloaded from here:
      http://cdimage.debian.org/mirror/cdimage/archive/7.9.0/i386/iso-cd/debian-7.9.0-i386-netinst.iso

      unselect all optional items to install then after it boots:
      apt-get update
      apt-get upgrade
      apt-get install rsync
      apt-get install ssh

      3. Create a 3.5GB empty file, and run mkfs.ext3 on it to create a filesystem

      dd if=/dev/zero of=file bs=1024 count=3500000
      mkfs.ext3 file.ext3

      4. Mount that filesystem in loopback mode and rsync the root filesystem from the vm into there.

      mkdir /mnt/ext3dst
      losetup -v -f file.ext3
      mount -t ext3 /dev/loop0 /mnt/ext3dst
      rsync -aAXv –exclude={“/dev/“,”/proc/“,”/sys/“,”/tmp/“,”/run/“,”/mnt/“,”/media/“,”/lost+found”,”/root/“,”/lib/modules/*”} / /mnt/ext3dst

      5. Mount the image-full-quark.ext3 file from the sd card via loopback and copy over /lib/modules/ folder

      losetup -v -f image-full-quark.ext3
      mount /dev/loop1 /mnt/ext3src
      cp -iR /mnt/ext3src/lib/modules/3.19.8.yocto-standard /mnt/ext3dst/lib/modules

      6. Unmount both loopback filesystems, and copy the new 3.5GB image file to the SD card to replace the original one

      umount /mnt/ext3src
      umount /mnt/ext3dst

      7. Put SD card into Galileo and boot.