34 posts in this topic

Hi, xorangekiller.

 

My Chromebook is put on Developer Mode and i have "crossystem dev_boot_usb=1" set in Chrome OS in order to be able to boot self-signed kernels from USB/SD media.

If i'll set up Debian using your partition scheme, will USB/SD boot (with Ctrl+U) still work?

 

I'm asking because i've already tried a scheme with Debian on eMMC having just two partitions (one with self-signed kernel, second with rootfs), and while i was able to boot into Debian (with Ctrl+D), the USB/SD boot got broken.

 

Thank you!

Share this post


Link to post
Share on other sites

Excellent description, thank you.

I am writing this using my Chromebook, debian installed.

Maybe the preparation of the internal ssd can be shortened by the following script:

 

#!/bin/sh

target_disk=/dev/mmcblk0
cgpt create ${target_disk}
cgpt add -i 11 -b 64 -s 16384 -S 1 -P 5 -l RWFW -t "firmware" ${target_disk}
cgpt add -i 6 -b 16448 -s 1 -S 1 -T 15 -P 0 -l KERN-C -t "kernel"  ${target_disk}
cgpt add -i 7 -b 16449 -s 1  -l ROOT-C -t "rootfs"   ${target_disk}
cgpt add -i 9 -b 16450 -s 1  -l reserved -t "reserved"   ${target_disk}
cgpt add -i 10 -b 16451 -s 1  -l reserved -t "reserved"   ${target_disk}
cgpt add -i 2 -b 16452 -s 32768 -S 1 -T 15 -P 15 -l KERN-A -t kernel ${target_disk}
cgpt add -i 4 -b 49220 -s 32768 -S 1 -T 15 -P 0 -l KERN-B -t kernel ${target_disk}
cgpt add -i 8 -b 81988 -s 32768  -l OEM -t data   ${target_disk}
cgpt add -i 12 -b 114756 -s 32768 -S 1 -P 5 -l EFI-SYSTEM -t "efi" ${target_disk}
cgpt add -i 5 -b 147524 -s 4096  -l ROOT-B -t rootfs ${target_disk}
cgpt add -i 3 -b 151620 -s 28870622 -S 1 -P 5 -l ROOT-A -t rootfs ${target_disk}

cgpt add -i 1 -b 29022242 -s 1755069  -l STATE -t data ${target_disk}
sync

mkfs.ext4 ${target_disk}p3
mkswap ${target_disk}p1

Norbert

Share this post


Link to post
Share on other sites

Just checked it and:

Yes, booting from an SD card still works.

 

Norbert

1 person likes this

Share this post


Link to post
Share on other sites

Karl L.,

 

Firstly kudos for your excellent work so far.  :D

 

I'd like to understand how booting works, after one has followed your instructions.  Am I right that:

  1. The default "verified" uboot bootloader is not used (nor is the alternate "non-verified" nv-uboot bootloader? For more details on nv-uboot, please see "Appendix A: Using nv-U-Boot on the Samsung ARM Chromebook":
    http://www.chromium.org/chromium-os/u-boot-porting-guide/using-nv-u-boot-on-the-samsung-arm-chromebook ).  It seems you somehow use "firmware-linux" and "firmware-libertas" instead.  I've never heard of those (as I'm only familiar with how GRUB works, on PC's).  What are those?  What do they do?
  2. "firmware-linux" and "firmware-libertas" somehow boots a "stock" linux kernel that you compiled and packaged yourself, called "linux-image-exynos5" (as opposed to "borrowing" and "signing" the ChromeOS kernel, which is what one must unfortunately do using the current instructions found on "InstallingDebianOn Samsung ARMChromebook":
    https://wiki.debian.org/InstallingDebianOn/Samsung/ARMChromebook
  3. When future versions of your "linux-image-exynos5" are released (say, because there was an important security update released for the kernel), they'll "just work" (at boot time), when one installs them with "sudo apt-get update && sudo apt-get upgrade"?

If I'm correct on these 3 points, then how were you able to "get away with" not using the nv-uboot bootloader?  That is to say, why couldn't the Debian folks follow suit and boot their own stock linux kernels with "firmware-linux" and "firmware-libertas" like you do?

 

Note: The Debian folks are currently stuck on how to boot a stock linux kernel from nv-u-boot, as seen on
"InstallingDebianOn Samsung ARMChromebook":

https://wiki.debian.org/InstallingDebianOn/Samsung/ARMChromebook


  "Three partitions are created on the disk. In time, the intention is that these be used for:
   - a copy of nv-uboot that is chainloaded by the standard firmware,
   - a /boot filesystem containing the standard (non-ChromeOS) kernel, read by nv-uboot,
   - the root filesystem.

  Currently nv-uboot is *not* used, and so the arrangement is:
   - a copy of the ChromeOS kernel that is loaded by the standard firmware,
   - a /boot filesystem that is used only to contain the ChromeOS kernel (which is not used during booting, just during the preparation of the previous partition),
   - the root filesystem."

 

I would appreciate any clarification, as you seem to understand these things really well.  GPT and "verified" bootloaders are tough to understand, especially when it comes to how to boot stock linux kernels.

Share this post


Link to post
Share on other sites

Karl L.,

 

Your work is much appreciated.   :woot:   I write this posting from my new Debian Jesse install on my Samsung ARM Chromebook.

 

A few things could be filled into your procedure:

  • Before doing step 2.3, you didn't mention how to get the Chromebook connected to one's wifi network.  Here's how I did that (well, I'm pretty sure these were the minimal steps that succeeded):
    • ifconfig mlan0 down
    • ifconfig mlan0 essid MySSIDsNameHere key s:MyWifiPasswordHere
    • ifconfig mlan0 up
    • (wait about 15 seconds for the wifi authentication to work)
    • dhclient mlan0
    • (wait a few seconds for a DHCP lease to be assigned)
    • ifconfig mlan0
    • (you should now see a valid DHCP-assigned IP address for "inet addr" on the second line)
  • Before you can do step 2.3, gdisk needs to be installed on the Debian-formatted SD card.  I installed it with:
  • Later in step 2.6, when I tried to run the command "umount /mnt/rar/dev/pts", it wouldn't unmount, as it was "busy".  Nothing except a reboot could clear this up.

I also answered my own questions above as to how booting works:

  • You've left the default uboot "verified" bootloader in place.
  • Your package linux-image-exynos5 provides a kernel which will work with that bootloader
  • To get the bootloader to boot that kernel, the "update-chromebook-vboot" had to be run, which came from your package "chromebook-kernel-vboot"

Share this post


Link to post
Share on other sites

 

Karl L.,

 

Your work is much appreciated.   :woot:   I write this posting from my new Debian Jesse install on my Samsung ARM Chromebook.

 

A few things could be filled into your procedure:

  • Before doing step 2.3, you didn't mention how to get the Chromebook connected to one's wifi network.  Here's how I did that (well, I'm pretty sure these were the minimal steps that succeeded):
    • ifconfig mlan0 down
    • ifconfig mlan0 essid MySSIDsNameHere key s:MyWifiPasswordHere
    • ifconfig mlan0 up
    • (wait about 15 seconds for the wifi authentication to work)
    • dhclient mlan0
    • (wait a few seconds for a DHCP lease to be assigned)
    • ifconfig mlan0
    • (you should now see a valid DHCP-assigned IP address for "inet addr" on the second line)

 

 FWIW I also had to use wpa_supplicant here at some point.

 

Also, to OP: I'm getting a weird issue where I can't activate swap space, like at all. When I try to swapon the one we made during the partitioning via (using gparted to swapon) I get:

 

swapon: /dev/mmcblk0p1: found swap signature: version 1, page-size 4, same byte order

swapon: /dev/mmcblk0p1: pagesize = 4096

swapsize = 2251292672, devsize = 2251293184

swapon: /dev/mmcblk0p1: swapon failed: invalid argument

 

Thinking I may have set something up wrong in the partitioning I took a flash drive and formatted it as swap space, plugged it in, and got the same error except with different numbers in line three.

 

Any advice?

Share this post


Link to post
Share on other sites

Hey Karl (or anybody else),

 

Could you please upload a image of the environment setup in the first post?

 

I've been spending so much time trying to get Mali drivers for OpenGL working in a Ubuntu/Debian environment for my ARM chromebook but everywhere is either out of date or has broken links.

 

Karl/xorangekiller is the only one who seems to have a good setup.

Share this post


Link to post
Share on other sites

Your a linux god lol

 

After reading your reply first and then the rest of the posts, I'm totally flabbergasted!

 

So much so that my eyes are all messed up like this emoticon! :s

 

I couldn't fathom all that stuff!!

 

Amazing job!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.