Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Toshiba AC100 (PAZ00) ARMv7a HF boot problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 103

PostPosted: Mon Jul 25, 2016 7:05 pm    Post subject: Toshiba AC100 (PAZ00) ARMv7a HF boot problem Reply with quote

Hi all
Trying to install gentoo on my AC100 (PAZ00) ARM Tegra2:

emerge -avt crossdev u-boot-tools
crossdev -S armv7a-hardfloat-linux-gnueabi
make tegra_default ARCH=arm && make menuconfig ARCH=arm
(ext4,3,2 are builtin, devices mostly in modules)
make zImage modules dtbs INSTALL_MOD_STRIP=1 ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-
make modules_install INSTALL_MOD_PATH=../output_files INSTALL_MOD_STRIP=1 ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi-

boot.cmd to boot from for sdcard (2 partitions: 1-rootfs 2-swap):
setenv bootargs 'root=/dev/mmcblk1p1 rootfstype=ext4 rootwait noinitrd init=/sbin/init'
ext2load mmc 1:1 0x1000000 /boot/zImage
ext2load mmc 1:1 0x2000000 /boot/tegra20-paz00.dtb
bootz 0x1000000 - 0x2000000

mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "boot_mmc1p1_ext4" -d boot.cmd boot.scr

downloaded and extracted stage3 for armv7a_fardfloat to partition1 ext4 of sdcard (GPT),
copied tegra20-paz00.dtb, zImage & boot.scr to /boot
adjusted fstab (2 partitions 1 - rootfs, 2 -swap)
compiled modules copied to /usr/lib/modules on sdcard

(Internal mmc on device contains 1 partition now, thiking about convert it to f2fs later,but this doesnt matter now)

My PAZ00 alerady got uboot installed. When i tried to boot from mmcblk1p1 (sdcard), kernel loads fine (also all device modules loads fine) , until it mounts rootfs, and then things go bad:
VFS: Mounted root (ext4 filesystem) on device 179:17
devtmpfs: error mounting (-2)
Requested init /sbin/init failed (error -2)
and then dumps from CPU1 PID1 и CPU0 PID 0

Aready checked sdcard in sos-boot mode (downloaded sos-boot to PAZ00 via nvflash): sdcard mounts fine, parted detects all the partitions. fs is recognized correctly and file io and fs structucture is ok, all files (and /dev && /sbin/init) is in the place...
Any ideas what it can be? It seems like rootfs problem to me. (remember - ext2,3,4 is builtin)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Mon Jul 25, 2016 7:39 pm    Post subject: Reply with quote

n05ph3r42,

Code:
VFS: Mounted root (ext4 filesystem) on device 179:17
devtmpfs: error mounting (-2)


That means that it mounted root but /dev is empty as devtmpfs failed to mount.
That's a very bad thing. No /dev/null and /dev/console so almost nothing works.

Pastebin your kernel .config file.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 103

PostPosted: Mon Jul 25, 2016 7:56 pm    Post subject: Reply with quote

Here it is : http://pastebin.com/PeS9vmny
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Mon Jul 25, 2016 8:29 pm    Post subject: Reply with quote

n05ph3r42,

That looks good, for getting /dev mounted anyway.

What do you have in /dev when devtmpfs is not mounted there?
I suspect its empty.
As a minimum you need
Code:
crw-rw-rw- 1 root root    1,   3 May 12  2013 /dev/null
crw------- 1 root root  5,   1 Jul 25 18:51 /dev/console

Use mknod to create those nodes. The permissions need to be correct too.

That should get you further but its not a fix.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 103

PostPosted: Mon Jul 25, 2016 8:43 pm    Post subject: Reply with quote

NeddySeagoon wrote:
n05ph3r42,

That looks good, for getting /dev mounted anyway.

What do you have in /dev when devtmpfs is not mounted there?
I suspect its empty.
As a minimum you need
Code:
crw-rw-rw- 1 root root    1,   3 May 12  2013 /dev/null
crw------- 1 root root  5,   1 Jul 25 18:51 /dev/console

Use mknod to create those nodes. The permissions need to be correct too.

That should get you further but its not a fix.


Actually, like i said earlier, all the files is in the place (/dev/* and /sbin/* and all the rest), as they should be. they still here, since i extracted them from stage3, like all the rest of /.
console:

[img]http://imgur.com/EjD1hall.png[/img]

null:

[img]http://imgur.com/8yB8fgll.png[/img]



I checked that more than two times, when mounted that sdcard in sos-boot at PAZ00, and when mounted sdcard on other devices i have (2 nb).
As you can see, there is not only /dev problem, there is also init process problem (sbin/init), but i guess it can be inherited from lost /dev or kernel cannot read fs at all.
It feels like rootfs is empty, but how it boots kenel and modules then from sdcard??! Well, may be uboot reads zImage & dtb on its own, w/o kernel help, but modules... Seems like kernel cant read fs or file table or something like that.

P.S. i used --xattr when extracted stage3
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Mon Jul 25, 2016 9:12 pm    Post subject: Reply with quote

n05ph3r42,

Code:
compiled modules copied to /usr/lib/modules on sdcard

Is that a typo?
Modules go to /lib/modules/'uname -r'
You normally copy 'uname -r over.

Stage3 provided static /dev has changed a lot over the years.
Sometimes it empty, somtimes it a full traditional static /dev, other times its just the minimal two entries.

The permissions on /dev/null are not correct. It needs to be world writable, that's 666, not the 644 you have.
If devtmpfs was mounting on /dev, it wouldn't matter.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 103

PostPosted: Mon Jul 25, 2016 9:24 pm    Post subject: Reply with quote

NeddySeagoon wrote:
n05ph3r42,

Code:
compiled modules copied to /usr/lib/modules on sdcard

Is that a typo?
Modules go to /lib/modules/'uname -r'
You normally copy 'uname -r over.

Stage3 provided static /dev has changed a lot over the years.
Sometimes it empty, somtimes it a full traditional static /dev, other times its just the minimal two entries.

The permissions on /dev/null are not correct. It needs to be world writable, that's 666, not the 644 you have.
If devtmpfs was mounting on /dev, it wouldn't matter.


Sure, modules are in right dir:

[img]http://imgur.com/nuibcHOl.png[/img]


As for rights, have no idea why they are changed, in "clean" stage they are ok:


[img]http://imgur.com/NxYTWgAl.png[/img]


Will fix rights and try again.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Mon Jul 25, 2016 9:37 pm    Post subject: Reply with quote

n05ph3r42,

My modules have always been in /lib/modules on the root filesystem.

Code:
$ ls /lib/modules/
3.10.9-gentoo/    3.14.4-gentoo/    3.9.0-gentoo/     4.3.3-gentoo/
3.13.0-gentoo-r1/ 3.16.1-gentoo/    4.0.3-gentoo/     4.4.5-gentoo/
3.13.3-gentoo/    3.18.0-gentoo/    4.1.3-gentoo/     4.6.0-gentoo/
3.13.6-gentoo/    3.19.3-gentoo/    4.2.0-gentoo-r1/


Yours appear to be in /usr/lib/modules. How does that work?
Do you have a symbolic link from /lib/modules/ to /usr/lib/modules?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 103

PostPosted: Mon Jul 25, 2016 9:51 pm    Post subject: Reply with quote

NeddySeagoon wrote:
n05ph3r42,

My modules have always been in /lib/modules on the root filesystem.

Code:
$ ls /lib/modules/
3.10.9-gentoo/    3.14.4-gentoo/    3.9.0-gentoo/     4.3.3-gentoo/
3.13.0-gentoo-r1/ 3.16.1-gentoo/    4.0.3-gentoo/     4.4.5-gentoo/
3.13.3-gentoo/    3.18.0-gentoo/    4.1.3-gentoo/     4.6.0-gentoo/
3.13.6-gentoo/    3.19.3-gentoo/    4.2.0-gentoo-r1/


Yours appear to be in /usr/lib/modules. How does that work?
Do you have a symbolic link from /lib/modules/ to /usr/lib/modules?


Yup, mixed things up a bit with modules.
Fixed rights.
Still the same:
http://imgur.com/a/CebqG
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Mon Jul 25, 2016 10:17 pm    Post subject: Reply with quote

n05ph3r42,

Your kernel has
CONFIG_MMC_BLOCK_MINORS=16.
From your Image, the kernel has found an Ext4 fs at 179,17.
From /usr/src/linux/Documentation/devices.txt, thats /dev/mmcblk1p1

So far so good. You have at least two mmcblk devices.
Now, if the kernel enumeration order was incorrect but /dev/mmcblk?p1 were all ext4, the kernel would mount the incorrect filesystem as root and both /dev and /sbin/init would be missing.
That would account for the errors.

u-boot sees what you expect but your kernel may not.

Change your root=/dev/mmcblk1p1 to root=PARTUUID=... where you get the PARTUUID from blkid.
Code:
/dev/sde1: UUID="c400b18c-0210-4338-a0fd-f437ecbaaf99" TYPE="ext4" PARTLABEL="ext4" PARTUUID="150e6ef1-7ba8-409c-9c3f-dbdecdc9f18b"

Notice that the filesystem UUID is not the same as the PARTUUID.
The kernel can use PARTUUID to mount root without any help. The filesystem UUID or LABEL needs an initrd.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 103

PostPosted: Mon Jul 25, 2016 10:25 pm    Post subject: Reply with quote

NeddySeagoon wrote:
n05ph3r42,

Your kernel has
CONFIG_MMC_BLOCK_MINORS=16.
From your Image, the kernel has found an Ext4 fs at 179,17.
From /usr/src/linux/Documentation/devices.txt, thats /dev/mmcblk1p1

So far so good. You have at least two mmcblk devices.
Now, if the kernel enumeration order was incorrect but /dev/mmcblk?p1 were all ext4, the kernel would mount the incorrect filesystem as root and both /dev and /sbin/init would be missing.
That would account for the errors.

u-boot sees what you expect but your kernel may not.

Change your root=/dev/mmcblk1p1 to root=PARTUUID=... where you get the PARTUUID from blkid.
Code:
/dev/sde1: UUID="c400b18c-0210-4338-a0fd-f437ecbaaf99" TYPE="ext4" PARTLABEL="ext4" PARTUUID="150e6ef1-7ba8-409c-9c3f-dbdecdc9f18b"

Notice that the filesystem UUID is not the same as the PARTUUID.
The kernel can use PARTUUID to mount root without any help. The filesystem UUID or LABEL needs an initrd.


TY a lot, it can be as you described. Enumeration of blk devices is "strange", i noticed that earlier, when tried to use internal mmc.
Will try Your fix tomorrow.
cya.
Back to top
View user's profile Send private message
n05ph3r42
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jul 2016
Posts: 103

PostPosted: Tue Jul 26, 2016 10:45 am    Post subject: Reply with quote

Woohoo!
You was right! Ive just copied rootfs from sdcard to internal mmc for test, and everything is works now.
TY again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum