DB 88F7040 Modular - MarvellEmbeddedProcessors/openwrt-dd GitHub Wiki
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 7040 DB (DB-88F7040-A1) 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))
Note
|
A7K has multiple serial interfaces. To connect to the serial console, select the /dev/ttyUSB0 |
Once the board is powered on, press any key to get into the u-boot shell.
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 network interface for the second RJ-45 port (GE1/CON61)
setenv ethprime egiga2 setenv ethact egiga2
Set the RSS support for the network driver:
setenv extra_params 'mvpp2x.queue_mode=1; mvpp2x.rss_mode=1
Set the image variables:
setenv ramfs_name openwrt-armada-a7k-7040-db-Image-initramfs setenv fdt_name armada-7040-db-A.dtb
Set the memory addresses. This may change depending on the number of installed packages:
setenv ramfs_addr 0x5000000 setenv fdt_addr 0x1500000
Set the bootargs:
setenv bootargs $console $mtdparts $extra_params 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
Create a new partition on the USB. In the example below /dev/sdb will be used.
Make sure you have selected the correct device on your host before you proceed any further!
First remove any existing partitions from the usb with the dd command:
sudo dd count=1 bs=512 if=/dev/zero of=/dev/sdb && sync 1+0 records in 1+0 records out 512 bytes copied, 0.00229965 s, 223 kB/s
Then create a new linux partition:
sudo fdisk /dev/sdb Disk /dev/sdb: 7.2 GiB, 7746879488 bytes, 15130624 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x2ebd3aca Command (m for help): o Created a new DOS disklabel with disk identifier 0xf07b8425. 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-15130623, default 2048): [enter] Last sector, +sectors or +size{K,M,G,T,P} (2048-15130623, default 15130623): [enter] Created a new partition 1 of type 'Linux' and of size 7.2 GiB. Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks.
Format the newly created partition as ext3:
sudo mkfs.ext3 /dev/sdb1
Mount the partition on the host:
sudo mount /dev/sdb1 /mnt
While in the OpenWrt directory, extract the roofs to the USB and copy the kernel and device-tree binary:
sudo tar -xf bin/mvebu64/openwrt-mvebu64-armada-a7k-7040-db-rootfs.tar.gz -C /mnt sudo mkdir -p /mnt/boot sudo cp bin/mvebu64/armada-7040-db-A.dtb /mnt/boot/ sudo cp bin/mvebu64/openwrt-armada-a7k-7040-db-Image /mnt/boot/ sync sudo umount /mnt
Plug the USB to the board and power it on. Press any key to get into the u-boot shell.
Set the environment variables:
setenv image_name openwrt-armada-a7k-7040-db-Image setenv fdt_name armada-7040-db-A.dtb setenv bootargs_root 'root=/dev/sda1 rw rootwait' setenv extra_params 'mvpp2x.queue_mode=1; mvpp2x.rss_mode=1' setenv bootargs $console $mtdparts $bootargs_root $extra_params setenv bootcmd 'usb start; ext2load usb 0:1 $kernel_addr /boot/$image_name; ext2load usb 0:1 $fdt_addr boot/$fdt_name; booti $kernel_addr - $fdt_addr'
To preserve the configuration across the reboot:
saveenv
Boot the board:
boot