Difference between revisions of "DESK-XZ7-L/Deployment/Standalone boot"

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "{{subst:Standalone_boot | nome-som=BORA | kit-code=XZ7 | kit = xz7 | kit-repo = desk-xz-l}}")
 
 
(21 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
 
!colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History
 
|-  
 
|-  
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Version
 
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Issue Date
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white"|Notes
 
|-
 
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|X.Y.Z
+
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|{{oldid|17164|2022/11/22}}
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Month Year
+
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|DESK-XZ7-L-1.0.0-rc1 release
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|TBD
 
 
|-
 
|-
|-
+
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|2023/01/23
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|[TBD_link X.Y.Z]
+
!style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#ededed; padding:5px; color:#000000"|DESK-XZ7-L-1.0.1 release
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Month Year
 
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|TBD
 
 
|-
 
|-
 
|}
 
|}
 
<section end=History/>
 
<section end=History/>
 +
__FORCETOC__
 
<section begin=Body/>
 
<section begin=Body/>
  
 
==Standalone boot==
 
==Standalone boot==
  
'''TBD: rifare tutti i dump con le versioni corrette '''
+
This document was written and tested with the software/hardware combination described in the history table above. However, it contains general concepts that can be adapted to any DAVE Embedded Systems' Linux platform.
 
 
'''TBD: eliminare eventuali sezioni non pertinenti (es. eMMC) per il SOC '''
 
 
 
 
 
=== Introduction ===
 
This document was written and tested with the software/hardware combination described in the history table above. However, it contains general concepts that can be adapted on any DAVE Embedded Systems' Linux platform.
 
  
 
{{ImportantMessage|text=The following programming examples are intended for <b>laboratory usage</b> or for ''preliminary deployment strategy''.<br><br>A complete deployment strategy has to be carefully identifiyed taking into account the overall arguments like: boot speed, safe boot, recovery mechanisms, watchdog supervisor, etc.}}
 
{{ImportantMessage|text=The following programming examples are intended for <b>laboratory usage</b> or for ''preliminary deployment strategy''.<br><br>A complete deployment strategy has to be carefully identifiyed taking into account the overall arguments like: boot speed, safe boot, recovery mechanisms, watchdog supervisor, etc.}}
  
 +
We'll explain how to program and configure a <code>SOM</code> to boot in standalone mode, without the need for a system microSD card, with the following option:
 +
* booting with Quad-SPI NOR
 +
** in this configuration the primary boot images will be fetched from Quad-SPI NOR flash storage, while the root file system will be fetched from microSD
 +
* booting with NAND
 +
** in this configuration the primary boot images and rootfs will be fetched from NAND flash storage
  
We'll explain how to program and configure a <SOM> to boot in standalone mode, without the need of a system microSD card or an NFS server, with threee options:
+
=== Program the Quad-SPI NOR flash ===
* booting with NOR and NAND internal storage
 
** in this configuration the primary boot images will be fetched from NOR flash storage, while the root file system will be fetched from NAND flash
 
* booting with NAND only
 
** in this configuration the whole system will boot without the need of a NOR flash storage, all images and the root file system will be fetched from NAND flash
 
* booting with eMMC only
 
** in this configuration the whole system will boot without the need of a NOR/NAND flashes storage, all images and the root file system will be fetched from eMMC flash
 
 
 
=== Program boot images into NOR flash ===
 
  
====u-Boot====
+
This chapter is compatible with [[BORA SOM | BORA]], [[BORA Xpress SOM | BORA Xpress]] and [[BORA Lite SOM | BORA Lite]] platforms, but below there is log for BORA Xpress SOM.
  
Update to the latest u-boot version allows usage of u-boot environment variables available.
+
First of all, create a bootable microSD card as described [[DESK-XZ7-L/Development/Creating_and_building_the_Petalinux_project#Petalinux_build | here]]. Alternatively you can download binaries from [https://mirror.dave.eu/desk-xz-l/ mirror] and install it on microSD or into <code>tftpboot</code> directory in your host device.
  
 +
Then, boot the board with the microSD card and stop the automatic boot process of U-Boot in order to access the console.
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
=> run load
+
U-Boot 2021.01-desk-xz7-l-1.0.1 (Jan 12 2024 - 10:44:15 +0000)
Using FEC device
 
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
 
Filename 'sdvx/u-boot/sdvx-1.0.0_mx6dl_sfczg_spi_u-boot.imx'.
 
Load address: 0x12000000
 
Loading: #################################################################
 
        #################################################################
 
        ##
 
        1.4 MiB/s
 
done
 
Bytes transferred = 671788 (a402c hex)
 
=> run spi_update
 
SF: Detected S25FL256S with page size 64 KiB, total 32 MiB
 
=>
 
</pre>
 
  
====kernel image and device tree====
+
CPU:  Zynq 7z030
 +
Silicon: v3.1
 +
Model: Bora
 +
DRAM:  ECC disabled 1 GiB
 +
Flash: 0 Bytes
 +
NAND:  0 MiB
 +
MMC:  mmc@e0100000: 0
 +
Loading Environment from FAT... *** Warning - bad CRC, using default environment
  
We assume that the following environment variables are present in u-boot:
+
In:    serial@e0001000
 +
Out:  serial@e0001000
 +
Err:  serial@e0001000
 +
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
SOM ConfigID#: 00000004
 +
SOM UniqueID#: 2a0e92c4:03193a4b
 +
CB ConfigID#: ffffffff
 +
CB UniqueID#: ffffffff:ffffffff
 +
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
Warning: MAC addr not found in SPI NOR at block 8
 +
Net:
 +
ZYNQ GEM: e000b000, mdio bus e000b000, phyaddr 7, interface rgmii-id
  
<pre>
+
Warning: ethernet@e000b000 (eth0) using random MAC address - 72:2c:e1:44:08:28
loadk=tftpboot ${loadaddr} ${serverip}:${bootfile}
+
eth0: ethernet@e000b000
loadfdt=tftpboot ${fdtaddr} ${serverip}:${fdtfile}
+
Hit ENTER within 2 seconds to stop autoboot
spi_updatek=sf erase 200000 800000; sf write ${loadaddr} 200000 ${filesize}
+
Zynq>
spi_updatefdt=sf erase 180000 80000; sf write ${fdtaddr} 180000 ${filesize}
 
spi_loadk=sf read ${loadaddr} 200000 800000
 
spi_loadfdt=sf read ${fdtaddr} 180000 80000
 
spi_nand=sf probe; run spi_loadk spi_loadfdt nandargs addcons addmisc; if run configid_fixupfdt; then bootm ${loadaddr} - ${fdtaddr}; fi
 
 
</pre>
 
</pre>
  
* Update the <code>bootfile</code> and <code>fdtfile</code> environment variables to fit the filename as found inside the TFTP server.
+
====Programming Quad-SPI NOR flash from microSD====
* Program kernel and device tree on NOR flash with the following U-Boot command
+
 
 +
* Initialize and format Quad-SPI NOR flash memory
  
<pre class="board-terminal">
+
<pre class="workstation-terminal">
sf probe; run loadk spi_updatek loadfdt spi_updatefdt
+
Zynq> sf probe
 +
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
Zynq> sf erase 0 0x1000000
 +
SF: 16777216 bytes @ 0x0 Erased: OK
 
</pre>
 
</pre>
  
E.g.:
+
* Install <code>BOOT.BIN</code> on Quad-SPI NOR flash memory
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
=> sf probe; run loadk spi_updatek loadfdt spi_updatefdt
+
Zynq> fatload mmc 0:1 $kernel_addr_r BOOT.BIN
SF: Detected S25FL256S with page size 64 KiB, total 32 MiB
+
7033004 bytes read in 406 ms (16.5 MiB/s)
Using FEC device
+
Zynq> sf write $kernel_addr_r 0x0 $filesize
TFTP from server 192.168.0.13; our IP address is 192.168.0.98
+
device 0 offset 0x0, size 0x6b50ac
Filename 'sdvx/linux/sdvx-1.0.0_lite_uImage'.
+
SF: 7033004 bytes @ 0x0 Written: OK
Load address: 0x12000000
 
Loading: #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #############################################
 
        1.6 MiB/s
 
done
 
Bytes transferred = 6437016 (623898 hex)
 
Using FEC device
 
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
 
Filename 'sdvx/linux/sdvx-1.0.0_lite_imx6dl-sfczg-cb0043.dtb'.
 
Load address: 0x18000000
 
Loading: #########
 
        1.2 MiB/s
 
done
 
Bytes transferred = 42547 (a633 hex)
 
=>
 
 
</pre>
 
</pre>
  
Reboot the system and configure U-Boot to apply the new configuration
+
* Install <code>image.ub</code> on Quad-SPI NOR flash memory
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
=> setenv bootcmd run spi_nand
+
Zynq> mw $kernel_addr_r 0x0 $filesize
=> saveenv
+
Zynq> fatload mmc 0:1 $kernel_addr_r image.ub
 +
4868556 bytes read in 287 ms (16.2 MiB/s)
 +
Zynq> sf write $kernel_addr_r 0x700000 $filesize
 +
device 0 offset 0x700000, size 0x4a49cc
 +
SF: 4868556 bytes @ 0x700000 Written: OK
 
</pre>
 
</pre>
  
=== Program boot images into NAND flash ===
+
* Install <code>boot.scr</code> on Quad-SPI NOR flash memory
====u-Boot====
 
 
 
u-boot on NAND flash must be programmed using NXP <code>kobs-ng</code> utility: this tool is required for writing the correct u-boot image on NAND storing all information needed by bootrom to identify the NAND as a boot device.
 
 
 
Here below an example:
 
* boot the system via SD on NFS
 
* uses a rfs with <b>kobs-ng</b> utility available on it (e.g. DAVE's rfs provided with <KIT>)
 
* copy the related u-boot imx image file on nfs /home/root (for example)
 
* execute kobs-ng passing the parameters for flashing u-boot on NAND
 
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
root@imx6qxelk:~# kobs-ng -x -v -w sdvx-1.0.0_mx6dl_sfczg_nand_u-boot.imx
+
Zynq> mw $kernel_addr_r 0x0 $filesize
MTD CONFIG:
+
Zynq> fatload mmc 0:1 $kernel_addr_r boot.scr
  chip_0_device_path = "/dev/mtd0"
+
2709 bytes read in 14 ms (188.5 KiB/s)
  chip_1_device_path = "(null)"
+
Zynq> sf write $kernel_addr_r 0xFC0000 $filesize
  search_exponent = 2
+
device 0 offset 0xfc0000, size 0xa95
  data_setup_time = 80
+
SF: 2709 bytes @ 0xfc0000 Written: OK
  data_hold_time = 60
 
  address_setup_time = 25
 
  data_sample_time = 6
 
  row_address_size = 3
 
  column_address_size = 2
 
  read_command_code1 = 0
 
  read_command_code2 = 48
 
  boot_stream_major_version = 1
 
  boot_stream_minor_version = 0
 
  boot_stream_sub_version = 0
 
  ncb_version = 3
 
  boot_stream_1_address = 0
 
  boot_stream_2_address = 0
 
        -- We add the 1k-padding to the uboot.
 
.tmp_kobs_ng: verifying using key '00000000000000000000000000000000'
 
.tmp_kobs_ng: is a valid bootstream for key '00000000000000000000000000000000'
 
mtd: use new bch layout raw access mode
 
mtd: opening: "/dev/mtd0"
 
NFC geometry :
 
        ECC Strength      : 2
 
        Page Size in Bytes : 2071
 
        Metadata size      : 10
 
        ECC Chunk Size in byte : 512
 
        ECC Chunk count        : 4
 
        Block Mark Byte Offset : 2028
 
        Block Mark Bit Offset  : 2
 
====================================================
 
mtd: opened '/dev/mtd0' - '(null)'
 
mtd: max_boot_stream_size_in_bytes = 3670016
 
mtd: boot_stream_size_in_bytes = 672812
 
mtd: boot_stream_size_in_pages = 329
 
mtd: #1 0x00100000 - 0x00480000 (0x001a442c)
 
mtd: #2 0x00480000 - 0x00800000 (0x0052442c)
 
FCB
 
  m_u32Checksum = 0x00000000
 
  m_u32FingerPrint = 0x20424346
 
  m_u32Version = 0x01000000
 
  m_NANDTiming.m_u8DataSetup = 80
 
  m_NANDTiming.m_u8DataHold = 60
 
  m_NANDTiming.m_u8AddressSetup = 25
 
  m_NANDTiming.m_u8DSAMPLE_TIME = 6
 
  m_u32PageDataSize = 2048
 
  m_u32TotalPageSize = 2112
 
  m_u32SectorsPerBlock = 64
 
  m_u32NumberOfNANDs = 0
 
  m_u32TotalInternalDie = 0
 
  m_u32CellType = 0
 
  m_u32EccBlockNEccType = 1
 
  m_u32EccBlock0Size = 512
 
  m_u32EccBlockNSize = 512
 
  m_u32EccBlock0EccType = 1
 
  m_u32MetadataBytes = 10
 
  m_u32NumEccBlocksPerPage = 3
 
  m_u32EccBlockNEccLevelSDK = 0
 
  m_u32EccBlock0SizeSDK = 0
 
  m_u32EccBlockNSizeSDK = 0
 
  m_u32EccBlock0EccLevelSDK = 0
 
  m_u32NumEccBlocksPerPageSDK = 0
 
  m_u32MetadataBytesSDK = 0
 
  m_u32EraseThreshold = 0
 
  m_u32Firmware1_startingPage = 512
 
  m_u32Firmware2_startingPage = 2304
 
  m_u32PagesInFirmware1 = 329
 
  m_u32PagesInFirmware2 = 329
 
  m_u32DBBTSearchAreaStartAddress = 256
 
  m_u32BadBlockMarkerByte = 2028
 
  m_u32BadBlockMarkerStartBit = 2
 
  m_u32BBMarkerPhysicalOffset = 2048
 
  m_u32BCHType = 0
 
  m_NANDTMTiming.m_u32TMTiming2_ReadLatency = 0
 
  m_NANDTMTiming.m_u32TMTiming2_PreambleDelay = 0
 
  m_NANDTMTiming.m_u32TMTiming2_CEDelay = 0
 
  m_NANDTMTiming.m_u32TMTiming2_PostambleDelay = 0
 
  m_NANDTMTiming.m_u32TMTiming2_CmdAddPause = 0
 
  m_NANDTMTiming.m_u32TMTiming2_DataPause = 0
 
  m_NANDTMTiming.m_u32TMSpeed = 0
 
  m_NANDTMTiming.m_u32TMTiming1_BusyTimeout = 0
 
  m_u32DISBBM = 0
 
  m_u32BBMarkerPhysicalOffsetInSpareData = 0
 
DBBT
 
  m_u32Checksum = 0x00000000
 
  m_u32FingerPrint = 0x54424244
 
  m_u32Version = 0x01000000
 
  m_u32DBBTNumOfPages = 0
 
Firmware: image #0 @ 0x100000 size 0xa4800 - available 0x380000
 
Firmware: image #1 @ 0x480000 size 0xa4800 - available 0x380000
 
-------------- Start to write the [ FCB ] -----
 
mtd: erasing @0:0x0-0x20000
 
mtd: Writing FCB0 [ @0:0x0 ] (840) *
 
mtd: erasing @0:0x20000-0x40000
 
mtd: Writing FCB1 [ @0:0x20000 ] (840) *
 
mtd: erasing @0:0x40000-0x60000
 
mtd: Writing FCB2 [ @0:0x40000 ] (840) *
 
mtd: erasing @0:0x60000-0x80000
 
mtd: Writing FCB3 [ @0:0x60000 ] (840) *
 
mtd_commit_bcb(FCB): status 0
 
 
 
-------------- Start to write the [ DBBT ] -----
 
mtd: erasing @0:0x80000-0xa0000
 
mtd: Writing DBBT0 [ @0:0x80000 ] (800) *
 
mtd: erasing @0:0xa0000-0xc0000
 
mtd: Writing DBBT1 [ @0:0xa0000 ] (800) *
 
mtd: erasing @0:0xc0000-0xe0000
 
mtd: Writing DBBT2 [ @0:0xc0000 ] (800) *
 
mtd: erasing @0:0xe0000-0x100000
 
mtd: Writing DBBT3 [ @0:0xe0000 ] (800) *
 
mtd_commit_bcb(DBBT): status 0
 
 
 
---------- Start to write the [ .tmp_kobs_ng ]----
 
mtd: Writting .tmp_kobs_ng: #0 @0: 0x00100000 - 0x001a4800
 
mtd: erasing @0:0x100000-0x120000
 
mtd: erasing @0:0x120000-0x140000
 
mtd: erasing @0:0x140000-0x160000
 
mtd: erasing @0:0x160000-0x180000
 
mtd: erasing @0:0x180000-0x1a0000
 
mtd: erasing @0:0x1a0000-0x1c0000
 
mtd: The last page is not full : 1068
 
mtd: We write one page for save guard. *
 
mtd: Writting .tmp_kobs_ng: #1 @0: 0x00480000 - 0x00524800
 
mtd: erasing @0:0x480000-0x4a0000
 
mtd: erasing @0:0x4a0000-0x4c0000
 
mtd: erasing @0:0x4c0000-0x4e0000
 
mtd: erasing @0:0x4e0000-0x500000
 
mtd: erasing @0:0x500000-0x520000
 
mtd: erasing @0:0x520000-0x540000
 
mtd: The last page is not full : 1068
 
mtd: We write one page for save guard. *
 
root@imx6qxelk:~#
 
 
</pre>
 
</pre>
  
====kernel image and device tree====
+
====Programming Quad-SPI NOR flash from ethernet====
 +
* Initialize and format Quad-SPI NOR flash memory
  
We assume that the following environment variables are present in u-boot:
+
<pre class="workstation-terminal">
 
+
Zynq> sf probe
<pre>
+
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
nand_updatek=nand erase.part nand-kernel; nand write ${loadaddr} nand-kernel ${filesize}
+
Zynq> sf erase 0 0x1000000
nand_updatefdt=nand erase.part nand-fdt; nand write ${fdtaddr} nand-fdt ${filesize}
+
SF: 16777216 bytes @ 0x0 Erased: OK
nand_loadk=nand read ${loadaddr} nand-kernel
 
nand_loadfdt=nand read ${fdtaddr} nand-fdt
 
nand_nand=run nand_loadk nand_loadfdt nandargs addcons addmisc; if run configid_fixupfdt; then bootm ${loadaddr} - ${fdtaddr}; fi
 
 
</pre>
 
</pre>
  
* Update the <code>bootfile</code> and <code>fdtfile</code> environment variables to fit the filename as found inside the TFTP server.
+
* Properly define the ethernet configuration parameter:
* Program kernel and device tree on NAND flash with the following U-Boot command
+
<pre class="workstation-terminal">
 
+
Zynq> setenv ipaddr 192.168.0.89
<pre class="board-terminal">
+
Zynq> setenv serverip 192.168.0.99
run loadk nand_updatek loadfdt nand_updatefdt
 
 
</pre>
 
</pre>
  
E.g.:
+
* download via TFTP the <code>BOOT.BIN</code> binary image and write <code>BOOT.BIN</code> on Quad-SPI NOR flash memory
 
 
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
U-Boot > run loadk nand_updatek loadfdt nand_updatefdt
+
Zynq> tftpboot $kernel_addr_r desk-xz7-l/desk-xz7-l-1.0.1_borax_BOOT.BIN
Using FEC device
+
Using ethernet@e000b000 device
TFTP from server 192.168.0.13; our IP address is 192.168.0.98
+
TFTP from server 192.168.0.99; our IP address is 192.168.0.89
Filename 'sdvx/linux/sdvx-1.0.0_lite_uImage'.
+
Filename 'desk-xz7-l/desk-xz7-l-1.0.1_borax_BOOT.BIN'.
Load address: 0x12000000
+
Load address: 0x2000000
Loading: #################################################################
+
Loading: #T ################################################################
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
        #################################################################
 
 
         #################################################################
 
         #################################################################
 +
        ...
 
         #################################################################
 
         #################################################################
         #######################
+
         #########
         1.4 MiB/s
+
         444.3 KiB/s
 
done
 
done
Bytes transferred = 6437016 (623898 hex)
+
Bytes transferred = 7033004 (6b50ac hex)
 
+
Zynq> sf write $kernel_addr_r 0x0 $filesize
NAND erase.part: device 0 offset 0xc00000, size 0x800000
+
device 0 offset 0x0, size 0x6b50ac
Erasing at 0x13e0000 -- 100% complete.
+
SF: 7033004 bytes @ 0x0 Written: OK
OK
 
 
 
NAND write: device 0 offset 0xc00000, size 0x623898
 
6437016 bytes written: OK
 
Using FEC device
 
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
 
Filename 'sdvx/linux/sdvx-1.0.0_lite_imx6dl-sfczg-cb0043.dtb'.
 
Load address: 0x18000000
 
Loading: #########
 
        525.4 KiB/s
 
done
 
Bytes transferred = 42547 (a633 hex)
 
 
 
NAND erase.part: device 0 offset 0xa00000, size 0x100000
 
Erasing at 0xae0000 -- 100% complete.
 
OK
 
 
 
NAND write: device 0 offset 0xa00000, size 0xa633
 
42547 bytes written: OK
 
=>
 
 
</pre>
 
</pre>
  
Reboot the system and configure U-Boot to apply the new configuration
+
* download via TFTP the <code>image.ub</code> binary image and write <code>image.ub</code> on Quad-SPI NOR flash memory
 
 
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
=> setenv bootcmd run nand_nand
+
Zynq> mw $kernel_addr_r 0x0 $filesize
=> saveenv
+
Zynq> tftpboot $kernel_addr_r desk-xz7-l/desk-xz7-l-1.0.1_borax_image.ub
</pre>
+
Using ethernet@e000b000 device
 
+
TFTP from server 192.168.0.99; our IP address is 192.168.0.89
=== Program boot images into eMMC ===
+
Filename 'desk-xz7-l/desk-xz7-l-1.0.1_borax_image.ub'.
 
+
Load address: 0x2000000
====u-Boot====
+
Loading: #T ################################################################
Update to the latest u-boot version allows usage of u-boot environment variables available.
+
        #################################################################
 
+
        ...
<pre>
+
        #################################################################
mmc_update=mmc dev; setexpr blocks ${filesize} / 0x200; setexpr blocks ${blocks} + 1; mmc write ${loadaddr} 2 ${blocks}
+
        #########################################
 +
        394.5 KiB/s
 +
done
 +
Bytes transferred = 4868556 (4a49cc hex)
 +
Zynq> sf write $kernel_addr_r 0x700000 $filesize
 +
device 0 offset 0x700000, size 0x4a49cc
 +
SF: 4868556 bytes @ 0x700000 Written: OK
 
</pre>
 
</pre>
  
Load u-boot binary form a <code>tftp</code> server:
+
* download via TFTP the <code>boot.scr</code> binary image and write <code>boot.scr</code> on Quad-SPI NOR flash memory
 
 
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
=> run load
+
Zynq> mw $kernel_addr_r 0x0 $filesize
Using FEC device
+
Zynq> tftpboot $kernel_addr_r desk-xz7-l/desk-xz7-l-1.0.1_borax_boot.scr
TFTP from server 192.168.0.13; our IP address is 192.168.0.89
+
Using ethernet@e000b000 device
Filename 'sdvx/u-boot/sdvx-1.0.0_mx6dl_sfczg_u-boot.imx'.
+
TFTP from server 192.168.0.99; our IP address is 192.168.0.89
Load address: 0x12000000
+
Filename 'desk-xz7-l/desk-xz7-l-1.0.1_borax_boot.scr'.
Loading: #################################################################
+
Load address: 0x2000000
         #################################################################
+
Loading: #T
        ##
+
         0 Bytes/s
        1.5 MiB/s
 
 
done
 
done
Bytes transferred = 671788 (a402c hex)
+
Bytes transferred = 2709 (a95 hex)
=> run mmc_update
+
Zynq> sf write $kernel_addr_r 0xFC0000 $filesize
switch to partitions #0, OK
+
device 0 offset 0xfc0000, size 0xa95
mmc2(part 0) is current device (eMMC)
+
SF: 2709 bytes @ 0xfc0000 Written: OK
 
 
MMC write: dev # 2, block # 2, count 1313 ... 1313 blocks written: OK
 
=>
 
 
</pre>
 
</pre>
  
Load u-boot binary form an <code>SD</code> card:
+
Once change boot mode and restarted, the complete boot log can be like this one:  
  
<pre class="workstation-terminal">
+
<pre class="mw-collapsible mw-collapsed">
Hit ENTER within 1 seconds to stop autoboot
+
U-Boot 2021.01-desk-xz7-l-1.0.1 (Jan 12 2024 - 10:44:15 +0000)
=> fatload mmc 0:1 ${loadaddr} sdvx-1.0.1_mx6dlaxel_u-boot.imx
 
reading sdvx-1.0.1_mx6dlaxel_u-boot.imx
 
671788 bytes read in 50 ms (12.8 MiB/s)
 
=> mmc dev 2
 
switch to partitions #0, OK
 
mmc2(part 0) is current device (eMMC)
 
=> run mmc_update
 
switch to partitions #0, OK
 
mmc2(part 0) is current device (eMMC)
 
  
MMC write: dev # 2, block # 2, count 1313 ... 1313 blocks written: OK
+
CPU:  Zynq 7z030
=>
+
Silicon: v3.1
</pre>
+
Model: Bora
 +
DRAM:  ECC disabled 1 GiB
 +
Flash: 0 Bytes
 +
NAND:  0 MiB
 +
MMC:   mmc@e0100000: 0
 +
Loading Environment from SPIFlash... SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
*** Warning - bad CRC, using default environment
  
====kernel image and device tree====
+
In:    serial@e0001000
 +
Out:  serial@e0001000
 +
Err:  serial@e0001000
 +
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
SOM ConfigID#: 00000004
 +
SOM UniqueID#: 2a0e92c4:03193a4b
 +
CB ConfigID#: ffffffff
 +
CB UniqueID#: ffffffff:ffffffff
 +
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
Warning: MAC addr not found in SPI NOR at block 8
 +
Net:
 +
ZYNQ GEM: e000b000, mdio bus e000b000, phyaddr 7, interface rgmii-id
  
We assume that the following environment variables are present in u-boot:
+
Warning: ethernet@e000b000 (eth0) using random MAC address - 7a:68:29:db:0b:f6
 +
eth0: ethernet@e000b000
 +
Hit ENTER within 2 seconds to stop autoboot
 +
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
device 0 offset 0xfc0000, size 0x40000
 +
SF: 262144 bytes @ 0xfc0000 Read: OK
 +
QSPI: Trying to boot script at 3000000
 +
## Executing script at 03000000
 +
Trying to load boot images from qspi
 +
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
 +
device 0 offset 0x700000, size 0x600000
 +
SF: 6291456 bytes @ 0x700000 Read: OK
 +
## Loading kernel from FIT Image at 10000000 ...
 +
  Using 'conf-system-top.dtb' configuration
 +
  Verifying Hash Integrity ... OK
 +
  Trying 'kernel-1' kernel subimage
 +
    Description:  Linux kernel
 +
    Type:        Kernel Image
 +
    Compression:  uncompressed
 +
    Data Start:  0x100000f8
 +
    Data Size:    4845944 Bytes = 4.6 MiB
 +
    Architecture: ARM
 +
    OS:           Linux
 +
    Load Address: 0x00200000
 +
    Entry Point:  0x00200000
 +
    Hash algo:    sha256
 +
    Hash value:  f5d0c9b9a689e4b0657468fb280f0c8fb60064196b7938a77a43b36a2743acca
 +
  Verifying Hash Integrity ... sha256+ OK
 +
## Loading fdt from FIT Image at 10000000 ...
 +
  Using 'conf-system-top.dtb' configuration
 +
  Verifying Hash Integrity ... OK
 +
  Trying 'fdt-system-top.dtb' fdt subimage
 +
    Description:  Flattened Device Tree blob
 +
    Type:        Flat Device Tree
 +
    Compression:  uncompressed
 +
    Data Start:  0x1049f37c
 +
    Data Size:    20716 Bytes = 20.2 KiB
 +
    Architecture: ARM
 +
    Hash algo:    sha256
 +
    Hash value:  f93874aa1f1a0c6d52c423e12b25b4a2ae14a09b40a8068a49b4c8914be75e4c
 +
  Verifying Hash Integrity ... sha256+ OK
 +
  Booting using the fdt blob at 0x1049f37c
 +
  Loading Kernel Image
 +
  Loading Device Tree to 2fff7000, end 2ffff0eb ... OK
  
<pre>
+
Starting kernel ...
mmc_loadk=fatload mmc ${mmcdev}:1 ${loadaddr} ${bootfile}
 
mmc_loadfdt=fatload mmc ${mmcdev}:1 ${fdtaddr} ${fdtfile}
 
mmc_loadsplash=fatload mmc ${mmcdev}:1 ${loadaddr} ${splashfile}; cp.b ${loadaddr} ${splashimage} ${filesize}
 
mmcboot=run mmcargs addcons addmisc; if run mmc_loadk; then if run mmc_loadfdt; then if run configid_fixupfdt; then bootm ${loadaddr} - ${fdtaddr}; fi; fi; fi
 
</pre>
 
  
Using an SD card or an eMMC device assumes that <code>bootfile</code>, <code>fdtfile</code> and <code>splashfile</code> are stored into fist MMC device partition.  
+
[    0.000000] Booting Linux on physical CPU 0x0
 +
[    0.000000] Linux version 5.10.0-xilinx-v2021.2 (oe-user@oe-host) (arm-xilinx-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Tue Oct 12 09:30:57 UTC 2021
 +
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
 +
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
 +
[    0.000000] OF: fdt: Machine model: Bora
 +
[    0.000000] earlycon: cdns0 at MMIO 0xe0001000 (options '115200n8')
 +
[    0.000000] printk: bootconsole [cdns0] enabled
 +
[    0.000000] Memory policy: Data cache writealloc
 +
[    0.000000] cma: Reserved 16 MiB at 0x3f000000
 +
[    0.000000] Zone ranges:
 +
[    0.000000]  Normal  [mem 0x0000000000000000-0x000000002fffffff]
 +
[    0.000000]  HighMem  [mem 0x0000000030000000-0x000000003fffffff]
 +
[    0.000000] Movable zone start for each node
 +
[    0.000000] Early memory node ranges
 +
[    0.000000]  node  0: [mem 0x0000000000000000-0x000000003fffffff]
 +
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]
 +
[    0.000000] percpu: Embedded 16 pages/cpu s32780 r8192 d24564 u65536
 +
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
 +
[    0.000000] Kernel command line: console=ttyPS0,115200 earlycon root=/dev/mmcblk0p2 rw rootwait
 +
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
 +
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
 +
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
 +
[    0.000000] Memory: 1009768K/1048576K available (7168K kernel code, 279K rwdata, 1952K rodata, 1024K init, 162K bss, 22424K reserved, 16384K cma-reserved, 245760K highmem)
 +
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
 +
[    0.000000] rcu:    RCU event tracing is enabled.
 +
[    0.000000] rcu:    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
 +
[    0.000000]  Trampoline variant of Tasks RCU enabled.
 +
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
 +
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
 +
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
 +
[    0.000000] efuse mapped to (ptrval)
 +
[    0.000000] slcr mapped to (ptrval)
 +
[    0.000000] GIC physical location is 0xf8f01000
 +
[    0.000000] L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
 +
[    0.000000] L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
 +
[    0.000000] L2C-310 erratum 769419 enabled
 +
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
 +
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
 +
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
 +
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
 +
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
 +
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
 +
[    0.000000] random: get_random_bytes called from start_kernel+0x2c0/0x4a0 with crng_init=0
 +
[    0.000000] zynq_clock_init: clkc starts at (ptrval)
 +
[    0.000000] Zynq clock init
 +
[    0.000011] sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
 +
[    0.005723] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
 +
[    0.016655] Switching to timer-based delay loop, resolution 3ns
 +
[    0.023169] Console: colour dummy device 80x30
 +
[    0.026895] Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
 +
[    0.037305] pid_max: default: 32768 minimum: 301
 +
[    0.042082] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
 +
[    0.049081] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
 +
[    0.057754] CPU: Testing write buffer coherency: ok
 +
[    0.061529] CPU0: Spectre v2: using BPIALL workaround
 +
[    0.066749] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
 +
[    0.072812] Setting up static identity map for 0x100000 - 0x100060
 +
[    0.078378] rcu: Hierarchical SRCU implementation.
 +
[    0.083352] smp: Bringing up secondary CPUs ...
 +
[    0.088388] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
 +
[    0.088399] CPU1: Spectre v2: using BPIALL workaround
 +
[    0.098134] smp: Brought up 1 node, 2 CPUs
 +
[    0.102036] SMP: Total of 2 processors activated (1333.33 BogoMIPS).
 +
[    0.108358] CPU: All CPU(s) started in SVC mode.
 +
[    0.113587] devtmpfs: initialized
 +
[    0.121144] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
 +
[    0.124128] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
 +
[    0.133462] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
 +
[    0.141395] pinctrl core: initialized pinctrl subsystem
 +
[    0.146259] NET: Registered protocol family 16
 +
[    0.151964] DMA: preallocated 256 KiB pool for atomic coherent allocations
 +
[    0.157733] thermal_sys: Registered thermal governor 'step_wise'
 +
[    0.158046] cpuidle: using governor ladder
 +
[    0.166503] cpuidle: using governor menu
 +
[    0.182919] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
 +
[    0.185265] hw-breakpoint: maximum watchpoint size is 4 bytes.
 +
[    0.191178] zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)
 +
[    0.198318] e0000000.serial: ttyPS1 at MMIO 0xe0000000 (irq = 34, base_baud = 3125000) is a xuartps
 +
[    0.207234] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 35, base_baud = 3125000) is a xuartps
 +
[    0.221091] printk: console [ttyPS0] enabled
 +
[    0.221091] printk: console [ttyPS0] enabled
 +
[    0.225396] printk: bootconsole [cdns0] disabled
 +
[    0.225396] printk: bootconsole [cdns0] disabled
 +
[    0.249776] vgaarb: loaded
 +
[    0.252888] SCSI subsystem initialized
 +
[    0.256896] usbcore: registered new interface driver usbfs
 +
[    0.262468] usbcore: registered new interface driver hub
 +
[    0.267875] usbcore: registered new device driver usb
 +
[    0.273183] mc: Linux media interface: v0.10
 +
[    0.277485] videodev: Linux video capture interface: v2.00
 +
[    0.283046] pps_core: LinuxPPS API ver. 1 registered
 +
[    0.288002] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
 +
[    0.297158] PTP clock support registered
 +
[    0.301145] EDAC MC: Ver: 3.0.0
 +
[    0.304805] FPGA manager framework
 +
[    0.308536] Advanced Linux Sound Architecture Driver Initialized.
 +
[    0.315660] clocksource: Switched to clocksource arm_global_timer
 +
[    0.332917] NET: Registered protocol family 2
 +
[    0.337977] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
 +
[    0.346425] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
 +
[    0.354267] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
 +
[    0.361542] TCP: Hash tables configured (established 8192 bind 8192)
 +
[    0.368054] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
 +
[    0.374750] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
 +
[    0.382042] NET: Registered protocol family 1
 +
[    0.387083] RPC: Registered named UNIX socket transport module.
 +
[    0.393034] RPC: Registered udp transport module.
 +
[    0.397734] RPC: Registered tcp transport module.
 +
[    0.402441] RPC: Registered tcp NFSv4.1 backchannel transport module.
 +
[    0.408896] PCI: CLS 0 bytes, default 64
 +
[    0.413390] hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
 +
[    0.421576] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
 +
[    0.431150] workingset: timestamp_bits=14 max_order=18 bucket_order=4
 +
[    0.438734] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
 +
[    0.446129] bounce: pool size: 64 pages
 +
[    0.449974] io scheduler mq-deadline registered
 +
[    0.454520] io scheduler kyber registered
 +
[    0.458913] zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
 +
[    0.467704] dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
 +
[    0.474442] dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
 +
[    0.494238] brd: module loaded
 +
[    0.504037] loop: module loaded
 +
[    0.511083] random: fast init done
 +
[    0.614245] random: crng init done
 +
[    0.623641] spi-nor spi0.0: trying to lock already unlocked area
 +
[    0.629650] spi-nor spi0.0: s25fl128s1 (16384 Kbytes)
 +
[    0.639922] libphy: Fixed MDIO Bus: probed
 +
[    0.645716] CAN device driver interface
 +
[    0.652273] libphy: MACB_mii_bus: probed
 +
[    0.688524] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 37 (7a:68:29:db:0b:f6)
 +
[    0.698709] e1000e: Intel(R) PRO/1000 Network Driver
 +
[    0.703668] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
 +
[    0.710509] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
 +
[    0.717037] ehci-pci: EHCI PCI platform driver
 +
[    0.721607] usbcore: registered new interface driver usb-storage
 +
[    0.728609] ULPI transceiver vendor/product ID 0x0424/0x0006
 +
[    0.734267] Found SMSC USB331x ULPI transceiver.
 +
[    0.738913] ULPI integrity check: passed.
 +
[    0.745040] i2c /dev entries driver
 +
[    0.752088] rtc-ds3232 0-0068: registered as rtc0
 +
[    0.757162] rtc-ds3232 0-0068: setting system clock to 2018-03-09T17:29:17 UTC (1520616557)
 +
[    0.765791] cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 31
 +
[    0.774272] cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s
 +
[    0.781826] EDAC MC: ECC not enabled
 +
[    0.785972] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 666666 KHz, changing to: 666667 KHz
 +
[    0.796932] Xilinx Zynq CpuIdle Driver started
 +
[    0.800410] sdhci: Secure Digital Host Controller Interface driver
 +
[    0.803503] sdhci: Copyright(c) Pierre Ossman
 +
[    0.805718] sdhci-pltfm: SDHCI platform and OF driver helper
 +
[    0.809266] ledtrig-cpu: registered to indicate activity on CPUs
 +
[    0.812545] clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 1075096770 ns
 +
[    0.817251] timer #0 at dfb516c6, irq=50
 +
[    0.819556] usbcore: registered new interface driver usbhid
 +
[    0.822381] usbhid: USB HID core driver
 +
[    0.827302] fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
 +
[    0.831575] mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
 +
[    0.831977] NET: Registered protocol family 10
 +
[    0.838558] Segment Routing with IPv6
 +
[    0.840631] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
 +
[    0.847540] NET: Registered protocol family 17
 +
[    0.852063] can: controller area network core
 +
[    0.856576] NET: Registered protocol family 29
 +
[    0.861071] can: raw protocol
 +
[    0.864050] can: broadcast manager protocol
 +
[    0.868298] can: netlink gateway - max_hops=1
 +
[    0.873045] Registering SWP/SWPB emulation handler
 +
[    0.880140] of-fpga-region fpga-full: FPGA Region probed
 +
[    0.886112] of_cfs_init
 +
[    0.888667] of_cfs_init: OK
 +
[    0.891875] ALSA device list:
 +
[    0.894839]  No soundcards found.
 +
[    0.898729] Waiting for root device /dev/mmcblk0p2...
 +
[    1.052324] mmc0: new high speed SDHC card at address aaaa
 +
[    1.055781] mmcblk0: mmc0:aaaa SA16G 14.8 GiB
 +
[    1.060584]  mmcblk0: p1 p2
 +
[    1.086701] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
 +
[    1.090810] VFS: Mounted root (ext4 filesystem) on device 179:2.
 +
[    1.094724] devtmpfs: mounted
 +
[    1.099892] Freeing unused kernel memory: 1024K
 +
[    1.136017] Run /sbin/init as init process
 +
INIT: version 2.97 booting
 +
[    1.516983] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
 +
Starting udev
 +
[    1.712872] udevd[82]: starting version 3.2.9
 +
[    1.763498] udevd[83]: starting eudev-3.2.9
 +
[    2.244862] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
 +
INIT: Entering runlevel: 5
 +
Configuring network interfaces... done.
 +
Starting system message bus: dbus.
 +
Starting haveged: haveged: command socket is listening at fd 3
 +
haveged: haveged starting up
  
Then, u-boot uses the previous listed commands for reading the binary images and starting the linux bootstrap from the ''MMC part 2'' (which is reserved for the root-file system storage).
 
  
The following u-boot environment variables are present for this purposes:
+
Starting Dropbear SSH server: dropbear.
<pre>
+
Starting rpcbind daemon...done.
mmcargs=setenv bootargs root=${mmcroot}
+
starting statd: done
mmcroot=/dev/mmcblk2p2 rootwait rw
+
Starting atd: OK
</pre>
+
Starting internet superserver: inetd.
 +
NFS daemon support not enabled in kernel
 +
Starting system log daemon...0
 +
Mar  9 17:29:22 borax kernel: [    0.000000] L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
 +
Mar  9 17:29:22 borax kernel: [    0.000000] L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
 +
Mar  9 17:29:22 borax kernel: [    0.413390] hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
 +
Mar  9 17:29:22 borax kernel: [    0.623641] spi-nor spi0.0: trying to lock already unlocked area
 +
Mar  9 17:29:22 borax kernel: [    1.516983] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
 +
Starting internet superserver: xinetd.
 +
Starting crond: OK
 +
Starting tcf-agent: OK
  
==== boot vars ====
+
PetaLinux 2021.2 borax ttyPS0
  
The following environment variables should be configured for u-boot properly reading the boot files from the first SD card partition, e.g.
 
  
<pre class="workstation-terminal">
+
root@borax:~# uname -a
=> setenv normalboot mmcboot
+
Linux borax 5.10.0-xilinx-v2021.2 #1 SMP PREEMPT Tue Oct 12 09:30:57 UTC 2021 armv7l armv7l armv7l GNU/Linux
=> setenv bootfile sdvx-1.0.1_lite_uImage
+
root@borax:~# cat /etc/build
=> setenv fdtfile sdvx-1.0.1_lite_imx6dl-sdv03-cb002a.dtb
+
-----------------------
=> setenv splashfile splash_image.bmp
+
Build Configuration:  |
</pre>
+
-----------------------
 +
DISTRO = petalinux
 +
DISTRO_VERSION = 2021.2
 +
MACHINE = zynq-generic
 +
IMAGE_BASENAME = dave-image-devel
 +
-----------------------
 +
Layer Revisions:      |
 +
-----------------------
 +
meta              = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-poky        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-perl        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-python      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-filesystems  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-gnome        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-multimedia  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-networking  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-webserver    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xfce        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-initramfs    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-oe          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-clang        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-chromium    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-qt5          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-microblaze  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-bsp  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-pynq  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-contrib = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-standalone = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-tools = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-petalinux    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-virtualization = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-openamp      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-jupyter      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-vitis-ai    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-python2      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-som          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-security    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-tpm          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-user        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-dave        = HEAD:e944801f104f86191cd086d0cea8f3df88dda061
 +
workspace        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
root@borax:~# cat /etc/os-release
 +
ID=petalinux
 +
NAME="PetaLinux"
 +
VERSION="2021.2 (gatesgarth)"
 +
VERSION_ID=2021.2
 +
PRETTY_NAME="PetaLinux 2021.2 (gatesgarth)"
 +
BUILD_VERSION="desk-xz7-l-1.0.1"
 +
root@borax:~# shutdown -h now
  
then save the environment and reboot the system to apply the new configuration:
+
Broadcast message from root@borax (ttyPS0) (Fri Mar  9 17:29:35 2018):
  
<pre class="workstation-terminal">
+
The system is going down for system halt NOW!
=> saveenv
+
INIT: Sending processes configured via /etc/inittab the TERM signal
Saving Environment to MMC...
+
Stopping haveged:
Writing to MMC(2)... done
 
=> reset
 
</pre>
 
  
=== Program root file system into NAND flash ===
+
Stopping Dropbear SSH server: stopped /usr/sbin/dropbear (pid 217)
 
+
dropbear.
* Boot the system via SD or NFS as described in the e [[(<KIT>)#Quick_start_guide|Quick start guide]]
+
Stopping atd: OK
* By default, the NAND is already partitioned to allow booting from NAND-only (see next section) and, thus, some partitions are reserved for u-boot and kernel images. Here we won't modify this default configuration. The [[Memory Tecnology Device (MTD)|MTD]] partitions can be dumped with <code>/proc/mtd</code> (the partition's name should be self-explanatory)
+
Stopping system message bus: dbus.
<pre class="workstation-terminal">
+
Stopping internet superserver: inetd.
root@sdvx-lite:~# cat /proc/mtd
+
stopping mountd: done
dev:   size  erasesize  name
+
stopping nfsd: done
mtd0: 00800000 00020000 "nand-uboot"
+
Stopping system log daemon...0
mtd1: 00100000 00020000 "nand-env1"
+
Stopping tcf-agent: OK
mtd2: 00100000 00020000 "nand-env2"
+
Stopping internet superserver: xinetd.
mtd3: 00100000 00020000 "nand-fdt"
+
stopping statd: done
mtd4: 00100000 00020000 "nand-spare"
+
Stopping crond: OK
mtd5: 00800000 00020000 "nand-kernel"
+
Stopping rpcbind daemon...
mtd6: 00600000 00020000 "nand-splash"
+
done.
mtd7: 3e600000 00020000 "nand-ubi"
+
Deconfiguring network interfaces... done.
root@sdvx-lite:~#
+
Sending all processes the TERM signal...
 +
logout
 +
Sending all processes the KILL signal...
 +
Unmounting remote filesystems...
 +
Deactivating swap...
 +
Unmounting local filesystems...
 +
[  24.097545] reboot: System halted
 
</pre>
 
</pre>
  
{{ImportantMessage|text=Please note that MTD partition index may change depending of flash device availability, flash device size, u-boot environment variables or kernel device driver load order. Always take care of looking inside <code>/proc/mtd</code> to match your specific layout}}
+
=== Program the NAND flash ===
 
 
  
* Format and initialize ''nand-ubi'' partition, which in our case is <code>mtd7</code>, using [[Memory Tecnology Device (MTD)#UBI|UBI]] with:
+
This chapter is compatible with [[BORA Lite SOM | BORA Lite]] SOM.
  
<pre>
+
First of all, create a bootable microSD card as described [[DESK-XZ7-L/Development/Creating_and_building_the_Petalinux_project| here]] with <code>config_boralite_nand_usd</code> configuration file, and install <code>wic</code> binary on microSD. Then create artifact to install on NAND flash with <code>config_boralite_nand</code> configuration file, as described [[DESK-XZ7-L/Development/Creating_and_building_the_Petalinux_project| here]], and save the <code>BOOT.BIN</code> and <code>dave-image-devel-zynq-generic.tar.gz</code> artifact into the first partition of microSD.
ubiformat /dev/mtd7
 
ubiattach -m 7
 
ubimkvol /dev/ubi0 -N rootfs -m
 
</pre>
 
  
E.g.
+
In this case <code>BOOT.BIN</code> binary that came from to <code>config_boralite_nand_usd</code> and <code>config_boralite_nand</code> are different, so save it with different name. Alternatively you can download binaries from [https://mirror.dave.eu/desk-xz-l/ mirror] and install on microSD.  
  
<pre class="workstation-terminal">
+
Then, install the following files into the microSD first partition:
root@sdvx-lite:~# ubiformat /dev/mtd7
 
ubiformat: mtd7 (nand), size 1048576000 bytes (1000.0 MiB), 8000 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
 
libscan: scanning eraseblock 7999 -- 100 % complete
 
ubiformat: 8000 eraseblocks have valid erase counter, mean value is 1
 
ubiformat: formatting eraseblock 7999 -- 100 % complete
 
root@sdvx-lite:~# ubiattach -m 7
 
[ 1714.823600] UBI: attaching mtd7 to ubi0
 
[ 1726.415587] UBI: scanning is finished
 
[ 1726.483765] UBI: attached mtd7 (name "nand-ubi", size 1000 MiB) to ubi0
 
[ 1726.491062] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
 
[ 1726.498301] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
 
[ 1726.505030] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
 
[ 1726.512430] UBI: good PEBs: 8000, bad PEBs: 0, corrupted PEBs: 0
 
[ 1726.518861] UBI: user volume: 0, internal volumes: 1, max. volumes count: 128
 
[ 1726.526025] UBI: max/mean erase counter: 3/2, WL threshold: 4096, image sequence number: 623070258
 
[ 1726.535433] UBI: available PEBs: 7836, total reserved PEBs: 164, PEBs reserved for bad PEB handling: 160
 
[ 1726.545260] UBI: background thread "ubi_bgt0d" started, PID 714
 
UBI device number 0, total 8000 LEBs (1015808000 bytes, 968.8 MiB), available 7836 LEBs (994983936 bytes, 948.9 MiB), LEB size 126976 bytes (124.0 KiB)
 
root@sdvx-lite:~# ubimkvol /dev/ubi0 -N rootfs -m
 
Set volume size to 994983936
 
Volume ID 0, size 7836 LEBs (994983936 bytes, 948.9 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
 
</pre>
 
  
* Now mount the UBI volume using [[Memory Tecnology Device (MTD)#UBIFS|UBIFS]] in a temporary directory
+
* <code>BOOT.BIN</code>. This binary come from to <code>config_boralite_nand_usd</code> configuration file, and need to install on microSD
 +
* <code>boot.scr</code>
 +
* <code>desk-xz7-l-1.0.1_boralite_nand_BOOT.BIN.EXTENDED</code>. This binary come from to <code>config_boralite_nand</code> configuration file, and has to be installed on NAND flash
 +
* <code>desk-xz7-l-1.0.1_boralite_nand_dave-image-devel-zynq-generic.tar.gz</code>
 +
* <code>image.ub</code>
  
<pre>
+
==== Programming NAND flash from microSD ====
mkdir -p /mnt/nand
 
mount -t ubifs ubi0_0 /mnt/nand
 
</pre>
 
  
E.g.:
+
* delete all partition on NAND flash memory
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
root@sdvx-lite:~# mkdir -p /mnt/nand
+
root@boralite:~# for i in $(seq 0 2); do flash_erase /dev/mtd$i 0 0; done
root@sdvx-lite:~# mount -t ubifs ubi0_0 /mnt/nand
+
Erasing 128 Kibyte @ 15e0000 -- 100 % complete
[ 1810.301461] UBIFS: default file-system created
+
Erasing 128 Kibyte @ 20000 -- 100 % complete
[ 1810.308952] UBIFS: background thread "ubifs_bgt0_0" started, PID 717
+
Erasing 128 Kibyte @ 1bde0000 -- 100 % complete
[ 1810.452274] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
 
[ 1810.459421] UBIFS: LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
 
[ 1810.469398] UBIFS: FS size: 992698368 bytes (946 MiB, 7818 LEBs), journal size 33521664 bytes (31 MiB, 264 LEBs)
 
[ 1810.480976] UBIFS: reserved for root: 4952683 bytes (4836 KiB)
 
[ 1810.487210] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 99D0F3C6-5955-4B30-9E2D-72202281BD30, small LPT model
 
 
</pre>
 
</pre>
  
* you can now extract the root file system into that directory
+
* install <code>BOOT.BIN</code> on NAND flash memory
  
<pre>
+
<pre class="workstation-terminal">
tar xvjf sdvx-1.0.1_image-devel-sdvx-lite.tar.bz2 -C /mnt/nand
+
root@boralite:~# nandwrite -p /dev/mtd0 /boot/desk-xz7-l-1.0.1_boralite_nand_BOOT.BIN.EXTENDED
 +
Writing data to block 0 at offset 0x0
 +
Writing data to block 1 at offset 0x20000
 +
...
 +
Writing data to block 168 at offset 0x1500000
 +
Writing data to block 169 at offset 0x1520000
 
</pre>
 
</pre>
  
* finally, you need to cleanly umount and detach the MTD partition
+
* install <code>dave-image-devel-zynq-generic.tar.gz</code> rootfs on NAND flash memory
 
 
<pre>
 
umount /mnt/nand/
 
ubidetach -m 7
 
</pre>
 
 
 
E.g.
 
  
 
<pre class="workstation-terminal">
 
<pre class="workstation-terminal">
root@sdvx-lite:~# umount /mnt/nand/
+
root@boralite:~# ubiformat /dev/mtd2
[ 2446.743091] UBIFS: un-mount UBI device 0, volume 0
+
ubiformat: mtd2 (nand), size 467664896 bytes (446.0 MiB), 3568 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
[ 2446.749670] UBIFS: background thread "ubifs_bgt0_0" stops
+
libscan: scanning eraseblock 3567 -- 100 % complete
root@sdvx-lite:~# ubidetach -m 7
+
ubiformat: 3568 eraseblocks are supposedly empty
[ 2450.738153] UBI: detaching mtd7 from ubi0
+
ubiformat: formatting eraseblock 3567 -- 100 % complete
[ 2450.759527] UBI: mtd7 is detached from ubi0
+
root@boralite:~# ubiattach -m 2
 +
UBI device number 0, total 3568 LEBs (460357632 bytes, 439.0 MiB), available 3404 LEBs (439197696 bytes, 418.8 MiB), LEB size 129024 bytes (126.0 KiB)
 +
root@boralite:~# ubimkvol /dev/ubi0 -N rootfs -m
 +
Set volume size to 439197696
 +
Volume ID 0, size 3404 LEBs (439197696 bytes, 418.8 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "rootfs", alignment 1
 +
root@boralite:~# mkdir -p /mnt/nand
 +
root@boralite:~# mount -t ubifs ubi0_0 /mnt/nand
 +
root@boralite:~# tar -xzvf /boot/dave-image-devel-zynq-generic.tar.gz -C /mnt/nand/.
 +
...
 +
root@boralite:~# umount /mnt/nand/
 +
root@boralite:~# ubidetach -m 2
 
</pre>
 
</pre>
  
You can now safely reboot or turn off the system.
+
Once change boot mode and restarted, the complete boot log can be like this one:
  
In U-Boot environment check the following variable, which must contain the same MTD partition number used above
+
<pre class="mw-collapsible mw-collapsed">
 +
U-Boot 2021.01-desk-xz7-l-1.0.1 (Jan 12 2024 - 10:44:15 +0000)
  
<pre>
+
CPU:  Zynq 7z020
nand_args=setenv bootargs root=ubi0:rootfs rootfstype=ubifs rw ubi.mtd=7
+
Silicon: v3.1
</pre>
+
Model: Bora
 +
DRAM:  ECC disabled 1 GiB
 +
Flash: 0 Bytes
 +
NAND:  1024 MiB
 +
MMC:  mmc@e0100000: 0
 +
Loading Environment from NAND... *** Warning - bad CRC, using default environment
  
=== Program root file system into eMMC flash ===
+
In:    serial@e0001000
 +
Out:  serial@e0001000
 +
Err:  serial@e0001000
 +
SOM ConfigID#: 77777777
 +
SOM UniqueID#: 55555555:66666666
 +
CB ConfigID#: ffffffff
 +
CB UniqueID#: ffffffff:ffffffff
 +
Net:
 +
ZYNQ GEM: e000b000, mdio bus e000b000, phyaddr 7, interface rgmii-id
  
* Boot the system via SD or NFS as described in the e [[(<KIT>)#Quick_start_guide|Quick start guide]]
+
Warning: ethernet@e000b000 (eth0) using random MAC address - f6:c3:de:d6:d6:e6
* eMMC device has to be partitioned and properly formatted choosing the <code>file system</code> for each partition
+
eth0: ethernet@e000b000
* an example of SD partitioning script is the following one:
+
Hit ENTER within 2 seconds to stop autoboot
  
==== FAT32 partition ====
+
Device 0: nand0, sector size 128 KiB
<pre>
+
  Page size      2048 b
#!/bin/sh
+
  OOB size          64 b
 +
  Erase size    131072 b
 +
  subpagesize      512 b
 +
  options    0x40004000
 +
  bbt options 0x00020000
  
node=$1
+
NAND read: device 0 offset 0xfc0000, size 0x40000
 +
262144 bytes read: OK
 +
NAND: Trying to boot script at 3000000
 +
## Executing script at 03000000
 +
Trying to load boot images from nand
  
# partition size in MB
+
Device 0: nand0, sector size 128 KiB
BOOTLOAD_RESERVE=8
+
  Page size      2048 b
BOOT_ROM_SIZE=128
+
  OOB size          64 b
RFS_SIZE=2048
+
  Erase size    131072 b
 +
  subpagesize      512 b
 +
  options    0x40004000
 +
  bbt options 0x00020000
  
# create the SDCARD partition
+
NAND read: device 0 offset 0x1080000, size 0x6400000
part=""
+
104857600 bytes read: OK
echo ${node} | grep mmcblk > /dev/null
+
## Loading kernel from FIT Image at 10000000 ...
if [ "$?" -eq "0" ]; then
+
  Using 'conf-system-top.dtb' configuration
         part="p"
+
  Verifying Hash Integrity ... OK
fi
+
  Trying 'kernel-1' kernel subimage
 +
    Description:  Linux kernel
 +
    Type:        Kernel Image
 +
    Compression:  uncompressed
 +
    Data Start:  0x100000f8
 +
    Data Size:    4845944 Bytes = 4.6 MiB
 +
    Architecture: ARM
 +
    OS:          Linux
 +
    Load Address: 0x00200000
 +
    Entry Point:  0x00200000
 +
    Hash algo:    sha256
 +
    Hash value:  f5d0c9b9a689e4b0657468fb280f0c8fb60064196b7938a77a43b36a2743acca
 +
  Verifying Hash Integrity ... sha256+ OK
 +
## Loading fdt from FIT Image at 10000000 ...
 +
  Using 'conf-system-top.dtb' configuration
 +
  Verifying Hash Integrity ... OK
 +
  Trying 'fdt-system-top.dtb' fdt subimage
 +
    Description:  Flattened Device Tree blob
 +
    Type:         Flat Device Tree
 +
    Compression:  uncompressed
 +
    Data Start:  0x1049f37c
 +
    Data Size:    20656 Bytes = 20.2 KiB
 +
    Architecture: ARM
 +
    Hash algo:    sha256
 +
    Hash value:  42e997d9430c0dc091dfb37df69c2148e40ad7fdd75ec4f49501bc5d4bc48f53
 +
  Verifying Hash Integrity ... sha256+ OK
 +
  Booting using the fdt blob at 0x1049f37c
 +
  Loading Kernel Image
 +
  Loading Device Tree to 2fff7000, end 2ffff0af ... OK
  
# print the SD total capacity
+
Starting kernel ...
total_size=`sfdisk -s ${node}`
 
total_size=`expr ${total_size} / 1024`
 
echo SD total size: ${total_size}KB
 
  
# calculate partition sizes
+
[    0.000000] Booting Linux on physical CPU 0x0
boot_start=`expr ${BOOTLOAD_RESERVE} \\* 1024 \\* 1024 / 512`
+
[    0.000000] Linux version 5.10.0-xilinx-v2021.2 (oe-user@oe-host) (arm-xilinx-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Tue Oct 12 09:30:57 UTC 2021
boot_size=`expr ${BOOT_ROM_SIZE} \\* 1024 \\* 1024 / 512`
+
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
rfs_start=`expr ${boot_size} + ${boot_start}`
+
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
rfs_size=`expr ${RFS_SIZE} \\* 1024 \\* 1024 / 512`
+
[    0.000000] OF: fdt: Machine model: Bora
 +
[    0.000000] earlycon: cdns0 at MMIO 0xe0001000 (options '115200n8')
 +
[    0.000000] printk: bootconsole [cdns0] enabled
 +
[    0.000000] Memory policy: Data cache writealloc
 +
[    0.000000] cma: Reserved 16 MiB at 0x3f000000
 +
[    0.000000] Zone ranges:
 +
[    0.000000]  Normal  [mem 0x0000000000000000-0x000000002fffffff]
 +
[    0.000000]  HighMem  [mem 0x0000000030000000-0x000000003fffffff]
 +
[    0.000000] Movable zone start for each node
 +
[    0.000000] Early memory node ranges
 +
[    0.000000]  node  0: [mem 0x0000000000000000-0x000000003fffffff]
 +
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]
 +
[    0.000000] percpu: Embedded 16 pages/cpu s32780 r8192 d24564 u65536
 +
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
 +
[    0.000000] Kernel command line: console=ttyPS0,115200 earlycon noinitrd root=ubi0_0 rw rootfstype=ubifs ubi.mtd=2
 +
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
 +
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
 +
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
 +
[    0.000000] Memory: 1009768K/1048576K available (7168K kernel code, 279K rwdata, 1952K rodata, 1024K init, 162K bss, 22424K reserved, 16384K cma-reserved, 245760K highmem)
 +
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
 +
[    0.000000] rcu:    RCU event tracing is enabled.
 +
[    0.000000] rcu:    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
 +
[    0.000000]  Trampoline variant of Tasks RCU enabled.
 +
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
 +
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
 +
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
 +
[    0.000000] efuse mapped to (ptrval)
 +
[    0.000000] slcr mapped to (ptrval)
 +
[    0.000000] GIC physical location is 0xf8f01000
 +
[    0.000000] L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
 +
[    0.000000] L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
 +
[    0.000000] L2C-310 erratum 769419 enabled
 +
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
 +
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
 +
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
 +
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
 +
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
 +
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
 +
[    0.000000] random: get_random_bytes called from start_kernel+0x2c0/0x4a0 with crng_init=0
 +
[    0.000000] zynq_clock_init: clkc starts at (ptrval)
 +
[    0.000000] Zynq clock init
 +
[    0.000011] sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
 +
[    0.005723] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
 +
[    0.016654] Switching to timer-based delay loop, resolution 3ns
 +
[    0.023168] Console: colour dummy device 80x30
 +
[    0.026895] Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
 +
[    0.037305] pid_max: default: 32768 minimum: 301
 +
[    0.042082] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
 +
[    0.049081] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
 +
[    0.057757] CPU: Testing write buffer coherency: ok
 +
[    0.061529] CPU0: Spectre v2: using BPIALL workaround
 +
[    0.066750] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
 +
[    0.072813] Setting up static identity map for 0x100000 - 0x100060
 +
[    0.078377] rcu: Hierarchical SRCU implementation.
 +
[    0.083352] smp: Bringing up secondary CPUs ...
 +
[    0.088389] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
 +
[    0.088401] CPU1: Spectre v2: using BPIALL workaround
 +
[    0.098133] smp: Brought up 1 node, 2 CPUs
 +
[    0.102036] SMP: Total of 2 processors activated (1333.33 BogoMIPS).
 +
[    0.108357] CPU: All CPU(s) started in SVC mode.
 +
[    0.113588] devtmpfs: initialized
 +
[    0.121210] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
 +
[    0.124130] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
 +
[    0.133461] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
 +
[    0.141400] pinctrl core: initialized pinctrl subsystem
 +
[    0.146260] NET: Registered protocol family 16
 +
[    0.151995] DMA: preallocated 256 KiB pool for atomic coherent allocations
 +
[    0.157737] thermal_sys: Registered thermal governor 'step_wise'
 +
[    0.158045] cpuidle: using governor ladder
 +
[    0.166503] cpuidle: using governor menu
 +
[    0.183028] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
 +
[    0.185376] hw-breakpoint: maximum watchpoint size is 4 bytes.
 +
[    0.191287] zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)
 +
[    0.198430] e0000000.serial: ttyPS1 at MMIO 0xe0000000 (irq = 34, base_baud = 3125000) is a xuartps
 +
[    0.207344] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 35, base_baud = 3125000) is a xuartps
 +
[    0.221202] printk: console [ttyPS0] enabled
 +
[    0.221202] printk: console [ttyPS0] enabled
 +
[    0.225508] printk: bootconsole [cdns0] disabled
 +
[    0.225508] printk: bootconsole [cdns0] disabled
 +
[    0.249919] vgaarb: loaded
 +
[    0.253028] SCSI subsystem initialized
 +
[    0.257026] usbcore: registered new interface driver usbfs
 +
[    0.262608] usbcore: registered new interface driver hub
 +
[    0.268015] usbcore: registered new device driver usb
 +
[    0.273332] mc: Linux media interface: v0.10
 +
[    0.277632] videodev: Linux video capture interface: v2.00
 +
[    0.283192] pps_core: LinuxPPS API ver. 1 registered
 +
[    0.288149] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
 +
[    0.297305] PTP clock support registered
 +
[    0.301292] EDAC MC: Ver: 3.0.0
 +
[    0.304949] FPGA manager framework
 +
[    0.308681] Advanced Linux Sound Architecture Driver Initialized.
 +
[    0.315837] clocksource: Switched to clocksource arm_global_timer
 +
[    0.333163] NET: Registered protocol family 2
 +
[    0.338219] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
 +
[    0.346667] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
 +
[    0.354511] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
 +
[    0.361784] TCP: Hash tables configured (established 8192 bind 8192)
 +
[    0.368300] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
 +
[    0.375014] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
 +
[    0.382308] NET: Registered protocol family 1
 +
[    0.387345] RPC: Registered named UNIX socket transport module.
 +
[    0.393300] RPC: Registered udp transport module.
 +
[    0.398001] RPC: Registered tcp transport module.
 +
[    0.402740] RPC: Registered tcp NFSv4.1 backchannel transport module.
 +
[    0.409180] PCI: CLS 0 bytes, default 64
 +
[    0.413721] hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
 +
[    0.421860] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
 +
[    0.431454] workingset: timestamp_bits=14 max_order=18 bucket_order=4
 +
[    0.439077] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
 +
[    0.446536] bounce: pool size: 64 pages
 +
[    0.450383] io scheduler mq-deadline registered
 +
[    0.454934] io scheduler kyber registered
 +
[    0.459327] zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
 +
[    0.468109] dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
 +
[    0.474850] dma-pl330 f8003000.dmac:        DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
 +
[    0.494688] brd: module loaded
 +
[    0.504477] loop: module loaded
 +
[    0.509473] libphy: Fixed MDIO Bus: probed
 +
[    0.515346] CAN device driver interface
 +
[    0.521835] libphy: MACB_mii_bus: probed
 +
[    0.562752] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 37 (f6:c3:de:d6:d6:e6)
 +
[    0.572919] e1000e: Intel(R) PRO/1000 Network Driver
 +
[    0.577877] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
 +
[    0.584681] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
 +
[    0.591202] ehci-pci: EHCI PCI platform driver
 +
[    0.595787] usbcore: registered new interface driver usb-storage
 +
[    0.602740] ULPI transceiver vendor/product ID 0x0424/0x0006
 +
[    0.608397] Found SMSC USB331x ULPI transceiver.
 +
[    0.613077] ULPI integrity check: passed.
 +
[    0.619138] i2c /dev entries driver
 +
[    0.626225] rtc-ds3232 0-0068: registered as rtc0
 +
[    0.631266] rtc-ds3232 0-0068: setting system clock to 2018-03-09T22:43:45 UTC (1520635425)
 +
[    0.639890] cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 31
 +
[    0.647246] tmp421 0-004f: Could not read configuration register (-6)
 +
[    0.654494] cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s
 +
[    0.662040] EDAC MC: ECC not enabled
 +
[    0.666183] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 666666 KHz, changing to: 666667 KHz
 +
[    0.677171] Xilinx Zynq CpuIdle Driver started
 +
[    0.680527] sdhci: Secure Digital Host Controller Interface driver
 +
[    0.683621] sdhci: Copyright(c) Pierre Ossman
 +
[    0.685836] sdhci-pltfm: SDHCI platform and OF driver helper
 +
[    0.689399] ledtrig-cpu: registered to indicate activity on CPUs
 +
[    0.692668] clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 1075096770 ns
 +
[    0.697371] timer #0 at (ptrval), irq=50
 +
[    0.699683] usbcore: registered new interface driver usbhid
 +
[    0.702500] usbhid: USB HID core driver
 +
[    0.705419] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xd3
 +
[    0.708625] nand: Winbond W29N08GV
 +
[    0.710334] nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
 +
[    0.712244] mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
 +
[    0.714200] nand: SDR timing mode 4 not acknowledged by the NAND chip
 +
[    0.721567] Bad block table found at page 524224, version 0x01
 +
[    0.728120] Bad block table found at page 524160, version 0x01
 +
[    0.734601] 3 fixed-partitions partitions found on MTD device W29N08GV
 +
[    0.741231] Creating 3 MTD partitions on "W29N08GV":
 +
[    0.746267] 0x000000000000-0x000001600000 : "bootbin"
 +
[    0.753640] 0x000001600000-0x000001640000 : "ubootenv"
 +
[    0.760285] 0x000001640000-0x00001d440000 : "rootfs"
 +
[    0.775328] fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
 +
[    0.783257] NET: Registered protocol family 10
 +
[    0.789108] Segment Routing with IPv6
 +
[    0.792886] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
 +
[    0.799816] NET: Registered protocol family 17
 +
[    0.804356] can: controller area network core
 +
[    0.808869] NET: Registered protocol family 29
 +
[    0.813401] can: raw protocol
 +
[    0.816497] can: broadcast manager protocol
 +
[    0.820768] can: netlink gateway - max_hops=1
 +
[    0.825605] Registering SWP/SWPB emulation handler
 +
[    0.832970] of-fpga-region fpga-full: FPGA Region probed
 +
[    0.838736] ubi0: attaching mtd2
 +
[    2.056102] ubi0: scanning is finished
 +
[    2.074242] ubi0: attached mtd2 (name "rootfs", size 446 MiB)
 +
[    2.080123] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
 +
[    2.087020] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
 +
[    2.093715] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
 +
[    2.100621] ubi0: good PEBs: 3568, bad PEBs: 0, corrupted PEBs: 0
 +
[    2.106734] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
 +
[    2.113950] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 635011865
 +
[    2.123040] ubi0: available PEBs: 0, total reserved PEBs: 3568, PEBs reserved for bad PEB handling: 160
 +
[    2.132475] ubi0: background thread "ubi_bgt0d" started, PID 53
 +
[    2.132642] of_cfs_init
 +
[    2.140972] of_cfs_init: OK
 +
[    2.144117] ALSA device list:
 +
[    2.147151]  No soundcards found.
 +
[    2.151854] UBIFS (ubi0:0): Mounting in unauthenticated mode
 +
[    2.157764] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 54
 +
[    2.252675] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
 +
[    2.260145] UBIFS (ubi0:0): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
 +
[    2.270077] UBIFS (ubi0:0): FS size: 437262336 bytes (417 MiB, 3389 LEBs), journal size 21934080 bytes (20 MiB, 170 LEBs)
 +
[    2.281079] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
 +
[    2.287714] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID 1D39DE69-4DB4-43C3-B1DC-4790B3D8D8CA, small LPT model
 +
[    2.300876] VFS: Mounted root (ubifs filesystem) on device 0:13.
 +
[    2.308081] devtmpfs: mounted
 +
[    2.314189] Freeing unused kernel memory: 1024K
 +
[    2.319122] Run /sbin/init as init process
 +
INIT: version 2.97 booting
 +
Starting udev
 +
[    3.363102] udevd[78]: starting version 3.2.9
 +
[    3.402426] random: udevd: uninitialized urandom read (16 bytes read)
 +
[    3.410464] random: udevd: uninitialized urandom read (16 bytes read)
 +
[    3.426120] random: udevd: uninitialized urandom read (16 bytes read)
 +
[    3.496826] udevd[79]: starting eudev-3.2.9
 +
bootlogd: /dev/ttyPS0Configuring packages on first boot....
 +
(This may take several minutes. Please do not power off the machine.)
 +
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
 +
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
 +
Removing any system startup links for run-postinsts ...
 +
  /etc/rcS.d/S99run-postinsts
 +
INIT: Entering runlevel: 5
 +
Configuring network interfaces... done.
 +
Starting system message bus: dbus.
 +
Starting haveged: haveged: command socket is listening at fd 3
 +
haveged: haveged starting up
  
umount ${node}${part}1 > /dev/null 2>&1
 
umount ${node}${part}2 > /dev/null 2>&1
 
  
# call sfdisk to create partition table
+
Starting Dropbear SSH server: Waiting for kernel randomness to be initialised...
{ echo ${boot_start},${boot_size},0c,-; echo ${rfs_start},${rfs_size},83,-; } | sfdisk --force ${node}
+
haveged: haveged: ver: 1.9.13; arch: generic; vend: ; build: (gcc 10.2.0 CTV); collect: 128K
  
# format the SDCARD partition
+
haveged: haveged: cpu: (VC); data: 16K (D); inst: 16K (D); idx: 12/40; sz: 15006/57790
echo "formatting boot"
 
mkfs.vfat -F 32 -n boot ${node}${part}1
 
echo "formatting rfs"
 
mkfs.ext4 -F ${node}${part}2 -Lrfs
 
</pre>
 
  
E.g.
+
haveged: haveged: tot tests(BA8): A:1/1 B:1/1 continuous tests(B):  last entropy estimate 7.99862
  
<pre class="workstation-terminal">
+
haveged: haveged: fills: 0, generated: 0
root@sdvx-lite:~# ./sdcard-partition.sh /dev/mmcblk2
 
SD total size: 3776KB
 
[ 1341.905014]  mmcblk2: p1 p2
 
Checking that no-one is using this disk right now ... OK
 
  
Disk /dev/mmcblk2: 3.7 GiB, 3959422976 bytes, 7733248 sectors
+
Generating 2048 bit rsa key, this may take a while...
Units: sectors of 1 * 512 = 512 bytes
+
Public key portion is:
Sector size (logical/physical):[ 1341.922729mmcblk2: p1 p2
+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCTB8TmZSylf7njT2d8i1CdsvL2RVkN9NBTJjMX36nmx3GgyTY1O+R8fRv3eXdFD+XWUk02YMWSpPwvC6geSyGEovUe60y7cg/SRyZRTth/sokI+HboE/i0BUzeDCtFS5/L2nDNs/TIg6/0yVn4fcnWH7IDxLNTsqdf0f7wcapCXQrP2+xocU63B4NkXpUVL+Y/Za06M0lqaiqasfOXFfP5MSyTTeJa91LfH5qOca0fxJGqmMDStJjaLTAsEiI3H2waFysRG/prIO17fVbnbsCF2UaNm8Un7wluae0HjUBd/ItTdIa6erKUJilVGsSkPo0+Shx5O1Zk4cetuPFs+e2P root@boralite
  512 bytes / 512 bytes
+
Fingerprint: sha1!! 0e:82:1e:52:c9:20:b1:64:1d:17:b0:a8:a8:e5:93:44:3f:ec:6c:38
I/O size (minimum/optimal): 512 bytes / 512 bytes
+
dropbear.
Disklabel type: dos
+
Starting rpcbind daemon...done.
Disk identifier: 0xa77eb3f0
+
starting statd: done
 +
Starting atd: OK
 +
Starting internet superserver: inetd.
 +
NFS daemon support not enabled in kernel
 +
Starting system log daemon...0
 +
Mar  9 22:44:12 boralite kernel: [   0.000000] L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
 +
Mar 9 22:44:12 boralite kernel: [    0.000000] L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
 +
Mar 9 22:44:12 boralite kernel: [    0.413721] hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
 +
Mar  9 22:44:12 boralite kernel: [    0.647246] tmp421 0-004f: Could not read configuration register (-6)
 +
Mar  9 22:44:12 boralite kernel: [    0.714200] nand: SDR timing mode 4 not acknowledged by the NAND chip
 +
Mar  9 22:44:12 boralite kernel: [    5.281753] urandom_read: 4 callbacks suppressed
 +
Starting internet superserver: xinetd.
 +
Starting crond: OK
 +
Starting tcf-agent: OK
  
Old situation:
+
PetaLinux 2021.2 boralite ttyPS0
  
Device        Boot  Start    End Sectors  Size Id Type
 
/dev/mmcblk2p1        2048  264191  262144  128M  c W95 FAT32 (LBA)
 
/dev/mmcblk2p2      264192 4458495 4194304    2G 83 Linux
 
  
>>> Created a new DOS disklabel with disk identifier 0xcce0c36f.
+
root@boralite:~# cat /etc/build
Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 128 MiB.
+
-----------------------
/dev/mmcblk2p2: Created a new partition 2 of type 'Linux' and of size 2 GiB.
+
Build Configuration:  |
/dev/mmcblk2p3:
+
-----------------------
New situation:
+
DISTRO = petalinux
 +
DISTRO_VERSION = 2021.2
 +
MACHINE = zynq-generic
 +
IMAGE_BASENAME = dave-image-devel
 +
-----------------------
 +
Layer Revisions:      |
 +
-----------------------
 +
meta              = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-poky        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-perl        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-python      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-filesystems  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-gnome        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-multimedia  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-networking  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-webserver    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xfce        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-initramfs    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-oe          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-clang        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-chromium    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-qt5          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-microblaze  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-bsp  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-pynq  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-contrib = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-standalone = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-xilinx-tools = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-petalinux    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-virtualization = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-openamp      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-jupyter      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-vitis-ai    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-python2      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-som          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-security    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-tpm          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-user        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
meta-dave        = HEAD:e944801f104f86191cd086d0cea8f3df88dda061
 +
workspace        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
 +
root@boralite:~# uname -a
 +
Linux boralite 5.10.0-xilinx-v2021.2 #1 SMP PREEMPT Tue Oct 12 09:30:57 UTC 2021 armv7l armv7l armv7l GNU/Linux
 +
root@boralite:~# cat /etc/os-release
 +
ID=petalinux
 +
NAME="PetaLinux"
 +
VERSION="2021.2 (gatesgarth)"
 +
VERSION_ID=2021.2
 +
PRETTY_NAME="PetaLinux 2021.2 (gatesgarth)"
 +
BUILD_VERSION="desk-xz7-l-1.0.1"
 +
root@boralite:~# shutdown -h now
  
Device        Boot Start    End Sectors  Size Id Type
+
Broadcast message from root@boralite (ttyPS0) (Fri Mar 9 22:46:32 2018):
/dev/mmcblk2p1      16384  278527  262144  128M  c W95 FAT32 (LBA)
 
/dev/mmcblk2p2      278528 4472831 4194304    2G 83 Linux
 
  
The partition table has been altered.
+
The system is going down for system halt NOW!
Calling ioctl() to re-read partition table.
+
INIT: Sending processes configured via /etc/inittab the TERM signal
Syncing disks.
+
root@boralite:~# Stopping haveged:
formatting boot
 
mkfs.fat 3.0.28 (2015-05-16)
 
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
 
formatting rfs
 
mke2fs 1.43-WIP (18-May-2015)
 
Discarding device blocks: done
 
Creating filesystem with 524288 4k blocks and 131072 inodes
 
Filesystem UUID: 9a685543-1af2-4e39-83f3-b8a32248c021
 
Superblock backups stored on blocks:
 
        32768, 98304, 163840, 229376, 294912
 
  
Allocating group tables: done
+
Stopping Dropbear SSH server: stopped /usr/sbin/dropbear (pid 275)
Writing inode tables: done
+
dropbear.
Creating journal (16384 blocks): done
+
Stopping atd: OK
Writing superblocks and filesystem accounting information: done
+
Stopping system message bus: dbus.
 
+
Stopping internet superserver: inetd.
root@sdvx-lite:~#
+
stopping mountd: done
</pre>
+
stopping nfsd: done
 
+
Stopping system log daemon...0
* create a mount point and mount the first partition
+
Stopping tcf-agent: OK
<pre>
+
Stopping internet superserver: xinetd.
mkdir -p /mnt/emmc
+
stopping statd: done
mount /dev/mmcblk2p1 /mnt/emmc
+
Stopping crond: OK
</pre>
+
Stopping rpcbind daemon...
 
+
done.
* copy kernel, dtb and splash_image files
+
Deconfiguring network interfaces... done.
 
+
Sending all processes the TERM signal...
<pre class="workstation-terminal">
+
logout
root@sdvx-lite:~# mount /dev/mmcblk2p1 /mnt/emmc
+
Sending all processes the KILL signal...
[  40.988575] FAT-fs (mmcblk2p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
+
Unmounting remote filesystems...
root@sdvx-lite:~# cd /mnt/emmc
+
Deactivating swap...
root@sdvx-lite:/mnt/emmc# cp /tftpboot/sdvx/linux/sdvx-1.0.1*dtb .
+
Unmounting local filesystems...
root@sdvx-lite:/mnt/emmc# cp /tftpboot/sdvx/linux/sdvx-1.0.1*uImage .
+
[ 173.736463] reboot: System halted
root@sdvx-lite:/mnt/emmc# cp /tftpboot/sdvx/linux/splash_image.bmp .
 
root@sdvx-lite:/mnt/emmc# cd
 
root@sdvx-lite:~# umount /mnt/emmc
 
</pre>
 
 
 
* now mount the EXT4 volume in the temporary directory
 
 
 
E.g.:
 
 
 
<pre class="workstation-terminal">
 
root@sdvx-lite:~# mount /dev/mmcblk2p2 /mnt/emmc
 
[ 1810.899327] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Opts: (null)
 
root@sdvx-lite:~# cd /mnt/emmc
 
root@sdvx-lite:/mnt/emmc#
 
</pre>
 
 
 
* you can now extract the root file system into that directory
 
 
 
<pre>
 
tar xvjf sdvx-1.0.1_image-devel-sdvx-lite.tar.bz2
 
</pre>
 
 
 
* finally, you need to cleanly umount and safely reboot or turn off the system.
 
 
 
<pre class="workstation-terminal">
 
root@sdvx-lite:/mnt/emmc# cd
 
root@sdvx-lite:~# umount /mnt/emmc
 
root@sdvx-lite:~# reboot
 
</pre>
 
 
 
Reboot the system and configure U-Boot to apply the new configuration
 
 
 
<pre class="workstation-terminal">
 
=> setenv bootcmd run mmcboot
 
=> saveenv
 
</pre>
 
 
 
==== ext4 partition ====
 
For using an <b>ext4</b> partition also for boot files, it is possibile to change the formatting script:
 
 
 
{ echo ${boot_start},${boot_size},'''83''',-; echo ${rfs_start},${rfs_size},83,-; } | sfdisk --force ${node}
 
 
 
and formatting the first partition using ''mkfs.ext4''
 
 
 
  mkfs.ext4 -F ${node}${part}1 -Lboot
 
 
 
then, the u-boot <code>environment</code> has to be properly configured:
 
 
 
<pre class="workstation-terminal">
 
=> setenv mmc_loadk 'ext4load mmc ${mmcdev}:1 ${loadaddr} ${bootfile}'
 
=> setenv mmc_loadfdt 'ext4load mmc ${mmcdev}:1 ${fdtaddr} ${fdtfile}'
 
=> setenv mmc_loadsplash 'ext4load mmc ${mmcdev}:1 ${loadaddr} ${splashfile}; cp.b ${loadaddr} ${splashimage} ${filesize}'
 
=> saveenv
 
 
</pre>
 
</pre>
  
----
+
<section end=Body/>
  
[[Category:BORA]]
+
[[Category:BORA]] [[Category:BORA Xpress]][[Category:BORA Lite]]

Latest revision as of 09:22, 26 January 2024

History
Issue Date Notes

2022/11/22

DESK-XZ7-L-1.0.0-rc1 release
2023/01/23 DESK-XZ7-L-1.0.1 release



Standalone boot[edit | edit source]

This document was written and tested with the software/hardware combination described in the history table above. However, it contains general concepts that can be adapted to any DAVE Embedded Systems' Linux platform.


200px-Emblem-important.svg.png

The following programming examples are intended for laboratory usage or for preliminary deployment strategy.

A complete deployment strategy has to be carefully identifiyed taking into account the overall arguments like: boot speed, safe boot, recovery mechanisms, watchdog supervisor, etc.

We'll explain how to program and configure a SOM to boot in standalone mode, without the need for a system microSD card, with the following option:

  • booting with Quad-SPI NOR
    • in this configuration the primary boot images will be fetched from Quad-SPI NOR flash storage, while the root file system will be fetched from microSD
  • booting with NAND
    • in this configuration the primary boot images and rootfs will be fetched from NAND flash storage

Program the Quad-SPI NOR flash[edit | edit source]

This chapter is compatible with BORA, BORA Xpress and BORA Lite platforms, but below there is log for BORA Xpress SOM.

First of all, create a bootable microSD card as described here. Alternatively you can download binaries from mirror and install it on microSD or into tftpboot directory in your host device.

Then, boot the board with the microSD card and stop the automatic boot process of U-Boot in order to access the console.

U-Boot 2021.01-desk-xz7-l-1.0.1 (Jan 12 2024 - 10:44:15 +0000)

CPU:   Zynq 7z030
Silicon: v3.1
Model: Bora
DRAM:  ECC disabled 1 GiB
Flash: 0 Bytes
NAND:  0 MiB
MMC:   mmc@e0100000: 0
Loading Environment from FAT... *** Warning - bad CRC, using default environment

In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
SOM ConfigID#: 00000004
SOM UniqueID#: 2a0e92c4:03193a4b
CB ConfigID#: ffffffff
CB UniqueID#: ffffffff:ffffffff
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Warning: MAC addr not found in SPI NOR at block 8
Net:
ZYNQ GEM: e000b000, mdio bus e000b000, phyaddr 7, interface rgmii-id

Warning: ethernet@e000b000 (eth0) using random MAC address - 72:2c:e1:44:08:28
eth0: ethernet@e000b000
Hit ENTER within 2 seconds to stop autoboot
Zynq>

Programming Quad-SPI NOR flash from microSD[edit | edit source]

  • Initialize and format Quad-SPI NOR flash memory
Zynq> sf probe
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Zynq> sf erase 0 0x1000000
SF: 16777216 bytes @ 0x0 Erased: OK
  • Install BOOT.BIN on Quad-SPI NOR flash memory
Zynq> fatload mmc 0:1 $kernel_addr_r BOOT.BIN
7033004 bytes read in 406 ms (16.5 MiB/s)
Zynq> sf write $kernel_addr_r 0x0 $filesize
device 0 offset 0x0, size 0x6b50ac
SF: 7033004 bytes @ 0x0 Written: OK
  • Install image.ub on Quad-SPI NOR flash memory
Zynq> mw $kernel_addr_r 0x0 $filesize
Zynq> fatload mmc 0:1 $kernel_addr_r image.ub
4868556 bytes read in 287 ms (16.2 MiB/s)
Zynq> sf write $kernel_addr_r 0x700000 $filesize
device 0 offset 0x700000, size 0x4a49cc
SF: 4868556 bytes @ 0x700000 Written: OK
  • Install boot.scr on Quad-SPI NOR flash memory
Zynq> mw $kernel_addr_r 0x0 $filesize
Zynq> fatload mmc 0:1 $kernel_addr_r boot.scr
2709 bytes read in 14 ms (188.5 KiB/s)
Zynq> sf write $kernel_addr_r 0xFC0000 $filesize
device 0 offset 0xfc0000, size 0xa95
SF: 2709 bytes @ 0xfc0000 Written: OK

Programming Quad-SPI NOR flash from ethernet[edit | edit source]

  • Initialize and format Quad-SPI NOR flash memory
Zynq> sf probe
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Zynq> sf erase 0 0x1000000
SF: 16777216 bytes @ 0x0 Erased: OK
  • Properly define the ethernet configuration parameter:
Zynq> setenv ipaddr 192.168.0.89
Zynq> setenv serverip 192.168.0.99
  • download via TFTP the BOOT.BIN binary image and write BOOT.BIN on Quad-SPI NOR flash memory
Zynq> tftpboot $kernel_addr_r desk-xz7-l/desk-xz7-l-1.0.1_borax_BOOT.BIN
Using ethernet@e000b000 device
TFTP from server 192.168.0.99; our IP address is 192.168.0.89
Filename 'desk-xz7-l/desk-xz7-l-1.0.1_borax_BOOT.BIN'.
Load address: 0x2000000
Loading: #T ################################################################
         #################################################################
         ...
         #################################################################
         #########
         444.3 KiB/s
done
Bytes transferred = 7033004 (6b50ac hex)
Zynq> sf write $kernel_addr_r 0x0 $filesize
device 0 offset 0x0, size 0x6b50ac
SF: 7033004 bytes @ 0x0 Written: OK
  • download via TFTP the image.ub binary image and write image.ub on Quad-SPI NOR flash memory
Zynq> mw $kernel_addr_r 0x0 $filesize
Zynq> tftpboot $kernel_addr_r desk-xz7-l/desk-xz7-l-1.0.1_borax_image.ub
Using ethernet@e000b000 device
TFTP from server 192.168.0.99; our IP address is 192.168.0.89
Filename 'desk-xz7-l/desk-xz7-l-1.0.1_borax_image.ub'.
Load address: 0x2000000
Loading: #T ################################################################
         #################################################################
         ...
         #################################################################
         #########################################
         394.5 KiB/s
done
Bytes transferred = 4868556 (4a49cc hex)
Zynq> sf write $kernel_addr_r 0x700000 $filesize
device 0 offset 0x700000, size 0x4a49cc
SF: 4868556 bytes @ 0x700000 Written: OK
  • download via TFTP the boot.scr binary image and write boot.scr on Quad-SPI NOR flash memory
Zynq> mw $kernel_addr_r 0x0 $filesize
Zynq> tftpboot $kernel_addr_r desk-xz7-l/desk-xz7-l-1.0.1_borax_boot.scr
Using ethernet@e000b000 device
TFTP from server 192.168.0.99; our IP address is 192.168.0.89
Filename 'desk-xz7-l/desk-xz7-l-1.0.1_borax_boot.scr'.
Load address: 0x2000000
Loading: #T
         0 Bytes/s
done
Bytes transferred = 2709 (a95 hex)
Zynq> sf write $kernel_addr_r 0xFC0000 $filesize
device 0 offset 0xfc0000, size 0xa95
SF: 2709 bytes @ 0xfc0000 Written: OK

Once change boot mode and restarted, the complete boot log can be like this one:

U-Boot 2021.01-desk-xz7-l-1.0.1 (Jan 12 2024 - 10:44:15 +0000)

CPU:   Zynq 7z030
Silicon: v3.1
Model: Bora
DRAM:  ECC disabled 1 GiB
Flash: 0 Bytes
NAND:  0 MiB
MMC:   mmc@e0100000: 0
Loading Environment from SPIFlash... SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
SOM ConfigID#: 00000004
SOM UniqueID#: 2a0e92c4:03193a4b
CB ConfigID#: ffffffff
CB UniqueID#: ffffffff:ffffffff
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Warning: MAC addr not found in SPI NOR at block 8
Net:
ZYNQ GEM: e000b000, mdio bus e000b000, phyaddr 7, interface rgmii-id

Warning: ethernet@e000b000 (eth0) using random MAC address - 7a:68:29:db:0b:f6
eth0: ethernet@e000b000
Hit ENTER within 2 seconds to stop autoboot
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0xfc0000, size 0x40000
SF: 262144 bytes @ 0xfc0000 Read: OK
QSPI: Trying to boot script at 3000000
## Executing script at 03000000
Trying to load boot images from qspi
SF: Detected s25fl128s with page size 256 Bytes, erase size 64 KiB, total 16 MiB
device 0 offset 0x700000, size 0x600000
SF: 6291456 bytes @ 0x700000 Read: OK
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf-system-top.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000f8
     Data Size:    4845944 Bytes = 4.6 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00200000
     Entry Point:  0x00200000
     Hash algo:    sha256
     Hash value:   f5d0c9b9a689e4b0657468fb280f0c8fb60064196b7938a77a43b36a2743acca
   Verifying Hash Integrity ... sha256+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf-system-top.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'fdt-system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x1049f37c
     Data Size:    20716 Bytes = 20.2 KiB
     Architecture: ARM
     Hash algo:    sha256
     Hash value:   f93874aa1f1a0c6d52c423e12b25b4a2ae14a09b40a8068a49b4c8914be75e4c
   Verifying Hash Integrity ... sha256+ OK
   Booting using the fdt blob at 0x1049f37c
   Loading Kernel Image
   Loading Device Tree to 2fff7000, end 2ffff0eb ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.0-xilinx-v2021.2 (oe-user@oe-host) (arm-xilinx-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Tue Oct 12 09:30:57 UTC 2021
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Bora
[    0.000000] earlycon: cdns0 at MMIO 0xe0001000 (options '115200n8')
[    0.000000] printk: bootconsole [cdns0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x3f000000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000002fffffff]
[    0.000000]   HighMem  [mem 0x0000000030000000-0x000000003fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000] percpu: Embedded 16 pages/cpu s32780 r8192 d24564 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: console=ttyPS0,115200 earlycon root=/dev/mmcblk0p2 rw rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1009768K/1048576K available (7168K kernel code, 279K rwdata, 1952K rodata, 1024K init, 162K bss, 22424K reserved, 16384K cma-reserved, 245760K highmem)
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] efuse mapped to (ptrval)
[    0.000000] slcr mapped to (ptrval)
[    0.000000] GIC physical location is 0xf8f01000
[    0.000000] L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
[    0.000000] L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
[    0.000000] L2C-310 erratum 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
[    0.000000] random: get_random_bytes called from start_kernel+0x2c0/0x4a0 with crng_init=0
[    0.000000] zynq_clock_init: clkc starts at (ptrval)
[    0.000000] Zynq clock init
[    0.000011] sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
[    0.005723] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
[    0.016655] Switching to timer-based delay loop, resolution 3ns
[    0.023169] Console: colour dummy device 80x30
[    0.026895] Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
[    0.037305] pid_max: default: 32768 minimum: 301
[    0.042082] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.049081] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.057754] CPU: Testing write buffer coherency: ok
[    0.061529] CPU0: Spectre v2: using BPIALL workaround
[    0.066749] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.072812] Setting up static identity map for 0x100000 - 0x100060
[    0.078378] rcu: Hierarchical SRCU implementation.
[    0.083352] smp: Bringing up secondary CPUs ...
[    0.088388] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.088399] CPU1: Spectre v2: using BPIALL workaround
[    0.098134] smp: Brought up 1 node, 2 CPUs
[    0.102036] SMP: Total of 2 processors activated (1333.33 BogoMIPS).
[    0.108358] CPU: All CPU(s) started in SVC mode.
[    0.113587] devtmpfs: initialized
[    0.121144] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.124128] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.133462] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.141395] pinctrl core: initialized pinctrl subsystem
[    0.146259] NET: Registered protocol family 16
[    0.151964] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.157733] thermal_sys: Registered thermal governor 'step_wise'
[    0.158046] cpuidle: using governor ladder
[    0.166503] cpuidle: using governor menu
[    0.182919] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.185265] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.191178] zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)
[    0.198318] e0000000.serial: ttyPS1 at MMIO 0xe0000000 (irq = 34, base_baud = 3125000) is a xuartps
[    0.207234] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 35, base_baud = 3125000) is a xuartps
[    0.221091] printk: console [ttyPS0] enabled
[    0.221091] printk: console [ttyPS0] enabled
[    0.225396] printk: bootconsole [cdns0] disabled
[    0.225396] printk: bootconsole [cdns0] disabled
[    0.249776] vgaarb: loaded
[    0.252888] SCSI subsystem initialized
[    0.256896] usbcore: registered new interface driver usbfs
[    0.262468] usbcore: registered new interface driver hub
[    0.267875] usbcore: registered new device driver usb
[    0.273183] mc: Linux media interface: v0.10
[    0.277485] videodev: Linux video capture interface: v2.00
[    0.283046] pps_core: LinuxPPS API ver. 1 registered
[    0.288002] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.297158] PTP clock support registered
[    0.301145] EDAC MC: Ver: 3.0.0
[    0.304805] FPGA manager framework
[    0.308536] Advanced Linux Sound Architecture Driver Initialized.
[    0.315660] clocksource: Switched to clocksource arm_global_timer
[    0.332917] NET: Registered protocol family 2
[    0.337977] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.346425] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.354267] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.361542] TCP: Hash tables configured (established 8192 bind 8192)
[    0.368054] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.374750] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.382042] NET: Registered protocol family 1
[    0.387083] RPC: Registered named UNIX socket transport module.
[    0.393034] RPC: Registered udp transport module.
[    0.397734] RPC: Registered tcp transport module.
[    0.402441] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.408896] PCI: CLS 0 bytes, default 64
[    0.413390] hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
[    0.421576] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.431150] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.438734] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.446129] bounce: pool size: 64 pages
[    0.449974] io scheduler mq-deadline registered
[    0.454520] io scheduler kyber registered
[    0.458913] zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
[    0.467704] dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
[    0.474442] dma-pl330 f8003000.dmac:         DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
[    0.494238] brd: module loaded
[    0.504037] loop: module loaded
[    0.511083] random: fast init done
[    0.614245] random: crng init done
[    0.623641] spi-nor spi0.0: trying to lock already unlocked area
[    0.629650] spi-nor spi0.0: s25fl128s1 (16384 Kbytes)
[    0.639922] libphy: Fixed MDIO Bus: probed
[    0.645716] CAN device driver interface
[    0.652273] libphy: MACB_mii_bus: probed
[    0.688524] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 37 (7a:68:29:db:0b:f6)
[    0.698709] e1000e: Intel(R) PRO/1000 Network Driver
[    0.703668] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    0.710509] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.717037] ehci-pci: EHCI PCI platform driver
[    0.721607] usbcore: registered new interface driver usb-storage
[    0.728609] ULPI transceiver vendor/product ID 0x0424/0x0006
[    0.734267] Found SMSC USB331x ULPI transceiver.
[    0.738913] ULPI integrity check: passed.
[    0.745040] i2c /dev entries driver
[    0.752088] rtc-ds3232 0-0068: registered as rtc0
[    0.757162] rtc-ds3232 0-0068: setting system clock to 2018-03-09T17:29:17 UTC (1520616557)
[    0.765791] cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 31
[    0.774272] cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    0.781826] EDAC MC: ECC not enabled
[    0.785972] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 666666 KHz, changing to: 666667 KHz
[    0.796932] Xilinx Zynq CpuIdle Driver started
[    0.800410] sdhci: Secure Digital Host Controller Interface driver
[    0.803503] sdhci: Copyright(c) Pierre Ossman
[    0.805718] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.809266] ledtrig-cpu: registered to indicate activity on CPUs
[    0.812545] clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 1075096770 ns
[    0.817251] timer #0 at dfb516c6, irq=50
[    0.819556] usbcore: registered new interface driver usbhid
[    0.822381] usbhid: USB HID core driver
[    0.827302] fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
[    0.831575] mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
[    0.831977] NET: Registered protocol family 10
[    0.838558] Segment Routing with IPv6
[    0.840631] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.847540] NET: Registered protocol family 17
[    0.852063] can: controller area network core
[    0.856576] NET: Registered protocol family 29
[    0.861071] can: raw protocol
[    0.864050] can: broadcast manager protocol
[    0.868298] can: netlink gateway - max_hops=1
[    0.873045] Registering SWP/SWPB emulation handler
[    0.880140] of-fpga-region fpga-full: FPGA Region probed
[    0.886112] of_cfs_init
[    0.888667] of_cfs_init: OK
[    0.891875] ALSA device list:
[    0.894839]   No soundcards found.
[    0.898729] Waiting for root device /dev/mmcblk0p2...
[    1.052324] mmc0: new high speed SDHC card at address aaaa
[    1.055781] mmcblk0: mmc0:aaaa SA16G 14.8 GiB
[    1.060584]  mmcblk0: p1 p2
[    1.086701] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.090810] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.094724] devtmpfs: mounted
[    1.099892] Freeing unused kernel memory: 1024K
[    1.136017] Run /sbin/init as init process
INIT: version 2.97 booting
[    1.516983] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Starting udev
[    1.712872] udevd[82]: starting version 3.2.9
[    1.763498] udevd[83]: starting eudev-3.2.9
[    2.244862] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
INIT: Entering runlevel: 5
Configuring network interfaces... done.
Starting system message bus: dbus.
Starting haveged: haveged: command socket is listening at fd 3
haveged: haveged starting up


Starting Dropbear SSH server: dropbear.
Starting rpcbind daemon...done.
starting statd: done
Starting atd: OK
Starting internet superserver: inetd.
NFS daemon support not enabled in kernel
Starting system log daemon...0
Mar  9 17:29:22 borax kernel: [    0.000000] L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
Mar  9 17:29:22 borax kernel: [    0.000000] L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
Mar  9 17:29:22 borax kernel: [    0.413390] hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
Mar  9 17:29:22 borax kernel: [    0.623641] spi-nor spi0.0: trying to lock already unlocked area
Mar  9 17:29:22 borax kernel: [    1.516983] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Starting internet superserver: xinetd.
Starting crond: OK
Starting tcf-agent: OK

PetaLinux 2021.2 borax ttyPS0


root@borax:~# uname -a
Linux borax 5.10.0-xilinx-v2021.2 #1 SMP PREEMPT Tue Oct 12 09:30:57 UTC 2021 armv7l armv7l armv7l GNU/Linux
root@borax:~# cat /etc/build
-----------------------
Build Configuration:  |
-----------------------
DISTRO = petalinux
DISTRO_VERSION = 2021.2
MACHINE = zynq-generic
IMAGE_BASENAME = dave-image-devel
-----------------------
Layer Revisions:      |
-----------------------
meta              = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-poky         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-perl         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-python       = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-filesystems  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-gnome        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-multimedia   = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-networking   = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-webserver    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xfce         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-initramfs    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-oe           = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-clang        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-chromium     = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-qt5          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-microblaze   = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-bsp   = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-pynq  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-contrib = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-standalone = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-tools = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-petalinux    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-virtualization = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-openamp      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-jupyter      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-vitis-ai     = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-python2      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-som          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-security     = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-tpm          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-user         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-dave         = HEAD:e944801f104f86191cd086d0cea8f3df88dda061
workspace         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
root@borax:~# cat /etc/os-release
ID=petalinux
NAME="PetaLinux"
VERSION="2021.2 (gatesgarth)"
VERSION_ID=2021.2
PRETTY_NAME="PetaLinux 2021.2 (gatesgarth)"
BUILD_VERSION="desk-xz7-l-1.0.1"
root@borax:~# shutdown -h now

Broadcast message from root@borax (ttyPS0) (Fri Mar  9 17:29:35 2018):

The system is going down for system halt NOW!
INIT: Sending processes configured via /etc/inittab the TERM signal
Stopping haveged:

Stopping Dropbear SSH server: stopped /usr/sbin/dropbear (pid 217)
dropbear.
Stopping atd: OK
Stopping system message bus: dbus.
Stopping internet superserver: inetd.
stopping mountd: done
stopping nfsd: done
Stopping system log daemon...0
Stopping tcf-agent: OK
Stopping internet superserver: xinetd.
stopping statd: done
Stopping crond: OK
Stopping rpcbind daemon...
done.
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
logout
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
[   24.097545] reboot: System halted

Program the NAND flash[edit | edit source]

This chapter is compatible with BORA Lite SOM.

First of all, create a bootable microSD card as described here with config_boralite_nand_usd configuration file, and install wic binary on microSD. Then create artifact to install on NAND flash with config_boralite_nand configuration file, as described here, and save the BOOT.BIN and dave-image-devel-zynq-generic.tar.gz artifact into the first partition of microSD.

In this case BOOT.BIN binary that came from to config_boralite_nand_usd and config_boralite_nand are different, so save it with different name. Alternatively you can download binaries from mirror and install on microSD.

Then, install the following files into the microSD first partition:

  • BOOT.BIN. This binary come from to config_boralite_nand_usd configuration file, and need to install on microSD
  • boot.scr
  • desk-xz7-l-1.0.1_boralite_nand_BOOT.BIN.EXTENDED. This binary come from to config_boralite_nand configuration file, and has to be installed on NAND flash
  • desk-xz7-l-1.0.1_boralite_nand_dave-image-devel-zynq-generic.tar.gz
  • image.ub

Programming NAND flash from microSD[edit | edit source]

  • delete all partition on NAND flash memory
root@boralite:~# for i in $(seq 0 2); do flash_erase /dev/mtd$i 0 0; done
Erasing 128 Kibyte @ 15e0000 -- 100 % complete
Erasing 128 Kibyte @ 20000 -- 100 % complete
Erasing 128 Kibyte @ 1bde0000 -- 100 % complete
  • install BOOT.BIN on NAND flash memory
root@boralite:~# nandwrite -p /dev/mtd0 /boot/desk-xz7-l-1.0.1_boralite_nand_BOOT.BIN.EXTENDED
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
...
Writing data to block 168 at offset 0x1500000
Writing data to block 169 at offset 0x1520000
  • install dave-image-devel-zynq-generic.tar.gz rootfs on NAND flash memory
root@boralite:~# ubiformat /dev/mtd2
ubiformat: mtd2 (nand), size 467664896 bytes (446.0 MiB), 3568 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 3567 -- 100 % complete
ubiformat: 3568 eraseblocks are supposedly empty
ubiformat: formatting eraseblock 3567 -- 100 % complete
root@boralite:~# ubiattach -m 2
UBI device number 0, total 3568 LEBs (460357632 bytes, 439.0 MiB), available 3404 LEBs (439197696 bytes, 418.8 MiB), LEB size 129024 bytes (126.0 KiB)
root@boralite:~# ubimkvol /dev/ubi0 -N rootfs -m
Set volume size to 439197696
Volume ID 0, size 3404 LEBs (439197696 bytes, 418.8 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "rootfs", alignment 1
root@boralite:~# mkdir -p /mnt/nand
root@boralite:~# mount -t ubifs ubi0_0 /mnt/nand
root@boralite:~# tar -xzvf /boot/dave-image-devel-zynq-generic.tar.gz -C /mnt/nand/.
...
root@boralite:~# umount /mnt/nand/
root@boralite:~# ubidetach -m 2

Once change boot mode and restarted, the complete boot log can be like this one:

U-Boot 2021.01-desk-xz7-l-1.0.1 (Jan 12 2024 - 10:44:15 +0000)

CPU:   Zynq 7z020
Silicon: v3.1
Model: Bora
DRAM:  ECC disabled 1 GiB
Flash: 0 Bytes
NAND:  1024 MiB
MMC:   mmc@e0100000: 0
Loading Environment from NAND... *** Warning - bad CRC, using default environment

In:    serial@e0001000
Out:   serial@e0001000
Err:   serial@e0001000
SOM ConfigID#: 77777777
SOM UniqueID#: 55555555:66666666
CB ConfigID#: ffffffff
CB UniqueID#: ffffffff:ffffffff
Net:
ZYNQ GEM: e000b000, mdio bus e000b000, phyaddr 7, interface rgmii-id

Warning: ethernet@e000b000 (eth0) using random MAC address - f6:c3:de:d6:d6:e6
eth0: ethernet@e000b000
Hit ENTER within 2 seconds to stop autoboot

Device 0: nand0, sector size 128 KiB
  Page size       2048 b
  OOB size          64 b
  Erase size    131072 b
  subpagesize      512 b
  options     0x40004000
  bbt options 0x00020000

NAND read: device 0 offset 0xfc0000, size 0x40000
 262144 bytes read: OK
NAND: Trying to boot script at 3000000
## Executing script at 03000000
Trying to load boot images from nand

Device 0: nand0, sector size 128 KiB
  Page size       2048 b
  OOB size          64 b
  Erase size    131072 b
  subpagesize      512 b
  options     0x40004000
  bbt options 0x00020000

NAND read: device 0 offset 0x1080000, size 0x6400000
 104857600 bytes read: OK
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf-system-top.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000f8
     Data Size:    4845944 Bytes = 4.6 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00200000
     Entry Point:  0x00200000
     Hash algo:    sha256
     Hash value:   f5d0c9b9a689e4b0657468fb280f0c8fb60064196b7938a77a43b36a2743acca
   Verifying Hash Integrity ... sha256+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf-system-top.dtb' configuration
   Verifying Hash Integrity ... OK
   Trying 'fdt-system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x1049f37c
     Data Size:    20656 Bytes = 20.2 KiB
     Architecture: ARM
     Hash algo:    sha256
     Hash value:   42e997d9430c0dc091dfb37df69c2148e40ad7fdd75ec4f49501bc5d4bc48f53
   Verifying Hash Integrity ... sha256+ OK
   Booting using the fdt blob at 0x1049f37c
   Loading Kernel Image
   Loading Device Tree to 2fff7000, end 2ffff0af ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.0-xilinx-v2021.2 (oe-user@oe-host) (arm-xilinx-linux-gnueabi-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.1) #1 SMP PREEMPT Tue Oct 12 09:30:57 UTC 2021
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Bora
[    0.000000] earlycon: cdns0 at MMIO 0xe0001000 (options '115200n8')
[    0.000000] printk: bootconsole [cdns0] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x3f000000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000002fffffff]
[    0.000000]   HighMem  [mem 0x0000000030000000-0x000000003fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000] percpu: Embedded 16 pages/cpu s32780 r8192 d24564 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: console=ttyPS0,115200 earlycon noinitrd root=ubi0_0 rw rootfstype=ubifs ubi.mtd=2
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1009768K/1048576K available (7168K kernel code, 279K rwdata, 1952K rodata, 1024K init, 162K bss, 22424K reserved, 16384K cma-reserved, 245760K highmem)
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] efuse mapped to (ptrval)
[    0.000000] slcr mapped to (ptrval)
[    0.000000] GIC physical location is 0xf8f01000
[    0.000000] L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
[    0.000000] L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
[    0.000000] L2C-310 erratum 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 8 ways, 512 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
[    0.000000] random: get_random_bytes called from start_kernel+0x2c0/0x4a0 with crng_init=0
[    0.000000] zynq_clock_init: clkc starts at (ptrval)
[    0.000000] Zynq clock init
[    0.000011] sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
[    0.005723] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
[    0.016654] Switching to timer-based delay loop, resolution 3ns
[    0.023168] Console: colour dummy device 80x30
[    0.026895] Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
[    0.037305] pid_max: default: 32768 minimum: 301
[    0.042082] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.049081] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.057757] CPU: Testing write buffer coherency: ok
[    0.061529] CPU0: Spectre v2: using BPIALL workaround
[    0.066750] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.072813] Setting up static identity map for 0x100000 - 0x100060
[    0.078377] rcu: Hierarchical SRCU implementation.
[    0.083352] smp: Bringing up secondary CPUs ...
[    0.088389] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.088401] CPU1: Spectre v2: using BPIALL workaround
[    0.098133] smp: Brought up 1 node, 2 CPUs
[    0.102036] SMP: Total of 2 processors activated (1333.33 BogoMIPS).
[    0.108357] CPU: All CPU(s) started in SVC mode.
[    0.113588] devtmpfs: initialized
[    0.121210] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.124130] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.133461] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.141400] pinctrl core: initialized pinctrl subsystem
[    0.146260] NET: Registered protocol family 16
[    0.151995] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.157737] thermal_sys: Registered thermal governor 'step_wise'
[    0.158045] cpuidle: using governor ladder
[    0.166503] cpuidle: using governor menu
[    0.183028] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.185376] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.191287] zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)
[    0.198430] e0000000.serial: ttyPS1 at MMIO 0xe0000000 (irq = 34, base_baud = 3125000) is a xuartps
[    0.207344] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 35, base_baud = 3125000) is a xuartps
[    0.221202] printk: console [ttyPS0] enabled
[    0.221202] printk: console [ttyPS0] enabled
[    0.225508] printk: bootconsole [cdns0] disabled
[    0.225508] printk: bootconsole [cdns0] disabled
[    0.249919] vgaarb: loaded
[    0.253028] SCSI subsystem initialized
[    0.257026] usbcore: registered new interface driver usbfs
[    0.262608] usbcore: registered new interface driver hub
[    0.268015] usbcore: registered new device driver usb
[    0.273332] mc: Linux media interface: v0.10
[    0.277632] videodev: Linux video capture interface: v2.00
[    0.283192] pps_core: LinuxPPS API ver. 1 registered
[    0.288149] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.297305] PTP clock support registered
[    0.301292] EDAC MC: Ver: 3.0.0
[    0.304949] FPGA manager framework
[    0.308681] Advanced Linux Sound Architecture Driver Initialized.
[    0.315837] clocksource: Switched to clocksource arm_global_timer
[    0.333163] NET: Registered protocol family 2
[    0.338219] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.346667] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.354511] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.361784] TCP: Hash tables configured (established 8192 bind 8192)
[    0.368300] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.375014] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.382308] NET: Registered protocol family 1
[    0.387345] RPC: Registered named UNIX socket transport module.
[    0.393300] RPC: Registered udp transport module.
[    0.398001] RPC: Registered tcp transport module.
[    0.402740] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.409180] PCI: CLS 0 bytes, default 64
[    0.413721] hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
[    0.421860] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.431454] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.439077] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.446536] bounce: pool size: 64 pages
[    0.450383] io scheduler mq-deadline registered
[    0.454934] io scheduler kyber registered
[    0.459327] zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
[    0.468109] dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
[    0.474850] dma-pl330 f8003000.dmac:         DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
[    0.494688] brd: module loaded
[    0.504477] loop: module loaded
[    0.509473] libphy: Fixed MDIO Bus: probed
[    0.515346] CAN device driver interface
[    0.521835] libphy: MACB_mii_bus: probed
[    0.562752] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 37 (f6:c3:de:d6:d6:e6)
[    0.572919] e1000e: Intel(R) PRO/1000 Network Driver
[    0.577877] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    0.584681] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.591202] ehci-pci: EHCI PCI platform driver
[    0.595787] usbcore: registered new interface driver usb-storage
[    0.602740] ULPI transceiver vendor/product ID 0x0424/0x0006
[    0.608397] Found SMSC USB331x ULPI transceiver.
[    0.613077] ULPI integrity check: passed.
[    0.619138] i2c /dev entries driver
[    0.626225] rtc-ds3232 0-0068: registered as rtc0
[    0.631266] rtc-ds3232 0-0068: setting system clock to 2018-03-09T22:43:45 UTC (1520635425)
[    0.639890] cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 31
[    0.647246] tmp421 0-004f: Could not read configuration register (-6)
[    0.654494] cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    0.662040] EDAC MC: ECC not enabled
[    0.666183] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 666666 KHz, changing to: 666667 KHz
[    0.677171] Xilinx Zynq CpuIdle Driver started
[    0.680527] sdhci: Secure Digital Host Controller Interface driver
[    0.683621] sdhci: Copyright(c) Pierre Ossman
[    0.685836] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.689399] ledtrig-cpu: registered to indicate activity on CPUs
[    0.692668] clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 1075096770 ns
[    0.697371] timer #0 at (ptrval), irq=50
[    0.699683] usbcore: registered new interface driver usbhid
[    0.702500] usbhid: USB HID core driver
[    0.705419] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xd3
[    0.708625] nand: Winbond W29N08GV
[    0.710334] nand: 1024 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.712244] mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
[    0.714200] nand: SDR timing mode 4 not acknowledged by the NAND chip
[    0.721567] Bad block table found at page 524224, version 0x01
[    0.728120] Bad block table found at page 524160, version 0x01
[    0.734601] 3 fixed-partitions partitions found on MTD device W29N08GV
[    0.741231] Creating 3 MTD partitions on "W29N08GV":
[    0.746267] 0x000000000000-0x000001600000 : "bootbin"
[    0.753640] 0x000001600000-0x000001640000 : "ubootenv"
[    0.760285] 0x000001640000-0x00001d440000 : "rootfs"
[    0.775328] fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
[    0.783257] NET: Registered protocol family 10
[    0.789108] Segment Routing with IPv6
[    0.792886] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.799816] NET: Registered protocol family 17
[    0.804356] can: controller area network core
[    0.808869] NET: Registered protocol family 29
[    0.813401] can: raw protocol
[    0.816497] can: broadcast manager protocol
[    0.820768] can: netlink gateway - max_hops=1
[    0.825605] Registering SWP/SWPB emulation handler
[    0.832970] of-fpga-region fpga-full: FPGA Region probed
[    0.838736] ubi0: attaching mtd2
[    2.056102] ubi0: scanning is finished
[    2.074242] ubi0: attached mtd2 (name "rootfs", size 446 MiB)
[    2.080123] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    2.087020] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    2.093715] ubi0: VID header offset: 512 (aligned 512), data offset: 2048
[    2.100621] ubi0: good PEBs: 3568, bad PEBs: 0, corrupted PEBs: 0
[    2.106734] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    2.113950] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 635011865
[    2.123040] ubi0: available PEBs: 0, total reserved PEBs: 3568, PEBs reserved for bad PEB handling: 160
[    2.132475] ubi0: background thread "ubi_bgt0d" started, PID 53
[    2.132642] of_cfs_init
[    2.140972] of_cfs_init: OK
[    2.144117] ALSA device list:
[    2.147151]   No soundcards found.
[    2.151854] UBIFS (ubi0:0): Mounting in unauthenticated mode
[    2.157764] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 54
[    2.252675] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    2.260145] UBIFS (ubi0:0): LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    2.270077] UBIFS (ubi0:0): FS size: 437262336 bytes (417 MiB, 3389 LEBs), journal size 21934080 bytes (20 MiB, 170 LEBs)
[    2.281079] UBIFS (ubi0:0): reserved for root: 4952683 bytes (4836 KiB)
[    2.287714] UBIFS (ubi0:0): media format: w5/r0 (latest is w5/r0), UUID 1D39DE69-4DB4-43C3-B1DC-4790B3D8D8CA, small LPT model
[    2.300876] VFS: Mounted root (ubifs filesystem) on device 0:13.
[    2.308081] devtmpfs: mounted
[    2.314189] Freeing unused kernel memory: 1024K
[    2.319122] Run /sbin/init as init process
INIT: version 2.97 booting
Starting udev
[    3.363102] udevd[78]: starting version 3.2.9
[    3.402426] random: udevd: uninitialized urandom read (16 bytes read)
[    3.410464] random: udevd: uninitialized urandom read (16 bytes read)
[    3.426120] random: udevd: uninitialized urandom read (16 bytes read)
[    3.496826] udevd[79]: starting eudev-3.2.9
bootlogd: /dev/ttyPS0Configuring packages on first boot....
 (This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
 Removing any system startup links for run-postinsts ...
  /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... done.
Starting system message bus: dbus.
Starting haveged: haveged: command socket is listening at fd 3
haveged: haveged starting up


Starting Dropbear SSH server: Waiting for kernel randomness to be initialised...
haveged: haveged: ver: 1.9.13; arch: generic; vend: ; build: (gcc 10.2.0 CTV); collect: 128K

haveged: haveged: cpu: (VC); data: 16K (D); inst: 16K (D); idx: 12/40; sz: 15006/57790

haveged: haveged: tot tests(BA8): A:1/1 B:1/1 continuous tests(B):  last entropy estimate 7.99862

haveged: haveged: fills: 0, generated: 0

Generating 2048 bit rsa key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCTB8TmZSylf7njT2d8i1CdsvL2RVkN9NBTJjMX36nmx3GgyTY1O+R8fRv3eXdFD+XWUk02YMWSpPwvC6geSyGEovUe60y7cg/SRyZRTth/sokI+HboE/i0BUzeDCtFS5/L2nDNs/TIg6/0yVn4fcnWH7IDxLNTsqdf0f7wcapCXQrP2+xocU63B4NkXpUVL+Y/Za06M0lqaiqasfOXFfP5MSyTTeJa91LfH5qOca0fxJGqmMDStJjaLTAsEiI3H2waFysRG/prIO17fVbnbsCF2UaNm8Un7wluae0HjUBd/ItTdIa6erKUJilVGsSkPo0+Shx5O1Zk4cetuPFs+e2P root@boralite
Fingerprint: sha1!! 0e:82:1e:52:c9:20:b1:64:1d:17:b0:a8:a8:e5:93:44:3f:ec:6c:38
dropbear.
Starting rpcbind daemon...done.
starting statd: done
Starting atd: OK
Starting internet superserver: inetd.
NFS daemon support not enabled in kernel
Starting system log daemon...0
Mar  9 22:44:12 boralite kernel: [    0.000000] L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
Mar  9 22:44:12 boralite kernel: [    0.000000] L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
Mar  9 22:44:12 boralite kernel: [    0.413721] hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
Mar  9 22:44:12 boralite kernel: [    0.647246] tmp421 0-004f: Could not read configuration register (-6)
Mar  9 22:44:12 boralite kernel: [    0.714200] nand: SDR timing mode 4 not acknowledged by the NAND chip
Mar  9 22:44:12 boralite kernel: [    5.281753] urandom_read: 4 callbacks suppressed
Starting internet superserver: xinetd.
Starting crond: OK
Starting tcf-agent: OK

PetaLinux 2021.2 boralite ttyPS0


root@boralite:~# cat /etc/build
-----------------------
Build Configuration:  |
-----------------------
DISTRO = petalinux
DISTRO_VERSION = 2021.2
MACHINE = zynq-generic
IMAGE_BASENAME = dave-image-devel
-----------------------
Layer Revisions:      |
-----------------------
meta              = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-poky         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-perl         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-python       = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-filesystems  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-gnome        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-multimedia   = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-networking   = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-webserver    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xfce         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-initramfs    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-oe           = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-clang        = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-chromium     = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-qt5          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-microblaze   = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-bsp   = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-pynq  = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-contrib = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-standalone = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-xilinx-tools = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-petalinux    = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-virtualization = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-openamp      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-jupyter      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-vitis-ai     = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-python2      = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-som          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-security     = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-tpm          = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-user         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
meta-dave         = HEAD:e944801f104f86191cd086d0cea8f3df88dda061
workspace         = HEAD:829c44d28c8c46b51744c14a92107ec3c5790934 -- modified
root@boralite:~# uname -a
Linux boralite 5.10.0-xilinx-v2021.2 #1 SMP PREEMPT Tue Oct 12 09:30:57 UTC 2021 armv7l armv7l armv7l GNU/Linux
root@boralite:~# cat /etc/os-release
ID=petalinux
NAME="PetaLinux"
VERSION="2021.2 (gatesgarth)"
VERSION_ID=2021.2
PRETTY_NAME="PetaLinux 2021.2 (gatesgarth)"
BUILD_VERSION="desk-xz7-l-1.0.1"
root@boralite:~# shutdown -h now

Broadcast message from root@boralite (ttyPS0) (Fri Mar  9 22:46:32 2018):

The system is going down for system halt NOW!
INIT: Sending processes configured via /etc/inittab the TERM signal
root@boralite:~# Stopping haveged:

Stopping Dropbear SSH server: stopped /usr/sbin/dropbear (pid 275)
dropbear.
Stopping atd: OK
Stopping system message bus: dbus.
Stopping internet superserver: inetd.
stopping mountd: done
stopping nfsd: done
Stopping system log daemon...0
Stopping tcf-agent: OK
Stopping internet superserver: xinetd.
stopping statd: done
Stopping crond: OK
Stopping rpcbind daemon...
done.
Deconfiguring network interfaces... done.
Sending all processes the TERM signal...
logout
Sending all processes the KILL signal...
Unmounting remote filesystems...
Deactivating swap...
Unmounting local filesystems...
[  173.736463] reboot: System halted