User Tools

Site Tools


hw:zynq:linux:petalinux:rootfs

This is an old revision of the document!


Root filesystem

  1. Install required packages:
    qemu-user-static debootstrap binfmt-support 
  2. Setup enviroment:
    export targetdir=rootfs
    export distro=stretch
    mkdir $targetdir
  3. Build the root file system: download the needed .deb packages and unpack it into $targetdir:
    sudo debootstrap --arch=armhf --foreign $distro $targetdir
    sudo cp /usr/bin/qemu-arm-static $targetdir/usr/bin
    sudo cp /etc/resolv.conf $targetdir/etc
    sudo chroot $targetdir
  4. Configure and install the root filesystem by running the .deb configuration scripts inside the emulated armhf architecture (this is why qemu-arm-static is needed)
    export distro=stretch
    export LANG=C
    /debootstrap/debootstrap --second-stage
  5. Setup APT:
    cat <<EOT > /etc/apt/sources.list
    deb http://ftp.ch.debian.org/debian/ $distro main contrib non-free
    deb-src http://ftp.ch.debian.org/debian/ $distro main contrib non-free
    deb http://security.debian.org/debian-security $distro/updates main contrib non-free
    deb-src http://security.debian.org/debian-security $distro/updates main contrib non-free
    deb http://ftp.ch.debian.org/debian/ $distro-updates main contrib non-free
    deb-src http://ftp.ch.debian.org/debian/ $distro-updates main contrib non-free
    EOT

    Disable the recommended and suggested packages automatic installation to reduce the root file system size:

    cat << EOT > /etc/apt/apt.conf.d/71-no-recommends
    APT::Install-Recommends "0";
    APT::Install-Suggests "0";
    EOT
  6. Install required packages:
    apt update
    apt install locales dialog
    dpkg-reconfigure locales
    apt install openssh-server ntpdate resolvconf sudo less hwinfo ntp tcsh zsh vim
/services/www/http/wiki/data/attic/hw/zynq/linux/petalinux/rootfs.1553089301.txt.gz · Last modified: 2019/03/20 14:41 by jakub.moron