The perfect emulation setup to study and develop the Linux kernel v5.4.3, kernel modules, QEMU, gem5 and x86_64, ARMv7 and ARMv8 userland and baremetal assembly, ANSI C, C++ and POSIX. GDB step debug and KGDB just work. Powered by Buildroot and crosstool-NG. Highly automated. Thoroughly documented. Automated tests. "Tested" in an Ubuntu 24.04 host.
Sometimes when running, I get, very rarely this error. It is very hard to reproduce and fix... linked to python reading stdout. Python, I both love and hate you.
common.run_cmd let it pipe properly, e.g.:
./run-toolchain -aA --baremetal all objdump -- -S ./out/baremetal/aarch64/qemu/virt/main.elf | less
Got this one randomly once as well at a30ed0f047523ff2368d421ee2cce0800682c44e, likely related, OMG:
File "./build-buildroot", line 178, in <module>
Main().cli()
File "/path/to/linux-kernel-module-cheat/cli_function.py", line 258, in cli
exit_status = self.cli_noexit(*args, **kwargs)
File "/path/tolinux-kernel-module-cheat/cli_function.py", line 249, in cli_noexit
return self._do_main(vars(args))
File "/path/tolinux-kernel-module-cheat/cli_function.py", line 148, in _do_main
return self.main(**self._get_args(kwargs))
File "/path/to/linux-kernel-module-cheat/common.py", line 1005, in main
ret = self.timed_main()
File "/path/to/linux-kernel-module-cheat/common.py", line 1203, in timed_main
return self.build()
File "./build-buildroot", line 163, in build
cwd=self.env['buildroot_source_dir'],
File "/path/to/linux-kernel-module-cheat/shell_helpers.py", line 257, in run_cmd
sys.stdout.buffer.write(byte)
BlockingIOError: [Errno 11] write could not complete without blocking
This might be a good way to reproduce at 8f73910dd1fc1fa6dc6904ae406b7598cdcd96d7, as it produces a lot of outupt really fast:
Sometimes when running, I get, very rarely this error. It is very hard to reproduce and fix... linked to python reading stdout. Python, I both love and hate you.
common.run_cmd
let it pipe properly, e.g.:gives after closing:
BlockingIOError
Got this one randomly once as well at a30ed0f047523ff2368d421ee2cce0800682c44e, likely related, OMG:
This might be a good way to reproduce at 8f73910dd1fc1fa6dc6904ae406b7598cdcd96d7, as it produces a lot of outupt really fast: