Add missing call to 'uuu' and erase the partition before creating
the UBI volumes.
Also add larger timeouts to erase operations.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
The config file /etc/fw_env.config is generated dynamically basing on
the partition table and, in the case of NAND-based SOMs, on the NAND
geometry. This is done on a postinst script that modifies the file on the
first boot of the target. Since this is not allowed on read-only-rootfs,
this commit adds a default fw_env.config file to use instead when
read-only-rootfs is enabled.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://onedigi.atlassian.net/browse/DEL-7708
This allows the packages to be included in the ccimx6sbc images. While at it,
include the Qualcomm bluez patches in ccimx6 builds. These patches aren't
destructive, they simply add functionality required by the Qualcomm chip, so
they shouldn't have any secondary effects when using the Atheros chip.
https://onedigi.atlassian.net/browse/DEL-7661https://onedigi.atlassian.net/browse/DEL-7666
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Other layers, such as meta-digi-dualboot, may add scripts to this
list on their layer.conf file. Depending on the order and priority
of layers, using a strict '=' here completely overrides previous
values, which is not desired.
Reported-by: Francisco Gil <francisco.gilmartinez@digi.com>
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
- Add the '-m' parameter. Without it, the script doesn't
generate the output merged configuration file, and the
fragments are not applied.
- Fix the if condition. The '*.cfg' expands to a list of
files, but the '-f' only admits one parameter. Use instead
the Python find_cfgs() function.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
The variable 'dualboot' (and 'singlemtdsys' for CC6UL) was restored
after the bootcmd that runs the first time after programming U-Boot runs
fastboot again to resume the script.
This is ok for the CC6UL but not for the rest of platforms, that run the
partition script on the bootcmd, *before* running fastboot.
Restore the variables for all platforms in the bootcmd right after
resetting the environment.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
U-Boot has embedded support to handle bootcount tries.
When the limit of tries is reached, U-Boot runs the script
in `altbootcmd` rather than the usual `bootcmd`.
This other script resides on meta-digi-dualboot layer.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
Ensure stdout redirection to the USB interface is removed in every case.
Otherwise, it would be left redirected when INSTALL_UBOOT_FILENAME is
manually set.
Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
Install scripts may rework the partition table basing on the value of
env variables. Information of UBI volumes may remain on the NAND that
could later not correspond to the new partition table.
Make sure the MTD partitions are erased prior to updating:
- For Multi-MTD, append '-e' option to the update command.
- For Single-MTD, erase the system partition.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Check the status of 'dualboot' env variable.
If set to "yes", use the dualboot partition table in the script and
restore the variable (default is "no") after resetting the environment.
Also, for dualboot, there's no need to wipe the recovery partition or
boot into recovery mode.
For dualboot, this script programs both systems A and B with the same
images.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://onedigi.atlassian.net/browse/DEL-7649
Commit c33fc8a7fe wrongly used
https protocol when using MTK remote when it should have been
ssh.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This is necessary for images that have SELinux enabled. Aside from changing
some package configurations and including an additional library in the rootfs,
this change has no apparent effects on the core functionality of the system.
https://onedigi.atlassian.net/browse/DEL-7641
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This allows users to apply small changes to our kernel configuration without
having to create a completely new defconfig. Use a simplified version of the
kernel-yocto.bbclass implementation.
https://onedigi.atlassian.net/browse/DEL-6706
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
The default policy provided by meta-selinux breaks a lot of the features in
DEY, so adapt it to make most features work. Note that this is simply an
example, end users should create their own policies for their own needs.
Make these changes toggleable so that users can use the reference policy
instead.
https://onedigi.atlassian.net/browse/DEL-7641
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This package includes a script that is executed by a udev rule that we
currently include in our sysvinit images. Without it, the regulatory firmware
mechanism is broken and an error appears when booting the system.
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
When we added the SDMA fw systemd service, we accidentally made it so that all
scripts were installed only when using systemd. These files are still needed
when using sysvinit, so correct this change.
While at it, include the SDMA fw service in firmware-imx-sdma's FILES.
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
When DualBoot mechanism is enabled and an update is pending,
the boot script needs to change certain variables and save the
environment.
The regular boot script already changes a number of variables,
such as 'extra_bootargs' and 'overlays' by appending strings to
the already existing values. Saving the envionment may make these
grow endlessly with each iteration of the boot script.
For this reason, move the DualBoot check as the first thing in
the script, save the environment if needed, and then continue
with the normal flow, that changes variables before booting
but doesn't save them.
On certain scripts, this allows us to get rid of some instructions
for resetting the overlays variable.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
The script required the passing of option '-b' for setting up the
target to use a single MTD partition and multiple UBI volumes.
If a target however already has the variable 'ubisysvols' set to
'yes' but this parameter is forgotten when calling the script, the
partition layout would change to default (several MTD partitions).
Remove the recently added '-b' option and make the script decide
basing on the current value of 'ubisysvols' variable.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
The script preserves the current value of env variable 'ubisysvols'
so that the new partition script generates the appropriate partition
table before proceeding with the update operations.
If using a UBI volumes layout, the script will not erase the partitions.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://onedigi.atlassian.net/browse/DEL-7614
With U-Boot supporting the creation of mtdparts and UBI volumes depending
on the value of variable 'ubisysvols', adapt the install script to make
use of those to generate a partition table and UBI volumes accordingly.
This can be triggered with new option '-b'.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Set the new variable 'rootfsvol' to rootfs_a or rootfs_b when dualboot is
enabled, to cover the case where the devices uses the 'system' partition
with different UBI volumes.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
The support for dualboot was integrated on meta-digi-dualboot layer, but it
really depends only on environment variable 'dualboot' so we'd better
integrate the support on the scripts in meta-digi, to avoid synchonization
problems between both layers.
This also allows to be able to easily enable dualboot in U-Boot with the
variable, without needing to update the script on the linux partition.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Traditionally, platforms based on NAND, used one UBI volume
per MTD partition.
Now it's possible to use only one MTD partition containing many
UBI volumes.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://onedigi.atlassian.net/browse/DEL-7614
Enabling DIGI_INTERNAL_GIT defaults to LOG server. The build from local
MTK Digi server was broken.
Fix uboot and linux recipes declaring different repo paths depending on
whether the local remote is LOG or MTK.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This command was already present on the script used for CC8X. Add it here
so the scripts are as much alike as possible.
Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
Fastboot is configured on boot with the current MMC configuration.
If we create a GPT partition table, we need to restart fastboot before we
try to program any partition with the 'flash' fastboot command.
Set 'fastboot_dev' to a different device, 'sata' for example an back to 'mmc'
to trigger a fastboot restart after creating the partition table on blank
devices.
Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
Includes:
- add support for getting properties from the ROM bootloader.
- flash layout extra check by asking flash size to the MCA bootloader.
- flash layout extra check by asking flash size to the MCA.
Signed-off-by: Hector Bujanda <hector.bujanda@digi.com>
The current syntax only works properly when running the script through bash.
Change this so that it works for other shells as well.
While at it, fix a typo in the message that appears when the variant can't be
detected in the 6UL script.
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>