DB 88F3720 DDR3 - MarvellEmbeddedProcessors/openwrt-dd GitHub Wiki

Image configuration

Go to the distribution working directory and update the repository and package feeds:

git fetch && git rebase
./scripts/feeds update -a
./scripts/feeds install -a

Invoke the image configuration dialog:

make menuconfig

In the menu, select the following:

Target System --->
    Marvell 64b Boards
Target Profile --->
    Marvell Armada 3720 DB (DB-88F3720-DDR3)
Target Images  --->
    [x] ramdisk  --->
    * Root filesystem archives *
    [x] tar.gz
    * Root filesystem images *
    [x] ext4  --->
[x] Advanced configuration options (for developers)  --->
    (/opt/kernel/openwrt-kernel) Use external kernel tree
Tip
Replace kernel_dir with the distribution kernel directory and kernel_branch with appropriate release version.

Utilizing the eMMC card

All required packages are already included by default. In case of doing a custom configuraition, enable the following packages for MMC support:

Kernel modules  --->
    Filesystems  --->
        (x) kmod-fs-ext4..................................... EXT4 filesystem support
        (x) kmod-fs-msdos................................... MSDOS filesystem support
    Other modules  --->
        (x) kmod-mmc............................................. MMC/SD Card Support
Utilities  --->
    Filesystem  --->
        (x) dosfstools...... Utilities for making and checking MS-DOS FAT filesystems
        (x) e2fsprogs.................................. Ext2/3/4 filesystem utilities
    disc  --->
       (x) fdisk.................................... manipulate disk partition table
       (x) lsblk................................................. list block devices

Build the image with make command. To speed up the build process, you can utilize multiple cores with the following command:

make -j$(($(nproc)+1))

Binary directories

The binaries will be generated in:

  • bin/mvebu64/ directory for the OpenWrt distribution

  • bin/target/mvebu64/generic/ for the LEDE.

Booting the image

Once the board is powered on, press any key to get into the u-boot shell.

Initramfs boot

On the host, start the tftp server in the binaries directory:

sudo in.tftpd -L -s (binaries directory)
Note
The rest of commands are executed from the board.

Set the server (PC) and client (board) IP:

setenv serverip 192.168.x.x
setenv ipaddr 192.168.x.x

Set the image variables:

setenv ramfs_name openwrt-armada-3720-db-Image-initramfs
setenv fdt_name armada-3720-db.dtb

Set the memory addresses. This may change depending no the number of installed packages:

setenv ramfs_addr 0x800000
setenv fdt_addr 0x4000000

Set the bootargs:

setenv bootargs $console $mtdparts
setenv bootcmd 'tftpboot $ramfs_addr $ramfs_name; tftpboot $fdt_addr $fdt_name; booti $ramfs_addr - $fdt_addr'

To preserve the configuration across the reboot:

saveenv

Boot the board:

boot

eMMC boot

Initamfs image will be used for formatting and preparing the eMMC card. Boot the image as described here.

Once the image is booted, format the eMMC card:

fdisk /dev/mmcblk0
Command (m for help): o
Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-7553023, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-7553023, default 7553023): +500M   # Size of your choice
Command (m for help): w
The partition table has been altered.
Cal[  153.711448]  mmcblk0: p1 p2
ling ioctl() to re-read partition table.
Syncing disks.

Format the newly created partition. Ext4 was used in example, but ext2, ext3 and vfat are also supported.

mkfs.ext3 /dev/mmcblk0p1
mke2fs 1.43.1 (08-Jun-2016)

Discarding device blocks: done
Creating filesystem with 15360 1k blocks and 3840 inodes
Filesystem UUID: 37e68e89-bac1-4934-8fa1-5ffaac638fb5
Superblock backups stored on blocks:
    8193

Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

Mount the partition, and copy the necessary files from the host. You can either get the http server on the host, or copy the needed files on the usb.

mount -t ext3 /dev/mmcblk0p1 /mnt/
cd /mnt
wget http://HOST_IP:8080/openwrt-mvebu64-armada-3720-db-rootfs.tar.gz
gunzip openwrt-mvebu64-armada-3720-db-rootfs.tar.gz
tar -xf openwrt-mvebu64-armada-3720-db-rootfs.tar
rm openwrt-mvebu64-armada-3720-db-rootfs.tar
mkdir boot && cd boot/
wget http://HOST_IP:8080/openwrt-armada-3720-db-Image
wget http://HOST_IP:8080/armada-3720-db.dtb
cd /
sync
umount /mnt

Reboot the board and set u-boot environment:

setenv image_name '/boot/openwrt-armada-3720-db-Image'
setenv fdtfile '/boot/armada-3720-db.dtb'
setenv bootcmd 'mmc dev 1; mmc rescan; ext2load mmc 1:1 0x2000000 $image_name;ext2load mmc 1:1 0x1000000 $fdtfile;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait rootdelay=3; booti 0x2000000 - 0x1000000'

To preserve the configuration across the reboot:

saveenv

Boot the board:

boot
⚠️ **GitHub.com Fallback** ⚠️