Kodi Community Forum

Full Version: ChromeBox Kodi E-Z Setup Script (LibreELEC/Linux+Kodi) [2017/02/21]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553
(2014-07-01, 15:59)Igor2014 Wrote: [ -> ]The problem is not booting. I used LiLi USB creator first - it successfully boots Fedora Live CD into Live desktop but somehow the option for installing fedora to disk (either from boot menu or from Live desktop) is missing. I checked it with several distros. I guess Fedora USB creator writes some additional data into USB disk to allow installation.

I don't see how - the install to hard disk is just an app on the system like any other. But like I said before, I used UUI to boot/install without a problem Smile
(2014-07-01, 16:24)Matt Devo Wrote: [ -> ]
(2014-07-01, 15:59)Igor2014 Wrote: [ -> ]The problem is not booting. I used LiLi USB creator first - it successfully boots Fedora Live CD into Live desktop but somehow the option for installing fedora to disk (either from boot menu or from Live desktop) is missing. I checked it with several distros. I guess Fedora USB creator writes some additional data into USB disk to allow installation.

I don't see how - the install to hard disk is just an app on the system like any other. But like I said before, I used UUI to boot/install without a problem Smile

No idea how, but this app (desktop icon) is missing when I create bootable USB with LiLi. This drew me crazy for few hours...
Being a total Linux virgin, I watched this:

https://www.youtube.com/watch?v=cm9skyZygNM

Seems pretty straightforward, and my understanding the KDE interface is already baked into the cake for the latest Fedora standalone.
(2014-07-01, 20:19)Mark the Red Wrote: [ -> ]Being a total Linux virgin, I watched this:

https://www.youtube.com/watch?v=cm9skyZygNM

Seems pretty straightforward, and my understanding the KDE interface is already baked into the cake for the latest Fedora standalone.

Yes, Fedora 20 KDE spin is coming with KDE windows manager. For XBMC I'm using Openbox windows manager because of its "lightweight" nature (uses around 300 MB of memory with XBMC loaded vs. > 1GB for KDE). But the good thing is that you can keep it both. Switching between windows managers is very easy - just logout, select appropriate session (KDE or openbox) and login again. Even reboot is not required.
^
I don't really care for KDE either and I would prefer a lower memory footprint. Any magical tricks not included in your how-to as to ensure the XBMC autologin boot process goes right into Openbox?
(2014-07-01, 23:05)Mark the Red Wrote: [ -> ]^
I don't really care for KDE either and I would prefer a lower memory footprint. Any magical tricks not included in your how-to as to ensure the XBMC autologin boot process goes right into Openbox?

These are last 3 steps. Once you logged in with openbox it will be automatically saved and after next shutdown/reboot the system will always login into openbox.
Hi Matt!

I mistakenly did not back up the stock firmware; what might I 'lose' if I go back to vanilla Chrome? It seems like some things are tied to firmware (eg. MAC address).

If I were to go back to the recovery firmware boot, what would the Chrome OS lack (mac addr?) ?

thanks!
(2014-07-02, 05:48)tlee Wrote: [ -> ]Hi Matt!

I mistakenly did not back up the stock firmware; what might I 'lose' if I go back to vanilla Chrome? It seems like some things are tied to firmware (eg. MAC address).

If I were to go back to the recovery firmware boot, what would the Chrome OS lack (mac addr?) ?

thanks!

well, your MAC address would be the same as it is now (the "default" value), but that wouldn't have any real effect, save if you had more than one ChromeBox with that MAC connected to the same router. The only thing you'd need to change is your device's hardware id (from the generic value in the recovery firmware), so that you'd be able to receive ChromeOS updates. I'll add that to the wiki shortly
(2014-07-02, 16:18)Matt Devo Wrote: [ -> ]
(2014-07-02, 05:48)tlee Wrote: [ -> ]Hi Matt!

I mistakenly did not back up the stock firmware; what might I 'lose' if I go back to vanilla Chrome? It seems like some things are tied to firmware (eg. MAC address).

If I were to go back to the recovery firmware boot, what would the Chrome OS lack (mac addr?) ?

thanks!

well, your MAC address would be the same as it is now (the "default" value), but that wouldn't have any real effect, save if you had more than one ChromeBox with that MAC connected to the same router. The only thing you'd need to change is your device's hardware id (from the generic value in the recovery firmware), so that you'd be able to receive ChromeOS updates. I'll add that to the wiki shortly

From the rooting around that I've done, it seems the VPD is the the most important piece of my-chromebox-specific information... is that true? Would I be missing anything else?

Fortunately I did flash with v2.12, so your script saved my VPD.

Would something like this work:

#boot into chromium
flashrom -r /tmp/bios.bin
#save bios.bin!
#script: get cbfstool
get_cbfstool
# Get VPD ->
/tmp/boot/util/cbfstool /tmp/bios.bin extract -n vpd.bin -f /tmp/vpd.bin
# save vpd.bin!
# use recovery image to flash stock firmware in from Matt's dropbox (firmware-panther-factory-recovery.bin)
flashrom –w /tmp/stock-firmware.bin
#read stock image back out
flashrom –r /tmp/stockflashedfirmware.bin
dd if=/tmp/vpd.bin bs=1 seek=$((0x00600000)) count=$((0x00004000)) of=/tmp/stockflashedfirmware.bin
# Write back to firmware
flashrom –w /tmp/stockflashedfirmware.bin
#restore chrome os with VPD!
(2014-07-02, 16:44)tlee Wrote: [ -> ]From the rooting around that I've done, it seems the VPD is the the most important piece of my-chromebox-specific information... is that true? Would I be missing anything else?

Fortunately I did flash with v2.12, so your script saved my VPD.

Would something like this work:

#boot into chromium
#read current firmware
flashrom -r /tmp/bios.bin
#script: get cbfstool
get_cbfstool
# extract VPD from current firmware
/tmp/boot/util/cbfstool /tmp/bios.bin extract -n vpd.bin -f /tmp/vpd.bin
# get recovery image to flash stock firmware in from Matt's dropbox (firmware-panther-factory-recovery.bin)
curl -L -o /tmp/firmware-recovery.bin https://db.tt/sLQL9i1p
#inject VPD into recovery firmware
dd if=/tmp/vpd.bin bs=1 seek=$((0x00600000)) count=$((0x00004000)) of=/tmp/firmware-recovery.bin conv=notrunc
#set hardware ID -- use your original hardware ID if you remember it
sudo gbb_utility --set --hwid='PANTHER F5U-C92' /tmp/[b]firmware-recovery.bin /tmp/newbios.bin
# Write stock firmware
sudo flashrom -w /tmp/newbios.bin
#reboot
sudo reboot
#restore ChromeOS using USB recovery media

conceptually that's correct-ish; I made some additions/corrections/simplifications.

Do note that unless you plan on hacking up my script, you'll need to perform the steps in the script function get_cbfstool() manually to mount the partition, create dir, download file, etc. And that the reason cbfstool has to be run from the mounted boot partition is because all normally mounted and writable partitions have the 'noexec' flag.

Also, there's no need to flash the recovery firmware and then read it back before modifying it with your VPD and hwid. Easiest just to do everything at once, then flash, reboot, and restore ChromeOS.
so the hwid is not stored in the vpd?
(2014-07-02, 18:05)tlee Wrote: [ -> ]so the hwid is not stored in the vpd?

it is not, it's stored in the GBB region (starts at address 0x00611000)
First off I just want to say thank you Matt. I've been running standalone on my chromebox for a month now and it's been working flawlessly. Thanks for all your hard work. My question is does the Coreboot update automatically every time you make changes to it or do I need to do it manually from the boot screen? I'm thinking it's the latter but just wanted to double check before I do something wrong.
(2014-07-04, 02:31)luvdemnoles22 Wrote: [ -> ]First off I just want to say thank you Matt. I've been running standalone on my chromebox for a month now and it's been working flawlessly. Thanks for all your hard work. My question is does the Coreboot update automatically every time you make changes to it or do I need to do it manually from the boot screen? I'm thinking it's the latter but just wanted to double check before I do something wrong.

glad to hear it's been working well for you Smile

If you need/want to update the Coreboot firmware, you'll need to re-download/re-run the script from a bootable ChromiumOS USB stick. I'm working on making the script run properly from any Linux distro, but that's not quite ready yet.
Alright got it, thanks for the quick reply
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553