I have the following code in my config.txt:This works as expected, if GPIO pin 1 is low the system boots using rescue.txt as the kernel cmdline and if GPIO pin 1 is high, it uses the default cmdline.txt. The problem happens if I uncomment either of the lines trying to set gpio 0 low. If either of these lines is uncommented, the system ignores the cmdline=rescue.txt line and always boots using cmdline.txt. The second `gpio=i=ip,pu` is so I can see in the debug serial console that the `[gpio1=0]` conditional is being processed correctly.
Any clues as why this is happening? I have tried moving around the cmdline= line, added whitespace beofre/after, and it always fails if I try setting output 0 low. Note that GPIO 0 is actually getting set low and I see a reference to these commands in the serial debug dump, so it's not totally failing.
Serial debug output with GPIO pin 1 low and the gpio=0=op,dl commands uncommented, showing the issue:
Code:
# Set GPIO 0 & 1 to gpio input with pull-up enabledgpio=0-1=ip,pu[all][gpio1=0]gpio=1=ip,pu#gpio=0=op,dlcmdline=rescue.txt[all]#gpio=0=op,dlAny clues as why this is happening? I have tried moving around the cmdline= line, added whitespace beofre/after, and it always fails if I try setting output 0 low. Note that GPIO 0 is actually getting set low and I see a reference to these commands in the serial debug dump, so it's not totally failing.
Serial debug output with GPIO pin 1 low and the gpio=0=op,dl commands uncommented, showing the issue:
Code:
5.87 Read config.txt bytes 2399 hnd 0x2e739 5.89 gpio_cmd: '0-1=ip,pu' pins: 0-1 drive: -1 fsel: 0 term: 2 5.95 gpio0 0=1 5.96 gpio1 0=0 5.98 gpio_cmd: '1=ip,pu' pins: 1-1 drive: -1 fsel: 0 term: 2 5.03 gpio_cmd: '0=op,dl' pins: 0-0 drive: 0 fsel: 16 term: -1 5.09 gpio_cmd: '0=op,dl' pins: 0-0 drive: 0 fsel: 16 term: -1 5.19 [sdcard] pieeprom.upd not found 5.19 usb_max_current_enable default 0 max-current 3000 5.31 Read bcm2712-rpi-5-b.dtb bytes 81163 hnd 0x291d3 5.34 dt-match: compatible: raspberrypi,5-model-b match: brcm,bcm2712 5.40 dt-match: compatible: brcm,bcm2712 match: brcm,bcm2712 5.47 Selecting USB low current limit 5.57 Read /config.txt bytes 2399 hnd 0x2e739 5.61 Read /config.txt bytes 2399 hnd 0x2e739 <snip lots of normal dtoverlay stuff> .... 7.14 MESS:00:00:07.514614:0: dtparam: cooling_fan=on 7.19 MESS:00:00:07.519488:0: dtdebug: /__overrides__ node not found 7.29 MESS:00:00:07.529971:0: dtdebug: found override cooling_fan 7.33 MESS:00:00:07.533062:0: dtdebug: override cooling_fan: string target 'status' 7.55 MESS:00:00:07.555143:0: dtdebug: override cooling_fan: string target 'status' 7.85 MESS:00:00:07.585099:0: dtdebug: merge_fragment(/axi/mmc@1100000,/fragment@0/__overlay__) 7.90 MESS:00:00:07.590815:0: dtdebug: +prop(status) 7.96 MESS:00:00:07.596330:0: dtdebug: merge_fragment() end 7.85 Read /cmdline.txt bytes 144 hnd 0x2e6e2 Statistics: Posted by cdsteinkuehler — Thu Apr 03, 2025 2:20 pm