Install on Dreamplug

Install Arch Linux ARM on other devices.

Install on Dreamplug

Postby fleger » Sat May 07, 2011 5:17 pm

I recompiled the kernel (2.6.38.3) without MTD support in a chrooted environment and it boots just fine.

Basically, here's what I did (assuming your plug is connected to the internet) in order to boot into Arch Linux ARM and have the rootfs on an external USB flash drive:
$this->bbcode_list('1')
  • Grab the latest rootfs archive and unpack it on an ext2/3/4 formated USB flash drive
  • Boot the original distro (Ubuntu or Debian) installed on the plug
  • Plug in the USB flash drive and mount it manually: $this->bbcode_second_pass_code('', 'mkdir -p /mnt/alarm && mount /dev/sdc1 /mnt/alarm')
  • Bind /dev: $this->bbcode_second_pass_code('', 'mount --bind /dev /mnt/alarm/dev')
  • Copy resolv.conf: $this->bbcode_second_pass_code('', 'cp /etc/resolv.conf /mnt/alarm/etc/resolv.conf')
  • Enter the chrooted environment: $this->bbcode_second_pass_code('', 'chroot /mnt/alarm /bin/bash -l')
  • Update the installed packages: $this->bbcode_second_pass_code('', 'pacman -Syu')
  • Install the necessary packages to build the new kernel: $this->bbcode_second_pass_code('', 'pacman -S base-devel git')
  • Here you may want to create a non-root user to use makepkg more easily
  • Clone the Arch Linux ARM repo: $this->bbcode_second_pass_code('', 'git clone git://github.com/archlinuxarm/PKGBUILDs.git')
  • Go to PKGBUILDs/core/kernel26 and run $this->bbcode_second_pass_code('', 'makepkg -o')
  • Run $this->bbcode_second_pass_code('', 'sed -i "s/CONFIG_MTD=y/CONFIG_MTD=n/" 2.6.38.config')
  • Run makepkg -g and use the output to replace the md5sums array in the PKGBUILD
  • Run makepkg -s to compile the kernel (takes a long time)
  • Install the generated packages: $this->bbcode_second_pass_code('', 'pacman -U kernel26-2.6.38.3-1.1-arm.pkg.tar.xz kernel26-headers-2.6.38.3-1.1-arm.pkg.tar.xz')
  • Mount the partition where U-Boot looks for the uImage: $this->bbcode_second_pass_code('', 'mkdir -p /mnt/uboot && mount /dev/sda1 /mnt/uboot')
  • Copy the uImage: $this->bbcode_second_pass_code('', 'cp -b /boot/uImage /mnt/uboot/uImage')
  • Reboot the plug, access the U-Boot prompt and type: $this->bbcode_second_pass_code('', 'setenv x_bootargs_root root=/dev/sdc1 rootdelay=10') This will tell the kernel that /dev/sdc1 (the USB flash drive) should be mounted as /. /dev/sda is the internal SD card. /dev/sda1 should be a FAT16 fs and contain the uImage. /dev/sda2 is the root fs of the original distro (ext2 fs). If you want to make this change permanent, type saveenv.
  • Type "boot". Arch Linux ARM should boot.

  • Admin edit: Made this the official mini how-to and changed the name to reflect our new one.
    fleger
     
    Posts: 2
    Joined: Sat Apr 30, 2011 9:52 am

    Re: Dreamplug?

    Postby fleger » Sat May 14, 2011 1:54 pm

    Short answer: the kernel image is on the internal MicroSD card and the rootfs is on a USB drive.

    Long answer: unlike the GuruPlug, the Dreamplug doesn't have internal NAND. However, it has an internal (built-in) 2 GB MicroSD card for the kernel image and the rootfs. Of course you can put your Arch Linux ARM rootfs on it if that's what you want.

    By default, the internal card card has two partitions:
    • a FAT16 partition containing the kernel image (sda1),
    • an EXT3 partition containing the Ubuntu rootfs (sda2).

    Uboot resides on a 2MB NOR flash.

    So if you want to put Arch Linux ARM on the internal MicroSD card, once you have a working kernel, just replace the original Ubuntu rootfs on sda2 with the Arch Linux ARM one and configure Uboot to tell the kernel to use /dev/sda2 as root:
    $this->bbcode_second_pass_code('', 'setenv x_bootargs_root root=/dev/sda2 rootdelay=10')
    fleger
     
    Posts: 2
    Joined: Sat Apr 30, 2011 9:52 am

    Re: Install on Dreamplug

    Postby primeroz » Mon Mar 26, 2012 8:06 pm

    followed this guide and it worked perfectly.

    Just one glitch i can remember , had to mount /proc inside the chroot or something would fail (can't remember what ... installed yesterday writing today :) )

    Just registered to forum to say thanks for the guide anyway!
    primeroz
     
    Posts: 1
    Joined: Mon Mar 26, 2012 8:02 pm

    Re: Install on Dreamplug

    Postby Bushman » Wed May 30, 2012 6:25 pm

    Dare I ask what happens when MTD support is not disabled?
    Bushman
     
    Posts: 1
    Joined: Sat Nov 12, 2011 6:46 pm


    Return to [Please read announcement] Community-Supported Devices

    Who is online

    Users browsing this forum: No registered users and 5 guests