全部博文(51)
分类: LINUX
2019-07-20 18:01:07
Marvell linux must apply with MUSDK provided kernel patches(see patches/linux in musdk repo and relevant documentation).
U-boot version used: u-boot-2018.03-armada-18.09
Kernel version used: linux-4.14.22-armada-18.09
MUSDK version used: musdk-armada-18.09
recommended toolchain version: gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
wget tar xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
# set PATH # export PATH=$PATH:/home/mcbin/toolchain/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin |
Compile according to the instructions given by the web page
recommended version: u-boot-2018.03-armada-18.09
This page is about update boot through network, In addition, you can use the USB Flash drive to update boot as following instructions:
Marvell>> usb reset Marvell>> bubt flash-image.bin spi usb Marvell>> reset Marvell>> env default -a Marvell>> env save
|
Make sure that the MACCHIATObin board does not experience power loss during the entire updating process, otherwise it will be bricked due to an unfinished bootloader update.
Among one of file systems supported by MACCHIATObin is the Ubuntu file system. you can either build the file system manually or download a prebuilt SD card image.
This software page provide a compiled kernel image. If want to compile kernel on MACCHIATObin board, You can use this official image temporarily to start the board.
Please see following link as reference about how to setup Marvell board
Instructions of the page is suit for 17.10,
U-Boot 18.09:
Using Micro SD card:
Marvell>> setenv image_name boot/Image Marvell>> setenv fdt_name boot/armada-8040-mcbin.dtb Marvell>> setenv bootmmc 'mmc dev 1; ext4load mmc 1:1 $kernel_addr_r $image_name;ext4load mmc 1:1 $fdt_addr_r $fdt_name;setenv bootargs $console root=/dev/mmcblk1p1 rw rootwait pci=pcie_bus_safe cpuidle.off=1; booti $kernel_addr_r - $fdt_addr_r' Marvell>> saveenv Marvell>> run bootmmc |
Using USB Stick:
Marvell>> setenv image_name boot/Image Marvell>> setenv fdt_name boot/armada-8040-mcbin.dtb Marvell>> setenv bootusb 'usb reset; ext4load usb 0:1 $kernel_addr_r $image_name;ext4load usb 0:1 $fdt_addr_r $fdt_name;setenv bootargs $console root=/dev/sda1 rw rootwait pci=pcie_bus_safe cpuidle.off=1;booti $kernel_addr_r - $fdt_addr_r' Marvell>> saveenv Marvell>> run bootusb |
The procedures to build kernel from source is almost the same, but there are still some points you need to pay attention to on MACCHIATObin board. Download Kernel Source:
mkdir -p ~/kernel/4.14.22 cd ~/kernel/4.14.22 git clone . git checkout linux-4.14.22-armada-18.09
Download MUSDK Package Marvell User-Space SDK(MUSDK) is a light-weight user-space I/O driver for Marvell's Embedded Networking SoC's. The MUSDK library provides a simple and direct access to Marvell's SoC blocks to networking applications and networking infrastrucutre:
mkdir -p ~/musdk git clone . git checkout musdk-armada-18.09
Linux Kernel needs to be patched and built in order to run MUSDK on the MACCHIATObin board:
cd ~/kernel/4.14.22/ git am ~/musdk/patches/linux-4.14/*.patch
Replace the default kernel configuration file with defconfig-mcbin-edge which enable necessary kernel modules needed by running kubernetes, also calico:
cp defconfig-mcbin-edge ~/kernel/4.14.22/arch/arm64/configs/mvebu_v8_lsp_defconfig
and then compile the kernel:
export ARCH=arm64 make mvebu_v8_lsp_defconfig make -j$(($(nproc)+1))
Script is provided to facilitate build of the kernel image, the developer needs to run with root privileges:
./setup-macbin-kernel.sh脚本链接:/blob/master/MACCHIATObin/setup-macbin-kernel.sh
If kernel is compiled on the MACCHIATObin board, you can easily update kernel using the following instructions:
cd ~/kernel/4.14.22 make modules_install cp ./arch/arm64/boot/Image /boot/ cp ./arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtb /boot/ sync reboot
and also refer to the wiki for MACCHIATObin to boot from removable storage.