root@XiaoQiang:~# nvram set flag_boot_success=0
root@XiaoQiang:~# nvram set flag_try_sys1_failed=1
nvram commit
root@OpenWrt:~# insmod qdf
[ 158.164364] qdf: Unknown symbol cfg80211_vendor_cmd_reply (err 0)
[ 158.164475] qdf: Unknown symbol __dynamic_pr_debug (err 0)
failed to insert /lib/modules/4.4.60/qdf.ko
root@OpenWrt:~# insmod cfg80211
[ 317.686176] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[ 317.686207] pgd = 85f4c000
[ 317.693499] [00000004] *pgd=46f54831, *pte=00000000, *ppte=00000000
Data Structures are different ways how we organize collection of data in comupter memory for faster/efficient/easier access to a perticular data in that collection. Data structure goes hand in hand with algorithm, at first we organize collection of data in a specific way, which we call a Data Structure and then we write some instructions/steps to how we can access/modify/insert/delete individual elements in that Data Structure, which we call an algorithm for that Data Structure.
The most basic data structure is a fixed size array. An array stores all of its elements next to each other, meaning if an array holds all of its data in memory range of 0-15 and it stores int type values then each element will occupy 4 bytes. So, when data is inserted it will put the first int in memory 0-3, next will be put in 4-7, next is 8-11, next is 12-15. So, basically to in an int array the data at i index will be at the memory position of i*4
and it will occupy the range i*4
-(i*4)+3
. And there are many a
# os_offset=`echo $(($(nvram get flag_boot_rootfs)-1)) | tr -d '-'` | |
r0_mtd=$(grep '"rootfs"' /proc/mtd | awk -F: '{print substr($1,4)}') | |
r1_mtd=$(grep '"rootfs_1"' /proc/mtd | awk -F: '{print substr($1,4)}') | |
os_idx=$(nvram get flag_boot_rootfs) | |
mtd_cur=$(($r0_mtd+${os_idx:-0})) | |
mtd_nxt=$(($r0_mtd+$r1_mtd-$mtd_cur)) | |
MTD_DEV=/dev/mtd$mtd_nxt | |
ubiformat $MTD_DEV -f $IMAGE -s 2048 -O 2048 |
/** html | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Bitfield Visualization</title> | |
<style> | |
canvas { | |
border: 1px solid black; |
mount [root] /mnt/nix
mount -o umask=077 [boot] /mnt/nix/boot
nixos-install --root /mnt/nix --flake [flakeuri]#[osname]
# flakeuri: https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#examples
passwd [username]
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/arm64 4.9.190 Kernel Configuration | |
# | |
CONFIG_ARM64=y | |
CONFIG_64BIT=y | |
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y | |
CONFIG_MMU=y | |
CONFIG_DEBUG_RODATA=y | |
CONFIG_ARM64_PAGE_SHIFT=12 |
ab - 1.3.42-1
airmon-ng - 1.2-rc1-2
arptables - 2015-05-20-f4ab8f63-1
base-files - 194.2-unknown
boost - 1.68.0-4
boost-atomic - 1.68.0-4
boost-chrono - 1.68.0-4
boost-date_time - 1.68.0-4
boost-filesystem - 1.68.0-4