Skip to content

Conversation

@diadatp
Copy link
Contributor

@diadatp diadatp commented Sep 25, 2024

WIP PR to add support for Sannce I21AG.

SOC: T10
Sensor: JXH62
WiFi: MT7601
Flash: 8MB

Will squash commits before taking out of draft.

@diadatp diadatp force-pushed the sannce-i21ag branch 2 times, most recently from 728e5c2 to 1469b21 Compare September 26, 2024 06:24
@gtxaspec gtxaspec force-pushed the master branch 9 times, most recently from 3b04d8e to bed59ab Compare November 21, 2024 08:07
@nschimme
Copy link
Contributor

@diadatp what happened to this? I'm thinking about opening a issue on the https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks repository to let more people know about Thingino but we don't have T10 support yet.

@gtxaspec
Copy link
Collaborator

We support T10 just fine! I have a few =D

@nschimme
Copy link
Contributor

Aha, then it's not mentioned on the website! cc @themactep

@themactep
Copy link
Owner

themactep commented Jan 11, 2025

T10 is well outdated and the boards we have are noname. If you have an identifiable camera model using t10 soc we can make a profile and add it to the supported list.

@gtxaspec
Copy link
Collaborator

for future reference this is a raw list of hardware we support:
https://github.com/themactep/thingino-firmware/wiki/Tech-Info-%E2%80%90-Supported-Hardware

@kalasy
Copy link

kalasy commented Feb 19, 2025

T10 is well outdated and the boards we have are noname. If you have an identifiable camera model using t10 soc we can make a profile and add it to the supported list.

Hi, I have this camera with original firmware (from 2017...) Could you try to create a profile for testing? Do you need something? I can try and disassembly the camera.

Here EliasKotlyar/Xiaomi-Dafang-Hacks#625 a lot of info, (board photos, debug, dumps, etc) from previous testing.

Thank you.

@diadatp
Copy link
Contributor Author

diadatp commented Feb 22, 2025

Have successfully been using this camera config for a few months now. It works well enough for my needs (live view and occasional recorded view) and is much nicer than the original firmware. PTZ and the typical features you'd expect to work do. Audio out had some sample rate issues that might have been fixed since I last checked.

I believe merging to main was stalled by the unusual alignment (ALIGN_BLOCK = 32K) requirements of my flash chip that goes against the established convention for the other much more recent SoCs. My recollection is fuzzy on this.

In addition the erase size set for the flash chip in the kernel was wrong (gtxaspec/thingino-linux#11) which manifested in a difficult to track down bug (filesystem corruption after first boot).

If there is still interest in this device config, I can pull it together, test against the latest upstream and make pull requests to other related utilities.

@gtxaspec
Copy link
Collaborator

gtxaspec commented Mar 5, 2025

hi @diadatp @kalasy
i've merged the PR to the linux repo, please feel free to finish this PR! =D

@kalasy
Copy link

kalasy commented Mar 6, 2025

@gtxaspec Thank you! I was doing replacing manually "sed -i '355s/32/64/' repo/thingino-linux-3-10-14-t31/arch/mips/xburst/soc-t10/chip-t10/isvp/common/spi_bus.c" in LXC container, so no more.

@diadatp This monday I was able to compile the firmware for the camera and it is working good! (some background noise in rtsp as you said but ok) To compile, I had to make adjustments to some variables that had been changed their names; so yesterday I forked the main repo with your settings for the 21AG

Take a look if you want to update your branch and merge to the main repo as gtxaspec said. I am totally a newbie in Github 😐

https://github.com/kalasy/thingino-firmware/blob/master/environment/sannce_i21ag.uenv.txt
https://github.com/kalasy/thingino-firmware/blob/master/configs/modules/t10l_jxh62_mt7601u
https://github.com/kalasy/thingino-firmware/blob/master/configs/cameras/sannce_i21ag

Also for the PTZ I had to change some values in order to be able to pan and tilt correctly

gpio_motor_h=68 69 70 71
gpio_motor_v=67 66 82 49
motor_maxstep_h=3600
motor_maxstep_v=3600
motor_pos_0=1800,2916

I think this can be done also trough webgui and even with gpio_motor_invert=true?. Anyway, I tried to center the camera but /etc/init.d/S09motor refused to work as I needed, maybe a bug? Always goes to 1800 1800 (motor_maxstep_ / 2 3600/2) even if motor_pos_0 is declared, so I changed it and now it is working as intended (to me)

root@thingino-t10l ~# sh /etc/init.d/S09motor reload
Stopping motors
- Killing by PID
stopped motors-daemon (pid 14286)
- Setting up motors
- Module motor already loaded.
- Set motors speed to 500
- Home motors
- Move to 1800,1800

kalasy@0d14758

position_motors() {
	#local x y motor_pos_0
        motor_pos_0=$(fw_printenv motor_pos_0)

	if [ -n "$motor_pos_0" ]; then
		x=$(echo $motor_pos_0 | awk -F[=,] '{print $2}')
		y=$(echo $motor_pos_0 | cut -d, -f2)
	else
		x=$((motor_maxstep_h / 2))
		y=$((motor_maxstep_v / 2))
	fi

preview-1741263622

@diadatp
Copy link
Contributor Author

diadatp commented Mar 16, 2025

@kalasy, could you share your latest working build's bin?

Looks like you've permuted gpio_motor_* to get the ptz motors moving in the right direction. Perhaps there was a change since I last forked that altered the sense of the rotation and pin ordering.

I rebased my commits onto master to build against the latest revision but my 64k ALIGN_BLOCK is causing issues. The alignment is seen as improper and partitions are marked read only. Will debug this over on the discord server when I get the time.

@kalasy
Copy link

kalasy commented Mar 16, 2025

Sure, autoupdate-full.zip Copy it to a SD card and it will install if inserted when the boot up.

Yes, I had invert gpio_motor_h, gpio_motor_x and also motor_maxstep_h=motor_maxstep_h=3600 in order to be able to complete a "360" movement.

root@thingino-t10l ~# uptime
 11:13:43 up 3 days, 23:40,  load average: 2.73, 2.68, 2.35
root@thingino-t10l ~# fw_printenv 
baseaddr=0x80600000
baudrate=115200
boot_complete=false
bootargs=setenv bootargs mem=${osmem} rmem=${rmem} ispmem=${ispmem} console=${serialport},${baudrate}n8 panic=${panic_timeout} root=${root} rootfstype=${rootfstype} init=${init} ${mtdparts}
bootcmd=sf probe-alt;sq probe-alt;run mtdparts;run bootargs;sf read ${baseaddr} ${kern_addr} ${kern_size};bootm ${baseaddr}
bootdelay=1
day_night_max=15000
day_night_min=500
disable_eth=true
disable_sd=false
enable_updates=true
ethaddr=02:e4:c5:0a:69:69
flash_len=800000
flash_sector=4096k
flash_size=8192k
gatewayip=192.168.1.1
gpio_button=64
gpio_default=18O 19o 20o 25o 26o 49o 82o 66o 67o 68o 69o 70o 71o
gpio_ir850=19
gpio_ircut=26 25
gpio_led_r=20
gpio_mmc_cd=59
gpio_motor_h=68 69 70 71
gpio_motor_v=67 66 82 49
gpio_scl=13 58
gpio_sda=12 57
gpio_speaker=63
init=/init
ipaddr=192.168.1.10
ispmem=8M@0x2100000
motor_maxstep_h=3600
motor_maxstep_v=3600
motor_pos_0=1800,2916
motor_speed=500
mtdparts=setenv mtdparts mtdparts=jz_sfc:256k(boot),32k(env),224k(config),${kern_size_dec}(kernel),${rootfs_size}(rootfs),-(rootfs_data)${update}
netmask=255.255.255.0
osmem=33M@0x0
panic_timeout=10
rmem=23M@0x2900000
root=/dev/mtdblock4
rootfstype=squashfs
serialport=ttyS1
serverip=192.168.1.254
soc=t10
stderr=serial
stdin=serial
stdout=serial
sysupgrade_complete=true
wlan_mac=*************
wlan_module=mt7601sta
wlan_pass=*************
wlan_ssid=*************

Regarding the issue 64k ALIGN_BLOCK As I wrote above, in LXC container I just edited the file repo/thingino-linux-3-10-14-t31/arch/mips/xburst/soc-t10/chip-t10/isvp/common/spi_bus.c replacing 32 to 64 (this is not necessary anymore), then added the sannce module and camera configs to the proper folders in the container and executed user-menu.sh to build the bin file, no more edits in makefile (try to revert this)

Hope this helps

@kalasy
Copy link

kalasy commented Mar 19, 2025

Mmm ,I compiled twice the binary (ALIGN_BLOCK := $(SIZE_32/64K)) with all changes from master and yes, there is a problem now.

Just for the record:

Thingino U-Boot for Ingenic T10L SPL 2013.07 (Dec 08 2024 - 10:16:40 UTC)
pll_init:332
l2cache_clk = 450000000
pll_cfg.pdiv = 8, pll_cfg.h2div = 4, pll_cfg.h0div = 4, pll_cfg.cdiv = 1, pll_cfg.l2div = 2
nf = 30, nr = 1, od0 = 1, od1 = 1
cppcr is 03c05100
CPM_CPAPCR 03b0890d
nf = 50, nr = 1, od0 = 1, od1 = 1
cppcr is 03204900
CPM_CPMPCR 0640510d
cppcr 0x9a7b5510
apll_freq = 712704000
mpll_freq = 1200000000
ddr sel mpll, cpu sel apll
ddrfreq 400000000
cclk  712704000
l2clk 356352000
h0clk 300000000
h2clk 300000000
pclk  150000000
CPM_DDRCDR(0000002c) = a0000002
DDRC_DLP:0000f003
CPM_SSICDR(00000074) = e0000011


Thingino U-Boot for Ingenic 2013.07 (Dec 08 2024 - 10:16:40 UTC)

Architecture: XBurst@I
Platform: ISVP
Built profile: T10L
SOC Model: T10L
DRAM:  64 MiB
Top of RAM usable for U-Boot at: 84000000
Reserving 699k for U-Boot at: 83f50000
Reserving 32800k for malloc() at: 81f48000
Reserving 32 Bytes for Board Info at: 81f47fe0
Reserving 124 Bytes for Global Data at: 81f47f64
Reserving 256k for boot params() at: 81f07f64
Stack Pointer at: 81f07f48
Now running in RAM - U-Boot at: 83f50000

MMC:   msc: 0
CPM_SSICDR(74) = e0000017
JZSFC: Flash chip ID: c22017
SF:    Detected MX25L64**E 8MB (c2 20 17 c2 00)
In:    serial
Out:   serial
Err:   serial
GPIO:  gpio_button: 64i
RST:   Reset button not pressed; skipping factory reset.
GPIO:  gpio_default: 18O 19o 20o 25o 26o 49o 82o 66o 67o 68o 69o 70o 71o
GPIO:  gpio_usb_en: No GPIO env settings provided
Net:   HW address for ETH: 02:E4:C5:0A:69:69
Net;   HW address$for WLAN: 02:E4:C5:0A:69:6A
Net:   Networking disabled (U-Boot)
GPIO:  gpio_default_net: N
                          ��i
R����Y��ings provided
GPIO:  gpio_mmc_power: No GPIO env settings provided
GPIO:  gpio_ircut: 26i 25i
GPIO:  gpio_user: No GPIO env settings provided
GPIO:  gpio_motor_v: 67i 66i 82i 49i
GPIO:  gpio_motor_h: 68i 69i 70i 71i
CPM_SSICDR(74) = e0000017
JZSFC: Flash chip ID: c22017
SF:    Detected MX25L64**E 8MB (c2 20 17 c2 00)
SF:    flash_size env set to 8192k
SF:    flash_sector env set to 4096k
SF:    probe-alt command completed in 16ms
CPM_MSC0CDR(68) = 2000000e
CPM_MSC0CDR(68) = 2000000e
CPM_MSC0CDR(68) = 2000000e
CPM_MSC0CDR(68) = 2000000d
SDU:   Checking for autoupdate files...
SDU:   Checking for u-boot update flag file...
FAT:   loading autoupdate-uboot.done
FAT:   Unable to read file autoupdate-uboot.done **
SDU:   Checking for u-boot update file...
FAT:   loading autoupdate-uboot.bin
FAT:   Unable to read file autoupdate-uboot.bin **
SDU:   U-boot update file not found
SDU:   Checking for full update flag file...
FAT:   loading autoupdate-full.done
1 bytes read in 4 ms (0 Bytes/s)
SDU:   Flag file autoupdate-full.done exists, skipping full update
MMC:   Checking for kernel image from MMC... 
FAT:   loading thingino_t10_kernel
FAT:   loading thingino_t10_kernel_1
FAT:   loading thingino_t10_kernel_2
MMC:   Kernel file not found.
MMC:   Checking for boot/env files...
FAT:   loading boot.scr
FAT:   Unable to read file boot.scr **
FAT:   loading uEnv.txt
66 bytes read in 3 ms (21.5 KiB/s)
MMC:   Loading uEnv.txt
FAT:   loading uEnv.txt
66 bytes read in 3 ms (21.5 KiB/s)
CPM_SSICDR(74) = e0000017
JZSFC: Flash chip ID: c22017
SF:    Detected MX25L64**E 8MB (c2 20 17 c2 00)
ENV:   Erasing SPI flash...
ENV:   Writing to SPI flash... done
KEY:   ###### Press Ctrl-C now to interrupt boot... loading in 1s ######
CPM_SSICDR(74) = e0000017
JZSFC: Flash chip ID: c22017
SF:    Detected MX25L64**E 8MB (c2 20 17 c2 00)
SF:    flash_size env set to 8192k
SF:    flash_sector env set to 4096k
SF:    probe-alt command completed in 15ms
SF:    1048576 bytes @ 0x50000 Read: OK
SF:    read command completed in 340ms
SQ:    Kernel start address found: 0x80000
SF:    1376256 bytes @ 0x1b5000 Read: OK
SF:    read command completed in 444ms
SQ:    rootfs start address found: 0x200000
SF:    100 bytes @ 0x200000 Read: OK
SF:    read command completed in 4ms
SQ:    Bytes used from SquashFS header: 0x596984
SQ:    Aligned bytes used: 0x598000
SQ:    rootfs_size env set to: 5728k
SQ:    Computed kernel partition size (hex): 0x180000
SQ:    Computed kernel partition size (decimal): 1536k
SQ:    Update ENV updated with: ,7680k@0x80000(upgrade),8192k@0(all)
SF:    100 bytes @ 0x200000 Read: OK
SF:    read command completed in 4ms
SQ:    Bytes used from SquashFS header: 0x596984
SQ:    Aligned bytes used: 0x598000
SQ:    rootfs_size env set to: 5728k
SQ:    overlay start address set to: 0x798000
SF:    1572864 bytes @ 0x80000 Read: OK
SF:    read command completed in 507ms
## Booting kernel from Legacy Image at 0x80600000 ...
   Image Name:   Linux-3.10.14
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1541586 Bytes = 1.5 MiB
   Load Address: 80010000
   Entry Point:  803b4870
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.14 (buildroot@buildroot) (buildroot-gcc-14.2.0) #1 PREEMPT Sun Dec 8 10:16:40 UTC 2024
[    0.000000] CPU0 RESET ERROR PC:7FB4C626
[    0.000000] CPU0 revision is: 00d00100 (Ingenic Xburst)
[    0.000000] FPU revision is: 00b70000
[    0.000000] CCLK:712MHz L2CLK:356Mhz H0CLK:200MHz H2CLK:200Mhz PCLK:100Mhz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 00470000 @ 00010000 (usable)
[    0.000000]  memory: 00030000 @ 00480000 (usable after init)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 02100000 @ 00000000 (usable)
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x020fffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x020fffff]
[    0.000000] Primary instruction cache 32kB, 8-way, VIPT, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 8-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] pls check processor_id[0x00d00100],sc_jz not support!
[    0.000000] MIPS secondary cache 128kB, 8-way, linesize 32 bytes.
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 8382
[    0.000000] Kernel command line: mem=33M@0x0 rmem=23M@0x2900000 ispmem=8M@0x2100000 console=ttyS1,115200n8 panic=10 root=/dev/mtdblock4 rootfstype=squashfs init=/init mtdparts=jz_sfc:256k(boot),32k(env),224k(config),1536k(kernel),5728k(rootfs),-(rootfs_data),7680k@0x80000(upgrade),8192k@0(all)
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 27984k/33792k available (3778k kernel code, 5808k reserved, 764k data, 192k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:418
[    0.000000] clockevents_config_and_register success.
[    0.000025] Calibrating delay loop... 709.42 BogoMIPS (lpj=3547136)
[    0.059995] pid_max: default: 32768 minimum: 301
[    0.060317] Mount-cache hash table entries: 512
[    0.061008] Initializing cgroup subsys debug
[    0.061035] Initializing cgroup subsys freezer
[    0.063754] devtmpfs: initialized
[    0.066424] regulator-dummy: no parameters
[    0.066870] NET: Registered protocol family 16
[    0.095047] bio: create slab <bio-0> at 0
[    0.105874] jz-dma jz-dma: JZ SoC DMA initialized
[    0.107869] usbcore: registered new interface driver usbfs
[    0.108151] usbcore: registered new interface driver hub
[    0.108484] usbcore: registered new device driver usb
[    0.109326] i2c-gpio i2c-gpio.0: using pins 12 (SDA) and 13 (SCL)
[    0.109693] i2c-gpio i2c-gpio.1: using pins 57 (SDA) and 58 (SCL)
[    0.109949] media: Linux media interface: v0.10
[    0.110924] Linux video capture interface: v2.00
[    0.114374] cfg80211: Calling CRDA to update world regulatory domain
[    0.116394] Switching to clocksource jz_clocksource
[    0.121090] jz-dwc2 jz-dwc2: cgu clk gate get error
[    0.121166] DWC IN OTG MODE
[    0.123480] dwc2 dwc2: Keep PHY ON
[    0.123502] dwc2 dwc2: Using Buffer DMA mode
[    0.123520] dwc2 dwc2: Core Release: 3.00a
[    0.123572] dwc2 dwc2: DesignWare USB2.0 High-Speed Host Controller
[    0.123609] dwc2 dwc2: new USB bus registered, assigned bus number 1
[    0.125428] hub 1-0:1.0: USB hub found
[    0.125474] hub 1-0:1.0: 1 port detected
[    0.125685] dwc2 dwc2: DWC2 Host Initialized
[    0.126264] dwc2 dwc2: enter dwc2_gadget_plug_change:2588: plugin = 1 pullup_on = 0 suspend = 0
[    0.127225] NET: Registered protocol family 2
[    0.127863] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.127900] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.127926] TCP: Hash tables configured (established 512 bind 512)
[    0.128004] TCP: reno registered
[    0.128026] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.128060] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.128387] NET: Registered protocol family 1
[    0.128865] RPC: Registered named UNIX socket transport module.
[    0.128884] RPC: Registered udp transport module.
[    0.128894] RPC: Registered tcp transport module.
[    0.128904] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.129858] freq_udelay_jiffys[0].max_num = 10
[    0.129874] cpufreq 	udelay 	loops_per_jiffy	
[    0.129885] 12000	 59724	 59724	
[    0.129896] 24000	 119448	 119448	
[    0.129906] 60000	 298620	 298620	
[    0.129917] 120000	 597241	 597241	
[    0.129928] 200000	 995402	 995402	
[    0.129938] 300000	 1493103	 1493103	
[    0.129949] 600000	 2986206	 2986206	
[    0.129960] 792000	 3941793	 3941793	
[    0.129971] 1008000	 5016827	 5016827	
[    0.129982] 1200000	 5972413	 5972413	
[    0.147219] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.149331] jffs2: version 2.2. © 2001-2006 Red Hat, Inc.
[    0.150358] msgmni has been set to 54
[    0.152023] io scheduler noop registered
[    0.152081] io scheduler cfq registered (default)
[    0.164670] jz-uart.1: ttyS1 at MMIO 0x10031000 (irq = 58) is a uart1
[    0.226626] dwc2 dwc2: ID PIN CHANGED!
[    0.662930] console [ttyS1] enabled
[    0.667732] logger: created 256K log 'log_main'
[    0.675547] jz TCU driver register completed
[    0.681555] the id code = c22017, the flash name is MX25L6406F
[    0.687695] usb 1-1: new high-speed USB device number 2 using dwc2
[    0.694237] JZ SFC Controller for SFC channel 0 driver register
[    0.700466] 8 cmdlinepart partitions found on MTD device jz_sfc
[    0.706855] Creating 8 MTD partitions on "jz_sfc":
[    0.711799] 0x000000000000-0x000000040000 : "boot"
[    0.718559] 0x000000040000-0x000000048000 : "env"
[    0.723413] mtd: partition "env" doesn't end on an erase block -- force read-only
[    0.733013] 0x000000048000-0x000000080000 : "config"
[    0.738270] mtd: partition "config" doesn't start on an erase block boundary -- force read-only
[    0.749020] 0x000000080000-0x000000200000 : "kernel"
[    0.755923] 0x000000200000-0x000000798000 : "rootfs"
[    0.761322] mtd: partition "rootfs" doesn't end on an erase block -- force read-only
[    0.771233] 0x000000798000-0x000000800000 : "rootfs_data"
[    0.776960] mtd: partition "rootfs_data" doesn't start on an erase block boundary -- force read-only
[    0.788107] 0x000000080000-0x000000800000 : "upgrade"
[    0.795065] 0x000000000000-0x000000800000 : "all"
[    0.801857] SPI NOR MTD LOAD OK
[    0.805696] usbcore: registered new interface driver asix
[    0.811793] usbcore: registered new interface driver cdc_ether
[    0.818347] usbcore: registered new interface driver cdc_ncm
[    0.824185] i2c /dev entries driver
[    0.829766] jz-wdt: watchdog initialized
[    0.834835] TCP: cubic registered
[    0.840141] NET: Registered protocol family 10
[    0.846023] NET: Registered protocol family 17
[    0.852437] soc_vpu probe success,version:1.0.0-03203fd46d
[    0.859051] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    0.873727] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.885337] devtmpfs: mounted
[    0.889037] Freeing unused kernel memory: 192K (80480000 - 804b0000)
[    1.271657] usb 1-1: device 148f:7601 detected via OTG
[    1.627326] jffs2: Flash size not aligned to erasesize, reducing to 192KiB
[    1.634414] jffs2: Too few erase blocks (3)
mount: mounting /dev/mtdblock2 on /overlay failed: Invalid argument
Init: [ERROR] Failed to mount /dev/mtdblock2 as /overlay!
mount: mounting /dev/root on / failed: Permission denied
mkdir: can't create directory '/mnt/nfs': Read-only file system
Starting watchdog ...
  /sbin/watchdog -- -T 60 /dev/watchdog
U-Boot environment ...
Starting LED daemon ...
  /bin/ledd -- 0.05 /run/boot
Setting initial system time ...
- Sun Dec  8 10:16:40 UTC 2024 (fail-safe)

Press the [f] key to enter failsafe mode

Thingino firmware built for sannce_i21ag
[sannce21ag+7d32155, 2025-03-19 09:54:18 +0000]

Starting seedrng ...
  /sbin/seedrng -- -d /etc/seedrng
Starting syslogd ...
  /sbin/syslogd -- -n -C64 -S -t -D 
Setting timezone ...
Applying sysctl settings ...
- Sysctl settings applied
Configuring hostname ...
  Hostname ing-sannce-i21ag is default and should be generated
- Generated name: ing-sannce-i21ag-696a
- Setting hostname to ing-sannce-i21ag-696a
- Hostname in /etc/hosts is ing-sannce-i21ag
- Updating hostname in /etc/hosts
sed: can't create temp file '/etc/hostsXXXXXX': Read-only file system
- Saving hostname in /etc/hostname
/etc/init.d/S04hostname: line 66: can't create /etc/hostname: Read-only file system
- Hostname set to ing-sannce-i21ag-696a
Configuring DNS ...
- Using default DNS servers
Setting GPIOs ...
Configuring LEDs ...
- Set GPIO 20 0
Configuring USB ...
  USB power GPIO is not set
Initializing IR-CUT ...
Setting dusk2dawn ...
/etc/init.d/S07dusk2dawn: line 18: can't create /etc/cron/crontabs/root: Read-only file system
- dusk2dawn added to crontab
Initializing MMC ...
- Load jzmmc_v12 cd_gpio_pin=59
Setting up motors ...
  gpio_motor_switch is not set
- Set GPIO per motor phase
- Load motor module with parameters: hmaxstep=3600 vmaxstep=3600 hst1=68 hst2=69 hst3=70 hst4=71 vst1=67 vst2=66 vst3=82 vst4=49
  /bin/motors-daemon -- -d -p
- Set motors speed to 600
- Home motors
- Move to 1800,1800
Loading kernel modules ...
- Loading exfat 
- Loading audio spk_gpio=63 spk_level=-1��тj�b�������:�����͕ɭ��́:���}���������b��b�ڴj5R�modprobe: can���ᵽ�ձ��:�����͕ɭ��́BJ�������:�����͕ɭ��͹Z��������ݹ��嵉���J��j��ձ��zɁ�����ݹ���Ʌ��ѕ�5Rڴ5�ڪڒ��j�b���������}���}�łJ��}����ł�������ڴj5R�- Loading sensor_jxh62_t10 
Starting Button service ...
  /bin/thingino-button -- -d
Starting dropbear sshd ...
Generating 256 bit ed25519 key, this may take a while...
Couldn't create new file /etc/dropbear/dropbear_ed25519_host_key.tmp1182: Read-only file system
Exited: Failed to generate key.

  /sbin/dropbear -- -k -K 300 -R
Configuring mdev ...
- Device node: /dev/mmcblk0p1
- Mount point: /mnt/mmcblk0p1
- No processes are using /mnt/mmcblk0p1
- /dev/mmcblk0p1 is not mounted
- No mount point /mnt/mmcblk0p1 found
mkdir: can't create directory '/mnt/mmcblk0p1': Read-only file system
  Cannot create mount point /mnt/mmcblk0p1
Starting Wireless interface ...
  gpio_wlan is not set
  MMC1 is not SDIO
- Loading mt7601sta module with parameters 
- Bring inte�face wlan0 down
- Set MAC address to 02:e4:c5:0a:69:6a
ip: SIOCSIFHWADD�: Not supported
Starting WPA Supplicant ...
Can't open /dev/mtd1: Permission denied
Error: can't write fw_env to flash
/etc/init.d/S38wpa_supplicant: line 57: can't create /etc/wpa_supplicant.conf: Read-only file system
sed: can't create temp file '/etc/wpa_supplicant.confXXXXXX': Read-only file system
sed: can't create temp file '/etc/wpa_supplicant.confXXXXXX': Read-only file system
Successfully initialized wpa_supplicant
nl80211: Could not re-add multicast membership for vendor events: -2 (Interrupted system call)
Starting network ...
run-parts /etc/network/if-pre-up.d
  eth0 does not exist or is a USB device, skipping MAC address setup
run-parts: /evc/network/if-pre-up.d/set_mac_address: exit status 1

run-parts /etc/network/if-pre-up.d
ip addr add 127.0.0.1/8 dev lo
ip link set lo up
run-parts /etc/network/if-up.d
- DHCPv6 on lo
- Starting odhcp6c on lo

run-parts /etc/network/if-pre-up.d
ip link set usb0 up
ip: SIOCGIFFLAGS: No such device

run-parts /etc/network/if-pre-up.d
ip link set wlan0 up
udhcpc -x hostname:$(hostname) -S -T1 -t15 -R -b -O search -p /var/run/udhcpc.wlan0.pid -i wlan0
udhcpc: started, v1.37.0
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: broadcasting discover
udhcpc: no lease, forking to background
run-parts /etc/network/if-up.d
- DHCPv6 on wlan0
- Starting odhcp6c on wlan0

sed: can't create temp file '/etc/udhcpd-portal.confXXXXXX': Read-only file system
Captive Portal ...
  Interface 'eth0' does not exist.
  Interface 'usb0' does not exist.
  WLAN already configured
sed: can't create temp file '/etc/udhcpd-ap.confXXXXXX': Read-only file system
WLAN Access Point ...
  Interface 'eth0' does not exist.
  Interface 'usb0' does not exist.
  WLAN Access Point disabled
  No WireGuard IP address configured
Starting NTP daemon ...
- default configuration found
- use default configuration
  /sbin/ntpd -- -n -S /etc/ntpd_callback
- Sync time
Starting crond ...
  /sbin/crond -- -f -c /etc/cron/crontabs
sed: can't create temp file '/etc/httpd.confXXXXXX': Read-only file system
Starting HTTPD ...
  /sbin/httpd -- -f -c /etc/httpd.conf -r Authentication
Starting mdnsd ...
  /sbin/mdnsd -- -i  -s
Starting Telegram bot daemon ...
  /sbin/telegrambot -- 
Starting rc.local ...
Starting Prudynt ...
  /bin/env -- LD_PRELOAD=/lib/libimp_control.so /bin/prudynt -- 
Starting Ingenic Audio Daemon ...
  /bin/iad -- -r -c /etc/iad.json
IMP Configuration ...
- Connecting to libimp-control
....   Nothing to restore
mkdir: can't create directory '/etc/webui': Read-only file system
touch: /etc/webui/onvif.conf: No such file or directory
/etc/init.d/S96onvif_discovery: .: line 21: can't open '/etc/webui/onvif.conf': No such file or directory
Starting record...
Disabled
Starting vbuffer
Motion guard disabled
Starting ONVIF Notify service ...
  /sbin/onvif_notify_server -- --conf_file /etc/onvif.conf --pid_file /run/onvif_notify_server.pid
Checking sysupgrade ...
Stopping LED daemon ...
- Killing ledd by PID
stopped ledd (pid 573)

Welcome to Thingino firmware!

.

@diadatp
Copy link
Contributor Author

diadatp commented Mar 23, 2025

U-Boot's CONFIG_SFC_MIN_ALIGN is set to 32K. This passes the wrong size via mtdparts to the kernel that prevents a clean mount of rootfs and rootfs_data.

https://github.com/gtxaspec/ingenic-u-boot-xburst1/blob/eaa33be1dbe6c19b70e9ef285da800d1325919a3/include/configs/isvp_common.h#L610

The fixed size partitions (specifically config) are not 64K aligned which prevents a clean mount.

thingino-firmware/Makefile

Lines 145 to 150 in 47fca50

# fixed size partitions
U_BOOT_PARTITION_SIZE := $(SIZE_256K)
UB_ENV_PARTITION_SIZE := $(SIZE_32K)
CONFIG_PARTITION_SIZE := $(SIZE_224K)
KERNEL_PARTITION_SIZE = $(KERNEL_BIN_SIZE_ALIGNED)
ROOTFS_PARTITION_SIZE = $(ROOTFS_BIN_SIZE_ALIGNED)

The above two are causing the read only mount failures.

@themactep
Copy link
Owner

Set the chip to use 4k sector erase rather than 64k block erase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants