Initial Commit
- initial default booting image
This commit is contained in:
26
board/bsh/imx8mn-bsh-smm-s2/flash.sh
Executable file
26
board/bsh/imx8mn-bsh-smm-s2/flash.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
OUTPUT_DIR=output
|
||||
else
|
||||
OUTPUT_DIR=$1
|
||||
fi
|
||||
|
||||
if ! test -d "${OUTPUT_DIR}" ; then
|
||||
echo "ERROR: no output directory specified."
|
||||
echo "Usage: $0 OUTPUT_DIR"
|
||||
echo ""
|
||||
echo "Arguments:"
|
||||
echo " OUTPUT_DIR The Buildroot output directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
IMAGES_DIR=${OUTPUT_DIR}/images
|
||||
|
||||
${OUTPUT_DIR}/host/bin/uuu -v -b ${IMAGES_DIR}/nand-full.lst \
|
||||
${IMAGES_DIR}/flash.bin \
|
||||
${IMAGES_DIR}/flash.bin \
|
||||
${IMAGES_DIR}/rootfs.ubifs \
|
||||
${IMAGES_DIR}/Image \
|
||||
${IMAGES_DIR}/freescale/imx8mn-bsh-smm-s2.dtb
|
||||
|
||||
31
board/bsh/imx8mn-bsh-smm-s2/nand-full.lst
Normal file
31
board/bsh/imx8mn-bsh-smm-s2/nand-full.lst
Normal file
@@ -0,0 +1,31 @@
|
||||
# @_flash.bin | bootloader
|
||||
# @_image [_flash.bin] | image burn to nand, default is the same as bootloader
|
||||
# @_filesystem | filesystem to burn
|
||||
# @_kernel | kernel image
|
||||
# @_dtb | dtb image
|
||||
|
||||
# This command will be run when ROM support stream mode
|
||||
# i.MX8QXP, i.MX8QM
|
||||
SDPS: boot -f _flash.bin
|
||||
|
||||
FB: ucmd setenv fastboot_buffer ${loadaddr}
|
||||
FB: download -f _image
|
||||
FB[-t 10000]: ucmd nand erase.chip
|
||||
|
||||
# Burn image to nandfit partition if needed
|
||||
FB: ucmd if env exists nandfit_part; then nand erase.part nandfit; nand write ${fastboot_buffer} nandfit ${filesize}; else true; fi;
|
||||
FB: ucmd nandbcb init ${fastboot_buffer} nandboot ${filesize}
|
||||
|
||||
FB[-t 10000]: ucmd ubi part nandrootfs
|
||||
FB[-t 10000]: ucmd ubi create root -
|
||||
FB: download -f _filesystem
|
||||
FB[-t 60000]: ucmd ubi write ${loadaddr} root ${filesize}
|
||||
|
||||
FB: download -f _kernel
|
||||
FB[-t 10000]: ucmd nand write ${loadaddr} nandkernel ${filesize}
|
||||
|
||||
FB: download -f _dtb
|
||||
FB[-t 8000]: ucmd nand write ${loadaddr} nanddtb ${filesize}
|
||||
|
||||
FB: reboot
|
||||
FB: done
|
||||
6
board/bsh/imx8mn-bsh-smm-s2/post-build.sh
Executable file
6
board/bsh/imx8mn-bsh-smm-s2/post-build.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
cp ${BOARD_DIR}/nand-full.lst ${BINARIES_DIR}
|
||||
75
board/bsh/imx8mn-bsh-smm-s2/readme.txt
Normal file
75
board/bsh/imx8mn-bsh-smm-s2/readme.txt
Normal file
@@ -0,0 +1,75 @@
|
||||
i.MX8MN BSH SMM S2
|
||||
==================
|
||||
|
||||
This tutorial describes how to use the predefined Buildroot
|
||||
configuration for the i.MX8MN BSH SMM S2 board.
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
Configure buildroot:
|
||||
|
||||
$ make imx8mn_bsh_smm_s2_defconfig
|
||||
|
||||
Change settings to fit your needs (optional):
|
||||
|
||||
$ make menuconfig
|
||||
|
||||
Compile everything and build the rootfs image:
|
||||
|
||||
$ make
|
||||
|
||||
|
||||
Result of the build
|
||||
-------------------
|
||||
|
||||
After building, the output/images directory contains:
|
||||
|
||||
output/images/
|
||||
├── bl31.bin
|
||||
├── ddr3*
|
||||
├── flash.bin
|
||||
├── freescale/imx8mn-bsh-smm-s2.dtb
|
||||
├── Image
|
||||
├── nand-full.lst
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext4 -> rootfs.ext2
|
||||
├── rootfs.tar
|
||||
├── rootfs.ubifs
|
||||
├── u-boot.bin
|
||||
└── u-boot-spl.bin
|
||||
|
||||
|
||||
Preparing the board
|
||||
-------------------
|
||||
|
||||
Plug the USB type A to micro B cable into the USB Debug
|
||||
Connector (DBG UART). Use serial port settings 115200 8N1
|
||||
to access the debug console.
|
||||
|
||||
Plug another USB type A to micro B cable into the USB-OTG
|
||||
Connector (USB1). This connection is used to flash the board
|
||||
firmware using the Freescale/NXP UUU tool.
|
||||
|
||||
Connect the power supply/adaptor to the DC Power Jack (labelled
|
||||
+5V).
|
||||
|
||||
|
||||
Flashing
|
||||
--------
|
||||
|
||||
Power up the board by switching on the Power ON Switch, which is
|
||||
placed right next to the DC Jack.
|
||||
|
||||
Enter the following U-Boot commands on the debug serial console:
|
||||
|
||||
$ nand erase.chip
|
||||
$ reset
|
||||
|
||||
Flash the built images directly to board’s memory. On your computer,
|
||||
run:
|
||||
|
||||
$ board/bsh/imx8mn-bsh-smm-s2/flash.sh output/
|
||||
|
||||
It will flash the bootloader, the Device Tree Blob, the kernel image
|
||||
and the UBI root file system.
|
||||
Reference in New Issue
Block a user