When TrustFence and a read-only rootfs are enabled, U-Boot must
authenticate the SQUASHFS root file system. Add config switch to force
U-Boot to authenticate this image.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
If IMAGE_FEATURE 'read-only-rootfs' is active, the rootfs image
will be SQUASHFS.
Remove other root file system images, such as ext4, ubifs, sdcard.gz
to avoid confusion and use by install scripts.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This mode is necessary in the recovery initramfs to be able to properly detect
any external storage device that might contain an update package. The
configuration option associated with this mode became explicit after upgrading
busybox to v1.34.1, so enable it in our defconfig.
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
U-Boot uses partition names instead of partition indexes for the nand devices.
This commit syncs the boot scripts with the new dualboot variables.
https://onedigi.atlassian.net/browse/CC6UL-1254
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
These folders /mnt/linux, /mnt/update and /mnt/data are
created by the automount_block.sh script. In a read only
system, these folders are not created raising some errors.
Creating these folders solves the issue.
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
Create this symbolics links in build time instead of doing it
in run-time. This simplifies the system and allows it to work
with read only filesystems.
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
Before this patch the MAC addresses were read from the device
tree in the qualcomm.sh script executed at init, and a creates
a file where the MAC where located.
In 0a92f5d9e8df644de74e74f152ed6ff3dd8d3369 in the qca driver
the support to read these MAC addresses from the filesystem
was added.
This commits creates the simbolic link between the device tree
and the expected path where the MAC addresses where located, and
gets rid of the file with the MAC addresses.
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
The nand devices doesn't need to call the mount_cryptrootfs
script.
Reported-by: Francisco Gil <francisco.gilmartinez@digi.com>
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
mkimage logs are required for signature on CC8X and CC8M platforms. Create a
copy in the 'imx-boot-tools' deploy directory so a prebuilt imx-boot file can
be later signed using the standalone signature procedure.
Build the 'print_fit_hab' target unconditionally so the log is available for
future standalone signature processes.
Also, use 'CONFIG_MKIMAGE_LOG_PATH' and 'CONFIG_FIT_HAB_LOG_PATH' variables to
point to the logs before calling the sign scripts. We no longer require
creating a symbolic link of the log files.
Signed-off-by: Gonzalo Ruiz <Gonzalo.Ruiz@digi.com>
This change was accidentally reverted when merging to dey-3.2/maint, causing
the qualcomm module to be missing in the rootfs.
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
By default, all platforms except ccimx6qpsbc work at 400 kHz on the i2c bus
connected to the ATECC508A crypto chip.
https://onedigi.atlassian.net/browse/DEL-7727
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
Re-use RAMDISK address for authenticating the rootfs instead
of allocating a new address (if authenticating a rootfs, we're
not using a ramdisk).
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Some recipes were forcibly removing conflicting packages.
This does not allow to add those packages back for users that
want to use meta-digi layer, but a different distro than 'dey'.
With the 'dey' distro override, such removals are only done
if using this distro.
Reported-by: Michael Burr <michael.burr@digi.com>
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://onedigi.atlassian.net/browse/DEL-7712
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>
In the cc6ul we are not powering-off the supply of the XBee.
This is making that after a suspend/resume action the XBee
hangs due to ModemManager hasn't been stopped before the suspend.
Stopping ModemManager before going to suspend solves the issue.
https://onedigi.atlassian.net/browse/DEL-7701
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
Since commit 11558352 ("swu-images: add "installed-directly" flag to
sw-description") the swu package images are streamed into the target without
any temporary copy to support devices with low memory available, that forces a
different order according with the swupdate documentation because scripts
should packed before the rest. This means that all the pre, post and shell
scripts will be executed after the images will be installed. This behavior
breaks the current support to mount the cryptorootfs node before install an
encrypted rootfs.
This commit moves the shell script to mount the cryptorootfs node to the
recovery initramfs and modifies the swupdate command line to call the shell
script before the images installation.
https://onedigi.atlassian.net/browse/CC8X-320
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
Since we added support for compressing rootfs images, we need to manage SWU
packages with a regular rootfs image and with compressed images. That support
was missing in the identification process when the SWU packet was verified.
This commit fixes the identification of compressed rootfs images.
https://onedigi.atlassian.net/browse/CC8X-320
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This recipe had a post install script to do the following:
- create runlevel symlinks.
- comment the 'auto' lines of /etc/network/interfaces if running on
a non-Wi-Fi variant.
- add Atheros or QCA bridge examples depending on the detected chip.
- add wlan1 interface only if QCA chip is detected.
This post install cannot run on a read-only-rootfs so the recipe has been
reworked to do the same things at build time:
- the runlevel symlinks have been removed because they are taken care
of by a poky class.
- add a pre-up condition (the existance of a wireless entry on the device
tree) so that the interface is not brought up if the condition is not met.
- for the cc6/cc6n, since the Wi-Fi chip can be Atheros or QCA, add
specific wlan1 and br0 fragments with a pre-up condition basing on the
detected ID of the Wi-Fi chip
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://onedigi.atlassian.net/browse/DEL-7708
The access point configuration files are dynamically modified on a post
install script to generate an SSID name based on the last digits of the
MAC address (physical or virtual) assigned to a wlanX interface.
On read-only file systems, this is not possible, so add some conditional
code to the do_install() to use instead the $DIGI_FAMILY name.
Caveat: if several identical SOMs with read-only-rootfs co-exist on the
same network as APs, they will identify with the same SSID.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://onedigi.atlassian.net/browse/DEL-7708
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
Framebuffer support has been removed for all platforms, however it was missing
from the ccimx6ulsbc configuration notes.
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
Some packages require different scripts, configuration files or installations
depending on the wireless chip assembled on the target. In general, the way
to support both chips in one image is to have the recipes install both
versions of the aforementioned files, then leave only the strictly necessary
version once the wireless chip can be deduced.
In the case of the init-ifupdown recipe, this involves installing temporary
configuration fragments that are later erased. In the case of the standby
script, the logic can be implemented in a single file.
https://onedigi.atlassian.net/browse/DEL-7661https://onedigi.atlassian.net/browse/DEL-7666
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
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>
The latest version of psplash changed the default path to store the
communication FIFO with other processes to "/run" to allow keeping the
information between reboots, however we are using this tool from an initramfs
where "/run" does not exist, producing multiple errors trying to write to a
nonexistent path, delaying the update process.
This commit forces psplash to use an existing path like "/tmp" to handle the
communication FIFO, because we don't need to maintain the update information.
https://onedigi.atlassian.net/browse/CC8X-318
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
The latest version of psplash changed the default path to store the
communication FIFO with other processes to "/run" to allow keeping the
information between reboots, however we are using this tool from an initramfs
where "/run" does not exist, producing multiple errors trying to write to a
nonexistent path, delaying the update process.
This commit forces psplash to use an existing path like "/tmp" to handle the
communication FIFO, because we don't need to maintain the update information.
https://onedigi.atlassian.net/browse/CC8X-318
Signed-off-by: Arturo Buzarra <arturo.buzarra@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>