Phytec L-1017e.A3 i.MX 8M Plus Скачать руководство пользователя страница 49

L-1017e.A3 i.MX 8M Plus BSP Manual

To ensure that the new setting has taken over, shut down the system:

target$ poweroff

and perform a power cycle. It is recommended that you verify the settings now.

First, check the value of ENH_SIZE_MULT which must be 3719168 KiB:

targe$ mmc extcsd read /dev/mmcblk2 | grep ENH_SIZE_MULT  -A 

1

You should receive:

Max Enhanced Area Size [MAX_ENH_SIZE_MULT]: 

0x000764

i.e. 

3719168

 KiB

--
Enhanced User Data Area Size [ENH_SIZE_MULT]: 

0x000764

i.e. 

3719168

 KiB

Finally, check the size of the device:

target$ parted -m /dev/mmcblk2 unit B print
BYT; 
/dev/mmcblk2:31742492672B:sd/mmc:

512

:

512

:unknown:MMC S0J58X:;

Erasing the Device

It is possible to erase the eMMC device directly rather than overwriting it with zeros. The eMMC block management 

algorithm will erase the underlying MLC memory cells or mark these blocks as 

discard

. The data on the device is lost 

and will be read back as zeros.

After booting from SD Card execute:

target$ blkdiscard -f --secure /dev/mmcblk2

The option 

--secure

 ensures that the command waits until the eMMC device has erased all blocks. The 

-f  (force) 

option disables all checking before erasing and it is needed when the eMMC device contains existing partitions with 
data.

Tip

dd if=/dev/zero of=/dev/mmcblk2

 also destroys all information on the device, but this command is bad for 

wear leveling and takes much longer!

Содержание L-1017e.A3 i.MX 8M Plus

Страница 1: ...A Product of PHYTEC Technology Holding Company L 1017e A3 i MX 8M Plus BSP Manual...

Страница 2: ...Kit Furthermore this document describes how to create BSP images from the source code This is useful for those who need to change the default image and need a way to implement these changes in a simpl...

Страница 3: ...Machine VM Host PHYTEC has developed and prepared to run various Development Environments There are detailed step by step instructions for Eclipse and Qt Creator which are included in the VM There are...

Страница 4: ...e in the section Supported Machines you can see which Article Numbers are available under this machine and also a short description of the hardware information In case you only have the Article Number...

Страница 5: ...to get the correct device name first remove your SD card and execute ls dev Now insert your SD card and execute ls dev again Compare the two outputs to find the new device name s listed in the second...

Страница 6: ...us progress will print out information on how much data is and still has to be copied until it is finished BUILD TIME has the format YYYYMMDDHHMMSS example Date 14 01 2022 Time 10 42 11 BUILD TIME 202...

Страница 7: ...icularly useful if you want to make customizations The phyLinux script is a basic management tool for PHYTEC Yocto BSP releases written in Python It is mainly a helper to get started with the BSP stru...

Страница 8: ...ncomment to accept NXP EULA EULA can be found under sources meta freescale EULA ACCEPT_FSL_EULA 1 Build your image host bitbake phytec headless image BSP Images All images generated by Bitbake are dep...

Страница 9: ..._202006 bin lpddr4_pmu_train_2d_imem_202006 bin DDR PHY firmware images imx boot Bootloader build by imx mkimage which includes SPL U Boot ARM Trusted Firmware and DDR firmware This is the final bootl...

Страница 10: ...itch S3 The phyBOARD Pollux features a boot switch with four individually switchable ports to select the phyCORE i MX 8M Plus default bootsource 1 Boot Configuration Options S3 eMMC Internal Fuses SPI...

Страница 11: ...loader kernel device tree device tree overlays and root file system Flash eMMC from Network in u boot on Target These steps will show how to update the eMMC via a network However they only work if the...

Страница 12: ...92 168 3 10 dd if path_to_file phytec qt5demo image phyboard pollux imx8mp 3 sdcard dd of dev mmcblk2 Flash eMMC via Network in Linux on Host It is also possible to install the OS at eMMC from your Li...

Страница 13: ...tions 0 OK mmc2 part 0 is current device u boot setexpr nblk filesize 0x200 u boot mmc write loadaddr 0x0 nblk MMC write dev 2 block 0 count 1024000 1024000 blocks written OK u boot boot Flash eMMC fr...

Страница 14: ...nized by the fact that it contains two boot partitions mmcblk2boot0 mmcblk2boot1 Write the image to the phyCORE i MX 8M Plus eMMC MMC device 2 without partition target dd if phytec qt5demo image phybo...

Страница 15: ...MiB s Switch the mmc dev u boot mmc list FSL_SDHC 1 SD FSL_SDHC 2 eMMC u boot mmc dev 2 switch to partitions 0 OK mmc0 part 0 is current device u boot setexpr nblk filesize 0x200 u boot mmc write loa...

Страница 16: ...to boot from QSPI The SPI Flash is usually quite small The phyBOARD Pollux i MX8MP kit only has 32MB SPI NOR flash populated Only the bootloader and the environment can be stored The kernel device tr...

Страница 17: ...p 3 fspi bin flash_evk_flexspi u boot sf erase 0 0x400000 SF 4194304 bytes 0x0 Erased OK u boot sf write loadaddr 0 0x400000 u boot sf write loadaddr 0x400000 SF 4194304 bytes 0x0 Written OK Erase the...

Страница 18: ...g and writing are possible the SPI NOR flash needs to be probed u boot sf probe SF Detected n25q256ax1 with page size 256 Bytes erase size 64 KiB total 32 MiB A specially formatted U boot image for th...

Страница 19: ...major minor 90 0 Bad blocks are allowed false Device is writable true Erase the u boot partition and flash it target flash_erase dev mtd0 0x0 64 target flashcp mnt imx boot phyboard pollux imx8mp 3 fs...

Страница 20: ...ys to configure the TFTP server TFTP Server Setup As a stand alone daemon Controlled and handled by xinetd First create a directory to store the TFTP files host sudo mkdir tftpboot host sudo chmod R 7...

Страница 21: ...network connection between the embedded board and the TFTP server The server should be set to IP 192 168 3 10 and netmask 255 255 255 0 NFS Server Setup After the installation of the TFTP server an N...

Страница 22: ...thernet configuration please follow the description here Network Environment Customization Booting from an Embedded Board Boot the board into the U boot prompt and press any key to hold To boot from a...

Страница 23: ...s S3 Also connect USB A Male to USB Male cable from host to top connector of X5 Starting bootloader via UUU Tool Execute and Power up the board host cd mfgtools uuu host sudo uuu _flash bin You can se...

Страница 24: ...ocedure makes the most sense for development The U Boot source code the Linux kernel and all other git repositories are available on our Git server at git git phytec de Git Repositories Used U Boot re...

Страница 25: ...done SDK has been successfully set up and is ready to be used Using the SDK Activate the toolchain for your shell by sourcing the file environment setup in the toolchain directory host source opt amp...

Страница 26: ...the needed U Boot tag host cd u boot imx host git fetch all tags host git checkout tags v2021 04_2 2 0 phy7 Technically you can now build the U Boot but practically there are some further steps neces...

Страница 27: ...re Build the linux kernel host make imx_v8_defconfig imx8_phytec_distro config imx8_phytec_platform config host make j16 The Image can be found at linux imx arch arm64 boot Image The dtb can be found...

Страница 28: ...ion To flash any storage device with SD Card the rootfs needs to be expanded or a separate partition needs to be created There are some different ways to format the SD Card The easiest way to do this...

Страница 29: ...L 1017e A3 i MX 8M Plus BSP Manual Expand rootfs Choose your SD Card device at the drop down menu on the top right Choose the ext4 root partition and click on resize...

Страница 30: ...L 1017e A3 i MX 8M Plus BSP Manual Drag the slider as far as you like or enter the size manually...

Страница 31: ...e button To apply your changes press the green tick Now you can mount the root partition and copy e g the phytec qt5demo image phyboard pollux imx8mp 3 sdcard image to it Then unmount it again host su...

Страница 32: ...L 1017e A3 i MX 8M Plus BSP Manual Create a Third Partition Choose your SD Card device at the drop down menu on the top right Choose the bigger unallocated area and press New Click Add...

Страница 33: ...L 1017e A3 i MX 8M Plus BSP Manual Confirm your changes by pressing the green tick...

Страница 34: ...n mount the new partition and copy e g phytec qt5demo image phyboard pollux imx8mp 3 sdcard image to it Then unmount it again host sudo mount dev sde3 mnt host sudo cp phytec qt5demo image phyboard po...

Страница 35: ...doesn t need to hard code details of the machine The kernel documentation is a really good source for a DT introduction An overview of the device tree data format can be found on the device tree usage...

Страница 36: ...on if it is mounted or not The device tree overlays are placed next to the other device tree files in our Linux kernel repository in the subfolder arch arm64 boot dts freescale overlays Available over...

Страница 37: ...t file is available the overlays variable can be set directly in the U Boot environment u boot setenv overlays imx8mp phyboard pollux peb av 010 dtbo u boot printenv overlays overlays imx8mp phyboard...

Страница 38: ...ition of an MMC device or from tftp The main intention of this file is to store the overlays variable This makes it easy to pre define the overlays in Yocto depending on the machine used The content f...

Страница 39: ...get an understanding of our i MX 8 BSP device tree model The following sections provide an overview of the supported hardware components and their operating system drivers on the i MX 8 platform Furt...

Страница 40: ...ts freescale imx8mp phyboard pollux dtsi h v5 10 72_2 2 0 phy9 n337 RS232 Display the current settings of a terminal in a human readable format target stty a Configuration of the UART interface can be...

Страница 41: ...Ethernet setup might be split into two files depending on your hardware configuration the module DT and the board specific DT The device tree set up for the FEC ethernet IP core where the ethernet PHY...

Страница 42: ...also change the IP address to DHCP instead of using a static one Configure u boot setenv ip dhcp Set up paths for TFTP and NFS A modification could look like this u boot setenv nfsroot home user nfss...

Страница 43: ...show up as dev mmcblk1p Y Y counts as the partition number starting from 1 to the max count of partitions on this device The partitions can be formatted with any kind of file system and also handled...

Страница 44: ...x user space you can query the registers target mmc extcsd read dev mmcblk2 You will see Extended CSD rev 1 7 MMC 5 0 Card Supported Command sets S_CMD_SET 0x01 Enabling Background Operations BKOPS In...

Страница 45: ...ble background operations handshake BKOPS_EN 0x00 Where value 0x00 means BKOPS_EN is disabled and device write performance suffers Where value 0x01 means BKOPS_EN is enabled and the host will issue ba...

Страница 46: ...iguration bit Reliable Write Request parameter bit 31 in command CMD23 It has been used in the kernel since v3 0 by file systems e g ext4 for the journal and user space applications such as fdisk for...

Страница 47: ...hen resize the file system on the eMMC partition while it is not mounted Resize the filesystem to a new partition size target resize2fs dev mmcblk2p2 resize2fs 1 46 1 9 Feb 2021 Filesystem at dev mmcb...

Страница 48: ...extcsd read dev mmcblk2 grep ENH_SIZE_MULT A 1 which shows for example Max Enhanced Area Size MAX_ENH_SIZE_MULT 0x000764 i e 3719168 KiB Enhanced User Data Area Size ENH_SIZE_MULT 0x000000 i e 0 KiB H...

Страница 49: ...742492672B sd mmc 512 512 unknown MMC S0J58X Erasing the Device It is possible to erase the eMMC device directly rather than overwriting it with zeros The eMMC block management algorithm will erase th...

Страница 50: ...ext4 rootfs partition They are located right after the u boot and the u boot environment The FAT32 boot partition contains the kernel and device tree With eMMC flash storage it is possible to use the...

Страница 51: ...ootpart enable 0 0 dev mmcblk2 To choose back to the user area u boot environment target mmc bootpart enable 7 0 dev mmcblk2 Resizing ext4 Root Filesystem fdisk can be used to expand the root filesyst...

Страница 52: ...ndCHS StartLBA EndLBA Sectors Size Id Type dev mmcblk2p1 128 0 1 1023 3 32 16384 140779 124396 60 7M c Win95 FAT32 LBA dev mmcblk2p2 1023 3 32 1023 3 32 141312 2192013 2050702 1001M 83 Linux Command m...

Страница 53: ...booting Please see different sections for flashing and boot mode setup Due to limited space on the SPI NOR Flash only the bootloader is stored inside By default the kernel device tree and rootfs are...

Страница 54: ...tes 128 0 KiB Minimum input output unit size 1 byte Sub page size 1 byte Character device major minor 90 4 Bad blocks are allowed false Device is writable true mtd3 Name none Type nor Eraseblock size...

Страница 55: ...n the system The formula to calculate the right number is Linux GPIO number N X 1 32 Y Accessing GPIOs from userspace will be done using the libgpiod It provides a library and tools for interacting wi...

Страница 56: ...e file exits This means that it s wrong to run gpioset have it exit and expect the line to continue being driven high or low It may happen if given pin is floating but it must be interpreted as undefi...

Страница 57: ...i h v5 10 72_2 2 0 phy9 n100 General I C2 bus configuration e g imx8mp phyboard pollux dtsi https git phytec de linux imx tree arch arm64 boot dts freescale imx8mp phyboard pollux dtsi h v5 10 72_2 2...

Страница 58: ...rrect DTS overlays automatically If the EEPROM ID page data and the first 265 bytes of the normal area are deleted the bootloader will fall back to the phyCORE i MX8MP Kit RAM setup which requires 2GB...

Страница 59: ...he target target date Thu Jan 1 00 01 26 UTC 1970 Change the date and time with the date command The date command sets the time with the following syntax YYYYMMDDHHMM target date s 202202031015 Wed Ma...

Страница 60: ...provides a low cost connectivity solution for numerous consumer portable devices by providing a mechanism for data transfer between USB devices with a line bus speed of up to 4 Gbit s SuperSpeed SS Th...

Страница 61: ...pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10 link can promiscuity 0 minmtu 0 maxmtu 0 can state ERROR ACTIVE berr counter tx 0 rx 0 restart ms 0 bitrate 500000 sample point 0 875 tq 50...

Страница 62: ...ilesystem and rebuild the root filesystem Unit Description can0 interface setup Service Type simple RemainAfterExit yes ExecStart sbin ip link set can0 up type can bitrate 500000 ExecStop sbin ip link...

Страница 63: ...fast devsel latency 0 IRQ 218 Memory at 18000000 64 bit non prefetchable size 1M Bus primary 00 secondary 01 subordinate ff sec latency 0 I O behind bridge None Memory behind bridge 18100000 181fffff...

Страница 64: ...st scp r firmware root 192 168 3 11 lib firmware For example if you try to bring up the network interface target ip link set up wlp1s0 You will get the following output on the serial console 58 682104...

Страница 65: ...xer is the codec on the AV Connector the Dummy Card and HDMI can be selected by pressing F6 You should see a lot of options as the TLV320 IC has many features you can experiment with It might be bette...

Страница 66: ...t to check playback availability target speaker test c 2 t wav To playback simple audio streams you can use aplay For example to play the ALSA test sounds target aplay usr share sounds alsa To playbac...

Страница 67: ...aybin uri file usr share phytec qtdemo videos caminandes webm Or target gst launch 1 0 v filesrc location video mp4 qtdemux h264parse queue vpudec waylandsink async false enable last sample f alse qos...

Страница 68: ...link status flags enum enums Good 0 Bad 1 value 0 6 non desktop flags immutable range values 0 1 value 0 4 TILE flags immutable blob blobs value Display The phyBOARD Pollux supports up to 4 different...

Страница 69: ...done at etc xdg weston weston ini Single Display In our BSP the default Weston output is set to HMDI output name HDMI A 1 mode current output name LVDS 1 mode off When using the PEB AV 10 as output s...

Страница 70: ...hytec qtdemo With the phytec qt5demo image Weston with the phytec qt5demo starts during boot The phytec qt5demo can be stopped with target systemctl stop phytec qtdemo To start the demo again run targ...

Страница 71: ...in the folder sys class backlight Reading the appropriate files and writing to them allows you to control the backlight To get for example the maximum brightness level max_brightness execute target ca...

Страница 72: ...vernors are automatically selecting one of these frequencies in accordance with their goals List all governors available with the following command target cat sys devices system cpu cpu0 cpufreq scali...

Страница 73: ...ng_setspeed For more detailed information about the governors refer to the Linux kernel documentation in linux Documentation cpu freq governors txt CPU Core Management The i MX 8M plus SoC can have mu...

Страница 74: ...d Suspend resume is possible with target echo mem sys power state resume with pressing on off button To wakeup with serial console run target echo enabled sys class tty ttymxc0 power wakeup target ech...

Страница 75: ...s class thermal thermal_zone0 These trip points are used by the kernel thermal management to trigger events and change the cooling behavior The following thermal policies also named thermal governors...

Страница 76: ...83 To activate watchdog support the file system conf in etc systemd has to be adapted by enabling the options RuntimeWatchdogSec 60s ShutdownWatchdogSec 10min RuntimeWatchdogSec defines the timeout va...

Страница 77: ...Release User Guide ba p 1305998 ISP The i MX8M Plus SoC contains an Image Signal Processor ISP For more information see Using the ISPs on the phyBOARD Pollux i MX 8M Plus documentation This documentat...

Страница 78: ...oot mac configuration are available in the section Fuse Map of the i MX 8M Plus Security Reference Manual Reading Fuse Values in uBoot You can read the content of a fuse using memory mapped shadow reg...

Страница 79: ...On the SDK Builder page select Linux Host and GCC ARM Embedded toolchain Select the optional components as of SDK v2 11 1 multicore CMSIS DSP Library FreeRTOS and download the SDK archive The M7 exam...

Страница 80: ...m the M7 Core s debug UART Running Examples from U Boot To load firmware using the bootloader U Boot the bootaux command can be used Prepare an SD Card with our Yocto BSP Copy the generated bin file t...

Страница 81: ...to use a PEB EVAL 01 board that has the JTAG Pins reachable with a pin header on the top sudo apt install gdb gdb multiarch To start the J Link software type JLinkGDBServer if JTAG device MIMX8ML8_M7...

Страница 82: ...your next image build local conf IMAGE_INSTALL_append chromium ozone wayland Get Chromium Running on the Target To run Chromium it needs a few arguments to use the hardware graphics acceleration Via...

Отзывы: