Skip to content

UBI: Wire-up fastmap in kernel instead of boot#1

Merged
Biktorgj merged 3 commits intothe-modem-distro:linux-3.18.140from
PsychoGame:fastmap-patches
Aug 4, 2021
Merged

UBI: Wire-up fastmap in kernel instead of boot#1
Biktorgj merged 3 commits intothe-modem-distro:linux-3.18.140from
PsychoGame:fastmap-patches

Conversation

@PsychoGame
Copy link
Contributor

Normally when fastmap is enabled in kernel configuration
it is compiled into the kernel, but disabled by default.
Only when setting kernel boot parameter fm_autoconvert
at boot to "1" it will convert all non fastmap images
to use fastmap.

To prevent cluttering up the kernel boot parameters, I've
hardcoded the fm_autoconvert, and the fm_debug (only debugging)
into the kernel build. Now you can set it at build time in
kernel configuration.

Normally when fastmap is enabled in kernel configuration
it is compiled into the kernel, but disabled by default.
Only when setting kernel boot parameter fm_autoconvert
at boot to "1" it will convert all non fastmap images
to use fastmap.

To prevent cluttering up the kernel boot parameters, I've
hardcoded the fm_autoconvert, and the fm_debug (only debugging)
into the kernel build. Now you can set it at build time in
kernel configuration.
@PsychoGame
Copy link
Contributor Author

This helps with the slow attaching of the ubiattach.
Should make it almost as quick in attaching the ubi image then it would take to mount a regular filesystem.
This makes it less necessary to explore options to use other filesystems as rootfs filesystem.

Compilation complains about fm_sem not being defined.
This error is valid, because in our sourcedrop it is called fm_eba_sem.
Probably Quectel changed some code to the ubi driver, because mainline
defines it as fm_sem as well.
But because fm_eba_sem has been used already in many places in the code
just change these over to fm_eba_sem as well. Is the easiest fix.
Another code clean-up to the UBI code.
In all code pnum is just used as plain "int pnum"
For some reason in the check_mapping function it is defined as
int *pnum, which it complains about as invalid operand.
Change all instances op *pnum to plain pnum, inline with the rest of the code.
@Biktorgj Biktorgj merged commit c17366e into the-modem-distro:linux-3.18.140 Aug 4, 2021
@Biktorgj
Copy link
Collaborator

Biktorgj commented Aug 4, 2021

I just reread your comment to remember this pull request... was just doing this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants