{"id":18694262,"url":"https://github.com/9elements/osf-coreboot-workshop","last_synced_at":"2025-08-18T09:11:03.900Z","repository":{"id":255457785,"uuid":"852200624","full_name":"9elements/osf-coreboot-workshop","owner":"9elements","description":"OSFC ODROID H4 coreboot workshop","archived":false,"fork":false,"pushed_at":"2025-04-19T11:10:56.000Z","size":6640,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":6,"default_branch":"open_firmware_day","last_synced_at":"2025-08-10T03:36:16.082Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/9elements.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-04T12:01:12.000Z","updated_at":"2025-07-06T19:33:47.000Z","dependencies_parsed_at":"2024-09-05T14:15:30.589Z","dependency_job_id":"9b5f65f0-23a2-4a79-9e01-b59671290bed","html_url":"https://github.com/9elements/osf-coreboot-workshop","commit_stats":null,"previous_names":["9elements/osfc-odroid-workshop"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/9elements/osf-coreboot-workshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elements%2Fosf-coreboot-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elements%2Fosf-coreboot-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elements%2Fosf-coreboot-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elements%2Fosf-coreboot-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/9elements","download_url":"https://codeload.github.com/9elements/osf-coreboot-workshop/tar.gz/refs/heads/open_firmware_day","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elements%2Fosf-coreboot-workshop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270968812,"owners_count":24677179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T11:09:09.570Z","updated_at":"2025-08-18T09:11:03.871Z","avatar_url":"https://github.com/9elements.png","language":null,"readme":"# OSF coreboot workshop\n\n## Relevant web resources\n\n- [ODROID H4 Wiki](https://wiki.odroid.com/odroid-h4/start)\n- [coreboot documentation](https://doc.coreboot.org/)\n\n## Read H4+ vendor firmware\n\nBefore we can build a complete coreboot firmware image for the H4+, we need to read the manufacturer's firmware to extract the relevant flash regions.\n\n### Connection between programmer and host firmware flash\n\nThe flash chip does not have a connector to access the flash chip. However, due to the SOI8 package\nformat, the pinout is easily accessible using the appropriate test clip. The only thing to note is\nthe polarity of the connection. Pin 1 (CS) is marked with a dot on the chip and a red wire on the\ntest clip, which must match to avoid bricking the board. The picture below shows the primary chip\nwe will use to flash coreboot.\n\n![](/images/odroid-h4-ultra-flash-1.jpg)\n\n### How to use the programmer\n\nTo use the picoprog to read the NOR flash containing the firmware, we need to use a programmer\nsoftware that supports the [Serprog Protocol](https://www.flashrom.org/supported_hw/supported_prog/serprog/overview.html).\nFor this we recommend the use of either [flashrom](https://www.flashrom.org/) or [flashprog](https://flashprog.org/wiki/Flashprog).\nFor detailed instructions on how to read the flash chip, please refer to the [picoprog README.md](https://github.com/9elements/picoprog?tab=readme-ov-file#usage).\n\n## Build coreboot for ODROID H4\n\nBefore starting the configuration, extract the relevant Flash regions using [ifdtool](https://doc.coreboot.org/util/ifdtool/binary_extraction.html).\nThe extracted soc information will be saved to your local working directory.\n\n\u003cdetails\u003e\n\u003csummary\u003eIntel FDT\u003c/summary\u003e\nThe Intel Flash Descriptor (IFD) defines offsets and sizes of various regions of the flash.\nIt is used to define coreboots flashmap, which describes partitions on the flash chip.\nFor further details refer to the [official coreboot documentation](https://review.coreboot.org/plugins/gitiles/coreboot/+/0cd098e4e41d6bb3b27327d4a6526bd7004bfc77/Documentation/ifdtool/layout.md).\n\u003c/details\u003e\n\n```\n/path/to/ifdtool -x /path/to/ODROID-H4-PLUS-1.rom\n```\n\nThe command above should dump the neccessary binaries into your current directory. The files will be called something like \"flashregion_*_*.bin\". Now we need to tell coreboot where the binaries are.\n\nIf you have built another mainboard before (e.g. QEMU), you should run `make distclean` before configuring the new target.  \nFor configuration start `make menuconfig`, select \"Hardkernel\" as the mainboard vendor and include the IFD (Flash descriptor) and ME (Management Engine) flash region via the config menu by their file path.  \nIFD make menuconfig path: \"Chipset/Add Intel descriptor.bin file\".  \nAfter enabling the option a new option should appear which needs a file path to the \"flashregion\\_0\\_flashdescripttor.bin\" file  \nME make menuconfig path: \"Chipset/Add Intel ME/TXE firmware\"  \nAfter enabling the option a new option should appear which needs a file path to the \"flashregion\\_2\\_intel\\_me.bin\" file  \n\n### Select Payload (EDK2-Payload)\n\nIn the menuconfig choose: `Payload/Payload to add/edk2 Payload`  \nIn the menuconfig choose: `Payload/Tianocore's EDK 2 payload/edk2 Payload`  \nIn the menuconfig Insert `edk2-stable202408` into: `Payload/Payload to add/Insert a commits SHA-1 or a branch name`  \n\nAll other default configurations are sufficient to boot the board.\n\n## Flash H4+ coreboot firmware\n\n```\n./flashprog -p serprog:dev=/dev/ttyACM2 -w PATH/TO/COREBOOT/build/coreboot.rom\n```\nNow disconnect the flash clip.\n\n### Connect UART pins\n\nThe GPIO pin assignment of our target hardware can be found here:\n[ODROID Wiki: H4 I/O Expansion GPIO MAP](https://wiki.odroid.com/odroid-h4/hardware/io_expansion_gpio)\n\nUse a tree jumper cable to connect GND and RX to TX and vice versa.\n\n## Boot coreboot\n\nDepending on the configured log level, the coreboot console provides substitute information during\nthe boot process. Therefore, you should make sure that the UART is set up properly.\nThe [picoprog provides an additional interface to connect to the UART](https://github.com/9elements/picoprog?tab=readme-ov-file#uart-communication).\nUse the software of your choice to connect to it. e.g:\n```\n\u003ctio/picocom\u003e -b 115200 /dev/serial/by-id/usb-9elements_Picoprog_OSFC2024-if02\n```\nor\n```\ncu -l /dev/serial/by-id/usb-9elements_Picoprog_OSFC2024-if02 -s 115200\n```\n\n### Verify UART Communication\n\nWe have live ubuntu Linux system with the serial console enabled by default on USB sticks. To test if the\nUART communication is working, you should first boot the system and check. You should see coreboot logs as well as Linux ubuntu logs and a console to login into.\n\n### Operating System\n\nIf you have the USB stick attached to the odroid, you should see a ubuntu live iso image booting up.\nCongratulations you have successfully compiled, flashed and booted Firmware.\n\n## Going Further\n\nNow you can either go free style or try to solve some of the challenges that we have prepared. You could for example poke around with the code and the configuration options. Just be careful with the internal GPIO related configuration as a misconfiguration could potentially brick the hardware. If you run out of ideas, just ask the staff. They might know something you can try out.\n\n### Challenges\n\nTODO\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9elements%2Fosf-coreboot-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F9elements%2Fosf-coreboot-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9elements%2Fosf-coreboot-workshop/lists"}