PhilBot
Posts: 15
Joined: Wed Nov 12, 2014 8:39 pm

How to Boot CM1 Image with CM3

Sat Mar 11, 2017 11:35 pm

2 Years ago I created a Raspberry Pi Image for the Compute Module with a custom kernel, 2 custom device overlays, and a custom root file system. I added a plymouth splash screen using an initramfs and tweaked the boot parameters in /boot/config.txt.

I now bought a Compute Module 3 and flashed it with this older image that worked on the Compute Module 1.

When the Compute Module 3 boots with this older image, the connected HDMI LCD just shows the famous Rainbow splash screen from the boot loader and then hangs.

I mounted the latest raspbian image as a loop device on Ubuntu and examined the FAT /boot partition. I compared it versus the older image's /boot partition. There are many differences, including updated device trees for the CM3 and updated boot loader binaries.

I mounted the older image as well and pulled over the newer boot loader binaries, device trees, and I modified the config.txt to include my custom device tree overlays. I kept the kernel.img the same. This did not boot either.

How can I achieve running my older image on the new CM3 without redoing a lot of the work to make that older image custom?

I'd be OK with rebuilding the Kernel with the custom drivers if I could keep my Root File System and the custom software located on it.

Thanks for any suggestions / input.

nixy82
Posts: 42
Joined: Sat Sep 12, 2015 9:19 am

Re: How to Boot CM1 Image with CM3

Sun Mar 12, 2017 10:51 am

There's been a few changes since the CM1

Notably the device tree file for the CM1 is not compatible with the CM3, your best tack here is to get the source for the latest device tree file, add in your custom bits in and re-compile. The section you're interested in hacking with starts with pins_cm3.

As a stop gap you could copy over *.dtb from the latest image and rename your dt-blob.bin, to stop that loading, and see if it boots.

Stopping at the rainbow screen usually means something very bad has gone wrong and/or it cannot locate/load kernel.img in the FAT partition, so you may have to back off to a vanilla setup (kernel.img etc files) and step forward from that.

The kernel and firmware need updating asap (mostly for various CM3 firmware fixes but also for the latest 4.9 Kernel) via rpi-update.

Adding core_freq=250 fixes the UART1 Baud rate issue (there may be another way, but that works for me)

Be aware that this is a multi-core CPU with the OS set to dynamically scale the clock frequency by default, which may impact your application.

fruitoftheloom
Posts: 21342
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: How to Boot CM1 Image with CM3

Sun Mar 12, 2017 1:09 pm

nixy82 wrote: The kernel and firmware need updating asap (mostly for various CM3 firmware fixes but also for the latest 4.9 Kernel) via rpi-update.
Running rpi-update in Raspbian Jessie will install a Testing Kernel, it is only necessary if was advised to do so to fix a specific issue.

If running Raspbian Wheezy, which is end of life, then rpi-update is the only means of updating the kernel.
Retired disgracefully.....
This at present is my daily "computer" https://www.asus.com/us/Chrome-Devices/Chromebit-CS10/

nixy82
Posts: 42
Joined: Sat Sep 12, 2015 9:19 am

Re: How to Boot CM1 Image with CM3

Sun Mar 12, 2017 3:07 pm

The latest version contains a fix for at least the act led, see other posts in this sub-section.

4.9 works fine on my setup YMMV.

Return to “Compute Module”