I am building a Windows 10 IoT Core image for a Raspberry Pi 3B and it needs to contain a custom config.txt
file at the root of the EFIESP partition.
I have edited the MyApp.FilesAndRegKeys.wm.xml file to include the edited config.txt
file like so:
<onecorePackageInfo
targetPartition="EFIESP"
releaseType="Production"
ownerType="OEM" />
<files>
<file
destinationDir="$(runtime.bootDrive)"
source="config.txt"
name="config.txt" />
</files>
But the buildimage MyApp test
command gives a file collision error:
ERROR: [00:00:01] onecore\base\cbs\mobile\iuvalidator\packagevalidationrules.cpp, PackageValidationRules::Rule_DetectFileCollisions, line 716, Error , Error - File collision detected, file '\config.txt' found in packages 'MyOEMName.MyApp.FilesAndRegKeys' and 'RASPBERRYPI.RPi2.BootFirmware'.
If I change name="config.txt"
to name="config2.txt"
then there is no error and the file is created successfully. But I want it to replace the existing file, not create a new one. I don't see the original config.txt
file anywhere in C:\IoT-ADK-AddonKit
or C:\BSP
so I'm not sure how to edit this existing package or force the replacement to occur.
If you want to edit the config.txt file, you can edit it after the image build. Insert the SD card that has the image flashed. You will find the config.txt file in EFIESP drive like this:
Reference: "R-Pi configuration file" and "CONFIG.TXT"
Update: Building IoT Core image with the modified config.txt file.
The config.txt is provided in a package (RASPBERRYPI.RPi2.BootFirmware.cab). So we need to regenerate the RASPBERRYPI.RPi2.BootFirmware.cab with the modified config.txt file. You can follow these steps:
D:\NewCab
. You can find them in EFIESP drive(You can find EFIESP drive in the flashed SD card):RPi_UEFI.pkg.xml
file:Start
IoTCoreShell-arm.cmd
in the iot-adk-addonkit and navigate to the pathD:\NewCab
and run the following command:pkggen RPi_UEFI.pkg.xml
You will get a
RASPBERRYPI.RPi2.BootFirmware.cab
in the working folder.Use the new generate
RASPBERRYPI.RPi2.BootFirmware.cab
replace the default one in this pathC:\Program Files (x86)\Windows Kits\10\MSPackages\retail\arm\fre
After that when you build image the edited config.txt will be added in.