Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update raspberrypizero2w_defconfig #129

Closed
wants to merge 1 commit into from

Conversation

KadenK
Copy link

@KadenK KadenK commented Jun 22, 2024

Update to use the 64-bit rpi02w defconfig consistently.

This seems to fix rpio2w connection issues noticed in #118 , #116, #86, and others focusing on the lagging/connectivity issues when using a rpi02w

@d--bisset
Copy link

@KadenK did you have another uncommitted change? maybe you updated the submodule? couldn't get this to build for zero2w

Can't find default configuration "arch/arm/configs/bcm2710_defconfig"!

@KadenK
Copy link
Author

KadenK commented Jun 23, 2024

@d--bisset, did you use git clone --recurse-submodules https://github.com/KadenK/WirelessAndroidAutoDongle.git to get the submodules?

@KadenK
Copy link
Author

KadenK commented Jun 23, 2024

Although I do have to admit, it is possible that this change isn't actually what fixes it, it could be any other change since the v0.4.0 release. I'm not exactly sure why this would fix it, seeing as I have little experience with embedded systems, but I don't think it is impossible. All I know is that this build seems to work fine for me.

@Suhailakl
Copy link

Suhailakl commented Jun 23, 2024

@d--bisset, did you use git clone --recurse-submodules https://github.com/KadenK/WirelessAndroidAutoDongle.git to get the submodules?

@KadenK I'm also getting the same error: Can't find default configuration "arch/arm/configs/bcm2710_defconfig"!
Could you check if there are any commits you missed pushing?

@anegrin
Copy link

anegrin commented Jun 23, 2024

it seems like there's no bcm2710_deconfig and 2709 is just fine so if it works it might be because of v0.4.0

raspberrypi/linux#4865 (comment)

it' mentioned here also

https://www.raspberrypi.com/documentation/computers/linux_kernel.html#default_configuration

(i was getting the same error while waiting for my zero 2w to get delivered ;) i'll give 0.4.0 a try as soon as i get it)

@KadenK
Copy link
Author

KadenK commented Jun 23, 2024

Yeah, although from my understanding (although it being limited and this stuff relatively new to me) bcm2709 is the 32-bit version and bcm2710 is the 64-bit. 2710 should exist and is mentioned throughout buildroot, but just not as a defconfig. The odd thing is, in my original clone of this repo (not my fork) I have these exact same changes and I'm able to build it just fine in that repo (using 2710), but not in a fresh clone of my own fork.

It also seems, according to the documentation you linked, to use 64-bit on a rpi02w you can use 2711, which does seem to build, but I have yet to test it in use.

@anegrin
Copy link

anegrin commented Jun 23, 2024

The odd thing is, in my original clone of this repo (not my fork) I have these exact same changes and I'm able to build it just fine in that repo (using 2710), but not in a fresh clone of my own fork.

i was in fact building from the PR

i'll give 2711 build a try then i'll wait to get my 2w by the end of upcoming week i hope

@KadenK
Copy link
Author

KadenK commented Jun 23, 2024

Honestly, I'm kind of lost now. Something changed on my local version of the fork that is not tracked by git and now I can build there with 2710 as well. I made another fresh clone and tried to build, but it failed. I then set BR2_LINUX_KERNEL_DEFCONFIG to bcm2711, built successfully, and then changed it back to bcm2710 and built it successfully. It must either be downloading and caching the bcm2710 or on error defaulting to the previous successful one, but I can't seem to find anything that supports either conclusion.

@anegrin
Copy link

anegrin commented Jun 24, 2024

then it might just be that the build env is not properly cleared across builds

buildroot version changed in v0.3.0

@anegrin
Copy link

anegrin commented Jun 27, 2024

v0.4.0 seems to work just fine i will test it these weeks, also checking the boot partition shows how bcm2710-rpi-zero-2-w.dtb is bundled so it seems consistent.

my setup is:

  • rpi zero 2w
  • headunit is Limcet box (retrofit)
  • i changed country_code to IT in /etc/hostapd.conf
  • i changed /etc/aawgd.env to AAWG_CONNECTION_STRATEGY=2 (it's more convenient for me)
  • i hardened the system after the first connection/config as described in this PR Update README.md: add hardening paragraph #109

@selfdestructer
Copy link

i will test it these weeks<

Looking forward to hearing the results. I have vicious problems with interference, skipping, lagged audio everywhere, though I didn't notice it until using CarStream which always worked well directly wired, when using the pi2w it's quite off, maybe under a second to a second, I'd have to time it. Fairly consistent, with load and actual interference being considered as well, seems to just always be in that sweet spot which is true for audio too, though that's just the track changing a second off which is no big deal, other than though, not sure if maps does it, that'd make me plug in lol so I guess if it does lag behind I can handle it.

@anegrin
Copy link

anegrin commented Jul 2, 2024

I have vicious problems with interference

I'd sees it works just great, I'm wondering if it might depend on the phone as I've got a behavior similar to what you are describing when I connected to the dongle the very first time and then the phone "adapted" the streaming.

You might wanna try developer mode in Android Auto as described here and change the Video Resolution or some other settings

@selfdestructer
Copy link

You might wanna try developer mode in Android Auto as described here and change the Video Resolution or some other settings <

Ah, good idea. I do use developer mode, though hadn't thought to adjust resolution or codec. I suppose turning it off is worth a shot too.

It's definitely worth noting that my phone is frequently close to max storage capacity too. Sometimes I'm very close, which likely is half of my issue half of the time. I'm very curious, so I'll be sure to report back after clearing some space and running some tests with your suggestions. Thank you!

@hkfuertes
Copy link
Contributor

I was able to build a 64bit version for 02w and 3a+... I will do 4 and test it... I will open a PR also if it is ok with you all.

@hkfuertes
Copy link
Contributor

If anyone is interested, I managed to build them here... but at least, with the 02w that I tested, It seems that the usb gadget does not get activated...Long time ago I read that usb-gadget was only compatible with 32bit (something to do with dwc2 driver) I don't know whats the status right now, maybe this has changed. Anyway, If anyone is interested, this branch has 64bit images for 02w, 3a and 4.
https://github.com/hkfuertes/AAWirelessDongle/tree/64bit_versions_02_3a

@hkfuertes
Copy link
Contributor

If anyone is interested, I managed to build them here... but at least, with the 02w that I tested, It seems that the usb gadget does not get activated...Long time ago I read that usb-gadget was only compatible with 32bit (something to do with dwc2 driver) I don't know whats the status right now, maybe this has changed. Anyway, If anyone is interested, this branch has 64bit images for 02w, 3a and 4. https://github.com/hkfuertes/AAWirelessDongle/tree/64bit_versions_02_3a

ssh [email protected]
[email protected]'s password: 
# dmesg | grep dwc2
[    0.698787] dwc2 3f980000.usb: supply vusb_d not found, using dummy regulator
[    0.700631] dwc2 3f980000.usb: supply vusb_a not found, using dummy regulator
[    0.702480] dwc2 3f980000.usb: Configuration mismatch. dr_mode forced to host
[    0.754856] dwc2 3f980000.usb: DWC OTG Controller
[    0.756546] dwc2 3f980000.usb: new USB bus registered, assigned bus number 1
[    0.758263] dwc2 3f980000.usb: irq 51, io mem 0x3f980000
[    0.766884] usb usb1: Manufacturer: Linux 6.1.61-v8 dwc2_hsotg

@ankitpatel8055
Copy link

I am facing difficulties in building the image following the instructions provided in the BUILDING.md file. Specifically, I am trying to build an image for the Raspberry Pi Zero 2W.
This is the error i am getting from console

make BR2_EXTERNAL=../aa_wireless_dongle/ O=output/raspberrypizero2w raspberrypizero2w_defconfig
/bin/bash: /app/buildroot/support/scripts/setlocalversion: /bin/sh^M: bad interpreter: No such file or directory
/usr/bin/env: 'bash\r': No such file or directory
mkdir -p /app/buildroot/output/raspberrypizero2w/build/buildroot-config/lxdialog
PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
   obj=/app/buildroot/output/raspberrypizero2w/build/buildroot-config -C support/kconfig -f Makefile.br conf
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"  -MM *.c > /app/buildroot/output/raspberrypizero2w/build/buildroot-config/.depend 2>/dev/null || :
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"   -c conf.c -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf.o
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"  -I. -c /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.c -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.o
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"   /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf.o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.o  -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf
rm /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.c
/bin/bash: /app/buildroot/support/scripts/mkmakefile: /bin/sh^M: bad interpreter: No such file or directory
make[1]: *** [Makefile:1051: outputmakefile] Error 126
make: *** [Makefile:82: _all] Error 2

after changing some file type to dos2unix i am able to resolve issue but now getting another error as below

+ make BR2_EXTERNAL=../aa_wireless_dongle/ O=output/raspberrypizero2w raspberrypizero2w_defconfig
/usr/bin/env: 'bash\r': No such file or directory
  GEN     /app/buildroot/output/raspberrypizero2w/Makefile
'none>:0:warning: ignoring unsupported character '
'onfig.in:3:warning: ignoring unsupported character '
'onfig.in:3:warning: ignoring unsupported character '
'onfig.in:5:warning: ignoring unsupported character '
'onfig.in:6:warning: ignoring unsupported character '
'onfig.in:7:warning: ignoring unsupported character '
'onfig.in:7:warning: ignoring unsupported character '
'onfig.in:9:warning: ignoring unsupported character '
'onfig.in:10:warning: ignoring unsupported character '
'onfig.in:11:warning: ignoring unsupported character '
'onfig.in:11:warning: ignoring unsupported character '
'onfig.in:13:warning: ignoring unsupported character '
'onfig.in:14:warning: ignoring unsupported character '
'onfig.in:15:warning: ignoring unsupported character '
'onfig.in:15:warning: ignoring unsupported character '
'onfig.in:17:warning: ignoring unsupported character '
'onfig.in:18:warning: ignoring unsupported character '
'onfig.in:19:warning: ignoring unsupported character '
'onfig.in:19:warning: ignoring unsupported character '
'onfig.in:22:warning: ignoring unsupported character '
Config.in:22: can't open file "/app/buildroot/output/raspberrypizero2w/.br2-external.in.paths"
make[1]: *** [Makefile:1012: raspberrypizero2w_defconfig] Error 1
make: *** [Makefile:82: _all] Error 2

@manio
Copy link
Contributor

manio commented Nov 6, 2024

@ankitpatel8055
How you get sources, that you need to make dos2unix. Just do a fresh git clone and you're done.

@ankitpatel8055
Copy link

ankitpatel8055 commented Nov 6, 2024

I have clone this repo using below git command

$ git clone --recurse-submodules https://github.com/nisargjhaveri/WirelessAndroidAutoDongle

After that i run below command to build image using docker

$ docker compose run --rm rpi02w

But this gives me below error

make BR2_EXTERNAL=../aa_wireless_dongle/ O=output/raspberrypizero2w raspberrypizero2w_defconfig
/bin/bash: /app/buildroot/support/scripts/setlocalversion: /bin/sh^M: bad interpreter: No such file or directory
/usr/bin/env: 'bash\r': No such file or directory
mkdir -p /app/buildroot/output/raspberrypizero2w/build/buildroot-config/lxdialog
PKG_CONFIG_PATH="" make CC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc" \
   obj=/app/buildroot/output/raspberrypizero2w/build/buildroot-config -C support/kconfig -f Makefile.br conf
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"  -MM *.c > /app/buildroot/output/raspberrypizero2w/build/buildroot-config/.depend 2>/dev/null || :
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"   -c conf.c -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf.o
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"  -I. -c /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.c -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.o
././lxdialog/check-lxdialog.sh: line 4: $'\r': command not found
././lxdialog/check-lxdialog.sh: line 6: syntax error near unexpected token `$'\r''
'/./lxdialog/check-lxdialog.sh: line 6: `ldflags()
././check.sh: line 15: syntax error: unexpected end of file
/usr/bin/gcc  -DLOCALE  -I/app/buildroot/output/raspberrypizero2w/build/buildroot-config -DCONFIG_=\"\"   /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf.o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.o  -o /app/buildroot/output/raspberrypizero2w/build/buildroot-config/conf
rm /app/buildroot/output/raspberrypizero2w/build/buildroot-config/zconf.tab.c
/bin/bash: /app/buildroot/support/scripts/mkmakefile: /bin/sh^M: bad interpreter: No such file or directory
make[1]: *** [Makefile:1051: outputmakefile] Error 126
make: *** [Makefile:82: _all] Error 2

Please help me to find and resolve issue to build image
I am using docker desktop in windows machine

@manio
Copy link
Contributor

manio commented Nov 6, 2024

Heh - I was about to ask you if you're building from windows 😜
I bet you have wrongly set line endings:
https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

@manio
Copy link
Contributor

manio commented Nov 6, 2024

... btw: can I ask for a reason you're building it yourself instead of using pre-built sd card images?

@ankitpatel8055
Copy link

I have already tried below command with github

git config --global core.autocrlf input

But still no luck.

And reason is
I just want to rename bluetooth and wifi name that's all nothing else

@manio
Copy link
Contributor

manio commented Nov 6, 2024

I just want to rename bluetooth and wifi name that's all nothing else

This could be done in configuration, you don't need to compile your own image.

@ankitpatel8055
Copy link

I will try that.I don't know it until now
Thanks bro you saved my day

@ankitpatel8055
Copy link

@manio i know it's silly question to ask but can you explain how to configure the wifi name, password and bluetooth name?
I am not able to do so

@manio
Copy link
Contributor

manio commented Nov 8, 2024

@ankitpatel8055
Wifi name: /etc/hostapd.conf
Bluetooth suffix: /etc/aawgd.env

@KadenK KadenK closed this by deleting the head repository Nov 10, 2024
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.

8 participants