MLX-MKBFB(1)

πŸ’– MLX-MKBFB(1) β€” the mlx-mkbfb page, bestie edition πŸ’–

okay so real quick, this is a General Commands Manual situation and the star of the show is mlx-mkbfb. sit down, hydrate, and let's get into it 🫢


✨ NAME ✨

mlx-mkbfb β€” create, dump, check, and update BlueField BFB files. that's the whole job. she does it all πŸ’…


🌸 SYNOPSIS 🌸

mlx-mkbfb [--help|-h]

mlx-mkbfb [options...]  [INFILE(S)...]  OUTFILE

mlx-mkbfb -[x|d|c] [options...]  INFILE

mlx-mkbfb -f VERSION [options...]  INFILE OUTFILE

like, four whole moods. pick your lane ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so BFB stands for BlueField Bootstream and these files are literally what boots BlueField SoCs. no cap. inside one of these babies you've got firmware images, kernel images, kernel arguments, and sometimes an entire initramfs just chilling in there. πŸŽ€

what are they for? booting the system, bestie. either they get pushed over the rshim device, or they get installed straight onto one of the two eMMC boot partitions. and if you're trying to install to, or dump BFB files from, the eMMC? that's a mlxbf-bootctl(8) job, not this one. different girl, different page 🫢

now. the main character moment: when you're not using -x, -d, -c, or -f, mlx-mkbfb takes every INFILE plus whatever images you named in the Image Options, builds you a brand new BFB, and writes it to OUTFILE. and here's the tea β€” later images replace preceding ones. literally, whoever shows up last wins. example time:

mlx-mkbfb infile1.bfb infile2.bfb --bl2=bl2.bin outfile.bfb

so say the image bl31 exists in both infile1.bfb and infile2.bfb? then the bl31 from infile2.bfb is the one that gets emitted to outfile.bfb. sorry to infile1.bfb's bl31, it's not her era anymore 😭. but wait β€” since the argument --bl2 was specified, bl2.bin replaces any bl2 image in either infile1.bfb or infile2.bfb. she ate. πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -d, --dump β€” prints you a listing of the images inside INFILE. a lil peek behind the curtain πŸ“
  • -x, --extract β€” extracts all the images from INFILE and writes them to files in the current directory. everything. all of it. dumped right in your cwd 🌈
  • -c, --check β€” checks the integrity of INFILE. vibe check, but for your bootstream ⭐
  • -p, --prefix PREFIX β€” the prefix for files extracted by -x. default is "dump-". cute, customizable ✨
  • -f, --filter VERSION β€” filters away all images from INFILE that aren't needed to boot VERSION. so it removes images with versions higher than VERSION, and it also removes any images that get overridden with a later version. and by default this is done carefully, so that at least one compatible image is present in OUTFILE per ID in INFILE. she's thorough, she's responsible πŸŽ€
  • -s, --strip VERSION β€” modifies -f. instead of filtering out everything unneeded, it only filters out the version specified by VERSION. heads up tho: -s and -f may be different versions. plot twist πŸŒ€
  • --no-careful β€” modifies -f. disables the "careful" image preservation, so everything matching the -s/-f filter is removed.
⚠️ resulting images will likely not boot on their own. this is the chaotic option. respect her or don't, but she means it πŸ’€
  • -v, --verbose β€” more verbose output. she will yap (affectionately) πŸ™ˆ
  • -e, --expert β€” expert mode. orders the images within OUTFILE to match the order they're specified on the command line by Image Options.
🚫 this option cannot be used with -x, -d, or -c. no mixing, bestie.

πŸ‘‘ Image Options πŸ‘‘

when you run without -d, -x, or -c, the image options are what control which images get added to OUTFILE. every single image option is one of these three forms:

--image-name=IMAGE
--image-name-v0=IMAGE
--image-name-v1=IMAGE

if you don't specify a version (v0/v1), then 0 is the default. and those versions? they reflect which platform the image is meant for β€” v0 for BlueField 1 and v1 for BlueField 2. slay, platform-specific πŸ’œ

IMAGE is the path to the desired image. but here's the fun part: if IMAGE begins with "=", then IMAGE is taken as a literal string and inserted directly into the BFB file, minus that leading "=". for example:

--boot-args='=debug isolcpus=10'

that will insert those arguments into the BFB, and use them to boot the kernel image. iconic behavior tbh πŸ”₯

and listen, the list of image options is quite large. like, huge. to see an up-to-date list of images supported by the BFB format, just run:

mlx-mkbfb --help

🌟 SEE ALSO 🌟

mlxbf-bootctl(8) β€” her sister page, go say hi 🫢


and that's the whole page, bestie!! this one's from way back in June 2020, living in the General Commands Manual, and yeah it's still MLX-MKBFB(1) at heart. go boot something beautiful. mwah πŸ’–βœ¨

πŸ“¦ where this page comes from