Skip to content

pi0w won't boot, but pi3 works on linux-4.12-rc1 #2028

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

Closed
jeffersonchua opened this issue May 20, 2017 · 45 comments
Closed

pi0w won't boot, but pi3 works on linux-4.12-rc1 #2028

jeffersonchua opened this issue May 20, 2017 · 45 comments

Comments

@jeffersonchua
Copy link
Contributor

I'm having problem with latest kernel 4.12-rc1 trying to make it work on pi-zero-w. I compiled kernel for pi3 and works fine. Have not tried earlier versions .. perhaps it won't work either.

I used crosstool-ng-1.23.0 and build a crosstool-chain for bcm2708 for pi-zero-w and a different one for pi3. The only differences in the toolchain are:

pi0 ...

CT_PREFIX_DIR="/v5/cross-bcm2708"
CT_ARCH_CPU="arm1176jzf-s"
CT_ARCH_FPU="vfp"

pi3 ...

CT_PREFIX_DIR="/v5/cross-bcm2709"
CT_ARCH_ARCH="armv7-a"
CT_ARCH_CPU=""
CT_ARCH_TUNE="cortex-a7"
CT_ARCH_FPU="neon-vfpv4"

And in my linux kernel .config, I selected ARCH_MULTI_V7 for pi3, and ARCH_MULTI_V6 for pi0w.

I even tried with bcm2835_defconfig and bcmrpi_defconfig without success.

And I used firmware from git://github.com/raspberrypi/firmware.git for both pi0w and pi3 ...

My .config for linux-4.12-rc1 attached for both pi0w and pi3 ...
pi0w.config.txt
pi3.config.txt

My pi boot config.txt files for both pi0w and pi3 attached ...
pi0w.boot.config.txt
pi3.boot.config.txt

Again, the compiled kernel7.img (using bcm2709 toolchain) works for pi4, but kernel.img (using bcm2708 tooldchain) not for pi0w.

What am I missing?

Thanks,
Jeff

@pelwell
Copy link
Contributor

pelwell commented May 20, 2017

Here are a few things to try:

  1. Make sure you have the latest rpi-4.12.y - the rate of change is quite high.
  2. Download our hardfp toolchain from the tools repo (https://github.com/raspberrypi/tools/tree/master/arm-bcm2708) and build your kernel config with that.
  3. If 2 doesn't work, try with bcmrpi_defconfig.
  4. If 2 does produce a workable kernel, compare your Crosstools configurations with ours: https://github.com/raspberrypi/tools/tree/master/configs

@lategoodbye
Copy link
Contributor

Your error description is too general. What makes you sure that it doesn't boot (e.g. no output on serial / HDMI port)?

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 21, 2017 via email

@lategoodbye
Copy link
Contributor

lategoodbye commented May 21, 2017

So you don't have a USB to serial adapter?
What's the behavior of the ACT LED?

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 21, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 21, 2017

Is it blinking in a rhythm - n long, m short ?

Don't forget my suggestions above.

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 21, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 21, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 21, 2017

Sorry - markdown mangled my comment which should have said <n> long, <m> short. What are n and m?

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 21, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 21, 2017 via email

@popcornmix
Copy link
Collaborator

popcornmix commented May 22, 2017

You should be building with this (which is what official kernel releases use):
https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 22, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 22, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 24, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 24, 2017

What is in cmdline.txt?

If you have a spare uSD card you can:

  1. Install a fresh Raspbian, and check it boots OK.
  2. Copy your new kernel and modules over and see if that boots. If you give your alternate kernel a different name you can select it using kernel=<whatever> in config.txt.
  3. If your kernel works on Raspbian then there is an issue with your distribution (which I suspect isn't Raspbian).

As a general comment, you shouldn't need to explicitly set device_tree= - the firmware will load the correct one unless you are trying 64-bit builds on a Pi3 or otherwise using non-standard DTB names.

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 24, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 24, 2017

What does sudo vcdbg log msg |& grep dtb return?

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 24, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 24, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 24, 2017

That's odd, because the firmware appears to be loading the same dtb as the one you explicitly asked it to use. And I've never seen an "out of memory" dterror before. You could turn on some extra tracing by adding dtdebug=1 to config.txt.

@pelwell
Copy link
Contributor

pelwell commented May 24, 2017

You could also remove start_debug=1, which will stop it loading start_db.elf instead of start_x.elf.

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 24, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 24, 2017 via email

@popcornmix
Copy link
Collaborator

What does sudo vcdbg log msg |& grep dtb report when it works?

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 24, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 25, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 25, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 25, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 25, 2017

Are you sure you are using the defconfigs from the 4.9 tree? That was an error I saw building 4.12 last week.

I often build the 4.9 kernel multiple times a day so I know it builds OK with bcmrpi_defconfig and bcm2709_defconfig.

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 25, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 25, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 25, 2017

If you upload your kernel and .dtb somewhere I'll try them tomorrow.

@pelwell
Copy link
Contributor

pelwell commented May 25, 2017

Also the .config and the commit hash for the head of the tree.

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 26, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 26, 2017 via email

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 29, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 30, 2017

Using your kernel, modules, .dtb, config.txt and cmdline.txt my Zero W boots to a GUI without any problems.

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 30, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 30, 2017

Yes, I do see the "dterror: out of memory" message, but the device boots - I can investigate this. Adding device_tree=bcm2708-rpi-0-w.dtb makes no difference (as it shouldn't).

@pelwell
Copy link
Contributor

pelwell commented May 30, 2017

Ah - I understand the "out of memory" message. It is harmless, but I'll make sure it doesn't occur in future releases.

@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented May 30, 2017 via email

@pelwell
Copy link
Contributor

pelwell commented May 31, 2017

Ah - I understand the "out of memory" message. It is harmless, but I'll
make sure it doesn't occur in future releases.

Interesting ... what caused that?

The DT for the BCM2835-based devices now includes an empty arm_freq property to prevent a warning, but part of setting a parameter includes making a copy of the parameter declaration. Calling malloc on a zero-length block returns NULL on the VPU - under glibc you get a pointer to a zero-sized block - making it look like an error. Errors resulting from setting parameters are intentionally non-fatal, so everything else continues as normal.

Pretty sure the default config won't boot with device_tree set.

Don't you think it's strange that you are the only person reporting problems? I've spent a few hours on this with no success and I've run out of things to try.

I suggest you try to find the newest branch+commit that still works for you, starting with head-of-tree rpi-4.9.y, partly in the hope that you can identify a specific commit and partly just to confirm that it isn't a tool problem. Be careful to always copy the rebuilt dtbs, particularly when switching kernel versions.

popcornmix added a commit to raspberrypi/firmware that referenced this issue Jun 8, 2017
kernel: dwc_otg: make periodic scheduling behave properly for FS buses
See: raspberrypi/linux#2038

kernel: dwc_otg: fiq_fsm: Make isochronous compatibility checks work properly
See: raspberrypi/linux#2049

kernel: Add support for Allo Digione Driver
See: raspberrypi/linux#2048

kernel: config: Adding SENSOR_JC42
See: raspberrypi/linux#2046

kernel: BCM270X_DT: Improve i2c-sensor and i2c-rtc overlay
kernel: overlays: Fix i2c-rtc order and fragment numbering
See: raspberrypi/linux#2059

kernel: BCM270X_DT: Add midi-uart1 overlay
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=183860

firmware: dtoverlay: Short-circuit empty parameter handling
See: raspberrypi/linux#2028

firmware: rtos: Protect against null timer callback
See: http://forum.kodi.tv/showthread.php?tid=280408

firmware: arm_dt: Add txp node to device tree parsing to mask off transposer interrupt

firmware: venc: Correct the validation on custom mb/mbps/br settings
See: #819
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Jun 8, 2017
kernel: dwc_otg: make periodic scheduling behave properly for FS buses
See: raspberrypi/linux#2038

kernel: dwc_otg: fiq_fsm: Make isochronous compatibility checks work properly
See: raspberrypi/linux#2049

kernel: Add support for Allo Digione Driver
See: raspberrypi/linux#2048

kernel: config: Adding SENSOR_JC42
See: raspberrypi/linux#2046

kernel: BCM270X_DT: Improve i2c-sensor and i2c-rtc overlay
kernel: overlays: Fix i2c-rtc order and fragment numbering
See: raspberrypi/linux#2059

kernel: BCM270X_DT: Add midi-uart1 overlay
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=183860

firmware: dtoverlay: Short-circuit empty parameter handling
See: raspberrypi/linux#2028

firmware: rtos: Protect against null timer callback
See: http://forum.kodi.tv/showthread.php?tid=280408

firmware: arm_dt: Add txp node to device tree parsing to mask off transposer interrupt

firmware: venc: Correct the validation on custom mb/mbps/br settings
See: raspberrypi/firmware#819
@JamesH65
Copy link
Contributor

Closing due to lack of activity. Not really a problem at the RPF end, and really should be dealt with on the forum.

mkreisl added a commit to xbianonpi/xbian-package-firmware that referenced this issue Sep 13, 2017
- firmware: platform: Move trait initialisation out of #ifdef'd function

- firmware: usb: Change USB PHY settings to make device mode work correctly

- firmware: dtoverlay: Update fixups when a node is renamed
- firmware: dtoverlay app: Add the -D (dry-run) option
  See: raspberrypi/linux#2002

- firmware: dispserver: Adjust open/close refcount on application exit
  See: #778

- firmware: filex: Optimise directory search of the root directory

- firmware: Revert Change USB PHY settings to make device mode work correctly.
  See: #816

- firmware: Comments: Replace copyright symbol with (c)

- firmware: arm_display: Remove unused sdtv variables

- firmware: tvservice: Avoid referencing uninitialised state when unsuccessful
  See: raspberrypi/userland#397

- firmware: dtoverlay: Short-circuit empty parameter handling
  See: raspberrypi/linux#2028

- firmware: rtos: Protect against null timer callback
  See: http://forum.kodi.tv/showthread.php?tid=280408

- firmware: arm_dt: Add txp node to device tree parsing to mask off transposer interrupt

- firmware: venc: Correct the validation on custom mb/mbps/br settings
  See: #819

- firmware: venc: Correct the validation on custom mb/mbps/br settings
  See: #819

- firmware: vc_image: Remove structure definition duplication
- firmware: vc_image/mmal/il/isp: Add support for 16bit/component YUV420 and YUVUV

- firmware: vcdbg: Don't use dma when file provided

- firmware: rtos: Avoid sleeping delay when RTOS is not present

- firmware: bootcode: Remove reliance on scanf to reduce bootcode.bin size
- firmware: bootcode: Changes to force to full speed
- firmware: bootcode: Make sure bootcode drops out
- firmware: bootcode: Mass storage changes to power off/on USB block
- firmware: bootcode: Change USB 1.1 to have 64 byte endpoints
- firmware: bootcode: Set MSD serial number to be the Pi serial number

- firmware: imx219: Extend line length for long frame times

- firmware: 2ndstage: Improve i2c_gpio support
- firmware: i2c_gpio: Improve implementation and usage

- firmware: Camplus: Enable RAW12 support in the ISP input formatter

- firmware: scalerlib: Don't flip tiled format and swap R/B
- firmware: arm_display: Provide mechanism to request tiled format framebuffer
  See: #820

- firmware: platform: Set BT LPO frequency to 32768Hz
  See: #831

- firmware: arm_display: Fix mixup with xres/xres_virtual
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=187058

- firmware: video_render: Relax the alignment requirements for pitches
- firmware: vc_image: Use vpitch when determining size of YUV buffers

- firmware: Fix regression in uart clock frequency
  See: #833

- bootcode: usb: Dont overwrite configured parameters

- firmware: usb: Force MSD app to use CM3 pin conf

- firmware: IL ISP: Fix typo in logging
- firmware: IL ISP: Add black level and lens shading controls
- firmware: isp: Correct ISP Bayer stride calcs for supported formats
- firmware: Remove unused duplicate versions of vc_sm_defs.h
- firmware: IL camera: add get_parameter for OMX_IndexConfigCustomAwbGains
- firmware: IL resize: Support get_parameter OMX_IndexConfigCommonInputCro
- firmware: MMAL/RIL: Add MMAL_PARAMETER_RESIZE_PARAMS / OMX_IndexParamResize mapping
- firmware: ISP IL: Add lresize output
- firmware: MMAL/RIL: Add mapping for OMX_IndexConfigCommon[In|Out]putCrop
- firmware: MMAL/RIL: Correct handling of MMAL_PARAMETER_VIDEO_SOURCE_PATTERN
- firmware: IL ISP: Add H & V flip support
- firmware: IL ISP: Implement OMX_IndexConfigCommonInputCrop

- firmware: imx219: Refactor exposure calculations

- firmware: dmalib: Stop spinning on dma_pause if END is signalled
  See: #824

- firmware: MMAL: Avoid lockup with opaque stripes into opaque frame callback
  See: raspberrypi/userland#390

- firmware: RIL null_sink: Support MMAL opaque input
  See: raspberrypi/userland#388

- firmware: arm_display: Avoid hang when display_rotate is used with vc4-kms-v3d driver
  See: guysoft/FullPageOS#137

- firmware: 2ndstage: Fix printing of zero as a decimal in uart_printf

- firmware: cdi_camera: Allow GPIO control on FS and FE events

- firmware: IL ISP: Add option to alter the shift in the output stage
- firmware: IL ISP: Add option for adjusting the input CCM
- firmware: vc_image: fix size calcs for YUV_UV_16
- firmware: vc_image_helper: Add YUV 16 bit formats to second header
- firmware: isp: Avoid setting vpitch in YUVUV16 cases
- firmware: isp: Handle 16 bit yuv in ip_is_supported_format

- firmware: hello_fft: Fixup offset calculation when mapping/unmapping buffers
  See: raspberrypi/userland#408

- bootcode: Default to using total_mem=1024

- firmware: logging: Avoid wraparound issue with total_mem=1024

- firmware: armstubs: Add wfe to ARMv7/ARMv8-32 stubs
  See: raspberrypi/linux#1989

- firmware: arm_loader: Use ethernet0 as fallback for placing DT MAC address
  See: #846

- firmware: dt-blob: Remove Zero W static I2C0 mapping on 28 & 29
  See: raspberrypi/linux#2130

- firmware: Revert arm_display: Avoid hang when display_rotate is used with vc4-kms-v3d driver

- firmware: arm_display: Avoid hang when display_rotate is used with vc4-kms-v3d driver 2
  See: #849
  See: #853

- firmware: vc_image headers: Tidy up duplication
- firmware: video_splitter: Only copy eColorFormat if not already set
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=189830

- firmware: vcsm: Add new clean/invalidate command for 2D blocks
- firmware: gpuserver: Switch to using custom queue
- firmware: gpuserver: Add priority to queue

- firmware: MMAL/IL I420 and YUVUV 10bpp formats, + VCSM DMABUF import

- firmware: CEC: Fix crash when remote button release is received without a pressed
  See: https://forum.kodi.tv/showthread.php?tid=280408

- firmware: arm_loader display: Correct variable scope by renaming
  See: https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=84889
@jeffersonchua
Copy link
Contributor Author

jeffersonchua commented Sep 14, 2017 via email

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

5 participants