Installing Debian on GuruPlug Server Plus

by

in

Let’s hookup our GuruPlug JTAG board as described in GuruPlug serial connection post.

Latest debian testing images for GuruPlug may be found here.

Boot up the device:

=> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... Device NOT ready
   Request Sense returned 02 3A 00
3 Storage Device(s) found
=> usb part
## Unknown partition table type 0


Partition Map for USB device 1  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type


Partition Map for USB device 2  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7852032         77e6cfe3-01     0b

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

 

Load images to a NAND temporary location

=> fatload usb 2:1 0xa000000 uImage 
reading uImage
2058146 bytes read in 98 ms (20 MiB/s)
=> fatload usb 2:1 0xa200000 uInitrd 
reading uInitrd
10713133 bytes read in 411 ms (24.9 MiB/s)

0xa000000 is the same temp location as I used for u-boot, and the 0xa200000 location is the location after uImage (uImage 2058146 bytes in hex is 0x1F67A2, so we added 0x200000 to the uImage location). Exact address doesn’t matter, but You shouldn’t choose address that is going to overwrite uImage.

 

Set the bootargs for the install, and boot the images from the temporary locations:

=> setenv bootargs console=ttyS0,115200 base-installer/initramfs-tools/driver-policy=most
=> bootm 0xa000000 0xa200000
## Booting kernel from Legacy Image at 0a000000 ...
   Image Name:   Debian kernel
   Created:      2017-01-27  22:23:37 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2058082 Bytes = 2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 0a200000 ...
   Image Name:   debian-installer ramdisk
   Created:      2017-01-27  22:23:37 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    10713069 Bytes = 10.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[...]

After output we get this:

So we got the install working!

 

The whole Debian install process is the standard one, so I won’t get into details there. Install as You would do on a normal PC.
Or You may take a peak at the sceenshot’s in Debian install to SD card post pictures.

When install is finished, reboot the device and hit any key to stop autobot.

U-Boot 2016.11+dfsg1-3 (Dec 22 2016 - 04:44:44 +0000)
Marvell-GuruPlug

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
IDE:   ide_preinit failed
Hit any key to stop autoboot:  0 
=>

 

Using the “usb part” command we may identify the device number where our boot images are installed.

=> usb part
## Unknown partition table type 0


Partition Map for USB device 1  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     63              449757          85aefcda-01     83 Boot
  2     449820          6490260         85aefcda-02     83
  3     6940080         1012095         85aefcda-03     05 Extd
  5     6940143         1012032         85aefcda-05     82


Partition Map for USB device 2  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7852032         77e6cfe3-01     0b

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

So it’s the first device, and the boot images are located on the first “boot” partition (1:1).

=> ext2ls usb 1:1
<DIR>       1024 .
<DIR>       1024 ..
<DIR>      12288 lost+found
          158068 config-4.9.0-1-marvell
         2044480 vmlinuz-4.9.0-1-marvell
<SYM>         26 initrd.img.old
<SYM>         23 vmlinuz.old
<DIR>       1024 dtbs
         1756842 System.map-4.9.0-1-marvell
<SYM>         26 initrd.img
<SYM>         23 vmlinuz
<SYM>         54 dtb-4.9.0-1-marvell
           10522 dtb
        12176783 initrd.img-4.9.0-1-marvell
         2055066 uImage
        12176847 uInitrd
<SYM>         54 dtb.bak
         2055066 uImage.bak
        12175156 uInitrd.bak

We need uImage and uInitrd files

Let’s set boot environment variables, and reset the device

=> setenv bootargs_console 'setenv bootargs console=ttyS0,115200 root=/dev/sdb2'
=> setenv boot_usb 'usb start; ext2load usb 1:1 0xa000000 /uInitrd; ext2load usb 1:1 0xb000000 /uImage'
=> set bootcmd 'run bootargs_console; run boot_usb; bootm 0xa000000 0xb000000'
=> saveenv
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xe0000 -- 100% complete.
Writing to NAND... OK

This should be self explanatory. Root partition describes where the / partition is.
Second line starts the usb support and loads uInitrd and uImage to their temporary locations on the NAND flash.
The third line is to basically execute everything.

U-Boot 2016.11+dfsg1-3 (Dec 22 2016 - 04:44:44 +0000)
Marvell-GuruPlug

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
IDE:   ide_preinit failed
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... Device NOT ready
   Request Sense returned 02 3A 00
2 Storage Device(s) found
2055066 bytes read in 386 ms (5.1 MiB/s)
12176847 bytes read in 1226 ms (9.5 MiB/s)
## Booting kernel from Legacy Image at 0a000000 ...
   Image Name:   kernel 4.9.0-1-marvell
   Created:      2017-02-13  18:56:35 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2055002 Bytes = 2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 0b000000 ...
   Image Name:   ramdisk 4.9.0-1-marvell
   Created:      2017-02-13  18:56:36 UTC
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    12176783 Bytes = 11.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0-1-marvell (debian-kernel@lists.debian.org) (gcc ver)
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt:Machine model: Globalscale Technologies Guruplug Server Plus
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 138
[...]

Everything seems to be booting fine.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.