Dafang-Hacks / Main

138 stars 63 forks source link

Help on uEnv.txt booting a (slightly) modified kernel #87

Open sundarnagarajan opened 2 years ago

sundarnagarajan commented 2 years ago

I have a Wyze Cam Pan. I flashed the open source uBoot from this repository a long time ago - Nov-2019. It is working well. Now I have a (slightly) modified kernel with some additional netfilter modules compiled. How do I setup uEnv.txt to:

I tried copying uEnv.bootfromsdcard.txt to uEnv.txt and changing this one line

bootargs=console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000 rmem=16M@0x7000000 init=/linuxrc root=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)

to

bootargs=console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000 rmem=16M@0x7000000 init=/linuxrc rootfstype=squashfs root=/dev/mtdblock2 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)

(from uEnv.bootfromnand.txt)

The full uEnv.txt I tried was:

baudrate=115200
bootargs=console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000 rmem=16M@0x7000000 init=/linuxrc rootfstype=squashfs root=/dev/mtdblock2 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)
bootcmd=sf probe;sf read 0x80600000 0x40000 0x280000; bootm 0x80600000;
bootcmd=fatload mmc 0:1 0x80600000 kernel.bin;bootm 0x80600000
bootdelay=1
ethact=Jz4775-9161
ethaddr=00:11:22:33:44:55
gatewayip=193.169.4.1
ipaddr=193.169.4.81
loads_echo=1
netmask=255.255.255.0
serverip=193.169.4.2
stderr=serial
stdin=serial

When the camera boots, the LED turns blue (presumably implying uBoot found a "valid" uEnv.txt), but it doesn't boot - just hangs.