Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kgpe patch rebase #11

Merged
merged 8 commits into from
Feb 9, 2023
Merged

Kgpe patch rebase #11

merged 8 commits into from
Feb 9, 2023

Conversation

macpijan
Copy link

No description provided.

@macpijan macpijan changed the base branch from dasharo-develop to dasharo-release November 25, 2022 12:31
Add support for AST1100 and AST2400, available on ASUS KGPE-D16
Based originally on:
https://github.com/osresearch/heads/blob/master/patches/flashrom-b1f858f65b2abd276542650d8cb9e382da258967/0100-enable-kgpe-d16.patch

Change-Id: I7dce35b63c446562a057114d15e83f8a92892a85
Signed-off-by: Maciej Pijanowski <[email protected]>
Signed-off-by: Karol Zmyslowski <[email protected]>
@tlaurion
Copy link
Collaborator

tlaurion commented Dec 1, 2022

@macpijan
Changed flashrom module under Heads to point to dasharo/flashrom under https://github.com/osresearch/heads/pull/1251/files#diff-6d0b4e1894aad8cd0b15cbad038d61d88750b1def43a8aad4e54bcaf103efeb2R5-R9 to point to dasharo/flashrom 2ad07b2

Unfortunately, as opposed to dasharo/flashrom I previously tested under linuxboot/heads@f79100b in the progress of fixing linuxboot/heads#1230, which was building successfully at that time https://app.circleci.com/pipelines/github/tlaurion/heads/1232/workflows/de278590-3dd3-496e-b3c2-ca524f1845e3/jobs/11320/parallel-runs/0/steps/0-103, switching to 2ad07b2 is not building successfully, with the traces provided below.


As per 2ad07b2

Snippet of build error:

/root/project/crossgcc/ppc64/bin/powerpc64le-linux-musl-ar rcs libflashrom.a jedec.o stm50.o w39.o w29ee011.o sst28sf040.o 82802ab.o sst49lfxxxc.o sst_fwhub.o edi.o flashchips.o spi.o spi25.o spi25_statusreg.o spi95.o opaque.o sfdp.o en29lv640b.o at45db.o s25f.o writeprotect.o writeprotect_ranges.o ast1100.o dummyflasher.o linux_mtd.o pcidev.o libflashrom.o layout.o flashrom.o udelay.o parallel.o programmer.o programmer_table.o helpers.o helpers_fileio.o ich_descriptors.o fmap.o platform/endian_little.o platform/memaccess.o
ranlib libflashrom.a
/root/project/crossgcc/ppc64/bin/powerpc64le-linux-musl-gcc -fdebug-prefix-map=/root/project=heads -gno-record-gcc-switches -D__MUSL__ -isystem /root/project/install/ppc64/include -L/root/project/install/ppc64/lib  -o flashrom cli_classic.o cli_output.o cli_common.o print.o libflashrom.a -lrt
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_scu':
ast1100.c:(.text+0x2c): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x44): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x5c): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_smc':
ast1100.c:(.text+0xa8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xc0): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o):ast1100.c:(.text+0xd8): more undefined references to `mmio_le_writel' follow
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_enable_cpu':
ast1100.c:(.text+0x148): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x164): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_shutdown':
ast1100.c:(.text+0x1e0): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x1f8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x210): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x224): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x258): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x278): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x290): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x2a8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x2c0): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o):ast1100.c:(.text+0x2dc): more undefined references to `mmio_le_writel' follow
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_disable_cpu':
ast1100.c:(.text+0x33c): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x378): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x3a8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x3bc): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x3d8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_init_1':
ast1100.c:(.text+0x5d4): undefined reference to `rget_io_perms'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x640): undefined reference to `rphysmap'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x6b4): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x6e8): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x758): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x784): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x7ac): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x7d4): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x7e4): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_spi_send_command':
ast1100.c:(.text+0x904): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x92c): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x94c): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x97c): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x994): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x9b8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x9d4): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xa70): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xa98): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xab8): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xae0): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xb64): undefined reference to `mmio_le_writeb'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xbb4): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xbcc): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `undo_pci_write':
pcidev.c:(.text+0xdc): undefined reference to `pci_write_byte'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xf4): undefined reference to `pci_write_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x10c): undefined reference to `pci_write_long'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_shutdown':
pcidev.c:(.text+0x174): undefined reference to `pci_cleanup'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_readbar':
pcidev.c:(.text+0x1b8): undefined reference to `pci_read_byte'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x1e8): undefined reference to `pci_read_long'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x270): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_scandev':
pcidev.c:(.text+0x3d8): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x3f0): undefined reference to `pci_fill_info'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_card_find':
pcidev.c:(.text+0x458): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x484): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x49c): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_find':
pcidev.c:(.text+0x4f0): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_getdevfn':
pcidev.c:(.text+0x554): undefined reference to `pci_get_dev'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x568): undefined reference to `pci_fill_info'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_find_vendorclass':
pcidev.c:(.text+0x5b4): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x5dc): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pci_init_common':
pcidev.c:(.text+0x658): undefined reference to `pci_alloc'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x664): undefined reference to `pci_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x68c): undefined reference to `pci_scan_bus'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_init':
pcidev.c:(.text+0x6e8): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x714): undefined reference to `pci_filter_parse_slot'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x7b0): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x7c8): undefined reference to `pci_fill_info'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `rpci_write_byte':
pcidev.c:(.text+0x8ec): undefined reference to `pci_get_dev'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x90c): undefined reference to `pci_read_byte'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x938): undefined reference to `pci_write_byte'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `rpci_write_word':
pcidev.c:(.text+0x9c8): undefined reference to `pci_get_dev'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x9e8): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xa14): undefined reference to `pci_write_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `rpci_write_long':
pcidev.c:(.text+0xaa4): undefined reference to `pci_get_dev'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xac4): undefined reference to `pci_read_long'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xaf0): undefined reference to `pci_write_long'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pci_dev_find_vendorclass':
pcidev.c:(.text+0xb38): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xb64): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xb84): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pci_dev_find':
pcidev.c:(.text+0xbd8): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xc14): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pci_card_find':
pcidev.c:(.text+0xc64): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xc94): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xcb4): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xccc): undefined reference to `pci_read_word'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1023: flashrom] Error 1
make[1]: Leaving directory '/root/project/build/ppc64/flashrom-2ad07b2e0b2c3a3b4687fb670ba709d0da24b38b'

log tarballs are available as artifacts under CircleCI for 30 days:

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 1, 2022

The cache used by CircleCI was second level (musl-cross-make + coreboot cache): https://app.circleci.com/pipelines/github/tlaurion/heads/1277/workflows/13fbc913-b2f5-487a-b359-8e09af2d49ec/jobs/12701/parallel-runs/0/steps/0-108 since only submodules definitions changed, trying to reuse biggest cache possible to reduce build time only building for modules, not musl-cross-make and coreboot's musl-cross's buildstack, but failed.

Removing CircleCI project's CACHE_VERSION's environmenet variable to test a clean build from source without any cache layer. (I doubt it will change anything, but this will make sure of it without needing to exchange too much and exposing directly log traces for everything happening in the build).

CircleCI Builds for PR linuxboot/heads#1251 can be compared under https://app.circleci.com/pipelines/github/tlaurion/heads?branch=dasharo_flashrom_test

https://app.circleci.com/pipelines/github/tlaurion/heads/1277/workflows/bb2d24a9-7f4d-47dd-9f22-c496765ab917 is building from source without any cache.

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 1, 2022

https://app.circleci.com/pipelines/github/tlaurion/heads/1277/workflows/bb2d24a9-7f4d-47dd-9f22-c496765ab917 is building from source without any cache.

@macpijan @3mdeb-karolzmyslowski : same result when built from checkout without cache as can be seen under https://app.circleci.com/pipelines/github/tlaurion/heads/1277/workflows/bb2d24a9-7f4d-47dd-9f22-c496765ab917/jobs/12705?invite=true#step-103-1572 with same build errors as already reported under previous comment at #11 (comment)

The same build recipe (as per module) is used as before https://github.com/osresearch/heads/blob/61f72f8d512fd9459cba8158a521875eb62a7959/modules/flashrom#L11-L38:

# Default options for flashrom
flashrom_cfg := \
	WARNERROR=no \
	CONFIG_NOTHING=yes \
	CONFIG_INTERNAL=yes \
	CONFIG_DUMMY=yes \
	CONFIG_AST1100=yes \


ifeq "$(CONFIG_TARGET_ARCH)" "ppc64"
flashrom_cfg := \
	WARNERROR=no \
	CONFIG_NOTHING=yes \
	CONFIG_LINUX_MTD=yes \
	CONFIG_DUMMY=yes \
	CONFIG_AST1100=yes
endif


flashrom_target := \
	$(MAKE_JOBS) \
	$(CROSS_TOOLS) \
	$(flashrom_cfg)


flashrom_output := \
	flashrom


flashrom_libraries := \


flashrom_configure := 

@macpijan
Copy link
Author

macpijan commented Dec 1, 2022

Thanks, I'll see if it can be reproduced locally with heads toolchain, as the build passed for me as well when building flashrom locally under Ubuntu 22.04 default toolchain

./flashrom --list-supported | grep ast
satasii, ast1100, ast2400, atavia, it8212, ft2232_spi, serprog, buspirate_spi,

@macpijan
Copy link
Author

macpijan commented Dec 1, 2022

I can confirm that 9bddf6233d8eda26b0cbc508745fc9a7738c9e73 compiled correctly locally with heads toolchain, while the 2ad07b2e0b2c3a3b4687fb670ba709d0da24b38b has not, with similar erros as linked.

Change-Id: Ie355daf467b1e50b7a71e3512f908cbd0176e0e7
Signed-off-by: Maciej Pijanowski <[email protected]>
@macpijan
Copy link
Author

macpijan commented Dec 1, 2022

With this the errors in ast files went away.

The remaining problems with pcidev.c look like pciutils bug when building with LTO (?) https://bugs.gentoo.org/640836

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 1, 2022

With this the errors in ast files went away.

The remaining problems with pcidev.c look like pciutils bug when building with LTO (?) https://bugs.gentoo.org/640836

No LTO building here. I wish though. :)

tlaurion added a commit to tlaurion/heads that referenced this pull request Dec 1, 2022
@tlaurion
Copy link
Collaborator

tlaurion commented Dec 1, 2022

@macpijan : Have updated build which are happening on top of musl-cross-cache, which builds output will show success/fail and permit me to see pending errors that you are talking about on which we will be able to talk about, pointing to lines from the build output to reduce ping pong time and work more efficiently under:
https://app.circleci.com/pipelines/github/tlaurion/heads?branch=dasharo_flashrom_test

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 1, 2022

https://app.circleci.com/pipelines/github/tlaurion/heads/1280/workflows/87b3b0e8-ef41-433e-9a96-018119b269bf/jobs/12749?invite=true#step-103-1473

/root/project/crossgcc/ppc64/bin/powerpc64le-linux-musl-ar rcs libflashrom.a jedec.o stm50.o w39.o w29ee011.o sst28sf040.o 82802ab.o sst49lfxxxc.o sst_fwhub.o edi.o flashchips.o spi.o spi25.o spi25_statusreg.o spi95.o opaque.o sfdp.o en29lv640b.o at45db.o s25f.o writeprotect.o writeprotect_ranges.o ast1100.o dummyflasher.o linux_mtd.o pcidev.o libflashrom.o layout.o flashrom.o udelay.o parallel.o programmer.o programmer_table.o helpers.o helpers_fileio.o ich_descriptors.o fmap.o platform/endian_little.o platform/memaccess.o
ranlib libflashrom.a
/root/project/crossgcc/ppc64/bin/powerpc64le-linux-musl-gcc -fdebug-prefix-map=/root/project=heads -gno-record-gcc-switches -D__MUSL__ -isystem /root/project/install/ppc64/include -L/root/project/install/ppc64/lib  -o flashrom cli_classic.o cli_output.o cli_common.o print.o libflashrom.a -lrt
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_scu':
ast1100.c:(.text+0x2c): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x44): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x5c): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_smc':
ast1100.c:(.text+0xa8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xc0): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o):ast1100.c:(.text+0xd8): more undefined references to `mmio_le_writel' follow
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_enable_cpu':
ast1100.c:(.text+0x148): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x164): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_shutdown':
ast1100.c:(.text+0x1e0): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x1f8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x210): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x224): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x258): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x278): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x290): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x2a8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x2c0): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o):ast1100.c:(.text+0x2dc): more undefined references to `mmio_le_writel' follow
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_disable_cpu':
ast1100.c:(.text+0x33c): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x378): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x3a8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x3bc): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x3d8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_init_1':
ast1100.c:(.text+0x5d4): undefined reference to `rget_io_perms'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x640): undefined reference to `rphysmap'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x6b4): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x6e8): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x758): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x784): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x7ac): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x7d4): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x7e4): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_spi_send_command':
ast1100.c:(.text+0x904): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x92c): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x94c): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x97c): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x994): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x9b8): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0x9d4): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xa70): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xa98): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xab8): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xae0): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xb64): undefined reference to `mmio_le_writeb'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xbb4): undefined reference to `mmio_le_writel'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: ast1100.c:(.text+0xbcc): undefined reference to `mmio_le_readl'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `undo_pci_write':
pcidev.c:(.text+0xdc): undefined reference to `pci_write_byte'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xf4): undefined reference to `pci_write_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x10c): undefined reference to `pci_write_long'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_shutdown':
pcidev.c:(.text+0x174): undefined reference to `pci_cleanup'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_readbar':
pcidev.c:(.text+0x1b8): undefined reference to `pci_read_byte'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x1e8): undefined reference to `pci_read_long'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x270): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_scandev':
pcidev.c:(.text+0x3d8): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x3f0): undefined reference to `pci_fill_info'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_card_find':
pcidev.c:(.text+0x458): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x484): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x49c): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_find':
pcidev.c:(.text+0x4f0): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_getdevfn':
pcidev.c:(.text+0x554): undefined reference to `pci_get_dev'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x568): undefined reference to `pci_fill_info'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_find_vendorclass':
pcidev.c:(.text+0x5b4): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x5dc): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pci_init_common':
pcidev.c:(.text+0x658): undefined reference to `pci_alloc'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x664): undefined reference to `pci_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x68c): undefined reference to `pci_scan_bus'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pcidev_init':
pcidev.c:(.text+0x6e8): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x714): undefined reference to `pci_filter_parse_slot'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x7b0): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x7c8): undefined reference to `pci_fill_info'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `rpci_write_byte':
pcidev.c:(.text+0x8ec): undefined reference to `pci_get_dev'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x90c): undefined reference to `pci_read_byte'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x938): undefined reference to `pci_write_byte'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `rpci_write_word':
pcidev.c:(.text+0x9c8): undefined reference to `pci_get_dev'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0x9e8): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xa14): undefined reference to `pci_write_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `rpci_write_long':
pcidev.c:(.text+0xaa4): undefined reference to `pci_get_dev'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xac4): undefined reference to `pci_read_long'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xaf0): undefined reference to `pci_write_long'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pci_dev_find_vendorclass':
pcidev.c:(.text+0xb38): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xb64): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xb84): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pci_dev_find':
pcidev.c:(.text+0xbd8): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xc14): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: libflashrom.a(pcidev.o): in function `pci_card_find':
pcidev.c:(.text+0xc64): undefined reference to `pci_filter_init'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xc94): undefined reference to `pci_filter_match'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xcb4): undefined reference to `pci_read_word'
/root/project/crossgcc/ppc64/bin/../lib/gcc/powerpc64le-linux-musl/8.3.0/../../../../powerpc64le-linux-musl/bin/ld: pcidev.c:(.text+0xccc): undefined reference to `pci_read_word'
collect2: error: ld returned 1 exit status

Change-Id: I3eba9bf58ebfdf02dc3c8c54643c09f0a9a0a53f
Signed-off-by: Maciej Pijanowski <[email protected]>
@macpijan
Copy link
Author

macpijan commented Dec 1, 2022

Ok, I guess my last change makes no sense and could not help here.
What's problematic is the lack of PCI library I guess: Dependency libpci found: no (?)

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 2, 2022

@macpijan

Ok, I guess my last change makes no sense and could not help here. What's problematic is the lack of PCI library I guess: Dependency libpci found: no (?)

Means something changed recently and that some static configuration needs to be provided under modules/flashrom.

user@heads-tests:~/heads$ ls install/x86/lib/libpci.so*
install/x86/lib/libpci.so  install/x86/lib/libpci.so.3	install/x86/lib/libpci.so.3.5.4

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 2, 2022

@macpijan agreed

Dependency libpci found: no Dependency libusb1 found: yes 1.0.24 CFLAGS: -I/usr/include/libusb-1.0 LDFLAGS: -lusb-1.0 -ludev -lpthread Dependency libjaylink found: no Dependency NI-845x found: no Dependency libftdi1 found: no Checking for header "mtd/mtd-user.h": yes Checking for header "linux/spi/spidev.h": yes Checking for header "linux/i2c-dev.h": yes Checking for header "linux/i2c.h": yes Checking for header "sys/utsname.h": yes Checking for function "clock_gettime": yes Checking for external "librt": yes The following features are unavailable on your machine: CONFIG_AST1100=yes exit 1 

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 2, 2022

@macpijan agreed

Dependency libpci found: no Dependency libusb1 found: yes 1.0.24 CFLAGS: -I/usr/include/libusb-1.0 LDFLAGS: -lusb-1.0 -ludev -lpthread Dependency libjaylink found: no Dependency NI-845x found: no Dependency libftdi1 found: no Checking for header "mtd/mtd-user.h": yes Checking for header "linux/spi/spidev.h": yes Checking for header "linux/i2c-dev.h": yes Checking for header "linux/i2c.h": yes Checking for header "sys/utsname.h": yes Checking for function "clock_gettime": yes Checking for external "librt": yes The following features are unavailable on your machine: CONFIG_AST1100=yes exit 1 

Found the solution for the above problem related to Heads and pkg-config:

diff --git a/modules/flashrom b/modules/flashrom
index 68a2abd9..57e0f610 100644
--- a/modules/flashrom
+++ b/modules/flashrom
@@ -2,14 +2,15 @@ modules-$(CONFIG_FLASHROM) += flashrom
 
 flashrom_depends := pciutils $(musl_dep)
 
-flashrom_version := 5111246d8dab57249148e08509b58e9f82056521
+flashrom_version := fdaf4c8797e671f46c17d30769c6601140de82e8
 flashrom_dir := flashrom-$(flashrom_version)
 flashrom_tar := $(flashrom_dir).tar.gz
 flashrom_url := https://github.com/Dasharo/flashrom/archive/$(flashrom_version).tar.gz
-flashrom_hash := ed36cd80c468f99680092cc009520ab301922b97e63d96936ac0b44831f6573a
+flashrom_hash := 838d37149149d901a9391fd58d60d04371d237e74a66f384d0440d90e9654ada
 
 # Default options for flashrom
 flashrom_cfg := \
+       LIBS_BASE="$(INSTALL)" \
        WARNERROR=no \
        CONFIG_NOTHING=yes \
        CONFIG_INTERNAL=yes \

Which now gives the same result from local build as with Heads crossbuild:

user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ sudo apt install libpci-dev
user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ make clean
make: ./util/getrevision.sh: No such file or directory
rm -f flashrom flashrom.exe libflashrom.a  \
	flashrom.8 flashrom.8.html build_details.txt
make[1]: Entering directory '/home/user/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8/util/ich_descriptors_tool'
rm -f ich_descriptors_tool ich_descriptors_tool.exe
rm -rf .dep .obj
make[1]: Leaving directory '/home/user/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8/util/ich_descriptors_tool'
user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ make WARNERROR=no CONFIG_NOTHING=yes CONFIG_INTERNAL=yes CONFIG_DUMMY=yes CONFIG_AST1100=yes
make: ./util/getrevision.sh: No such file or directory
make: ./util/getrevision.sh: No such file or directory
Building flashrom version
C compiler found: cc (Debian 10.2.1-6) 10.2.1 20210110
Target arch: x86
Target OS: Linux
Target endian: little
Dependency libpci found: yes 3.7.0
  Checking for old "pci_get_dev()": no
  CFLAGS: -I/usr/include/x86_64-linux-gnu
  LDFLAGS: -lpci -lz -lresolv -ludev
Dependency libusb1 found: yes 1.0.24
  CFLAGS: -I/usr/include/libusb-1.0
  LDFLAGS: -lusb-1.0 -ludev -lpthread
Dependency libjaylink found: no
Dependency NI-845x found: no
Dependency libftdi1 found: no
Checking for header "mtd/mtd-user.h": yes
Checking for header "linux/spi/spidev.h": yes
Checking for header "linux/i2c-dev.h": yes
Checking for header "linux/i2c.h": yes
Checking for header "sys/utsname.h": yes
Checking for function "clock_gettime": yes
Checking for external "librt": yes
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o cli_classic.o -c cli_classic.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o cli_output.o -c cli_output.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o cli_common.o -c cli_common.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o print.o -c print.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o jedec.o -c jedec.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o stm50.o -c stm50.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o w39.o -c w39.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o w29ee011.o -c w29ee011.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o sst28sf040.o -c sst28sf040.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o 82802ab.o -c 82802ab.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o sst49lfxxxc.o -c sst49lfxxxc.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o sst_fwhub.o -c sst_fwhub.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o edi.o -c edi.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o flashchips.o -c flashchips.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o spi.o -c spi.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o spi25.o -c spi25.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o spi25_statusreg.o -c spi25_statusreg.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o spi95.o -c spi95.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o opaque.o -c opaque.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o sfdp.o -c sfdp.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o en29lv640b.o -c en29lv640b.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o at45db.o -c at45db.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o s25f.o -c s25f.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o writeprotect.o -c writeprotect.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o writeprotect_ranges.o -c writeprotect_ranges.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o ast1100.o -c ast1100.c
ast1100.c: In function 'ast1100_init_1':
ast1100.c:265:6: warning: implicit declaration of function 'rget_io_perms' [-Wimplicit-function-declaration]
  265 |  if (rget_io_perms())
      |      ^~~~~~~~~~~~~
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o dummyflasher.o -c dummyflasher.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o pcidev.o -c pcidev.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o libflashrom.o -c libflashrom.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o layout.o -c layout.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o flashrom.o -c flashrom.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o udelay.o -c udelay.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o parallel.o -c parallel.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o programmer.o -c programmer.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o programmer_table.o -c programmer_table.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o helpers.o -c helpers.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o helpers_fileio.o -c helpers_fileio.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o ich_descriptors.o -c ich_descriptors.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o fmap.o -c fmap.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o platform/endian_little.o -c platform/endian_little.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'CONFIG_DUMMY=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o platform/memaccess.o -c platform/memaccess.c
ar rcs libflashrom.a jedec.o stm50.o w39.o w29ee011.o sst28sf040.o 82802ab.o sst49lfxxxc.o sst_fwhub.o edi.o flashchips.o spi.o spi25.o spi25_statusreg.o spi95.o opaque.o sfdp.o en29lv640b.o at45db.o s25f.o writeprotect.o writeprotect_ranges.o ast1100.o dummyflasher.o pcidev.o libflashrom.o layout.o flashrom.o udelay.o parallel.o programmer.o programmer_table.o helpers.o helpers_fileio.o ich_descriptors.o fmap.o platform/endian_little.o platform/memaccess.o
ranlib libflashrom.a
cc -o flashrom cli_classic.o cli_output.o cli_common.o print.o libflashrom.a -lpci -lz -lresolv -ludev -lrt
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_smc.isra.0':
ast1100.c:(.text+0x12): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x2a): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_scu.isra.0':
ast1100.c:(.text+0x59): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x71): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_disable_cpu.part.0':
ast1100.c:(.text+0x9e): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0xc7): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0xf4): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x107): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x127): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_enable_cpu.isra.0':
ast1100.c:(.text+0x156): undefined reference to `mmio_le_readl'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_spi_send_command':
ast1100.c:(.text+0x1d6): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x1f6): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x211): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x231): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x246): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x265): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x27d): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x322): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x349): undefined reference to `mmio_le_writeb'
/usr/bin/ld: ast1100.c:(.text+0x370): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x401): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x421): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x43c): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x45f): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_shutdown':
ast1100.c:(.text+0x4d1): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x4e9): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x501): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x514): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x54c): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x564): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x57c): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x594): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x5ac): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o):ast1100.c:(.text+0x5c1): more undefined references to `mmio_le_writel' follow
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_init_1':
ast1100.c:(.text+0x739): undefined reference to `rget_io_perms'
/usr/bin/ld: ast1100.c:(.text+0x7a4): undefined reference to `rphysmap'
/usr/bin/ld: ast1100.c:(.text+0x818): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x84c): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x8bc): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x8ec): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x919): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x93b): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x94e): undefined reference to `mmio_le_readl'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_smc.isra.0':
ast1100.c:(.text+0x43): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_scu.isra.0':
ast1100.c:(.text+0x8a): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_enable_cpu.isra.0':
ast1100.c:(.text+0x172): undefined reference to `mmio_le_writel'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1025: flashrom] Error 1

Note that fdaf4c8 is being used here, and that #include "hwaccess_physmap.h" is present under ast1100.c

Some unrelated work will be needed under Heads once mmio_le_writel and mmio_le_readl rphysmap mmio_le_writeb rphysmap mmio_le_readl can be found correctly...

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 2, 2022

@macpijan : Some more progress, invalidating past reply here: Seems like the make statement is the one creating problems!

make WARNERROR=no CONFIG_NOTHING=yes CONFIG_INTERNAL=yes CONFIG_DUMMY=yes CONFIG_AST1100=yes
fails
while
make WARNERROR=no CONFIG_INTERNAL=yes CONFIG_DUMMY=yes CONFIG_AST1100=yes is successful.

Any idea why this happens?

The idea behind stating CONFIG_NOTHING=yes is to limit per config what is to be packaged inside of the binary and then select what we want to include in it.


user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ make clean
user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ make WARNERROR=no CONFIG_NOTHING=yes CONFIG_INTERNAL=yes CONFIG_DUMMY=yes 
user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ ls -alh flashrom
-rwxr-xr-x 1 user user 705K Dec  2 12:10 flashrom

user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ make clean
user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ make WARNERROR=no CONFIG_AST1100=yes
user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ ls -alh flashrom
-rwxr-xr-x 1 user user 1.1M Dec  2 12:12 flashrom
user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ make clean
user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ make WARNERROR=no
user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ ls -alh flashrom
-rwxr-xr-x 1 user user 1.1M Dec  2 12:13 flashrom

But CONFIG_NOTHING cannot be combined to ASTs:

user@heads-tests:~/heads/build/x86/flashrom-fdaf4c8797e671f46c17d30769c6601140de82e8$ make WARNERROR=no CONFIG_NOTHING=yes CONFIG_AST1100=yes
make: ./util/getrevision.sh: No such file or directory
make: ./util/getrevision.sh: No such file or directory
Building flashrom version
C compiler found: cc (Debian 10.2.1-6) 10.2.1 20210110
Target arch: x86
Target OS: Linux
Target endian: little
Dependency libpci found: yes 3.7.0
  Checking for old "pci_get_dev()": no
  CFLAGS: -I/usr/include/x86_64-linux-gnu
  LDFLAGS: -lpci -lz -lresolv -ludev
Dependency libusb1 found: yes 1.0.24
  CFLAGS: -I/usr/include/libusb-1.0
  LDFLAGS: -lusb-1.0 -ludev -lpthread
Dependency libjaylink found: no
Dependency NI-845x found: no
Dependency libftdi1 found: no
Checking for header "mtd/mtd-user.h": yes
Checking for header "linux/spi/spidev.h": yes
Checking for header "linux/i2c-dev.h": yes
Checking for header "linux/i2c.h": yes
Checking for header "sys/utsname.h": yes
Checking for function "clock_gettime": yes
Checking for external "librt": yes
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o cli_classic.o -c cli_classic.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o cli_output.o -c cli_output.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o cli_common.o -c cli_common.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o print.o -c print.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o jedec.o -c jedec.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o stm50.o -c stm50.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o w39.o -c w39.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o w29ee011.o -c w29ee011.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o sst28sf040.o -c sst28sf040.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o 82802ab.o -c 82802ab.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o sst49lfxxxc.o -c sst49lfxxxc.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o sst_fwhub.o -c sst_fwhub.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o edi.o -c edi.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o flashchips.o -c flashchips.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o spi.o -c spi.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o spi25.o -c spi25.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o spi25_statusreg.o -c spi25_statusreg.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o spi95.o -c spi95.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o opaque.o -c opaque.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o sfdp.o -c sfdp.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o en29lv640b.o -c en29lv640b.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o at45db.o -c at45db.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o s25f.o -c s25f.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o writeprotect.o -c writeprotect.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o writeprotect_ranges.o -c writeprotect_ranges.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o ast1100.o -c ast1100.c
ast1100.c: In function 'ast1100_init_1':
ast1100.c:265:6: warning: implicit declaration of function 'rget_io_perms' [-Wimplicit-function-declaration]
  265 |  if (rget_io_perms())
      |      ^~~~~~~~~~~~~
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o pcidev.o -c pcidev.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o libflashrom.o -c libflashrom.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o layout.o -c layout.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o flashrom.o -c flashrom.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o udelay.o -c udelay.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o parallel.o -c parallel.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o programmer.o -c programmer.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o programmer_table.o -c programmer_table.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o helpers.o -c helpers.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o helpers_fileio.o -c helpers_fileio.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o ich_descriptors.o -c ich_descriptors.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o fmap.o -c fmap.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o platform/endian_little.o -c platform/endian_little.c
cc -MMD -Os -Wall -Wextra -Wno-unused-parameter -Wshadow -Wmissing-prototypes -Wwrite-strings -Iinclude -I/usr/include/x86_64-linux-gnu   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_INTERNAL_DMI=1' -D'CONFIG_AST1100=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION=""' -o platform/memaccess.o -c platform/memaccess.c
ar rcs libflashrom.a jedec.o stm50.o w39.o w29ee011.o sst28sf040.o 82802ab.o sst49lfxxxc.o sst_fwhub.o edi.o flashchips.o spi.o spi25.o spi25_statusreg.o spi95.o opaque.o sfdp.o en29lv640b.o at45db.o s25f.o writeprotect.o writeprotect_ranges.o ast1100.o pcidev.o libflashrom.o layout.o flashrom.o udelay.o parallel.o programmer.o programmer_table.o helpers.o helpers_fileio.o ich_descriptors.o fmap.o platform/endian_little.o platform/memaccess.o
ranlib libflashrom.a
cc -o flashrom cli_classic.o cli_output.o cli_common.o print.o libflashrom.a -lpci -lz -lresolv -ludev -lrt
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_smc.isra.0':
ast1100.c:(.text+0x12): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x2a): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_scu.isra.0':
ast1100.c:(.text+0x59): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x71): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_disable_cpu.part.0':
ast1100.c:(.text+0x9e): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0xc7): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0xf4): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x107): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x127): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_enable_cpu.isra.0':
ast1100.c:(.text+0x156): undefined reference to `mmio_le_readl'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_spi_send_command':
ast1100.c:(.text+0x1d6): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x1f6): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x211): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x231): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x246): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x265): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x27d): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x322): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x349): undefined reference to `mmio_le_writeb'
/usr/bin/ld: ast1100.c:(.text+0x370): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x401): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x421): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x43c): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x45f): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_shutdown':
ast1100.c:(.text+0x4d1): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x4e9): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x501): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x514): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x54c): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x564): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x57c): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x594): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x5ac): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o):ast1100.c:(.text+0x5c1): more undefined references to `mmio_le_writel' follow
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_init_1':
ast1100.c:(.text+0x739): undefined reference to `rget_io_perms'
/usr/bin/ld: ast1100.c:(.text+0x7a4): undefined reference to `rphysmap'
/usr/bin/ld: ast1100.c:(.text+0x818): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x84c): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x8bc): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x8ec): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x919): undefined reference to `mmio_le_readl'
/usr/bin/ld: ast1100.c:(.text+0x93b): undefined reference to `mmio_le_writel'
/usr/bin/ld: ast1100.c:(.text+0x94e): undefined reference to `mmio_le_readl'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_smc.isra.0':
ast1100.c:(.text+0x43): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_set_a2b_bridge_scu.isra.0':
ast1100.c:(.text+0x8a): undefined reference to `mmio_le_writel'
/usr/bin/ld: libflashrom.a(ast1100.o): in function `ast1100_enable_cpu.isra.0':
ast1100.c:(.text+0x172): undefined reference to `mmio_le_writel'
collect2: error: ld returned 1 exit status
make: *** [Makefile:1025: flashrom] Error 1

@tlaurion
Copy link
Collaborator

tlaurion commented Dec 2, 2022

Not sure why AST11000 would be included for PPC64, where my understanding is that only MTD is required under Heads?
(Outside of testing build as of now, I mean....)

@SergiiDmytruk This is under Heads master:

ifeq "$(CONFIG_TARGET_ARCH)" "ppc64"
flashrom_cfg := \
        WARNERROR=no \
        CONFIG_NOTHING=yes \
        CONFIG_LINUX_MTD=yes \
        CONFIG_DUMMY=yes \
        CONFIG_AST1100=yes
endif

@SergiiDmytruk
Copy link
Member

@tlaurion I probably just did minimal change to the configuration. AST1100 can be dropped.

@tlaurion
Copy link
Collaborator

@macpijan : Some more progress, invalidating past reply here: Seems like the make statement is the one creating problems!

make WARNERROR=no CONFIG_NOTHING=yes CONFIG_INTERNAL=yes CONFIG_DUMMY=yes CONFIG_AST1100=yes fails while make WARNERROR=no CONFIG_INTERNAL=yes CONFIG_DUMMY=yes CONFIG_AST1100=yes is successful.

Any idea why this happens?

@macpijan : any progress on #11 (comment) ?

@macpijan
Copy link
Author

@3mdeb-karolzmyslowski

Please try with following diff:

diff --git a/Makefile b/Makefile
index 67a2ac9eef9f..0321d8b44468 100644
--- a/Makefile
+++ b/Makefile
@@ -110,6 +110,8 @@ DEPENDS_ON_BITBANG_SPI := \
        CONFIG_RAYER_SPI \
 
 DEPENDS_ON_RAW_MEM_ACCESS := \
+       CONFIG_AST1100 \
+       CONFIG_AST2400 \
        CONFIG_ATAPROMISE \
        CONFIG_DRKAISER \
        CONFIG_GFXNVIDIA \

I think it should help for the mmio stuff.

There is still one error left for me, causing the compilation to fail.

ast1100.c: In function 'ast1100_init_1':
ast1100.c:264:13: warning: implicit declaration of function 'rget_io_perms' [-Wimplicit-function-declaration]
  264 |         if (rget_io_perms())
      |             ^~~~~~~~~~~~~

@macpijan
Copy link
Author

macpijan commented Dec 21, 2022

The above one is fixed by reverting this commit: git revert 5111246d8dab and then by adding ASTs to DEPENDS_ON_X86_PORT_IO as well.

Although, I'm not sure how it would work for the POWER case 🤷‍♂️

@tlaurion
Copy link
Collaborator

Although, I'm not sure how it would work for the POWER case 🤷‍♂️

#11 (comment) ?

@macpijan
Copy link
Author

Yeah, I just though that at some point we wanted to use the ast2400 driver, which is present on the Raptor, I believe. If not there is no problem of course.

@tlaurion
Copy link
Collaborator

@macpijan

Something isn't right in verbose output (-V -o) printing

20230130_130839_5696562405457175158

The redirection from flashrom -p internal -V -o /tmp/test.log

cat /tmp/test.log| wc -l 
393458

grep HSFC /tmp/test.log | wc -l
393283

I hacked around flash.sh to export the flashrom_progress function and sourced it.
Without those HSFC lines in the log, everything works as expected:
20230130_132906_1273155261118266708

The culprit is at

flashrom/ichspi.c

Lines 482 to 483 in 1011196

msg_pdbg("HSFC: ");
pprint_reg(HSFC, FGO, reg_val, ", ");

Please poke me when this debugging output is removed to not cause regression.

Sidenote: flashrom --progress is not working, which would be helpful to not have to hack around it as we currently do.

[WORKAROUND]

Due to the fact that --progress is broken, heads relies on debug output
to track the progress.

This call makes the debug output so much cluttered.

See:
#11 (comment)

Change-Id: Icd0f7de8a59382a4cf89afc63150ab1e7ca308dd
Signed-off-by: Maciej Pijanowski <[email protected]>
@macpijan
Copy link
Author

Please poke me when this debugging output is removed to not cause regression.

Do you mean something like this:

82f021e

I am not a huge fan of this, though. Maybe this belongs more as a heads patch, if is specific for heads workaround.

Sidenote: flashrom --progress is not working, which would be helpful to not have to hack around it as we currently do.

What can I say about that...

Was it this ticket, or some other one: https://ticket.coreboot.org/issues/390 ?

tlaurion added a commit to tlaurion/heads that referenced this pull request Jan 30, 2023
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41

NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
Attempt to get successful builds for Dasharo/flashrom#11

CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested.
Bug upstream which is not tested against NOTHING

Collaboration happened under Dasharo/flashrom#11
@tlaurion
Copy link
Collaborator

tlaurion commented Jan 30, 2023

Please poke me when this debugging output is removed to not cause regression.

Do you mean something like this:

82f021e

Yes. Rebuilding under Heads pointing to that commit.

I am not a huge fan of this, though. Maybe this belongs more as a heads patch, if is specific for heads workaround.

In what case are those lines helpful to be printed in verbose mode? If it is useful then Heads can have patch against this... Let me know.

Sidenote: flashrom --progress is not working, which would be helpful to not have to hack around it as we currently do.

What can I say about that...

Was it this ticket, or some other one: https://ticket.coreboot.org/issues/390 ?

It was referred linuxboot/heads#1222 (comment) and addressed under linuxboot/heads#1230 (comment) where flashrom master provides progress output, while imperfect. Yes, upstream problem is under https://ticket.coreboot.org/issues/390, fixed under 1.3 https://review.coreboot.org/c/flashrom/+/69283 and https://review.coreboot.org/c/flashrom/+/49643 (untested on my side)

@macpijan
Copy link
Author

Yes. Rebuilding under Heads pointing to that commit.

👍

In what case are those lines helpful to be printed in verbose mode? If it is useful then Heads can have patch against this... Let me know.

Let's start with this patch here (as it is already done) and we will see.

Yes, upstream problem is under https://ticket.coreboot.org/issues/390, fixed under 1.3 https://review.coreboot.org/c/flashrom/+/69283 and https://review.coreboot.org/c/flashrom/+/49643 (untested on my side)

If fixed upstream, we can try to rebase here and keep testing ;)

tlaurion added a commit to tlaurion/heads that referenced this pull request Jan 31, 2023
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41

NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
Attempt to get successful builds for Dasharo/flashrom#11

CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested.
Bug upstream which is not tested against NOTHING

Collaboration happened under Dasharo/flashrom#11
@tlaurion
Copy link
Collaborator

tlaurion commented Jan 31, 2023

@macpijan 82f021ec1e5677aec4c98352cf52695d82a0fb41 caused no regression flashing with flashrom_progress parsing verbose logs!

@macpijan macpijan merged commit 6b2061b into dasharo-release Feb 9, 2023
@macpijan macpijan deleted the kgpe-patch-rebase branch February 9, 2023 09:43
@macpijan
Copy link
Author

macpijan commented Feb 9, 2023

In such a case, I will go ahead and merge. We might try to rebase to latest flashrom on next release, or so.

tlaurion added a commit to tlaurion/heads that referenced this pull request Feb 19, 2023
… to test https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase

Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening

Changes:
- "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore
- To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install
- INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable  to build properly
- flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
tlaurion added a commit to tlaurion/heads that referenced this pull request Feb 19, 2023
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41

NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
Attempt to get successful builds for Dasharo/flashrom#11

CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested.
Bug upstream which is not tested against NOTHING

Collaboration happened under Dasharo/flashrom#11
tlaurion added a commit to tlaurion/heads that referenced this pull request Feb 22, 2023
… to test https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase

Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening

Changes:
- "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore
- To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install
- INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable  to build properly
- flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
tlaurion added a commit to tlaurion/heads that referenced this pull request Feb 22, 2023
…asharo/flashrom commit Dasharo/flashrom@6b2061b

NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
Attempt to get successful builds for Dasharo/flashrom#11

CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested.
Bug upstream which is not tested against NOTHING

Collaboration happened under Dasharo/flashrom#11
tlaurion added a commit to tlaurion/heads that referenced this pull request Feb 22, 2023
…11246 from work under  https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase

Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening

Changes:
- "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore
- ~To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install~ fixed upstream in previous commits
- INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable  to build properly
- flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
- flashrom ppc64: remove ast2400 and dummy, leaving NOTHING+MTD only

NOTES:
- newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
- CONFIG_INTERNAL is not enough to have internal programmer anymore on x86. CONFIG_INTERNAL_X86 also needs to be requested.

Collaboration happened under Dasharo/flashrom#11
tlaurion added a commit to tlaurion/heads that referenced this pull request Feb 22, 2023
… to test https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase

Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening

Changes:
- "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore
- To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install
- INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable  to build properly
- flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
tlaurion added a commit to tlaurion/heads that referenced this pull request Feb 22, 2023
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41

NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
Attempt to get successful builds for Dasharo/flashrom#11

CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested.
Bug upstream which is not tested against NOTHING

Collaboration happened under Dasharo/flashrom#11
tlaurion added a commit to tlaurion/heads that referenced this pull request Feb 22, 2023
… to test https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase

Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening

Changes:
- "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore
- To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install
- INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable  to build properly
- flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
tlaurion added a commit to tlaurion/heads that referenced this pull request Feb 22, 2023
…asharo/flashrom commit 82f021ec1e5677aec4c98352cf52695d82a0fb41

NOTE: newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
Attempt to get successful builds for Dasharo/flashrom#11

CONFIG_INTERNAL is not enough to have internal programmer anymore. CONFIG_INTERNAL_X86 also needs to be requested.
Bug upstream which is not tested against NOTHING

Collaboration happened under Dasharo/flashrom#11
@tlaurion
Copy link
Collaborator

tlaurion commented Mar 1, 2023

@macpijan the size increase of the binaries, even if optimized for space, is way bigger :(
linuxboot/heads#1121 (comment)

diffoscope of tools.cpio of Heads (master vs -Os branch of dasharo/flashrom):L
- is flashrom/flashrom in earlier version (master)
+ is dasharo/flashrom (including fixes)

│ │ --rwx------   0        0        0   580568 1970-01-01 00:00:00.000000 bin/flashrom
│ │ +-rwx------   0        0        0   703224 1970-01-01 00:00:00.000000 bin/flashrom

tlaurion added a commit to tlaurion/heads that referenced this pull request Apr 13, 2023
…11246 from work under  https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase

Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening

Changes:
- "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore
- ~To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install~ fixed upstream in previous commits
- INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable  to build properly
- flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
- flashrom ppc64: remove ast2400 and dummy, leaving NOTHING+MTD only

NOTES:
- newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
- CONFIG_INTERNAL is not enough to have internal programmer anymore on x86. CONFIG_INTERNAL_X86 also needs to be requested.

Collaboration happened under Dasharo/flashrom#11
tlaurion added a commit to tlaurion/heads that referenced this pull request Jun 23, 2023
…11246 from work under  https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase

Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening

Changes:
- "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore
- ~To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install~ fixed upstream in previous commits
- INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable  to build properly
- flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
- flashrom ppc64: remove ast2400 and dummy, leaving NOTHING+MTD only

NOTES:
- newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
- CONFIG_INTERNAL is not enough to have internal programmer anymore on x86. CONFIG_INTERNAL_X86 also needs to be requested.

Collaboration happened under Dasharo/flashrom#11
tlaurion added a commit to tlaurion/heads that referenced this pull request Jun 25, 2023
…11246 from work under  https://github.com/Dasharo/flashrom/tree/kgpe-patch-rebase

Pointing to Dasharo/flashrom#11 so that CircleCI shows success where work is happening

Changes:
- "WARNERROR=no" is a env variable interpreted at compilation now, not a configuration option anymore
- ~To work around heads pkg-config, newer flashrom needs to have LIBS_BASE overriden to detect proper libusb and libpci as installed under heads/install~ fixed upstream in previous commits
- INSTALL="$(INSTALL)" DESTDIR="$(INSTALL)" CFLAGS="-I$(INSTALL)/include/libusb-1.0 -I$(INSTALL)/include/pci" and LDFLAGS="-L$(INSTALL)/lib" needs to be passed as env variable  to build properly
- flashrom module now depends on libusb, since flashrom looks for pkg-config of installed libusb as prereq
- flashrom ppc64: remove ast2400 and dummy, leaving NOTHING+MTD only

NOTES:
- newer flashrom version seems to need to have environment variables defined prior of make call on console, not passing options at make call
- CONFIG_INTERNAL is not enough to have internal programmer anymore on x86. CONFIG_INTERNAL_X86 also needs to be requested.

Collaboration happened under Dasharo/flashrom#11
tlaurion added a commit to tlaurion/heads that referenced this pull request Aug 11, 2024
…ess workaround works in absence of flashrom --progress

Respin of https://github.com/Dasharo/flashrom/commit/6b2061bc0699202f81aeb782f301f1bba9f8a826.patch which cannot be cherry-picked
See Dasharo/flashrom#11 (comment)

Signed-off-by: Thierry Laurion <[email protected]>
tlaurion added a commit to tlaurion/heads that referenced this pull request Aug 11, 2024
…ess workaround works in absence of flashrom --progress

Respin of https://github.com/Dasharo/flashrom/commit/6b2061bc0699202f81aeb782f301f1bba9f8a826.patch which cannot be cherry-picked
See Dasharo/flashrom#11 (comment)

Signed-off-by: Thierry Laurion <[email protected]>
@tlaurion
Copy link
Collaborator

tlaurion added a commit to tlaurion/heads that referenced this pull request Sep 9, 2024
…ess workaround works in absence of flashrom --progress

Respin of https://github.com/Dasharo/flashrom/commit/6b2061bc0699202f81aeb782f301f1bba9f8a826.patch which cannot be cherry-picked
See Dasharo/flashrom#11 (comment)

Signed-off-by: Thierry Laurion <[email protected]>
tlaurion added a commit to tlaurion/heads that referenced this pull request Oct 30, 2024
…ess workaround works in absence of flashrom --progress

Respin of https://github.com/Dasharo/flashrom/commit/6b2061bc0699202f81aeb782f301f1bba9f8a826.patch which cannot be cherry-picked
See Dasharo/flashrom#11 (comment)

Signed-off-by: Thierry Laurion <[email protected]>
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.

4 participants