vinyanalista
Posts: 3
Joined: Fri Nov 08, 2019 11:42 am

Where can I get the Raspbian sources?

Fri Nov 08, 2019 12:42 pm

Hi, everyone!

I've recently got a Raspberry Pi 4 and I'm trying to port openSUSE Leap 15.1 to it.

Although I was able to find some sources on GitHub, such as:

https://github.com/raspberrypi/firmware
https://github.com/raspberrypi/linux

And on GitLab (for Manjaro):

https://gitlab.manjaro.org/manjaro-arm/ ... linux-rpi4

I was not able to fetch Raspbian sources.

I've used Debian and Ubuntu for some years, so on my RPi4 with Raspbian Buster I did:

Code: Select all

sudo nano /etc/apt/sources.list
And uncommented, as suggested:

Code: Select all

deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
Closed and saved the file and back to CLI:

Code: Select all

sudo apt-get update
But these commands don't work, they say the package was not found:

Code: Select all

apt-cache showsrc raspberrypi-firmware
apt-get source raspberrypi-firmware
apt-cache showsrc raspberrypi-kernel
apt-get source raspberrypi-kernel
For comparison, these work:

Code: Select all

apt-cache showsrc hello
apt-get source hello
Am I doing something wrong? Can someone please help me with this?

Thank you!


Antonio
The Linux Kamarada Project
https://kamarada.github.io/

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23876
Joined: Sat Jul 30, 2011 7:41 pm

Re: Where can I get the Raspbian sources?

Fri Nov 08, 2019 1:58 pm

Not sure exactly what you mean by Raspbian source. Raspbian the distro have many thousands of packages installed, do you mean the sources for all of those? Or some specific part of Raspbian? You already have the Raspbian kernel link above (ignore the firmware repo - the firmware itself is closed source), so what extra are you specifically looking for?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6031
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Where can I get the Raspbian sources?

Fri Nov 08, 2019 4:25 pm

You forgot /etc/apt/sources.list.d/raspi.list.

Also, the raspberrypi-firmware package (which provides the firmware and kernel) is not built from source so the debian source package will not be of any use to you.

vinyanalista
Posts: 3
Joined: Fri Nov 08, 2019 11:42 am

Re: Where can I get the Raspbian sources?

Sat Nov 09, 2019 12:50 pm

jamesh wrote:
Fri Nov 08, 2019 1:58 pm
Not sure exactly what you mean by Raspbian source. Raspbian the distro have many thousands of packages installed, do you mean the sources for all of those? Or some specific part of Raspbian? You already have the Raspbian kernel link above (ignore the firmware repo - the firmware itself is closed source), so what extra are you specifically looking for?
Yes, I was looking for the source of the packages related to Raspberry-specific things, such as the kernel and the firmware.
ShiftPlusOne wrote:
Fri Nov 08, 2019 4:25 pm
You forgot /etc/apt/sources.list.d/raspi.list.

Also, the raspberrypi-firmware package (which provides the firmware and kernel) is not built from source so the debian source package will not be of any use to you.
Indeed, I didn't notice that file. And it was what I was looking for.

I did:

Code: Select all

sudo nano /etc/apt/sources.list.d/raspi.list
Uncommented:

Code: Select all

deb-src http://archive.raspberrypi.org/debian/ buster main
Saved, closed, then:

Code: Select all

sudo apt-get update
And:

Code: Select all

apt-get source raspberrypi-firmware
Reading package lists... Done
NOTICE: 'raspberrypi-firmware' packaging is maintained in the 'Git' version control system at:
[email protected]:RPi-Distro/firmware.git
Please use:
git clone [email protected]:RPi-Distro/firmware.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 220 MB of source archives.
Get:1 http://archive.raspberrypi.org/debian buster/main raspberrypi-firmware 1.20190925+1-1 (dsc) [1,581 B]
Get:2 http://archive.raspberrypi.org/debian buster/main raspberrypi-firmware 1.20190925+1-1 (tar) [220 MB]
Get:2 http://archive.raspberrypi.org/debian buster/main raspberrypi-firmware 1.20190925+1-1 (tar) [220 MB]
Get:3 http://archive.raspberrypi.org/debian buster/main raspberrypi-firmware 1.20190925+1-1 (diff) [15.6 kB]
Fetched 2,143 kB in 3min 59s (8,952 B/s)                                       
dpkg-source: info: extracting raspberrypi-firmware in raspberrypi-firmware-1.20190925+1
dpkg-source: info: unpacking raspberrypi-firmware_1.20190925+1.orig.tar.gz
dpkg-source: info: unpacking raspberrypi-firmware_1.20190925+1-1.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 0001-Add-vmcs.conf-file-to-be-installed.patch
dpkg-source: info: applying 0002-Add-udev-rule-for-dev-vchiq-permissions.patch
dpkg-source: info: applying 0003-Fix-udev-rule-for-dev-vcio-and-vc-sm-permissions.patch
dpkg-source: info: applying kernel_conffile.patch
So, there is also this Git repo:

https://github.com/RPi-Distro/firmware

which is basically a fork of raspberrypi/firmware added the debian folder.

I understand some binaries are closed-source. But I'm also interested in other things, such as the Debian control file, which may contain useful information for me as a packager.

Thank you,


Antonio
The Linux Kamarada Project
https://kamarada.github.io/

vinyanalista
Posts: 3
Joined: Fri Nov 08, 2019 11:42 am

Re: Where can I get the Raspbian sources?

Sat Nov 09, 2019 2:40 pm

I realized the RPi-Distro/firmware repo does not have the tag 1.20190925, which I believe should be the commit c01eb59.


Antonio
The Linux Kamarada Project
https://kamarada.github.io/

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6031
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Where can I get the Raspbian sources?

Sat Nov 09, 2019 3:11 pm

Tags are generally pushed to the upstream repo https://github.com/raspberrypi/firmware/releases

Return to “Raspbian”