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 to newer build root newer version? #2

Open
fllay opened this issue Oct 28, 2024 · 4 comments
Open

Update to newer build root newer version? #2

fllay opened this issue Oct 28, 2024 · 4 comments

Comments

@fllay
Copy link

fllay commented Oct 28, 2024

is there a way to upgrade this build root to newer version?

@jmfriedt
Copy link
Member

Depending on how familiar you are with Buildroot ... I have started backporting https://github.com/trabucayre/redpitaya which is functional with the latest BR on a Zynq7010 similar to that of the RedPitaya. I am not in the lab this week to test, will let you know when the port is complete. Thank you for your interest in this project and reminding that it is out of date.

@trabucayre
Copy link
Member

This branch was a try, in early 2023 to update this repository with a more recent buildroot.
Using redpitaya repository is not enough:

  • PlutoSDR requires to have the gateware loaded at boot time,
  • rootfs image is located into a flash chip with requirements to read dtb, rootfs, etc.
  • lot of init scripts are mandatory to configure USB as serial+network interface to avoid bricking the board

The error here was to try to have something totally similar to ADi's repository: it's really a nightmare to bump the version due to the webserver and (lot of) associated files. The best way (I think) is to reduce complexity by just having bare minimal files/packages.

@fllay
Copy link
Author

fllay commented Oct 28, 2024

Thank you for the answer. Now I stuck at build root installation. It said that it requires kernel 4.14 so I plan to modify

BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/analogdevicesinc/linux.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="c2041af164e263d852897cf90edb5cca9f677579"

to get 2018_R2 branch. Is that enough? Or I will face other errors? To my understanding, I need to follow the step in the tutorial

  • build PL to get bit file (I follow the tutorial and I got the bit file)
  • build the driver (I will get both static and dynamic lib ). In order to do this, I need a build root environment to cross compile the driver and I stuck here.
  • build an application. Again, I need the build root environment.

I think that I just make dfu_frm and it will give me the firmware and dfu that I need.

BTW, I try to install ubuntu 18.04 on my two years old machine but keyboard and trackpad don't work. Ubuntu 18.04 is too old.

@fllay
Copy link
Author

fllay commented Oct 29, 2024

Update :

After I switch to Phoenix branch, I manage to the last point but I got the error

generating the boot.img
INFO: cmd: "mkdir -p "/home/pi/src/buildroot-2024.08.1/output/build/genimage.tmp"" (stderr):
INFO: cmd: "rm -rf "/home/pi/src/buildroot-2024.08.1/output/build/genimage.tmp"/*" (stderr):
ERROR: hdimage(boot.img): partition [MBR] (offset 0x1b8, size 0x48) overlaps previous partition fsbl (offset 0x0, size 0xcb10)
ERROR: hdimage(boot.img): bootloaders, etc. that overlap with the partition table must declare the overlapping area as a hole.
INFO: cmd: "rm -rf "/home/pi/src/buildroot-2024.08.1/output/build/genimage.tmp/"" (stderr):
generating the boot.frm
cat: /home/pi/src/buildroot-2024.08.1/output/images/boot.img: No such file or directory
da9a8bf4ff64ef2f69031756b1211ad3
generating boot.dfu
cp: cannot stat '/home/pi/src/buildroot-2024.08.1/output/images/boot.img': No such file or directory
dfu-suffix (dfu-util) 0.11

Copyright 2011-2012 Stefan Schmidt, 2013-2020 Tormod Volden
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-suffix: Could not open file /home/pi/src/buildroot-2024.08.1/output/images/boot.bin.tmp for reading: No such file or directory
mv: cannot stat '/home/pi/src/buildroot-2024.08.1/output/images/boot.bin.tmp': No such file or directory
generating uboot-env.dfu
dfu-suffix (dfu-util) 0.11

Copyright 2011-2012 Stefan Schmidt, 2013-2020 Tormod Volden
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Suffix successfully added to file

However, it seems to make everything ok. until the last step make dfu_frm and the error

# entering ./image for the next command
sh: 1: dtc: not found
/home/pi/src/buildroot-2024.08.1/output/host/bin/mkimage: Can't open pluto.itb.tmp: No such file or directory
generating the pluto.frm
md5sum: ./image/pluto.itb: No such file or directory
cat: ./image/pluto.itb: No such file or directory
generating pluto.dfu
dfu-suffix (dfu-util) 0.11

Copyright 2011-2012 Stefan Schmidt, 2013-2020 Tormod Volden
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-suffix: Could not open file ./image/pluto.itb for reading: No such file or directory
mv: cannot stat './image/pluto.itb': No such file or directory

which I think due to build root was not complete. Any idea on this?

BTW the build root script seems to have a problem with this repo

https://github.com/analogdevicesinc/plutosdr_scripts

I have to git clone it manually. Then everything is ok except that partition table error.

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

No branches or pull requests

3 participants