Skip to content

Instantly share code, notes, and snippets.

View cyyself's full-sized avatar

Yangyu Chen cyyself

View GitHub Profile
# This is a sample config file for CPU2006. It was tested with:
#
# Compiler name/version: [gcc, g++, gfortran 4.3.4]
# [gcc, g++, gfortran 4.4.4]
# [gcc, g++, gfortran 4.6.0]
# Operating system version: [SLES 11 SP1, 64-bit, gcc 4.3.4 and 4.6.0]
# [RHEL 6, 64-bit, gcc 4.4.4]
# Hardware: [Opteron]
#
# If your platform uses different versions, different
@cyyself
cyyself / fake-ipv6-pd.sh
Created May 6, 2024 15:42
Delivery IPv6 PD Prefix from Home Broadband to another site via VPN
#!/usr/bin/env sh
remote='root@10.12.10.1'
remote_if='wg_some_site'
prefix_digit=15 # prefix is /60
subnet_len=64
subnet_add=f # /60 + f = xxxf/64
lan_addr=$(ssh $remote cat /proc/net/if_inet6 | grep br-lan.1 | grep "40 00 00" | cut -f 1 -d ' ')
routed_prefix_raw=$(echo ${lan_addr:0:$prefix_digit}$subnet_add | sed 's/.\{4\}/&:/g')
routed_perfix=$routed_prefix_raw":/"$subnet_len
lan_addr=$routed_prefix_raw":1/"$subnet_len
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index 82d0d44b2b02..0bc3636026d6 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -909,6 +909,8 @@ static int axienet_rx_poll(struct napi_struct *napi, int budget)
struct sk_buff *skb, *new_skb;
struct axienet_local *lp = container_of(napi, struct axienet_local, napi_rx);
+ printk(KERN_INFO "axienet_rx_poll\n");
+
U-Boot SPL 2022.10-ge9375524 (Mar 11 2024 - 03:20:41 +0000)
00000000: PMU Major Msg: End of CA training
00000000: PMU Major Msg: End of initialization
00000000: PMU Major Msg: End of read enable training
00000000: PMU Major Msg: End of fine write leveling
00000000: PMU Major Msg: End of read dq deskew training
00000000: PMU Major Msg: End of MPR read delay center optimization
00000000: PMU Major Msg: End of Write leveling coarse delay
00000000: PMU Major Msg: End of write delay center optimization
00000000: PMU Major Msg: End of read delay center optimization
U-Boot SPL 2022.10 (Nov 28 2023 - 21:45:06 +0800)
imge: uboot load to 0 compress =1 src a500254 len=4cf2a
imge: uboot load to 0 compress =1 src a500254 len=9a710
U-Boot 2022.10 (Nov 28 2023 - 21:45:06 +0800)
CPU: rv64imafdcvsu
Model: kendryte k230 evb
DRAM: 512 MiB
#!/bin/sh
# If your system admin allows you to use `sudo mount`, this script will be useful
/usr/bin/sudo /usr/bin/mount -o bind /bin/bash /bin/mount;
/usr/bin/sudo /bin/mount -c "exec /bin/bash -c \"umount /bin/mount;$@\"";
#!/bin/zsh
while read -r host; do
zsh -c "out=\$(ssh $host uptime | cut -d ',' -f 3-5); echo \"\r $host \$out \"" &
done < node.txt
U-Boot SPL 2022.10 (Nov 28 2023 - 21:45:06 +0800)
imge: uboot load to 0 compress =1 src a500254 len=4cf2a
imge: uboot load to 0 compress =1 src a500254 len=9a710
U-Boot 2022.10 (Nov 28 2023 - 21:45:06 +0800)
CPU: rv64imafdcvsu
Model: kendryte k230 evb
DRAM: 512 MiB
@cyyself
cyyself / ndp_helper.sh
Created March 26, 2024 15:14
Workaround for OpenWrt NDP Proxy
#!/bin/sh
master_if='usb0'
slave_if='br-lan'
master_inet6_global=$(ip addr show dev $master_if scope global | awk '{if ($1=="inet6") {print $2}}')
if [ $master_inet6_global ]; then
ip addr add $master_inet6_global dev $slave_if
fi
exit 0
U-Boot SPL 2022.10 (Nov 28 2023 - 21:45:06 +0800)
imge: uboot load to 0 compress =1 src a500254 len=4cf2a
imge: uboot load to 0 compress =1 src a500254 len=9a710
U-Boot 2022.10 (Nov 28 2023 - 21:45:06 +0800)
CPU: rv64imafdcvsu
Model: kendryte k230 evb
DRAM: 512 MiB