Close

[ 1.042110] Waiting for root device /dev/mmcblk0p1...

A project log for WiFi Wart

The WiFi Wart is a wall charger with a monster inside.

machinehum-ryan-walkerMachinehum (Ryan Walker) 07/01/2021 at 17:300 Comments

Buildroot is a cruel mistress... I've started building the image from the A33-OLinuXino. I used the open source files from this as a reference design for the wifi wart; I thought it would be a breeze. It turns out the PMIC used by Olinux has all the bells and whistles, I2C for control which u-boot (system bootloader) needs to configure voltages and whatnot. After ripping all that code out, I got to a point where the bootloader jamming the kernel into RAM and changing the program counter to the start address. However, I'm getting stuck on some mmc stuff...

U-Boot SPL 2021.01 (Jun 30 2021 - 12:27:42 -0700)
DRAM: 1024 MiB
Trying to boot from MMC1


U-Boot 2021.01 (Jun 30 2021 - 12:27:42 -0700) Allwinner Technology

CPU:   Allwinner A33 (SUN8I 1667)
Model: Olimex A33-OLinuXino
DRAM:  1 GiB
MMC:   mmc@1c0f000: 0
Loading Environment from FAT... Unable to use mmc 0:1... Setting up a 800x480 lcd console (overscan 0x0)
In:    serial
Out:   vga
Err:   vga
Net:   No ethernet found.
starting USB...
Bus usb@1c19000: No host cable detected: Port not available.
Hit any key to stop autoboot:  2  1  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
294 bytes read in 2 ms (143.6 KiB/s)
## Executing script at 43100000
21702 bytes read in 3 ms (6.9 MiB/s)
4058272 bytes read in 187 ms (20.7 MiB/s)
## Flattened Device Tree blob at 49000000
   Booting using the fdt blob at 0x49000000
   Using Device Tree in place at 49000000, end 490084c5

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.0.0 (machinehum@whitebox) (gcc version 10.3.0 (Buildroot 2021.05-280-g6dd9e246a7)) #1 SMP Wed Jun 30 11:51:11 PDT 2021
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Olimex A33-OLinuXino
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x7dc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0x98/0x3fc with crng_init=0
[    0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s34572 r8192 d22772 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260233
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1011440K/1047076K available (6144K kernel code, 436K rwdata, 1516K rodata, 1024K init, 242K bss, 19252K reserved, 16384K cma-reserved, 244248K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 437 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 243 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000019] Switching to timer-based delay loop, resolution 41ns
[    0.000180] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000520] Console: colour dummy device 80x30
[    0.000575] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000588] pid_max: default: 32768 minimum: 301
[    0.000719] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000735] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001397] CPU: Testing write buffer coherency: ok
[    0.001795] /cpus/cpu@0 missing clock-frequency property
[    0.001814] /cpus/cpu@1 missing clock-frequency property
[    0.001828] /cpus/cpu@2 missing clock-frequency property
[    0.001843] /cpus/cpu@3 missing clock-frequency property
[    0.001855] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002380] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002513] rcu: Hierarchical SRCU implementation.
[    0.003183] smp: Bringing up secondary CPUs ...
[    0.003981] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.004863] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.005683] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.005764] smp: Brought up 1 node, 4 CPUs
[    0.005785] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[    0.005791] CPU: All CPU(s) started in HYP mode.
[    0.005795] CPU: Virtualization extensions available.
[    0.006787] devtmpfs: initialized
[    0.011886] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.012099] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.012123] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.012974] pinctrl core: initialized pinctrl subsystem
[    0.013933] NET: Registered protocol family 16
[    0.015096] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.016082] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.016092] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.027517] SCSI subsystem initialized
[    0.028001] usbcore: registered new interface driver usbfs
[    0.028047] usbcore: registered new interface driver hub
[    0.028118] usbcore: registered new device driver usb
[    0.028309] pps_core: LinuxPPS API ver. 1 registered
[    0.028315] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti 
[    0.028333] PTP clock support registered
[    0.028554] Advanced Linux Sound Architecture Driver Initialized.
[    0.029314] clocksource: Switched to clocksource arch_sys_counter
[    0.037047] NET: Registered protocol family 2
[    0.037557] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.037586] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.037657] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.037772] TCP: Hash tables configured (established 8192 bind 8192)
[    0.037906] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.037983] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.038212] NET: Registered protocol family 1
[    0.038745] RPC: Registered named UNIX socket transport module.
[    0.038758] RPC: Registered udp transport module.
[    0.038764] RPC: Registered tcp transport module.
[    0.038768] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.040470] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.047071] NFS: Registering the id_resolver key type
[    0.047117] Key type id_resolver registered
[    0.047123] Key type id_legacy registered
[    0.049551] bounce: pool size: 64 pages
[    0.049628] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.049640] io scheduler mq-deadline registered
[    0.049647] io scheduler kyber registered
[    0.050495] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.051248] sun8i-a23-r-pinctrl 1f02c00.pinctrl: Reset controller missing
[    0.053940] sun8i-a33-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.099289] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.101107] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.101215] sun8i-a33-pinctrl 1c20800.pinctrl: Linked as a consumer to regulator.0
[    0.102002] printk: console [ttyS0] disabled
[    0.122187] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 32, base_baud = 1500000) is a U6_16550A
[    0.779019] printk: console [ttyS0] enabled
[    0.787909] libphy: Fixed MDIO Bus: probed
[    0.792063] CAN device driver interface
[    0.796497] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.803037] ehci-platform: EHCI generic platform driver
[    0.808506] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.814707] ohci-platform: OHCI generic platform driver
[    0.821139] sun6i-rtc 1f00000.rtc: registered as rtc0
[    0.826190] sun6i-rtc 1f00000.rtc: RTC enabled
[    0.830891] i2c /dev entries driver
[    0.835347] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.845317] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    0.856186] sun4i-ss 1c15000.crypto-engine: Die ID 5
[    0.863746] usbcore: registered new interface driver usbhid
[    0.869357] usbhid: USB HID core driver
[    0.874556] NET: Registered protocol family 17
[    0.879020] can: controller area network core (rev 20170425 abi 9)
[    0.885329] NET: Registered protocol family 29
[    0.889788] can: raw protocol (rev 20170425)
[    0.894054] can: broadcast manager protocol (rev 20170425 t)
[    0.899731] can: netlink gateway (rev 20170425) max_hops=1
[    0.905455] Key type dns_resolver registered
[    0.909816] Registering SWP/SWPB emulation handler
[    0.924325] sun8i-a23-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[    0.933016] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    0.943725] sun8i-a23-r-pinctrl 1f02c00.pinctrl: 1f02c00.pinctrl supply vcc-pl not found, using dummy regulator
[    0.953904] sun8i-a23-r-pinctrl 1f02c00.pinctrl: Linked as a consumer to regulator.0
[    0.961739] sunxi-rsb 1f03400.rsb: RSB running at 3000000 Hz
[    0.967698] sunxi-rsb 1f03400.rsb: /soc/rsb@1f03400/pmic@3a3: set runtime address failed: -22
[    0.976473] axp20x-rsb sunxi-rsb-3a3: AXP20x variant AXP223 found
[    0.983338] axp20x-rsb sunxi-rsb-3a3: Failed to set masks in 0x40: -5
[    0.989793] axp20x-rsb sunxi-rsb-3a3: failed to add irq chip: -5
[    0.995876] axp20x-rsb: probe of sunxi-rsb-3a3 failed with error -5
[    1.003994] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.016153] sun8i-a33-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.026719] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01T00:00:04 UTC (4)
[    1.034966] ALSA device list:
[    1.037933]   No soundcards found.
[    1.042110] Waiting for root device /dev/mmcblk0p1...

Discussions