Commit Graph
72 Commits
Author SHA1 Message Date
Kelvin Zhang 23411a7ac1 nx: Explicitly set as an non-AB target
We will be changing AB to be the default, existing non-AB targets
need to explicitly set AB_OTA_UPDATER to false

Test: th
Change-Id: I86a76296937a6abab1b4495cd66a35144348aafd
2024-12-12 05:34:50 +00:00
LuK1337 dead61609f nx: Adjust override prop key names
Change-Id: I436bbf425023dbe54cf3e2c35f50a5575511bc38
2024-10-24 18:49:34 +00:00
tmakin 410b6a82d7 nx: Use prebuilt U-Boot for now
* CTC's 2018 u-boot is more feature-complete for nx for now.

* We may revisit this later.

* This remediates issues with RAM carveout, clocks
  (on erista models), mod chip issues (on mariko models),
  and brings us almost in-line with L4t releases for nx.

Change-Id: I622cc67acb543b6ac54c8ee7a585d88e8066606c
2024-10-03 22:32:46 +00:00
tmakin 699006121d nx: Adjust density and aapt configs
* Reduce crashing and other issues resulting from density
  disagreements. Also, AAPT should not be set as per cuttlefish
  and newer Pixel devices.

Change-Id: Ibca27b4a77c84f2e57a534da10c278c7d0f0cf91
2024-09-30 18:51:52 +00:00
tmakin f613deb196 nx: Set proper settings for new fmac
* As per cuttlefish etc. and cypress/nxp reference, set overlays for
  MAC randomization support. Also enable
  WIFI_HIDL_FEATURE_DUAL_INTERFACE and
  WIFI_AVOID_IFACE_RESET_MAC_CHANGE as per cypress/nxp reference.

Change-Id: I5ad1539e400d9f79fce641faf284246743b08915
2024-09-30 15:26:36 +00:00
Nolen Johnson bac88dd586 nx: Nuke wifi_reset from orbit
* New cypress-fmac works with sleep!

Change-Id: I62655f9b4f6ac2b1f5240f28305eb0578f934bfd
2024-07-12 16:10:32 +00:00
Nolen Johnson f3adc1169d Revert "nx: Flash dummy super on clean install"
This reverts commit c5b488c9de.

Change-Id: I8ce38f3546ed094707637d5f4d2f6dfed11d8f7b
2024-07-01 20:42:01 -04:00
Nolen Johnson 0a3a351ce2 nx: sepolicy: Allow neverallows for wifi_reset
* I don't like this, but adding the required allowances for wifi_reset
 results in few insurmountable neverallows.

Change-Id: I6fa3f0cfc62b253c0f30399a3d54b26a5426b855
2024-05-14 02:24:31 +00:00
Nolen Johnson de40f6c2e7 Revert "nx: Ship full recovery image"
This reverts commit 1d3626e1f3.

Reason for revert: Global now in vendor/lineage.

Change-Id: Ib5d19fe8e69e52c87454418f9e4a0c4bdf90e7b8
2024-04-28 21:00:14 -04:00
Aaron Kling 0cd1ccc7b7 Build exfat support
Change-Id: I1231161d7f467626a6c5bcb0ce9cb455b91b03bd
2024-04-07 19:01:01 -04:00
Aaron Kling 1b77c25c63 Build nvgpu as an oot module
Change-Id: I6f593277e74d361d833214563141fe44fb0b7c36
2024-03-25 17:53:37 -04:00
Aaron Kling 6c0243c18a Add default fingerprint
As of Android 14 QPR2, galen Lineage release key fingerprints are
longer than 92 characters. This cause crashes on prop read. So,
hardcode a default that is shorter than 92 characters, so it can be
overridden later.

Change-Id: I47abbac4344252262c47b865fbda871559fcbf30
2024-03-25 11:59:19 -04:00
Nolen Johnson 96ad89b7d6 nx: sepolicy: Initial support
* Was tested on odin, modin, frig, and vali.
* Note: Due to the various sensors configurations across SKUs,
  sensors will likely need additional labeling after test release.

Change-Id: I0f8b159acc0ae14e8e4c7d8ec29a0cb406d3bff8
2024-03-20 19:52:49 +00:00
Michael Bestas d9d92a7a21 nx: Inherit common partition reserved sizes
Change-Id: I444ce2fcd37cdfa58d83a7e872dc547fb05a2a89
2024-02-07 12:08:51 -05:00
tmakinandTim Zimmermann f8b5067dcc nx: Flash dummy super on clean install
Reference: https://github.com/jjpprrrr/device_xiaomi_sdm845-common/commit/03191c60c738c84b99bcc67e0c3856b4e9087876
Co-authored-by: Thomas Makin <halorocker89@gmail.com>
Co-authored-by: Tim Zimmermann <tim@linux4.de>
Change-Id: Ida93bd051185aeb22feba61d5aa5e5f6c0ec2c38
2024-02-05 00:57:43 +00:00
tmakin 14af49d754 nx: Pretend to be launched to dynamic partitions
* We are aren't launched with Android at all to, but
  our partitions were origianlly set up to match
  foster, as it is our closest hardware counterpart.

* Those partition sizes are now to small to fit
  almost any form of GMS.

* The fact that users have to exploit their console,
  run a custom first stage bootloader (Hekate), and
  applications bootloader (u-boot) that we control
  means that instead of retrofitting dynamic partitions
  we can just _launch with them_ (as we have yet to ship
  this device).

* Treat this device as if it has always had dynamic
  partitions and let Hekate set us up to reflect that.

* Do away with SAR in the process, as Hekate can turn
  that off.

* Nuke MDA, we don't support hardware backed encryption
  anyway, so it doesn't make any sense to house.

Reference: https://github.com/CTCaer/hekate/pull/922
Change-Id: I1e5d8c309d08559873ea3c93ac5b4b6e197b528e
2024-02-05 00:57:38 +00:00
Jarl-Penguin 1d3626e1f3 nx: Ship full recovery image
* Ensure users are always on the latest recovery image

Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
Change-Id: I033ac4442622b737639d678993daf602a89f9bac
2024-01-29 13:43:29 -05:00
Nolen Johnson d452398bb4 nx: Account for vendor restructure
Change-Id: I880c51ec4bb435f086c36639bd4a036fd243ce1f
2024-01-29 13:43:29 -05:00
Nolen Johnson e80e7a2074 Move bluetooth name to bluetooth.prop
* Sadly in PRODUCT_PROPERTY_OVERRIDES this
  translates to 3 seperate props, example:

```
bluetooth.device.default_name=SHIELD
Android
TV
```

* The build system flips out when quotes are
  used.

* Can't move whole device to *.prop because we
  ifdef so many of these in tegra trees that it
  would be disgusting.

Change-Id: I4c611c64652d28f65505382db7b3e08bc6f3fabf
2024-01-29 13:43:29 -05:00
Nolen Johnson 38aa4c57e0 nx: Explicitly disable AVB
* This allows infra to sign successfully, I hate it, but it builds,
  boots, and works fine enough as a workaround.

* The underlying issue is that this flag causes avbtool args and location
  to be set in `misc_info.txt` whereas before it was not.

Change-Id: I7bdf237ec30d692c7d8b5c626a6e761e2c1a2593
2024-01-29 13:43:29 -05:00
Aaron Kling 607c394c66 Remove twrp build support
Change-Id: Ifeb70c254ac21aa60311fec50d0194bdcef80e57
2024-01-29 11:58:41 -05:00
Aaron Kling 4876553599 Build kernel and boot stack with gcc 9.3
Change-Id: Iaa26953515e46f655f64ccbfaa3afe79eaf79dd1
2024-01-29 11:58:41 -05:00
Aaron Kling ba8c478824 Switch to modules.load for lkm
Change-Id: I1a44f93747c37db7faea2a54cce90bfdbdb7ae1c
2024-01-29 11:58:41 -05:00
Aaron Kling 669a726748 Use gcc for kernel build
Lineage has switched to clang for kernel builds by default. The
nvidia 4.9 kernel does not build with clang.

Change-Id: Ie00632002a532a7a090d50c1951575c361244f7d
2024-01-29 11:58:41 -05:00
Nolen Johnson 849336b094 nx: Use device specific kernel
Change-Id: I3967bb5884394f45c14981a8de5a5283a5306e6e
2024-01-25 15:54:02 -05:00
Arne Coucheron e9cf3aa0a0 nx: Silence clang warnings during kernel compile
clang-11: warning: argument unused during compilation:
'-fuse-ld=lld' [-Wunused-command-line-argument]

Change-Id: I66a629f3573e3fad8aa085ea115475f02d60a7ea
2024-01-25 15:54:02 -05:00
tmakin 8bb5bf7347 nx: build bootstack for l4t-loader
We are migrating from coreboot to an ATF loader
built into hekate-ipl. This will load sc7 bins etc. along
with ATF (bl31) and U-Boot (bl33), which will chainload
kernel (as is currently the case). This also migrates to new
R2P method/driver as the new loader/ATF will stash a
copy of the bootloader in RAM so we do not have to
load a hekate payload.

Change-Id: I11e4a1810829ab3ac4c8830fd03afd6054e40bad
2024-01-25 15:54:02 -05:00
Nolen Johnson d9498d6ff0 nx: recovery: Set density to HDPI
* This fixes DPI issues in recovery.

Change-Id: Id0b79882ca6ae480e3e5eeec5ee9c764d783e6b5
2024-01-25 15:54:02 -05:00
Nolen Johnson 958327ae98 nx: Don't build seperate recovery and OS kernels
* This is really only needed on devkits to allow
  recovery flashed to `LNX` as opposed to `SOS` to
  actually boot.

Change-Id: I238f356a0bee74ba2b6b60168d3b072ad490a796
2024-01-25 14:56:46 -05:00
Nolen Johnson 819888bfec nx: Drop prebuilt kernel support
* We have no compatible prebuilts to make use of.
* Make comment more accurate.

Change-Id: I1aa8ce48a251b2237d9d9edefcc53aa96d2bcc2f
2024-01-25 14:56:46 -05:00
Nolen Johnson 803da5646e nx: Only build DTB files relevant to nx devices
* Remove DTB custom mkbootimg in the process, as it is
  only for mdarcy/sif DTB's.

Change-Id: I3aa19c267d290bb24a0ec05d2f4add03a820a70a
2024-01-25 14:56:46 -05:00
Nolen Johnson 1adef049d8 nx: Add support for tablet style builds
* `nx_tab` build target.
* Split TV/Tablet build characteristics and DPI.

Change-Id: I1c94647bb2e43fdc04a6f33249585a24a2e310bc
2024-01-25 14:56:46 -05:00
Nolen Johnson 3fdb058baf nx: Adapt to new hekate bootloader setup
* Reflect Hekate partition sizes.
* Reflect latest SWR bootloader (rev6).
* Mount `hos_data` and install firmware files on install.

Change-Id: Ib097e323773f914b5d88514459ff241d35598062
2024-01-25 14:56:46 -05:00
c03875880c nx: Intial rebrand from foster
* This is a tree for all Nintendo Switch variants:
  `odin`, `modin`, `vali`, and `frig`.
* `ro.hardware` will be NX on all variants with
   `ro.hardware.sku` being set per variant by u-boot.

Changes are as follows:
* At the moment the packaged DTB is only for `odin`, more to follow.
 * Note: We may make `modin`, `vail`, and `frig` device-tree-overlays
   on the `odin` base DTB to simplify things.
* Use darcy's thermal config as it's the most lenient, and is a same SoC STB.
* Unlike `icosa_sr` previously did, we will use the BCM HAL for BT over
  BTLinux, as A2DP is tested and verified, no need to deviate.

Changes that will require follow-up commits to build out:
* Update init to reflect nx's needs - will need more work to support devices
  other than `odin`.

Removals are as follows:
* Remove all non-nx device support files.

Co-authored-by: Thomas Makin <halorocker89@gmail.com>
Co-authored-by: Billy Laws <blaws05@gmail.com>
Co-authored-by: Aaron Kling <webgeek1234@gmail.com>
Co-authored-by: CTCaer <ctcaer@gmail.com>
Co-authored-by: John Smith <nemui3353@gmail.com>
Co-authored-by: langerhans <langerhans@users.noreply.github.com>
Co-authored-by: Nolen Johnson <johnsonnolen@gmail.com>
Change-Id: I9bab4d94c6e94a9c6e2a7cf04d16c4b76c0b6ac5
2024-01-25 14:56:45 -05:00
Aaron Kling 2de1ada59e Rebrand icosa to nx
Change-Id: Ic97a429c449dd6f7c7d0d5999ebc9b9640d2e8f0
2023-03-09 21:38:47 -06:00
Aaron Kling 56702979a8 Update fingerprint and security patch date to match stock 9.1.0
Change-Id: I5d5eb6d8aa1a57cf8b5ad3920878824667496103
2022-07-28 14:26:25 -05:00
Nolen Johnson d542885bb9 foster: Use foster system iamge size if WITH_GMS_TV is set
* Allows us to conditionally drop sif support when TV GMS is
  included, which sif has no hope in fitting the full version
  of.

Change-Id: I4ad8ac851fc12d53622a107fe9ed0acf6c102067
2022-04-25 14:22:31 -05:00
Aaron Kling 2540e46752 Set NV_BUILD_KERNEL_OPTIONS as needed by the rel-34 kernel
For simplicity, refactor TARGET_TEGRA_KERNEL to contain the decimal
point, and pass that to NV_BUILD_KERNEL_OPTIONS.

Change-Id: I08311ab07358cdd1d6e180dac8230f22f8de317c
2022-04-25 14:22:31 -05:00
Aaron Kling 8a5697a9c6 Raise vendor image size to 362 MB
The previous limit was set based on sif per the rel-30 BoardConfig,
which doesn't match the production sif partition layout. This is
updating the size to match the consumer hardware.

Change-Id: I0abb65140e2f52a1c57223fd95bd62db1a45a53a
2022-04-07 02:45:03 -05:00
Aaron Kling ac17f9644c Merge mdarcy targets back into foster
Mdarcy was only split because mdarcy/sif would not boot a recovery
image that did not have a dtimage in the recovery-dtbo slot, while
foster would not boot an image that did have that. As of rel-shield-r,
cboot on foster_e models does ignore the recovery-dtbo slot, so there
is no longer a need for the mdarcy shim target.

Change-Id: If4ed56aad54883fc48be86247d2527316fc8f5b2
2022-04-07 01:10:53 -05:00
Nolen Johnson 4493844590 Remove deprecated BOARD_SUPPRESS_EMMC_WIPE flag
* No longer supported past `lineage-16.0`.

Change-Id: I7bfa5ae25ba3accc20abd7360d5953b5fb1ab8b3
2022-03-02 14:36:29 -06:00
Aaron Kling 350c7787ef Use default compiler for kernel
For some reason, upstream nvidia downgraded from gcc 6.4.1 to 4.9.

Change-Id: I7a83a8ba82e44edd46e4d81f0e3485ddac99ae54
2022-03-02 14:36:29 -06:00
Nolen Johnson 4a2b7ce643 Opt-out of Lineage charger and remove charger altogether
* Cboot only supports off-mode charging on hawkeye and
  hawkeye is not presently supported

Change-Id: I8ebbe920c1923d47237e1c9bce7aa3959ae37801
2022-03-02 14:23:46 -06:00
Aaron Kling 16ecf2cc88 Update prebuilt kernel handling for 18.1
Change-Id: I8928ddf786a19ecde1be8f99d39bad550e36ebcf
2021-12-20 11:40:49 -06:00
Aaron Kling 4a17c282bc Use new kernel path
Change-Id: Ife429c9dfab8c127efcab941548c66fb474be169
2021-10-04 16:56:55 -05:00
Aaron Kling 93a508729e Use a recovery specific kernel defconfig
The kernel build scripts don't support a recovery specific variant
defconfig, so this needs to be a full defconfig

Change-Id: I52d4b423e782894effb619020995a4c2b46ef4f2
2021-09-14 14:54:43 -05:00
Aaron Kling e60d61bea5 Update fingerprint and security patch date to match stock 8.2.3
Change-Id: I587bf489c9c11f26321d1bf8c968d4431b9c864e
2021-07-15 19:47:21 -05:00
Aaron Kling 32acb9585b releasetools: Better firmware update handling
Change-Id: Ie3d9d965e6452bfbd8a9296d603fa973582b9471
2021-06-26 23:33:38 +02:00
Jan Altensen f672ed0ab8 Set recovery pixel format to BGRA_8888
The tegra framebuffer switched from RGBA to BGRA. See:
https://nv-tegra.nvidia.com/gitweb/?p=linux-nvidia.git;a=commit;h=c3ea5ede1959739540dda94150618f035434cf10

Change-Id: I9bf1dab7224a16e4492d5c61bb916945dfe1d3ac
2021-04-20 13:46:53 -04:00
Aaron Kling 89289c8509 Split mdarcy, sif, and porg to shim repos
Mdarcy and sif due to recovery requiring a builtin dtimage. Porg
due to requiring signed boot images.

As a result of sif not being installable, switch system and vendor
partition sizes to the next smallest variant, which is foster.

Remove dtimage handling, that will be added directly to the mdarcy
shim.

Change-Id: Ibc7cd0ad2e99d03b3be9dcbc545b2dffa49d05ce
2021-04-12 12:08:37 -05:00