20:01:03 #startmeeting 20:01:04 Meeting started Fri Feb 22 20:01:03 2013 UTC. The chair is j_dulaney. Information about MeetBot at http://wiki.debian.org/MeetBot. 20:01:04 Useful Commands: #action #agreed #halp #info #idea #link #topic. 20:01:21 #meetingname Fedora on the ARM based Samsung Chromebook 20:01:21 The meeting name has been set to 'fedora_on_the_arm_based_samsung_chromebook' 20:01:48 #topic Give it five minutes for folks to trickle in 20:03:14 #topic What you need 20:03:50 Ok, besides the obvious Chromebook, you will need an 8GB SD card that you don't mind having the data on wiped 20:05:50 You'll also need to go ahead and grab the armv7 image here: http://scotland.proximity.on.ca/arm-nightlies/vault/f18/Images/armhfp/Fedora-18-armhfp-rootfs.tar.xz 20:06:30 #info Image at: http://scotland.proximity.on.ca/arm-nightlies/vault/f18/Images/armhfp/Fedora-18-armhfp-rootfs.tar.xz 20:06:45 #info: An 8GB SD card is needed 20:07:13 #topic Phase one: Fedora on the SD card 20:08:15 Insert the SD card into the card reader on another machine and find it in your /dev 20:08:30 It will probably be /dev/mmcblk0 or similar 20:09:26 sudo gdisk /dev/$SDCARD 20:09:42 (replace $SDCARD with the actual device file) 20:10:06 Delete any partitions on the card with d 20:10:22 Once there are none left, type the following: 20:10:23 x 20:10:27 l 20:10:33 8192 20:10:34 m 20:10:40 n 20:10:43 1 20:10:46 Enter 20:10:52 +16M 20:10:59 7f00 20:11:03 n 20:11:06 2 20:11:09 Enter 20:11:15 +16M 20:11:18 7f00 20:11:24 n 20:11:25 3 20:11:33 Enter three times 20:11:38 Then exit gpdisk 20:11:49 You will then have a properly formated SD 20:11:50 card 20:12:11 On the Chromebook, enter developer mode 20:12:55 Hold down Esc and Refresh keys and press the power button 20:13:43 The Refresh key is the circular looking key where F3 normally is 20:14:05 The system will then reboot 20:14:34 When it comes back up, it will say something along the lines of to turn off OS verification, press enter 20:14:36 Do so 20:15:08 At this point, you can easily access your TTYs 20:15:26 the various keys across the top map to the function keys 20:15:46 For instance, <- maps to F1, -> to F2, etc 20:16:08 Hit the -> key and log in as root 20:16:13 There is no password 20:16:43 Back to the box you are using to work on the SD card 20:17:30 sudo mkfs.ext4 -L rootfssd /dev/$SDCARD 20:17:52 Actually 20:18:04 sudo mkfs.ext4 -L rootfs /dev/$SDCARDp3 20:18:31 That will give you an ext4 fs on the third partition 20:19:10 Extract the tarball that you downloaded earlier to that partition 20:19:27 Unmount the SD card and insert it into the Chromebook 20:19:54 You might want to fix up /etc/fstab on the image you just extracted. 20:20:09 dajt: Haven't got there yet 20:20:27 Although, yes, that can be done now 20:20:45 edit the /etc/fstab file on the SD card such that 20:21:57 Such that it reads /dev/mmcblk1p3 / ext4 defaults 1 1 20:22:13 Back to the Chromebook 20:22:32 mkdir /media/sd 20:22:45 mount /dev/mmcblk1p3 /media/sd 20:23:05 mkdir /media/sd/modules 20:23:16 mkdir /media/sd/firmware 20:23:25 mkdir /media/sd/ucm 20:24:00 cp -rf /lib/modules/* /media/sd/modules 20:24:17 cp -rf /lib/firmware/* /media/sd/firmware 20:24:32 cp -rf /usr/share/alsa/ucm/* /media/sd/ucm 20:24:45 The last will prevent you from burning your speakers 20:25:07 Now, it is time to copy over the ChromeOS kernel 20:25:41 We're going to create two kernels, one with the config to boot from the SD card, the other to boot from the internal SSD 20:26:05 If all you're going to do is put Fedora on an SD card and never install to the internal SSD, then the second kernel can be skipped 20:26:34 cd /media/sd 20:26:40 mkdir kerns 20:27:26 echo "console=tty1 debug verbose root=/dev/mmcblk1p3 rootwait rw" > /kerns/sdconfig 20:27:35 For the ssd: 20:27:44 echo "console=tty1 debug verbose root=/dev/mmcblk0p3 rootwait rw" > /kerns/ssdconfig 20:28:01 Notice the difference is in the mmcblk 20:29:31 vbutil_kernel --pack /kerns/sdkern --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config=./kerns/sdconfig --vmlinuz /boot/vmlinuz-3.4.0 --arch arm 20:29:53 That will give you the kernel for the SD card 20:30:00 For internal SSD: 20:30:22 vbutil_kernel --pack ./kerns/ssdkern --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config=./kerns/ssdconfig --vmlinuz /boot/vmlinuz-3.4.0 --arch arm 20:30:54 Now, copy the sd kernel over to the sd card's first partition: 20:31:23 dd if=./kerns/sdkern of=/dev/mmcblk1p1 20:32:04 dd if=./kerns/sdkern of=/dev/mmcblk1p1 20:32:06 dd if=./kerns/sdkern of=/dev/mmcblk1p2 20:32:30 Make the partitions bootable: 20:32:48 cgpt add -i 1 -S 1 -T 5 -P 10 -l KERN-A /dev/mmcblk1 20:33:12 cgpt add -i 2 -S 1 -T 5 -P 5 -l KERN-B /dev/mmcblk1 20:33:32 Do you mean --config=./kerns/sdconfig or --config ./kerns/sdconfig? 20:33:57 dajt: Good catch 20:34:00 * j_dulaney missed the . 20:34:05 Apologies 20:35:04 Now, copy the firmware and modules into the appropriate place on the sd card 20:35:40 cp -rf ./modules/* ./lib/modules/ 20:35:55 cp -rf ./firmware/* ./lib/firmware/ 20:36:38 Congrats, you now have a useable SD card 20:36:52 crossystem dev_boot_usb=1 20:37:04 That tells the Chromebook to boot from external drives 20:37:08 reboot 20:37:31 When it comes up to the white boot screen, hit ctl-u to boot from the sd card 20:37:54 You should have a working Fedora boot up; run through Firstboot 20:38:50 If this is as far as you want to go with the project, yum update 20:39:07 Keep in mind that the update will take a very long time on the SD card 20:39:08 Do you need to move the ucm files too, or do they stay in /ucm ? 20:39:35 dajt: If this is as far as you're going, they'll need to be moved 20:40:04 sudo cp -rf /ucm/* /usr/share/alsa/ucm/ 20:41:01 Now, if you are going to continue with installing Fedora on the internal SSD, first you'll need to build vboot-utils 20:43:17 yum install gcc fedora-packager 20:43:41 wget -c http://people.redhat.com/wcohen/chromebook/vboot-utils-20130129git68f54d4-4.fc17.src.rpm 20:45:24 As something other than root: 20:45:26 fedora-packager-setup 20:46:02 copy the srpm downloaded above into the ~/rpmbuild/SRPM directory 20:46:55 cd ~/rpmbuild/SRPM 20:47:03 sudo yumbuild-deps ./vboot-utils-*.rpm 20:47:19 rpm -Uvh ./vboot-utils-*.rpm 20:47:30 cd ~/rpmbuild/SPECS/ 20:47:41 rpmbuild -ba vboot-utils.spec 20:47:55 sudo yum install ~/rpmbuild/RPMS/*/vboot-utils.*.rpm 20:48:26 * ctyler wonders if that's being packaged for Fedora? 20:48:39 ctyler: It's in the review process 20:48:45 cool 20:49:19 Now, it is time to partition the internal SSD 20:49:43 Is there a way to make a backup of the ssd so we can put ChromeOS back if we need to? 20:50:16 dajt: No need, you can download a recovery image from Google 20:50:31 sudo gdisk /dev/mmcblk0 20:50:50 Once again, delete all partitions; there's a crapton of them 20:50:56 d will do this 20:52:01 And then 20:52:03 x 20:52:06 l 20:52:10 8192 20:52:11 m 20:52:14 n 20:52:16 1 20:52:19 +16M 20:52:22 Enter 20:52:40 Swap the +16M and Enter 20:52:45 so, it should be: 20:52:47 n 20:52:47 1 20:52:50 Enter 20:52:53 +16M 20:53:00 7f00 20:53:03 n 20:53:05 2 20:53:07 Enter 20:53:10 +16M 20:53:13 7f00 20:53:18 n 20:53:19 3 20:53:25 Enter three times 20:53:36 exit gdisk 20:54:10 mkfs.ext4 -l Fedora /dev/mmcblk0p3 20:55:16 You'll once again need to grab the rootfs tarball; easiest way is to poweroff the Chromebook at this point and copy over to the SD card from the computer you used to download it 20:55:52 Reinsert the SD card into the Chromebook and boot it up using the same procedure as before (ctl-u at the white boot screen) 20:56:15 back in the terminal, 20:57:04 mkdir /run/media/sd 20:57:20 mount /dev/mmcblk0p3 /run/media/sd 20:57:36 extract the rootfs tarball to /run/media/sd 20:57:48 copy over firmware, modules, and ucm profiles 20:58:20 cp -rf /modules/* /run/media/sd/lib/modules/ 20:58:36 cp -rf /firmware/* /run/media/sd/lib/firmware/ 20:59:02 cp -rf /ucm/* /run/media/sd/usr/share/alsa/ucm/ 20:59:14 copy over the kernel 20:59:40 dd if=/kerns/ssdkern of=/dev/mmcblk0p1 20:59:43 dd if=/kerns/ssdkern of=/dev/mmcblk0p2 21:00:22 cgpt add -i 1 -S 1 -T 5 -P 10 -l /dev/mmcblk0p1 21:00:50 cgpt add -i 2 -S 1 -T 5 -P 5 -l /dev/mmcblk0 21:00:59 remove the trailing p1 on the first 21:01:05 My mistake 21:01:20 And, that's it 21:01:31 type poweroff to shutdown from the SD card 21:02:05 turn the chromebook back on; you can get it to boot right away by hitting ctl-d, or you can wait 30 seconds and it will boot on its own 21:02:21 Run through firstboot, and yum update your system 21:02:30 the internal SSD is much faster 21:02:51 You can mount the SD card and copy over the vboot-utils rpm and install that 21:03:07 Any questions? 21:03:59 j_dulaney, very cool, thanks very much for doing the talk today. 21:04:22 pwhalen: Indeed 21:04:36 Yes, thank you. 21:04:53 Are you going to do another talk on building your own kernels for the Chromebook? 21:05:08 dajt: I was going to, but I ran out of time 21:06:02 perhaps a followup in the future? 21:06:06 j_dulaney, yes i have, do you plan use non-verified u-boot instead of kernel? 21:06:09 dajt: At this point, actually building the kernel is done in the typical fashion; the only problem is that the Chromebook stuff isn't in the main line yet 21:06:39 It's installing it that requires extra steps 21:07:46 e-ndy: I have been informed that there is a way to get u-boot to work, I have not yet done so 21:08:24 The current source for the Chromebook kernel is at https://git.chromium.org/git/chromiumos/third_party/kernel.git 21:08:34 j_dulaney, i have it working on sd card but not yet found time to place all on internal emmc 21:09:00 e-ndy: It really isn't that diffult to get working on the internal storage 21:09:36 I like being able to dual-boot into ChromeOS and play Gardens of Time. :-) 21:10:03 We need Google Chrome for Linux on Arm. 21:10:56 dajt: Dual booting is possible by resizing the largest partition on the internal SSD and replacing the spare ChromeOS kernel with one that points to the Fedora partition 21:11:15 It's some more involved than just wiping ChromeOS totally 21:11:50 j_dulaney, why alignment is 8192 instead of default? 21:12:23 e-endy: That's where the boot loader looks for it 21:12:37 I tried default alignment and it didn't boot 21:13:39 Any other questions? 21:13:44 * j_dulaney sets the time for one minute 21:14:34 Okay 21:14:37 #endmeeting