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:
  1. Grab the latest rootfs archive and unpack it on an ext2/3/4 formated USB flash drive
  2. Boot the original distro (Ubuntu or Debian) installed on the plug
  3. Plug in the USB flash drive and mount it manually:
    Code: Select all
    mkdir -p /mnt/alarm && mount /dev/sdc1 /mnt/alarm
  4. Bind /dev:
    Code: Select all
    mount --bind /dev /mnt/alarm/dev
  5. Copy resolv.conf:
    Code: Select all
    cp /etc/resolv.conf /mnt/alarm/etc/resolv.conf
  6. Enter the chrooted environment:
    Code: Select all
    chroot /mnt/alarm /bin/bash -l
  7. Update the installed packages:
    Code: Select all
    pacman -Syu
  8. Install the necessary packages to build the new kernel:
    Code: Select all
    pacman -S base-devel git
  9. Here you may want to create a non-root user to use makepkg more easily
  10. Clone the Arch Linux ARM repo:
    Code: Select all
    git clone git://github.com/archlinuxarm/PKGBUILDs.git
  11. Go to PKGBUILDs/core/kernel26 and run
    Code: Select all
    makepkg -o
  12. Run
    Code: Select all
    sed -i "s/CONFIG_MTD=y/CONFIG_MTD=n/" 2.6.38.config
  13. Run makepkg -g and use the output to replace the md5sums array in the PKGBUILD
  14. Run makepkg -s to compile the kernel (takes a long time)
  15. Install the generated packages:
    Code: Select all
    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
  16. Mount the partition where U-Boot looks for the uImage:
    Code: Select all
    mkdir -p /mnt/uboot && mount /dev/sda1 /mnt/uboot
  17. Copy the uImage:
    Code: Select all
    cp -b /boot/uImage /mnt/uboot/uImage
  18. Reboot the plug, access the U-Boot prompt and type:
    Code: Select all
    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.
  19. 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:
Code: Select all
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 1 guest