8 BR2_TOOLCHAIN_EXTERNAL=y
9 BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
10 BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
11 BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-i386-pentium4-full-2015.05-496-g85945aa.tar.bz2"
12 BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
13 BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2=y
14 BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
15 # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
16 BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
17 BR2_TOOLCHAIN_EXTERNAL_CXX=y
18 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
19 BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
21 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
22 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.0"
23 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
24 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="{}"
25 # BR2_TARGET_ROOTFS_TAR is not set
26 """.format(infra.filepath("conf/minimal-x86-qemu-kernel.config"))
29 def test_mount_internal_external(emulator, builddir, internal=True):
30 img = os.path.join(builddir, "images", "rootfs.iso9660")
31 emulator.boot(arch="i386", options=["-cdrom", img])
35 cmd = "mount | grep 'rootfs on / type rootfs'"
37 cmd = "mount | grep '/dev/root on / type iso9660'"
39 _, exit_code = emulator.run(cmd)
43 def test_touch_file(emulator):
44 _, exit_code = emulator.run("touch test")
51 class TestIso9660Grub2External(infra.basetest.BRTest):
52 config = BASIC_CONFIG + \
54 BR2_TARGET_ROOTFS_ISO9660=y
55 # BR2_TARGET_ROOTFS_ISO9660_INITRD is not set
57 BR2_TARGET_GRUB2_BOOT_PARTITION="cd"
58 BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660"
59 BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
60 """.format(infra.filepath("conf/grub2.cfg"))
63 exit_code = test_mount_internal_external(self.emulator,
64 self.builddir, internal=False)
65 self.assertEqual(exit_code, 0)
67 exit_code = test_touch_file(self.emulator)
68 self.assertEqual(exit_code, 1)
71 class TestIso9660Grub2Internal(infra.basetest.BRTest):
72 config = BASIC_CONFIG + \
74 BR2_TARGET_ROOTFS_ISO9660=y
75 BR2_TARGET_ROOTFS_ISO9660_INITRD=y
77 BR2_TARGET_GRUB2_BOOT_PARTITION="cd"
78 BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos part_gpt normal biosdisk iso9660"
79 BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
80 """.format(infra.filepath("conf/grub2.cfg"))
83 exit_code = test_mount_internal_external(self.emulator,
84 self.builddir, internal=True)
85 self.assertEqual(exit_code, 0)
87 exit_code = test_touch_file(self.emulator)
88 self.assertEqual(exit_code, 0)
94 class TestIso9660SyslinuxExternal(infra.basetest.BRTest):
95 config = BASIC_CONFIG + \
97 BR2_TARGET_ROOTFS_ISO9660=y
98 # BR2_TARGET_ROOTFS_ISO9660_INITRD is not set
99 BR2_TARGET_ROOTFS_ISO9660_HYBRID=y
100 BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
101 BR2_TARGET_SYSLINUX=y
102 """.format(infra.filepath("conf/isolinux.cfg"))
105 exit_code = test_mount_internal_external(self.emulator,
106 self.builddir, internal=False)
107 self.assertEqual(exit_code, 0)
109 exit_code = test_touch_file(self.emulator)
110 self.assertEqual(exit_code, 1)
113 class TestIso9660SyslinuxInternal(infra.basetest.BRTest):
114 config = BASIC_CONFIG + \
116 BR2_TARGET_ROOTFS_ISO9660=y
117 BR2_TARGET_ROOTFS_ISO9660_INITRD=y
118 BR2_TARGET_ROOTFS_ISO9660_HYBRID=y
119 BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="{}"
120 BR2_TARGET_SYSLINUX=y
121 """.format(infra.filepath("conf/isolinux.cfg"))
124 exit_code = test_mount_internal_external(self.emulator,
125 self.builddir, internal=True)
126 self.assertEqual(exit_code, 0)
128 exit_code = test_touch_file(self.emulator)
129 self.assertEqual(exit_code, 0)