MACHIATOBin - 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 ---> MACHIATOBin (SolidRun Armada 8040 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))
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-8040-mcbin.dtb /mnt/boot cp bin/mvebu64/openwrt-armada-a8k-MACHIATOBin-Image /mnt/boot tar -xzf bin/mvebu64/openwrt-mvebu64-armada-a8k-machiatobin-rootfs.tar.gz -C /mnt sync umount /mnt exit
Plug the SD card into the board.
Once the board is powered on, press any key to get into the u-boot shell.
setenv fdt_name 'boot/armada-8040-mcbin.dtb' setenv image_name 'boot/openwrt-armada-a8k-MACHIATOBin-Image' setenv bootcmd 'mmc dev 1; ext4load mmc 1:1 $kernel_addr $image_name;ext4load mmc 1:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk1p1 rw rootwait; booti $kernel_addr - $fdt_addr'
To preserve the configuration across the reboot:
saveenv
Boot the board:
boot
setenv egiga2 # WAN port setenv serverip 192.168.x.x setenv ipaddr 192.168.x.x setenv fdt_name 'armada-8040-mcbin.dtb' setenv ramfs_name 'openwrt-armada-a8k-MACHIATOBin-Image-initramfs' setenv fdt_addr '0x1ff00000' setenv ramfs_addr '0x20000000' tftpboot $fdt_addr $fdt_name tftpboot $ramfs_addr $ramfs_name booti $ramfs_addr - $fdt_addr