Shipping different config.txt and cmdline.txt for CutiePi

I am trying to build image for CutiePi which is based on Raspberry PI 4 compute module. It turned out, that kernel contains probably all necessary modules already. I had to modify config.txt and cmdline.txt
I would like to use linux-rpi4 package, but I would like to replace those two files automatically. What way would you suggest?
I can fork the package, and change following script as needed

But I would like to avoid maintaining kernel package. I would rater ship small package which updates only *.txt files.

I am using the *.txt files from cutiepi images downloaded from

They are adding those options pi-gen_stage4.5-cutiepi/01-config.diff at main · cutiepi-io/pi-gen_stage4.5-cutiepi · GitHub

I would appreciate if you have a link to package which does something similar.

I am not sure why, but wifi doesn’t work in this configuration.

The cmdline.txt and config.txt files will not be changed if it’s already there. They will only get added by the kernel package, if they don’t exist. So if you install the your custom package with the .txt files before the kernel gets installed, it should keep those.

What wifi chip is on the I/O board.

1 Like

It seems, there are some sed substitutions which are updating config.txt. I have moved it to the end of list of packages and it seems to be working.

I am changing it as with this post_install scriptlet

For some reason lsblk doesn’t work properly for me now.
I doesn’t return PARTUUID

NAME   FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda                                           
`-sda1                            5.8G    80% /run/host/os-release
                                              /run/host/os-release
                                              /var/cache/pacman/pkg
                                              /
sr0                                           

Code was taken from

I am not sure what kind what is wrong, because even code in linux-rpi4 doesn’t create cmdline.txt anymore ;-(

The wifi is using brcmfmac driver. It seems it doesn’t work well with my AP (wpa2+wpa3 mode), but it works properly with other AP.

Not knowing what steps you have taken to get your issue I will say what I do know:

As @Strit stated the kernel .INSTALL will not not mess with the .txt files if they exist.

While building an image in a chroot with the manjaro-arm-tools using buildarmimage when the kernel gets installed it is unable to set the PARTUUID in cmdline.txt for some odd reason so it is done later on in the process with the funtions.sh script which is part of manjaro-arm-tools starting at this line:

https://gitlab.manjaro.org/manjaro-arm/applications/manjaro-arm-tools/-/blob/master/lib/functions.sh#L898

Also you might want to be aware that the package rpi-post-install sets the LABEL for the boot partition in /etc/fstab:

https://gitlab.manjaro.org/manjaro-arm/packages/community/rpi4-post-install/-/blob/master/rpi4-post-install.install#L6

3 Likes

Thanks for pointing to manjaro-arm-tools, that explains it.

Well, I am not an expert, but I think this part changes cmdline.txt:

In time of installation of packages the partition doesn’t exists yet. The pacman is invoked in nspwand chroot. The partitions are created later.

I am still wondering why is not possible to use root=LABEL=ROOT_MNJRO in cmdline.txt, that would be much easier.

It does only if a certain situation exists. That is there because RPi changed the way doing things with the newer kernels and it brings the cmdline.txt up to speed for the newer kernels if some one still had the config for the older kernels.

It used to be that way but there were conflicts in certain situations where you would wind up with 2 partitions with the same LABEL mounted.

I see. That makes sense.

My patches are attached in gitlab:

You should be good to go now. Thanks for adding cutie-pi support!!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.