[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
** Changed in: linux-firmware-raspi2 (Ubuntu Bionic) Assignee: (unassigned) => Dave Jones (waveform) ** Changed in: linux-firmware-raspi2 (Ubuntu Bionic) Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
> Now when doing apt update from the Pi4 itself, this came up:> > Processing triggers for flash-kernel (3.98ubuntu3) ... > Unsupported platform. > dpkg: error processing package flash-kernel (--configure): > installed flash-kernel package post-installation script subprocess > returned error exit status 1 > Errors were encountered while processing: > flash-kernel > > I had to add the proper entries for the RPi4 to /etc/flash-kernel/db and > then that worked, too. Doh! That needs fixing. I'll get on that (won't stop upgrades, which'd have to happen on a non-pi4 anyway, so it's probably not worth an FFe, but it'll need doing before anyone attempts to upgrade flash-kernel *on* a pi4). Thanks for the heads up! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
THANK YOU!! I just made it boot (without u-boot ATM) with all 4GB RAM enabled. And my problem was my own stupidity. Several weeks ago, when researching why it wouldn't boot, I somewhere found the boot param "modprobe.blacklist=sdhci_iproc" which I added to my command.txt. Without that module, the microSD can't be read, of course. (IIRC, the website was about booting from SSD via USB since the USB port is faster than the MicroSD port on pre-4 models.) So after removing that part, the system started to come alive. Now when doing apt update from the Pi4 itself, this came up: Processing triggers for flash-kernel (3.98ubuntu3) ... Unsupported platform. dpkg: error processing package flash-kernel (--configure): installed flash-kernel package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: flash-kernel I had to add the proper entries for the RPi4 to /etc/flash-kernel/db and then that worked, too. It seems I can finally start to migrate my Pi 3 services to the newer (and faster) Pi 4. Awesome! Many thanks again for your help! Now looking forward to the u-boot with 4GB RAM support, then it's perfect. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
On Wed, 9 Oct 2019 at 16:11, Markus Birth <1847...@bugs.launchpad.net> wrote: > > > I'd *guess* that's a limitation due to u-boot, but I'll try and find > > time to test the kernel alone to confirm that. Obviously it's > > something we'll want to sort out fairly quickly but I suspect it'll > > have to be post-release at this point. > > For me, the Raspberry never leaves the rainbow screen if I omit the > total_mem=1024. So it doesn't seem to be a thing with u-boot (which I > don't use). I've read reports of people that can boot their (custom) > kernels with 3GB RAM but get lockups with 4GB ... so I'll experiment > with that, too. But they might have been using a 32bit kernel. Confirmed it's a u-boot issue: https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/1847500 Incidentally, both the tests in that bug were without the total_mem=1024 line (I just adjusted the kernel line and added an initramfs line to our default config.txt when booting the kernel directly). I'd guess the issue in your case is that you've got an older kernel which doesn't support the Pi4 (or your firmware package is out of date which'd mean you don't have start4.elf et al under /boot/firmware). The version of the linux-image-raspi2 package on the eoan daily is 5.3.0.1005.1 so you probably need that or later, and you'll want linux-firmware-raspi2 at 1.20190819-0ubuntu1 or later. > This guy built a custom system image (with custom kernel) based on > bionic that seems to be able to access all 4GB: > > https://jamesachambers.com/raspberry-pi-4-ubuntu-server-desktop-18-04-3 > -image-unofficial/ > > But since I want to use the official kernel, I never tested it. However, > he has the kernel config and boot config on his GitHub (link is on that > page). So maybe this helps. It appears the new Eoan kernel can access all 4Gb (at least, I saw "3884464" Kb free which looks about right for 4Gb with a bit reserved for the GPU). Not sure what magic the kernel team wove to achieve that, but I'll see if we can do something similar for u-boot :) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
> I'd *guess* that's a limitation due to u-boot, but I'll try and find > time to test the kernel alone to confirm that. Obviously it's > something we'll want to sort out fairly quickly but I suspect it'll > have to be post-release at this point. For me, the Raspberry never leaves the rainbow screen if I omit the total_mem=1024. So it doesn't seem to be a thing with u-boot (which I don't use). I've read reports of people that can boot their (custom) kernels with 3GB RAM but get lockups with 4GB ... so I'll experiment with that, too. But they might have been using a 32bit kernel. This guy built a custom system image (with custom kernel) based on bionic that seems to be able to access all 4GB: https://jamesachambers.com/raspberry-pi-4-ubuntu-server-desktop-18-04-3 -image-unofficial/ But since I want to use the official kernel, I never tested it. However, he has the kernel config and boot config on his GitHub (link is on that page). So maybe this helps. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
> Thanks for the suggestions. I'll experiment with my setup when I get > home today and report back. I'm not sure at this moment if it didn't > detect the SD card or if the device names somehow changed. Or if it's > really just the armstub thingy. No problem. Incidentally, I wouldn't be surprised if it didn't detect the SD card. The MMC interface changed quite a bit with the Pi4; it's a new device, new clock, etc. In fact the bulk of the Pi4 patches for u-boot were concerned with the MMC device. The new Pi4 compatible kernel for eoan was only released a few days ago, so I'd recommend running an upgrade on a Pi3 first if you haven't upgraded in the last 2 or 3 days, just to make sure you've got that kernel version. > Thanks for the headsup. I was planning to use u-boot again in the near > future, anyways. The reason I stopped using it was that there were > several changes of the DTB address about a year ago and there was a > mismatch between the inofficial raspi2-pi3 PPA (0x200) and the default > packages (0x020-something) and my config.txt (always had the wrong > one). That broke things on my Raspberrys a few times so I switched to > the u-boot-less config to not have to bother about DTB memory addresses > anymore. Ahh, the device-tree address mess! I've been steadily cleaning up bits of this but there's still a bit more to do. All the classic bootscripts for eoan should be using 0x300 for the device-tree address, however I think it's still hard-coded in the u-boot script when it should be using the value passed by the firmware (I only recently discovered our u-boot builds were entirely ignoring the device-tree passed by the firmware; that's now fixed, but they're still using a hard-coded address at the moment). We should start porting most of this back to bionic (and disco I assume) after the eoan release, so pi4 compatibility will be coming to those releases in due course. > Do you know if booting via u-boot makes the whole 4GB RAM accessible to > the system or is there still a limit of 1GB? Good question - not something I'd tested (my main concern has been getting the thing booting and ensuring that we don't break any existing platforms at the same time!), but I've just tested it and currently it looks like only the first 1Gb is currently accessible. I'd *guess* that's a limitation due to u-boot, but I'll try and find time to test the kernel alone to confirm that. Obviously it's something we'll want to sort out fairly quickly but I suspect it'll have to be post-release at this point. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
> Which release of Ubuntu are we talking about here? This is a clone of my RPi3 system (disco, IIRC it started out as bionic) that was upgraded to eoan (on the Pi3). btw: I've upgraded(?) the EEPROM to the July version (https://static.raspberrypi.org/files/rpi-boot-eeprom- recovery-2019-07-15.zip). I don't think this changes anything, but wanted to mention it. Thanks for the suggestions. I'll experiment with my setup when I get home today and report back. I'm not sure at this moment if it didn't detect the SD card or if the device names somehow changed. Or if it's really just the armstub thingy. > Anyway, I don't *think* the Pi's bootloader is capable of dealing with > compressed kernel images in which case, when we do start compressing our > kernels, I'm afraid your boot sequence will suddenly break. Thanks for the headsup. I was planning to use u-boot again in the near future, anyways. The reason I stopped using it was that there were several changes of the DTB address about a year ago and there was a mismatch between the inofficial raspi2-pi3 PPA (0x200) and the default packages (0x020-something) and my config.txt (always had the wrong one). That broke things on my Raspberrys a few times so I switched to the u-boot-less config to not have to bother about DTB memory addresses anymore. Do you know if booting via u-boot makes the whole 4GB RAM accessible to the system or is there still a limit of 1GB? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
@mbirth One thing has just occurred to me: at some point in the future you may have to switch to using u-boot or implement a workaround, at least for 64-bit builds... The reason is that at the moment our 64-bit kernels are uncompressed because the Linux kernel doesn't support self-extracting on arm64 (and apparently won't any time soon - compression is seen as something bootloaders ought to be handling). We'd obviously like to have compressed kernels (it speeds up the boot sequence and saves space on the relatively small boot partition) and to that end I recently updated our u-boot script on Classic to detect a gzipped kernel and handle de- compressing it before launching it. However, the kernel builds haven't yet been switched to be compressed as Core's boot also needs updating first. Anyway, I don't *think* the Pi's bootloader is capable of dealing with compressed kernel images in which case, when we do start compressing our kernels, I'm afraid your boot sequence will suddenly break. It'll be pretty trivial to work around (just gunzip the kernel image on /boot) but it's something you should be aware of! This won't affect armhf images which currently use self-extracting compressed images (and will continue do so for the foreseeable future). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
On Wed, 9 Oct 2019 at 02:00, Markus Birth <1847...@bugs.launchpad.net> wrote: > > So what does u-boot do differently than the internal bootloader? Or what > could be the issue in my setup? I'd like to keep going without u-boot if > possible. Let's clear up this misunderstanding first: u-boot doesn't supplant the pi's usual bootloader. It's just an extra step in the chain between the pi's bootloader and the kernel. So the overall boot process on ubuntu goes like this: 1) bootcode.bin (or on the pi4, the boot flash EEPROM) which loads... 2) start*.elf (usually start.elf but can be changed if, e.g. camera is enabled in which case it's start_x.elf) which loads... 3) uboot*.bin (historically there was just one u-boot, once Eoan releases there'll be one per pi, e.g. uboot_rpi_2.bin, uboot_rpi_3.bin, etc.) which loads... 4) vmlinuz the kernel You may (very reasonably) ask "why bother with u-boot at all?". The answer is partly "because Core needs it for A/B booting" (A/B booting requires a bootloader that can re-write state to track whether an attempted kernel booted or not), and partly because we wish the Core and Classic boot procedures to become much closer for the sake of easier maintenance which in turn means Classic will retain u-boot for the foreseeable future. > I'm booting my Pis without u-boot with this in my config.txt: > > [pi4] > enable_gic=1 > armstub=armstub8-gic.bin > total_mem=1024 > > [all] > kernel=vmlinuz > initramfs initrd.img followkernel > arm_64bit=1 > gpu_mem=32 > dtparam=eee=off > > This exact setup works fine on my Pi 3B+ (and also my Pi 2B has this > non-u-boot-setup - they both boot fine this way.) The Pi 4 only even > tries to boot with that total_mem=1024 line in the config.txt. Without > that line (i.e. with the full 4GB RAM) it stays at the rainbow screen. > But this isn't the big issue. > > When booting, it's failing to detect the SD card and thus the root > filesystem. This is with today's updates and your PPA included. > > cmdline.txt is: > > root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=noload rootwait > verbose nosplash net.ifnames=0 dwc_otg.lpm_enable=0 > dwc_otg.fiq_fix_enable=1 fsck.repair=yes modprobe.blacklist=sdhci_iproc Which release of Ubuntu are we talking about here? The Pi4 will have preliminary support with the Eoan release (and the current Eoan dailies have a Pi4 compatible kernel, though I'm not sure if the new Pi4-compatible u-boot has made it into them yet), but prior releases do not (yet) have a Pi4 compatible kernel (there are plans to enable Pi4 on Bionic, but not until after the Eoan release). I can't say we'll support u-boot-less booting of classic, but I did test your boot config on the arm64 Eoan daily available from: http://cdimage.ubuntu.com/ubuntu-server/daily-preinstalled/current/ I managed to get it working with a couple of minor tweaks: you need the vc4-fkms-v3d overlay loaded to get the screen working without corruption. Secondly, I dropped the armstub line as we don't have an armstub (and I'm fairly sure it's not required at this point; I vaguely recall it was required for 64-bit boots at some point in the past but the firmware was updated to make it unnecessary). Anyway, the following config worked happily for me: [pi4] enable_gic=1 total_mem=1024 [all] kernel=vmlinuz initramfs initrd.img followkernel dtoverlay=vc4-fkms-v3d arm_64bit=1 gpu_mem=32 dtparam=eee=off cmdline=cmdline.txt With the following in cmdline.txt: net.ifnames=0 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait (which is just the standard command line we'll be shipping Eoan with) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
I'm booting my Pis without u-boot with this in my config.txt: [pi4] enable_gic=1 armstub=armstub8-gic.bin total_mem=1024 [all] kernel=vmlinuz initramfs initrd.img followkernel arm_64bit=1 gpu_mem=32 dtparam=eee=off This exact setup works fine on my Pi 3B+ (and also my Pi 2B has this non-u-boot-setup - they both boot fine this way.) The Pi 4 only even tries to boot with that total_mem=1024 line in the config.txt. Without that line (i.e. with the full 4GB RAM) it stays at the rainbow screen. But this isn't the big issue. When booting, it's failing to detect the SD card and thus the root filesystem. This is with today's updates and your PPA included. cmdline.txt is: root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=noload rootwait verbose nosplash net.ifnames=0 dwc_otg.lpm_enable=0 dwc_otg.fiq_fix_enable=1 fsck.repair=yes modprobe.blacklist=sdhci_iproc So what does u-boot do differently than the internal bootloader? Or what could be the issue in my setup? I'd like to keep going without u-boot if possible. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: linux-firmware-raspi2 (Ubuntu Bionic) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
This bug was fixed in the package linux-firmware-raspi2 - 1.20190819-0ubuntu1 --- linux-firmware-raspi2 (1.20190819-0ubuntu1) eoan; urgency=medium * Update to release 1.20190819 to enable Pi 4 boot (LP: #1847163) * Remove incorrect device_tree_address hack in postinst * Simplify copy of firmware to the boot partition in postinst -- Dave Jones Mon, 07 Oct 2019 22:24:41 +0100 ** Changed in: linux-firmware-raspi2 (Ubuntu Eoan) Status: Triaged => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
Approving the FFe as this is a continuation of the pi4 enablement (already approved by Adam in the FFe in LP: #1846329). ** Changed in: linux-firmware-raspi2 (Ubuntu) Status: New => Triaged -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
** Also affects: linux-firmware-raspi2 (Ubuntu Eoan) Importance: Undecided Status: New ** Also affects: linux-firmware-raspi2 (Ubuntu Bionic) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
** Attachment added: "Output from apt upgrade" https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+attachment/5295243/+files/upgrade-output.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1847163] Re: [FFe] Firmware bump for Pi 4 boot support
** Attachment added: "Build log" https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+attachment/5295244/+files/debuild.log -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1847163 Title: [FFe] Firmware bump for Pi 4 boot support To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1847163/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs