{"action":"created","issue":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/1178","labels_url":"https://api.github.com/repos/raspberrypi/linux/issues/1178/labels{/name}","comments_url":"https://api.github.com/repos/raspberrypi/linux/issues/1178/comments","events_url":"https://api.github.com/repos/raspberrypi/linux/issues/1178/events","html_url":"https://github.com/raspberrypi/linux/pull/1178","id":113922212,"number":1178,"title":"ARCH_BCM2708: Drop ATAGS support","user":{"login":"notro","id":530887,"avatar_url":"https://avatars.githubusercontent.com/u/530887?v=3","gravatar_id":"","url":"https://api.github.com/users/notro","html_url":"https://github.com/notro","followers_url":"https://api.github.com/users/notro/followers","following_url":"https://api.github.com/users/notro/following{/other_user}","gists_url":"https://api.github.com/users/notro/gists{/gist_id}","starred_url":"https://api.github.com/users/notro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notro/subscriptions","organizations_url":"https://api.github.com/users/notro/orgs","repos_url":"https://api.github.com/users/notro/repos","events_url":"https://api.github.com/users/notro/events{/privacy}","received_events_url":"https://api.github.com/users/notro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":35,"created_at":"2015-10-28T21:08:15Z","updated_at":"2015-11-10T15:39:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/raspberrypi/linux/pulls/1178","html_url":"https://github.com/raspberrypi/linux/pull/1178","diff_url":"https://github.com/raspberrypi/linux/pull/1178.diff","patch_url":"https://github.com/raspberrypi/linux/pull/1178.patch"},"body":"This PR makes Device Tree mandatory for booting the ARCH_BCM2708 kernel.\r\n\r\nWe have used Device Tree since we [switched to 3.18](https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=97216) in January and it's time to remove [ATAGS](http://stackoverflow.com/questions/21014920/arm-linux-atags-vs-device-tree) support.\r\n\r\nThis will cut down on the amount of patches that we have to keep around and apply on each new kernel release. It is also a necessary step on the way to get one kernel image that can boot both Pi1 and Pi2 (instead of having kernel.img and kernel7.img).\r\n\r\nWith this PR, ARCH_BCM2708 and ARCH_BCM2835 will be identical except that they will still require different device trees. One reason for not just switching directly to ARCH_BCM2835 is that historically it has been identified with with mainline support for Pi1, but it will in the (near) future also enable support for Pi2. So to avoid any confusion we keep the old config option ARCH_BCM2708 for now and make the switch to ARCH_BCM2835 when it can boot both Pi1 and Pi2. It is possible to build a kernel with both ARCH_BCM2708 and ARCH_BCM2835 enabled since ARCH_BCM2708 is now multi platform.\r\n\r\nA /boot/config.txt that disables Device Tree will not boot anymore:\r\n```\r\ndevice_tree=\r\n```\r\nThere will be no visible sign that the kernel didn't receive a Device Tree since it won't know which drivers to load and hence can't display an error (a custom kernel with EARLY_PRINTK enabled would print an error on the serial console).\r\n\r\n\r\n**mkknlimg**\r\n\r\nmkknlimg detects this ARCH_BCM2708 kernel as *283x* because it supports both 2708 and 2835 Device Trees.\r\nWe could let ARCH_BCM2835 indicate *283x* instead of using the DT compatible strings.\r\n\r\n\r\n**Watchdog**\r\n\r\nA sideeffect of enabling the watchdog combined with systemd is a critical watchdog message on reboot:\r\n```\r\n[  OK  ] Reached target Shutdown.\r\n[  106.578201] watchdog watchdog0: watchdog did not stop!\r\n[  106.955340] reboot: Restarting system\r\n```\r\nThis is systemd setting up the watchdog to trigger in 10 minutes in case the reboot doesn't happen for some reason.\r\nsystemd opens /dev/watchdog, sets the timeout and closes the file without stopping the watchdog, hence the warning.\r\n\r\nThis can be disabled:\r\n/etc/systemd/system.conf\r\n```\r\nShutdownWatchdogSec=0\r\n```\r\n\r\nThere will be a similar PR for ARCH_BCM2709.\r\n"},"comment":{"url":"https://api.github.com/repos/raspberrypi/linux/issues/comments/155457003","html_url":"https://github.com/raspberrypi/linux/pull/1178#issuecomment-155457003","issue_url":"https://api.github.com/repos/raspberrypi/linux/issues/1178","id":155457003,"user":{"login":"pelwell","id":8911409,"avatar_url":"https://avatars.githubusercontent.com/u/8911409?v=3","gravatar_id":"","url":"https://api.github.com/users/pelwell","html_url":"https://github.com/pelwell","followers_url":"https://api.github.com/users/pelwell/followers","following_url":"https://api.github.com/users/pelwell/following{/other_user}","gists_url":"https://api.github.com/users/pelwell/gists{/gist_id}","starred_url":"https://api.github.com/users/pelwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelwell/subscriptions","organizations_url":"https://api.github.com/users/pelwell/orgs","repos_url":"https://api.github.com/users/pelwell/repos","events_url":"https://api.github.com/users/pelwell/events{/privacy}","received_events_url":"https://api.github.com/users/pelwell/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T15:39:57Z","updated_at":"2015-11-10T15:39:57Z","body":"To solve the image tagging problem I propose to create two new tags - 270X and 283X (note the capital 'X's):\r\n1) The old '283x' tag will continue to be set to 1 for images built only for ARCH_BCM2835.\r\n2) The new '270X' tag will be set to 1 if built for ARCH_BCM2708/9, otherwise 0.\r\n3) The new '283X' tag will be set to 1 if built for ARCH_BCM2835/6, otherwise 0.\r\n\r\nOld firmware will only look for '283x', so it will load bcm283* dtbs for builds for just ARCH_BCM2385, otherwise it will use the usual bcm270* dtbs.\r\n\r\nNew firmware will first look for the new tags, using bcm270* if 270X == 1, bcm283* if 283X == 1, falling back to the behaviour of the old firmware based on 283x. As @notro said, if both flags are present it will prefer the bcm270* firmware if present, but will use the bcm283* if it has to and can.\r\n\r\nOf course, the effect of pr1178 is to remove the distinction between bcm2708 and bcm2835, so 270X will have the same value as 283X in subsequent builds. I don't see that as necessarily a problem, but if we did want to maintain the distinction then we could make the DT_MACHINE_START declarations conditional on the relevant CONFIG_ARCH_ option.\r\n\r\nI will give mkknlimg command-line overrides for all tags, just in case.\r\n"}}