Replies: 30 comments
-
In my test distro I have a |
Beta Was this translation helpful? Give feedback.
-
@madisongh thanks a lot for pointing me to this. I shortly checked and planning to add support for nx. Still have some questions:
Thanks. |
Beta Was this translation helpful? Give feedback.
-
I have an implementation of a signing server here. The README for the Keystore TA outlines the process. The base passphrase is stored in the encrypted keyblob that you flash onto the device, which is decrypted at boot time (then hashed with the unique ID of the SoC). You can have multiple passphrases for unlocking the filesystem. I think LUKS allows up to eight. |
Beta Was this translation helpful? Give feedback.
-
OK thanks a lot for info. Just last questio before I dig in I saw in repo eks.img (in bootfiles recipe). Which passphrase is used in this blob? Thanks |
Beta Was this translation helpful? Give feedback.
-
You mean what's the plaintext of the passphrase? I don't remember any more. Once I verified that the mechanism worked, I promptly forgot what I set it to. |
Beta Was this translation helpful? Give feedback.
-
OK thanks a lot. I'll create new one (some dummy for testing purposes). I think I understand concept how LUKS decryption work what is still not clear to me where is cryptsetup called when creating root partition? It is done in some script? Many thanks. |
Beta Was this translation helpful? Give feedback.
-
For that, I flash a special installer image that uses the scripts here to set up the encrypted partitions (which are named with the prefix |
Beta Was this translation helpful? Give feedback.
-
Hi, Im seeing this and reading it, I looked at the distro, are you saying this in fact does secure-boot ? I also have an Xavier and am looking at secure-boot and full disk encryption. There isnt a lot of information on the test-distro so id assume its just for "testing changes", but it seems there is a bit more features enabled in it ... I did get an image built, curious what is in the image and what actually happens when flashed, and by far you have the knowledge in your head 👍 |
Beta Was this translation helpful? Give feedback.
-
To be more accurate, the Basically, though, the relevant features are:
Build-related features are:
The images also include packages for testing the BSP and meta-tegra itself, and some features I've worked on for other projects, like using the PMIC watchdog timer and A/B failover since those projects have been headless, non-interactive devices that need to be running 24/7 with no provision for re-flashing via the USB OTG port. There's more to building a secure product, of course, and whether any of the above will be useful to you will depend on what your product is, what other hardware and software you incorporate into it, how it will be used, how secure you need it to be, etc. |
Beta Was this translation helpful? Give feedback.
-
Thanks for porting the secureboot machine over to tegra-demo-distro @madisongh and thanks for starting/contributing to this thread @nandra and @outbackdingo I just wanted to mention we are also really interested in Secureboot on Xavier NX and would love to coordiate work on and/or help fund efforts others are doing in this area. Perhaps we could use one of the communication mechanisms in #426 to get organized on this. Please weigh in on communcation preferences there if you haven't already and I'd like to post an update there next week. |
Beta Was this translation helpful? Give feedback.
-
Thanks @dwalkes . I'm interested in sharing effort of Secureboot on NX. I posted my response on pool few days ago ;). |
Beta Was this translation helpful? Give feedback.
-
Hi guys, Very interesting subject for me, I remember my talk with @madisongh in this issue about this particular configuration for platform Jetson TX2. It depends on what we want to do (secure our device) and we have also to adapt with the design (SOFT + HW) of the Jetsons platform. If we want to have a completed chain of trust, here is an interesting link There is different option:
Nvidia pushed new documentation/sample about the SE (Secure Engine) from Please let me know if I can help. |
Beta Was this translation helpful? Give feedback.
-
i think theres a bit of confusion and some issues between tegra-demo-distro and Clone this repository: $ git clone https://github.com/OE4T/tegra-demo-distro.git where i think you really want us to be cloning $ git clone https://github.com/madisongh/tegra-test-distro.git which README also states Clone this repository: $ git clone https://github.com/OE4T/tegra-demo-distro.git anyway i cloned https://github.com/madisongh/tegra-test-distro.git and I am working from that, correct me if i am wrong! |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
while perusing through this distro, i see a few things, firstly let me state, I have a Xavier NX devkit, with a fully encrypted rootfs via zymkey / zymbit module. It however doesnt include secure-boot processes, so im looking to move towards this process you have created. I also notice that you utilized mender, Honestly I think that meta-rauc, aktualizer and ota-updates-community edition from advancedtelmatica https://github.com/advancedtelematic/ota-community-edition would be far better suited for this, though im sure a bit of work to integrate fully. Lastly i see you mention tergra-test-disro and jetson-tx2-sb, where it appears you state " builds images for my secure-boot-enabled TX2" and later you mention flash a special installer image that uses the scripts here to set up the encrypted partitions, so im guessing its a matter of moving / duplicating the jetson-tx2-sb to the Xavier, and figuring out how to flash the installer image for the luks, am i on the right track logically? Im sure ive over simplified it. Just wanting to clarify the pieces for all of us wanting to do this on the Xavier. |
Beta Was this translation helpful? Give feedback.
-
so... jumping in with 2 feet..... Ive copied/duplicated the work for jetson-tx2-sb to jetson-xavier-nx-devkit-sb, I created a diff pasted below, i have 3 curious questions, one the build failed with exit 7 from 'curl --silent --fail -X POST "$@" "http://127.0.0.1:9999/$endpoint"' in tegra-test-distro/layers/meta-tegra/recipes-kernel/linux/linux-tegra_4.9.bb:do_package, So ill assume its looking for a local digsigserver deployment for signing ? correct ? Next is is simply made a copy of flash_jetson-tx2-sb_custom.xml to custom-flash-layout/flash_jetson-xavier-nx-devkit-sb_custom.xml which contains the cp /var/home/dingo/tegra-test-distro/layers/meta-testdistro/recipes-bsp/tegra-binaries/custom-flash-layout/flash_jetson-tx2-sb_custom.xml /var/home/dingo/tegra-test-distro/layers/meta-testdistro/recipes-bsp/tegra-binaries/custom-flash-layout/flash_jetson-xavier-nx-devkit-sb_custom.xml and cp layers/meta-testdistro/conf/machine/jetson-tx2-sb.conf layers/meta-testdistro/conf/machine/jetson-xavier-nx-devkit-sb.conf and cp -R ./meta-testdistro/recipes-bsp/tegra-binaries/bootfiles/jetson-tx2-sb ./meta-testdistro/recipes-bsp/tegra-binaries/bootfiles/jetson-xavier-nx-devkit-sb so the questions are what / how to generate this eks.img or will this one in three i copied actually work ? lastly my diff for review before i make a pull request that requires many more changes, id like to get a complete build and test it before i submit the pull request. diff --git a/layers/meta-testdistro/recipes-bsp/tegra-binaries/bootfiles_1.0.bb b/layers/meta-testdistro/recipes-bsp/tegra-binaries/bootfiles_1.0.bb INHIBIT_DEFAULT_DEPS = "1" SRC_URI = "file://eks.img" diff --git a/layers/meta-testdistro/recipes-bsp/tegra-binaries/custom-flash-layout_1.0.bb b/layers/meta-testdistro/recipes-bsp/tegra-binaries/custom-flash-layout_1.0.bb INHIBIT_DEFAULT_DEPS = "1" SRC_URI = "file://flash_${MACHINE}_custom.xml" diff --git a/layers/meta-testdistro/recipes-bsp/tegra-binaries/tegra-bootfiles_32.4.3.bbappend b/layers/meta-testdistro/recipes-bsp/tegra-binaries/tegra-bootfiles_32.4.3.bbappend do_install_append_jetson-tx2-sb() {
+RDEPENDS_${PN}_append_jetson-xavier-nx-devkit-sb = " \
RRECOMMENDS_${PN}_append = " |
Beta Was this translation helpful? Give feedback.
-
lease see this reply: #421 (comment) |
Beta Was this translation helpful? Give feedback.
-
@nandra yeah i figured as much, just clarifying i was correct, trying to deploy that now locally on the build box... Thanks |
Beta Was this translation helpful? Give feedback.
-
The project I'm working on for my day job happened to be using Mender. I don't know the details of other OTA update systems, but hopefully it won't be too hard to adapt some of the underlying features for them.
Sounds that way. |
Beta Was this translation helpful? Give feedback.
-
@nandra you making any further progress? Im still working through the signing server, a bit busy lately! |
Beta Was this translation helpful? Give feedback.
-
@outbackdingo waiting on final word from @dwalkes about some common discussion and sharing efforts and common understanding ;). @dwalkes do you have any output from pool? Thanks |
Beta Was this translation helpful? Give feedback.
-
@nandra I'll have something posted there by Monday. |
Beta Was this translation helpful? Give feedback.
-
okay, i am very close to having a generated image, called jetson-xavier-nx-devkit-sb, having an issue with kernel-bup-payload, any ideas?? [2020-10-06 14:08:45 -0400] - (sanic.access)[INFO][127.0.0.1:43168]: POST http://127.0.0.1:9999/sign/tegra 500 13 [2020-10-06 14:15:06 -0400] - (sanic.access)[INFO][127.0.0.1:43586]: POST http://127.0.0.1:9999/sign/tegra 500 13 |
Beta Was this translation helpful? Give feedback.
-
Did you follow the README that you can find here ? Could you check I think you have to copy the file from meta tegra to the BSP folder:
@madisongh could you please confirm that ? |
Beta Was this translation helpful? Give feedback.
-
Yeah followed the doc to the letter really, there is no mention of flashvars anywhere in it, and no its doesnt exist in my bootloader folder so ill move it there, and see how we go, you did also mention it looked like it was trying to sign for a TX2-based (tegra186) machine, rather than a Xavier-based machine (tegra194). That might be part of the problem. so next question is in what file are these variables set, remember i basically made a copy of the TX work for the Xavier, highly possible i missed something |
Beta Was this translation helpful? Give feedback.
-
something appears off here? using L4t-32.4.3-tegra186, flashvars file is 0 byte ls -al ../layers/meta-tegra/recipes-bsp/tegra-binaries/tegra-flashvars |
Beta Was this translation helpful? Give feedback.
-
You should use the flashvars from here:
This is an issue in the config file |
Beta Was this translation helpful? Give feedback.
-
@outbackdingo As I mentioned over on this issue, it looks like you're basing your modified machine configuration on a TX2, rather than a Xavier NX. From your comment above...
That XML file is for Jetson-TX2. You need to start with the default flash layout file for the Xavier NX dev kit and modify that similarly to the differences between
Here is the root of the problem you're seeing with the signing requests - that config file None of this is as straightforward as a simple copy-paste from the existing files for the TX2, unfortunately. You need to compare the differences between the It might be easier to make the changes one step at a time, too. For instance, you could start with manual signing of the bootloaders and the normal flash layout. If you can successfully boot your secured XNX devkit with the manually signed image, then move on to the next steps - either automating the signing using digsigserver, or adding the filesystem encryption setup, then add Mender. An incremental approach will make it easier to identify issues as you go along. |
Beta Was this translation helpful? Give feedback.
-
This is confusing in of itself as I can even find an example of jetson-tx2.conf anywhere in the layers. And i agree maybe easier, longer learning curve, I actually think im close, once i can get past the flash layout and this configuration, so im feeling I cant be that far away from at least kernel signing, Ive already seen modules signing function, and as Im also trying to contribute working code, collaboratively instead of being a bull in a china shop, as usual i just need to know where to look, or what to look for, not necessarily have the work done for me, as we all know youve succeded greatly at a ton of heavy lifting. We all want this and my ultimate goal is to deliver, once i figure out the "missing" bits.... |
Beta Was this translation helpful? Give feedback.
-
Hi guys @nandra @outbackdingo There was updates in repo tegra-test-distro concerning secure boot support with RootFS and other partitions (DATA, Logs and extra) encrypted for different jetson platforms (Jetson TX2 and Xavier NX). Did you guys try it ? Please let me know if you need help otherwise I think we can close this issue. |
Beta Was this translation helpful? Give feedback.
-
Hello,
AFAIU from nvidia documentation NX (and other platform) have implemented SecureBoot functionality so FW produced by authority which owns private key only can be booted. I would like to move to step further to protect also IP for some firmware parts.
Was thinking about encrypting whole disk (or at least some directories which contains sensitive material). I was looking into meta-encrypted-storage which seems to provide kind of functionality. Would like to ask if anyone successfully integrate such functionality or maybe have some other ideas how to achieve this? Thanks a lot.
marek
Beta Was this translation helpful? Give feedback.
All reactions