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

Branch 4.1 does not boot on BeagleBone Black #68

Closed
jcdevel opened this issue Feb 19, 2016 · 17 comments
Closed

Branch 4.1 does not boot on BeagleBone Black #68

jcdevel opened this issue Feb 19, 2016 · 17 comments

Comments

@jcdevel
Copy link

jcdevel commented Feb 19, 2016

Last working tag is 4.1.17-ti-rt-r46. Tags 4.1.17-ti-rt-r47 and 4.1.17-ti-rt-r48 do not boot. The boot process freezes right after jumping to Linux, then resets (presumably a watchdog reset). This is the serial output:

U-Boot SPL 2015.01-00001-gb2412df (Jan 29 2015 - 15:01:06)


U-Boot 2015.01-00001-gb2412df (Jan 29 2015 - 15:01:06), Build: jenkins-github_Bootloader-Builder-105

       Watchdog enabled
I2C:   ready
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using default environment

Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw
Hit any key to stop autoboot:  0 
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
reading uEnv.txt
1067 bytes read in 6 ms (172.9 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
cpsw Waiting for PHY auto negotiation to complete. done
link up on port 0, speed 100, full duplex
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
DHCP client bound to address 192.168.46.120 (763 ms)
Checking if client_ip is set ...
using am335x-boneblack.dtb ...
gpio: pin 56 (gpio 56) value is 1
Running nfsboot ...
Booting from 192.168.46.2 ...
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.46.2; our IP address is 192.168.46.120
Filename 'zImage'.
Load address: 0x82000000
Loading: #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     #################################################################
     ###############################
     384.8 KiB/s
done
Bytes transferred = 7811736 (773298 hex)
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.46.2; our IP address is 192.168.46.120
Filename 'dtbs/am335x-boneblack.dtb'.
Load address: 0x88000000
Loading: ############
     160.2 KiB/s
done
Bytes transferred = 60532 (ec74 hex)
Kernel image @ 0x82000000 [ 0x000000 - 0x773298 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8ffee000, end 8ffffc73 ... OK

Starting kernel ...


U-Boot SPL 2015.01-00001-gb2412df (Jan 29 2015 - 15:01:06)

Has something changed after r46? I am using TFTP to load the kernel and the DT.

Thanks in advance.

@RobertCNelson
Copy link
Member

@RobertCNelson
Copy link
Member

are you doing anything different in the config?

@jcdevel
Copy link
Author

jcdevel commented Feb 19, 2016

Hi RobertCNelson, I have not changed the configuration. Basically, I have followed the same procedure I always have to update the kernel (replace zImage, dtb and modules). Actually, just by restoring the r46 zImage the board boots again. I have tried different DTs but I think it is something related to the kernel itself, since kernel r46 with DT from r47 also boots, but kernels r47 and r48 freeze. Image sizes are nearly the same (just a few bytes of difference).

It would be helpful if someone else with a BBB could confirm the bug or if it is something I am missing.

Thanks.

@jcdevel
Copy link
Author

jcdevel commented Feb 23, 2016

Could anyone confirm the problem? Has anyone got r48 working on BBB? Thanks.

@RobertCNelson
Copy link
Member

Sorry unable to confirm the problem:

[test-bbb-3: 4.1.17-ti-rt-r48 (up 6 days, 12 hours, 42 minutes)]

Regards,

@jcdevel
Copy link
Author

jcdevel commented Feb 27, 2016

Hi RobertCNelson. I have updated U-Boot to 2016.01, just in case, but still not working. I have tried also booting from uSD instead of the onboard eMMC. Nothing. These are the steps I use to build the kernel:

$ git checkout 4.1.17-ti-rt-r48
$ make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm clean
$ make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm mrproper
$ make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm bb.org_defconfig
$ make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm -j4 zImage
$ make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm dtbs
$ make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm -j4 modules
$ make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm INSTALL_MOD_PATH=$INSTALL_MOD_PATH modules_install

$INSTALL_MOD_PATH points to the root of my NFS exported filesystem. Then I use TFTP to load zImage and am335x-boneblack.dtb (as I always have). I have tried latest tag 4.1.18-ti-rt-r49, but no luck either. Any kernel newer than r46 fails.

If your board is working fine, it must be something related to my set up, I just do not know what it may be. Could it be related to the board revision? I have a BBB rev B.

Any help will be appreciated.

@kamtar
Copy link

kamtar commented Feb 27, 2016

Same problem here with BBB rev C.

@jcdevel
Copy link
Author

jcdevel commented Feb 28, 2016

I tried the resultant .config from bb-kernel and 4.1.18-ti-rt-r49 boots fine. It seems the bb.org_defconfig provided in this repo is no longer valid for the BBB. Is this planned or is it a bug? Or was bb.org_defconfig never intended to work on BBB and it has been working until r46 just by chance?

@RobertCNelson
Copy link
Member

@jcdevel bb.org_defconfig is for the bbb..

btw, do you have earlyprink enabled, i just noticed:

RobertCNelson/ti-linux-kernel-dev@7f0a67c

^^^ that was me debugging the x15, that should not be enabled..

if you have earlyprink as part of your bootargs, that might cause something..

REgards,

@jcdevel
Copy link
Author

jcdevel commented Feb 28, 2016

Hi RobertCNelson. Yes, I had earlyprink enabled. After removing it from bootargs, kernel boots fine.

@printesoi
Copy link

@jcdevel, if you want the kernel to work with the CONFIG_EARLY_PRINTK you shoud enable CONFIG_DEBUG_AM33XXUART1.

@RobertCNelson
Copy link
Member

@printesoi it didn't help that i had it enabled for the x15's usart's by default ;)

RobertCNelson pushed a commit that referenced this issue Aug 23, 2016
commit 213fa10 upstream.

Below call chain causes system crash when OMAP device is
removed by calling of_platform_depopulate()/device_del():

device_del()
- blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
 			     BUS_NOTIFY_DEL_DEVICE, dev);
  - _omap_device_notifier_call()
    - omap_device_delete()
      - od->pdev->archdata.od = NULL;
	kfree(od->hwmods);
	kfree(od);
  - bus_remove_device()
    - device_release_driver()
      - __device_release_driver()
	- pm_runtime_get_sync()
	   - _od_runtime_resume()
	     - omap_hwmod_enable() <- OOPS od's delted already

Backtrace:
Unable to handle kernel NULL pointer dereference at virtual address 0000000d
pgd = eb100000
[0000000d] *pgd=ad6e1831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
CPU: 1 PID: 1273 Comm: modprobe Not tainted 4.4.15-rt19-00115-ge4d3cd3-dirty #68
Hardware name: Generic DRA74X (Flattened Device Tree)
task: eb1ee800 ti: ec962000 task.ti: ec962000
PC is at omap_device_enable+0x10/0x90
LR is at _od_runtime_resume+0x10/0x24
[...]
[<c00299dc>] (omap_device_enable) from [<c0029a6c>] (_od_runtime_resume+0x10/0x24)
[<c0029a6c>] (_od_runtime_resume) from [<c04ad404>] (__rpm_callback+0x20/0x34)
[<c04ad404>] (__rpm_callback) from [<c04ad438>] (rpm_callback+0x20/0x80)
[<c04ad438>] (rpm_callback) from [<c04aee28>] (rpm_resume+0x48c/0x964)
[<c04aee28>] (rpm_resume) from [<c04af360>] (__pm_runtime_resume+0x60/0x88)
[<c04af360>] (__pm_runtime_resume) from [<c04a4974>] (__device_release_driver+0x30/0x100)
[<c04a4974>] (__device_release_driver) from [<c04a4a60>] (device_release_driver+0x1c/0x28)
[<c04a4a60>] (device_release_driver) from [<c04a38c0>] (bus_remove_device+0xec/0x144)
[<c04a38c0>] (bus_remove_device) from [<c04a0764>] (device_del+0x10c/0x210)
[<c04a0764>] (device_del) from [<c04a67b0>] (platform_device_del+0x18/0x84)
[<c04a67b0>] (platform_device_del) from [<c04a6828>] (platform_device_unregister+0xc/0x20)
[<c04a6828>] (platform_device_unregister) from [<c05adcfc>] (of_platform_device_destroy+0x8c/0x90)
[<c05adcfc>] (of_platform_device_destroy) from [<c04a02f0>] (device_for_each_child+0x4c/0x78)
[<c04a02f0>] (device_for_each_child) from [<c05adc5c>] (of_platform_depopulate+0x30/0x44)
[<c05adc5c>] (of_platform_depopulate) from [<bf123920>] (cpsw_remove+0x68/0xf4 [ti_cpsw])
[<bf123920>] (cpsw_remove [ti_cpsw]) from [<c04a68d8>] (platform_drv_remove+0x24/0x3c)
[<c04a68d8>] (platform_drv_remove) from [<c04a49c8>] (__device_release_driver+0x84/0x100)
[<c04a49c8>] (__device_release_driver) from [<c04a4b20>] (driver_detach+0xac/0xb0)
[<c04a4b20>] (driver_detach) from [<c04a3be8>] (bus_remove_driver+0x60/0xd4)
[<c04a3be8>] (bus_remove_driver) from [<c00d9870>] (SyS_delete_module+0x184/0x20c)
[<c00d9870>] (SyS_delete_module) from [<c0010540>] (ret_fast_syscall+0x0/0x1c)
Code: e3500000 e92d4070 1590630c 01a06000 (e5d6300d)

Hence, fix it by using BUS_NOTIFY_REMOVED_DEVICE event for OMAP device
deletion which is sent when DD has finished processing of device
deletion.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
@nicholas-zww
Copy link

hi

I have exactly same issue here. Anyone has any solution for this case?

@RobertCNelson
Copy link
Member

@nicholas-zww please include more details:

git tag
defconfig used + changes
serial boot log

Regards,

@nicholas-zww
Copy link

I used release "linux-4.4.49-ti-rt-r89", and without any change, just use bb.org_defconfig, and make.
Then i get below output from serial port. It stops at "starting kernel.....", then after a while, it looks like a reset happens, and reboot again.

U-Boot SPL 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img

U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)

I2C: ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment

Net: not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
mmc0(part 0) is current device
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 1
reading uEnv.txt
829 bytes read in 3 ms (269.5 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
cpsw Waiting for PHY auto negotiation to complete. done
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.3.8; our IP address is 192.168.3.123
Filename 'zImage'.
Load address: 0x82000000
Loading: T #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###############
314.5 KiB/s
done
Bytes transferred = 8728752 (8530b0 hex)
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.3.8; our IP address is 192.168.3.123
Filename 'am335x-boneblack.dtb'.
Load address: 0x88000000
Loading: ###########
404.3 KiB/s
done
Bytes transferred = 55541 (d8f5 hex)
Kernel image @ 0x82000000 [ 0x000000 - 0x8530b0 ]

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Using Device Tree in place at 88000000, end 880108f4

Starting kernel ...

@pdp7
Copy link
Contributor

pdp7 commented Jun 10, 2020

Please re-open if still an issue.

@pdp7 pdp7 closed this as completed Jun 10, 2020
RobertCNelson pushed a commit that referenced this issue Dec 17, 2021
…tible()

commit 9acf636 upstream.

Using wait_event_interruptible() to wait for complete transmission,
but do not check the result of wait_event_interruptible() which can be
interrupted. It will result in TX buffer has multiple accessors and
the later process interferes with the previous process.

Following is one of the problems reported by syzbot.

=============================================================
WARNING: CPU: 0 PID: 0 at net/can/isotp.c:840 isotp_tx_timer_handler+0x2e0/0x4c0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.13.0-rc7+ #68
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014
RIP: 0010:isotp_tx_timer_handler+0x2e0/0x4c0
Call Trace:
 <IRQ>
 ? isotp_setsockopt+0x390/0x390
 __hrtimer_run_queues+0xb8/0x610
 hrtimer_run_softirq+0x91/0xd0
 ? rcu_read_lock_sched_held+0x4d/0x80
 __do_softirq+0xe8/0x553
 irq_exit_rcu+0xf8/0x100
 sysvec_apic_timer_interrupt+0x9e/0xc0
 </IRQ>
 asm_sysvec_apic_timer_interrupt+0x12/0x20

Add result check for wait_event_interruptible() in isotp_sendmsg()
to avoid multiple accessers for tx buffer.

Fixes: e057dd3 ("can: add ISO 15765-2:2016 transport protocol")
Link: https://lore.kernel.org/all/10ca695732c9dd267c76a3c30f37aefe1ff7e32f.1633764159.git.william.xuanziyang@huawei.com
Cc: stable@vger.kernel.org
Reported-by: syzbot+78bab6958a614b0c80b9@syzkaller.appspotmail.com
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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

6 participants