Boot second partition on Ariane
#1
Hello,
 
I try to run my own application (Hello.elf) inside a Linux system running on Ariane. The instantiation of Ariane and Linux was done according the description at the github page: https://github.com/pulp-platform/ariane.
 
According to this page https://github.com/pulp-platform/ariane-sdk/issues/25 the second partition on the SD card should be mounted at boot time, therefore, I just copied the binary into that partition. Unfortunately, I can't find the second partition.
 
During my search for a solution I found that Ariane repairs the GPT table of the SD card in such a way that fdisk detects the primary GPT table as corrupted, if the SD card is again inserted into my normal computer.
 
Below I post the output of fdisk before and after booting Linux on Ariane, as well as the part of the boot process, where the GPT is repaired.


Befor running Ariane (output at normal computer after running $ sudo sgdisk --clear --new=1:2048:67583 --new=2 --typecode=1:3000 --typecode=2:8300 /dev/sdb):
$ sudo fdisk -l /dev/sdb
Disk /dev/sdb: 29,7 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B40F3443-EC5F-4185-8F91-C8E263A0DABA

Device     Start      End  Sectors  Size Type
/dev/sdb1   2048    67583    65536   32M ONIE boot
/dev/sdb2  67584 62333918 62266335 29,7G Linux filesystem

During the linux start on Ariane:
[   30.766351] GPT: Primary header thinks Alt. header is not at the end of the disk.
[   30.766351] GPT: Primary header thinks Alt. header is not at the end of the disk.
[   30.784484] GPT:62333951 != 62412799
[   30.784484] GPT:62333951 != 62412799
[   30.801305] GPT:Alternate GPT header not at the end of the disk.
[   30.801305] GPT:Alternate GPT header not at the end of the disk.
[   30.818495] GPT:62333951 != 62412799
[   30.818495] GPT:62333951 != 62412799
[   30.834014] GPT: Use GNU Parted to correct GPT errors.
[   30.834014] GPT: Use GNU Parted to correct GPT errors.
[   30.851527]  mmcblk0: p1 p2
[   30.851527]  mmcblk0: p1 p2

After running Ariane (output at normal computer)
$ sudo fdisk -l /dev/sdb
The primary GPT table is corrupt, but the backup appears OK, so that will be used.
Disk /dev/sdb: 29,7 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B40F3443-EC5F-4185-8F91-C8E263A0DABA

Device     Start      End  Sectors  Size Type
/dev/sdb1   2048    67583    65536   32M ONIE boot
/dev/sdb2  67584 62333918 62266335 29,7G Linux filesystem

Any idea why the second partition is not recognised? Or more precisely, why the GPT table gets corrupted?


Thanks,
Jakob
Reply
#2
I know this is not much of a reply, but I think the issue is more on the Linux support side, and not the Ariane HW. I am not sure someone from our group (ETH) will be able to help here, as we do not have people working on these topics.
Visit pulp-platform.org and follow us on twitter @pulp_platform
Reply
#3
Ok, thank you nevertheless!
Reply


Forum Jump: