{"action":"created","comment":{"url":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/comments/185800000","pull_request_review_id":117261902,"id":185800000,"diff_hunk":"@@ -43,13 +43,138 @@ DEB_DIR=`pwd`/debian\n KCONFIG=`pwd`/configs/${BUILDCONFIG}_config\n KERNEL_BUILD=`pwd`/_build_armhf/${BUILDCONFIG}-linux\n \n+INITRAMFS_MODULES=\"sunxi_wdt.ko\"\n+INITRAMFS_COMPRESSION=\"${INITRAMFS_COMPRESSION:-.lzo}\"\n+INITRAMFS_ROOT_GID=${INITRAMFS_ROOT_GID:-0}\n+INITRAMFS_ROOT_UID=${INITRAMFS_ROOT_UID:-0}\n+INITRAMFS_SOURCE=\"${INITRAMFS_SOURCE:-initramfs/initramfs.lst}\"\n+INITRAMFS_IMG=\"${KERNEL_BUILD}/initramfs.cpio${INITRAMFS_COMPRESSION}\"\n+\n+GEN_INIT_CPIO=\"${KERNEL_BUILD}/usr/gen_init_cpio\"\n+GEN_INITRAMFS_LIST=\"${KERNEL}/scripts/gen_initramfs_list.sh\"\n+\n+BB_PKG=\"http://ftp.nl.debian.org/debian/pool/main/b/busybox/busybox-static_1.22.0-19+b3_armhf.deb\"\n+BB_BIN=\"busybox\"\n+\n+DEPMOD=\"${DEPMOD:-/sbin/depmod}\"\n+if [ ! -x \"${DEPMOD}\" ]; then\n+    DEPMOD=\"busybox depmod\"\n+    if [ ! -x \"${DEPMOD}\" ]; then\n+        echo \"No depmod binary available. Cannot continue.\"\n+        exit 1\n+    fi\n+fi\n+\n # Set the release version if it's not passed to the script\n RELEASE_VERSION=${RELEASE_VERSION:-9999.99.99}\n \n # Initialize repositories\n git submodule init\n git submodule update\n \n+busybox_get()\n+{\n+    local BB_DIR=$(mktemp -d)\n+    local BB_AR=\"${BB_DIR}/busybox-static_armhf.deb\"\n+    local INITRAMFS_DIR=\"${1}\"\n+    local cwd=$(pwd)\n+\n+    if [ ! -d \"${INITRAMFS_DIR}\" ]; then\n+        echo \"No initramfs dir set to download busybox into.\"\n+        exit 1\n+    fi\n+\n+    if [ -z \"${BB_DIR}\" ]; then\n+        echo \"Unable to create temporary directory to get busybox.\"\n+        exit 1\n+    fi\n+\n+    wget -q \"${BB_PKG}\" -O \"${BB_AR}\"\n+    cd \"${BB_DIR}\" # ar always extracts to the cwd\n+    ar -x \"${BB_AR}\" \"data.tar.xz\"\n+    cd \"${cwd}\"\n+    tar -xf \"${BB_DIR}/data.tar.xz\" --strip=2 -C \"${BB_DIR}\" \"./bin/${BB_BIN}\"","path":"build_for_ultimaker.sh","position":null,"original_position":54,"commit_id":"fafe01e6b45e6dbad81f4bcbbdfbf28922f027d3","original_commit_id":"636d2f6a7dcbb50a5d8ea05cd606934e19da83a2","user":{"login":"raysiudak","id":2758985,"avatar_url":"https://avatars3.githubusercontent.com/u/2758985?v=4","gravatar_id":"","url":"https://api.github.com/users/raysiudak","html_url":"https://github.com/raysiudak","followers_url":"https://api.github.com/users/raysiudak/followers","following_url":"https://api.github.com/users/raysiudak/following{/other_user}","gists_url":"https://api.github.com/users/raysiudak/gists{/gist_id}","starred_url":"https://api.github.com/users/raysiudak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raysiudak/subscriptions","organizations_url":"https://api.github.com/users/raysiudak/orgs","repos_url":"https://api.github.com/users/raysiudak/repos","events_url":"https://api.github.com/users/raysiudak/events{/privacy}","received_events_url":"https://api.github.com/users/raysiudak/received_events","type":"User","site_admin":false},"body":"Ok you changed it.... but does the 'cd \"${cwd}' still make sense now? ","created_at":"2018-05-03T13:38:08Z","updated_at":"2018-05-03T13:38:09Z","html_url":"https://github.com/Ultimaker/um-kernel/pull/21#discussion_r185800000","pull_request_url":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/21","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/comments/185800000"},"html":{"href":"https://github.com/Ultimaker/um-kernel/pull/21#discussion_r185800000"},"pull_request":{"href":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/21"}},"in_reply_to_id":185222492},"pull_request":{"url":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/21","id":181479348,"html_url":"https://github.com/Ultimaker/um-kernel/pull/21","diff_url":"https://github.com/Ultimaker/um-kernel/pull/21.diff","patch_url":"https://github.com/Ultimaker/um-kernel/pull/21.patch","issue_url":"https://api.github.com/repos/Ultimaker/um-kernel/issues/21","number":21,"state":"open","locked":false,"title":"EM-2098 Add an initramfs and support loading an update from it.","user":{"login":"oliv3r","id":1245341,"avatar_url":"https://avatars1.githubusercontent.com/u/1245341?v=4","gravatar_id":"","url":"https://api.github.com/users/oliv3r","html_url":"https://github.com/oliv3r","followers_url":"https://api.github.com/users/oliv3r/followers","following_url":"https://api.github.com/users/oliv3r/following{/other_user}","gists_url":"https://api.github.com/users/oliv3r/gists{/gist_id}","starred_url":"https://api.github.com/users/oliv3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliv3r/subscriptions","organizations_url":"https://api.github.com/users/oliv3r/orgs","repos_url":"https://api.github.com/users/oliv3r/repos","events_url":"https://api.github.com/users/oliv3r/events{/privacy}","received_events_url":"https://api.github.com/users/oliv3r/received_events","type":"User","site_admin":false},"body":"This patch series adds a built-in minimal busybox based initramfs. The initramfs is rather basic and mostly just tries to see if an 'um_updater.sh' executable script is available to start an update.\r\n\r\nIt tries to update from USB drives (NTFS and exfat are NOT supported) or sata disks (/dev/sd*) and SD cards (/dev/mmcblk*).\r\n\r\nIt closes both issues EM-2098 and EM-2398.\r\n\r\n---\r\nChanges since v2:\r\n* Honor the rootdelay option to allow checking for updates on USB storage\r\n* Added new function documentation in the build script\r\n* Start the rescue shell using exec, ensuring it is run as PID1 allowing manual switch_root to work\r\n* Some minor polishing\r\n\r\nChanges since v1:\r\n* Do not use /sbin/init, initramfs is expected to have an /init\r\n* Support 'rw' parameter as well as 'ro' parameter\r\n* Replace bashisms (that ash does allow) with POSIX variable substitution\r\n* Lots of unhappy flow fixes\r\n","created_at":"2018-04-13T12:53:21Z","updated_at":"2018-05-03T13:38:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc23a0840b45a07ce73efc02f3384589228edb58","assignee":null,"assignees":[],"requested_reviewers":[{"login":"CoenSchalkwijk","id":29890605,"avatar_url":"https://avatars3.githubusercontent.com/u/29890605?v=4","gravatar_id":"","url":"https://api.github.com/users/CoenSchalkwijk","html_url":"https://github.com/CoenSchalkwijk","followers_url":"https://api.github.com/users/CoenSchalkwijk/followers","following_url":"https://api.github.com/users/CoenSchalkwijk/following{/other_user}","gists_url":"https://api.github.com/users/CoenSchalkwijk/gists{/gist_id}","starred_url":"https://api.github.com/users/CoenSchalkwijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoenSchalkwijk/subscriptions","organizations_url":"https://api.github.com/users/CoenSchalkwijk/orgs","repos_url":"https://api.github.com/users/CoenSchalkwijk/repos","events_url":"https://api.github.com/users/CoenSchalkwijk/events{/privacy}","received_events_url":"https://api.github.com/users/CoenSchalkwijk/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/21/commits","review_comments_url":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/21/comments","review_comment_url":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ultimaker/um-kernel/issues/21/comments","statuses_url":"https://api.github.com/repos/Ultimaker/um-kernel/statuses/fafe01e6b45e6dbad81f4bcbbdfbf28922f027d3","head":{"label":"Ultimaker:EM-2098_bare_initramfs","ref":"EM-2098_bare_initramfs","sha":"fafe01e6b45e6dbad81f4bcbbdfbf28922f027d3","user":{"login":"Ultimaker","id":499557,"avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"repo":{"id":77933278,"name":"um-kernel","full_name":"Ultimaker/um-kernel","owner":{"login":"Ultimaker","id":499557,"avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ultimaker/um-kernel","description":"Ultimaker linux kernel config files and build scripts","fork":false,"url":"https://api.github.com/repos/Ultimaker/um-kernel","forks_url":"https://api.github.com/repos/Ultimaker/um-kernel/forks","keys_url":"https://api.github.com/repos/Ultimaker/um-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ultimaker/um-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ultimaker/um-kernel/teams","hooks_url":"https://api.github.com/repos/Ultimaker/um-kernel/hooks","issue_events_url":"https://api.github.com/repos/Ultimaker/um-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/Ultimaker/um-kernel/events","assignees_url":"https://api.github.com/repos/Ultimaker/um-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/Ultimaker/um-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/Ultimaker/um-kernel/tags","blobs_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ultimaker/um-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/Ultimaker/um-kernel/languages","stargazers_url":"https://api.github.com/repos/Ultimaker/um-kernel/stargazers","contributors_url":"https://api.github.com/repos/Ultimaker/um-kernel/contributors","subscribers_url":"https://api.github.com/repos/Ultimaker/um-kernel/subscribers","subscription_url":"https://api.github.com/repos/Ultimaker/um-kernel/subscription","commits_url":"https://api.github.com/repos/Ultimaker/um-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ultimaker/um-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ultimaker/um-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ultimaker/um-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/Ultimaker/um-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ultimaker/um-kernel/merges","archive_url":"https://api.github.com/repos/Ultimaker/um-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ultimaker/um-kernel/downloads","issues_url":"https://api.github.com/repos/Ultimaker/um-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/Ultimaker/um-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/Ultimaker/um-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/Ultimaker/um-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ultimaker/um-kernel/labels{/name}","releases_url":"https://api.github.com/repos/Ultimaker/um-kernel/releases{/id}","deployments_url":"https://api.github.com/repos/Ultimaker/um-kernel/deployments","created_at":"2017-01-03T16:22:30Z","updated_at":"2018-04-24T15:38:26Z","pushed_at":"2018-05-02T13:15:12Z","git_url":"git://github.com/Ultimaker/um-kernel.git","ssh_url":"git@github.com:Ultimaker/um-kernel.git","clone_url":"https://github.com/Ultimaker/um-kernel.git","svn_url":"https://github.com/Ultimaker/um-kernel","homepage":null,"size":242,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":4,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"Ultimaker:master","ref":"master","sha":"7a7d029b3807fe8e3ccec733e5b2606deedb3249","user":{"login":"Ultimaker","id":499557,"avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"repo":{"id":77933278,"name":"um-kernel","full_name":"Ultimaker/um-kernel","owner":{"login":"Ultimaker","id":499557,"avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ultimaker/um-kernel","description":"Ultimaker linux kernel config files and build scripts","fork":false,"url":"https://api.github.com/repos/Ultimaker/um-kernel","forks_url":"https://api.github.com/repos/Ultimaker/um-kernel/forks","keys_url":"https://api.github.com/repos/Ultimaker/um-kernel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ultimaker/um-kernel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ultimaker/um-kernel/teams","hooks_url":"https://api.github.com/repos/Ultimaker/um-kernel/hooks","issue_events_url":"https://api.github.com/repos/Ultimaker/um-kernel/issues/events{/number}","events_url":"https://api.github.com/repos/Ultimaker/um-kernel/events","assignees_url":"https://api.github.com/repos/Ultimaker/um-kernel/assignees{/user}","branches_url":"https://api.github.com/repos/Ultimaker/um-kernel/branches{/branch}","tags_url":"https://api.github.com/repos/Ultimaker/um-kernel/tags","blobs_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ultimaker/um-kernel/statuses/{sha}","languages_url":"https://api.github.com/repos/Ultimaker/um-kernel/languages","stargazers_url":"https://api.github.com/repos/Ultimaker/um-kernel/stargazers","contributors_url":"https://api.github.com/repos/Ultimaker/um-kernel/contributors","subscribers_url":"https://api.github.com/repos/Ultimaker/um-kernel/subscribers","subscription_url":"https://api.github.com/repos/Ultimaker/um-kernel/subscription","commits_url":"https://api.github.com/repos/Ultimaker/um-kernel/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ultimaker/um-kernel/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ultimaker/um-kernel/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ultimaker/um-kernel/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ultimaker/um-kernel/contents/{+path}","compare_url":"https://api.github.com/repos/Ultimaker/um-kernel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ultimaker/um-kernel/merges","archive_url":"https://api.github.com/repos/Ultimaker/um-kernel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ultimaker/um-kernel/downloads","issues_url":"https://api.github.com/repos/Ultimaker/um-kernel/issues{/number}","pulls_url":"https://api.github.com/repos/Ultimaker/um-kernel/pulls{/number}","milestones_url":"https://api.github.com/repos/Ultimaker/um-kernel/milestones{/number}","notifications_url":"https://api.github.com/repos/Ultimaker/um-kernel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ultimaker/um-kernel/labels{/name}","releases_url":"https://api.github.com/repos/Ultimaker/um-kernel/releases{/id}","deployments_url":"https://api.github.com/repos/Ultimaker/um-kernel/deployments","created_at":"2017-01-03T16:22:30Z","updated_at":"2018-04-24T15:38:26Z","pushed_at":"2018-05-02T13:15:12Z","git_url":"git://github.com/Ultimaker/um-kernel.git","ssh_url":"git@github.com:Ultimaker/um-kernel.git","clone_url":"https://github.com/Ultimaker/um-kernel.git","svn_url":"https://github.com/Ultimaker/um-kernel","homepage":null,"size":242,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0"},"forks":4,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/21"},"html":{"href":"https://github.com/Ultimaker/um-kernel/pull/21"},"issue":{"href":"https://api.github.com/repos/Ultimaker/um-kernel/issues/21"},"comments":{"href":"https://api.github.com/repos/Ultimaker/um-kernel/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ultimaker/um-kernel/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/Ultimaker/um-kernel/statuses/fafe01e6b45e6dbad81f4bcbbdfbf28922f027d3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"raysiudak"}}