हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main के बजाय android-latest-release का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इस पेज पर, Cuttlefish डिवाइस पर Android बूटलोडर की सुविधाओं को बनाने, चलाने, और डेवलप करने का तरीका बताया गया है.
AOSP सोर्स
Android बूटलोडर की सुविधाएं बनाने के लिए, U-boot के Cuttlefish कॉन्फ़िगरेशन का इस्तेमाल करें. इसके लिए, Cuttlefish के साथ सबसे नई रिलीज़ शाखा (android16-release) या Android 11 या उसके बाद के वर्शन के लिए, सामान्य सिस्टम इमेज (GSI) शाखाओं का इस्तेमाल करें. AOSP में ये सोर्स शामिल हैं:
U-boot (u-boot-mainline) के Cuttlefish कॉन्फ़िगरेशन के लिए मेनिफ़ेस्ट.
अपने Cuttlefish आर्किटेक्चर के हिसाब से, बूटलोडर टारगेट बनाएं.
उदाहरण के लिए:
x86_64
$tools/bazelrun//u-boot:crosvm_x86_64_dist
aarch64
$tools/bazelrun//u-boot:crosvm_aarch64_dist
बूटलोडर की बाइनरी (arm64 के लिए u-boot.bin और x86_64 के लिए u-boot.rom) $PATH_TO_REPO/out/u-boot-mainline/dist में मिलती है.
बूटलोडर की मदद से Cuttlefish डिवाइस लॉन्च करें. ऑटोबूट की सुविधा बंद करने और बूटलोडर के साथ इंटरैक्ट करने के लिए, pause_in_bootloader पैरामीटर शामिल करें.
बूटलोडर से इंटरैक्ट करने के लिए, बूटलोडर कंसोल से कनेक्ट करें.
$screen~/cuttlefish_runtime/console
बूटलोडर के इंटरैक्शन पूरा होने के बाद, कंसोल में boot लिखकर बूट जारी रखें.
अलग-अलग कर्नेल के साथ बूटलोडर फ़्लो की जांच करना
अलग-अलग कर्नेल या कर्नेल मॉड्यूल के साथ बूटलोडर फ़्लो की जांच करने के लिए, --kernel_path और
--initramfs_path आर्ग्युमेंट का इस्तेमाल करके टारगेट आर्टफ़ैक्ट (कर्नेल और कर्नेल मॉड्यूल) पास करें. असेंबलर, आर्ग्युमेंट में पास किए गए आर्टफ़ैक्ट के आधार पर, बूट इमेज को फिर से पैक करता है.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया."],[],[],null,["# Develop Android bootloader features\n\n\u003cbr /\u003e\n\nThis page describes how to build, run, and develop\n[Android bootloader](/docs/core/architecture/bootloader) features\non a Cuttlefish device.\n\nAOSP sources\n------------\n\nTo develop Android bootloader features, use the Cuttlefish configuration of\n[U-boot](https://www.denx.de/project/u-boot/) with Cuttlefish in\nthe latest release branch (`android16-release`) or on\n[generic system image (GSI)](/docs/setup/create/gsi)\nbranches for Android 11 or higher. The following are the sources in AOSP:\n\n- [Manifest](https://android.googlesource.com/kernel/manifest/+/refs/heads/u-boot-mainline)\n for the Cuttlefish configuration of\n [U-boot](https://www.denx.de/project/u-boot/)\n (`u-boot-mainline`).\n\n- [U-boot bootloader source](https://android.googlesource.com/platform/external/u-boot/+/refs/heads/main).\n\n- [x86 Cuttlefish default bootloader](https://android.googlesource.com/device/google/cuttlefish_prebuilts/+/refs/heads/android16-release/bootloader/crosvm_x86_64).\n\n- [aarch64 Cuttlefish default bootloader](https://android.googlesource.com/device/google/cuttlefish_prebuilts/+/refs/heads/android16-release/bootloader/crosvm_aarch64).\n\n- [QEMU bootloaders (arm, aarch64, x86_64, riscv)](https://ci.android.com/builds/branches/aosp_u-boot-mainline/grid?)\n\nDevelop a bootloader\n--------------------\n\nTo build, run, and develop bootloader features locally, follow these steps:\n| **Note:** Instead of building locally (to avoid downloading the U-boot source and setting up a bootloader development), you can download the relevant artifacts at [ci.android.com](https://ci.android.com/builds/branches/aosp_u-boot-mainline/grid?).\n\n1. Clone the manifest for the Android fork of U-boot:\n\n $ mkdir u-boot-mainline\n $ cd u-boot-mainline\n $ repo init -u https://android.googlesource.com/kernel/manifest -b u-boot-mainline\n $ repo sync -j$(nproc) -q\n\n2. Build the bootloader target appropriate for your Cuttlefish architecture.\n For example:\n\n - x86_64\n\n $ tools/bazel run //u-boot:crosvm_x86_64_dist\n\n - aarch64\n\n $ tools/bazel run //u-boot:crosvm_aarch64_dist\n\n The resulting bootloader binary (`u-boot.bin` for arm64 and `u-boot.rom` for\n x86_64) is found in `$PATH_TO_REPO/out/u-boot-mainline/dist`.\n3. Launch the Cuttlefish device with the bootloader. Include the\n `pause_in_bootloader` parameter to disable autoboot and let you interact\n with the bootloader.\n\n $ launch_cvd \\\n -bootloader /$PATH/$TO/u-boot-mainline/out/u-boot-mainline/dist/u-boot.rom \\\n -pause_in_bootloader -console=true\n\n | **Note:** If on aarch64, use `u-boot.bin` instead of `u-boot.rom`.\n4. To interact with the bootloader, connect to the bootloader console.\n\n $ screen ~/cuttlefish_runtime/console\n\n5. When done with bootloader interactions, continue the boot by typing `boot`\n into the console.\n\nTest bootloader flow with different kernels\n-------------------------------------------\n\nTo test the bootloader flow with different kernels or kernel modules, pass in\nthe target artifacts (kernel and kernel modules) using the `--kernel_path` and\n`--initramfs_path` arguments. The assembler repacks the boot images based on\nthe artifacts passed in the arguments. \n\n cvd create \\\n -kernel_path=/$PATH/$TO/common-android14-6.1/out/android14-6.1/dist/bzImage \\\n -initramfs_path=/$PATH/$TO/common-android14-6.1/out/android14-6.1/dist/initramfs.img\n\nFor more information, see\n[Develop Android Kernels](/docs/devices/cuttlefish/kernel-dev)."]]