Skip to content
Snippets Groups Projects
Commit f4b70af3 authored by joachim.schmidt's avatar joachim.schmidt
Browse files

Updated the README.md file.

parent 17370c98
No related branches found
No related tags found
No related merge requests found
......@@ -268,6 +268,19 @@ $ find . -name ubifs.o
**And you can do the same for other ".o" binary files related to other U-Boot configuration settings.**
### Creation of the basic image of the U-Boot environment
The image content can be produced by using the **mkenvimage** command.
```
Do not use this command :
$ echo -e "custom_board_name=\"Zynq Scalp Board\"\ncustom_board_version=\"RevB 2008\"\ncustom_board_vendor=\"Hepia CoRES - LSN\"" > images/linux/uenv-vol.env
$ /tools/u-boot-tools/mkenvimage -s 0x100000 -o images/linux/uenv-vol.env.bin images/linux/uenv-vol.env
```
In my case, I copied the tools produced by U-Boot into the **/tools/u-boot-tools/** folder.
### Create UBIFS images
[Documentation about the UBI/UBIFS file system](https://elinux.org/images/5/54/Weinberger.pdf)
......@@ -305,7 +318,7 @@ $ mkdir uenv-vol datafs-vol
$ cp image.ub datafs-vol/
```
Then, both rootfs and datafs UBIFS images must be created respecting the geometrical configuration of the flash memory.
Then, rootfs-vol, datafs-vol and uenv-vol UBI/UBIFS volumes must be created respecting the geometrical configuration of the flash memory.
**SF: Detected s25fl256s1 with page size 256 Bytes, erase size 64 KiB, total 32 MiB**
......@@ -325,7 +338,7 @@ $ sudo mkfs.ubifs -r ./datafs-vol -m 1 -e 65408 -c 130 -o datafs-vol.ubifs
$ sudo mkfs.ubifs -r ./uenv-vol -m 1 -e 65408 -c 32 -o uenv-vol.ubifs
```
Next, a configuration file must be created to define the UBI volume.
Next, a configuration file must be created to define the UBI layout volume.
```
$ echo \
......@@ -357,7 +370,37 @@ vol_flags=autoresize
> ubi-image.ini
```
Next, the UBI volume must be created.
```
$ echo \
"[uenv-volume]
mode=ubi
image=uenv-vol.env.bin
vol_id=0
vol_size=2048KiB
vol_type=static
vol_name=uenv-vol
[datafs-volume]
mode=ubi
image=datafs-vol.ubifs
vol_id=1
vol_size=8320KiB
vol_type=static
vol_name=datafs-vol
[rootfs-volume]
mode=ubi
image=rootfs-vol.ubifs
vol_id=2
vol_size=16640KiB
vol_type=dynamic
vol_name=rootfs-vol
vol_flags=autoresize
" \
> ubi-image.ini
```
Next, the UBI layout volume must be created.
```
$ sudo ubinize -p 65536 -m 1 -s 1 -O 64 -o ubi-image.ubi ubi-image.ini
......@@ -513,7 +556,7 @@ $ dd if=/dev/zero of=images/linux/BOOT.BIN bs=1 count=$(($((${SCALP_QSPI_NOR_SIZ
**This is necessary to prevent a new UBI/UBIFS file system from being partially overwritten with an old UBI/UBIFS file system. In this case, the UBI/UBIFS file system will appear corrupted and errors will appear. The fact that two different versions of a file system can be partially overlapped is due to the fact that the program that flash the memory does not erase the entire memory, but only partially, up to the size of the BOOT.BIN firmware.**
The produced binary file can be found in the **./images/linux** folder. The **FIT image** of the Linux kernel is located at the address **0x540000**.
The produced binary file can be found in the **./images/linux** folder. The **FIT image** of the Linux kernel is located in the **datafs-vol** UBI volume.
**For information purposes only**, below is the partitioning of the flash memory.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment