In the previous blog we discussed about the different types of Boot modes available in the Minized. In this blog I will be going a bit more detail into the flash based booting, looking into the default partitions, erasing a partition, validating that a partition is earased, writing data into a partition, reading back the data from the partition, validating that the partition is written and checking the data persistence in flash after reboot.
Introduction:
The following steps are used to boot from Flash:
1. We need to have the boot image that contains the fsbl, rootfs and other components.
2. Configure the boot pins through the boot mode switch.
3. Flash memory programmed using the JTAG tools.
4. Once everything is connected and the Flash programming is done, we can connect the serial terminal to the laptop's USB port and observe the terminal for the boot messages
Tools Used:
We will be using dd, flashcp, flash_erase and hexdump to achieve most of our objectives. There are also many other commands which are part of mtd utils that might be useful. Describing those is beyond the scope of this blog. The general information about the tools can be found online.
Verfying Flash boot:
In the following, we prevent the autoboot at the u-boot stage and verify that the Flash based device (SF: Detected N25Q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB) is recognized. Below is the boot log.
Xilinx Zynq MP First Stage Boot Loader
Release 2021.2 Jul 26 2023 - 00:10:22
U-Boot 2016.07 (Jul 13 2017 - 19:58:56 -0700)
DRAM: ECC disabled 512 MiB
MMC: sdhci@e0100000: 0, sdhci@e0101000: 1
SF: Detected N25Q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
U-BOOT for
Hit any key to stop autoboot: 0
Zynq> printenv
autoload=no
baudrate=115200
boot_img=BOOT.BIN
bootcmd=run default_bootcmd
bootdelay=4
bootenvsize=0x010000
bootenvstart=0xff0000
clobstart=0x10000000
console=console=ttyPS0,115200
cp_kernel2ram=mmc dev 1 && fatload mmc 1 ${netstart} ${kernel_img}
default_bootcmd=run cp_kernel2ram && bootm ${netstart}
dtb_img=system.dtb
dtbnetstart=0x11800000
eraseenv=sf probe 0 && sf erase ${bootenvstart} ${bootenvsize}
fault=echo ${img} image size is greater than allocated place - partition ${img} is NOT UPDATED
fdtcontroladdr=1ffac170
importbootenv=echo "Importing environment from SD ..."; env import -t ${loadbootenv_addr} $filesize
install_boot=mmc dev 1 && fatwrite mmc 1 ${clobstart} ${boot_img} ${filesize}
install_jffs2=sf probe 0 && sf erase ${jffs2start} ${jffs2size} && sf write ${clobstart} ${jffs2start} ${filesize}
install_kernel=mmc dev 1 && fatwrite mmc 1 ${clobstart} ${kernel_img} ${filesize}
jffs2_img=rootfs.jffs2
kernel_img=image.ub
loadaddr=0x10000000
loadbootenv=load mmc $sdbootdev:$partid ${loadbootenv_addr} ${bootenv}
mmc_loadbit_fat=echo Loading bistream from media to RAM..; && mmc dev 1 && fatload mmc 1 ${loadbit_addr} ${bitstream_image} && fpga load 0
netstart=0x10000000
psserial0=setenv stdout ttyPS0;setenv stdin ttyPS0
sd_uEnvtxt_existence_test=test -e mmc $sdbootdev:$partid /uEnv.txt
sd_update_dtb=echo Updating dtb from SD; mmc dev 1 && fatload mmc 1:1 ${clobstart} ${dtb_img} && run install_dtb
sd_update_jffs2=echo Updating jffs2 from SD; mmc dev 1 && fatload mmc 1:1 ${clobstart} ${jffs2_img} && run install_jffs2
sdboot=echo boot Petalinux; run uenvboot ; mmc dev 1 && fatload mmc 1 ${netstart} ${kernel_img} && bootm
serial=setenv stdout serial;setenv stdin serial
test_crc=if imi ${clobstart}; then run test_img; else echo ${img} Bad CRC - ${img} is NOT UPDATED; fi
test_img=setenv var "if test ${filesize} -gt ${psize}; then run fault; else run ${installcmd}; fi"; run var; setenv var
uenvboot=if run sd_uEnvtxt_existence_test; thenrun loadbootenvecho Loaded environment from ${bootenv};run importbootenv;
Environment size: 2115/65532 bytes
Zynq>
Default partitions:
Once we login to the petalinux boot, we can then investigate the boot partions using by looking into the mtd devices as shown below. We can observe that there are 4 boot partitions (boot, kernel, bootenv and spare).
plnx_arm login: root
Password:
root@plnx_arm:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00ff0000 00010000 "boot"
mtd1: 00d80000 00010000 "kernel"
mtd2: 00010000 00010000 "bootenv"
mtd3: 00000000 00000000 "spare"
Reading existing partition:
We can use dd and hexdump to do read contents of the flash partitions.
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump -c
0000000 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~# dd if=/dev/mtd1 | hexdump
0000000 0dd0 edfe d400 9cac 0000 3800 d400 b4aa
0000010 0000 2800 0000 1100 0000 1000 0000 0000
0000020 0000 7400 d400 7caa 0000 0000 0000 0000
0000030 0000 0000 0000 0000 0000 0100 0000 0000
0000040 0000 0300 0000 0400 0000 6400 f058 2f71
0000050 0000 0300 0000 2400 0000 0000 2d55 6f42
0000060 746f 6620 7469 6d49 6761 2065 6f66 2072
0000070 6c70 786e 615f 6d72 6b20 7265 656e 006c
0000080 0000 0300 0000 0400 0000 0c00 0000 0100
0000090 0000 0100 6d69 6761 7365 0000 0000 0100
00000a0 656b 6e72 6c65 3040 0000 0000 0000 0300
00000b0 0000 0d00 0000 0000 694c 756e 2078 654b
00000c0 6e72 6c65 0000 0000 0000 0300 3d00 98d1
00000d0 0000 1b00 0000 e1a0 0000 e1a0 0000 e1a0
00000e0 0000 e1a0 0000 e1a0 0000 e1a0 0000 e1a0
00000f0 0000 e1a0 0003 ea00 2818 016f 0000 0000
0000100 d198 003d 0201 0403 9000 e10f 0c18 eb00
0000110 7001 e1a0 8002 e1a0 2000 e10f 0003 e312
0000120 0001 1a00 0017 e3a0 3456 ef12 0000 e10f
0000130 001a e220 001f e310 001f e3c0 00d3 e380
0000140 0004 1a00 0c01 e380 e00c e28f f000 e16f
0000150 f30e e12e 006e e160 f000 e121 f009 e16f
0000160 0000 0000 0000 0000 0000 0000 0000 0000
0000170 0000 0000 400f e1a0 433e e204 4902 e284
0000180 000f e1a0 0004 e150 01ac 359f 000f 3080
0000190 0000 3154 4001 3384 006d 2b00 0f5e e28f
00001a0 1c4e e890 d01c e590 0001 e040 6000 e086
00001b0 a000 e08a 9000 e5da e001 e5da 940e e189
00001c0 e002 e5da a003 e5da 980e e189 9c0a e189
00001d0 d000 e08d a801 e28d 5000 e3a0 a901 e28a
00001e0 000a e154 001e 2a00 a009 e084 9070 e28f
00001f0 0009 e15a 001a 9a00 ac09 e28a a0ff e3ca
0000200 506c e24f 501f e3c5 0000 e14f 001f e200
0000210 001a e350 0003 1a00 0bea eb00 0005 e040
0000220 000a e080 0be8 eb00 9005 e046 901f e289
0000230 901f e3c9 6005 e089 900a e089 5c0f e936
0000240 0005 e156 5c0f e929 fffb 8aff 6006 e049
0000250 d006 e08d 015e eb00 00c4 e24f 0006 e080
0000260 f000 e1a0 1005 e190 000d 0a00 b000 e08b
0000270 c000 e08c 2000 e082 3000 e083 1000 e59b
0000280 1000 e081 0002 e151 0001 2153 1005 8081
0000290 1004 e48b 000c e15b fff7 3aff 2005 e082
00002a0 3005 e083 0000 e3a0 0004 e482 0004 e482
00002b0 0004 e482 0004 e482 0003 e152 fff9 3aff
00002c0 0001 e314 4001 e3c4 0021 1b00 0004 e1a0
00002d0 100d e1a0 2801 e28d 3007 e1a0 01f8 eb00
00002e0 013b eb00 0112 eb00 1007 e1a0 2008 e1a0
00002f0 0000 e14f 001f e200 001a e350 01bc 1a00
0000300 c010 e28f 0000 e59c 000c e080 0bae eb00
0000310 0070 e140 fffe eaff 06bc 0000 0248 0000
0000320 d198 003d d1b4 003d d198 003d d156 003d
0000330 d168 003d d190 003d e1b8 003d 10ec 004e
0000340 f000 e320 f000 e320 f000 e320 f000 e320
0000350 f000 e320 3008 e3a0 0088 ea00 003f e3a0
0000360 0f17 ee06 0f37 ee06 0080 e3a0 0f10 ee02
0000370 0f30 ee02 0f10 ee03 0903 e3a0 0f30 ee05
0000380 0f10 ee05 0000 e3a0 0f9a ee07 0f15 ee07
0000390 0f16 ee07 0f10 ee11 002d e380 0a01 e380
00003a0 0f10 ee01 0000 e3a0 0f15 ee07 0f16 ee07
00003b0 f00e e1a0 003f e3a0 0f17 ee06 0080 e3a0
00003c0 0f10 ee02 0f10 ee03 0903 e3a0 0f10 ee05
00003d0 0000 e3a0 0f10 ee07 0f10 ee11 000d e380
00003e0 0000 e3a0 0f10 ee01 0f10 ee07 f00e e1a0
00003f0 3901 e244 30ff e3c3 3c3f e3c3 0003 e1a0
0000400 9920 e1a0 9909 e1a0 a201 e289 1012 e3a0
0000410 1b03 e381 2901 e283 0009 e151 0001 215a
0000420 101c e3c1 1010 3381 1006 2181 1004 e480
0000430 1601 e281 0002 e130 fff6 1aff 1004 e386
0000440 1b03 e381 200f e1a0 2a22 e1a0 1a02 e181
0000450 0102 e083 1004 e480 1601 e281 1000 e580
0000460 f00e e1a0 0f10 ee11 0002 e3c0 0501 e380
0000470 0f10 ee01 ffff eaff c00e e1a0 601e e3a0
0000480 ffda ebff 0000 e3a0 0f9a ee07 0f17 ee08
0000490 0f10 ee11 0a05 e380 0030 e380 002c eb00
00004a0 0000 e3a0 0f17 ee08 f00c e1a0 c00e e1a0
00004b0 bf91 ee10 000f e31b 600e 13a0 ffcb 1bff
00004c0 0000 e3a0 0f9a ee07 000f e31b 0f17 1e08
00004d0 0f10 ee11 0201 e3c0 0a05 e380 003c e380
00004e0 0002 e3c0 0501 e380 6f50 1e12 0001 1380
00004f0 1002 13e0 6102 e3c6 6003 e3c6 3f10 1e02
0000500 1f10 1e03 6f50 1e02 0f95 ee07 0f10 ee01
0000510 0f10 ee11 0000 e3a0 0f95 ee07 f00c e1a0
0000520 c00e e1a0 601e e3a0 ffb0 ebff 0000 e3a0
0000530 0f17 ee07 0f9a ee07 0f17 ee08 0f10 ee11
0000540 0a01 e380 0002 eb00 0000 e3a0 0f17 ee08
0000550 f00c e1a0 000d e380 1000 e3e0 3f10 ee02
0000560 1f10 ee03 0002 ea00 f000 e320 f000 e320
0000570 f000 e320 0f10 ee01 0f10 ee11 f020 e04e
0000580 c01c e28f 9f10 ee10 1000 e59c 2004 e59c
0000590 1009 e021 0002 e111 f003 008c c014 e28c
00005a0 fff8 eaff 0000 4100 f000 ff00 f00e e1a0
00005b0 f00e e1a0 f00e e1a0 7000 4100 fe00 fff8
00005c0 f00e e1a0 f00e e1a0 f00e e1a0 7200 4180
00005d0 ff00 ffff ffa7 eaff 0065 ea00 f00e e1a0
00005e0 7400 4100 ff00 ff00 ff71 eaff 005a ea00
00005f0 00ea ea00 9400 4100 ff00 ff00 ff56 eaff
0000600 004d ea00 0074 ea00 9260 4106 fff0 ff0f
0000610 ff98 eaff 0056 ea00 00be ea00 7000 0000
0000620 f000 0000 f00e e1a0 f00e e1a0 f00e e1a0
0000630 a100 4401 ffe0 ffff ff8e eaff 004c ea00
0000640 00bb ea00 b110 6901 fff0 ffff ff89 eaff
0000650 0047 ea00 00b6 ea00 6900 5605 ff00 ffff
0000660 ff84 eaff 0042 ea00 00b1 ea00 8000 5615
Writing "hello world" to a partition:
We can create a file hello.txt with the content "hello world" and write into the boot partition.We can veritfy the bootenv partiton is empty initially (0xff by default).
root@plnx_arm:~# vi hello.txt
root@plnx_arm:~# vi hello.txt
root@plnx_arm:~# cat hello.txt
hello world
root@plnx_arm:~# flashcp hello.txt /dev/mrandom: nonblocking pool is initialized
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~# flashcp hello.txt /dev/mtd2
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump
0000000 6568 6c6c 206f 6f77 6c72 0a64 ffff ffff
0000010 ffff ffff ffff ffff ffff ffff ffff ffff
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump -c
0000000 h e l l o w o r l d \n 377 377 377 377
0000010 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
*
0010000
128+0 records in
128+0 records out
Erasing a partition and validating that a partition is erased:
We can use flash_erase command to achieve the erasing of a partition.
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump -c
0000000 h e l l o w o r l d \n 377 377 377 377
0000010 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~# flash_erase /dev/mtd2 0 0
Erasing 64 Kibyte @ 0 -- 100 % complete
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump -c
0000000 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0010000
128+0 records in
128+0 records out
Writing "hello minized" data into a partition and reading it back:
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~# vi hello_minized.txt
root@plnx_arm:~# cat hello_minized.txt
hello Minized
root@plnx_arm:~# flashcp hello_minized.txt /dev/mtd2
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump -c
0000000 h e l l o M i n i z e d \n 377 377
0000010 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump
0000000 6568 6c6c 206f 694d 696e 657a 0a64 ffff
0000010 ffff ffff ffff ffff ffff ffff ffff ffff
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~#
Checking the data persistence in flash after reboot:
One of the important features is the persistence of the write data after a reboot. That is one of the important features of the device. So that we can use these partitons to store important configuration data that can persists across reboots. We shall do a reboot and check if the data persists. Below is the entire boot log.
U-Boot 2016.07 (Jul 13 2017 - 19:58:56 -0700)
DRAM: ECC disabled 512 MiB
MMC: sdhci@e0100000: 0, sdhci@e0101000: 1
SF: Detected N25Q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
U-BOOT for
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1(part 0) is current device
reading image.ub
16786800 bytes read in 1551 ms (10.3 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
Using 'conf@1' configuration
Verifying Hash Integrity ... OK
Trying 'kernel@0' kernel subimage
Description: Linux Kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x100000d4
Data Size: 4075112 Bytes = 3.9 MiB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: sha1
Hash value: 2feb6a2f50fc863208748d4a4a5502fce93487d9
Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 10000000 ...
Using 'conf@1' configuration
Trying 'ramdisk@0' ramdisk subimage
Description: ramdisk
Type: RAMDisk Image
Compression: uncompressed
Data Start: 0x103e72e0
Data Size: 12693150 Bytes = 12.1 MiB
Architecture: ARM
OS: Linux
Load Address: unavailable
Entry Point: unavailable
Hash algo: sha1
Hash value: acf68a35f1d97f744aa8672737a4616de57bb555
Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
Using 'conf@1' configuration
Trying 'fdt@0' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x103e3030
Data Size: 16894 Bytes = 16.5 KiB
Architecture: ARM
Hash algo: sha1
Hash value: d989058f04e066702a50da837782f2c5ed94e7b8
Verifying Hash Integrity ... sha1+ OK
Booting using the fdt blob at 0x103e3030
Loading Kernel Image ... OK
Loading Ramdisk to 073e5000, end 07fffe9e ... OK
Loading Device Tree to 073dd000, end 073e41fd ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx (training@localhost.localdomain) (gcc version 5.2.1 20151005 (Linaro GCC 5.2-2015.11-2) ) #1 SMP PREEMPT Tue Jun 6 20:15:27 PDT 2017
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: minized
bootconsole [earlycon0] enabled
cma: Reserved 16 MiB at 0x1f000000
Memory policy: Data cache writealloc
percpu: Embedded 12 pages/cpu @debca000 s19776 r8192 d21184 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyPS0,115200 earlyprintk
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 480056K/524288K available (6319K kernel code, 249K rwdata, 1916K rodata, 1024K init, 212K bss, 27848K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc090ae84 (9228 kB)
.init : 0xc0a00000 - 0xc0b00000 (1024 kB)
.data : 0xc0b00000 - 0xc0b3e7a0 ( 250 kB)
.bss : 0xc0b3e7a0 - 0xc0b73a38 ( 213 kB)
Preemptible hierarchical RCU implementation.
Build-time adjustment of leaf fanout to 32.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to e0800000
slcr mapped to e0802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at e080a000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100058
CPU1: failed to boot: -1
Brought up 1 CPUs
SMP: Total of 1 processors activated (666.66 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xe0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
GPIO IRQ not connected
XGpio: /amba_pl/gpio@41200000: registered, base is 905
GPIO IRQ not connected
XGpio: /amba_pl/gpio@41200000: dual channel registered, base is 904
GPIO IRQ not connected
XGpio: /amba_pl/gpio@41210000: registered, base is 903
GPIO IRQ not connected
XGpio: /amba_pl/gpio@41220000: registered, base is 895
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
Bluetooth: Core ver 2.21
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 12396K (c73e5000 - c8000000)
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=28 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
43c00000.serial: ttyS0 at MMIO 0x43c01000 (irq = 166, base_baud = 3000000) is a 16550A
e0000000.serial: ttyPS1 at MMIO 0xe0000000 (irq = 143, base_baud = 6249999) is a xuartps
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 144, base_baud = 6249999) is a xuartps
▒console [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e081e000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
m25p80 spi0.0: found n25q128a13, expected m25p80
m25p80 spi0.0: n25q128a13 (16384 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000ff0000 : "boot"
0x000000270000-0x000000ff0000 : "kernel"
0x000000ff0000-0x000001000000 : "bootenv"
0x000001000000-0x000001000000 : "spare"
mtd: partition "spare" is out of reach -- disabled
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
e0002000.usb supply vbus not found, using dummy regulator
ULPI transceiver vendor/product ID 0x0424/0x0007
Found SMSC USB3320 ULPI transceiver.
ULPI integrity check: passed.
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
i2c i2c-0: of_i2c: modalias failure on /amba_pl/i2c@41600000/i2c4@6b
Bluetooth: HCI UART driver ver 2.3
Bluetooth: HCI UART protocol H4 registered
Bluetooth: HCI UART protocol BCSP registered
Bluetooth: HCI UART protocol LL registered
Bluetooth: HCI UART protocol ATH3K registered
Bluetooth: HCI UART protocol Three-wire (H5) registered
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
sdhci-arasan e0100000.sdhci: assigned as wifi host
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
mmc1: SDHCI controller on e0101000.sdhci [e0101000.sdhci] using DMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP socket layer initialized
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Bluetooth: HIDP socket layer initialized
Registering SWP/SWPB emulation handler
mmc1: new high speed MMC card at address 0001
hctosys: unable to open rtc device (rtc0)
wlreg_on: disabling
ALSA device list:
No soundcards found.
Freeing unused kernel memory: 1024K (c0a00000 - c0b00000)
INIT: mmcblk1boot0: mmc1:0001 Q2J55L partition 1 16.0 MiB
version 2.88 bootingmmcblk1boot1: mmc1:0001 Q2J55L partition 2 16.0 MiB
mmcblk1rpmb: mmc1:0001 Q2J55L partition 3 4.00 MiB
mmcblk1: p1
FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
EXT4-fs (mmcblk1rpmb): unable to read superblock
EXT4-fs (mmcblk1rpmb): unable to read superblock
EXT2-fs (mmcblk1rpmb): error: unable to read superblock
FAT-fs (mmcblk1rpmb): unable to read boot sector
EXT4-fs (mmcblk1rpmb): unable to read superblock
EXT4-fs (mmcblk1rpmb): unable to read superblock
EXT2-fs (mmcblk1rpmb): error: unable to read superblock
FAT-fs (mmcblk1rpmb): unable to read boot sector
FAT-fs (mmcblk1rpmb): unable to read boot sector
mount: mounting /dev/mmcblk1rpmb on /run/media/mmcblk1rpmb failed: Input/output error
mount: mounting /dev/mmcblk1boot0 on /run/media/mmcblk1boot0 failed: Invalid argument
mount: mounting /dev/mmcblk1boot1 on /run/media/mmcblk1boot1 failed: Invalid argument
/etc/mdev/mdev-mount.sh: line 28: [: /sys/block/mmcblk1/mmcblk1boot1: binary operator expected
mount: mounting /dev/mmcblk1 on /run/media/mmcblk1 failed: Device or resource busy
random: dd urandom read with 3 bits of entropy available
Fri Jul 14 03:13:01 UTC 2017
Starting internet superserver: inetd.
INIT: Entering runlevel: 5
Configuring network interfaces... ifconfig: SIOCGIFFLAGS: No such device
Starting system message bus: dbus.
Starting Dropbear SSH server: Generating key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCJpPaZHAD0iG7+AhZOTxUvrASPf0l1MWPtpcqzE0sRp3fxU+foBC1b0xa7BYmAJeRbW94YG+agYfk2PoQIwxNR0O4v7ZCZ1NQ2eCvAw8rIeI6qKEpM3Ysavv7RVt3OqL1Z6yexcidrUCRZYr+prgTqgGR7P71WEExsGMclEa+Uwqd3Xow6Yq+5IKPQNFuU8PXHqhJ7c9ykz/jMiLuCO4Q51nhfNJxkCbCKOlPE2GUZVSAS/p1+7xYuCHqnN/5Xko8/8YpNYTIJZfzfKYk+FuvdwdYrHP4MeIkNGKuRcHenm4pxzXQSSqpIJJW6etyW9zCOrrKqex6Xkx6IQuWoYv8l root@plnx_arm
Fingerprint: md5 be:46:e0:de:9d:04:65:cb:ec:15:7a:fe:93:80:ee:69
dropbear.
Starting bluetooth
bluetoothd
Starting syslogd/klogd: done
Starting tcf-agent: OK
PetaLinux 2016.4 plnx_arm /dev/ttyPS0
plnx_arm login: root
Password:
root@plnx_arm:~# dd if=/dev/mtd2 | hexdump -c
0000000 h e l l o M i n i z e d \n 377 377
0000010 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
*
0010000
128+0 records in
128+0 records out
root@plnx_arm:~#
Yay !!! towards the end of the blog we can notice the "hello Minized" has persisted across boot.
-
navadeepganeshu
-
Cancel
-
Vote Up
0
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
Comment-
navadeepganeshu
-
Cancel
-
Vote Up
0
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
Children