tomeshnet / mesh-orange

A small ramdisk system running modern Debian to support mesh networking on ARM single-board computers
https://tomeshnet.github.io/mesh-orange/
GNU General Public License v2.0
39 stars 7 forks source link

Raspberry Pi 2 #32

Closed darkdrgn2k closed 6 years ago

darkdrgn2k commented 6 years ago

It seems the Raspberry Pi 2 is not executing /init

i tried booting it with init=/init as a command line argument for the kernel and that didn't seem to work either.

hamishcoleman commented 6 years ago

What does "git describe" tell you your repository version is? Do you have a serial console log of a failed boot? Does booting it with "init=/bin/bash" work?

darkdrgn2k commented 6 years ago

I'm using @benhylau build for the workshop (that works fine on a pi 3) I also pulled a new mesh-orange and built it from scratch with same results

Does not seem anything is failing at boot

Regular boot

[    0.000000] Linux version 4.9.35-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #1014 SMP Fri Jun 30 14:47:43 BST 2017
[    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: Raspberry Pi 2 Model B Rev 1.1
[    0.000000] cma: Reserved 8 MiB at 0x3d800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 14 pages/cpu @bcef9000 s25600 r8192 d23552 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 251720
[    0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ea00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 elevator=deadline
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    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: 932468K/1015808K available (7168K kernel code, 484K rwdata, 2012K rodata, 1024K init, 778K bss, 75148K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xbe800000 - 0xff800000   (1040 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xbe000000   ( 992 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x80800000   (8160 kB)
[    0.000000]       .init : 0x80b00000 - 0x80c00000   (1024 kB)
[    0.000000]       .data : 0x80c00000 - 0x80c79014   ( 485 kB)
[    0.000000]        .bss : 0x80c7b000 - 0x80d3da64   ( 779 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000011] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000034] Switching to timer-based delay loop, resolution 52ns
[    0.000389] Console: colour dummy device 80x30
[    0.001352] console [tty1] enabled
[    0.001411] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001488] pid_max: default: 32768 minimum: 301
[    0.001933] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001985] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.003419] Disabling cpuset control group subsystem
[    0.003691] CPU: Testing write buffer coherency: ok
[    0.003787] ftrace: allocating 22390 entries in 66 pages
[    0.059174] CPU0: update cpu_capacity 1024
[    0.059252] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[    0.059352] Setting up static identity map for 0x100000 - 0x100034
[    0.062558] CPU1: update cpu_capacity 1024
[    0.062570] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
[    0.063641] CPU2: update cpu_capacity 1024
[    0.063651] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
[    0.064625] CPU3: update cpu_capacity 1024
[    0.064634] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
[    0.064749] Brought up 4 CPUs
[    0.064950] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.064983] CPU: All CPU(s) started in HYP mode.
[    0.065013] CPU: Virtualization extensions available.
[    0.066090] devtmpfs: initialized
[    0.079226] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.079671] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.079752] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.080566] pinctrl core: initialized pinctrl subsystem
[    0.081896] NET: Registered protocol family 16
[    0.084370] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.094760] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.094821] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.095059] Serial: AMBA PL011 UART driver
[    0.097460] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.180428] bcm2835-dma 3f007000.dma: DMA legacy API manager at be80f000, dmachans=0x1
[    0.182914] SCSI subsystem initialized
[    0.183165] usbcore: registered new interface driver usbfs
[    0.183297] usbcore: registered new interface driver hub
[    0.183481] usbcore: registered new device driver usb
[    0.188806] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-07-03 14:17
[    0.190453] clocksource: Switched to clocksource arch_sys_counter
[    0.245639] VFS: Disk quotas dquot_6.6.0
[    0.245794] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.246105] FS-Cache: Loaded
[    0.246487] CacheFiles: Loaded
[    0.263077] NET: Registered protocol family 2
[    0.264372] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.264542] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.264762] TCP: Hash tables configured (established 8192 bind 8192)
[    0.264908] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.264996] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.265345] NET: Registered protocol family 1
[    0.266035] RPC: Registered named UNIX socket transport module.
[    0.266079] RPC: Registered udp transport module.
[    0.266111] RPC: Registered tcp transport module.
[    0.266142] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.266550] Trying to unpack rootfs image as initramfs...
[   55.091123] Freeing initrd memory: 52552K (abcae000 - af000000)
[   55.098284] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[   55.101482] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[   55.120378] FS-Cache: Netfs 'nfs' registered for caching
[   55.121843] NFS: Registering the id_resolver key type
[   55.121921] Key type id_resolver registered
[   55.121954] Key type id_legacy registered
[   55.125167] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[   55.125384] io scheduler noop registered
[   55.125421] io scheduler deadline registered (default)
[   55.125818] io scheduler cfq registered
[   55.131796] BCM2708FB: allocated DMA memory fd900000
[   55.131879] BCM2708FB: allocated DMA channel 0 @ be80f000
[   55.137734] Console: switching to colour frame buffer device 82x26
[   55.144777] bcm2835-rng 3f104000.rng: hwrng registered
[   55.146505] vc-cma: Videocore CMA driver
[   55.148126] vc-cma: vc_cma_base      = 0x00000000
[   55.149747] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[   55.151372] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[   55.153158] vc-mem: phys_addr:0x00000000 mem_base=0x3ea00000 mem_size:0x3f000000(1008 MiB)
[   55.177115] brd: module loaded
[   55.190091] loop: module loaded
[   55.191607] Loading iSCSI transport class v2.0-870.
[   55.193778] usbcore: registered new interface driver smsc95xx
[   55.195234] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[   55.424871] Core Release: 2.80a
[   55.426303] Setting default values for core params
[   55.427716] Finished setting default values for core params
[   55.629579] Using Buffer DMA mode
[   55.631010] Periodic Transfer Interrupt Enhancement - disabled
[   55.632475] Multiprocessor Interrupt Enhancement - disabled
[   55.633946] OTG VER PARAM: 0, OTG VER FLAG: 0
[   55.635436] Dedicated Tx FIFOs mode
[   55.637382] WARN::dwc_otg_hcd_init:1032: FIQ DMA bounce buffers: virt = 0xbd914000 dma = 0xfd914000 len=9024
[   55.640416] FIQ FSM acceleration enabled for :
[   55.640416] Non-periodic Split Transactions
[   55.640416] Periodic Split Transactions
[   55.640416] High-Speed Isochronous Endpoints
[   55.640416] Interrupt/Control Split Transaction hack enabled
[   55.648182] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x8058ef90
[   55.649747] WARN::hcd_init_fiq:460: FIQ ASM at 0x8058f300 length 36
[   55.651326] WARN::hcd_init_fiq:486: MPHI regs_base at 0xc007a000
[   55.652959] dwc_otg 3f980000.usb: DWC OTG Controller
[   55.654558] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[   55.656188] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[   55.657779] Init: Port Power? op_state=1
[   55.659310] Init: Power Port (0)
[   55.661123] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   55.662696] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   55.664250] usb usb1: Product: DWC OTG Controller
[   55.665772] usb usb1: Manufacturer: Linux 4.9.35-v7+ dwc_otg_hcd
[   55.667308] usb usb1: SerialNumber: 3f980000.usb
[   55.669914] hub 1-0:1.0: USB hub found
[   55.671503] hub 1-0:1.0: 1 port detected
[   55.674076] usbcore: registered new interface driver usb-storage
[   55.675850] mousedev: PS/2 mouse device common for all mice
[   55.678603] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[   55.680493] bcm2835-cpufreq: min=600000 max=900000
[   55.682561] sdhci: Secure Digital Host Controller Interface driver
[   55.684132] sdhci: Copyright(c) Pierre Ossman
[   55.686014] sdhost-bcm2835 3f202000.sdhost: could not get clk, deferring probe
[   55.687879] sdhci-pltfm: SDHCI platform and OF driver helper
[   55.690291] ledtrig-cpu: registered to indicate activity on CPUs
[   55.692134] hidraw: raw HID events driver (C) Jiri Kosina
[   55.694025] usbcore: registered new interface driver usbhid
[   55.695663] usbhid: USB HID core driver
[   55.698263] vchiq: vchiq_init_state: slot_zero = 0xbd980000, is_master = 0
[   55.702046] Initializing XFRM netlink socket
[   55.703770] NET: Registered protocol family 17
[   55.705587] Key type dns_resolver registered
[   55.707475] Registering SWP/SWPB emulation handler
[   55.710109] registered taskstats version 1
[   55.712234] vc-sm: Videocore shared memory driver
[   55.713874] [vc_sm_connected_init]: start
[   55.715827] vc_vchi_sm_init: failed to open VCHI service (-1)
[   55.715950] [vc_sm_connected_init]: failed to initialize shared memory service
[   55.719265] [vc_sm_connected_init]: end - returning -1
[   55.727433] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[   56.686865] console [ttyAMA0] enabled
[   56.694368] sdhost: log_buf @ bd913000 (fd913000)
[   56.780496] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[   56.787821] of_cfs_init
[   56.792126] of_cfs_init: OK
[   56.809608] Freeing unused kernel memory: 1024K (80b00000 - 80c00000)
[   56.830721] Indeed it is in host mode hprt0 = 00021501
[   56.887119] random: dd: uninitialized urandom read (16 bytes read)
[   56.905496] mmc0: host does not support reading read-only switch, assuming write-enable
[   56.919259] mmc0: new high speed SDHC card at address 0007
[   56.927727] mmcblk0: mmc0:0007 SD32G 29.0 GiB (quirks 0x80000000)
[   56.929048] random: fast init done
[   56.940960] systemd[1]: System time before build time, advancing clock.
[   56.951666]  mmcblk0: p1 p2
[   56.973426] NET: Registered protocol family 10
[   56.985341] ip_tables: (C) 2000-2006 Netfilter Core Team
[   57.004843] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[   57.028985] systemd[1]: Detected architecture arm.
[   57.030524] usb 1-1: new high-speed USB device number 2 using dwc_otg
[   57.030738] Indeed it is in host mode hprt0 = 00001101
[   57.051130] systemd[1]: Running with unpopulated /etc.
[   57.064595] systemd[1]: Set hostname to <ramdisk-efc10622>.
[   57.072187] systemd[1]: Initializing machine ID from random generator.
[   57.230187] systemd[1]: Populated /etc with preset unit settings.
[   57.261285] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[   57.270163] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   57.279809] uart-pl011 3f201000.serial: no DMA platform data
[   57.292052] hub 1-1:1.0: USB hub found
[   57.298054] hub 1-1:1.0: 5 ports detected
[   57.469040] systemd[1]: Reached target Swap.
[   57.478353] systemd[1]: Listening on udev Control Socket.
[   57.488301] systemd[1]: Listening on Network Service Netlink Socket.
[   57.499116] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   57.650617] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[   57.801240] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[   57.809626] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   57.834252] smsc95xx v1.0.5
[   57.887632] systemd-journald[134]: Received request to flush runtime journal from PID 1
[   57.946016] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:42:6c:fe
[   60.420836] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[   60.494021] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   60.503206] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

Debian GNU/Linux 9 ramdisk-efc10622 ttyAMA0

boot with init=/init

[    0.000000] Booting Linux on physical CPU 0xf00
[    0.000000] Linux version 4.9.35-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #1014 SMP Fri Jun 30 14:47:43 BST 2017
[    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: Raspberry Pi 2 Model B Rev 1.1
[    0.000000] cma: Reserved 8 MiB at 0x3d800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 14 pages/cpu @bcef9000 s25600 r8192 d23552 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 251720
[    0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ea00000 vc_mem.mem_size=0x3f00000                                                                                                                                            0  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 elevator=deadline init=/init
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    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: 932468K/1015808K available (7168K kernel code, 484K rwdata, 2012K rodata, 1024K init, 778K bss, 75148K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xbe800000 - 0xff800000   (1040 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xbe000000   ( 992 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x80800000   (8160 kB)
[    0.000000]       .init : 0x80b00000 - 0x80c00000   (1024 kB)
[    0.000000]       .data : 0x80c00000 - 0x80c79014   ( 485 kB)
[    0.000000]        .bss : 0x80c7b000 - 0x80d3da64   ( 779 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000011] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000032] Switching to timer-based delay loop, resolution 52ns
[    0.000385] Console: colour dummy device 80x30
[    0.001350] console [tty1] enabled
[    0.001408] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001487] pid_max: default: 32768 minimum: 301
[    0.001933] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001985] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.003409] Disabling cpuset control group subsystem
[    0.003688] CPU: Testing write buffer coherency: ok
[    0.003787] ftrace: allocating 22390 entries in 66 pages
[    0.059174] CPU0: update cpu_capacity 1024
[    0.059256] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[    0.059351] Setting up static identity map for 0x100000 - 0x100034
[    0.062594] CPU1: update cpu_capacity 1024
[    0.062606] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
[    0.063684] CPU2: update cpu_capacity 1024
[    0.063693] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
[    0.064683] CPU3: update cpu_capacity 1024
[    0.064692] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
[    0.064806] Brought up 4 CPUs
[    0.065008] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.065041] CPU: All CPU(s) started in HYP mode.
[    0.065071] CPU: Virtualization extensions available.
[    0.066148] devtmpfs: initialized
[    0.079322] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.079774] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.079853] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.080675] pinctrl core: initialized pinctrl subsystem
[    0.081990] NET: Registered protocol family 16
[    0.084494] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.094922] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.094984] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.095224] Serial: AMBA PL011 UART driver
[    0.097652] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.180383] bcm2835-dma 3f007000.dma: DMA legacy API manager at be80f000, dmachans=0x1
[    0.182869] SCSI subsystem initialized
[    0.183119] usbcore: registered new interface driver usbfs
[    0.183246] usbcore: registered new interface driver hub
[    0.183433] usbcore: registered new device driver usb
[    0.188823] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-07-03 14:17
[    0.190497] clocksource: Switched to clocksource arch_sys_counter
[    0.245655] VFS: Disk quotas dquot_6.6.0
[    0.245808] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.246123] FS-Cache: Loaded
[    0.246508] CacheFiles: Loaded
[    0.263097] NET: Registered protocol family 2
[    0.264385] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.264555] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.264774] TCP: Hash tables configured (established 8192 bind 8192)
[    0.264919] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.265007] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.265362] NET: Registered protocol family 1
[    0.266004] RPC: Registered named UNIX socket transport module.
[    0.266049] RPC: Registered udp transport module.
[    0.266081] RPC: Registered tcp transport module.
[    0.266112] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.266517] Trying to unpack rootfs image as initramfs...
[   55.090619] Freeing initrd memory: 52552K (abcae000 - af000000)
[   55.097611] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[   55.100769] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[   55.119809] FS-Cache: Netfs 'nfs' registered for caching
[   55.121175] NFS: Registering the id_resolver key type
[   55.121252] Key type id_resolver registered
[   55.121286] Key type id_legacy registered
[   55.124501] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[   55.124716] io scheduler noop registered
[   55.124753] io scheduler deadline registered (default)
[   55.125152] io scheduler cfq registered
[   55.131078] BCM2708FB: allocated DMA memory fd900000
[   55.131157] BCM2708FB: allocated DMA channel 0 @ be80f000
[   55.137010] Console: switching to colour frame buffer device 82x26
[   55.144045] bcm2835-rng 3f104000.rng: hwrng registered
[   55.145768] vc-cma: Videocore CMA driver
[   55.147394] vc-cma: vc_cma_base      = 0x00000000
[   55.149015] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[   55.150639] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[   55.152431] vc-mem: phys_addr:0x00000000 mem_base=0x3ea00000 mem_size:0x3f000000(1008 MiB)
[   55.176154] brd: module loaded
[   55.189197] loop: module loaded
[   55.190698] Loading iSCSI transport class v2.0-870.
[   55.192849] usbcore: registered new interface driver smsc95xx
[   55.194309] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[   55.423960] Core Release: 2.80a
[   55.425394] Setting default values for core params
[   55.426809] Finished setting default values for core params
[   55.628645] Using Buffer DMA mode
[   55.630053] Periodic Transfer Interrupt Enhancement - disabled
[   55.631543] Multiprocessor Interrupt Enhancement - disabled
[   55.633016] OTG VER PARAM: 0, OTG VER FLAG: 0
[   55.634510] Dedicated Tx FIFOs mode
[   55.636460] WARN::dwc_otg_hcd_init:1032: FIQ DMA bounce buffers: virt = 0xbd914000 dma = 0xfd914000 len=9024
[   55.639492] FIQ FSM acceleration enabled for :
[   55.639492] Non-periodic Split Transactions
[   55.639492] Periodic Split Transactions
[   55.639492] High-Speed Isochronous Endpoints
[   55.639492] Interrupt/Control Split Transaction hack enabled
[   55.647257] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x8058ef90
[   55.648825] WARN::hcd_init_fiq:460: FIQ ASM at 0x8058f300 length 36
[   55.650405] WARN::hcd_init_fiq:486: MPHI regs_base at 0xc007a000
[   55.652034] dwc_otg 3f980000.usb: DWC OTG Controller
[   55.653629] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[   55.655256] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[   55.656847] Init: Port Power? op_state=1
[   55.658378] Init: Power Port (0)
[   55.660161] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   55.661771] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   55.663329] usb usb1: Product: DWC OTG Controller
[   55.664851] usb usb1: Manufacturer: Linux 4.9.35-v7+ dwc_otg_hcd
[   55.666388] usb usb1: SerialNumber: 3f980000.usb
[   55.668941] hub 1-0:1.0: USB hub found
[   55.670515] hub 1-0:1.0: 1 port detected
[   55.673161] usbcore: registered new interface driver usb-storage
[   55.674937] mousedev: PS/2 mouse device common for all mice
[   55.677681] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[   55.679564] bcm2835-cpufreq: min=600000 max=900000
[   55.681657] sdhci: Secure Digital Host Controller Interface driver
[   55.683227] sdhci: Copyright(c) Pierre Ossman
[   55.685117] sdhost-bcm2835 3f202000.sdhost: could not get clk, deferring probe
[   55.686988] sdhci-pltfm: SDHCI platform and OF driver helper
[   55.689409] ledtrig-cpu: registered to indicate activity on CPUs
[   55.691257] hidraw: raw HID events driver (C) Jiri Kosina
[   55.693116] usbcore: registered new interface driver usbhid
[   55.694751] usbhid: USB HID core driver
[   55.697359] vchiq: vchiq_init_state: slot_zero = 0xbd980000, is_master = 0
[   55.701057] Initializing XFRM netlink socket
[   55.702778] NET: Registered protocol family 17
[   55.704605] Key type dns_resolver registered
[   55.706520] Registering SWP/SWPB emulation handler
[   55.709147] registered taskstats version 1
[   55.711298] vc-sm: Videocore shared memory driver
[   55.712943] [vc_sm_connected_init]: start
[   55.714903] vc_vchi_sm_init: failed to open VCHI service (-1)
[   55.715028] [vc_sm_connected_init]: failed to initialize shared memory service
[   55.718350] [vc_sm_connected_init]: end - returning -1
[   55.726458] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[   56.686877] console [ttyAMA0] enabled
[   56.694441] sdhost: log_buf @ bd913000 (fd913000)
[   56.780541] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[   56.787873] of_cfs_init
[   56.792182] of_cfs_init: OK
[   56.809664] Freeing unused kernel memory: 1024K (80b00000 - 80c00000)
[   56.830779] Indeed it is in host mode hprt0 = 00021501
[   56.889103] random: dd: uninitialized urandom read (16 bytes read)
[   56.905666] mmc0: host does not support reading read-only switch, assuming write-enable
[   56.919617] mmc0: new high speed SDHC card at address 0007
[   56.928282] mmcblk0: mmc0:0007 SD32G 29.0 GiB (quirks 0x80000000)
[   56.939203]  mmcblk0: p1 p2
[   56.943861] systemd[1]: System time before build time, advancing clock.
[   56.968608] random: fast init done
[   56.974805] NET: Registered protocol family 10
[   56.986729] ip_tables: (C) 2000-2006 Netfilter Core Team
[   57.006377] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP                                                                                                                                             +BLKID +ELFUTILS +KMOD +IDN)
[   57.030562] systemd[1]: Detected architecture arm.
[   57.030573] usb 1-1: new high-speed USB device number 2 using dwc_otg
[   57.030767] Indeed it is in host mode hprt0 = 00001101
[   57.052673] systemd[1]: Running with unpopulated /etc.
[   57.065863] systemd[1]: Set hostname to <ramdisk-9e22b8e6>.
[   57.073450] systemd[1]: Initializing machine ID from random generator.
[   57.232460] systemd[1]: Populated /etc with preset unit settings.
[   57.261400] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[   57.270409] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   57.281317] uart-pl011 3f201000.serial: no DMA platform data
[   57.291776] hub 1-1:1.0: USB hub found
[   57.297721] hub 1-1:1.0: 5 ports detected
[   57.474306] systemd[1]: Reached target Remote File Systems.
[   57.485066] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   57.498802] systemd[1]: Listening on Journal Socket (/dev/log).
[   57.515365] systemd[1]: Listening on Journal Socket.
[   57.640643] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[   57.772157] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[   57.780876] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   57.791896] smsc95xx v1.0.5
[   57.846940] systemd-journald[125]: Received request to flush runtime journal from PID 1
[   57.897506] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:42:6c:fe
[   60.374213] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[   60.443953] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   60.453137] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
darkdrgn2k commented 6 years ago

also running "init" from console seem to work without any unexpected errors

root@ramdisk-efc10622:/# ./init

Starting Ramdisk System

mount: proc is already mounted or /proc busy
       proc is already mounted on /proc
Checking for configuration files on mmcblk0p1
Applying configurations from /dev/mmcblk0p1: /mnt/conf.d/30-mesh-workshop.tar.gz
Executing configurations from /dev/mmcblk0p1: /mnt/conf.d/30-swap-filesystem.sh
[  107.832498] Adding 6143996k swap on /dev/mmcblk0p2.  Priority:-1 extents:1 across:6143996k SSFS
Executing configurations from /dev/mmcblk0p1: /mnt/conf.d/35-copy-dockerfiles.sh
Checking for configuration files on mmcblk0p2
mount: unknown filesystem type 'swap'
Error: mount /dev/mmcblk0p2 to /mnt as read-only failed
Error: processing of configuration files on mmcblk0p2 failed
Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.
root@ramdisk-efc10622:/#
hamishcoleman commented 6 years ago

I really do need you to give me the exact git commitid from this repository that you are using - if you are not using this repository to build things, I cannot use this repository to even try to replicate your issue.

Also, I'm somewhat confused now - what is your "regular" boot above? that looks like it is booting fine to a ramdisk system. The ramdisk system always boots from "/init", and it does not need to be specified (but if it is specified, it

All that being said, I dont think I understand what you are trying to do...

darkdrgn2k commented 6 years ago

Sorry reading back I realize I was not clear without context.

The issue is with the custom configs not loading (the SCRIPT /init)

Regular is an unmodified kernel line Vs the other one with is with init=/init

[ 0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ea00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 elevator=deadline vs [ 0.000000] Kernel command line: bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ea00000 vc_mem.mem_size=0x3f00000 0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 elevator=deadline init=/init

From what I understand during the boot process the this script is to run to install/apply the configs from /init.d which then execute 20confd.sh that reads the conf.d scripts

Problem is it look like /init is not running ie "Starting Ramdisk System" does not appear anywhere nor do the configs from the sd card get applied

user@userPC:~/a/mesh-orange$ git describe
v0.6-76-g4587e71
hamishcoleman commented 6 years ago

I think you missed my point - your "regular" build is clearly running "/init". you do not need to specify it on the commandline, it is the default.

(I dont know why it wouldnt be working when you do specify it, but that just muddies the issue here)

So, currently, I still dont understand what you are trying to do - the /init script has run in your 'regular' boot - otherwise the hostname wouldnt be 'ramdisk-*'

hamishcoleman commented 6 years ago

Can you duplicate your issue using the boards/qemu_i386 test build?

That is the simplest and fastest way to debug things

darkdrgn2k commented 6 years ago

the config from the sd card was not applied

PS: this exact setup works fine on a pi3

darkdrgn2k commented 6 years ago

how do you replicate the files on a boot partition in quemm?

mount /dev/mmcblk0p1  /boot
root@ramdisk-efc10622:/# cd boot
root@ramdisk-efc10622:/boot# cd conf.d
root@ramdisk-efc10622:/boot/conf.d# ls
30-mesh-workshop.tar.gz  30-swap-filesystem.sh  35-copy-dockerfiles.sh
root@ramdisk-efc10622:/boot/conf.d# 
hamishcoleman commented 6 years ago

There is no difference between the pi2 and pi3 in this part of the system.

Are you using the exact same sdcard to boot both the pi2 and pi3? If not, can you try?

hamishcoleman commented 6 years ago

You will need to add a persistant disk to the qemu test command - there is an example of how to do this in the debian builder (see https://github.com/hamishcoleman/debian-minimal-builder/blob/master/test/Makefile#L54)

darkdrgn2k commented 6 years ago

Same SD card on a pi 3 notice the host-name is different (stored in the sd card's config)

[    0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[    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: Raspberry Pi 3 Model B Rev 1.2
[    0.000000] cma: Reserved 8 MiB at 0x3d800000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 14 pages/cpu @bcef8000 s25600 r8192 d23552 u57344
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 251720
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ea00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 elevator=deadline
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    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: 932464K/1015808K available (7168K kernel code, 484K rwdata, 2012K rodata, 1024K init, 778K bss, 75152K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xbe800000 - 0xff800000   (1040 MB)
[    0.000000]     lowmem  : 0x80000000 - 0xbe000000   ( 992 MB)
[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)
[    0.000000]       .text : 0x80008000 - 0x80800000   (8160 kB)
[    0.000000]       .init : 0x80b00000 - 0x80c00000   (1024 kB)
[    0.000000]       .data : 0x80c00000 - 0x80c79014   ( 485 kB)
[    0.000000]        .bss : 0x80c7b000 - 0x80d3da64   ( 779 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000008] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000026] Switching to timer-based delay loop, resolution 52ns
[    0.000338] Console: colour dummy device 80x30
[    0.001225] console [tty1] enabled
[    0.001280] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.001350] pid_max: default: 32768 minimum: 301
[    0.001705] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.001748] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.002844] Disabling cpuset control group subsystem
[    0.003030] CPU: Testing write buffer coherency: ok
[    0.003100] ftrace: allocating 22390 entries in 66 pages
[    0.055476] CPU0: update cpu_capacity 1024
[    0.055543] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.055642] Setting up static identity map for 0x100000 - 0x100034
[    0.057854] CPU1: update cpu_capacity 1024
[    0.057862] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.058572] CPU2: update cpu_capacity 1024
[    0.058578] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.059245] CPU3: update cpu_capacity 1024
[    0.059252] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.059334] Brought up 4 CPUs
[    0.059507] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[    0.059536] CPU: All CPU(s) started in HYP mode.
[    0.059562] CPU: Virtualization extensions available.
[    0.060322] devtmpfs: initialized
[    0.071166] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[    0.071479] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.071541] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.072103] pinctrl core: initialized pinctrl subsystem
[    0.073024] NET: Registered protocol family 16
[    0.075180] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.083916] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.083964] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.084139] Serial: AMBA PL011 UART driver
[    0.086044] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.086590] uart-pl011 3f201000.serial: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    0.086954] irq: no irq domain found for /soc/aux@0x7e215000 !
[    0.156082] bcm2835-dma 3f007000.dma: DMA legacy API manager at be80f000, dmachans=0x1
[    0.157947] SCSI subsystem initialized
[    0.158128] usbcore: registered new interface driver usbfs
[    0.158230] usbcore: registered new interface driver hub
[    0.158345] usbcore: registered new device driver usb
[    0.165034] raspberrypi-firmware soc:firmware: Attached to firmware from 2017-07-03 14:17
[    0.166339] clocksource: Switched to clocksource arch_sys_counter
[    0.213201] VFS: Disk quotas dquot_6.6.0
[    0.213312] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.213539] FS-Cache: Loaded
[    0.213805] CacheFiles: Loaded
[    0.225992] NET: Registered protocol family 2
[    0.226942] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.227079] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.227290] TCP: Hash tables configured (established 8192 bind 8192)
[    0.227403] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.227471] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.227706] NET: Registered protocol family 1
[    0.228137] RPC: Registered named UNIX socket transport module.
[    0.228169] RPC: Registered udp transport module.
[    0.228197] RPC: Registered tcp transport module.
[    0.228224] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.228502] Trying to unpack rootfs image as initramfs...
[   47.131368] Freeing initrd memory: 52552K (abcae000 - af000000)
[   47.136722] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[   47.139105] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[   47.155166] FS-Cache: Netfs 'nfs' registered for caching
[   47.156172] NFS: Registering the id_resolver key type
[   47.156224] Key type id_resolver registered
[   47.156253] Key type id_legacy registered
[   47.158676] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[   47.158824] io scheduler noop registered
[   47.158854] io scheduler deadline registered (default)
[   47.159181] io scheduler cfq registered
[   47.164895] BCM2708FB: allocated DMA memory fd910000
[   47.164948] BCM2708FB: allocated DMA channel 0 @ be80f000
[   47.170078] Console: switching to colour frame buffer device 82x26
[   47.174886] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[   47.177050] bcm2835-aux-uart 3f215040.serial: could not get clk: -517
[   47.179474] bcm2835-rng 3f104000.rng: hwrng registered
[   47.181028] vc-cma: Videocore CMA driver
[   47.182439] vc-cma: vc_cma_base      = 0x00000000
[   47.183827] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[   47.185164] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[   47.186628] vc-mem: phys_addr:0x00000000 mem_base=0x3ea00000 mem_size:0x3f000000(1008 MiB)
[   47.204384] brd: module loaded
[   47.214485] loop: module loaded
[   47.215731] Loading iSCSI transport class v2.0-870.
[   47.217619] usbcore: registered new interface driver smsc95xx
[   47.218884] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[   47.448119] Core Release: 2.80a
[   47.449331] Setting default values for core params
[   47.450587] Finished setting default values for core params
[   47.652234] Using Buffer DMA mode
[   47.653482] Periodic Transfer Interrupt Enhancement - disabled
[   47.654791] Multiprocessor Interrupt Enhancement - disabled
[   47.656091] OTG VER PARAM: 0, OTG VER FLAG: 0
[   47.657386] Dedicated Tx FIFOs mode
[   47.658965] WARN::dwc_otg_hcd_init:1032: FIQ DMA bounce buffers: virt = 0xbd904000 dma = 0xfd904000 len=9024
[   47.661565] FIQ FSM acceleration enabled for :
[   47.661565] Non-periodic Split Transactions
[   47.661565] Periodic Split Transactions
[   47.661565] High-Speed Isochronous Endpoints
[   47.661565] Interrupt/Control Split Transaction hack enabled
[   47.668219] WARN::hcd_init_fiq:459: FIQ on core 1 at 0x8058ef90
[   47.669561] WARN::hcd_init_fiq:460: FIQ ASM at 0x8058f300 length 36
[   47.670914] WARN::hcd_init_fiq:486: MPHI regs_base at 0xc007a000
[   47.672305] dwc_otg 3f980000.usb: DWC OTG Controller
[   47.673665] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[   47.675051] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[   47.676439] Init: Port Power? op_state=1
[   47.677755] Init: Power Port (0)
[   47.679219] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   47.680561] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   47.681895] usb usb1: Product: DWC OTG Controller
[   47.683200] usb usb1: Manufacturer: Linux 4.9.35-v7+ dwc_otg_hcd
[   47.684520] usb usb1: SerialNumber: 3f980000.usb
[   47.686664] hub 1-0:1.0: USB hub found
[   47.687963] hub 1-0:1.0: 1 port detected
[   47.690048] usbcore: registered new interface driver usb-storage
[   47.691510] mousedev: PS/2 mouse device common for all mice
[   47.693689] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
[   47.695278] bcm2835-cpufreq: min=600000 max=1200000
[   47.697003] sdhci: Secure Digital Host Controller Interface driver
[   47.698348] sdhci: Copyright(c) Pierre Ossman
[   47.699929] sdhost-bcm2835 3f202000.sdhost: could not get clk, deferring probe
[   47.703486] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe
[   47.704993] sdhci-pltfm: SDHCI platform and OF driver helper
[   47.709065] ledtrig-cpu: registered to indicate activity on CPUs
[   47.710680] hidraw: raw HID events driver (C) Jiri Kosina
[   47.712283] usbcore: registered new interface driver usbhid
[   47.713715] usbhid: USB HID core driver
[   47.715904] vchiq: vchiq_init_state: slot_zero = 0xbd980000, is_master = 0
[   47.719021] Initializing XFRM netlink socket
[   47.720501] NET: Registered protocol family 17
[   47.722039] Key type dns_resolver registered
[   47.723723] Registering SWP/SWPB emulation handler
[   47.725875] registered taskstats version 1
[   47.727673] vc-sm: Videocore shared memory driver
[   47.729128] [vc_sm_connected_init]: start
[   47.730741] vc_vchi_sm_init: failed to open VCHI service (-1)
[   47.730839] [vc_sm_connected_init]: failed to initialize shared memory service
[   47.733708] [vc_sm_connected_init]: end - returning -1
[   47.741214] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[   47.745785] console [ttyS0] disabled
[   47.747311] 3f215040.serial: ttyS0 at MMIO 0x0 (irq = 220, base_baud = 31250000) is a 16550
[   48.768840] console [ttyS0] enabled
[   48.774608] sdhost: log_buf @ bd907000 (fd907000)
[   48.856366] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[   48.865581] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[   48.873007] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[   48.900777] Indeed it is in host mode hprt0 = 00021501
[   48.994825] random: fast init done
[   48.996450] of_cfs_init
[   48.996561] of_cfs_init: OK
[   49.010512] Freeing unused kernel memory: 1024K (80b00000 - 80c00000)
[   49.017212] mmc0: host does not support reading read-only switch, assuming write-enable
[   49.019230] mmc0: new high speed SDHC card at address 0007
[   49.020049] mmcblk0: mmc0:0007 SD32G 29.0 GiB (quirks 0x80000000)
[   49.026869] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[   49.028416] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[   49.029969] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[   49.032760] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[   49.045334]  mmcblk0: p1 p2
[   49.106420] usb 1-1: new high-speed USB device number 2 using dwc_otg
[   49.114413] Indeed it is in host mode hprt0 = 00001101
[   49.198770] mmc1: new high speed SDIO card at address 0001
[   49.356750] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[   49.364991] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   49.374528] hub 1-1:1.0: USB hub found
[   49.380002] hub 1-1:1.0: 5 ports detected
[   49.391401] Adding 6143996k swap on /dev/mmcblk0p2.  Priority:-1 extents:1 across:6143996k SSFS
[   49.589768] systemd[1]: System time before build time, advancing clock.
[   49.617376] NET: Registered protocol family 10
[   49.627978] ip_tables: (C) 2000-2006 Netfilter Core Team
[   49.643895] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[   49.667893] systemd[1]: Detected architecture arm.
[   49.674480] systemd[1]: Running with unpopulated /etc.
[   49.686679] systemd[1]: Set hostname to <bloor>.
[   49.692999] systemd[1]: Initializing machine ID from random generator.
[   49.716400] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[   49.815018] systemd[1]: Populated /etc with preset unit settings.
[   49.846919] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[   49.855915] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[   49.866807] smsc95xx v1.0.5
[   49.980194] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:5f:0f:3c
[   49.999945] systemd[1]: Reached target Swap.
[   50.008374] systemd[1]: Listening on Journal Socket.
[   50.016905] systemd[1]: Reached target Remote File Systems.
[   50.026019] systemd[1]: Listening on udev Kernel Socket.
[   50.262492] systemd-journald[134]: Received request to flush runtime journal from PID 1
[   52.119033] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[   52.189042] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   52.198221] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   52.289750] usbcore: registered new interface driver brcmfmac
[   52.391179] brcmfmac: Firmware version = wl0: Aug  7 2017 00:46:29 version 7.45.41.46 (r666254 CY) FWID 01-f8a78378
[   52.550692] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   52.559044] brcmfmac: power management disabled
[   52.578551] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[   52.854943] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

Debian GNU/Linux 9 bloor ttyS0

bloor login: root
Password:
Linux bloor 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@bloor:~#
darkdrgn2k commented 6 years ago

Sorry missed this part so in case its relavent booting with init=/bin/sh and init=/bin/bash did NOT work took me to login prompt on both pi 2 and 3

also all the echos in the init scripts don't seem to ever display anywhere do they go somewhere or is the syslog that is not running

hamishcoleman commented 6 years ago

Thanks for testing with the init=/bin/bash - I definitely think there are two problems here, and one of them is less relevant to you (the one where init= is not working for some reason)

The echos in the init scripts /should/ be going to the serial console - as can be seen when you run the test environments.

I would expect them to appear some time just after [ 49.010512] Freeing unused kernel memory: 1024K (80b00000 - 80c00000)

Perhaps it is a kernel module load order issue, perhaps it is something that the raspberry pi foundation changed upstream. Did this issue used to work on older builds? And again, I have to ask you to test this using just the mesh-orange repository - without any addons, so I can be sure what I am looking at

darkdrgn2k commented 6 years ago

I just confirmed that this is the mesh-orange repo not ben's build.

the only "addon" is the conf.d on the vfat partition that does not seem to work anyway.

We never had a Raspberry pi 2 to test with, i just got one few weeks ago.

We also learned that the workshop we will be conducting will be on rpi 2 not 3s as previously hoped. So this is a first kick at the can for PI2 issue.

hamishcoleman commented 6 years ago

What do you mean that that is an addon? - the default build out of the mesh-orange repo does have a conf.d

Can you tell me the commit ID of the checkout that built your issue, without that I cannot reproduce your environment. If you have added any files to that after it is built, can you tell me what files and what contents.

It would be good if you can confirm if your issue is reproducible with the boards/qemu_i386 and boards/qemu_armhf test environments as I do not have a hardware test bed setup to test anything.

darkdrgn2k commented 6 years ago

user@userPC:~/a/mesh-orange$ git rev-parse HEAD 4587e715ea3b434286c8d209948050f51414448d

The only thing that is done after the mesh-orange image is created the files for the workshop are added to the /conf.d of the vfat partition

https://github.com/benhylau/mesh-workshop/releases/download/v0.1/confd-0.1.tar.gz

This is the part that doesn't seem to work. It creates the swap parition, and such.

Specifically I copied the content of the "/conf.d/bloor" folder from the above mentioned tar.gz into the /conf.d of the flashed sd card

darkdrgn2k commented 6 years ago

guess i should also mention

user@userPC:~/a/mesh-orange/debian$ git rev-parse HEAD cbe60df03196b97f1d62f88ecc57a6193c30061e

hamishcoleman commented 6 years ago

Subdirectories in conf.d are not an expected thing.

hamishcoleman commented 6 years ago

Just for your information, a better command for identifying the commit you are on is "git describe --dirty --always"

benhylau commented 6 years ago

Let me clarify, what @darkdrgn2k meant is the assets are copied over from the downloaded archive like this:

cp conf.d/bloor/* /mnt/to/BOOT/conf.d/

After that copy, the SD card will look like:

/BOOT/conf.d/30-mesh-workshop.tar.gz
             30-swap-filesystem.sh
             35-copy-dockerfiles.sh

There are no subdirectories. Perhaps it is easier to simply zip up a custom /etc/hostname into a tar.gz and observe that it does not get applied on a Raspberry Pi 2, using a vanilla build from here. A qemu test is probably not a good test, since this issue seems Raspberry Pi 2 specific. The conf.d works both on Orange Pi Zero and Raspberry Pi 3, having this work on qemu doesn't tell us much.

hamishcoleman commented 6 years ago

It is a simple request - and one that makes sense for all reported issues: "Can you replicate this issue in the provided test environment".

Yes, not all the parts are there, which is why I have pointed people both at the test environment in the debian-minimal-builder and at the commandline it uses to attach the persistent storage (patches welcome!)

I just used the test environment and was able to replicate this issue.

The issue I found is that the kernel block drivers are configured as modules in some (but not all) kernels being used.

I do not currently have any hardware test environment, so I will not be able make a fix until I build one.

benhylau commented 6 years ago

@hamishcoleman I reread our previous chat logs and finally realized what you meant now, with the debian-minimal-builder line you linked:

2018-02-06 03:20:00 benhylau I didn't see the /dev/vda in qemu, do I have to run the "make -C boards/qemu_i386 test" differently? ... 2018-02-07 00:36:24 hamish The debian minimal builder has a test environment that has a persistant disk storage file attached. If you are using the mesh-orange boards/qemu_i386 target, you will not have a persistant block image - you could port it over

So a patch like this? https://github.com/benhylau/mesh-orange/commit/25060e8f06e087bf96f35ee7887910a9ab4edaff

How do I manually access the persistent storage to put these in before the qemu envrionment boots up?

/persistent.storage/conf.d/30-mesh-workshop.tar.gz
                           30-swap-filesystem.sh
                           35-copy-dockerfiles.sh
darkdrgn2k commented 6 years ago

The issue I found is that the kernel block drivers are configured as modules in some (but not all) kernels being used.

So we just need a insmod during the "/init" file or similar?

if it helps

root@ramdisk-f52a57d5:~# lsmod
Module                  Size  Used by
bcm2835_gpiomem         3940  0
uio_pdrv_genirq         3923  0
fixed                   3285  0
uio                    10204  1 uio_pdrv_genirq
ip_tables              13161  0
x_tables               20578  1 ip_tables
ipv6                  408971  22
root@ramdisk-f52a57d5:~#

also is there a way to edit the source of the roofs ramdisk image directly? without having to re-compile the whole image? i tried mounting initrd but had no luck (im assuming thats the root fs)

darkdrgn2k commented 6 years ago

SERIAL OUTPUT I found that there was allot more logging being outputted on the HDMI console then on the serial port.

I found that adjusting the cmdline.txt file as follows produces all output to serial port while keeping the HDMI completely clear

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 elevator=deadline

(still no output until the kernel is extracted but much more detailed after that!)

Pi2 Boot Issue

To test I modified the init script to include /bin/bash as the first command. Once booted into bash i was able to run the individual commands without an issue I rebooted and issued an exit command, it continued booting without an issue

When I removed that line and booted again it did not work. However with the new console modification i was able to see this

Starting Ramdisk System 

[   56.778366] random: fast init done
[   56.859432] mmc0: host does not support reading read-only switch, assuming write-enable
[   56.868982] systemd[1]: System time before build time, advancing clock.
[   56.879681] mmc0: new high speed SDXC card at address aaaa
[   56.886307] mmcblk0: mmc0:aaaa SL64G 59.5 GiB
[   56.890801] usb 1-1: new high-speed USB device number 2 using dwc_otg
[   56.897920] Indeed it is in host mode hprt0 = 00001101
[   56.905798] NET: Registered protocol family 10
[   56.915888] ip_tables: (C) 2000-2006 Netfilter Core Team
[   56.968743] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[   56.987005]  mmcblk0: p1
[   56.987802] systemd[1]: Detected architecture arm.
[   56.987858] systemd[1]: Running with unpopulated /etc.

I modified the script again to include a bit more information and a delay (probably to long at 50 seconds i think 5 or 10 would do) and it seemed to boot fine!

---SLEEPING---
[   56.823927] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:42:6c:fe
[   56.859297] mmc0: host does not support reading read-only switch, assuming write-enable
[   56.871393] mmc0: new high speed SDXC card at address aaaa
[   56.877811] mmcblk0: mmc0:aaaa SL64G 59.5 GiB
[   56.886316]  mmcblk0: p1
---AWAKE---  
--- RUNNING ----

Starting Ramdisk System

--- END ---
--- RUNNING ----
Checking for configuration files on mmcblk0p1
Applying configurations from /dev/mmcblk0p1: /mnt/conf.d/30-mesh-workshop.tar.gz
Executing configurations from /dev/mmcblk0p1: /mnt/conf.d/30-swap-filesystem.sh
[  107.146552] Adding 6143996k swap on /dev/mmcblk0p2.  Priority:-1 extents:1 across:6143996k SSFS
Executing configurations from /dev/mmcblk0p1: /mnt/conf.d/35-copy-dockerfiles.sh
--- END ---
--- RUNNING ----
--- END ---
--- RUNNING ----
[  107.272600] systemd[1]: System time before build time, advancing clock.
[  107.301407] NET: Registered protocol family 10
[  107.312054] ip_tables: (C) 2000-2006 Netfilter Core Team
[  107.330391] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[  107.349242] systemd[1]: Detected architecture arm.
[  107.354097] systemd[1]: Running with unpopulated /etc.
darkdrgn2k commented 6 years ago

Adding a sleep 5 to the init script allows the conf files to be loaded correctly.

hamishcoleman commented 6 years ago

@benhylau yes something like that patch, except that the armhf kernel doesnt seem to work with the virtio block devices, so that is best left out until investigation has been done. And to match the rest of the boards, the persistant file should probably be in the board's $(BUILD) directory so that it gets removed by a 'make reallyclean'

There are many ways to access the contents of these files before booting the qemu (including mtools, loopback mounts and libguestfs) but as I have said previously, the simplest way is probably to boot up the qemu instance and scp your files in. If you need to automate placing these files, then your best bet is to look at how the mesh-orange project works (it is probably more than 40% a wrapper around the tools needed to manipulate disk images)

hamishcoleman commented 6 years ago

@darkdrgn2k the issue I found (which had the same symptoms as the issue you were finding) just needed some insmod, yes. Your lsmod makes it clear that there is a different issue with the raspberry pi hardware.

The initrd is a compressed cpio archive, so you can extract its contents and re-archive it, but that is not going to be significantly faster. So, it depends on what you want to edit in the ramdisk image.

I have just committed some changes to the debian builder to allow it to keep better track of dependencies, so it can easily re-build the image when it detects files changed (see the PR #33)

With that applied, if the files you are changing are in one of the CONFIGDIRS (this is the debian-config/packages.d and debian/packages.d dirs in the mesh-orange project) then a "make clean" is not needed. (It doesnt detect new files, just edits to existing ones - if you do add a new file, removing the .configdir.deps file will cause it to regenerate the dependencies and find your new file - this is harder to automate quickly, however)

hamishcoleman commented 6 years ago

I dont know why enabling the kernel debugger (with the kgdboc= kernel commandline param) would be adding more non-debugging output to the serial console, so that is probably a bad idea - especially since you are not performing kernel debugging!

There is some strangeness with the pi2 and pi3 hardware config - they changed which SoC hardware block was used (and thus the driver) for the MMC to allow adding the WiFi, they also changed the hardware block used for serial console (and again, the driver) to allow using the bluetooth. So, that probably explains the difference seen between the two hardware types - the rpi2 device driver probably is slightly slower at enumerating.

Based on @darkdrgn2k 's clear testing notes, I have committed a script to the debian builder that watches for block devices and waits up to 20 seconds for them to appear (but will exit sooner if they appear sooner)

darkdrgn2k commented 6 years ago

is the change in /init i may be doing something wrong doesn't seem to work.

hamishcoleman commented 6 years ago

There are at least 4 changes in different places. I would have to go through every commit on that branch and cherrypick to find specifics, so your best bet is to just fetch the whole branch

darkdrgn2k commented 6 years ago

just to confirm.. mesh orange is pined to a specific commit right?

hamishcoleman commented 6 years ago

Yes - the submodule points at a specific commit. However, if you pull the branch from the PR, it adjusts that pointer to a new commit, bringing in these changes.

darkdrgn2k commented 6 years ago

Tried it this morning seem to work fine now thanks.