Page MenuHomeFreeBSD

Add flashmap rootfs search function
AbandonedPublic

Authored by yamori813_yahoo.co.jp on Dec 27 2017, 8:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 8:24 AM
Unknown Object (File)
Dec 13 2023, 3:05 PM
Unknown Object (File)
Dec 12 2023, 7:56 PM
Unknown Object (File)
Dec 9 2023, 10:45 AM
Unknown Object (File)
Nov 26 2023, 5:15 AM
Unknown Object (File)
Nov 25 2023, 5:40 AM
Unknown Object (File)
Nov 23 2023, 3:55 PM
Unknown Object (File)
Nov 19 2023, 1:00 PM
Subscribers
None

Details

Summary

This code based geom_map.c. This function enable by kernel
option GEOM_FLASHMAP_ADJUST_BORDER.

Test Plan

RT3050 at sys/mips/mediatek code.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15954
Build 15946: arc lint + arc unit

Event Timeline

mizhka requested changes to this revision.Dec 27 2017, 12:46 PM

Hi,

Small cosmetic changes are required.
But I don't get idea why this marker lookup can't be done by flash_slicer code.
Could you please clarify benefit?

Thank you!

sys/geom/geom_flashmap.c
216–218

add declaration at top of file?

222

128 bytes on stack is not good, please malloc/free it.

258

bootverbose?

263

please prefix g_flashmap_%

This revision now requires changes to proceed.Dec 27 2017, 12:46 PM

If kernel configuration change and kernel size make big then std partition information is missing. In this case boot stop at mountroot. It's inconvenient. Non-FDT slicer geom_map have same function. I think more better this function set by FDT information than kernel option. But I don't know FDT access in geom code.

I think dts must not have kernel size because of it's change kernel configuration. This code separate to kernel and rootfs from firmware partition.

This is dts entory.

firmware: partition@50000 {
        label = "firmware";
        reg = <0x00050000 0x003b0000>;
        read-only;
};

This is boot log.

cfid0: slice 00050000-0015ffff: firmware (1087KB)
cfid0: slice 00160000-003fffff: rootfs (2687KB)

  • check 64K and 128K boundly. add comment and static
  • delete kernel option make to default
  • impliment of a few u-boot have space before header
In D13648#285288, @mizhka_gmail.com wrote:

Hi,

Small cosmetic changes are required.
But I don't get idea why this marker lookup can't be done by flash_slicer code.
Could you please clarify benefit?

Thank you!

I checked dev/bhnd/cores/chipc/chipc_slicer.c. This code on CFI or SPI low level driver code. General CFI and SPI driver code use not only u-boot. I think good that is not change CFE and SPI driver code. Also I think geom_flashmap change is more small side effect than flash_slicer change.

Now this patch is conflict. I hope some body make this future.