YuC

@buobao

Joined on Apr 2, 2024

  • source Entry The entry point of the program is somewhere a function or a symbol called entry or _entry, in this project, it's in kernel/kernel.ld. why _entry is at 0x80000000 is that qemu expects the kernel to be loaded at this address. Then we can go to the entry.S file, this is where it actually starts running image .section .text 是在指示組譯器: 1.將後續的程式碼放入 .text 區域。
     Like  Bookmark
  • 作業要求 $ make make -C /lib/modules/6.11.0-19-generic/build M=/home/neat/YCL/linux2025/kxo/kxo modules make[1]: Entering directory '/usr/src/linux-headers-6.11.0-19-generic' warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 You are using: gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 CC [M] /home/neat/YCL/linux2025/kxo/kxo/main.o /home/neat/YCL/linux2025/kxo/kxo/main.c: In function ‘kxo_init’:
     Like  Bookmark
  • 作業要求 $ make make -C /lib/modules/6.11.0-19-generic/build M=/home/neat/YCL/linux2025/kxo/kxo modules make[1]: Entering directory '/usr/src/linux-headers-6.11.0-19-generic' warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 You are using: gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 CC [M] /home/neat/YCL/linux2025/kxo/kxo/main.o /home/neat/YCL/linux2025/kxo/kxo/main.c: In function ‘kxo_init’:
     Like  Bookmark
  • 第二周測驗 2-1 :::success 延伸問題: 解釋上方程式碼運作原理,改進 random_shuffle_array 也探討 list_for_each_entry_safe 建構的迴圈中,若將 list_move_tail 換為 list_move,為何會無法滿足 stable sorting 將程式碼整合進 lab0 提及的 qtest,並探討環狀雙向鏈結串列的排序效能,並善用 perf 一類的效能分析工具,探討包含 Linux 核心 list_sort 在內排序實作的效能表現並充分解釋 ::: {
     Like  Bookmark
  • contributed by < Cheng5840 > 開發環境 $ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian
     Like  Bookmark
  • contributed by < Cheng5840 >
     Like  Bookmark
  • Refactor project 1. 重複的代碼(Duplicated Code) 在 handle_player 函數中,對於上下左右的移動邏輯,幾乎完全相同,只是處理的座標不同。這種重複代碼增加了維護成本。 重構建議: 可以將移動邏輯提取到一個單獨的函數中,這樣就可以避免重複的邏輯。 然後,在 handle_player 函數中,只需要根據鍵盤輸入呼叫這個 move_player 函數。 原來的 handle_player() 變成: game_logic.c
     Like  Bookmark
  • setup (on ubuuntu linux) $ sudo apt install build-essential verilator gtkwave $ java -version openjdk version "11.0.25" 2024-10-15 OpenJDK Runtime Environment (build 11.0.25+9-post-Ubuntu-1ubuntu120.04) OpenJDK 64-Bit Server VM (build 11.0.25+9-post-Ubuntu-1ubuntu120.04, mixed mode, sharing) $ javac -version javac 11.0.25
     Like  Bookmark