--- /dev/null
+# SPDX-License-Identifier: GPL-2.0
+
+obj-m := rust_out_of_tree.o
+KDIR ?= /lib/modules/`uname -r`/build
+
+default:
+ $(MAKE) -C $(KDIR) M=$$PWD
+
+modules_install: default
+ $(MAKE) -C $(KDIR) M=$$PWD modules_install
+
+clean:
+ $(MAKE) -C $(KDIR) M=$$PWD clean
\ No newline at end of file
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0
+
+//! Rust out-of-tree sample
+
+use kernel::prelude::*;
+
+module! {
+ type: RustOutOfTree,
+ name: "rust_out_of_tree",
+ authors: ["Rust for Linux Contributors"],
+ description: "Rust out-of-tree sample",
+ license: "GPL",
+}
+
+struct RustOutOfTree {
+ numbers: KVec<i32>,
+}
+
+impl kernel::Module for RustOutOfTree {
+ fn init(_module: &'static ThisModule) -> Result<Self> {
+ pr_info!("Rust out-of-tree sample (init)\n");
+
+ let mut numbers = KVec::new();
+ numbers.push(72, GFP_KERNEL)?;
+ numbers.push(108, GFP_KERNEL)?;
+ numbers.push(200, GFP_KERNEL)?;
+
+ Ok(RustOutOfTree { numbers })
+ }
+}
+
+impl Drop for RustOutOfTree {
+ fn drop(&mut self) {
+ pr_info!("My numbers are {:?}\n", self.numbers);
+ pr_info!("Rust out-of-tree sample (exit)\n");
+ }
+}
\ No newline at end of file
git push -f <forked_origin> <forked_origin_branch>
+# git push create set to public
+
+git push -o repo.private=false -u origin main
+
# then PR
# squash commits
+```
+# CERTBOT
+
+```shell
+# install
+sudo apt update
+sudo apt install python3 python3-dev python3-venv libaugeas-dev gcc
+sudo python3 -m venv /opt/certbot/
+sudo /opt/certbot/bin/pip install --upgrade pip
+sudo /opt/certbot/bin/pip install certbot
+sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot
+
+# chal
+sudo certbot certonly --standalone --preferred-challenges http -d hack.feebdaed.xyz -d hack.feebdaed.xyz
+
```
source .profile
+# update
+rustup update stable
+
```
# SCRCPY ANDROID SCREEN MIRRORING