Before Easy Installer I used a ‘dd’ procedure to flash both u-boot and raw file system on my Apalis board. U-boot was flashed in mmcblk2 with “seek=2” option.
I’ve created an Easy Installer custom image where I put u-boot in mmcblk0boot0 partition (still with “seek=2” option). Not a big deal, but since we have some older systems on the field, it will lead to different update and version info retrive procedures. I hoped I could flash u-boot on the same partition to be consinstent with old releases. The problem is, u-boot written in mmcblk0 partition wan’t be recognized; looks like I need to use mmcblk0boot0 partition.
Can someone give me some hints about how to flash (and use) u-boot on different partition? And/Or why it is a bad practice to use a different partition?
This is the original JSON file
{
"autoinstall": false,
"config_format": 2,
"name": "Custom Image",
"description": "Custom Image",
"version": "0.7.34.600",
"release_date": "2018-09-12",
"u_boot_env": "pri_maia",
"prepare_script": "prepare.sh",
"wrapup_script": "wrapup.sh",
"marketing": "marketing.tar",
"icon": "Logo.png",
"supported_product_ids": [
"0027",
"0028",
"0029",
"0035"
],
"blockdevs": [
{
"name": "mmcblk0",
"partitions": [
{
"content": {
"uncompressed_size": 1900,
"label": "RFS",
"filename": "rootfs.tar",
"filesystem_type": "ext4",
"mkfs_options": "-E nodiscard"
},
"partition_size_nominal": 512,
"want_maximised": true
}
]
},
{
"name": "mmcblk0boot0",
"content": {
"filesystem_type": "raw",
"rawfiles": [
{
"dd_options": "seek=2 bs=512",
"filename": "u-boot.imx.emmc"
}
]
}
}
]
}
And this is the one I used to write u-boot in mmcblk0 partition
{
"autoinstall": false,
"config_format": 2,
"name": "Custom Image",
"description": "Custom Image",
"version": "0.7.34.600",
"release_date": "2018-09-12",
"u_boot_env": "pri_maia",
"prepare_script": "prepare.sh",
"wrapup_script": "wrapup.sh",
"marketing": "marketing.tar",
"icon": "Logo.png",
"supported_product_ids": [
"0027",
"0028",
"0029",
"0035"
],
"blockdevs": [
{
"name": "mmcblk0",
"content": {
"filesystem_type": "raw",
"rawfiles": [
{
"dd_options": "seek=2 bs=512",
"filename": "u-boot.imx.emmc.158b428"
}
]
},
"partitions": [
{
"content": {
"uncompressed_size": 1900,
"label": "RFS",
"filename": "rootfs.tar",
"filesystem_type": "ext4",
"mkfs_options": "-E nodiscard"
},
"partition_size_nominal": 512,
"want_maximised": true
}
]
}
]
}
With this one, the old u-boot (loaded in mmcblk0boot0 partition) will run instead of the new one