Skip to content
Snippets Groups Projects
Commit 0c6bcea2 authored by minute's avatar minute
Browse files

LS1028A: add boot script, README

parent 3c06e979
Branches
Tags
1 merge request!74Build Rescue Image for MNT Reform 2 with RCM4-BPI (Amlogic A311D)
# MNT Reform LS1028A System Disk
These are the System Disk sources for the [Open Hardware LS1028A CPU Module](https://source.mnt.re/reform/mnt-reform-layerscape-ls1028a-som) for MNT Reform.
## Disk Structure
Currently, the system disk has to be manually put together from automated parts.
- Initialize SD card with 2 partitions:
1. 1GB FAT partition with boot files at 4MB offset (!) to make space for bootloader
2. Ext4 partition with enough space for the userland of current rescue `reform-system-image`
- Build and copy kernel `Image` and `fsl-ls1028a-mnt-reform2.dtb` to boot partition
- Copy the boot script `ls1028ardb_boot.scr` to boot partition
- Copy bootloader image to SD card at an offset of 4096 bytes: `dd if=bootloader/target/image.bin of=/dev/sdX bs=512 seek=8`
- If you need to use the integrated eDP PHY, obtain `mhdp_fw_1_0_51-dptx-hdcp-mcu2.bin` from NXP and copy as `mhdpfw.bin` to boot partition
## Kernel and DTB
- Generated by running `./mkkernel.sh`. Patches are in `kernel-patches`, DTS and config are in `kernel-dts-config`.
- The only patch vs mainline except for DTS is importing the Cadence MHDP DisplayPort PHY from the NXP kernel.
## RCW, ATF and u-boot
- The bootloader image is a bundle of RCW (Reset Configuration Word), ATF (ARM Trusted Firmware) and U-Boot, generated from source by the scripts (or `all.sh`) in `./bootloader`.
## Boot Script
- To update `ls1028ardb_boot.scr`, run: `mkimage -A arm -T script -C none -n "MNT LS1028A Boot" -d ls1028ardb_boot.scr.txt ls1028ardb_boot.scr`
- To move your filesystem root to eMMC, copy your userland to eMMC and change the `root=` kernel argument in the boot script to `root=/dev/mmcblk1p1`
File added
gpio set MPC@2310000_29; gpio set MPC@2310000_28; gpio set MPC@2310000_30; gpio set MPC@2320000_18; gpio set MPC@2320000_6; fatload mmc 0 $load_addr mhdpfw.bin; hdp load $load_addr 0x2000; setenv fdt_high 0xffffffffffffffff; setenv initrd_high "0xffffffffffffffff"; setenv dtb fsl-ls1028a-mnt-reform2.dtb; env exists kernel_image || setenv kernel_image Image;env exists devpart_boot || setenv devpart_boot 1; env exists devpart_root || setenv devpart_root 2;part uuid $devtype $devnum:$devpart_root partuuidr;setenv bootargs console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=/dev/mmcblk1p1 rw rootwait cma=512M@3G iommu.passthrough=1 arm-smmu.disable_bypass=0; load $devtype $devnum:$devpart_boot $kernel_addr_r $kernel_image;load $devtype $devnum:$devpart_boot $fdt_addr_r $dtb;booti $kernel_addr_r - $fdt_addr_r
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment