Rock 5B+ Debian build

I had a LOT of correspondence with tech support who ended up creating a video which shows the step by step process. It’s shown here:

https://radxaos-sdk.github.io/rsdk/install/devcontainer.html

There are some glitches. I built the rsdk environment on a couple of different platforms with different hardware. Both kicked up errors at the end of the build that said the secondary partition went outside the limits, blah blah…but the primary partition is ok. This on a 4tb nvme with nothing else installed but debian and rsdk. I copied the .img files to sdcard and then booted up. All good.

Another glitch is the tech’s video shows a check he did to see that json was present. I found that just typing the letters I saw on the screen in my install gave no result. But when I typed “jsonnet” all was as needed. This is at the 20:17 mark of the video.

If you follow the instructions on the webpage exactly, on a clean debian install you will be able to create the command line rsdk builder - the devcontainer only option from the rsdk webpage above.A small detail… I found that if you build the rsdk environment and then logout of your system and come back later you have to run the instructions from the line …

cd rsdk
npm install @devcontainers/cli
export PATH="$PWD/src/bin:$PWD/node_modules/.bin:$PATH"
rsdk devcon up
rsdk devcon

I seem to remember running as root, but not 100% on that.

Then you can use a command such as:

“rsdk build rock-5b-plus bookworm cli”

Be prepared to wait, sometime 25minutes with nothing happening. Maybe an hour in total. Just be ready to look at a blinking cursor.

The command above will still compile the image with all of the kde etc stuff. There are a couple of ways to make a lightweight build. One is to manually edit the rootfs.jsonnet file and change from true to false the following line “vendor_packages = true”. I don’t recall which subdirectory of rsdk it sits in but it’s not hard to find. Also be aware that rsdk builds a cache so search the entire tree for the file.

See this link:

Make the change then save the file, then run the rsdk build command and there will be no desktop or other Radxa applications. rsetup will still be there. So also will the theme I mentioned above. So how to solve that? Well, it appears there are numerous command line modifiers for rsdk.

The theme in question is in a file on github that you can’t modify in your environment but you can at the build stage.

But you only need to do the modification if you have already made a build where the theme is used - the rsdk build environment creates a cache and that theme gets put in the cache and will appear in future builds. So either do a fresh install or tell the build system to ignore the cache.

So you issue a build command like this:

“rsdk build rock-5b-plus bookworm --no-cache cli”

Now, if you haven’t yet made a build and you have changed the .jsonnet file as above, that theme won’t get put in to the cache since it ONLY gets loaded as part of the vendor packages. So if the vendor packages have never been included in a build, the theme won’t be in the cache. Personally, I think it’s better to just use the --no-cache modifier each time to be on the safe side.

I think there is another way of creating a build without going in to the .jsonnet file mentioned above. And that is to make the tweaks with rsdk build modifiers. Apparently, rsdk follows the rbuild structure. So you can ‘probably’ use stacked modifers to take care of the vendors-packages tweak. So 'maybe" a command such as…"“rsdk build rock-5b-plus bookworm --no-cache --some_additional_modifier cli” - but what the exact text is for that modifier I don’t know. Would be good to have that info on the Radxa webpage.