cdsteinkuehler / br2rauc

Buildroot + RAUC
Other
52 stars 18 forks source link

How to adapt the project for RPi 3? #20

Closed hrs11-95 closed 1 year ago

hrs11-95 commented 1 year ago

Hello,

This is not an issue but rather a discussion / info question.

I have a Raspberry Pi 3 Model B and I want to use your solution on it. I know that I need to adapt somethings like DTS, uboot script for RAUC,.. But do you think this is feasible? And what could be the bottlenecks? And how did you create the custom dts for RPi 4B? I see it's similar to RPi CM4. Will it also work for RPi 3B?

Thanks in advance

cdsteinkuehler commented 1 year ago

Very little is needed to port to one of the other RPi variants, especially if you stick with one that can run 64-bit Linux (which the RPi 3 can). Mostly, you will just need to change the Linux kernel config / device-tree file and (maybe) the U-Boot config. You can compare the Buildroot default configurations for the RPi 3 vs. the RPi 4 and CM4 to see the differences (mainly the target CPU and the Linux default config to use). For U-Boot, I believe you can use the same rpi_arm64 defconfig that is used for the RPi4/CM4 unless you are wanting to use a 32-bit OS, but either way, mainline U-Boot has default configurations you can use. The U-Boot script for RAUC should not have to change, except possibly for filenames (eg: the dtb filename will probably be different) and you might need to tweak the Linux kernel command line arguments.

hrs11-95 commented 1 year ago

@cdsteinkuehler thanks for the update. I will try to adapt it for Pi 3 in the coming weeks.

I have one more question (not related to Pi 3): How can I set password for "user" during image build? I am trying to add password for user login

cdsteinkuehler commented 1 year ago

How can I set password for "user" during image build? I am trying to add password for user login

I refer you to the Buildroot documentation:

hrs11-95 commented 1 year ago

Hi @cdsteinkuehler thanks for the update.

Now I have set a password for "user".

According to Buildroot manual, If prefixed with !=, then the password will be crypt-encoded (using MD5) and login will be disabled.

What is meant by "login will be disabled"?

And should I also edit /etc/sudoers.d/user file?

cdsteinkuehler commented 1 year ago

According to Buildroot manual, If prefixed with !=, then the password will be crypt-encoded (using MD5) and login will be disabled.

What is meant by "login will be disabled"?

If you're building a Linux system from scratch, you should generally try to be aware of at least basic system administration tasks and concepts: https://serverfault.com/questions/886302/what-does-locking-a-password-using-passwd-l-mean

And should I also edit /etc/sudoers.d/user file?

I cannot answer that question for you. It depends on how you want your system to behave.

In my example images, I don't want root to be able to login at all, so the account is disabled with no password configured. I want the "user" user to be able to login without a password via the serial console and use sudo for system administration, so that's what I have setup. Your requirements are probably different, but you will need to determine what you want then consult Linux administration guides and the Buildroot documentation to setup everything to your liking.

hrs11-95 commented 1 year ago

Thanks for the input. Will close this ticket