cirosantilli / linux-kernel-module-cheat

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.
https://cirosantilli.com/linux-kernel-module-cheat
GNU General Public License v3.0
4.21k stars 605 forks source link

./run --emulator gem5: Error UnboundLocalError: local variable 'arm_kernel_cli' referenced before assignment #158

Closed rahulravi26081990 closed 3 years ago

rahulravi26081990 commented 3 years ago

rahulravi26@ubuntu2004-VirtualBox:~/work/work/buildroot/linux-kernel-module-cheat$ ./run --emulator gem5

EOF Traceback (most recent call last): File "./run", line 1013, in Main().cli() File "/home/rahulravi26/work/work/buildroot/linux-kernel-module-cheat/cli_function.py", line 267, in cli exit_status = self.cli_noexit(*args, kwargs) File "/home/rahulravi26/work/work/buildroot/linux-kernel-module-cheat/cli_function.py", line 258, in cli_noexit return self._do_main(vars(args)) File "/home/rahulravi26/work/work/buildroot/linux-kernel-module-cheat/cli_function.py", line 152, in _do_main return self.main(self._get_args(kwargs)) File "/home/rahulravi26/work/work/buildroot/linux-kernel-module-cheat/common.py", line 1540, in main ret = self.timed_main() File "./run", line 616, in timed_main cmd.extend(['--command-line', 'earlycon={} earlyprintk={} lpj=7999923 root=/dev/sda {}'.format(arm_kernel_cli, console, console, kernel_cli), LF]) UnboundLocalError: local variable 'arm_kernel_cli' referenced before assignment

Note:- I have removed the out directory and clean build gem5 for x86_64. While running gem5 for aarch64, I was taking long time but still not going to console prompt. so I thought to give a try to x86_64 gem5. But after build, unable to run.

cirosantilli commented 3 years ago

Thanks for this. Let me know if the patch worked.