Closed Bug 808684 Opened 13 years ago Closed 13 years ago

PandaBoard: Out-of-the-box support for Linaro partitions

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tzimmermann, Assigned: tzimmermann)

Details

A Linaro-based partition layout is used for automated testing on the PandaBoard. Mounting these partitions during start-up needs a change to the init scripts. The necessary patch is available at [1], but ideally the differences in the partitions should be transparent. We need a mechanism to determine whether we're on a AOSP or Linaro setup, and mount the partitions accordingly. Android init scripts don't seem to support conditionals, so I implemented a mount script to translate the device paths automatically. This didn't work, because the shell is not available in the root partition. Instead, we could implement this idea as binary program. [1] https://github.com/tdz/android-device-panda/commits/bug-778248-linaro
Assignee: nobody → tzimmermann
Status: NEW → ASSIGNED
Michael, Dave, what you you think about adding a little wrapper around mount for translating the device path on Linaro. The conversion is as follows: - if the device file does exist then mount it; - if the device file does not exist, but a translation to a Linaro device file exists, then mount the Linaro file; or otherwise - forward the everything to mount and let mount decide.
A simpler alternative may be to add a parameter to the kernel commandline that the init scripts can look for. https://github.com/android/platform_system_core/blob/master/init/init.c#L579 has a list of kernel options which init imports into properties. Maybe there's one you can abuse to switch between partition configurations?
If its just going to be hard-coded mount A or mount B, then you could just try to mount them both. One will fail. One should succeed. Will init keep executing stuff if something fails? If not, then creating a wrapper which always returns success if probably easier.
(In reply to Dave Hylands [:dhylands] from comment #3) > If its just going to be hard-coded mount A or mount B, then you could just > try to mount them both. One will fail. One should succeed. > That's the best option and should work - init doesn't care whether a command succeeds or not.
(In reply to Michael Wu [:mwu] from comment #4) > (In reply to Dave Hylands [:dhylands] from comment #3) > > If its just going to be hard-coded mount A or mount B, then you could just > > try to mount them both. One will fail. One should succeed. > > > > That's the best option and should work - init doesn't care whether a command > succeeds or not. TBH this seems a bit ugly to me. I'd prefer to not have invalid or unnecessary error messages in the log files. I think I'll spend a day investigating the command-line approach. We can probably use the simple approach as a fall back.
(In reply to Thomas Zimmermann from comment #5) > (In reply to Michael Wu [:mwu] from comment #4) > > (In reply to Dave Hylands [:dhylands] from comment #3) > > > If its just going to be hard-coded mount A or mount B, then you could just > > > try to mount them both. One will fail. One should succeed. > > > > > > > That's the best option and should work - init doesn't care whether a command > > succeeds or not. > > TBH this seems a bit ugly to me. I'd prefer to not have invalid or > unnecessary error messages in the log files. > This is what Android actually does by default - The default android init.rc always tries to mount some yaffs2 partitions from an mtd device, and there's usually a device specific init file which has proper mount commands when using ext4.
From a cursory look at the init code, it appears that any option of the form androidboot.* will create a property r.boot.* (replace * with arbitrary string) https://github.com/android/platform_system_core/blob/master/init/init.c#L605
(In reply to Dave Hylands [:dhylands] from comment #7) > From a cursory look at the init code, it appears that any option of the form > androidboot.* will create a property r.boot.* (replace * with arbitrary > string) > > https://github.com/android/platform_system_core/blob/master/init/init.c#L605 Yes, I though about something link 'r.boot.environment=linaro'. If it's not set, the init script might be able to fall back to the old method.
Michael, Please have a look at the pull request https://github.com/mozilla-b2g/android-device-panda/pull/7 and merge it if appropriate. Thanks!
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.