summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
4 daysrom.sh: don't run mkpicotool on dry buildsLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
4 dayspico-sdk: Import picotool as a dependencyLeah Rowe
We were previously not handling picotool at all, and pico-sdk would download picotool itself, at build time. This means that the source archive, if created, would not contain picotool. While not strictly required, for complete corresponding source, since it's a toolchain and not the actual pico-serprog firmware, it is my policy that releases must include full corresponding source code, when it is feasible to do so. I must say, I intensely dislike cmake, with such burning passion; I am thoroughly displeased by how hacky this is, but it works and now nothing is in my way for a Libreboot 20241206 rev8 release! Signed-off-by: Leah Rowe <leah@libreboot.org>
4 dayslib.sh: Much safer python version checkLeah Rowe
See: https://docs.python.org/3/library/sys.html#sys.version_info The sys.version_info tuple is a more reliable way to get the version. Our previous logic assumed that Python would always output "Python versionnumber", but this may not always be how it works. We've seen this for example where Debian modifies some GNU toolchains to include Debian something in the output. Python has a standard method built in for outputting exact the information we need. In my system, what I got was this: (3, 11, 2, 'final', 0) That output was from running this command: python -c 'import sys; print(sys.version_info[:])' This is much more robust, so use this instead. Signed-off-by: Leah Rowe <leah@libreboot.org>
4 dayscoreboot/next uprev: Fix T480 backlight keysLeah Rowe
Backlight controls already worked on the T480/T480s, if you used software-based controls e.g. set a hotkey for xbacklight, but the actual Fn buttons on the keyboard did not function at all; this patch fixes that issue This also fixes LEDs on T480, on warm reboot, which are otherwise off. It sets them back to the state they were at on cold boot. Both fixes are from Mate Kukri in the new T480 patchset. In addition to these fixes, Mate made several code quality improvements as part of efforts to upstream this code into coreboot's main branch. Updated coreboot T480 patchset to patchset 25. This change will be reflected next in a modification to the Libreboot documentation. I had to make several other fixes on top of this; see diff. A debug option was being enabled relating to stack overflow detection, which we ought to avoid to mitigate over-zealous build errors and stack corruption at boot; an errant option for an EC we don't use was also being enabled, by some code in coreboot relating to a Dasharo board; both issues have been mitigated in this lbmk patch, by patching the upstream coreboot build system in this patch. As part of this change, the coreboot/next tree within lbmk has been updated. Existing patches have been rebased. This brings in the following changes from upstream, relative to the previous revision used on coreboot/next: * 2f1e4e5e85 mb/hp/snb_ivb_desktops/z220*: Remove leftover old usb configurations * 9e859154ea mb/hp/snb_ivb_desktops: Remove unused includes * 70b33cb38d ec/google/chromeec/acpi: Add support for generic LPC memory range * f2ad73b5d1 mb/google/rauru: Raise little core CPU frequency from 700MHz to 2.4GHz * 044017b4cd mb/google/rauru: Initialize PMICs in romstage * 397c3e3c52 mb/google/fatcat/var/fatcat: Add touchpad wake source * e18f0f53cb mb/google/fatcat/var/fatcat: Change touchpad interrupt to edge trigger * a8b4ee246d mb/google/nissa/var/rull: Configure Acoustic noise mitigation * c09fd09edf tree: Use "true", "false" for has_power_resource * 1e64875265 mb/google/fatcat: Remove unused <stdio.h> * f316ab6796 mb/google/fatcat/var/francka: Fix early pad configuration for TPM * 6ca2c3c415 soc/mediatek/mt8196: Fix indentation in Makefile.mk * 94c1307fdb soc/mediatek/mt8196: Add dynamic power-saving for peripheral clocks * 67b140a949 tree: Use "true", "false" for fine_grained_control * 97923aebe1 mb/prodrive/atlas: Add initial support for options * 1a16146795 Fix up CFR's open issues * 7e8d8cdea2 mb/google/rauru: Initialize SPM * 3153432b83 soc/intel/alderlake: Add function to force disable memory channels * 8ea2b0ab46 mb/google/fatcat/var/francka: Use RAM ID 2 for MT62F2G32D4DS-020 WT:F * 5f600a8ee9 mb/google/fatcat: Limit Power Limit when battery is missing * 5213646241 ec/google/chromeec: Add function to detect barrel charger * 5ef70e5f22 ec/google/chromeec: Add API to check if battery is critically low * 42fd35b486 ec/google/chromeec: Add API to check if charger is present * 56370d0283 ec/google/chromeec: Add API to check if a USB PD charger is attached * 001e7a0b45 soc/mediatek/mt8196: Add MT6685 Clock IC driver * 5852841ca7 soc/intel/meteorlake: Use ASPM helpers from Alder Lake * b04f057efd mb/google/rex/var/kanix: Add Synaptics touchpad * af0c2e7a2e mb/prodrive/atlas: Remove the workaround for CLKREQ pins * 13316c644b mb/google/fatcat/var/fatcat: Modify interrupt GPIO for LPSS I2C touchpad * 825e9173b4 soc/mediatek: Distinguish pmic_init_setting function name * d65ff8492c soc/intel/xeon_sp/spr/acpi: Fix regression * 291778a1bd mb/google/corsola: Add new board variant Wyrdeer * 745dcc861d mb/google/corsola: Refactor mipi_panel_power_on function * 79f60c6b22 mb/google/nissa/var/telith: Disable stylus function * d7934bdd53 Doc/soc/amd/family15h: Fix URLs to AMD documents * 3cb7db4075 soc/mediatek/mt8196: Add PMIC MT6316 driver * 60bce10750 drivers/mipi: Add support for KD_KD110N11_51IE panel * d4c80054a4 soc/mediatek/mt8189: Enable timer compensation v2.5 * 403846f177 soc/mediatek/mt8196: Define MFGPLL_*_BASE using MFGSYS_BASE * b3edaa7b10 mb/google/rauru: Implement SKU ID * b470b48718 mb/google/rauru: Add support for getting storage id * 24a5048948 mb/google/nissa/var/pujjo: Add new supported memory part * c6e27c5fbf mb/google/nissa/var/rull: Add G2 touchscreen to devicetree * 639def1d84 mb/google/fatcat/var/fatcat: Enable FPS * acb8c870b2 mb/google/fatcat: Suppress unnecessary extra space in device trees * d79ba5565d mb/google/nissa/var/telith: Modify PLD for typeC and typeA * 620d2fab06 soc/mediatek/mt8189: Replace SPDX identifiers to GPL-2.0-only OR MIT * d90b1322ab commonlib: Refactor CSE sync eventLog * 4ef6c13b38 mb/google/brya: Adjust EC memory map range to support indexed IO * 1e90bbadfa ec/google/chromeec: Add indexed IO support * a8ab708584 mb/google/nissa/var/quandiso2: Create a quandiso2 variant * 78f610a0ae util/docker/doc.coreboot.org: Allow git to work in envs owned by root * 38ee22f6da util/docker/doc.coreboot.org: Use Alpine minor instead of point releases * 0196c3b6a4 util/docker/doc.coreboot.org: Get rid of bash workarounds * 897b46693b util/docker/doc.coreboot.org: Don't create volumes * a0c45cbf1f 3rdparty/fsp: Update submodule to upstream master * aa562d2881 soc/mediatek/mt8189: Add GPIO driver * 40a863cd60 soc/mediatek/mt8189: Initialize watchdog * 1380ed0cd2 soc/mediatek: Add support for MediaTek firmware support package * 4f92943c89 soc/mediatek/common: Rename GPT_MHZ to TIMER_MHZ for readability * 5a73692e0c soc/mediatek/mt8196: Add SPM loader * 306660c2de util/crossgcc: Update CMake from 3.30.2 to 3.31.3 * f3adc74e44 mb/google/fatcat: Keep GSPIx interface default PCI * 809e704101 soc/intel/pantherlake: Rename GSPI2 to GSPI0A * 222ef676f9 soc/intel/pantherlake: Add ACPI name for GSPI2 * 1fda7027c0 util/crossgcc: Update ACPICA from 20230628 to 20241212 * e35175bb38 Update vboot submodule to upstream main * 9eb4c5aff8 util/ifdtool: Fix memory leaks * 87ae3573b5 mb/starlabs/starlite_adl: Configure GPIO interrupt for Virtual Button * eaf87422b1 ec/starlabs/merlin: Add Intel Virtual Button Driver for Tablet Mode * a1532790b9 docs: Add 24.12 release notes * 8c0df740c7 mb/google/nissa/var/gothrax: Add probe and GPIO config for HDMI and touchpanel * f6fcff5511 docs/security/vboot: Update supported boards * 0dba17da0c mb/google/brya/uldrenite: Add WWAN RW350R-GL power on sequence * 2c4af7cd29 mb/topton/adl: Enable TPM2 (Intel fTPM/PTT) * c11558d4c7 mb/asus/p8z77-m: Drop GPIO by I/O * 4f1a1adef6 mb/topton/adl: Disable mapped SATA port * 81cbe11361 mb/asus/p8z77-m: Revert SIO IRQ settings carried from OEM * 9578c67c77 mb/google/brox: Include CSE reset in mainboard reset expectation * 5af5e66686 util/cbfstool: eliminate late sign of life event * 0797c40d52 src/soc/intel/cmn/blk/cse: Log cse sync information * 9a15a1ed21 soc/intel: Log CSE Sync Early Sign of Life event from a better place * c812c78618 mb/trulo/var/uldrenite: Support USB_OC on the A0 port * ee1a766f05 mb/trulo/var/uldrenite: Set GPP_B5 and B6 to ISH function * 87c9d93a62 mb/google/skywalker: Add MediaTek MT8189 reference board * 6bd51ce42a soc/mediatek/mt8189: Add a stub implementation of MT8189 SoC * ea646c0514 mb/google/rauru: Add pwrsel init in romstage * c3265da005 soc/mediatek/mt8196: Add pwrsel driver * 30d8e1880a ec/google/chromeec: Publish LPC GMR address range via CREC _CRS * bb85775d92 soc/intel/cmn/acpi: Add ACPI method to get LGMR address * 84347d0b45 payloads/Linuxboot: Fix u-root build * 7bcec7a2ef payloads/LinuxBoot: Build x86_64 with host toolchain * e3150e819d util/crossgcc: Add libstdcxx target * 61385c4976 soc/mediatek/common: Move SPM_SYSTEM_BASE_OFFSET to soc folders * 6625dee027 soc/mediatek/common: Use array to represent spm_sw_rsv registers * cd8d6861f6 soc/mediatek/common: Move some functions to spm_v1.c * 91fe658714 drivers/option: Add forms in cbtables * 4d4776f320 mb/emulation/qemu-sbsa: Configure flash region for MMU * dfef1895f2 mainboard: Add MiTAC Computing Whitestone-2 (LGA-4677) * caf8f9f60f mb/google/brya/var/uldrenite: Enable PMC, HECI and SRAM devices * b668c756bf mb/trulo/var/uldrenite: Configure audio (max9360a, rt5682) * 941f994809 mb/trulo/var/uldrenite: Configure Network * 600e7810fb mb/trulo/var/uldrenite: Configure USB ports and mapping * 0261cbe8e9 mb/trulo/var/uldrenite: Configure serial_io and I2C * 113205bcd1 mb/trulo/var/uldrenite: Enable eMMC and DLL tuning parameters * 0dd227f9c1 mb/trulo/var/uldrenite: Enable DPTF, S0ix and configure FIVR setting * 0ce153c8df mb/google/nissa/var/rull: For probe, change unprovisioned to unknown * b57308f437 mb/google/rauru: Add SD card configurations * e969a3df87 soc/mediatek/mt8196: Add SD card configurations * 8be835ce3c soc/mediatek/mt8196: Add tracker driver * 78560f9958 soc/mediatek/mt8196: Add MMinfra driver support * 0b252ef8b4 util/mtkheader: Add GFH header for mt8189 bootblock code * 540eb5ba73 cpu/qemu: Enable IDT_IN_EVERY_STAGE * f9d6fd4e0f soc/intel/xeon_sp: Enable IDT_IN_EVERY_STAGE * c3dee9eaba cpu/intel/car/romstage: Fix false-positive stack corruption * b659fb5cea mb/ocp/tiogapass: Wait for BMC * 7c0556244d drivers/wifi: Update Drive Strength BRI Rsp Table revision * 70bdd2e1fa cpu/x86/topology: Simplify CPU topology initialization * 3a2ffba231 soc/intel/xeon_sp: Introduce early_pch_init * 48ed4b0f85 soc/intel/xeon_sp/lbg: Add support to hide HDA * a857c81122 arch/x86: Disable DEBUG_STACK_OVERFLOW_BREAKPOINTS_IN_ALL_STAGES * 45dabe846d mb/google/brox: Apply ISH_FW_VERSION in Kconfig * e0b1a0dbec vc/intel/fsp/mtl: Update MTL fsp header files from 3471_91 to 4122_21 * c20fd2fc3f 3rdparty/fsp: Update submodule to upstream master * e5b5fc345a soc/intel/xeon_sp: Improve PCI INTx IRQ routing for Gen6 * 673075f102 util/cbfstool: Add eventLog support for ELOG_TYPE_FW_CSE_SYNC * 3235b7c6d5 commonlib: Add ELOG_TYPE_FW_CSE_SYNC eventLog type * 4a0c49e671 soc/intel/pantherlake: Keep image clock configuration enable * 51cc2bacb6 soc/intel/pantherlake: Disable stack overflow debug options * eeb6f67eec Docs: Convert bare URLs into hyperlinks * 2609519704 mb/google/rauru: Implement regulator interface * 8c6426c1b4 soc/mediatek/mt8196: Add PMIC MT6373 driver * bda5b83661 mb/google/brya/var/uldrenite: update gpio settings * afb11d05b9 mb/google/trulo/var/uldrenite: Add memory config * 46df9e1d38 mb/google/brya/var/marasov: Enable GPP_F9 GPIO for early panel power-on * 04d33b90ec mb/google/fatcat: config GPP_F23 as ISH gpio pin * 16ab83b34a soc/mediatek/mt8196: Initialize SSPM * b793209b80 mb/google/brox/var/jubilant: Disable Tccold Handshake * 2f1e67bbc7 mb/google/nissa/var/glassway: Modify touch screen ILIT2901 sequence * a1c50f233d soc/mediatek/mt8196: Add PMIC MT6363 ADC driver * 8910b6ba7d soc/mediatek/mt8196: Add PMIC MT6363 driver * c215889442 soc/mediatek/mt8196: Add PMIF and PMIC driver support * 27fa0595de soc/mediatek/mt8196: Add mtcmos init support * 61a00269a2 mb/amb/birman*/gpio: remove configuration for VDD_MEM_VID[0,1] * 38b59164ca ec/google/chromeec: Define ACPI_NOTIFY_CROS_EC_MKBP constant * 50c9747d87 drivers/usb/intel_bluetooth: Add GBTR Method * 0bb4a220a8 soc/intel/common/cnvi: Fix GBTE path in comment * d33244c3af drivers/usb/intel_bluetooth: Relocate BTRK to \_SB.PCI0 * 04b9627e07 drivers/usb/intel_bluetooth: Fix GBTE to return Local0 * c3f9dd3af3 drivers/usb/intel_bluetooth: Change the Power Resource to S0 * 1cf8d84f3b mb/google/nissa/var/rull: Add 6W and 15W DPTF parameters * 62a9d670bf mb/google/brya/var/uldrenite: Add HDA verb tables * 56278eeed8 mb/google/rex/var/kanix: Enable/Disable PCIE WLAN based on fw_config * 6d3346068b intel/common/block: Program the right power_limits_config entry * 35bf4bc59c commonlib: Add generic word-at-a-time optimization to ipchksum() * e987ba45d6 soc/mediatek/mt8196: Add booker driver * aa3cfd5c69 haswell NRI: Post-process selected timings * 4a4ad2b1e6 haswell NRI: Initialise MPLL * 41c2e1685e soc/intel/xeon_sp: Add PCU PCI drivers * 8721757aca soc/intel/xeon_sp/skx: Configure IOAPICs * e9c546b153 arch/x86: Rename breakpoint removal function * 0351872731 arch/x86: Add breakpoint to stack canary * 572da7c524 acpi/acpigen: generate Create*Field() from name string directly * 2e9aebf63f mb/google/fatcat: Enable Intel DPTF support and configure policies * a8ff286185 mb/google/fatcat: Enable Bayhub Level 2 errata * 230e646d98 mb/google/fatcat: Remove redundant GPIOs for x1 slot * fbacae625a soc/intel/ptl: Enable UFS functionality by adding IRQ programming * b67e001a85 soc/intel/pantherlake: Fix UFS ACPI _ADR calculation * 2496943b5c mb/google/brox/var/jubilant: Set PCIe root port 5 speed to Gen2 * dfdb210e26 soc/intel/common/block: Fixup itss_get_on_chip_dev_pirq * 223dabef56 soc/intel/common/block: Add const qualifier for input of pirq ops * afc49fa013 soc/intel/xeon_sp: Remove lpc_lockdown_config * 1a4ab38035 soc/mediatek/mt8196: Rename SCP to SPM base variables * 3189afbdee soc/intel/common: Drop locking function fast_spi_set_vcl * 01bf34cb28 soc/intel/xeon_sp: Support _PRT reporting for domain * 1399dd8086 soc/intel/xeon_sp: Skip not pre-routed devices in _PRT reporting * a5362f6d73 soc/mediatek/mt8196: Enable ARM Trusted Firmware integration * 42a696090f Update arm-trusted-firmware submodule to upstream master * 861413b295 mb/google/nissa/var/riven: Set PCIe root port 4 speed to Gen2 * d5a11293ff soc/intel/alderlake: Add support for PCIe speed setting * 5b447d00f5 soc/intel/pantherlake: Fix UFS ACPI inclusion in southbridge.asl * 1c51c3e57f device/pci_ids: Add Pantherlake-H GT2 (DID2) * 15109603c6 mainboard/ocp/tiogapass: Enable TPM * 94d200c394 soc/intel/xeon_sp/cpx: Add missing FADT fields * 534585d7bd soc/intel/xeon_sp/skx: Drop ACPI_FADT_8042 * 98ca450a53 soc/intel/xeon_sp: Use generate_p_state_entries * 28c03b501e mb/ocp/tiogapass: Implement mainboard_dimm_slot_exists * 74ee80d207 soc/intel/xeon_sp/cpx: Fix register lock * e1a0e6b738 soc/intel/xeon_sp/skx: Fix CPU init * b04ecb2a5f arch/x86: Enable support for IOAPIC devices * a7437ca340 soc/intel/common/block/cse: allow CSE telemetry on non-lite CSE SKU * 0d284bfc36 soc/intel/mtl/acpi/gpio.asl: fix missing gpio.h include * aeb5ccd129 ec/dasharo/ec: add Dasharo features * 820c7e06d2 soc/mediatek/mt8196: Set DRAMC_PARAM_HEADER_VERSION to 4 * d8104af174 mb/google/rex/var/kanix: Disable FP_MCU based on fw_config * 075a13b775 mb/google/fatcat: Update Soundwire codec address based on devicetree * 2411942a05 drivers/soundwire/alc711: Add common Kconfig for ALC7xx soundwire codecs * 534f81d165 mb/google/fatcat: Update flash layout * 1b175a64e3 soc/intel/ptl: Populate SMBIOS Type 4 with unique serial number * 4b574281f0 soc/intel/cmn/pmc: Retrieve SoC QDF information via PMC IPC * 4ce5304879 soc/intel/xeon_sp: Advertise DIMMs on skylake_sp as well * 5613f0e6be soc/intel/xeon_sp: Fix debug print * 0d827a5810 soc/intel/xeon_sp: Drop SOC_INTEL_MMAPVTD_ONLY_FOR_DPR * d3aa108acf drivers/ipmi/ocp: Add missing include * 37e9c22089 libpayload: configs: Add new config.featuretest to broaden CI * bcced7caea commonlib/device_tree: Make END token part of struct_size * 8ad1ee9b0a util/intelp2m: Print the current project version * 1b9c312273 intelp2m/patform/sunrise: Add unit tests * 2394795279 intelp2m/patform/lewisburg: Add unit tests * bce3363412 intelp2m/patform/apollolake: Add unit tests * 6abf66c8f3 util/intelp2m/parser/template: Add unit test * 6b43e4ba33 MAINTAINERS: Add Yuchi and Vasiliy for Intel Atom Snow Ridge SoC * 5cedebf874 soc/intel/xeon_xp: Remove 1 bytes losing in lower DRAM * cd30d94ae5 mb/google/brya/var/uldrenite: Generate RAM ID and SPD file * cda1e7e553 mb/google/nissa: Create pujjogatwin variant * c0ccace4d5 .checkpatch.conf: Set max line length to 96 * 6f2a8ee8cc soc/mediatek/mt8196: Require DRAM blob to exist * 850cf7d07a Update blobs submodule to upstream main * 75424efdc4 soc/amd/common/psp/psp_def.h: increase P2C_BUFFER_MAXSIZE * 179945291c soc/amd/common/psp/rpmc: fix printk format string * 9b308f4d54 soc/amd/common/psp/psp_smi: report errors in 'handle_psp_command' * 5613f209c7 soc/amd/common/psp_smi_flash: implement SPI flash RPMC command handling * b1f954bc6c soc/amd/common/block/psp/psp_smi_flash.h: fix struct element types * ce01117aa5 drivers/spi: add RPMC support * 78270ef3f1 Documentation/tutorial/managing_local_additions.md: Add symlink info * 0a7c3ed514 soc/mediatek/mt8195: Fix SCP register address * 4c8547704f mb/google/rauru: Add 2nd source TAS2563 amps to support beep * ac83b48cba soc/mediatek/mt8196: Add audio base address definition * c661933a24 soc/mediatek/common: Add read16/write16 support for PMIF * c107755701 vc/intel/fsp: Update PTL FSP headers from 2382_01 to 2431.00 * a417acdfbc mb/google/fatcat: Remove unnecessary prototype * d095f1ea45 soc/amd/glinda: Update MCA banks * 8df4eefd44 soc/mediatek/mt8196: Reserve DRAM buffers for HW TX TRACKING * 5c766bc150 mb/purism/librem_cnl: Add ramtop to cmos.layout for librem_mini * 2007792b08 mb/purism/librem_l1um_v2/ramstage.c: Use DEV_PTR macro * 7f54139a81 Docs/mb/starlabs/labtop_cml.md: Fix footnote syntax Signed-off-by: Leah Rowe <leah@libreboot.org> wip2 Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysset up python in PATH, ensuring that it is python3Leah Rowe
we already check the python version, and set a variable for it, so that we can reliably use python3, even if python in PATH doesn't correspond to python3. for example if a system has python as python2 and python3 as python3 well, we use that when running deguard for example, but various upstream projects that we use may need python, and all of them use python3, not 2 so, re-use the python variable set up by lbmk, and set it up in PATH accordingly. this now makes the note about python3 obsolete, on docs/build.md in lbwww.git Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysvendor.sh: Proper semantics on prefix file namesLeah Rowe
They may not actually always be binary blobs, at least not software. I started referring to these as "vendor files" some time ago, for this reason. With this terminology, it applies properly to any sort of file from the vendor. For example, it may be that in the future, we start inserting the MFS section of an an Intel ME image, into the Intel ME. We already do that with deguard for example (set MFS config), on MEv11 based setup. That is a vendor *file*, and though it may still actually be a binary blob, it's not software, but configuration. The term "blob" normally means compiled software, in most people's minds, but the term blob is technically accurate for any blob, not just software; however, we have to keep people's perception in mind. Whereas, "vendor file" is also understood by most people to include code supplied by the vendor. We haven't done any releases yet with this ROM image file name prefix, so it's perfectly OK to handle it now, without handling the old one for backwards compatibility. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysvendor.sh: Confirm if need_files=nLeah Rowe
Users running setmac on an X200 tarball for example, will now see it being modified, if they didn't specify setmac keep, so they might think vendor files are being inserted, which they are not. Therefore, a confirmation is provided at the end of the output. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysvendor.sh: Allow restoring the default GbE fileLeah Rowe
./mk inject libreboot-YYYYMMDD_board.tar.xz setmac restore This does the same thing as a normal setmac command, except that it does not alter the MAC address; it is also not the same as "keep", which skips *writing* the GbE region in-ROM. The *restore* argument writes the default, unmodified GbE file kept by lbmk, unmodified because nvmutil is skipped when the user specifies this argument. This option is useful for debugging purposes, because it can be used to verify whether anything else is being wrongly modified by the script; the "nuke" command can be executed afterward, and the hash file inspected versus release. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysvendor.sh: set random MAC address *by default*Leah Rowe
MAC addresses are generic, inside Libreboot images where an Intel GbE region is specified. We commonly get users flashing multiple systems for their own use, and sometimes they complain that they networking broke, because they don't know that the MAC address is identical on each machine. This still doesn't work around the case where the same machine is used, e.g. multiple T440p thinkpads, but if they have one of each model, it can work nicely, because we do in fact change it for various platforms. This change will also reduce the number of people at conferences in the future, where there are multiple Libreboot users, having MAC address conflicts. Changing the MAC address is a good practise, so we enforce good practise. The user can still retain the old behaviour by using this command: ./mk inject libreboot-YYYYMMDD_boardname.tar.xz setmac keep The "keep" argument clears new_mac, which will then skip changing the MAC address. They can also still set an arbitrary MAC address as an argument for setmac, e.g.: ./mk inject libreboot-YYYYMMDD_boardname.tar.xz setmac 00:de:ad:c0:ff:ee This change will be covered in the documentation. Signed-off-by: Leah Rowe <leah@libreboot.org>
5 daysvendor.sh: add clarification to nogbe warningLeah Rowe
if the user ran this on an x60 tarball, the no-gbe warning seems confusing since that one has intel gbe, but pre-ifd, so no gbe region in the flash; on pre-ifd systems e.g. ich7 southbridge, the mac address was baked into a separate gbe nvm on mask rom, inaccessible to users Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysvendor.sh: check that the vcfg file existsLeah Rowe
setcfg already checks it, but it's good to check anyway Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysvendor.sh: error out if nuking failedLeah Rowe
We already have code to handle this, but it's possible that I might break it in the future, due to the complex logic of this script. So, I've implemented this catch-all check at the end of the process. It still relies on the actual setting of the variables, upon which this check is based, to be set correctly. This condition will most certainly never be met, unless I break some other part of the code in the future. That is precisely what this overly pedantic check is for. Example scenarios: I forget to set xchanged=y, on a new modification. I set has_hashes erroneously. The variables are re-used between runs, and not properly reset; at present, a given run of ./mk inject only operates on a single target, but this latter fact could change in the future. need_files is set erroneously; vendorfiles detected as being required, when they aren't. These are just a few examples. As such, this is a preventative bug fix, because it's preventing a bug. The main reason I want this i n here is because I need to ensure that vendor files are properly deleted, for a given release. If I accidentally includes ones that I'm not supposed to, inside ROM images, that could be a big problem. Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysadd line break, part 3Leah Rowe
forgot a line break, three times in a rowe you got a problem with that? Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysadd line break, part 2Leah Rowe
because printf Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysadd line breakLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysvendor.sh: prevent double-nukeLeah Rowe
where the nuke command is used, we need the files to be there; if they're not, it will try to nuke them, which will result in an error in most cases, but there may be some cases where that isn't true, for instance if only the Intel ME is needed; it'll be writing zeroes over zeroes. we want to only allow technically correct behaviour, because technically correct is the best kind of correct. it is theoretically possible that a double-nuke might affect certain behaviours unpredictably. for example, if vendor.sh later integrates another tool that works whereby the same command inserts or nukes depending on a certain condition, but with the same command, and where that command would return zero in both cases. this is a preventative bug fix, because it fixes an issue that does not yet actually occur in practise. Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysvendor.sh: much more verbose errors/confirmationLeah Rowe
the user must be well-informed as to the next step, which this script directly influences guide the user accordingly Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysadd libx86 to arch dependenciesLeah Rowe
needed to compile the "int" tool defined under config/git/ Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysvendor.sh: Remove unnecessary returnLeah Rowe
The message at the end that states a file was not modified, is not currently printed when vendor files are not needed, and setmac is not used. This patch fixes that, so the user now sees a confirmation of such change, or lack thereof. Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysvendor.sh: Download utils even if vcfg unsetLeah Rowe
This is because the user may have specified setmac. I tried without this change, on a fresh lbmk, setting the MAC address on an X200 tarball, and it produced an error that ifdtool was unavailable. Signed-off-by: Leah Rowe <leah@libreboot.org>
6 daysvendor.sh: Allow setmac if vendorfiles not neededLeah Rowe
Observe the following prior patch: commit 818f3d630c268742cf046523e24c7b000e06ec69 Author: Leah Rowe <leah@libreboot.org> Date: Fri Jan 3 17:06:14 2025 +0000 vendor.sh: Don't error if vcfg is unset Now: This patch made vendor inject more robust, and speeds up the processing of images where no vendor files are needed, but it broke setmac on such tar archives. This new patch works around it. For example, I was able to run ./mk inject on an X200 tarball to change the MAC address; no vendorfiles are inserted, because it's not needed. The further check for whether a board uses Intel GbE still protects against accidental modification. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysadd less to arch dependenciesLeah Rowe
probably not actually needed, but it annoys me that it doesn't come installed by default, and it's needed for certain git operations Signed-off-by: Leah Rowe <leah@libreboot.org>
7 dayslib.sh: Set python after dependenciesLeah Rowe
otherwise, the user can't install python, which is in the dependencies. an irony! Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysupdate my copyright years on modified scriptsLeah Rowe
there are some lbmk scripts that i modified, starting this year. update the headers. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysvendor.sh: Don't error if vcfg is unsetLeah Rowe
It should return 1 instead, in readcfg(), because this is not an error condition; vcfg not being set means that the board doesn't use vendor files, which is perfectly normal and should not yield an error. This fixes a build error under certain conditions, found during release-build testing. This bug was exposed when I fixed double quoting issues as per shellcheck tests. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 dayslib.sh: Fix unescaped quotes in chkvars()Leah Rowe
This should be the proper fix now Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysRevert "fix more unescaped quotes in eval"Leah Rowe
This reverts commit ec6bcc1fba5fbdf8b19b3d1cf9711f3d4c9c3741.
7 daysfix more unescaped quotes in evalLeah Rowe
it should fix more build errors that might have appeared in the aforementioned revision, mentioned in the previous commit message Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysfix ./mk dependencies build issueLeah Rowe
the bug was actually caused by chkvars add an escape for the quotes and bam. fixed. without this, i got the following e.g. For command: ./mk dependencies debian Output: ./mk: 1: [: apt-get: unexpected operator ERROR ./mk: pkg_add unset Someone reported a similar issue with the Arch one, which is also now fixed. This regression was caused by the previous commit: commit 0cf58c22734b19293f4cbef83add59b031ca1773 Author: Leah Rowe <leah@libreboot.org> Date: Thu Jan 2 23:52:45 2025 +0000 fix lbmk shellcheck errors I forgot to escape the double quotes in an eval. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysrom.sh: Remove errant GRUB modules checkLeah Rowe
This check is a good idea, but not viable here, because the modules naturally aren't set in all circumstances, so it just causes a build error. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 dayssubmodule/grub: use codeberg for 1st gnulib mirrorLeah Rowe
the gnu.org mirror is always slow for some reason, but only for gnulib. it may only be for me, because routing in other countries/networks may differ. when i'm freshly cloning lbmk modules, gnulib is always really slow, like 300KB/s (bytes, not bits) i have 1gbps internet and wish to not have 2005-era speeds, thank you kindly! Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Update AUTHORS and COPYING filesLeah Rowe
Mention Riku's copyright in the COPYING file, and update my years in that file. Add Riku to the AUTHORS file. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Describe nvmutil in help outputLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Remove the correct binary on uninstallLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/spkmodem-recv: More correct MakefileLeah Rowe
Set up the DESTDIR variable properly. Otherwise, this is just style changes. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Honour the INSTALL variableLeah Rowe
Don't assume "install" is the correct command. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Don't clean when doing uninstallLeah Rowe
The user might wish to uninstall, but not remove the build that they just did. The user can still do make clean if they wish. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Proper DESTDIR/PREFIX handlingLeah Rowe
DESTDIR is the root directory where it goes, which is normally an empty string; PREFIX is where the bin directory is located, relative to DESTDIR Default to /usr/local for PREFIX, not /usr, because /usr/bin is for system utilities. nvmutil is a local utility. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Set CC and CFLAGS only if unsetLeah Rowe
We don't want to clobber anything that the user set themselves. Instead, we should respect the user's choice. Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Capitalise BABALeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Add uninstall to MakefileLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Add distclean to MakefileLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
7 daysutil/nvmutil: Make the GbE checksum a defineLeah Rowe
This makes the code easier to understand. All 2-byte words, stored in little endian order within the 128-byte GbE NVM area, must add up to 0xBABA. If it doesn't, then software is supposed to reject that GbE config. The nvmutil software works on that basis. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysutil/nvmutil: nicer hexdump displayLeah Rowe
make it look like hexdump -C, where individual bytes are spaced, and there is an additional space after 8 bytes, per row. i won't bother with a character display, since that is meaningless on gbe nvm words. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysutil/nvmutil: show the correct hexdump orderLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
8 dayslib.sh mktarball: cleaner if statementLeah Rowe
i also removed that printf, because the path it prints is actually wrong sometimes; in the recent re-write of vendor.sh, it prints the correct path instead Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysfix lbmk shellcheck errorsLeah Rowe
There was also a condition in run_make_command that is now an OR, where it was an AND, on script/trees, to fix the use of mixed (and erroneous) OR/AND operators. I'm planning a much more invasive audit than this. These are light fixes, intended for Libreboot 20241206 rev8. Signed-off-by: Leah Rowe <leah@libreboot.org>
8 dayslib.sh and rom.sh: update my headerLeah Rowe
i made modifications to them in 2025, so update them to 2025 Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysvendor.sh inject: reset err upon returnLeah Rowe
Signed-off-by: Leah Rowe <leah@libreboot.org>
8 daysvendor.sh: MUCH, MUCH, MUCH safer ./mk injectLeah Rowe
Don't extract to bin/release/ Modify the tarball instead. Previously, the tarball would not be modified, but a lot of users thought the tarball was being modified and ignored bin/release/, where the injected images were actually being saved to. Don't copy the tarball either. Just modify it in-place. Don't allow single-rom injection either; only allow the tarball-based method. The command syntax has changed, but: ./mk inject tarball.tar.xz This is the same. What has changed is nuke, and MAC address modification. Observe: ./mk inject tarball.tar.xz nuke ./mk inject tarball.tar.xz setmac ./mk inject tarball.tar.xz setmac ??:??:??:??:??:?? ./mk inject tarball.tar.xz setmac 00:1f:16:??:22:aa These are just a few examples. The MAC address syntax is the same as used for nvmutil, which means you can set it randomly. Also: ./mk inject tarball.tar.xz setmac You can use the *setmac* command *repeatedly*, even if you've already injected a given archive. It'll just update the archive, but skip injecting other files that were already injected. If you use setmac without a MAC address, it will randomise the MAC address. This is therefore very similar to the command structure used in nvmutil. The code for injection is generally more robust, with stronger error checks. This design change was done, so that the user doesn't accidentally brick their machine. The non-injected images have a prefix in the file name saying "DO_NOT_FLASH", and those non-injected images are padded by 1 byte. That way, the user knows not to flash it and if they try, flashprog will throw an error. The prefix and padding is removed on injection. Old images without the padding/prefix can still be injected, via tarballs; this new code is backwards-compatible with tarballs from older Libreboot releases. A common thing I see sometimes is a user will say they have a black screen or something, and I say: did you insert vendor files? And they say yes. And they did. But they extracted and flashed from the tarball, which wasn't injected, because they didn't release about bin/release/ No amount of RTFM is justified. The previous design flaw is a bug. We must always observe user safety first, no matter what, so that has now been done. Signed-off-by: Leah Rowe <leah@libreboot.org>