Commit Graph

55 Commits

Author SHA1 Message Date
Matt Madison
b70f2c34e2 systemd: update bbappend to fix dependency for efi
A temporary workaround until the systemd recipe in OE-Core
is fixed to correct the build-time dependency in PACKAGECONFIG[efi].

Signed-off-by: Matt Madison <matt@madison.systems>
2023-08-04 06:11:15 -07:00
Matt Madison
56e0e9ba94 gcc-for-nvcc: update to gcc 10.3.0
imported from OE-Core hardknott, and rename the
recipes to be 'gcc-for-nvcc' instead of including
a repeat of the major version number.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-07-22 09:31:47 -07:00
Ming Liu
512eab93cf tegra-minimal-init: fix some invalid loop conditions
There is no count++ logic when mounting root device fails, so it will
hang which is certainly wrong, fix it.

When "rootwait" kernel parameter is being used, it should wait for root
device present infinitely.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2023-07-21 04:19:26 -07:00
Ming Liu
e6ab46b6c4 tegra-minimal-init: fix inconsistent indentions
Use blank space instead TAB everythere.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2023-07-21 04:19:26 -07:00
Ming Liu
7cdef334a1 tegra-minimal-init:platform-preboot.sh: also handle rootfstype
Otherwise it might be missed in init-boot.sh.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2023-07-21 04:19:26 -07:00
Ming Liu
91fa40401f tegra-minimal-init:platform-preboot.sh: support more bootdev types
Support more bootdev types: UUID, PARTUUID, PARTLABEL, LABEL.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2023-07-21 04:19:26 -07:00
Ming Liu
56ed0e78f6 tegra-minimal-init: dont assume boot device /dev/mmcblk0p1
Dont assume boot device is /dev/mmcblk0p1, there is a variable
TNSPEC_BOOTDEV in machine conf is for that purpose, use that.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2023-07-21 04:19:26 -07:00
Ming Liu
703e84d39e tegra-minimal-init:platform-preboot.sh: avoid unecessarily boot delay
When foundslotsfx is not set true, it does not have to wait for
APP$slotsfx partition, that can delay the boot.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2023-07-21 04:19:26 -07:00
Matt Madison
75960efc44 meta: rework image name usage for IMAGE_NAME_SUFFIX changes
OE-Core has reworked how the IMAGE_NAME and IMAGE_NAME_SUFFIX
variables are used - the suffix now gets embedded in IMAGE_NAME.
To account for this, adjust the tegra-specific image bbclasses
to drop ${IMAGE_NAME_SUFFIX} references, and adjust the recipes
for the ESP and initrd images to nullify IMAGE_NAME_SUFFIX, since
we don't really want '.rootfs' in the resultant artifact names
in those cases.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-07-04 07:51:51 -07:00
Jose Quaresma
11f04524bf tegra-flash-reboot: fix build with clang 16
| /build/tmp/work/armv8a_tegra-lmp-linux/tegra-flash-reboot/1.0-r0/reboot-recovery.c:8:15: error: call to undeclared function 'syscall'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
|         return (int) syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, arg);
|                      ^

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
2023-03-22 08:36:12 -07:00
Matt Madison
ee3094f7bc tegra-flash-init: add erase-nvme command
to allow the user to wipe an attached NVMe drive if switching
back to booting from internal storage during initrd flashing.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-02-08 03:14:00 -08:00
Matt Madison
511be2ce57 tegra-initrd-flash-initramfs: use initrd-flash fstype
The initrd-flash kernel/initrd image has to be the Android
(cboot-style) image type, and now that we have a separate
variable in the machine configs to specify that, use that
variable to set INITRAMFS_FSTYPES in the recipe.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-01-17 07:56:09 -08:00
Matt Madison
cd194fdd43 tegra-flash-init: add BCT redundant copies to mmcblk0boot0 writes
in the program-boot-device script.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-01-10 07:44:12 -08:00
Matt Madison
cda6115e56 tegra-flash-init: add dump of partition table to logs
to help with debugging layout mismatch problems in case
of an error.

Signed-off-by: Matt Madison <matt@madison.systems>
2023-01-02 11:22:47 -08:00
Matt Madison
31912882e9 tegra-minimal-init: add retries for locating APP partition label
When booting off a USB storage device, we need to give the kernel time
to probe the device.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-12-30 03:20:20 -08:00
Matt Madison
1471257ca0 tegra-initrd-flash-initramfs: add recipe
for building the initrd used for initrd-based flashing.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-12-30 03:20:20 -08:00
Matt Madison
5e23c6117b tegra-flash-init: add recipe for supporting initrd flashing
* Booted via RCM boot process, running entirely within
  the initramfs
* Accepts command sequence from host for handling specific
  flashing steps
* Programs boot device (SPI flash or mmcblk0bootX devices)
  from signed binaries sent from host
* Exports storage devices via USB gadget to host for
  partitioning/writing

Signed-off-by: Matt Madison <matt@madison.systems>
2022-12-30 03:20:20 -08:00
Matt Madison
72124d7edf tegra-flash-reboot: add recipe
to provide a small utility to reboot into recovery mode,
which can't be done with busybox's reboot command.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-12-30 03:20:20 -08:00
Matt Madison
d00be8a344 tegra-minimal-init: add delay and retry when looking up partition label
Another workaround for SDcard-based systems.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
dfd707a9f1 tegra-minimal-init: add retry loop for rootfs mount
On SDcard-based systems (e.g., Xavier NX devkit), even after
/dev/mmcblk0p1 shows up in the filesystem, you can get a mount
failure because it's not fully ready. For now, just try it
up to 5 times with a 1 second delay between tries to work around
this.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
952564246b tegra-minimal-init: fix boot chain variable check
to use BootChainOsCurrent, rather than BootChainFwCurrent.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
164ce0d6ed tegra-minimal-init: support L4T UEFI boot chain variable
Stock L4T puts a different 'root=' setting into the kernel image
in the two kernel partitions and/or writes the extlinux.conf differently
based on which slot is being updated.  To avoid having to do that,
and since the bootloader itself doesn't update the kernel command line
to indicate which boot chain we should be using, parse the
BootChainFwCurrent EFI variable to make that determination instead.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
d49e397067 tegra-minimal-init: drop references to platform-preboot-cboot script
which was dropped in an earlier commit.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
3a26a95c2d systemd: add bbappend
to enable EFI support on tegra platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
d6ab45616a tegra-minimal-init: clean up for L4T R35.1.0
The preboot script is common now, and always needs
util-linux-blkid.

Signed-off-by: Matt Madison <matt@madison.systems>
2022-09-05 13:54:07 -07:00
Matt Madison
7609c09739 packagegroups: add CUDA-gcc toolchain to SDK packagegroups
for tegra platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2021-12-16 10:04:11 -08:00
Matt Madison
b9507ceb23 meta: convert to new override syntax
* Ran convert-overrides.py to generate the initial changes
* Manual cleanup afterwards (which was a lot, due to our
  extensive use of overrides).

Signed-off-by: Matt Madison <matt@madison.systems>
2021-08-03 08:27:55 -07:00
Matt Madison
7a8cf920b0 tegra-minimal-initramfs: add temporary workaround for hashing issue
The combination of hashequiv and the improved pseudo tracking
in OE-Core prevents the enabling of sstate packages for the
initramfs image.  Temporarily work around these failures by
overriding the hash reporting function until something better
is worked out.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-10-20 06:32:37 -07:00
Matt Madison
24e1922b7f busybox: make modifications tegra-specific
and package it separately for tegra, too.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-07-27 04:12:06 -07:00
Bryan Cisneros
4d33518fe7 tegra-minimal-init: add platform-pre-switchroot
Optionally run any custom initialization just before
switching the rootfs.
2020-07-23 03:15:32 -07:00
Matt Madison
fbc7101405 psplash: remove patch
Patches for the issues with FBIO_WAITFORVSYNC and FBIOPAN_DISPLAY
have been applied to the kernel, so this patch is no longer needed.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-06-08 07:55:59 -07:00
Matt Madison
1253d508bd packagegroup-base: update bbappend
to add tegra-wifi to packagegroup-base-wifi on tegra
platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-05-22 11:21:40 -07:00
shlomow
98c2d13c49 tegra-minimal-init: add support for rootfstype kernel param when mounting rootfs 2020-05-12 13:31:24 -07:00
Matt Madison
1fe286e748 systemd-conf: remove bbappend and wired.network override
The interoperability issue with the Ethernet driver
and LLDP appears to be resolved.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-04-26 08:42:42 -07:00
Matt Madison
7d515d78d8 packagegroups: add nativesdk-packagegroup-cuda-sdk-host
for adding to an SDK build to get the minimal set of
packages necessary for cross-compiling CUDA projects.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-04-01 08:11:33 -07:00
Matt Madison
cbb79860b6 psplash: add bbappend
The tegrafb driver doesn't support some of the ioctls
that psplash uses, so add a patch to address that
for tegra platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-03-25 08:57:34 -07:00
Matt Madison
af4492634b meta: use bundled initramfs instead of initrd on tegra186/194
cboot appears to mangle the initrd at boot time when it
exceeds a couple of MiB in size, but only if it has
been built separately and combined with the kernel using
mkbootimg.  This does not happen when the initrd is
built into the kernel directly, so work around the cboot
issue by switching to bundling the initramfs into the
kernel on the non-u-boot platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-03-22 08:12:58 -07:00
Matt Madison
f5a03e9799 packagegroup-base: add bbappend
to add tegra-bluetooth to packagegroup-base-bluetooth
on tegra platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-03-04 13:57:43 -08:00
Matt Madison
38ce086e48 tegra-minimal-initramfs: use busybox
Don't depend on VIRTUAL-RUNTIME_base-utils, which could
bulk up the image considerably.  Use busybox instead, but
add a variable for it so users can override thet setting
should they wish to do so.

Also add ${ROOTFS_BOOTSTRAP_INSTALL} as is done in other
initramfs recipes, for processing any postinst scripts,
and set FORCE_RO_REMOVE to 1 to have the rootfs creator
remove packages after construction, just as if we had
'read-only-rootfs' set in IMAGE_FEATURES.

(For #239)

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-29 07:18:23 -08:00
Matt Madison
16bbb3fc75 tegra-minimal-init: miscellaneous cleanups
Remove the explicity runtime dependency on
VIRTUAL-RUNTIME_base-utils. We don't really want the
full set of base-utils, just busybox, and we'll let
that get included by the initramfs recipe.

Also fix the permission bits on directories created here
so they match what's done in base-files.  Otherwise, rpm
will complain during rootfs creation if base-files happens
to get included in the initrafms.

Finally, set this recipe as compatible only with tegra platforms,
and clean up some unneeded overrides.

(For #239)

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-29 07:17:44 -08:00
Matt Madison
17876628fe busybox: add bbappend
to make sure that the 'cksum' command is included in
the busybox build.  The tegra210 bootloader update
script requires it.

Signed-off-by: Matt Madison <matt@madison.systems>
2020-01-08 15:15:10 -08:00
Arnstein Kleven
3a88375990 Set IMAGE_ROOTFS_EXTRA_SPACE to zero in initramfs 2019-11-18 03:33:13 -08:00
Matt Madison
a0bce93d3e systemd-conf: add bbappend
to replace the default wired network configuration file
from OE-Core with one that disables LLDP on tegra platforms.

(#146)

Signed-off-by: Matt Madison <matt@madison.systems>
2019-07-28 10:14:02 -07:00
Matt Madison
bb63c220a8 meta: add platform-preboot initrd script for tegra194
Xavier systems do not use U-Boot, so look for the rootfs
partition based on what cboot provides.

Signed-off-by: Matt Madison <matt@madison.systems>
2019-04-07 10:07:40 -07:00
Matt Madison
991aa02b56 meta: add cboot initrd image type
creating a cboot-compatible kernel+initrd bundle for
flashing to the kernel partition on cboot-only systems.

Signed-off-by: Matt Madison <matt@madison.systems>
2018-12-25 07:18:42 -08:00
Matt Madison
74af7320d3 meta: unify initramfs and initrdscripts recipes
and name them with prefix 'tegra' instead of 'tegraXXX',
since they apply across multiple tegra platforms.

Signed-off-by: Matt Madison <matt@madison.systems>
2018-12-25 07:18:42 -08:00
Matt Madison
60be73a480 tegra210-minimal-init: support cboot as bootloader
use the cboot rootfs locator scriptlet if the tegra target is
configured to use cboot instead of u-boot.

Signed-off-by: Matt Madison <matt@madison.systems>
2018-12-25 06:14:50 -08:00
Matt Madison
d94b048cf5 tegra{186,210}-minimal-initramfs: set IMAGE_ROOTFS_SIZE
to allow users to set that variable in their local configuration
without it affecting the size of the initrd.

Signed-off-by: Matt Madison <matt@madison.systems>
2018-04-13 06:59:15 -07:00
Matt Madison
61259fdb92 tegra210-minimal-init: update license file location
to remove the COREBASE reference.

Signed-off-by: Matt Madison <matt@madison.systems>
2018-01-20 06:04:42 -08:00
Matt Madison
8b327ddf68 tegra186-minimal-initramfs: fix description text
Signed-off-by: Matt Madison <matt@madison.systems>
2017-07-15 09:53:48 -07:00