merge / skulls

pre-built coreboot images and documentation on how to flash them for Thinkpad Laptops
GNU General Public License v3.0
677 stars 65 forks source link

macOS support for scripts #124

Open goshatch opened 4 years ago

goshatch commented 4 years ago

I've flashed my X230's bios from macOS, and while everything eventually went well, I found a few issues with the script:

Some solutions:

With these two in place, I edited the script to refer the GNU versions I've installed, and to hard-code the flags for backup, and enabling me_cleaner.

Thank you for the amazing work making this process so accessible!

sashaaldrick commented 2 years ago

Thanks so much for this - I had exactly the same issue almost 3 years later, so was super useful. I did exactly the same, brew install grep, and then replacing any mention of grep with ggrep in external_install_bottom.sh and furthermore had to drop a me-clean=1 to get it to use me clean as you mentioned, it would not parse the parameters or do a backup (I had done a backup previously, so only hardcoded me clean variable)!


Next problem: macOS monterey removed python 2.x from /usr/bin/python, I am trying to get the script to recognise python3. I will report back.

EDIT: This python problem was simply fixed by adding python3 in front of ${ME_CLEANER_PATH} on line 240 in external_install_bottom.sh


For external_install_top.sh, all I had to do was hardcode my BOARD variable to x230 (my laptop of choice) and do brew install findutils and replace the one mention of find on line 135 with 'gfind' and as I had hardcoded everything and backed up the ROMs before, I just ran sudo ./external_install_top.sh without issue.

Hope this helps all mac users - I can push a PR for a mac option at the top of the script, though we'd have to think about how to do that as parameters are obviously not passed properly on macOS. Sure there is something I could do though. Let me know if this sounds useful @merge.