Right now the Easy Installer v1.3 doesn’t support rawfile content and partitions in a block device. (The Easy Installer docs “block devices” section states “Each blockdev entry has a name and either a partitions or content node.”.)
The following pseudo code will not work ( "config_format": 1
for image.json
config file).
"config_format": 1,
...,
"blockdevs": [
{
"name": "mmcblk0",
"content": {
"filesystem_type": "raw",
"rawfiles": [
...
]
},
"partitions": [
...
]
},
...
],
...
Do you plan to add this functionality in future versions?
And how exactly do you imagine this should be working? Either the Toradex Easy Installer does the partitioning or you provide a raw file. How exactly would you want to combine those two concepts?
@marcel.tx It could be very interesting that Toradex Easy Installer would be able to support pre-built pre-partitioned raw device images (for an example, a full image of my well-tested running linux system in the internal eMMC).
Imagine my Apalis/iMX6 is connected through USB OTG/RNDIS and I have such a *.IMG file on a Windows desktop, how could we set Toradex Easy Installer to propose the user to select this image, and write it directly to the internal eMMC without rebuilding anything ? (I foresee a possible solution combining Python SimpleHttpServer and maybe VNC to get the Easy Installer display on the PC side…).
Fred.
Additionally, we could be interested in updating all U-boot stuff, at the same time, considering the work with Toradex Easy Installer will be the only step to prepare a new board ! (and possibly without typing any command in U-boot console, given the possibility to enter in recovery process by a physical manner)
I don’t quite think you get the point. The Toradex Easy Installer would already support such completely raw block device dumps. However what you were trying to do is mixing a raw dump with a partition image which naturally won’t ever work. There is also another issue with raw dumps that they could only ever be applied to exactly the same size block device which may limit future compatibility. As written in the following article on our developer website a much better approach is to do a file level dump.
Hi Marcel. Is there any reason not to have rawfiles (which holds let’s say two u-boot environments) and partitions (mmcblk0p1, mmcblk0p2, etc.) in the same disk “blockdevs”/“name”: “mmcblk0”?
Despite the documentation stating that this two nodes are exclusive, it is actually not true (it used to be true in early internal Toradex Easy Installer version, but it was possible to combine the two since version 1.0).
The Toradex Easy Installer allows to use both. It will create partition table first, and then execute the raw content.
However, the Toradex Easy Installer does not check whether the raw part does something wrong: It easy to mess up the partition table, or filesystems within the partition. Please make sure that the partition table and data written using raw content do not conflict!
In fact, this is used in the image.json file for modules supporting WinCE, e.g.:
...
"blockdevs": [
{
"name": "mmcblk0",
"content": {
"filesystem_type": "raw",
"rawfiles": [
....
{
"filename": "nk7.nbx",
"dd_options": "seek=40962",
"size": 23
}
]
},
"partitions": [
{
"partition_size_nominal": 256,
"want_maximised": true,
"partition_type": "07",
"offset_in_sectors": 196608
}
]
...
This actually does work. See my new answer below. I will update the documentation accordingly.
Ah, great. I’ll give it a try…
However, the Toradex Easy Installer does not check whether the raw part does something wrong: It easy to mess up the partition table, or filesystems within the partition. Please make sure that the partition table and data written using raw content do not conflict!
I have already noticed during debugging quite some time ago 
Unfortunately I got the following error:
/ # [ 539.443878] reboot: Restarting system
U-Boot 2016.11-00152-g5b7e23f-dirty (Oct 24 2017 - 18:06:06 +0200)
TEGRA124
DRAM: 2 GiB
ERROR: as3722: failed to read ID1 register: -121
at drivers/power/as3722.c:59/as3722_read_id()
ERROR: as3722: failed to read ID: -121
at drivers/power/as3722.c:266/as3722_init()
initcall sequence fffad97c failed at call 80111bb0 (err=-121)
### ERROR ### Please RESET the board ###
Probably I miss understood the format? I have the following structure (some other options as well in addition):
"blockdevs": [
{
"name": "mmcblk0",
"content": {
"filesystem_type": "raw",
"rawfiles": [
{
"filename": "some-raw-file",
"dd_options": "seek=some-sector-offset",
"product_ids": ["0034"],
"size": 1
},
...
]
},
"partitions": [
{
"offset_in_sectors": <some-offset-not-hiding-the-raw-file>,
"content": {
"uncompressed_size": 11,
"filesystem_type": <some-file-system-type>,
"filename": <some-tar-gz-file>",
"mkfs_options": <some-mkfs-options>,
"label": <some-label>
}
},
....
]
},
....
]
Note that this U-Boot boot issue you are seeing is a known issue which we yet have to further look into.
Thanks a lot for that hint! Now I understand why it only happened once during debugging yesterday. In general the Installer v1.4 works just fine for me. How to best close this thread (I somehow cannot accept the answer of stefan.tx)?
Thanks for your update! The answer is already accepted, so the thread can be seen as closed.