New IT forum
17 July 2018, 07:51:34 am *
Welcome, %1$s. Please login or register.

: GertDuino now in stock.
 
Pages: [1]

Author Topic: Installing Debian 8 (Jessie) on Dreamplug  (Read 1171 times)

Don

  • Newbie
  • *
  • Posts: 5
Installing Debian 8 (Jessie) on Dreamplug
« on: 23 June 2017, 01:59:16 pm »

NewIt supply the Dreamplug with Squeeze (Debian 6) or Wheezy (Debian 7). When I asked,
they had "no plans" to supply it with a more modern version of Debian.

This describes the main steps (and pitfalls) in getting Debian 8 (Jessie, now Oldstable)
to install and run on a Dreamplug. First, some words of advice:

(a) A working JTAG is essential.

(b) A reasonably modern U-boot is required to boot Jessie.  The default U-boot that comes
    with the Dreamplug won't do. You will need at least U-boot 2014.10. A nice bonus of
    installing a modern U-boot is that it comes with eSata support, so it is possible to
    boot directly from an eSata disk. The debian archives have a U-boot that worked for
    me: search for "Debian U-boot armel". You will need the u-boot.kwb file.

(c) Backup your boot environment; installing a new U-Boot will overwrite it. You will need
    at least the definitions of ethaddr and eth1addr along with other mods you may want to
    preserve.

(d) Backup the boot partition of the internal SD card. It may be overwritten. This isn't
    a problem if you intend to install Jessie onto it, but may cause problems if you
    install somewhere else.
   
(e) The Debian-arm mailing list is a valuable source of information. If you hit a problem
    it is often possible to search the archives, discover that other people have had the
    same problem and how they solved it.

(f) (Mac specific): From Mavericks onwards, it is essentially impossible to use the JTAG
    interface without weakening the System Integrity Protection or disabling it
    altogether.

    The reason is that the standard Apple drivers do not recognise the Vendor Id and
    Product Id of the JTAG, so they don't load when you plug it in. You can get it to work
    by modifying the Info.plist file but it won't load unless you sign the modified driver
    with a "Kext signing certificate" ($99 per year) or disable the Kext signing checks of
    SIP.  The standard mac driver provided by FTDI also requires modification (FTDI say I
    should contact "the vendor" and see if they provide an updated driver). It would be
    very nice if Globalscale provided a signed driver for their hardware, but I'm not
    holding my breath.

    A workaround is to install Jessie inside a VM and then use the JTAG from there. This
    gives experience with the "network install" and also provides a useful platform to
    create the network install SD card that you'll use to install on your Dreamplug.

(g) Learn how to use U-boot: you'll probably be spending quite a bit of time staring at
    the Marvell>> command prompt. It's worth reading part 5 of the Denx manual (search for
    "U-boot manual"; it's the first hit).

(h) If you're planning to use eSata, having the disk in an enclosure that can also use USB
    is very useful.

The big picture is

(1) Prepare a "network install" SD card.
(2) Install a modern U-boot onto your Dreamplug.
(3) Use the prepared card to install Jessie onto your Dreamplug.
(4) Fix up the new boot environment.

(1) I created the card on my Jessie VM by using FDISK to clear the partition table and
    then created  a 500M boot partition and another partition that took the rest of the
    space. I used mkfs.fat to initialise the boot partition and mkfs.ext3 to format the
    second partition.  Then I copied the uImage and uInitrd files plus the u-boot.kwb
    files onto the boot partition. The following has some useful tips.
        http://www.cyrius.com/debian/kirkwood/sheevaplug/install

    Ignore the advice in the debian installation manual about "unpacking the media install
    tarball": there isn't one for armel (A documentation bug has been reported).

(2) is the scariest part. Get this wrong and you may end up with a brick, but the cyrius
    site above has very clear instructions. Afterwards, on my dreamplug, U-boot displays
    the following warning:
        Warning: your board does not use generic board.Please read
        doc/README.generic-board and take action. Boards not
        upgraded by the late 2014 may break or be removed.
    Potentially worrying. Some searching reveals that this "bug" has been fixed in a 2016
    version of U-boot. I decided to stick with the 2014.10 version which, apart from the
    warning, works just fine.

(3) To boot the network installer, you need to load the uImage and uInitrd files into
    memory and boot them. Your previous practice with the new U-boot will come in very
    handy at this point.

NB. There is a lot of advice telling you that you also need a dtb file to boot a Jessie
    kernel. Ignore it. If you do follow it, you may find that your installer kernel panics
    with   "Unable to mount root on an unknown block (0,0)".
    A mail topic from the debian-arm mail archive (Oct 2014: "Dreamplug-Jessie troubles")
    explains the problem. TL;DR just use two boot parameters and ignore the dtb file.

    The Network install can take quite a long time (hours) if you install onto the
    internal SD, but it's quicker if you are using a faster device. After the initial
    choices of which device and how to partition it, there isn't much interaction so it's
    possible to leave it chattering away through the JTAG serial port for as long as it
    takes. There's a point about half way through where you are asked to choose extra
    packages to load (GUI etc.) but that's about it.

    At the end, rather than finishing the installation, it's worth dropping in to a shell
    to see if the boot files are actually where the installer says they are.

    I installed onto an eSata disk. Most of the boot partition was there but the crucial
    uImage and uInitrd files were missing. This mail from debian-arm (Oct 2013 "Debian 7.0
    on Dreamplug basic installation and booting external sd card") explains: Basically the
    files have been put on /dev/sda, which is usually the internal SD card, rather than
    the target media.  Given this mail is about the _previous_ version of Debian to Jessie
    and it still does this, my guess is that the Debian developers don't want to fix it;
    the later messages of the thread imply that it's hard/impossible to get this right on
    every machine.

    If you can't see uImage and uInitrd in your boot partition (it's mounted in
    /Target/boot) then you may need to mount /dev/sda1 and copy the files from there.
    Check the creation date, it should be very recent. You might also want to restore the
    old files (which now have .bak extensions).

    I actually installed Jessie twice: once onto an eSata disk and once onto the internal
    SD card. A GUI-less install fits comfortably onto a 2GB card. I did this because of
    previous experience with booting from eSata, but it turns out not to be neccessary.

(4) The ability of U-boot 2014.10 to load from eSata devices makes a multi-boot
    environment much easier to produce than previously (which involved making a custom
    initramfs and using disk labels to pick the correct root). here is the boot
    environment I'm using. Note that I'm still using labels, but the initramfs is not
    customised. With this environment the Dreamplug first attempts to boot from the
    external SD card, then the eSata device and finally from the internal SD card. The
    delay caused by two failed attempts (fatload and ext2load) to boot from the external
    SD card makes the eSata boot slower but, for me, the extra flexibility is worth it.
   
------------------------------------------------------------------------------------------
Marvell>> printenv
addr_ftd=0x6c00000
addr_kernel=0x6400000
addr_ramfs=0x6800000
baudrate=115200
boot_debian=run initialise; $(load) $(addr_kernel) uImage; $(load) $(addr_ramfs) uInitrd; bootm $(addr_kernel) $(addr_ramfs)
boot_eSata=setenv bootargs $(x_bootargs_console) $(x_bootargs_eSata); setenv load ext2load ide 0:1; run boot_debian
boot_sda=setenv bootargs $(x_bootargs_console) $(x_bootargs_sda); setenv load ext2load usb 0:1; run boot_debian
boot_sdb=run fatboot_sdb; run ext2boot_sdb
bootcmd=run boot_sdb; run boot_eSata; run boot_sda
bootdelay=3
clear_kernel_memory=echo Clearing memory; mw $(addr_kernel) 0x0 0xc00000
eth1addr=F0:AD:4E:00:7B:B4
ethact=egiga0
ethaddr=F0:AD:4E:00:7B:B3
ext2boot_sdb=setenv bootargs $(x_bootargs_console) $(x_bootargs_sdb); setenv load ext2load usb 1:1; run boot_debian
fatboot_sdb=setenv bootargs $(x_bootargs_console) $(x_bootargs_sdb); setenv load fatload usb 1:1; run boot_debian
initialise=run clear_kernel_memory; usb start; ide reset
stderr=serial
stdin=serial
stdout=serial
x_bootargs_console=console=ttyS0,115200
x_bootargs_eSata=root=LABEL=dp-rootfs1
x_bootargs_sda=root=LABEL=dp-rootfs4
x_bootargs_sdb=root=/dev/sdb2

Environment size: 1200/4092 bytes
Marvell>>
------------------------------------------------------------------------------------------

Whilst I was doing this, Jessie changed from stable to Oldstable. The new stable is
Stretch (debian 9). I suspect that the same installation process, with the same pitfalls,
will apply to the new release, but I haven't tried it.

Don



Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!