ALARM on Samsung ARM Chromebook

Install Arch Linux ARM on other devices.

Re: ALARM on Samsung ARM Chromebook

Postby dutra » Sun Mar 10, 2013 8:14 pm

stronnag wrote:Copy the cgpt binary from the chromeos partition to /usr/bin/ in arch. It's a static executable, there are no external dependencies, so it "just works".


Awesome, thank you for the help! And correction: After following the steps, generating chromeos kernel and using it together with archlinuxarm chrome rootfs, mlan0 is not recognized.

Is there a way I can run this command and generate the kernel from archlinux arm chrome instead of chromeos? (Or how else could I fix mlan0?)
All I need is to be able to generate an archlinux kernel image by saying /dev/mmcblk0p3 instead of /dev/mmcblk1p3

Code: Select all
echo "console=tty1 debug verbose root=/dev/mmcblk1p3 rootwait rw" > /tmp/config
vbutil_kernel --pack /tmp/newkern --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config=/tmp/config --vmlinuz /boot/vmlinuz-3.4.0 --arch arm


Edit: I was able to fix it. First I generated the kernel with the above command, but using the vmlinuz obtained from /boot in the package linux-chromebook. Wifi still wasn't recognized, so I manually downloaded and upgraded linux-chromebook and linux-headers-chromebook with pacman -U. After reboot, my mlan0 was up again. I now have a working system with i3. In order to get the battery info working in the i3statusbar, I had to add
Code: Select all
 path = "/sys/class/power_supply/sbs-4-000b/uevent"
to .i3status.conf

I still haven't managed to set up alsa. I copied the files and told it to use the DAISY-I2S profile. I am sure I just have to bring up the volume in some channels in alsamixer, but I am afraid of doing so. Can anyone share what channels are up and what volume?
dutra
 
Posts: 15
Joined: Sat Dec 03, 2011 3:01 am

Re: ALARM on Samsung ARM Chromebook

Postby tedm » Mon Mar 11, 2013 1:23 am

Can anyone clarify the differences between the image in here under devices/install for the Samsung Chromebook, and the one with imx6 in the filename used in installs referenced here: https://gist.github.com/macton/4632677 and elsewhere? Thanks.
tedm
 
Posts: 88
Joined: Tue Jan 01, 2013 1:12 am

Re: ALARM on Samsung ARM Chromebook

Postby Gary13579 » Mon Mar 11, 2013 4:18 pm

Can someone please post step by step instructions for getting nv-u-boot working on the SD card? I cannot get it working after spending hours messing with it.
Gary13579
 
Posts: 30
Joined: Tue Feb 28, 2012 9:21 am

Re: ALARM on Samsung ARM Chromebook

Postby tedm » Mon Mar 11, 2013 8:27 pm

Quick update, the image here under devices/chromebook/install here is just a tad big for a sandisk 8GB SD card. It gunzips to: 8068792320 bytes, a few more than my 79... Sandisk 8GB holds. Hope this helps someone.

[update] dd works, zcat fails (with my card)

dd if=ArchLinuxARM-chromebook-latest.img of=/dev/mmcblkx bs=1M

replace mmcblkx above with your specific device you're writing to - in my dedicated linux notebook it is 0, but in the chromebook, that is internal emmc, so take great care there.


tedm wrote:Can anyone clarify the differences between the image in here under devices/install for the Samsung Chromebook, and the one with imx6 in the filename used in installs referenced here: https://gist.github.com/macton/4632677 and elsewhere? Thanks.
tedm
 
Posts: 88
Joined: Tue Jan 01, 2013 1:12 am

Re: ALARM on Samsung ARM Chromebook

Postby strata » Mon Mar 11, 2013 11:19 pm

Gary13579 wrote:Can someone please post step by step instructions for getting nv-u-boot working on the SD card? I cannot get it working after spending hours messing with it.


It's still in the works. A few of us have been running eMMC installs with nv-U-boot but I don't know when.

Here is a rough method:

1. Remove the bottom cover (remember there are screws underneath the rubber feet)
2. If there is a metallic ring-shaped sticker around the screw hole closest to the USB3 port, remove it.
3. Boot Arch from the SD card using the already established method.
4. install the flashroom-google package.
5. download this file: https://www.dropbox.com/s/6pzvraf3ko14s ... now.bin.gz
6. gunzip nv_image-snow.bin.gz
7. flashrom -p linux_spi:dev=/dev/spidev1.0 -r original_image-snow.bin
8. flashrom -p linux_spi:dev=/dev/spidev1.0 -w nv_image-snow.bin.gz
9. Powercycle. Hold down 'a' while powering up to get into a u-boot prompt.

Once you are flashed with u-boot, you will need to create a SD card that boots.
I used cgdisk (from gptfdisk package) and created a 16MB ext2 followed by a jfs root.
then mkfs.ext2 and mkfs.jfs them. Put vmlinux.uimg from linux-chromebook on the ext2 partition and untar your rootfs to the jfs.
Make sure you copy the modules and firmware from linux-chromebook in the proper place on the rootfs.

to boot it from u-boot, I used these commands:
setenv bootargs root=/dev/mmcblk1p2 rootfstype=jfs rootwait rw
mmc dev 1
ext2load mmc 1:1 42000000 vmlinux.uimg
bootm 42000000

Once booted from SD, I did essentially the same steps to create a new GPT and file systems on the eMMC. Then copied rootfs and kernel to the proper locations.

Here is what I did in u-boot to make it boot directly into arch every time:
setenv arch_boot 'setenv bootargs root=/dev/mmcblk0p2 rootfstype=jfs rootwait ro; mmc dev 0; ext2load mmc 0:1 42000000 vmlinux.uimg; bootm 42000000'
setenv bootcmd 'run arch_boot'
saveenv


There is surely a much cleaner way to go about all of this, which is why I am letting someone else do the fine polishing :)
strata
 
Posts: 6
Joined: Wed Jan 23, 2013 8:21 pm

Re: ALARM on Samsung ARM Chromebook

Postby Gary13579 » Mon Mar 11, 2013 11:31 pm

I thought it was possible to do so without opening the Chromebook, as outlined in the "chained u-boot" section here: http://www.chromium.org/chromium-os/how ... ot-method-

I'd really prefer not to disable write protection, or overwrite the stock BIOS. But also not sure how to get it working otherwise, as the process is pretty vague in that page.
Gary13579
 
Posts: 30
Joined: Tue Feb 28, 2012 9:21 am

Re: ALARM on Samsung ARM Chromebook

Postby strata » Mon Mar 11, 2013 11:40 pm

Gary13579 wrote:I thought it was possible to do so without opening the Chromebook, as outlined in the "chained u-boot" section here: http://www.chromium.org/chromium-os/how ... ot-method-

I'd really prefer not to disable write protection, or overwrite the stock BIOS. But also not sure how to get it working otherwise, as the process is pretty vague in that page.


The chained method is the safest way. But it would make doing an eMMC installation a little bit tricky. Easiest way would be to replace one of the ROOT-X's with an ext2 that contains the kernel, then overwrite the ~12GB private data with an Arch root. That worked for me.

And I agree that flashing over the stock bios is dangerous. However, a bad flash is very inexpensive to fix.
strata
 
Posts: 6
Joined: Wed Jan 23, 2013 8:21 pm

Re: ALARM on Samsung ARM Chromebook

Postby Gary13579 » Mon Mar 11, 2013 11:53 pm

strata wrote:
Gary13579 wrote:I thought it was possible to do so without opening the Chromebook, as outlined in the "chained u-boot" section here: http://www.chromium.org/chromium-os/how ... ot-method-

I'd really prefer not to disable write protection, or overwrite the stock BIOS. But also not sure how to get it working otherwise, as the process is pretty vague in that page.


The chained method is the safest way. But it would make doing an eMMC installation a little bit tricky. Easiest way would be to replace one of the ROOT-X's with an ext2 that contains the kernel, then overwrite the ~12GB private data with an Arch root. That worked for me.

And I agree that flashing over the stock bios is dangerous. However, a bad flash is very inexpensive to fix.


I appreciate the help, but I'm looking to install Arch on the SD card, though :P. I like Chrome OS and want to run it most of the time, but I'd love to have Arch installed on an SD card for times when I need more (and SSH into my remote server doesn't cut it). I assumed I'd just need to dd nv_uboot-snow.kpart to the SD card as explained in that link, but I don't know what the kpart is, what it contains, where it needs to go, etc, and it obviously didn't work when I tried it. I ultimately don't want to touch the eMMC at all, get nv-u-boot on the SD card, so when the SD card is in and I hit Ctrl+U at boot, it hands off to nv-u-boot, which I assume can then load the dev signed ALARM kernel. But I'm still iffy on how the boot process works/how do actually do this.
Gary13579
 
Posts: 30
Joined: Tue Feb 28, 2012 9:21 am

Re: ALARM on Samsung ARM Chromebook

Postby dutra » Tue Mar 12, 2013 5:39 am

If all you want is just to get it working on the sd card, then you can do what I did:
Follow the instructions on your sd card from http://blogs.arm.com/software-enablemen ... hromebook/

You can use the archlinux-rootfs that I packed a few days ago: alarm-rootfs.tar.gz

However, when executing
Code: Select all
echo "console=tty1 debug verbose root=/dev/mmcblk1p3 rootwait rw" > /tmp/config

vbutil_kernel --pack /tmp/newkern --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config=/tmp/config --vmlinuz /boot/vmlinuz-3.4.0 --arch arm

substitute /boot/vmlinuz-3.4.0 with the vmlinuz found in /boot inside the package linux-chromebook. Then keep following the tutorial.

Or, you could also use the kernel that I compiled a few days ago and just dd it into KERN-A and KERN-B of your sd card: alarm_kernel

EDIT: Once you boot into your new system, your wifi may not work. Follow the instructions that I described a few replies ago in this topic.
dutra
 
Posts: 15
Joined: Sat Dec 03, 2011 3:01 am

Re: ALARM on Samsung ARM Chromebook

Postby Gary13579 » Tue Mar 12, 2013 9:45 am

Thanks, that worked. I figured it needed something more.. why can't linux-chromebook package do this when you install it?

Video performance is still awful on both armsoc and fbdev. Can't play a low resolution xvid/avi in mplayer or VLC, in either armsoc or fbdev. Tried adding that rules file, doesn't seem to make a difference. Any ideas..?
Gary13579
 
Posts: 30
Joined: Tue Feb 28, 2012 9:21 am

PreviousNext

Return to [Please read announcement] Community-Supported Devices

Who is online

Users browsing this forum: No registered users and 2 guests