Skip to content

Commit

Permalink
feat: add coreboot with linuxboot example
Browse files Browse the repository at this point in the history
Signed-off-by: AtomicFS <[email protected]>
  • Loading branch information
AtomicFS committed Nov 19, 2024
1 parent 10a4ff6 commit 9830ffe
Show file tree
Hide file tree
Showing 5 changed files with 411 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,25 @@ jobs:
name: coreboot-4.19
path: output-coreboot
retention-days: 30

build-coreboot-linuxboot-example:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: firmware-action
uses: 9elements/[email protected]
with:
config: 'coreboot-example-linuxboot.json'
target: 'coreboot-example-linuxboot'
recursive: 'false'

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
name: coreboot-4.19
path: output-coreboot
retention-days: 30
39 changes: 38 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,44 @@
version: '3'

tasks:
build-template:
cmds:
- firmware-action build --config='{{.CONFIG}}' --target='{{.TARGET}}' --interactive
requires:
vars: [CONFIG, TARGET]

build:coreboot:
desc: Build coreboot hello world example
cmds:
- firmware-action build --config=coreboot-example.json --target=coreboot-example --interactive
- task: build-template
vars:
CONFIG: coreboot-example.json
TARGET: coreboot-example

build:coreboot-linuxboot:
desc: Build coreboot with linux and uroot
cmds:
- task: build-template
vars:
CONFIG: coreboot-linuxboot-example.json
TARGET: coreboot-example-with-linuxboot

build:linux-with-uroot:
desc: Build linux with uroot
cmds:
- task: build-template
vars:
CONFIG: coreboot-linuxboot-example.json
TARGET: linux-example-with-uroot

build:uroot:
desc: Build uroot
cmds:
- task: build-template
vars:
CONFIG: coreboot-linuxboot-example.json
TARGET: uroot-example

qemu:run-coreboot:
cmds:
- qemu-system-x86_64 -bios output-coreboot-linuxboot/coreboot.rom -serial stdio
67 changes: 67 additions & 0 deletions coreboot-linuxboot-example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"coreboot": {
"coreboot-example-with-linuxboot": {
"depends": null,
"sdk_url": "ghcr.io/9elements/firmware-action/coreboot_4.19:main",
"repo_path": "coreboot-linuxboot-example/coreboot/",
"defconfig_path": "coreboot-linuxboot-example/coreboot_linuxboot_defconfig",
"output_dir": "output-linuxboot-coreboot/",
"container_output_dirs": null,
"container_output_files": [
"build/coreboot.rom",
"defconfig"
],
"blobs": {
"payload_file_path": "",
"intel_ifd_path": "",
"intel_me_path": "",
"intel_gbe_path": "",
"fsp_binary_path": "",
"fsp_header_path": "",
"vbt_path": "",
"ec_path": ""
},
"container_input_dir": "inputs/",
"input_dirs": null,
"input_files": [
"output-linuxboot-linux/bzImage"
]
}
},
"linux": {
"linux-example-with-uroot": {
"depends": null,
"sdk_url": "ghcr.io/9elements/firmware-action/linux_6.9.9:main",
"arch": "x86_64",
"repo_path": "coreboot-linuxboot-example/linux/",
"defconfig_path": "coreboot-linuxboot-example/linux_defconfig",
"output_dir": "output-linuxboot-linux/",
"container_output_dirs": null,
"container_output_files": [
"arch/x86/boot/bzImage"
],
"gcc_version": "",
"container_input_dir": "inputs/",
"input_dirs": null,
"input_files": [
"output-linuxboot-uroot/initramfs.linux_arm64.cpio"
]
}
},
"u-root": {
"uroot-example": {
"depends": null,
"sdk_url": "ghcr.io/9elements/firmware-action/uroot_0.14.0:main",
"repo_path": "coreboot-linuxboot-example/u-root/",
"output_dir": "output-linuxboot-uroot/",
"container_output_dirs": null,
"container_output_files": [
"../tmp/initramfs.linux_arm64.cpio"
],
"build_command": "go build; GOARCH=arm64 GOOS=linux ./u-root core boot",
"container_input_dir": "inputs/",
"input_dirs": null,
"input_files": null
}
}
}
9 changes: 9 additions & 0 deletions coreboot-linuxboot-example/coreboot_linuxboot_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CONFIG_CBFS_SIZE=0x00400000
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
CONFIG_SUBSYSTEM_VENDOR_ID=0x0000
CONFIG_SUBSYSTEM_DEVICE_ID=0x0000
CONFIG_I2C_TRANSFER_TIMEOUT_US=500000
CONFIG_CONSOLE_QEMU_DEBUGCON_PORT=0x402
CONFIG_POST_IO_PORT=0x80
CONFIG_PAYLOAD_LINUXBOOT=y
CONFIG_LINUXBOOT_KERNEL_PATH="inputs/bzImage"
Loading

0 comments on commit 9830ffe

Please sign in to comment.