It's a slightly long story. But basically the BBAI-64 changes cleaned up a bunch of code that determines which Beagle and Debian version are being used.
In your logs see how with v1.539 (which works) it says BBAI DEBIAN-9 USE_SPIDEV and /etc/debian_version 10.11 ? Well, the DEBIAN-9 part is obviously wrong and got fixed in v1.545 to correctly report BBAI Debian 10.11 USE_SPIDEV
But this triggered a bug. When someone tried D10 on a BBG/B a while ago (maybe it was you or Jim, I can't remember) it was found that the BBG/B D10 kernel started using spidev0 instead of spidev1 for some unknown reason (maybe a device tree change?). So code got added that used spidev1 only for Debian <= 9.
This code ended up getting used for BBAI as well. But it seems the BBAI kernel always wants to use spidev1. So the code added for BBG/B should not be used for BBAI. v1.539 worked because it was incorrectly detecting D9 which forced spidev1 to be used..
Hi, I tried to reinstall Debian 9 on BBAI from image on the KiwiSDR QuickStart, and now it's more complicated than in our instruction.
1. You will need correct Debian repositories:
sudo sed -i -e 's/deb.debian.org/archive.debian.org/g' -e 's|security.debian.org|archive.debian.org/|g' -e '/stretch-updates/d' /etc/apt/sources.list
2. I don't know why, but if you run apt update && apt upgrade afterwards, you won't be able to build the Kiwi software (make stopped with a fatal error "glib.h not found"), but I tried make && make install without upgrading the packages, and it was completed more successfully. I restored my kiwi.config from backup and kiwid start without any errors.
3. After successfully running kiwid on AI with Debian 9, I tried to upgrade OS to Debian 10 and kiwid was run on BBAI after upgrade was completed.
Maybe someone knows an easy way how to build kiwid on an AI board from a Debian 10 image?
I fixed my problem with Debian 10 BBAI image from BeagleBone site. After complite build Beagle_SDR_GPS on the folder /boot/dtbs/<kernel>/ not created file am5729-beagleboneai.dtb
It sounds like debian.org has deprecated Debian 9 just like they did Debian 8 a while back. Same symptom: The change of the repositories to archive.debian.org causes glib.h to not be found for some reason (used by the HFDL extension).
How did you upgrade to D10? Did you do it incrementally as you've done in the past or re-flash using an image from beagleboard.org?
The missing .dtb file would have been installed if you had done a make install_kiwi_device_tree in the source directory. For AI-64 this step is automatic and I need to change the Makefile to make it automatic for the AI as well.
I had error with kiwi.config/dx.json after first start kiwid, but I use backup copy and it's not important for me, but will be good, if you can fix this for new BBAI installation:
1) Upgrade BBAI (from beagleboard.org/upgrade)
cd /opt/scripts && git pull && sudo tools/update_kernel.sh --lts-4_19
cd /opt/scripts/tools/developers/ && sudo ./update_bootloader.sh
About the error with dx_config.json etc: This is an example of what can happen when you run things out of the intended order and in unexpected ways.
The migration of the label related information out of the kiwi.json configuration file into the new dx_config.json file is done very carefully by a combination of C code and Makefile rules. This is because there are a number of corner cases that have to be detected and handled properly.
I would like to understand the exact sequence of events that lead to dx_config.json being expected, but not found. But this is probably not possible because you don't know the condition of the /root/kiwi.config directory before you did the re-clone and install of v1.610
Comments
With D9 kiwid works without problems, I wrote about D10 & BBAI.
On my previous message I posted logs from same BBAI board with same D10 OS but different KiwiSDR version.
@rz3dvp Okay, I see what's wrong and will have a fix for you soon to test.
@rz3dvp Please try a change I just made by doing this (from a Linux root shell):
cdp
mst
mdi
gup
m
mi
ku
I think that should do it.
Thanks
It's a slightly long story. But basically the BBAI-64 changes cleaned up a bunch of code that determines which Beagle and Debian version are being used.
In your logs see how with v1.539 (which works) it says
BBAI DEBIAN-9 USE_SPIDEV
and/etc/debian_version 10.11
? Well, theDEBIAN-9
part is obviously wrong and got fixed in v1.545 to correctly reportBBAI Debian 10.11 USE_SPIDEV
But this triggered a bug. When someone tried D10 on a BBG/B a while ago (maybe it was you or Jim, I can't remember) it was found that the BBG/B D10 kernel started using spidev0 instead of spidev1 for some unknown reason (maybe a device tree change?). So code got added that used spidev1 only for Debian <= 9.
This code ended up getting used for BBAI as well. But it seems the BBAI kernel always wants to use spidev1. So the code added for BBG/B should not be used for BBAI. v1.539 worked because it was incorrectly detecting D9 which forced spidev1 to be used..
@jks Thank you John, now v.1.547 start without any problems:
Okay, thanks for testing.
Jim, but running Debian 9 or 10?
If D10, does your log say
### using SPI_DEV /dev/spidev0.0
or/dev/spidev1.0
?9.0, my oversight in replying
Okay, just wanted to be sure. I think this issue should be squared away for now.
Thanks
Hi, I tried to reinstall Debian 9 on BBAI from image on the KiwiSDR QuickStart, and now it's more complicated than in our instruction.
1. You will need correct Debian repositories:
sudo sed -i -e 's/deb.debian.org/archive.debian.org/g' -e 's|security.debian.org|archive.debian.org/|g' -e '/stretch-updates/d' /etc/apt/sources.list
2. I don't know why, but if you run apt update && apt upgrade afterwards, you won't be able to build the Kiwi software (make stopped with a fatal error "glib.h not found"), but I tried make && make install without upgrading the packages, and it was completed more successfully. I restored my kiwi.config from backup and kiwid start without any errors.
3. After successfully running kiwid on AI with Debian 9, I tried to upgrade OS to Debian 10 and kiwid was run on BBAI after upgrade was completed.
Maybe someone knows an easy way how to build kiwid on an AI board from a Debian 10 image?
I fixed my problem with Debian 10 BBAI image from BeagleBone site. After complite build Beagle_SDR_GPS on the folder
/boot/dtbs/<kernel>/
not created fileam5729-beagleboneai.dtb
I copped it from other BBAI and kiwid started.
It sounds like debian.org has deprecated Debian 9 just like they did Debian 8 a while back. Same symptom: The change of the repositories to archive.debian.org causes
glib.h
to not be found for some reason (used by the HFDL extension).How did you upgrade to D10? Did you do it incrementally as you've done in the past or re-flash using an image from beagleboard.org?
The missing .dtb file would have been installed if you had done a
make install_kiwi_device_tree
in the source directory. For AI-64 this step is automatic and I need to change theMakefile
to make it automatic for the AI as well.Yes, I forgot about that. Thanks, JKS!
For test I reinstalled the Beagle_SDR_GPS on my BBAI with latest Debian 10 image AM5729 Debian 10.3 2020-04-06 4GB eMMC IoT Flasher (https://debian.beagleboard.org/images/am57xx-eMMC-flasher-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz) and it was look good!
I had error with kiwi.config/dx.json after first start kiwid, but I use backup copy and it's not important for me, but will be good, if you can fix this for new BBAI installation:
1) Upgrade BBAI (from beagleboard.org/upgrade)
cd /opt/scripts && git pull && sudo tools/update_kernel.sh --lts-4_19
cd /opt/scripts/tools/developers/ && sudo ./update_bootloader.sh
sudo reboot now
2) Debian Upgrade
sudo apt update && sudo apt upgrade -y && sudo apt autoremove
3) Crontab and up CPU frequency to 1.2GHz
sudo systemctl enable cron && sudo crontab -e
And add this string to end of cron file:
@reboot sleep 10 && /usr/bin/cpufreq-set -f 1.176GHz > /dev/null
sudo reboot now
4) Install Beagle_SDR_GPS
sudo su
cd
git clone https://github.com/jks-prv/Beagle_SDR_GPS.git
cd Beagle_SDR_GPS
make clean && make && make install
make install_kiwi_device_tree
reboot now
5) Replaced
/root/kiwi.config
from backup then restart kiwid service.And now my KiwiSDR run on BBAI with Debian 10 official image.
Also I disabled WiFi&BT and removed some cloud9 packages.
@jks
For upgrade from D9 to D10 I edited
/etc/apt/sources.list
:and replace each instance of stretch to buster, my file for example:deb http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb http://deb.debian.org/debian-security buster/updates main contrib non-free
deb [arch=armhf] http://repos.rcn-ee.com/debian/ buster main
Then I started upgrade:
sudo apt update && sudo apt upgrade && sudo apt full-upgrade && sudo apt autoremove
But using Debian 10 image looks more faster and cleaner.
About the error with dx_config.json etc: This is an example of what can happen when you run things out of the intended order and in unexpected ways.
The migration of the label related information out of the kiwi.json configuration file into the new dx_config.json file is done very carefully by a combination of C code and Makefile rules. This is because there are a number of corner cases that have to be detected and handled properly.
I would like to understand the exact sequence of events that lead to dx_config.json being expected, but not found. But this is probably not possible because you don't know the condition of the /root/kiwi.config directory before you did the re-clone and install of v1.610
@jks I can share the kiwi.config folder with the error if that's helpful. My step-by-step instruction always give broken kiwi.config.
Maybe problem not only with dx_config.json:
Okay, that's great that it's reproducible. I'll try and replicate it here.
Okay, I think I've fixed this. Typo plus bug in the main Makefile. Any future gclone/install should work now.
@jks Today I reinstalled my BBAI with D10 again and now it's 100% successful without any problems! Thanks a lot!
Does anyone know what command to use to set the default cpu frequency to 1GHz?
I set to Cf1 however, a reboot defaults back to 400MHz with this latest kiwi version 1.653
Thank you in advance.
Tom
Put a
cpufreq-set -f 1GHz
at the end of the file /root/.bashrc.localHi John,
I was wondering if a Debian 11 image still in the works for the BBAI.
Thank you
It's on the list. But low priority. Because I have to go through Beagle device-tree hell to make it work.