Installing ARch Linux on BBB rev C. can't find boot/zImage

Hello,

I’m trying to install Arch on my BBB rev C. using the described method on https://archlinuxarm.org/platforms/armv7/ti/beaglebone-black but it can’t find my zImage, whilst it is present in the boot folder. It hangs while the two outer LEDS are on with the following message. I also posted this question on the ArchLinux arm forum https://archlinuxarm.org/forum/viewtopic.php?f=48&t=10563 but time is paramount for me at the moment.

Net: not set. Validating first E-fuse MAC
Phy 0 not found
cpsw
Hit any key to stop autoboot: 0
gpio: pin 53 (gpio 53) value is 1
starting USB…
USB0: Port not available.
switch to partitions #0, OK
mmc0 is current device
mmc found on device 0
Checking for: /boot/uEnv.txt …
gpio: pin 54 (gpio 54) value is 1
gpio: pin 55 (gpio 55) value is 1
reading /boot/zImage
** Unable to read file /boot/zImage **
No kernel found
gpio: pin 54 (gpio 54) value is 0
gpio: pin 55 (gpio 55) value is 0
switch to partitions #0, OK
mmc1(part 0) is current device
mmc found on device 1
Checking for: /boot/uEnv.txt …
gpio: pin 54 (gpio 54) value is 1
1184 bytes read in 22 ms (51.8 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uenvcmd is set …
gpio: pin 55 (gpio 55) value is 1
** File not found /boot/zImage **
No kernel found
gpio: pin 54 (gpio 54) value is 0
gpio: pin 55 (gpio 55) value is 0
USB is stopped. Please issue ‘usb start’ first.
USB is stopped. Please issue ‘usb start’ first.
gpio: pin 54 (gpio 54) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 56 (gpio 56) value is 1
U-Boot#

Checked the md5sum of the downloaded image and it checks out, performed sync’s between each writing operation.
I tried multiple changes to the uEnv.txt suggested at [https://archlinuxarm.org/forum/viewtopic.php?f=48&t=8242&p=44246&hilit=zImage#p44246[](https://archlinuxarm.org/forum/viewtopic.php?f=48&t=8242&p=44246&hilit=zImage#p44246[) such as:

uenvcmd=run findfdt; if test $board_name = A335BNLT; then i2c mw 0x24 1 0x3e; setenv mmcdev 1; mmc dev ${mmcdev}; if mmc rescan; then setenv mmc1 1;else setenv mmc1 0;fi;fi;setenv mmcdev 0; mmc dev ${mmcdev}; if mmc rescan; then setenv mmc0 1;else setenv mmc0 0;fi;if run loaduimage; then run loadfdt;run mmcboot;fi;
mmcroot=/dev/mmcblk0p2 rw
loadfdt=ext4load mmc ${mmcdev}:2 ${fdtaddr} /boot/dtbs/${fdtfile}
loaduimage=if ext4load mmc 0:2 ${loadaddr} /boot/zImage; then setenv mmcdev 0; else setenv mmcdev 1; if test $mmc0 = 1; then setenv mmcroot /dev/mmcblk1p2 rw; fi; ext4load mmc 1:2 ${loadaddr} /boot/zImage; fi
mmcboot=echo Booting from mmc …; run mmcargs; bootz ${loadaddr} - ${fdtaddr}

I also tried to move the boot folder to an alternative partition formated in fat and create the U-boot via:

dd if=boot/MLO of=/dev/mmcblk0 count=1 seek=1 conv=notrunc bs=128k
dd if=boot/u-boot.img of=/dev/mmcblk0 count=2 seek=1 conv=notrunc bs=384k

What am I missing?

Every suggestion is more then welcome.

Best regards

So . . . put sdcard into another Linux machine. Then . . .

sudo mount /dev/sdxx /media/rootfs

ls /media/rootfs/boot

What output do you get ?

drwxr-xr-x 2 root root 4.0K Jul 1 03:57 dtbs
-rw-r–r-- 1 root root 74K Jun 8 2015 MLO
-rw-r–r-- 1 root root 389K Jun 8 2015 u-boot.img
-rw-r–r-- 1 root root 104 Jul 13 22:03 uEnv.txt
-rwxr-xr-x 1 root root 5.2M Jul 1 03:57 zImage

Is that mount on partition 2 ?

No the arch image is on ext4 partition where the u-boot is created using:

dd if=mnt/boot/MLO of=/dev/sdX count=1 seek=1 conv=notrunc bs=128k
dd if=mnt/boot/u-boot.img of=/dev/sdX count=2 seek=1 conv=notrunc bs=384k

This is new for me as well.

Ok, actually looking at those instructions. They’re wrong for that uEnv.txt file you have.

uenvcmd=run findfdt; if test $board_name = A335BNLT; then i2c mw 0x24 1 0x3e; setenv mmcdev 1; mmc dev ${mmcdev}; if mmc rescan; then setenv mmc1 1;else setenv mmc1 0;fi;fi;setenv mmcdev 0; mmc dev ${mmcdev}; if mmc rescan; then setenv mmc0 1;else setenv mmc0 0;fi;if run loaduimage; then run loadfdt;run mmcboot;fi;
mmcroot=/dev/mmcblk0p2 rw
loadfdt=ext4load mmc ${mmcdev}:2 ${fdtaddr} /boot/dtbs/${fdtfile}
loaduimage=if ext4load mmc 0:2 ${loadaddr} /boot/zImage; then setenv mmcdev 0; else setenv mmcdev 1; if test $mmc0 = 1; then setenv mmcroot /dev/mmcblk1p2 rw; fi; ext4load mmc 1:2 ${loadaddr} /boot/zImage; fi
mmcboot=echo Booting from mmc …; run mmcargs; bootz ${loadaddr} - ${fdtaddr}

But looks at these lines I’ve highlighted. I’m seeing a lot of partition 2 noise in these, but the directions you’re following only ha a single partition layout. . . .So the if block statement I’d need to put into a proper text editor to see what’s going on( for sure ) but it looks like it only searches for an MMC 1:2 partition. Which would be disk 1, partition 2. there is no 2nd partition . . .

Here, here is a stage one uEnv.txt file fro the latest official debian image. Note the differences in disk / partition assingment. But otherwise this uses the same layout for what I can tell as those ARCH instructions imply.

william@beaglebone:~/dev$ cat /uEnv.txt
##These are needed to be compliant with Angstrom’s 2013.06.20 u-boot.

loadaddr=0x82000000
fdtaddr=0x88000000
rdaddr=0x88080000

initrd_high=0xffffffff
fdt_high=0xffffffff

##These are needed to be compliant with Debian 2014-05-14 u-boot.

loadximage=echo debug: [/boot/vmlinuz-${uname_r}] … ; load mmc 0:1 ${loadaddr} /boot/vmlinuz-${uname_r}
loadxfdt=echo debug: [/boot/dtbs/${uname_r}/${fdtfile}] … ;load mmc 0:1 ${fdtaddr} /boot/dtbs/${uname_r}/${fdtfile}
loadxrd=echo debug: [/boot/initrd.img-${uname_r}] … ; load mmc 0:1 ${rdaddr} /boot/initrd.img-${uname_r}; setenv rdsize ${filesize}
loaduEnvtxt=load mmc 0:1 ${loadaddr} /boot/uEnv.txt ; env import -t ${loadaddr} ${filesize};
check_dtb=if test -n ${dtb}; then setenv fdtfile ${dtb};fi;
loadall=run loaduEnvtxt; run check_dtb; run loadximage; run loadxrd; run loadxfdt;

mmcargs=setenv bootargs console=tty0 console=${console} ${optargs} ${cape_disable} ${cape_enable} root=/dev/mmcblk0p1 rootfstype=${mmcrootfstype} ${cmdline}

uenvcmd=run loadall; run mmcargs; echo debug: [${bootargs}] … ; echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] … ; bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr};

By the way, ${uname_r} is defined in the second stage uEnv.txt file that comes with recent debian images. But It does not look as though the people at ARCH uses this file structure. So while these paths should be similar, they’re going to be slightly different for you. But if you look at the uEnv,txt files closely, you should be able to figure out where your file is wrong, and how to correct it.

So . . .

mmcroot=/dev/mmcblk0p2 rw

should be:
mmcroot=/dev/mmcblk0p1 rw

loadfdt=ext4load mmc ${mmcdev}:2 ${fdtaddr} /boot/dtbs/${fdtfile}
should be:
loadfdt=ext4load mmc ${mmcdev}:1 ${fdtaddr} /boot/dtbs/${fdtfile}

loaduimage=if ext4load mmc 0:2 ${loadaddr} /boot/zImage; then setenv mmcdev 0; else setenv mmcdev 1; if test $mmc0 = 1; then setenv mmcroot /dev/mmcblk1p2 rw; fi; ext4load mmc 1:2 ${loadaddr} /boot/zImage; fi

should be:

should be:loaduimage=if ext4load mmc 0:1 ${loadaddr} /boot/zImage; then setenv mmcdev 0; else setenv mmcdev 1; if test $mmc0 = 1; then setenv mmcroot /dev/mmcblk1p1 rw; fi; ext4load mmc 1:1 ${loadaddr} /boot/zImage; fi

Correction:

loaduimage=if ext4load mmc 0:2 ${loadaddr} /boot/zImage; then setenv mmcdev 0; else setenv mmcdev 1; if test $mmc0 = 1; then setenv mmcroot /dev/mmcblk1p2 rw; fi; ext4load mmc 1:2 ${loadaddr} /boot/zImage; fi

should be:

loaduimage=if ext4load mmc 0:1 ${loadaddr} /boot/zImage; then setenv mmcdev 0; else setenv mmcdev 1; if test $mmc0 = 1; then setenv mmcroot /dev/mmcblk1p1 rw; fi; ext4load mmc 1:1 ${loadaddr} /boot/zImage; fi

Damn… You have been busy whilst I was away.

The uEnv mentioned in my previous post was one when I tried to mount the boot as a fat 16 image, so in that setup there where two partitions. The uEnv that I have currently and that is the default Arch Linux Uenv only has one line:

`

optargs=coherent_pool=1M

`

Thank you. I will try your suggestions.

Hi William,

I got it working. It seemed that I forgot that my e2fsprogs version was greater then 1.43.

As mentioned in the guide (do’h bangs head against table)
Create the ext4 filesystem:

  1. For e2fsprogs < 1.43:

    mkfs.ext4 /dev/sdX1
    
  2. For e2fsprogs >= 1.43:

    mkfs.ext4 -O ^metadata_csum,^64bit /dev/sdX1
    

by executing:

mkfs.ext4 -O ^metadata_csum,^64bit /dev/sdX1

I now got Arch linux up and running.
I wanted to thank you for your quick response.

best regards,
Jelle