내 ARM Chromebook SNOW의 mmc 슬롯이 손상되었지만 USB 포트를 사용하여 Linux를 부팅할 수 있다는 것을 깨달았습니다. USB를 통해 Linux를 부팅할 수 있도록 다음 파일을 수정했습니다.
그래서:
/*
* Copyright (C) 2013 - Virtual Open Systems
* Author: Nikolay Nikolaev <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __configs_snow_h__
#define __configs_snow_h__
#include <configs/smdk5250.h>
#undef CONFIG_DEFAULT_DEVICE_TREE
#define CONFIG_DEFAULT_DEVICE_TREE exynos5250-snow
/* Generally verified boot needs more heap space */
#undef CONFIG_SYS_MALLOC_LEN
#define CONFIG_SYS_MALLOC_LEN (32 << 20)
#define CONFIG_INITRD_ADDRESS 0x44000000
#include <configs/chromeos.h>
/* Disable ChromeOS specifics */
#undef CONFIG_CHROMEOS
/* Force reading the environment */
#undef CONFIG_OF_LOAD_ENVIRONMENT
#define CONFIG_CHROMEOS_USB
/* Support vboot flag reading from GPIO hardwrae */
#define CONFIG_CHROMEOS_GPIO_FLAG
/* Support vboot flag reading from EC */
#define CONFIG_CHROMEOS_MKBP_FLAG
/* Use the default arch_phys_memset implementation */
#define CONFIG_PHYSMEM
/* Adjust the display resolution. */
#undef MAIN_VRESOL_VAL
#undef MAIN_HRESOL_VAL
#define MAIN_VRESOL_VAL 0x300
#define MAIN_HRESOL_VAL 0x556
#undef LCD_XRES
#undef LCD_YRES
#define LCD_XRES 1366
#define LCD_YRES 768
#define CONFIG_SYS_WHITE_ON_BLACK
/*
* Extra bootargs used for direct booting, but not for vboot.
* - console of the board
* - debug and earlyprintk: easier to debug; they could be removed later
*/
#define CONFIG_DIRECT_BOOTARGS \
"console=tty1 debug clk_ignore_unused"
/* Standard input, output and error device of U-Boot console. */
#define CONFIG_STD_DEVICES_SETTINGS EXYNOS_DEVICE_SETTINGS
#define CONFIG_CHROMEOS_SD_TO_SPI \
"sd_to_spi=echo Flashing U-Boot from SD card to SPI flash; " \
"if mmc dev 1 && " \
"mmc rescan && " \
"mmc read 40008000 1 1000 && " \
"sf probe 1:0 && " \
"sf update 40008000 0 80000; then " \
"echo Flash completed; else " \
"echo Flash failed; " \
"fi\0"
/* Replace default CONFIG_EXTRA_ENV_SETTINGS */
#ifdef CONFIG_EXTRA_ENV_SETTINGS
#undef CONFIG_EXTRA_ENV_SETTINGS
#endif
#define CONFIG_EXTRA_ENV_SETTINGS \
EXYNOS_DEVICE_SETTINGS \
"dtaddr=0x43000000\0"\
"initrdaddr=0x44000000\0"\
"boot_noinitrd=usb start ; usb dev 0 ; ext2load usb 0:2 ${loadaddr} uImage ; ext2load usb 0:2 ${dtaddr} exynos5250-snow.dtb ; bootm ${loadaddr} - ${dtaddr}\0"\
"boot_initrd=usb start ; usb dev 0 ; ext2load usb 0:2 ${loadaddr} uImage ; ext2load usb 0:2 ${initrdaddr} initrd ; ext2load usb 0:2 ${dtaddr} exynos5250-snow.dtb ; bootm ${loadaddr} ${initrdaddr} ${dtaddr}\0"\
"bootdelay=10\0"
#ifdef CONFIG_BOOTARGS
#undef CONFIG_BOOTARGS
#endif
#define CONFIG_BOOTARGS \
"console=tty1 root=/dev/da0p4 rw rootwait clk_ignore_unused --no-log"
/* Replace default CONFIG_BOOTCOMMAND */
#ifdef CONFIG_BOOTCOMMAND
#undef CONFIG_BOOTCOMMAND
#endif
#define CONFIG_BOOTCOMMAND \
"run boot_noinitrd"
/* Enable splash screens */
#define CONFIG_CROS_SPLASH
/* Enable simple framebuffer */
#define CONFIG_SIMPLEFB
/* Enable writing on a FAT formatted filesystem */
#define CONFIG_FAT_WRITE
/* Enable virt mode commands */
#define CONFIG_ARMV7_VIRT
/* Disable d-cache */
#define CONFIG_SYS_DCACHE_OFF
#endif /* __configs_snow_h__ */
USB 0으로 mmc를 수정하고 시간 제한을 "bootdelay=3\0"에서 "bootdelay=10\0"으로 변경하고 여기에 있는 스크립트를 실행했습니다.
이렇게 하면 새 항목이 생성됩니다.nv_uboot-snow-usb.kpart다음 명령을 사용하여 Linux가 설치된 SD 카드에 파일을 설치했습니다.
# dd if=/dev/zero of=/dev/sdi1
dd: writing to '/dev/sdi1': No space left on device
32769+0 records in
32768+0 records out
16777216 bytes (17 MB, 16 MiB) copied, 2.07775 s, 8.1 MB/s
# sudo dd if=nv_uboot-snow-usb.kpart of=/dev/sdi1
이때 USB-SD 카드 변환기를 크롬북에 연결하고 리눅스 부팅을 시도했는데, 놀랍게도 부트로더가 여전히 3초로 설정되어 있는 것을 발견했습니다. 이는 어떤 이유에서인지 새로운 nv_uboot-snow-usb.kpart가 감지되지 않았음을 의미합니다. 왜냐하면 재컴파일할 때 u-boot에 대해 10초의 시간 초과를 선택했기 때문입니다. 새로운 설정이 적용되지 않는 이유는 잘 모르겠습니다...