ESPRESSObin - 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 --->
    ESPRESSObin (Marvell Armada 3700 Community Board)
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.

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.

Flashing the image on the SD card

SD card will most likely be /dev/mmcblk0, we can can check with lsblk:

~$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 238.5G  0 disk
├─sda1        8:1    0   512M  0 part /boot
└─sda2        8:2    0   238G  0 part /
sr0          11:0    1  1024M  0 rom
mmcblk0     179:0    0   478M  1 disk
└─mmcblk0p1 179:1    0   478M  1 part

Clear the SD card:

sudo dd if=/dev/zero of=/dev/mmcblk0 bs=1M count=100

Create a new partition on the SD card and format it as ext3:

sudo su
fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x8e69d359.

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): [Enter]
First sector (2048-978943, default 2048): [Enter]
Last sector, +sectors or +size{K,M,G,T,P} (2048-978943, default 978943): +500M   # Size of your choice

Created a new partition 1 of type 'Linux' and of size 500 MiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
mkfs.ext3 /dev/mmcblk0p1

mke2fs 1.43.4 (31-Jan-2017)
Discarding device blocks: done
Creating filesystem with 1940224 4k blocks and 485760 inodes
Filesystem UUID: 8ad5dd7c-d595-4514-8ae6-cd64152d1631
Superblock backups stored on blocks:
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

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

Mount the partition and copy the rootfs on it:

mount /dev/mmcblk0p1 /mnt
mkdir -p /mnt/boot
cp bin/mvebu64/armada-3720-community.dtb /mnt/boot
cp bin/mvebu64/openwrt-armada-ESPRESSObin-Image /mnt/boot
tar -xzf bin/mvebu64/openwrt-mvebu64-armada-espressobin-rootfs.tar.gz -C /mnt
sync
umount /mnt
exit

Booting the image

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

SD card

setenv fdt_name 'boot/armada-3720-community.dtb'
setenv image_name 'boot/openwrt-armada-ESPRESSObin-Image'
setenv ethact 'neta0'
setenv set_bootargs 'setenv bootargs $console'
setenv bootcmd 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr'

To preserve the configuration across the reboot:

saveenv

Boot the board:

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